VIM v19-02-04
Image source: Willi Glenz - Screenshot vim
homepage documentation manual reference faq wiki
lfd | topic | commands |
---|---|---|
01 | tutorial | $ firefox vim-adventures.com & $ vimtutor |
02 | documentation | $ man vim $ firefox file:///usr/share/doc/vim-doc/html/index.html & :help user-manual • ^] ^o :help edit ^d |
03 | buffer | $ vim -O ~/.vimrc ~/.bashrc ^ww ^wr ^wc ^wq $ vim ~/.bashrc ~/.bashrc :args :ls :next :previous :n :N :buffers :badd :b1 :b2 :bn :bp :bf :bl |
04 | cursor | H M L zt zz zb z<enter> z- l h j k |
05 | window | :set nu nonu :set relativenumber norelativenumber :set hls nohls * :set ruler noruler :set linebreak nolinebreak ^ws ^wv ^wr ^wc ^wq gg G ^g 50% ^e ^y ^n ^u ^d ^f ^b |
06 | repeat | . |
07 | search | / f |
08 | match | [InsertMode] ^n |
09 | abbreviate | :ab :abc :unab |
10 | mark | m1 '1 |
11 | fold | zf5j zo zc zd |
12 | undo redo | u U ^r |
13 | visual | v ^v |
99 | buffer | :wq :q! |
:ab psvm public static void main(String[] args) {<CR>}<Esc>ko
:ab sysout System.out.println("");<Esc>2hi
EDITOR=/usr/bin/vim
VISUAL=$EDITOR
export EDITOR VISUAL
syntax on syntax off
set nu nonu
set showmode noshowmode
set showcmd noshowcmd
set relativenumber norelativenumber
set ruler noruler
set hls nohls
set background=dark
set encoding=utf8
set mouse=a
set autoindent
set tabstop=3
set softtabstop=3
set shiftwidth=3
set expandtab
nmap <leader>w :w!<cr>
map <F2> :echo 'Current time is ' . strftime('%c')<CR>
:ab psvm public static void main(String[] args) {<CR>}<Esc>ko
:ab sysout System.out.println("");<Esc>2hi
# apt-get install vim vim-doc vim-scripts
$ dpkg -L vim-doc
# update-alternatives --config editor
$ vim --version | less