-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_vimrc
72 lines (64 loc) · 1.26 KB
/
_vimrc
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
" vim configure file
" Author: Heng LIN ([email protected])
if v:progname =~? "evim"
finish
endif
call pathogen#infect()
" Display related settings
set nocompatible
set background=dark
" set foldmethod=marker
set foldmethod=syntax
set matchtime=1
set number
set ruler
set showcmd
set showmatch
set scrolloff=3
"set wildmenu
"set nowrap
"set ignorecase
if &t_Co > 2 || has("gui_running")
syntax on
set hlsearch
endif
" Operation related settings
set backspace=indent,eol,start
set history=50
set incsearch
if has("mouse")
set mouse=
endif
" File related settings
set noerrorbells
set autoread
set encoding=utf-8
"set backup
set fileencodings=ucs-bom,utf-8,gb18030,default,latin1
set expandtab
set shiftwidth=4
set softtabstop=4
set tabstop=8
if has("autocmd")
filetype plugin indent on
augroup vimrcEx
autocmd!
autocmd FileType text setlocal textwidth=78
autocmd BufReadPost *
\ if line("'\"") > 1 && line("\"") <= line("$")
\ | execute "normal! g`\""
\ | endif
augroup END
else
set autoindent
endif
" Miscellaneous settings
map Q gq
map zz zA
imap jj <Esc>
vnoremap // y/<C-R>"<CR>
map <F9> :TagbarToggle<cr>
map <F8> :NERDTreeToggle<cr>
map <F5> :w <bar> make<cr>
au BufNewFile,BufRead *.cl set filetype=c
set diffopt+=iwhite