-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
67 lines (52 loc) · 1.43 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
"Basic settings {
set expandtab
set shiftwidth=4
set tabstop=4
set smartindent
filetype off
call pathogen#runtime_append_all_bundles()
call pathogen#helptags()
syntax on
set nocp "for omnicppcomplete
filetype on
filetype plugin indent on
colorscheme desert256
set showcmd
set number
"}
set hlsearch
set incsearch
nmap <silent> <leader>n :silent :nohlsearch<CR>
set ruler
set scrolloff=3
set matchtime=1
"set timeout timeoutlen=30 ttimeoutlen=10
set backupdir=~/.vim-tmp
set directory=~/.vim-tmp
"Some configuration for omnicpp complete
set completeopt=longest,menuone
let OmniCpp_GlobalScopeSearch = 0
let OmniCpp_ShowPrototypeInAbbr = 1
"inoremap <expr> <CR> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
"inoremap <expr> <C-n> pumvisible() ? '<C-n>' : '<C-n><C-r>=pumvisible() ? "\<lt>Down>" : ""<CR>'
"inoremap <expr> <M-,> pumvisible() ? '<C-n>' : '<C-x><C-o><C-n><C-p><C-r>=pumvisible() ? "\<lt>Down>" : ""<CR>'
set wildmenu
"Global tag system (gtags)
map <C-F12> :!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .<CR>
map <C-\>^] :GtagsCursor<CR>
"let NERDTreeMapActivateNode='z'
map <F12> :NERDTreeToggle<CR>
map <C-S-f> :NERDTreeFind<CR>
map <F10> <leader>rr
map <F4> :w<CR>:A<CR>
map <F2> :w<CR>
map <F3> :w<CR>:make<CR>
let g:session_directory='~/.vim-sessions'
let g:session_default_to_last=1
let g:session_persist_globals = ['&makeprg']
if bufwinnr(1)
map + <C-W>+
map - <C-W>-
endif
"do not beep
"set visualbell