nvim/plugin/codelines.vim
2021-08-11 12:25:50 +02:00

8 lines
324 B
VimL

function! codelines#close()
let n_line = search('//>', 'bnW')
return trim(substitute(getline(n_line), '>', '<', ''))
endfunction
inoremap <silent> <Plug>(codelines-close) <c-r>=codelines#close()<cr>
noremap <silent> <Plug>(codelines-go-to-def) <cmd>exec "vimgrep #//>" . strpart(expand('<cword>'), 3) . "# code/*"<cr>