Some useful sublime shortcuts

Alfred Ayi-bonte
3 min readJan 20, 2018

--

It’s my first post … and I want to talk about some useful sublime shortcuts. I’m going to be a bit bias because the shortcuts I’m going to mention may apply to just mac. For windows and linux users I will employ you to use google to find the equivalent command. In most cases the shortcuts are going to be the same only that you may have to replace the command key with the control key or something else.

For newbies who don’t know what sublime is, Sublime is a text editor or an advanced form of notepad, textedit, etc and kind of like, vim, emacs but with an easy learning curve.

Using sublime shortcuts can make your life easy and increase productivity. You are able to write more code within a short period of time.

Alright! let’s jump straight into some shortcuts

Text manipulation, the first is command + shift + d. This shortcut is useful for creating duplicate text. Command + j joins the line below to the end of the current line. Command + kk deletes from cursor to the end. Control + shift + w wraps your selection with an html tag. Ctrl + Space displays the next auto-complete suggestion. Command + y will redo and command + z will also undo

Next, on navigation and cursor movement, One can move text up or down by pressing the control + command + either the up arrow or the down arrow key.

In order to make row selection, one can hold down the alt key and drag the mouse button down. To move to the end of all the rows after your selection you can press command +left arrow or command +right arrow to move to either the left end or the right end respectively. You can also use command click approach to select specific items.

The next useful shortcut is the shortcut for pasting with proper indentation. You can achieve this by using the command + shift + v.

On file operations, one can easily locate a file by using the command + p shortcut and typing in the name of the file in the text field that shows.

After selecting the file one can still use the command + p with @ and some text to find function or methods in the file.

To find string match, one can use the command +p with # and some text to find that text in the file

To move to a particular line number, again use the command + p but this time with the : sign followed by the line number. This can also be achieved by using control + G followed by the line number

To hide and show the sidebar, use the command + shift + p and type in toggle side bar, select toggle side bar option and hit enter. You would also use command + kb for this.

To indent your code, use command + ] or command + [ for right and left indent respectively

Conclusion

There are tons of shortcuts we can talk about but these are a few ones that I often use and could remember.

My next piece of writing will be on image compression algorithms. Stay tuned as I bring you this next week.

If you enjoyed this piece of writing, kindly give me some clap 👏. This will help others see this post. Thank you.

--

--