A Nice Guide to Typing Code

Welcome to my guide to typing code in the Roblox LuaU editor.

This guide is meant to teach you how to type code in the most effective way possible. It will not be covering tips to improve your code.

Common Shortcuts

When writing code, there's a few common shortcuts that can be used to heavily speed up your progress. I will give some examples below.
CTRL+C - Used to copy highlighted text.
CTRL+X - Also used to copy highlighted text. It will also delete that text.
CTRL+V - Used to paste copied text.
🪟+V - Used to open clipboard history.
CTRL+A - Used to highlight all text.
CTRL+Z - Used to undo edits
CTRL+Z - Used to redo edits

Text Cursor

You can move your cursor around in many ways. Your text cursor is your friend, so make sure to use it to its fullest potential. Your cursor determines where you place typed/pasted characters as well as where you start highlighting. You can move it by clicking between any two characters or by using the cursor keys (arrow keys). You can move by word instead of by letter by holding CTRL. You can even use multiple cursors! Just click between two characters while holding ALT to add an extra cursor.

Highlighting

Highlighting is the most useful basic text feature. It lets you do things from moving code to replacing things fast. First, you need to know how to highlight. To remove a highlight, move your cursor away from the highlight. To add a highlight using your mouse, click and hold where you want to start, and move your mouse to the end point. To add a highlight using your keyboard, place your cursor at the starting point, hold SHIFT, and move your cursor. You can also highlight by clicking at the start, holding SHIFT, and clicking at the end point. You can even highlight a word by double clicking it, or a paragraph/line by triple clicking it! Once you have text highlighted, you can do a few things. For example, you can copy or cut the text. You can also add any characters to replace the highlighted text. You can also drag the text to a different part of your code. There will be a text cursor to show where you will drop the first character.

Roblox Specifics

If you add a left or right parenthesis, your highlighted text will be surrounded by parentheses. If you place a left or right parenthesis, it will autocomplete to have both and place your cursor in the center. You can type a right parenthesis to get out of the enclosed text. When your cursor is to the left of a parenthesis, both the current and opposite parenthesis will be highlighted in gray. All these things work for other enclosing characters too, like square and curly brackets. You can also press TAB to add a tab. It can help the code be more readable.

Autocomplete

When writing code, various optional autocomplete options may appear. It may be objects, variables, functions, and more! To accept optional autocomplete, just press TAB. To deny it, press ESC. There are some extra non-optional outliers. These include:
  • the top of an if statement, up to the then.
  • the top of a function, up to the ().
  • The inside of any enclosing characters.

These usually just complete what you meant to type, although they are sometimes wrong.

Trackpad

When using a trackpad, dragging with the touch area may seem impossible. It's not, just double tap and hold to drag. You can also quadruple click text and clicking it more will keep toggling it between double and triple click.

Conclusion

There's all the code navigation tips I know! Here's the things to remember:
  • Autocomplete is your friend, and saves lots of time. You can accept with TAB and deny with ESC
  • You can use highlights to move, drag, and clone your code.
  • Your text cursor is very useful, and you can add more by clicking between two characters while holding ALT.
  • Use CTRL+C, CTRL+V, CTRL+Z, and CTRL+Y often. They are very important for everything.
5 Likes

A Nice Guide to Using Computers.

5 Likes