This is a list of keystroks that for the life of me I cannot remember and need to check each time.
Switching Case of Characters
lower case to UPPER CASE: gU or g~ + movement
UPPER CASE to lower case: gu or g~ + movement
Comment/Uncomment Multiple Lines
-
Place the cursor to the first line you want to comment and press
Ctrl+Vto put the editor in VISUAL BLOCK mode. - Using the arrow key (or h j k l) select every line to comment/uncomment.
-
Press
Shift+Ito put the editor in INSERT mode and then press#to comment orxto uncomment (delete). -
Last, press
Escto insert a#character/delete every selected haracter on all other selected lines.
Refactoring Variables
- Place cursor on variable to rename
-
Type
gd(orgDfor global variable) -
cto change -
gnto search for last used search pattern - Type variable’s new name
-
escto exit -
.to repeat and apply to next occurences