jjgod / my-rc-files

It's a collection of my .rc files

This URL has Read+Write access

my-rc-files / .vimrc
100644 58 lines (47 sloc) 1.366 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
"language zh_cn
"set langmenu=zh_cn.utf8
set nocompatible
syntax on
" set encoding=utf-8
set fencs=ucs-bom,utf-8,gb18030,cp936
set shiftwidth=4 tabstop=4 expandtab smarttab autoindent smartindent
set nobackup nowritebackup
set nu!
set backspace=indent,eol,start
"set macatsui antialias
"set guifont=Monaco\ 16
filetype plugin indent on
set hlsearch
set showcmd
set ruler
set lbr
set wildmenu
 
set cpt=.,w,b,u,t
 
nmap <C-s> :w<CR>
map <A-k> :tabnext<CR>
 
map <F2> :tabnext<CR>
map <F3> :tabprev<CR>
map <F5> :make<CR>
nnoremap <silent> <F8> :TlistToggle<CR>
map <C-F12> :!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .<CR>
 
" TagList settings
let Tlist_Show_One_File = 1
let Tlist_Use_Right_Window = 1
let Tlist_Use_SingleClick = 1
let Tlist_Enable_Fold_Column = 1
let g:tex_stylish = 1
 
set tags+=~/.vim/systags
 
augroup mkd
  autocmd BufRead *.mkd set ai formatoptions=tcroqn2 comments=n:>
  autocmd BufRead *.markdown set ai formatoptions=tcroqn2 comments=n:>
augroup END
 
au BufRead sup.* set ft=mail
au BufNewFile,BufRead *.i set filetype=swig
 
map ,/ :s/^/\/\//<CR>
 
" When editing a file, always jump to the last cursor position
autocmd BufReadPost *
      \ if ! exists("g:leave_my_cursor_position_alone") |
      \ if line("'\"") > 0 && line ("'\"") <= line("$") |
      \ exe "normal g'\"" |
      \ endif |
      \ endif