Vim Tips Wiki
(Workaround for C# (as of r398))
 
(standard format)
Line 1: Line 1:
  +
{{ScriptComments|2646|Ctags highlighting: highlight typedefs, enumerations etc (based on ctags)}}
r398 of this script has bug, that prevents generating highlighting info for C# in some scenarios
 
  +
  +
==Comments==
 
r398 of this script has a bug that prevents generating highlighting info for C# in some scenarios.
   
 
The workaround (couldn't reach scripts' author for the moment)
 
The workaround (couldn't reach scripts' author for the moment)
   
 
In file mk_types.py find following lines
 
In file mk_types.py find following lines
 
 
<pre>
 
<pre>
 
def GetLanguageParameters(lang):
 
def GetLanguageParameters(lang):
Line 15: Line 17:
 
params['extensions'] = r'[ch][xp]*'
 
params['extensions'] = r'[ch][xp]*'
 
</pre>
 
</pre>
  +
 
The last line contains fix - put it into your mk_types.py instead of original. The regexp that's used in original version causes matching against C# files, that brings problems.
 
The last line contains fix - put it into your mk_types.py instead of original. The regexp that's used in original version causes matching against C# files, that brings problems.

Revision as of 11:21, 14 May 2010

Use this page to discuss script 2646 2646

  • Add constructive comments, bug reports, or discuss improvements (see the guideline).
  • Do not document the script here (the author should do that on vim.org).
  • This page may be out of date: check the script's vim.org page above, and its release notes.

Comments

r398 of this script has a bug that prevents generating highlighting info for C# in some scenarios.

The workaround (couldn't reach scripts' author for the moment)

In file mk_types.py find following lines

def GetLanguageParameters(lang):
	params = {}
	# Default value for iskeyword
	params['iskeyword'] = '@,48-57,_,192-255'
	if lang == 'c':
		params['suffix'] = 'c'
		params['name'] = 'c'
		params['extensions'] = r'[ch][xp]*'

The last line contains fix - put it into your mk_types.py instead of original. The regexp that's used in original version causes matching against C# files, that brings problems.