dumb.vim
1 " Open files in horizontal split 2 nnoremap <silent> <Leader>S :call fzf#run({ 3 \ 'down': '40%', 4 \ 'sink': 'botright split' })<CR> 5 6 " Open files in vertical horizontal split 7 nnoremap <silent> <Leader>v :call fzf#run({ 8 \ 'right': winwidth('.') / 2, 9 \ 'sink': 'vertical botright split' })<CR> 10 11 command! -bang -nargs=? -complete=dir Files 12 \ call fzf#vim#files(<q-args>, {'options': ['--no-color']}, <bang>0) 13 nmap <C-p> :Files<cr> 14 15 16 au User lsp_setup call lsp#register_server({ 17 \ 'name': 'rust-analyzer', 18 \ 'cmd': ["rust-analyzer"], 19 \ 'allowlist': ['rust'], 20 \ }) 21 22 " GitGutter 23 let g:gitgutter_realtime = 1 24 25 nmap <silent> ,/ :let @/=""<CR> 26 27 let g:go_fmt_command = "goimports" 28 29 au BufNewFile,BufRead *.md set noai noshowmatch tw=79 30 au BufNewFile,BufRead *.md setlocal spell spelllang=en_us tw=79 31 32 " text & mutt files 33 au BufNewFile,BufRead /tmp/*mutt*,/tmp/cvs*,*.txt set noai noshowmatch tw=79 34 au BufNewFile,BufRead /tmp/*mutt*,/tmp/cvs*,*.txt setlocal spell spelllang=en_us tw=79 35 36 au BufNewFile,BufRead /private/var/*/*mutt* set noai noshowmatch tw=79 37 au BufNewFile,BufRead /private/var/*/*mutt* setlocal spell spelllang=en_us tw=79 38 39 " git commits 40 au BufNewFile,BufRead *.git/COMMIT_EDITMSG set noai noshowmatch tw=79 41 au BufNewFile,BufRead *.git/COMMIT_EDITMSG setlocal spell spelllang=en_us tw=79 42 43 "autocmd BufWritePre * %s/\s\+$//e 44 nmap <Leader>s :%s/\s\+$//e 45 46 autocmd FileType go nmap <leader>b <Plug>(go-build) 47 autocmd FileType go nmap <leader>r <Plug>(go-run) 48 49 " Restore cursor position 50 autocmd BufReadPost * 51 \ if line("'\"") > 1 && line("'\"") <= line("$") | 52 \ exe "normal! g`\"" | 53 \ endif 54