A few tricks from vimtricks.com

This commit is contained in:
lhark 2021-01-04 22:58:40 +01:00
parent 921d9c6c97
commit eaa5fd2fdd

View file

@ -4,6 +4,8 @@ CMD LINE
NORMAL MODE NORMAL MODE
I Start inserting at the beginning of the line I Start inserting at the beginning of the line
<C-W>[HJKL] Move split to extreme left, bottom, top, right <C-W>[HJKL] Move split to extreme left, bottom, top, right
c% Replace argument with arbitrary nested paren/brackets/etc...
https://thepugautomatic.com/2014/03/vims-life-changing-c-percent/
VISUAL MODE VISUAL MODE
<C-V>g<C-A/X> Convert column of identical number to inc/decrementing list <C-V>g<C-A/X> Convert column of identical number to inc/decrementing list
@ -11,5 +13,28 @@ VISUAL MODE
COMMAND COMMAND
:botright split / :bo sp Full width sp across multiple vs :botright split / :bo sp Full width sp across multiple vs
:topleft vsplit / :to vs Full height vs across multiple sp :topleft vsplit / :to vs Full height vs across multiple sp
:[no]scrollbind [un]lock split scrolling together
:retab Replace tabs with the correct number of space after :set expandtab
EX MODE:
# Don't forget good ol' `man ex`
CONFIG
# https://stackoverflow.com/a/23036077/5309963
set viminfo=%,<800,'10,/50,:100,h,f0,n~/.vim/cache/.viminfo
" | | | | | | | + viminfo file path
" | | | | | | + file marks 0-9,A-Z 0=NOT stored
" | | | | | + disable 'hlsearch' loading viminfo
" | | | | + command-line history saved
" | | | + search history saved
" | | + files marks saved
" | + lines saved each register (old name for <, vi6.2)
" + save/restore buffer list
HELP
# https://vimtricks.com/p/vimtricks-help-powerup/
K Jump to docs for word under cursor
<C-]> Jump to tag under cursor
:helpgrep Search docs
#TODO: bring tricks from vimrc #TODO: bring tricks from vimrc