fix: map parsing manages blank spaces better

This commit is contained in:
mcolonna 2024-10-17 16:04:45 +02:00
parent 3ab5f9cb1d
commit 39158f4890
6 changed files with 75 additions and 12 deletions

View file

@ -1,23 +1,27 @@
# Vim plugin to edit .cub files
" Vim plugin to edit .cub files
" Copy this file in ~/.vim/plugin/
function! CubSyntax()
if expand('%:e') == 'cub'
highlight cubParameter ctermfg=blue
syntax match cubParameter /^(NO|SO|WE|EA|F|C) .$/
highlight cubDefault ctermfg=white
highlight cubDefault ctermfg=white ctermbg=red
syntax match cubDefault /./
highlight cub0 ctermfg=grey
highlight cubEmpty ctermbg=darkblue
syntax match cubEmpty / /
highlight cub0 cterm=bold ctermfg=grey
syntax match cub0 /0/
highlight cub1 cterm=bold ctermfg=white
syntax match cub1 /1/
highlight cubP cterm=bold ctermfg=blue
highlight cubP cterm=bold ctermfg=yellow
syntax match cubP /[NSWE]/
highlight cubParameter cterm=NONE ctermfg=yellow ctermbg=black
syntax match cubParameter /\v^(NO|SO|WE|EA|C|F).*$/
endif
endfunction
autocmd BufReadPost * call CubSyntax()