Skip to content

Commit c4a1c86

Browse files
Christian Clasoncarlobaldassi
Christian Clason
authored andcommitted
set and restore cpoptions in syntax file
This is common practice in syntax files and needed for, e.g., line continuation to work properly (see discussion in #222).
1 parent 6ff9e99 commit c4a1c86

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

syntax/julia.vim

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ elseif exists("b:current_syntax")
99
finish
1010
endif
1111

12+
let s:cpo_save = &cpo
13+
set cpo&vim
14+
1215
if version < 704
1316
" this is used to disable regex syntax like `\@3<='
1417
" on older vim versions
@@ -541,3 +544,6 @@ hi def link juliaError Error
541544
syntax sync fromstart
542545

543546
let b:current_syntax = "julia"
547+
548+
let &cpo = s:cpo_save
549+
unlet s:cpo_save

0 commit comments

Comments
 (0)