Skip to content

Commit 302170c

Browse files
committed
Have XS options be configurable, and default to off
Most people don't want standard C library functions to be highlighted as errors; those who do can turn it on
1 parent 0ac9fe2 commit 302170c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

vimxs.pl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -285,16 +285,17 @@ sub output {
285285
runtime! syntax/c.vim
286286
endif
287287
288-
let xs_superseded = 1 " mark C functions superseded by Perl replacements
289-
let xs_not_core = 1 " mark private core functions
288+
" Configuration:
289+
" let xs_superseded = 0 " mark C functions superseded by Perl replacements (ex. memcpy vs Copy)
290+
" let xs_not_core = 0 " mark private core functions
290291
291292
_VIM_
292293
293-
print $vim "if exists(\"xs_superseded\") && xs_superseded\n";
294+
print $vim "if get(g:, 'xs_superseded', 0)\n";
294295
output \%superseded, 'Superseded' => $vim;
295296
print $vim "endif\n";
296297
297-
print $vim "if exists(\"xs_not_core\") && xs_not_core\n";
298+
print $vim "if get(g:, 'xs_not_core', 0)\n";
298299
output \%private, 'Private' => $vim;
299300
print $vim "endif\n";
300301

0 commit comments

Comments
 (0)