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)