Find or replace can be helpful for those who want to change the name of a variable or element and want to edit every instance of that variable in your program together at the same time. If you want to find on Windows, all that you have to do is to press Ctrl-F. The same thing can be followed if you want to do it on Chromebook. As for those who are on Mac OS, the one that should be pressed is Command-F. If you want to replace on Windows or Chromebook, instead of pressing Ctrl-F, please press Ctrl-H. If you want to do that on Mac OS, then you will have to press Command-Option-F instead.
Aside from these two keyboard shortcuts, there are also two other keyboard shortcuts included in the same category. If you want to find next on Windows, you will have to press Ctrl-K. To be able to do it on Chromebook, you can follow the same method. If you want to do it on Mac OS, you must press Command-G instead of Ctrl-K. Another one is the action to find previous. If you want to find previous on Windows, you will have to press Ctrl-Shift-K. Please follow the same thing if you are on Chromebook. As for everyone who wants to do it on Mac OS, instead of pressing Ctrl-Shift-K, you are recommended to press Command-Shift-G.
In addition to these keyboard shortcuts mentioned above, there are some other built in keyboard shortcuts made by the Code Editor of Code HS. Each of them is able to make writing programs on CodeHS a bit easier. Below is the list of some other helpful shortcuts that you might want to know. Feel free to try them while writing code:
General:
- Indent: In order to indent on Windows, you will have to press Tab. If you want to do it on Chromebook, you can also press the same thing. Just like on Windows and Chromebook, those who are on Mac OS can also press the same Tab.
- Outdent: In order to outdent on Windows, you will have to press Shift-Tab. If you want to do it on Chromebook, you can also press the same thing. As for those who want to do it on Mac OS, the similar thing can be pressed, which is Shift-Tab.
- Undo: In order to undo on Windows, you will have to press Ctrl-Z. If you want to do it on Chromebook, you can also do the same thing. As for those who are on Mac OS, please press Command-Z instead.
- Redo: In order to redo on Windows, you will have to press ctrl-Y. If you want to do it on Chromebook, you can also do the same thing. As for those who are on Mac OS, please press Command-Y instead.
- Toggle comment: In order to toggle comment on Windows, you will have to press Ctrl- /. If you want to do it on Chromebook, you can do the same thing. As for those who are on Mac OS, please press Command- / instead.
- Go to line: In order to go to line on Windows, you will have to press Ctrl-L. If you want to do it on Chromebook, you can do the same thing. As for those who are on Mac OS, please press Command-L instead.
Multicursor: Rather than having just one cursor, you are allowed to make a multicursor, making it possible for you to make edits, such as indenting, to more than one line of code at the same time.
- Add multi-cursor above: In order to add multi-cursor above on Windows, you will have to press Ctrl-Alt-Up. If you want to do it on Chromebook, you can also do the same thing. As for those who are on Mac OS, please press Ctrl-Option-Up instead.
- Add multi-cursor below: In order to add multi-cursor below on Windows, you will have to press Ctrl-Alt-Down. If you want to do it on Chromebook, you can also do the same thing. As for those who are on Mac OS, please press Ctrl-Option-Down instead.
Selecting text:
Every following shortcut is helpful to choose text in your code if you want to copy or cut:
- Select All: In order to select all on Windows, you will have to press Ctrl-A. If you want to do it on Chromebook, you can do the same thing. As for those who are on Mac OS, please press Command-A instead.
- Select Line Up / Down: In order to select line up on Windows, you will have to press Shift-Up. Please press Down instead of Up if you want to select line up down. If you want to do it on Chromebook, you can do the same thing. As for those who are on Mac OS, please press Shift-Up to select line up or Shift-Down to select line up down.
- Select Word Left / Right: In order to select word left on Windows, you will have to press Ctrl-Shift-Left. Please press Right instead of Left if you want to select word right. If you want to do it on Chromebook, you can do the same thing. As for those who are on Mac OS, please press Option-Shift-Left to select word left or press Option-Shift-Right to select word right.
It should be easy for you to find and replace in CodeHS by following the instructions above. In case you still have questions about the keyboard shortcuts, you are encouraged to ask your teacher. Do not hesitate to ask them as they will gladly help you with your questions if they can. Gather your courage now and just do it. If it is hard for you, you might want to try to find the community or forum that is usually found online. Once you manage to find a community or forum, you can try to get help from the members. Please explain your question clearly so that they can help you with your question as soon as possible.