LINUXOPOLIS # 2019-12-15 ~ VIM - CHEAT SHEET

wglenz(54)
Published in
#linux
Words
10
Reading
1 min
Listen
Play
7y

VIM - CHEAT SHEET

Building a Linux Habitat
Published with SteemPeak
home previous

screenshot by willi glenz

$ vim ~/.config/fish/functions/gv-cheatsheat.fish

function gv-cheatsheat --description "vim - cheat sheet"
    clear
    echo
    echo '=========================================================================='
    echo '                           VIM - CHEAT SHEET                              '
    echo '--------------------------------------------------------------------------'
    echo '                             hjkl HML gg G                                '
    echo '--------------------------------------------------------------------------'
    echo 'abbreviate        :ab :abc :una ^v                                        '
    echo 'baseline          $ vim -u NONE -N                                        '
    echo 'buffers           :ls :buffers :files :bp :bl :b# :badd :bd               '
    echo 'clipboard         Vj"+y                                                   '
    echo 'colorsheme        :colorsheme elflord|desert|evening|default              '
    echo 'config            $ vim ~/.vimrc                                          '
    echo 'folds             zf zo zc zd                                             '
    echo 'macros            qa :reg a @a                                            '
    echo 'marks             [single quote] :marks ma sq-a                           '
    echo 'match             [insert mode] ^n                                         '
    echo 'mode command      :w :e                                                   '
    echo 'mode visual       v V ctrl-v                                              '
    echo 'registers         [double quote] dqdq dq0-9 dqa-z dqA-Z                   '
    echo 'set               scrolloff=99 rnu nu nonu ruler laststatus=2             '
    echo 'sort              Vj:sort                                                 '
    echo 'sudo              :w !sudo tee %                                          '
    echo 'windows           ^ws ^wv :vsplit ww ^w10< ^w= ^wq                        '
    echo '--------------------------------------------------------------------------'
    echo '                        :q :qa :wq :q! ZZ ZQ                              '
    echo '--------------------------------------------------------------------------'
    echo
end
SOURCES
 user manual ................................................:h user-manual <ctrl-w_>
 reference manual ............................................ :h reference <ctrl-w_>
 picture ....................................... screenshoot by me ~ my gnome-desktop