murisfurder / vim

Automatically exported from code.google.com/p/vim
0 stars 0 forks source link

make.vim: vpath directive highlights incorrectly with multiple directories #342

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a makefile with the following lines:

vpath %.h /foo/bar
vpath %.i /foo/bar:/baz/blotso

2. Ensure syntax highlighting is on, filetype is set properly, etc.

What is the expected output? What do you see instead?
I expect to see "vpath" highlighted as a statement, % as a make wildcard, and 
the rest of the line basically as expected. Instead, the second line is 
highlighted as a target line, due to the colon.

What version of the product are you using? On what operating system?
I'm using vim v7.0 on RHEL 5.9 (as directed by my project -- no, I am not 
allowed to upgrade the executable, but I can add personal files). I have 
confirmed this happens with the currently committed version of make.vim.

Please provide any additional information below.

The solution is to change line 26 to read

syn match makeVpath "^ *vpath"

then add this line just about anywhere:

hi link makeVpath Statement

(Sorry that I can't provide a patch file for this, but the system I work on is 
not connected to the Internet.)

Adding these lines to ~/.vim/after/syntax/make.vim solves the problem.

Original issue reported on code.google.com by ultra.jo...@gmail.com on 16 Mar 2015 at 5:47

GoogleCodeExporter commented 9 years ago
Please report to the maintainer of the script. You find the contact data in the 
file $VIMRUNTIME/syntax/make.vim
When he acknowledges the problem and fixes it, he will send an updated script 
for inclusion with Vim to Bram.

Original comment by chrisbr...@googlemail.com on 16 Mar 2015 at 8:25