vim-ca65/ftplugin/ca65.vim

26 lines
972 B
VimL
Raw Normal View History

2023-12-09 23:24:28 +01:00
if !exists("*SplitHeader")
function! SplitHeader(header_ext, source_ext)
" check which filetype and then open header/source in vsplit
if (expand("%:e") == a:source_ext)
execute "vsplit %:r.".a:header_ext
elseif (expand("%:e") == a:header_ext)
execute "vsplit %:r.".a:source_ext
:exe "normal \<c-w>r"
endif
endfunction
endif
" navigation with % using matchit plugin
2023-12-14 01:41:14 +01:00
" pea pei per missing because they push two bytes
let b:match_words = '\<ph[abdpkxy]\>:\<pl[abdpxy]\>,'
2023-12-09 23:24:28 +01:00
\ . '\.\<if\>:\.\<elseif\>:\.\<else\>:\.\<endif\>,'
\ . '\.\<proc\>:\.\<endproc\>,'
\ . '\.\<mac(ro)?\>:\.\<endmac(ro)?\>,'
\ . '\.\<scope\>:\.\<endscope\>,'
\ . '\.\<enum\>:\.\<endenum\>,'
\ . '\.\<struct\>:\.\<endstruct\>,'
\ . '\.\<rep(eat)?\>:\.\<endrep(eat)?\>,'
\ . '\.\<union\>:\.\<endunion\>'
2023-12-27 13:58:56 +01:00
setlocal commentstring=;%s