Repository navigation
Expand file tree
/
Copy path.vimrc
More file actions
98 lines (81 loc) · 2.15 KB
/
Copy path.vimrc
File metadata and controls
98 lines (81 loc) · 2.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
" If no screen, use color term
if ($TERM == "vt100")
" xterm-color / screen
set t_Co=8
set t_AF=[1;3%p1%dm
set t_AB=[4%p1%dm
endif
if filereadable($VIMRUNTIME . "/vimrc_example.vim")
so $VIMRUNTIME/vimrc_example.vim
endif
if filereadable($VIMRUNTIME . "/macros/matchit.vim")
so $VIMRUNTIME/macros/matchit.vim
endif
set nu
syntax on
set nocompatible
set wildmenu
set backupdir=~/tmp,.,/var/tmp/vi.recover,/tmp
set directory=~/tmp,/var/tmp/vi.recover,/tmp,.
set nobackup " keep a backup file
" set textwidth=78
" set shiftwidth=4
set bs=2 " allow backspacing over everything in insert mode
set ai " always set autoindenting on
set viminfo='20,\"50 " read/write a .viminfo file, don't store more
set showmatch
"set background=dark " another is 'light'
" VIM 6.0,
if version >= 600
set nohlsearch
" set foldcolumn=2
" set foldmethod=syntax
set foldmethod=marker
set foldlevel=1
" set foldtext=/^/=>
" set encoding=utf-8
" set fileencoding=big5
" set termencoding=big5
set encoding=big5
set fileencoding=big5
set termencoding=big5
set fileencodings=big5,utf-8,euc-jp,gbk,euc-kr,utf-bom,iso8859-1
set ambiwidth=double
" set fileencodings=latin,big5,ucs-bom,utf-8,sjis,big5
" set fileencodings=ucs-bom,utf-8,sjis,big5,latin1
else
set fileencoding=taiwan
endif
" Tab key binding
if version >= 700
map <C-c> :tabnew<CR>
imap <C-c> <ESC>:tabnew<CR>
map <C-k> :tabclose<CR>
map <C-p> :tabprev<CR>
imap <C-p> <ESC>:tabprev<CR>
map <C-n> :tabnext<CR>
"imap <C-n> <ESC>:tabnext<CR>
map <F4> :set invcursorline<CR>
map g1 :tabn 1<CR>
map g2 :tabn 2<CR>
map g3 :tabn 3<CR>
map g4 :tabn 4<CR>
map g5 :tabn 5<CR>
map g6 :tabn 6<CR>
map g7 :tabn 7<CR>
map g8 :tabn 8<CR>
map g9 :tabn 9<CR>
map g0 :tabn 10<CR>
map gc :tabnew<CR>
map gn :tabn<CR>
map gp :tabp<CR>
highlight TabLineSel term=bold,underline cterm=bold,underline ctermfg=7 ctermbg=0
highlight TabLine term=bold cterm=bold
highlight clear TabLineFill
end
" Crontabs must be edited in place
au BufRead /tmp/crontab* :set backupcopy=yes
" set tab as 4 space
set expandtab
set shiftwidth=4
set softtabstop=4