Skip to content

Commit cfe6006

Browse files
committed
Remove iskeyword< from b:undo_ftplugin and add path<
Possibly addresses guns/vim-clojure-static#5 We moved the iskeyword definition to the syntax file, since it is pertinent to syntax matching, but did not remove it from b:undo_ftplugin. I wasn't able to reproduce the above problem, but this certainly seems like the culprit. We also reset path< if it was set.
1 parent 56b0278 commit cfe6006

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

ftplugin/clojure.vim

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ let b:did_ftplugin = 1
1616
let s:cpo_save = &cpo
1717
set cpo&vim
1818

19-
let b:undo_ftplugin = "setlocal fo< com< cms< cpt< isk< def<"
19+
let b:undo_ftplugin = 'setlocal define< formatoptions< comments< commentstring<'
2020

2121
" There will be false positives, but this is arguably better than missing the
2222
" whole set of user-defined def* definitions.
@@ -25,10 +25,10 @@ setlocal define=\\v[(/]def(ault)@!\\S*
2525
" Set 'formatoptions' to break comment lines but not other lines,
2626
" and insert the comment leader when hitting <CR> or using "o".
2727
setlocal formatoptions-=t formatoptions+=croql
28-
setlocal commentstring=;%s
2928

3029
" Set 'comments' to format dashed lists in comments.
3130
setlocal comments=sO:;\ -,mO:;\ \ ,n:;
31+
setlocal commentstring=;%s
3232

3333
" Take all directories of the CLOJURE_SOURCE_DIRS environment variable
3434
" and add them to the path option.
@@ -44,6 +44,9 @@ for s:dir in split($CLOJURE_SOURCE_DIRS, s:delim)
4444
let s:path = substitute(s:path, '\ ', '\\ ', 'g')
4545
execute "setlocal path+=" . s:path
4646
endfor
47+
if exists('$CLOJURE_SOURCE_DIRS')
48+
let b:undo_ftplugin .= '| setlocal path<'
49+
endif
4750

4851
" When the matchit plugin is loaded, this makes the % command skip parens and
4952
" braces in comments.

0 commit comments

Comments
 (0)