VIM v19-01-18
ctrl | : | a...z |
---|---|---|
• ctrl g • ctrl e • ctrl [u][d] • ctrl n | nu nonu relativenumber hls nohls | • z • zz • z - |
• <esc> j k h l
$ vim -o dummy1.txt dummy2.txt
$ vim -O dummy1.txt dummy2.txt
• ctrl-ws ctrl-wv ctrl-wr ctrl-wc ctrl-wq
:find .bashrc
$ vim ~/.bashrc
01 EDITOR=/usr/bin/vim
02 VISUAL=$EDITOR
03 export EDITOR VISUAL
$ vim ~/.vimrc
01 " GENERAL
02 syntax on
03 set number
04 set relativenumber
05 set ruler
06 set mouse=a
07 set hls
08 set background=dark
09 set encoding=utf8
10 " INDENT
11 set autoindent
12 " TABs
13 set tabstop=3
14 set softtabstop=3
15 set shiftwidth=3
16 set expandtab
17 " MAPs
18 nmap <leader>w :w!<cr>
19 map <F2> :echo 'Current time is ' . strftime('%c')<CR>
:help user-manual
$ man vim
$ vimtutor
• file:///usr/share/doc/vim-doc/html/index.html
• vim.org/docs.php
• vim-adventures.com
• vim.org
# apt-get install vim vim-doc vim-scripts
$ dpkg -L vim-doc
# update-alternatives --config editor
$ vim --version | less