You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As quotes are not supported for VIM (#234) I use the following workaround:
" modified from https://github.com/airblade/vim-matchquote
let s:quotes = ['"', '''', '`']
function! s:matchquote()
normal! m'
" character_at_cursor
let c = matchstr(getline('.'), '\%'.col('.').'c.')
if index(s:quotes, c) >= 0
let num = len(split(getline('.'), c, 1)) - 1
if num % 2 == 1
return
endif
" is quotation mark under cursor odd or even?
let col = getpos('.')[2]
let num = len(split(getline('.')[0:col-1], c, 1)) - 1
let mvmt = num % 2 == 0 ? 'F' : 'f'
execute 'normal!' mvmt.c
else
" fallback
execute "normal \<plug>(matchup-%)"
endif
endfunction
nnoremap <silent> <Plug>(MatchMetaN) :call <SID>matchquote()<CR>
And then map this for normal mode:
nmap % <Plug>(MatchMetaN)
Just in case you want to include this in some form.
The text was updated successfully, but these errors were encountered:
As quotes are not supported for VIM (#234) I use the following workaround:
And then map this for normal mode:
Just in case you want to include this in some form.
The text was updated successfully, but these errors were encountered: