From c503a456be249f0bd80b63d290a1abfdbc2cebb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Ortega=20Froysa?= Date: Thu, 13 Nov 2025 08:10:14 +0100 Subject: [PATCH] Enable parameter/snippet jumping. --- init.vim | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/init.vim b/init.vim index 3f8a880..7e4df94 100644 --- a/init.vim +++ b/init.vim @@ -52,23 +52,28 @@ set foldmethod=syntax set scrolloff=7 " CoC settings +function! CheckBackspace() abort + let col = col('.') - 1 + return !col || getline('.')[col - 1] =~# '\s' +endfunction + inoremap \ coc#pum#visible() ? coc#pum#next(1) : + \ coc#expandableOrJumpable() ? "\=coc#snippet#next()\" : \ CheckBackspace() ? "\" : \ coc#refresh() -inoremap coc#pum#visible() ? coc#pum#prev(1) : "\" -"inoremap pumvisible() ? "\" : "\" -"inoremap pumvisible() ? "\" : "\" -nmap :CocAction +inoremap + \ coc#pum#visible() ? coc#pum#prev(1) : "\" + \ coc#expandableOrJumpable() ? "\=coc#snippet#prev()\" : + \ CheckBackspace() ? "\" : + \ coc#refresh() let g:coc_disable_startup_warning = 1 inoremap coc#pum#visible() ? coc#pum#confirm() \: "\u\\=coc#on_enter()\" -function! CheckBackspace() abort - let col = col('.') - 1 - return !col || getline('.')[col - 1] =~# '\s' -endfunction +let g:coc_snippet_next = '' +let g:coc_snippet_prev = '' func! s:my_colors_setup() abort " this is an example