-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
154 lines (124 loc) · 3.83 KB
/
vimrc
File metadata and controls
154 lines (124 loc) · 3.83 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
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
"
" Santi vimrc config file
"
" Sourced Files {
set nocompatible " no compatible with vi
runtime functions.vim
runtime ftplugin/man.vim
packadd! matchit
" }
" Feel & Look {
syntax enable " enable syntax processing
filetype indent on " load filetype-specific indent files
colorscheme zenburn
set number " show line numbers
set belloff=all " turn off bell
set statusline=%n\ %f\ %y%h%r%=col:\ %c\ line:\ %l/%L\ (%P)
set laststatus=2 " always show statusline
set scrolloff=5 " show a few lines of context around the cursor
set formatoptions=cqlrn2
set linebreak " don't break in middle of word
set showcmd " show commands while writing
set showbreak=...\ \
" }
" UI {
set shiftwidth=0 " < indents the same that of tabs
set tabstop=4 " number of visual spaces per TAB
set softtabstop=4 " number of spaces in tab when editing
set expandtab " tabs are spaces
set modelines=1 " look for modelines in last line
set hidden " allow unsaved hidden buffers
set updatetime=100
set timeout
set ttimeout
set timeoutlen=1000 " timeout for mappings
set mouse=a " Always allow mouse usage
set autowrite
set undofile
silent !mkdir -p /tmp/vim/undodir > /dev/null 2>&1
set undodir=/tmp/vim/undodir
set cryptmethod=blowfish2
set viminfo='10,<1000,s100,h
set history=1000
set autoread
" }
" Search {
set incsearch " search as characters are entered
set hlsearch " highlight matches
set ignorecase " ignore case
set smartcase " smart case
" Don't offer to open certain files/directories
set wildignore+=*.bmp,*.gif,*.ico,*.jpg,*.png
set wildignore+=*.pdf,*.psd
set wildignore+=*/node_modules/*,*/android/*,*/ios/*
" }
" Completion {
set completeopt=menu,preview,longest
set complete=.,w,b,t
set wildmenu " command-line completion
set wildmode=longest,full
set spelllang=en,es
set path=~/.vim/templates,.,,
set pumheight=10
" }
" Mappings {
nnoremap <C-h> :bprev<CR>
nnoremap <C-l> :bnext<CR>
nnoremap gb :ls<CR>:b
nnoremap <Space> za
nnoremap Ñ :b#<CR>
nnoremap ñ ;
nnoremap Q gq
nnoremap j gj
nnoremap k gk
nnoremap <leader>t :!ctags .
inoremap <Tab> <C-R>=CleverTab()<CR>
inoremap <C-Space> <C-N>
inoremap </ </<C-X><C-O>
" }
" Plugins {
" Manage Plugins with infect
"=plugin tpope/vim-surround
"=plugin csexton/trailertrash.vim
"=plugin tpope/vim-commentary
"=plugin jiangmiao/auto-pairs
"=plugin airblade/vim-gitgutter
"=plugin godlygeek/tabular
"=plugin w0rp/ale
"=plugin pangloss/vim-javascript
"=plugin mxw/vim-jsx
"=plugin Valloric/YouCompleteMe load: opt
filetype plugin on
nnoremap <leader>yf :YcmCompleter FixIt <CR>
nnoremap <leader>yg :YcmCompleter GoTo<CR>
nnoremap <leader>yd :YcmCompleter GetDoc<CR>
nnoremap <leader>yy :packadd YouCompleteMe<CR>
nnoremap <leader>af :ALEFix <CR>
let g:ycm_global_ycm_extra_conf = '~/.vim/.ycm_extra_conf.py'
hi YcmWarningSign ctermbg=235
hi YcmWarningSection ctermfg=none
let g:ycm_confirm_extra_conf = 0
let g:ycm_autoclose_preview_window_after_insertion = 1
nnoremap <leader>af :ALEFix<CR>
let g:AutoPairsMultilineClose = 0
let g:ale_linters_explicit = 1
let g:ale_sign_error = '>'
let g:ale_sign_warning = '-'
let g:ale_sign_info = "\'"
" }
" Fold {
set foldmethod=marker
set foldmarker={,}
set foldlevel=20
" }
" Filetype Specific {
autocmd FileType vim setlocal formatoptions=cql
let g:asmsyntax = "nasm"
"}
" Templates{
augroup templates
autocmd BufNewFile *.cpp 0r ~/.vim/templates/skeleton.cpp
autocmd BufNewFile *.sh 0r ~/.vim/templates/skeleton.sh
augroup END
"}
" vim:foldlevel=0