Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Fitbit Studio Tutorial

ANSWERED

Looking for a basic tutorial or hints for editing with Fitbit Studio.

 

I figured out <ctrl-f> does a search. Is there an undo option? Search and replace?

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

This is a good question. It's a wonder it hasn't been asked before. After a little digging, I found this (more or less):

Basic

Left            goCharLeft
Right           goCharRight
Up              goLineUp
Down            goLineDown
End             goLineEnd
Home            goLineStartSmart
PageUp          goPageUp
PageDown        goPageDown
Delete          delCharAfter
Backspace       delCharBefore
Shift-Backspace delCharBefore
Tab             defaultTab
Shift-Tab       indentAuto
Enter           newlineAndIndent
Insert          toggleOverwrite
Esc             singleSelection


PC

Ctrl-A          selectAll
Ctrl-D          deleteLine
Ctrl-Z          undo
Shift-Ctrl-Z    redo
Ctrl-Y          redo
Ctrl-Home       goDocStart
Ctrl-End        goDocEnd
Ctrl-Up         goLineUp
Ctrl-Down       goLineDown
Ctrl-Left       goGroupLeft
Ctrl-Right      goGroupRight
Alt-Left        goLineStart
Alt-Right       goLineEnd
Ctrl-Backspace  delGroupBefore
Ctrl-Delete     delGroupAfter
Ctrl-S          save
Ctrl-F          find
Ctrl-G          findNext
Shift-Ctrl-G    findPrev
Shift-Ctrl-F    replace
Shift-Ctrl-R    replaceAll
Ctrl-[          indentLess
Ctrl-]          indentMore
Ctrl-U          undoSelection
Shift-Ctrl-U    redoSelection
Alt-U           redoSelection


emacs

Ctrl-F          goCharRight
Ctrl-B          goCharLeft
Ctrl-P          goLineUp
Ctrl-N          goLineDown
Alt-F           goWordRight
Alt-B           goWordLeft
Ctrl-A          goLineStart
Ctrl-E          goLineEnd
Ctrl-V          goPageDown
Shift-Ctrl-V    goPageUp
Ctrl-D          delCharAfter
Ctrl-H          delCharBefore
Alt-D           delWordAfter
Alt-Backspace   delWordBefore
Ctrl-K          killLine
Ctrl-T          transposeChars
Ctrl-O          openLine


mac

Cmd-A           selectAll
Cmd-D           deleteLine
Cmd-Z           undo
Shift-Cmd-Z     redo
Cmd-Y           redo
Cmd-Home        goDocStart
Cmd-Up          goDocStart
Cmd-End         goDocEnd
Cmd-Down        goDocEnd
Alt-Left        goGroupLeft
Alt-Right       goGroupRight
Cmd-Left        goLineLeft
Cmd-Right       goLineRight
Alt-Backspace   delGroupBefore
Ctrl-Alt-Backspace delGroupAfter
Alt-Delete      delGroupAfter
Cmd-S           save
Cmd-F           find
Cmd-G           findNext
Shift-Cmd-G     findPrev
Cmd-Alt-F       replace
Shift-Cmd-Alt-F replaceAll
Cmd-[           indentLess
Cmd-]           indentMore
Cmd-Backspace   delWrappedLineLeft
Cmd-Delete      delWrappedLineRight
Cmd-U           undoSelection
Shift-Cmd-U     redoSelection
Ctrl-Up         goDocStart
Ctrl-Down       goDocEnd

It requires a bit of interpretation, and I certainly haven't tested all of it, but what I have tested seems to work.

 

Methinks something like this would be good to add to the official documentation.

Peter McLennan
Gondwana Software

View best answer in original post

Best Answer
10 REPLIES 10

Ctrl+Z for undo - the SDK stores the changes from the current session so repeated Ctrl+Z can take you back to starting code at start.  If you exit the session (close the SDK, and see the project list) the current files in the project get saved and Ctrl Z only works on new changes.when you reload the project.

 

I have not found (or looked for) a S & R - 

Best Answer

Ok, I found some general shortcuts that seem to work. But no multiple find and replace option though.

 

https://www.howtogeek.com/115664/42-text-editing-keyboard-shortcuts-that-work-almost-everywhere/

Best Answer
0 Votes

This is a good question. It's a wonder it hasn't been asked before. After a little digging, I found this (more or less):

Basic

