chore: updated options and keybinds
51cfc8e7
2 file(s) · +40 −1
| 4 | 4 | noremap <leader>h :noh<CR> |
|
| 5 | 5 | noremap <S-l> :bnext<CR> |
|
| 6 | 6 | noremap <S-h> :bprevious<CR> |
|
| 7 | - | noremap <leader>c :bd<CR> |
|
| 7 | + | noremap <leader>t :tabnext<CR> |
|
| 8 | + | noremap <leader>c :Bclose<cr>:tabclose<cr>gT |
|
| 8 | 9 | noremap <C-d> <C-d>zz |
|
| 9 | 10 | noremap <C-u> <C-u>zz |
|
| 11 | + | ||
| 12 | + | noremap <leader>q :e ~/buffer.md<CR> |
|
| 13 | + | ||
| 14 | + | noremap <C-j> <C-W>j |
|
| 15 | + | noremap <C-k> <C-W>k |
|
| 16 | + | noremap <C-h> <C-W>h |
|
| 17 | + | noremap <C-l> <C-W>l |
|
| 10 | 18 | ||
| 11 | 19 | " Spelling suggestions (requires fzf) |
|
| 12 | 20 | function! s:SpellReplace(word, choice) abort |
|
| 27 | 35 | endfunction |
|
| 28 | 36 | ||
| 29 | 37 | nnoremap <silent> <leader>s :call <SID>SpellSuggest()<CR> |
|
| 38 | + | ||
| 39 | + | command! Bclose call <SID>BufcloseCloseIt() |
|
| 40 | + | function! <SID>BufcloseCloseIt() |
|
| 41 | + | let l:currentBufNum = bufnr("%") |
|
| 42 | + | let l:alternateBufNum = bufnr("#") |
|
| 43 | + | ||
| 44 | + | if buflisted(l:alternateBufNum) |
|
| 45 | + | buffer # |
|
| 46 | + | else |
|
| 47 | + | bnext |
|
| 48 | + | endif |
|
| 49 | + | ||
| 50 | + | if bufnr("%") == l:currentBufNum |
|
| 51 | + | new |
|
| 52 | + | endif |
|
| 53 | + | ||
| 54 | + | if buflisted(l:currentBufNum) |
|
| 55 | + | execute("bdelete! ".l:currentBufNum) |
|
| 56 | + | endif |
|
| 57 | + | endfunction |
|
| 8 | 8 | set smartindent |
|
| 9 | 9 | set showmatch |
|
| 10 | 10 | set backspace=indent,eol,start |
|
| 11 | + | set autoread |
|
| 12 | + | set lazyredraw |
|
| 11 | 13 | syntax on |
|
| 12 | 14 | set termguicolors |
|
| 13 | 15 | set cursorline |
|
| 28 | 30 | else |
|
| 29 | 31 | set clipboard=unnamed |
|
| 30 | 32 | endif |
|
| 33 | + | ||
| 34 | + | set noerrorbells |
|
| 35 | + | set novisualbell |
|
| 36 | + | set t_vb= |
|
| 37 | + | set tm=500 |
|
| 38 | + | ||
| 39 | + | set nobackup |
|
| 40 | + | set nowb |
|
| 41 | + | set noswapfile |
|