www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Addition to vim syntax highlighting for D

reply Tim Keating <holyspamster gmail.com> writes:
Found a bug with VIM syntax highlighting today. If you use VIM, you 
might want update your d.vim file as follows:

After the line:

	syn region dRawString	start=+`+ skip=+\\`+ end=+`[cwd]\=+ 
contains= Spell

Add this line:

	syn match dRawString	+`\\`+

Without this, the literal raw string `\` will break the first raw 
literal matcher, and highlight to the next backtick char as a giant 
multiline string literal. Admittedly minor, but annoying.

On a related note, anyone know how to submit patches to the vim project?

TK
Dec 27 2006
next sibling parent J C Calvarese <technocrat7 gmail.com> writes:
Tim Keating Wrote:
 On a related note, anyone know how to submit patches to the vim project?

I don't know. Can you just upload a new version to this page? http://www.vim.org/scripts/script.php?script_id=379 (By the way, I added your patch to the information at http://www.prowiki.org/wiki4d/wiki.cgi?EditorSupport/VimEditor to help other Vim users find out about it.)
Dec 28 2006
prev sibling next sibling parent Jason Mills <jmills cs.mun.ca> writes:
Tim Keating wrote:
 Found a bug with VIM syntax highlighting today. If you use VIM, you 
 might want update your d.vim file as follows:
 
 After the line:
 
 	syn region dRawString	start=+`+ skip=+\\`+ end=+`[cwd]\=+ 
 contains= Spell
 
 Add this line:
 
 	syn match dRawString	+`\\`+
 
 Without this, the literal raw string `\` will break the first raw 
 literal matcher, and highlight to the next backtick char as a giant 
 multiline string literal. Admittedly minor, but annoying.
 
 On a related note, anyone know how to submit patches to the vim project?
 
 TK

I maintain the d.vim syntax script. I'll merge your changes into the original and post a new version to vim.org shortly. Thanks for the bug report. Sadly, I don't program in D that much (since I can't use it at work), so I don't catch some bugs. I'm more or less maintaining this file to learn vim syntax highlighting and to make a small contribution to D and vim ;-) Jason
Dec 28 2006
prev sibling parent reply Jason Mills <jmills cs.mun.ca> writes:
Tim Keating wrote:
 Found a bug with VIM syntax highlighting today. If you use VIM, you 
 might want update your d.vim file as follows:
 
 After the line:
 
 	syn region dRawString	start=+`+ skip=+\\`+ end=+`[cwd]\=+ 
 contains= Spell
 
 Add this line:
 
 	syn match dRawString	+`\\`+
 
 Without this, the literal raw string `\` will break the first raw 
 literal matcher, and highlight to the next backtick char as a giant 
 multiline string literal. Admittedly minor, but annoying.
 
 On a related note, anyone know how to submit patches to the vim project?
 
 TK

I have uploaded a new version (0.16) of d.vim incorporating your changes. I have also included a couple of other changes to account for some new keywords and such since my last update. http://www.vim.org/scripts/script.php?script_id=379 Jason
Dec 28 2006
parent reply Georg Wrede <georg.wrede nospam.org> writes:
Jason Mills wrote:
 I have uploaded a new version (0.16) of d.vim incorporating your 
 changes. I have also included a couple of other changes to account for 
 some new keywords and such since my last update.
 
 http://www.vim.org/scripts/script.php?script_id=379

Excellent! But there seems to be a typo on the download page, it says "Updated for D version 0.78.", which might put off a few downloaders. :-)
Dec 29 2006
parent Jason Mills <jmills cs.mun.ca> writes:
Georg Wrede wrote:
 But there seems to be a typo on the download page, it says "Updated for 
 D version 0.78.", which might put off a few downloaders. :-)

Fixed.
Dec 29 2006