Left            goCharLeft
Right           goCharRight
Up              goLineUp
Down            goLineDown
End             goLineEnd
Home            goLineStartSmart
PageUp          goPageUp
PageDown        goPageDown
Delete          delCharAfter
Backspace       delCharBefore
Shift-Backspace delCharBefore
Tab             defaultTab
Shift-Tab       indentAuto
Enter           newlineAndIndent
Insert          toggleOverwrite
Esc             singleSelection


PC

Ctrl-A          selectAll
Ctrl-D          deleteLine
Ctrl-Z          undo
Shift-Ctrl-Z    redo
Ctrl-Y          redo
Ctrl-Home       goDocStart
Ctrl-End        goDocEnd
Ctrl-Up         goLineUp
Ctrl-Down       goLineDown
Ctrl-Left       goGroupLeft
Ctrl-Right      goGroupRight
Alt-Left        goLineStart
Alt-Right       goLineEnd
Ctrl-Backspace  delGroupBefore
Ctrl-Delete     delGroupAfter
Ctrl-S          save
Ctrl-F          find
Ctrl-G          findNext
Shift-Ctrl-G    findPrev
Shift-Ctrl-F    replace
Shift-Ctrl-R    replaceAll
Ctrl-[          indentLess
Ctrl-]          indentMore
Ctrl-U          undoSelection
Shift-Ctrl-U    redoSelection
Alt-U           redoSelection


emacs

Ctrl-F          goCharRight
Ctrl-B          goCharLeft
Ctrl-P          goLineUp
Ctrl-N          goLineDown
Alt-F           goWordRight
Alt-B           goWordLeft
Ctrl-A          goLineStart
Ctrl-E          goLineEnd
Ctrl-V          goPageDown
Shift-Ctrl-V    goPageUp
Ctrl-D          delCharAfter
Ctrl-H          delCharBefore
Alt-D           delWordAfter
Alt-Backspace   delWordBefore
Ctrl-K          killLine
Ctrl-T          transposeChars
Ctrl-O          openLine


mac

Cmd-A           selectAll
Cmd-D           deleteLine
Cmd-Z           undo
Shift-Cmd-Z     redo
Cmd-Y           redo
Cmd-Home        goDocStart
Cmd-Up          goDocStart
Cmd-End         goDocEnd
Cmd-Down        goDocEnd
Alt-Left        goGroupLeft
Alt-Right       goGroupRight
Cmd-Left        goLineLeft
Cmd-Right       goLineRight
Alt-Backspace   delGroupBefore
Ctrl-Alt-Backspace delGroupAfter
Alt-Delete      delGroupAfter
Cmd-S           save
Cmd-F           find
Cmd-G           findNext
Shift-Cmd-G     findPrev
Cmd-Alt-F       replace
Shift-Cmd-Alt-F replaceAll
Cmd-[           indentLess
Cmd-]           indentMore
Cmd-Backspace   delWrappedLineLeft
Cmd-Delete      delWrappedLineRight
Cmd-U           undoSelection
Shift-Cmd-U     redoSelection
Ctrl-Up         goDocStart
Ctrl-Down       goDocEnd

It requires a bit of interpretation, and I certainly haven't tested all of it, but what I have tested seems to work.

 

Methinks something like this would be good to add to the official documentation.

Peter McLennan
Gondwana Software
Best Answer

Thanks for all the info.  There are however, Fitbit Studio specific shortcuts, such as ctrl-b... which builds the project.  I can't imagine there isn't any documentation on this.  What framework is Studio based on?  Perhaps that's where we can find the answers.

Best Answer
0 Votes

You can press ? when not focused in the text editor to see some studio specific shortcuts.

 

CMD / - code comment/uncomment

CMD B - build

CMD R - run

CMD P  - command palette

 

On Windows it's CTRL instead of CMD.

Best Answer

Ah, ok.  Now we talkin'.  Thanks.

-r

Best Answer
0 Votes

I think the text editor is CodeMirror.

Peter McLennan
Gondwana Software
Best Answer
0 Votes

Ok, cool.  So CodeMirror supports all kinds of rich editing functionality, such as autocomplete, folding, themes.  Doesn't look like much of that is supported in the Fitbit Studio or am I doing it wrong?  

Best Answer
0 Votes

I am looking for some very basic Fitbit Studio info

eg -

  • In the project list - How can you copy an existing project to make a new project ? (You can rename and delete, but not copy)
  • How do you import a project from elsewhere into the project list so you can edit / amend it ?
Best Answer
0 Votes

1) You can not (unfortunately). You have to export it and then reimport it (and change name), see point 2

2) Create an empty project. Unizip the zip file containing the source code and drag and drop the content into your empty project file.

Best Answer
0 Votes