This commit is contained in:
Kartik Agaram 2019-04-11 11:30:07 -07:00
parent a8cea00a29
commit bff79aeb28
1 changed files with 2 additions and 13 deletions

View File

@ -24,8 +24,9 @@ function! HighlightTangledFile()
syntax match subxGlobal %\<[A-Z][a-z0-9_-]*\>% | highlight link subxGlobal SpecialChar
endfunction
augroup LocalVimrc
autocmd BufRead,BufNewFile *.mu set ft=mu
autocmd BufRead,BufNewFile *.cc call HighlightTangledFile()
autocmd BufRead,BufNewFile *.subx set ft=subx
autocmd BufRead,BufNewFile *.mu set ft=mu
augroup END
" Scenarios considered:
@ -65,18 +66,6 @@ function! GrepSubX(regex)
endfunction
command! -nargs=1 G call GrepSubX(<q-args>)
" temporary helpers while we port https://github.com/akkartik/crenshaw to apps/crenshaw*.subx
command! -nargs=1 C exec "E crenshaw".<f-args>
command! -nargs=1 CS exec "S crenshaw".<f-args>
command! -nargs=1 CH exec "H crenshaw".<f-args>
function! Orig()
let l:p = expand("%:t:r")
if l:p =~ "^crenshaw\\d*-\\d*$"
exec "vert split crenshaw/tutor" . substitute(expand("%:t:r"), "^crenshaw\\(\\d*\\)-\\(\\d*\\)$", "\\1.\\2", "") . ".pas"
endif
endfunction
command! O call Orig()
if exists("&splitvertical")
command! -nargs=0 P hor split opcodes
else