Vim組態 ~/.vimrc
set encoding=utf-8
set fileencodings=utf-8,cp950
set nocompatible
syntax on
set number
set expandtab
set shiftwidth=4
set tabstop=4
set hlsearch
set incsearch
set ic
"colorscheme torte
colorscheme desert
operation
Ctrl-f/Ctrl-b : forward page/backward page
0 : head of line
^ : first word of line
$ : tail of line
w/b: next/back word
gg/G : file head/tail
u : undo
{}: prev/next section
jump between vim/shell
Ctrl-z / fg
:sh / exit
:! command
Ctrl-v : view mode to select characters
y : copy(yank)
c : cut
p : past
Delete
dd : delete line
dw : delete word
d$ : delete to line tail
d0 : delete to line head
d^ : delete to line first-word
對齊
:ce : center
:le : left
:ri : right
分頁
$ vim -p a.txt b.txt
開關分頁
:tabedit <filename>
:tabfind <filename>
:tabclose <filename>
切分頁
:tabn
:tabp
gt
gT
Ctrl + PageUp
Ctrl + PageDown