Notes on g/ flag, regex copying, quickfix

This commit is contained in:
Ian Keane 2020-06-25 15:42:19 -04:00
parent 5e0b00ae1c
commit 53224e3df5

View file

@ -1,10 +1,56 @@
TODO: asciidoc
ODO: asciidoc
hq6/VimFreeDrag
General Vim
c-p, c-n
dumb completion in open buffers
c-i, c-o
back/forward a jump
g;
back to last edit location
c-^
go to previous file edited (alternate file)
registers
:reg
see register contents
<C-r> reg
paste from register in normal mode
names
1-9
delete registers
0
yank register
a-z
named registers
A-Z
same as a-z but append
/
current search pattern
=
returns a math result
_
black-hole register
:
last ex command
quickfix
run :make in vim
:copen to go to line
navigation:
:cn, :cw, :cp, [c, ]c
regex copying
show only matching lines:
:g/pattern
copy only matching lines:
:g/pattern/ y A
v
inverse
delete all lines not matching a pattern:
:v/pattern/d
https://www.youtube.com/watch?v=v0W7JkzQAzA
EasyAlign
C-x in visual mode to do reg expression