diff options
| author | xs <xs@xs.local> | 2026-11-09 02:27:30 +0800 |
|---|---|---|
| committer | xs <xs@xs.local> | 2026-11-09 02:27:30 +0800 |
| commit | c647d422cd001c7845bcec05c06fdbd54b3efec4 (patch) | |
| tree | f25ff3882b960bf9b88ea2c1338cf5ab6a726419 /core/vimrc | |
| parent | be18563c9a1c1fcd80eef702883a8443d8bac42e (diff) | |
tmux: history-limit 10000; vimrc: gr references with ]r/[r, ]e/[e next/prev error, \l/\L list errors (file/project), drop gi and vim-matchup
Diffstat (limited to 'core/vimrc')
| -rw-r--r-- | core/vimrc | 10 |
1 files changed, 7 insertions, 3 deletions
| @@ -42,13 +42,18 @@ nnoremap <silent> <leader>rg :<C-U>Rg<CR>| " \rg: search tex | |||
| 42 | nnoremap <silent> <leader>b :<C-U>Buffers<CR>| " \b: list open buffers | 42 | nnoremap <silent> <leader>b :<C-U>Buffers<CR>| " \b: list open buffers |
| 43 | nnoremap <silent> <leader>n :<C-U>NERDTreeToggle<CR>| " \n: toggle file tree | 43 | nnoremap <silent> <leader>n :<C-U>NERDTreeToggle<CR>| " \n: toggle file tree |
| 44 | nnoremap <silent> gd :<C-U>call <SID>GotoDef()<CR>| " gd: go to definition (Ctrl-o back) | 44 | nnoremap <silent> gd :<C-U>call <SID>GotoDef()<CR>| " gd: go to definition (Ctrl-o back) |
| 45 | nnoremap <silent> gi :<C-U>LspImplementation<CR>| " gi: go to implementation | 45 | nnoremap <silent> gr :<C-U>LspReferences<CR>| " gr: list every place the symbol under the cursor is used (Enter jumps) |
| 46 | nnoremap <silent> ]r :<C-U>execute v:count1 . 'cnext'<CR>| " ]r: next use from the gr list (across files) | ||
| 47 | nnoremap <silent> [r :<C-U>execute v:count1 . 'cprevious'<CR>| " [r: previous use from the gr list | ||
| 48 | nnoremap <silent> ]e :<C-U>LspNextDiagnostic<CR>| " ]e: jump to the next error/warning in this file | ||
| 49 | nnoremap <silent> [e :<C-U>LspPreviousDiagnostic<CR>| " [e: jump to the previous error/warning in this file | ||
| 46 | nnoremap <silent> gy :<C-U>tab LspTypeDefinition<CR>| " gy: go to type definition in a new tab (e -> struct DirEntry) | 50 | nnoremap <silent> gy :<C-U>tab LspTypeDefinition<CR>| " gy: go to type definition in a new tab (e -> struct DirEntry) |
| 47 | nnoremap <silent> <leader>k :<C-U>call ToggleHover()<CR>| " \k: toggle hover docs | 51 | nnoremap <silent> <leader>k :<C-U>call ToggleHover()<CR>| " \k: toggle hover docs |
| 48 | nnoremap <silent> K :<C-U>call ToggleHover()<CR>| " K: toggle hover docs (same as \k) | 52 | nnoremap <silent> K :<C-U>call ToggleHover()<CR>| " K: toggle hover docs (same as \k) |
| 49 | nnoremap <silent> <leader>D :<C-U>LspDocumentation<CR>| " \D: show documentation | 53 | nnoremap <silent> <leader>D :<C-U>LspDocumentation<CR>| " \D: show documentation |
| 50 | nnoremap <silent> <leader>e :<C-U>call ToggleDiagnostic()<CR>| " \e: show error on this line | 54 | nnoremap <silent> <leader>e :<C-U>call ToggleDiagnostic()<CR>| " \e: show error on this line |
| 51 | nnoremap <silent> <leader>l :<C-U>lopen<CR>| " \l: list all errors | 55 | nnoremap <silent> <leader>l :<C-U>LspDocumentDiagnostics<CR>| " \l: list errors in this file |
| 56 | nnoremap <silent> <leader>L :<C-U>LspDocumentDiagnostics --buffers=*<CR>| " \L: list every error the servers know (Rust: whole crate; Python: open files) | ||
| 52 | nnoremap <silent> <leader>a :<C-U>LspCodeAction<CR>| " \a: code actions popup | 57 | nnoremap <silent> <leader>a :<C-U>LspCodeAction<CR>| " \a: code actions popup |
| 53 | nnoremap <silent> <leader>rn :<C-U>LspRename<CR>| " \rn: rename symbol | 58 | nnoremap <silent> <leader>rn :<C-U>LspRename<CR>| " \rn: rename symbol |
| 54 | nnoremap <silent> <leader>f :<C-U>LspDocumentFormat<CR>| " \f: format file | 59 | nnoremap <silent> <leader>f :<C-U>LspDocumentFormat<CR>| " \f: format file |
| @@ -179,7 +184,6 @@ Plug 'tpope/vim-surround' | |||
| 179 | Plug 'tpope/vim-fugitive' | 184 | Plug 'tpope/vim-fugitive' |
| 180 | Plug 'airblade/vim-gitgutter' | 185 | Plug 'airblade/vim-gitgutter' |
| 181 | Plug 'preservim/nerdtree' | 186 | Plug 'preservim/nerdtree' |
| 182 | Plug 'andymass/vim-matchup' | ||
| 183 | call plug#end() | 187 | call plug#end() |
| 184 | endif | 188 | endif |
| 185 | 189 | ||
