DEV Community

Gohomewho
Gohomewho

Posted on

Basic but powerful shortcuts that help editing texts

I want to share some basic but very powerful shortcuts that I use every day. These shortcuts come in handy from time to time, and sometimes it is more efficient to use them rather than moving our hand off keyboard and use a mouse.

Note I am using windows, but I think these shortcuts work across Mac and Linux.

Keys that we'll use in this article:
Home End Ctrl Shift Z X C V


Select texts

There are various way to select texts. We can select from a single character to a word, a line, or multiple lines! We have the power to select what we want while holding(👇) Shift and moving our cursor. The idea is to select from where cursor starts to where cursor ends.

Select characters

👇Shift + /
select as cursor moving forward or backward.

Select words

👇Ctrl + /
This allows us to move cursor forward or backward over words.

👇Shift + 👇Ctrl + /
composed with Shift, we can easily select words.

Select single line

Home
move cursor to the start of the line.

👇Shift + Home
select from cursor position to the start of the line.

End
move cursor to the end of the line.

👇Shift + End
select from cursor position to the end of the line.

Select multiple lines

👇Shift + /
select from cursor position to next position of cursor.

Select all

👇Ctrl + A
select all texts within an area.

Select towards all

👇Ctrl + 👇Shift + End
select from cursor position to the end of an area.

Select backwards all

👇Ctrl + 👇Shift + Home
select from cursor position to the start of an area.


Actions

Now we have texts selected, we can start manipulate the texts.

Copy

👇Ctrl + C
copy the selected text.

Cut

👇Ctrl + X
cut the selected text.

Paste

👇Ctrl + V
paste the texts we copied or cut.

Undo

👇Ctrl + Z
Undo your last change.

Redo

👇Ctrl + 👇Shift + Z
Undo your last undo.

Be aware that the behavior of undo and redo could vary on different environments, and might not work as we want sometimes.


Wrap up

With the help of shortcuts, we can select and edit text easier and faster. They are simple but really powerful. Next time I'll share some basic shortcuts on VSCode and show how we can leverage these tools.

Top comments (0)