|
|
@ -45,7 +45,6 @@ let g:rainbow_active = 1 " This is part of the Rainbow brackets, enabling it |
|
|
|
" Mappings {{{ |
|
|
|
" Mappings {{{ |
|
|
|
nnoremap - :Ex<CR> |
|
|
|
nnoremap - :Ex<CR> |
|
|
|
nnoremap <silent> <leader>c :call TrimWhiteSpace()<CR> |
|
|
|
nnoremap <silent> <leader>c :call TrimWhiteSpace()<CR> |
|
|
|
" nnoremap <leader>] <c-w>g<c-]> |
|
|
|
|
|
|
|
" }}} |
|
|
|
" }}} |
|
|
|
|
|
|
|
|
|
|
|
" Plugin configuration {{{ |
|
|
|
" Plugin configuration {{{ |
|
|
@ -97,10 +96,6 @@ au FileType python setlocal textwidth=79 " max line size |
|
|
|
au FileType python setlocal colorcolumn=80 " put a margin indicator |
|
|
|
au FileType python setlocal colorcolumn=80 " put a margin indicator |
|
|
|
au FileType python au BufWritePre <buffer> %s/\s\+$//e " When saving a Python file, remove tailing spaces |
|
|
|
au FileType python au BufWritePre <buffer> %s/\s\+$//e " When saving a Python file, remove tailing spaces |
|
|
|
au FileType python nmap <silent> <Leader>a :call JumpToAlternate()<CR> |
|
|
|
au FileType python nmap <silent> <Leader>a :call JumpToAlternate()<CR> |
|
|
|
|
|
|
|
|
|
|
|
" Shortcut to add pylint disables |
|
|
|
|
|
|
|
au FileType python iab lint # pylint: disable |
|
|
|
|
|
|
|
au FileType python iab defmain def main():<CR>""""""<CR><CR><BS>if __name__ == '__main__':<CR>main() |
|
|
|
|
|
|
|
" }}} |
|
|
|
" }}} |
|
|
|
|
|
|
|
|
|
|
|
" CSV files {{{ |
|
|
|
" CSV files {{{ |
|
|
@ -108,7 +103,6 @@ au FileType csv setlocal list " Display special characters, like tabs (fo |
|
|
|
" }}} |
|
|
|
" }}} |
|
|
|
|
|
|
|
|
|
|
|
" Rust {{{ |
|
|
|
" Rust {{{ |
|
|
|
|
|
|
|
|
|
|
|
let g:rustfmt_autosave = 1 " Apply `rustfmt` when saving the file. |
|
|
|
let g:rustfmt_autosave = 1 " Apply `rustfmt` when saving the file. |
|
|
|
|
|
|
|
|
|
|
|
au FileType rust setlocal number " show line numbers |
|
|
|
au FileType rust setlocal number " show line numbers |
|
|
@ -121,18 +115,6 @@ au FileType rust setlocal colorcolumn=80 " put a margin indicator |
|
|
|
" }}} |
|
|
|
" }}} |
|
|
|
|
|
|
|
|
|
|
|
" Markdown {{{ |
|
|
|
" Markdown {{{ |
|
|
|
au FileType markdown setlocal iskeyword+=: " this is kinda of a "hack" to make abbr accept ":" in them |
|
|
|
|
|
|
|
" This is a long abbreviation, but: |
|
|
|
|
|
|
|
" Most of it is simply text, with linebreaks (<CR>). |
|
|
|
|
|
|
|
" There is one thing to take care, though: <CR> is NOT <C-R>. |
|
|
|
|
|
|
|
" <C-R> will call the function (strftime), which will insert the current |
|
|
|
|
|
|
|
" date. |
|
|
|
|
|
|
|
au FileType markdown iab <silent> :header +++<CR>title = ""<CR>date = <C-R>=strftime('%Y-%m-%d')<CR><CR><CR>[taxonomies]<CR>tags = [""]<CR>+++<C-O>5k<C-O>6l |
|
|
|
|
|
|
|
" This abbreviation adds a modeline to set VIM to change the spell |
|
|
|
|
|
|
|
" lang to portuguese. |
|
|
|
|
|
|
|
au FileType markdown iab :pt <!--<CR>vim:spelllang=pt:<CR>--> |
|
|
|
|
|
|
|
au FileType markdown iab :date <C-R>=strftime('%Y-%m-%d') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
au FileType markdown setlocal spell " enable spell checking |
|
|
|
au FileType markdown setlocal spell " enable spell checking |
|
|
|
au FileType markdown setlocal textwidth=79 " max line size |
|
|
|
au FileType markdown setlocal textwidth=79 " max line size |
|
|
|
au FileType markdown setlocal expandtab " use spaces instead of tabs |
|
|
|
au FileType markdown setlocal expandtab " use spaces instead of tabs |
|
|
|