File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -257,12 +257,22 @@ function! OnLoadCoc() abort
257257 nmap <silent> gy <Plug> (coc-type-definition)
258258 nmap <silent> gi <Plug> (coc-implementation)
259259 nmap <silent> gr <Plug> (coc-references)
260- " Additional mappings for convenience
260+
261+ " Additional vim-style mappings
261262 nmap <silent> <C-t> <Plug> (coc-definition)
262263 nmap <silent> <leader> g <Plug> (coc-definition)
263264 nmap <silent> <leader> G <Plug> (coc-type-definition)
264- nmap <F12> <Plug> (coc-definition)
265- nmap <C-F12> <Plug> (coc-type-definition)
265+
266+ " VS Code / Visual Studio compatible mappings
267+ nmap <silent> <F12> <Plug> (coc-definition)
268+ nmap <silent> <C-F12> <Plug> (coc-implementation)
269+ nmap <silent> <S-F12> <Plug> (coc-references)
270+ " Note: Alt+F12 would be peek definition, but Vim doesn't have peek mode
271+ " Note: Ctrl+Shift+F12 for type definition conflicts with terminal behavior
272+
273+ " Navigation history (VS Code compatible)
274+ " Note: Alt+Left/Right often conflicts with terminal, using Ctrl+O/I instead
275+ " Vim already has Ctrl+O (back) and Ctrl+I (forward) for jump list
266276
267277 " Highlight references on CursorHold
268278 autocmd CursorHold * silent ! call CocActionAsync (' highlight' )
You can’t perform that action at this time.
0 commit comments