On Tue, Nov 02, 2010 at 08:39:37AM +0100, Philipp Marek wrote: > I already asked about this on the mailing list [1]; but as I got no > answer, and a newer vim-runtime had the same problem, I'm reporting this > now as a bug.
Reporting a bug is better anyway since it's easier to keep track of. > Many of the vim-scripts have "set iskeyword+=" in them; only a few use > "set iskeyword=". > > Following "Let over Lambda" (and others) I'm frequently using "%" in > internal function names; my vim settings put that character (and several > others, like "!" and "?") in iskeyword. > > Now I have my "iskeyword" parameter set in ~/.vim/after/ftplugin/lisp.vim; > that works fine for first loading. This should be in ~/.vim/after/syntax/lisp.vim. > But for a simple ":e!" (and others, > like reloading the Slimv-buffer) this gets reverted by syntax/lisp.vim. > > > So I'd like to ask for > * to move the "iskeyword" definitions from the syntax/ to the ftplugin/ > files (where they belong, IMO) Well, that's not where they belong. Which characters are valid for keywords in a filetype are part of its syntax both in the general sense and in the case of Vim's syntax files. The value of 'iskeyword' affects the behavior of "syn keyword" and the \k regex metacharacter which is commonly used in syntax files. This is why syntax files are where the value is changed for a filetype. The few ftplugins that are changing 'iskeyword' (3 vs. the 42 syntax files which do so) are what I would consider buggy. > * and to change the "=" to "+=", at least where it makes sense. > (Some languages are fairly restricted in their naming - like C; but > for many others this is a nuisance). I'd wager that the syntax files set it to a base set that the author thought was representative of typical files written in that filetype, in situations where there isn't a strict, minimal set of valid keyword characters. If you commonly require extra characters in that filetype, that's exactly when you can use += in ~/.vim/after/syntax/….vim. Whether the system runtime file uses = or += has no bearing on your after/syntax file. As such, I don't see a need to trawl through all the scripts that change 'iskeyword'. -- James GPG Key: 1024D/61326D40 2003-09-02 James Vega <[email protected]>
signature.asc
Description: Digital signature

