DEV Community

Text editor tips and tricks to boost your productivity

Alejandro Bezdjian on September 13, 2019

Recently, I was peer programming at work and, whithout thinking, I started to use a few editor tricks I had learned a while ago. My co-worker was a...
Collapse
 
youpiwaza profile image
max

Great articles, especially the common use cases.

I'd also recommand cmd + K (remove à line), and the all mighty cmd + shift + D (duplicate a line, DOESN'T LOOSE the clipboard content).

If you got other tricks (even if they are harder or uncommon) I'd like to see them :)

Collapse
 
alebian profile image
Alejandro Bezdjian

You are right! I use copy and paste so I don’t have to remember another shortcut 😅 But I think I’ll start using them, thanks!

Collapse
 
youpiwaza profile image
max

Yeah it's especially usefull when you get some data/names from elsewhere and need to add them to your code, one way that already exist :)

Simply Ctrl + Shift + D to duplicate (don't loose clipboard content) and paste where needed ^

Collapse
 
joshransley profile image
Josh Ransley

A good overview of the main features/shortcuts available in pretty much every editor.

Multi line editing (& multiple cursors generally) is something that took me a while to really get used to but it's such a powerful feature.

Another thing I'd struggle without now would be some form of autocompletion.

It really pays in the long run to discover and find shortcuts for the feautures your editor has. I use Sublime and have got so used to its features and shortcuts it would take me a long time to be as productive in another editor.

Collapse
 
antoniojboza profile image
Antonio Boza

One of my favourites:

CMD + D after highlighting some text. Multi line editing jumping to the next exact same text you highlighted. Really useful to edit, in example, variable names. You could argue to use the replace functions, but this way you have autocomplete.

Collapse
 
clarity89 profile image
Alex K.

What about one of the greatest inventions after garlic bread - the code snippets?

Collapse
 
alebian profile image
Alejandro Bezdjian • Edited

I may update the post with a little example but I think those deserve another post! I rely on the ones included in the plugins and only had to write one by myself, but they are definitely awesome 😄