-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
213 lines (168 loc) · 5.86 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
set encoding=utf8
" Deixa acessar o clipboard do sistema
set clipboard=unnamed
" inicia o modo spell check
" set spell
set spelllang=pt_br
" Iniciar o sistema de plugin
call plug#begin('~/.toaster/plugins')
Plug 'Shougo/unite.vim'
Plug 'scrooloose/nerdtree'
Plug 'mhinz/vim-startify'
Plug 'vim-airline/vim-airline'
Plug 'junegunn/goyo.vim'
"Plug 'ludovicchabant/vim-gutentags'
"Plug 'majutsushi/tagbar'
Plug 'tpope/vim-sensible'
Plug 'tpope/vim-sleuth'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-speeddating'
Plug 'ajh17/VimCompletesMe'
Plug 'kien/ctrlp.vim'
Plug 'dbmrq/vim-ditto'
Plug 'yangmillstheory/vim-snipe'
Plug 'mileszs/ack.vim'
Plug 'gregsexton/MatchTag'
Plug 'haya14busa/incsearch.vim'
Plug 'mattn/emmet-vim'
Plug 'sqwishy/vim-sqf-syntax'
Plug 'dracula/vim'
" Plug 'chrisbra/csv.vim'
" Específicos para escrever
Plug 'reedes/vim-pencil'
Plug 'tpope/vim-markdown'
Plug 'jtratner/vim-flavored-markdown'
Plug 'rhysd/vim-grammarous'
call plug#end()
"""""""""""""""""""""""""""""""""""""
" Configurações
""""""""""""""""""""""""""""""""""""""
set nowrap
" Fix para backspace não funcionando no OSX
set backspace=indent,eol,start
" Mostra números nas linhas
set number
set numberwidth=5
set relativenumber
" Tabs do jeito correto
set tabstop=4
set shiftwidth=4
set smarttab
set expandtab
" Modo ELITE (Sem setinhas pra forçar no HJKL)
let g:elite_mode=1
" Deixa a linha com highlight
set cursorline
highlight LineNr term=bold cterm=NONE ctermfg=DarkGrey ctermbg=NONE gui=NONE guifg=DarkGrey guibg=NONE
hi CursorLine cterm=NONE ctermbg=darkgrey
" Desativa status line
set noshowmode
" Splits sempre pra baixo e pra direita
set splitbelow
set splitright
" Csutomização de temas
syntax on
set t_Co=256
let base16colorspace=256
color dracula
set background=dark
" Usa configurações de Devicons no Nerdtree
let g:webdevicons_conceal_nerdtree_brackets = 1
let g:WebDevIconsNerdTreeAfterGlyphPadding = ''
" Some com os scrolls na versao com gui
set guioptions=
" Tira avisos (Bell)
set t_vb=
set novisualbell
" Determina a fonte correta para o gvim ou macvim
" Use set guifont=* para escolher e set guifont? para saber qual o nome
" correto
" Em seguida use put =&guifont para adicionar a fonte no buffer
set guifont=Source\ Code\ Pro\ for\ Powerline:h15
" Usar o Ack com o AG
let g:ackprg = 'ag --vimgrep'
" Configurra o Startify
let g:startify_custom_header = [
\'',
\'',
\' ###### ',
\' ######### ',
\' ########### #### ## ## ### ##### ##### #### ### # # # ##### ',
\' ### ## ##### ### ### ### ##### ###### ##### ## # # # # ## ## ',
\' ### j ## ### ### #### ## ## ## ## ## # # # ## # ',
\' ### jjj ### ##### ######## ##### ## ## #### ## # # # ## ## ',
\' ### jjjj ### ### ## ## ######## ##### ###### ####### # # # ###### ',
\' ### jjjjjj ### ## ##### ######## ## ## ## #### # # # ## # ',
\' ### jjj ############# ## ### ##### ## ### ###### # # ## ## ## # ',
\' ## j jjjj ##### ## ## ## ### ##### ## ## ##### ##### ##### #### ###### ',
\' jjjjjjjjj ',
\' jjjjjjj ',
\]
let g:startify_files_number = 6
let g:startify_list_order = [
\ [' Used files in this dir:'],
\ 'dir',
\ [' Used files overall:'],
\ 'files',
\ [' Sessions:'],
\ 'sessions',
\ [' Bookmarks:'],
\ 'bookmarks',
\ ]
let g:startify_skiplist = [
\ 'COMMIT_EDITMSG',
\ escape(fnamemodify(resolve($VIMRUNTIME), ':p'), '\') .'doc',
\ 'bundle/.*/doc',
\ ]
" Configura o Airline
let g:airline#extensions#tabline#enabled = 1
let g:airline_powerline_fonts = 1
" Extensões especificas para o controlP
let g:ctrlp_extensions = ['buffertag', 'tag', 'line', 'dir']
" Desabilita setas e usa para mudar size de split
let g:elite_mode=1
" Suporte a Markdown
augroup markdown
au!
au BufNewFile,BufRead *.md,*.markdown setlocal filetype=ghmarkdown
augroup END
" Settings especificas para escrita
let g:pencil#wrapModeDefault = 'soft' " padrao é 'hard'
" Configuração do Vim-pencil
augroup pencil
autocmd!
autocmd FileType markdown,mkd call pencil#init()
autocmd FileType text call pencil#init()
augroup END
" Se o modo Elite estiver ligado desabilita as setinhas
if get(g:, 'elite_mode')
nnoremap <Up> :resize +2<CR>
nnoremap <Down> :resize -2<CR>
nnoremap <Left> :vertical resize +2<CR>
nnoremap <Right> :vertical resize -2<CR>
endif
"""""""""""""""""""""""""""""""""""""
" Mappings
""""""""""""""""""""""""""""""""""""""
" Mais facil navegar nos splits de janelas
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
" Mais fácil para navegarentre os buffers
nnoremap <silent> <S-LEFT> :bp<CR>
nnoremap <silent> <S-RIGHT> :bn<CR>
nnoremap <silent> <S-DOWN> :bd<CR>
" Abre o NerdTree
map <C-n> :NERDTreeToggle<CR>
" Executa o Corretor Ortográfico em Português
map <F3> :GrammarousCheck --lang=pt-BR<CR>
" Executa o mesmo corrtetor só que em Inglês
map <F4> :GrammarousCheck
" Mappings para o corretor ortográfico
nmap <F6> <Plug>(grammarous-open-info-window)
nmap <F7> <Plug>(grammarous-fixit)
nmap <F8> <Plug>(grammarous-move-to-next-error)
nmap <F5> <Plug>(grammarous-move-to-previous-error)