- Movements
- Objects
- Formatting commands
- Deletion
- Paste
- Replace
- Undos / Redos
- Moving
- Inserting text
- Searching / Replacing
- Saving / Inserting files
- Exiting
You can use the arrow keys in Evil mode, it's not the best way but it works :
← ↓ ↑ →
Spacemacs using Evil helps you improve fast movements with these keys :
h j k l
Refer a word using w
Refer a line using $
Use a command on multiple objects in one row using : [number] [command] [object] OR [command] [number] [object]
Example : 5 d w deletes five words from cursor
x
d w
d $ d d
p puts the deleted/copied/cut text after the cursor
r replaces the character under the cursor
c replaces the word from the cursor
R to enter replace mode until Esc is pressed
Spacemacs remembers your actions to go back in time or move forward again.
u to undo last action (keep pressed for multiple)
Ctrl + R to redo last action (keep pressed for multiple)
G
g g
: +[number] : moves you to line [number]
i will open edit mode to insert a character before current cursor
a will open edit mode to insert a character after current cursor
o will open edit mode to insert a new line after current cursor
O will open edit mode to insert a new line before current cursor
A to append text to the end of the line
/ followed by a phrase searches FORWARD in text
? followed by a phrase searches BACKWARD in text
: s / OLD / NEW To substitute new for the first old on a line type
: s / OLD / NEW / g To substitute new for all 'old's on a line type
: # , # s / OLD / NEW To substitute phrases between two line #'s type
: % s / OLD / NEW / g To substitute all occurrences in the file type
: % s / OLD / NEW / g c To ask for confirmation each time add 'c'
Typing % while the cursor is on a (,),[,],{, or } locates its matching pair.
: w to save current buffer to file
: w FILENAME to save current buffer to specific FILENAME
: # , # FILENAME to save the lines # through # to specific FILENAME
: r FILENAME retrieves file FILENAME and inserts it into buffer at current position
: q a !
: w q a