Skip to content

Commit

Permalink
Add initial support for Vim9 script (tyru#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
obcat committed Sep 2, 2021
1 parent 2c0cd18 commit 9a4aa3f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion after/ftplugin/vim/caw.vim
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
" vim:foldmethod=marker:fen:
scriptencoding utf-8

let b:caw_oneline_comment = '"'
function! s:is_vim9line(lnum) abort
return search('\C\m^\s*vim9s\%[cript]\>', 'bnWz') >= 1
endfunction
let b:caw_oneline_comment = { lnum -> s:is_vim9line(lnum) ? '#' : '"' }
function! s:linecont_sp(lnum) abort
return getline(a:lnum) =~# '^\s*\\' ? '' : ' '
endfunction
Expand Down

0 comments on commit 9a4aa3f

Please sign in to comment.