-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.vimrc
More file actions
98 lines (79 loc) · 2.6 KB
/
.vimrc
File metadata and controls
98 lines (79 loc) · 2.6 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
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
if &shell =~# 'fish$'
set shell=bash
endif
set nocp
" Allow per-dir vimrc files
set exrc
set secure
" enable mouse FFS
set mouse=a
filetype plugin on
set omnifunc=syntaxcomplete#Complete
set completeopt-=preview
let mapleader="\<Space>"
inoremap jk <Esc>
execute pathogen#infect()
syntax on
set background=dark
colorscheme solarized
highlight clear SignColumn
:autocmd InsertEnter,InsertLeave * set cul!
let g:airline_powerline_fonts = 1
let g:netrw_silent = 1
set cindent
set tabstop=4
set shiftwidth=4
set expandtab
set diffopt=vertical
let g:syntastic_check_on_open=1
let g:syntastic_enable_signs=1
let g:syntastic_c_check_header=1
let g:syntastic_java_javac_config_file_enabled=1
set tw=79
set colorcolumn=+1
" Artistic Style
let g:formatprg_args_expr_cpp = '"--mode=c --style=kr -pcjHFUS --max-code-length=79 -".(&expandtab ? "s".&shiftwidth : "t")'
let g:formatprg_args_expr_java = '"--style=kr -pcjHFUS --max-code-length=79 -".(&expandtab ? "s".&shiftwidth : "t")'
noremap <F3> :Autoformat<CR><CR>
" Enable the list of buffers
let g:airline#extensions#tabline#enabled = 1
" Show just the filename
let g:airline#extensions#tabline#fnamemod = ':t'
" Move to the next buffer
nmap <leader>l :bnext<CR>
" Move to the previous buffer
nmap <leader>h :bprevious<CR>
" Save file
nnoremap <Leader><Leader>w :w<CR>
map <Leader> <Plug>(easymotion-prefix)
map <C-F12> :!ctags -R --c++-kinds=+p --fields=+iaSl --extra=+q .<CR>
" voodoo to switch between header and source files
map <F4> :e %:p:s,.h$,.X123X,:s,.cpp$,.h,:s,.X123X$,.cpp,<CR>
" MARTe build
map <F5> :Make -f Makefile.linux -s all<CR>
map <F6> :Make -f Makefile.linux -s clean all<CR>
let g:ycm_collect_identifiers_from_tags_files = 1
let g:ycm_confirm_extra_conf = 0
let g:UltiSnipsExpandTrigger="<c-z>"
let g:pathogen_disabled = []
if v:version < '703'
call add(g:pathogen_disabled, 'easymotion')
else
" EasyMotion search
map / <Plug>(easymotion-sn)
omap / <Plug>(easymotion-tn)
" These `n` & `N` mappings are options. You do not have to map `n` & `N` to
" EasyMotion.
" Without these mappings, `n` & `N` works fine. (These mappings just provide
" different highlight method and have some other features )
map n <Plug>(easymotion-next)
map N <Plug>(easymotion-prev)
endif
" open quickfix after grep
autocmd QuickFixCmdPost *grep* cwindow
" git grep word under cursor
nnoremap gr :silent Ggrep <cword> <bar> redraw! <CR>
" recognise .md as markdown
autocmd BufNewFile,BufReadPost *.md setlocal filetype=markdown.pandoc tw=79 fo+=t spell complete+=kspell nocindent
" c++ comments - use //
autocmd FileType cpp set commentstring=//\ %s