Text Processing and Editing Flashcards
How to exit Nano
Ctrl X
How to save in Nano
ctrl O
Get help in Nano
ctrl G
Open a second file within Nano
ctrl R then alt F (new buffer, otherwise it just inserts)
Swap between buffers in Nano
alt > or <
Create a new buffer (file) alongside one already open in Nano
ctrl R, alt F
Copy/cut a line in Nano
ctrl K (cuts) then ctrl U (pastes)
Mark a region in Nano
alt A, then move cursor
Copy a region in Nano
ctrl ^
(ctrl shift 6)
Find a word (string) in Nano
ctrl W.
Is not case sensitive
alt W will continue to search
How to find a replace all instances of a string in Nano?
ctrl\ or alt R
How to enter insert mode in Vim
i
How to enter command mode in Vim
:
How to enter visual mode in Vim
It opens into visual mode, otherwise hit Esc
How to delete a line in Vim
: d
Or Esc -d-d
How to save then quit Vim
:wq
How to quit without saving in Vim
:q!
How to bring up line numbers in Vim
:set number
How select a range of lines in Vim
:1,100
Copy in Vim
Y (in command)
yy (in visual)
Paste in Vim
p
Or pp
Find a string in Vim
/STRING (case sensitive)
Jump to a string instance in vim as you open
vim +/STRING FILE
How to repeat a search in Vim
/ ENTER
or from visual mode
‘n’ (forwards) N (backwards)