-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
71 lines (54 loc) · 1.46 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
" Encodage en UTF-8
set encoding=utf-8
set fileencoding=utf-8
" Enable syntax highlighting
syntax on
set smartindent
set tabstop=2
set shiftwidth=2
set expandtab
set smarttab
set autoindent
colorscheme desert
set ruler
set number
set showcmd
" Highlight the cursor line
set cursorline
" set the snipMate plugin on!
:filetype plugin on
" Correcteur orthographique
" :set spell
" :setlocal spell spelllang=fr
" Options pour la recherche
:set incsearch " Vim commence la recherche avant d'avoir finit de saisir le pattern
:set smartcase " Vim est non sensible à la casse tant que le pattern et en minuscule
" OmniCppComplete plugin
set completeopt=menu
let OmniCpp_SelectFirstItem = 2
" Generate tags
map <C-F12> :!ctags * --c-types=+p --c++-kinds=+p --fields=+iaS --extra=+q .<CR>
" Tab shortcuts
nnoremap <C-Left> :tabprevious<CR>
nnoremap <C-Right> :tabnext<CR>
nnoremap <Tab> :tabnext<CR>
nnoremap <S-Tab> :tabprevious<CR>
nnoremap <C-t> :tabe<CR>
" PageUp PageDown shorrcuts
nnoremap <C-Up> <C-b>
nnoremap <C-Down> <C-f>
" Navigate between splits
nmap <silent> <A-Up> :wincmd k<CR>
nmap <silent> <A-Down> :wincmd j<CR>
nmap <silent> <A-Left> :wincmd h<CR>
nmap <silent> <A-Right> :wincmd l<CR>
" Resize splits easily
nnoremap <A-S-left> :vertical resize -5<cr>
nnoremap <A-S-down> :resize +5<cr>
nnoremap <A-S-up> :resize -5<cr>
nnoremap <A-S-right> :vertical resize +5<cr>
" Vim tab completion for filenames
set wildmode=longest,list,full
set wildmenu
" set width
set tw=80