dblume commited on 2024-03-25 13:53:12
Showing 2 changed files, with 5 additions and 8 deletions.
Swap <c-]> with g<c-]>, so the easier command shows a list when there are multiple tags. Also stop defaulting to "very magic" searches.
| ... | ... |
@@ -13,10 +13,6 @@ set noshowcmd " Show size of selected area in visual mode on last line |
| 13 | 13 |
set noruler " Show coordinates on status line |
| 14 | 14 |
set hidden " Don't abandon Scratch buffer when hidden. |
| 15 | 15 |
|
| 16 |
-" The following two lines set the use of perl regex, aka "very magic" |
|
| 17 |
-nnoremap / /\v |
|
| 18 |
-vnoremap / /\v |
|
| 19 |
- |
|
| 20 | 16 |
" Make j and k move to the next row, not file line |
| 21 | 17 |
nnoremap j gj |
| 22 | 18 |
nnoremap k gk |
| ... | ... |
@@ -67,6 +63,11 @@ au InsertLeave * hi statusline term=bold,reverse cterm=bold,reverse ctermfg=23 c |
| 67 | 63 |
" May want to "set mouse=" See https://neovim.io/doc/user/vim_diff.html#_default-mouse |
| 68 | 64 |
" set mouse=v " visual mode, not great in PuTTY, neovim defaults to nvi |
| 69 | 65 |
|
| 66 |
+" Make c-] show a list of tags, or jump straight if only single tag |
|
| 67 |
+nnoremap <c-]> g<c-]> |
|
| 68 |
+vnoremap <c-]> g<c-]> |
|
| 69 |
+nnoremap g<c-]> <c-]> |
|
| 70 |
+vnoremap g<c-]> <c-]> |
|
| 70 | 71 |
" Consider neovim default "./tags;,tags" |
| 71 | 72 |
set tags=tags;/ |
| 72 | 73 |
|
| ... | ... |
@@ -24,10 +24,6 @@ if v:version >= 703 |
| 24 | 24 |
set undofile " undo even after closing and reopening a file |
| 25 | 25 |
endif |
| 26 | 26 |
|
| 27 |
-" The following two lines set the use of perl regex, aka "very magic" |
|
| 28 |
-nnoremap / /\v |
|
| 29 |
-vnoremap / /\v |
|
| 30 |
- |
|
| 31 | 27 |
" Make j and k move to the next row, not file line |
| 32 | 28 |
nnoremap j gj |
| 33 | 29 |
nnoremap k gk |
| 34 | 30 |