Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 575432 - The vim shell syntax highlighting file appends "." to iskeywords
Summary: The vim shell syntax highlighting file appends "." to iskeywords
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal minor
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-23 07:42 UTC by James Bowlin
Modified: 2016-02-23 13:54 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Bowlin 2016-02-23 07:42:47 UTC
The file is /usr/share/vim/vim74/syntax/sh.vim which is part of the app-editors/vim-core package.

Complaints to upstream can be seen in this thread:
https://groups.google.com/forum/m/#!msg/vim_use/fSj11mZEJ3Q/Z0H7E9zIAQAJ

The last message in that thread is by Bram Moolenaar, the author of Vim, who says:

   Setting 'iskeyword' does not really belong in a syntax file.  It's best
   left alone, but if a language really has a different kind of keyword it
   should be set in the filetype plugin. 

Until upstream deals with this regression we can easily fix it here by creating a patch to remove (or comment out) the lines below from the syntax file.  I couldn't even compile ksh on my Gentoo system (requires the nmake program) which is the only shell I know of that could conceivably use "." as part of iskeyword but I doubt even a diehard ksh programmer would want it.

" AFAICT "." should be considered part of the iskeyword.  Using iskeywords in
" syntax is dicey, so the following code permits the user to
"  g:sh_isk set to a string	: specify iskeyword.
"  g:sh_noisk exists	: don't change iskeyword
"  g:sh_noisk does not exist	: (default) append "." to iskeyword
if exists("g:sh_isk") && type(g:sh_isk) == 1	" user specifying iskeyword
 exe "setl isk=".g:sh_isk
elseif !exists("g:sh_noisk")		" optionally prevent appending '.' to iskeyword
 setl isk+=.
endif
Comment 1 James Bowlin 2016-02-23 13:54:39 UTC
This bug was already fixed upstream in sh.vim version 143 which is in app-editors/vim-core-7.4.1229