/^\n\{3} : find 3 empty lines
/\(^str.*\n\)\{2} : find 2 successive lines starting with str
:vmap // y/<C-R>"<CR> : search for visually highlighted text
:%s/^.\{-}pdf/new.pdf/ : delete to 1st pdf only
:%s/\d\+/\=(submatch(0)-3)/ : decrement numbers by 3
:g/loc\|function/s/\d/\=submatch(0)+6/ : increment numbers by 6 on certain lines only
:%s,\(all/.*\)\@<=/,_,g : replace all / with _ AFTER "all/"
:g/^\s*$/d : delete all blank lines
:redir @*|sil exec 'g#<\(input\|select\|textarea\|/\=form\)\>#p'|redir END : filter all form elements into paste register
:g/^$/,/./-j : compress empty lines
:g/\(^I[^^I]*\)\{80}/d : delete all lines containing at least 80 tabs
:nmap <leader>c :hi Normal guibg=#<c-r>=expand("<cword>")<cr><cr> : display RGB colour under the cursor eg #445588
:'a,'b!sort -u : use an external program to filter content
:%s#\<from\>\|\<where\>\|\<left join\>\|\<\inner join\>#\r&#g : format a mysql query
Adaugat de ddumi (250 vizualizari) |