-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
executable file
·137 lines (95 loc) · 2.52 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
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
" cscope settings
noremap <leader>cs :cs find s
noremap zs :cs find s <C-R>=expand("<cword>")<CR><CR>
noremap zg :cs find g <C-R>=expand("<cword>")<CR><CR>
noremap zc :cs find c <C-R>=expand("<cword>")<CR><CR>
noremap zd :cs find d <C-R>=expand("<cword>")<CR><CR>
noremap zt :cs find t <C-R>=expand("<cword>")<CR><CR>
noremap ze :cs find e <C-R>=expand("<cword>")<CR><CR>
noremap zf :cs find f <C-R>=expand("<cfile>")<CR><CR>
noremap zi :cs find i <C-R>=expand("<cfile>")<CR><CR>
" =========================================================================
" NERDTree settings
let g:nerdtree_tabs_open_on_console_startup=1
"autocmd VimEnter * NERDTree
nmap nt :NERDTreeToggle <CR>
map <C-j> <C-W>j
map <C-k> <C-W>k
map <C-h> <C-W>h
map <C-l> <C-W>l
" =========================================================================
" MBE settings
let g:miniBufExplMapWindowNavVim = 1
let g:miniBufExplMapWindowNavArrows = 1
let g:miniBufExplMapCTabSwitchBufs = 1
let g:miniBufExplModSelTarget = 1
let g:miniBufExplMoreThanOne=0
nmap qq :MBEbp<CR>
nmap ww :MBEbn<CR>
" =========================================================================
" Tagbar settings
nmap tt :TagbarToggle<CR>
" Sets how many lines of history VIM has to remember
set history=300
" Set to auto read when a file is changed from the outside
set autoread
set splitright
" When vimrc is edited, reload it
autocmd! bufwritepost vimrc source ~/.vimrc
" always show the mouse
set mouse=a
"set mouse=nv
"Turn on WiLd menu
set wildmenu
"Always show current position
set ruler
"Ignore case when searching
set ignorecase
"Highlight search things
set hlsearch
"Make search act like search in modern browsers
set incsearch
"Set magic on, for regular expressions
set magic
"Show matching bracets when text indicator is over them
set showmatch
"Show the number line
"set nu
"cursorline : hightlight currentline
set cul
"Auto save current status
if has("autocmd")
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif
syntax on
set t_Co=256
"Default file types
set ffs=unix,dos,mac
" Turn backup off, since most stuff is in SVN, git anyway...
set nobackup
set nowb
set noswapfile
set noexpandtab
set shiftwidth=4
set tabstop=4
set softtabstop=4
set autoindent
set smartindent
set modeline
"set list
"set smarttab
"set lbr
"
"set tw=500
"Auto indent
set ai
"Smart indet
set si
"Wrap lines
set wrap
"C indent
set cin
" Chinese solution
set fileencodings=utf-8,gb2312,gbk,gb18030
set termencoding=utf-8
"set fileformats=unix