[Mono-list] Editor frustration.

Tomas Restrepo tomasr@mvps.org
Wed, 1 Aug 2001 12:36:12 -0500

This is a multi-part message in MIME format.

Content-Type: text/plain;
Content-Transfer-Encoding: 7bit

Hi Jay,

> Especially if you are doing development in C#, I would highly recommend
> I'll take a look at that editor, although I hardly ever do file-editing
> tasks that don't involve some aspect of a development environment anymore.
> Oh, and I got a few people who wanted me to find that vim syntax script,
> I will dig it up tonight (along the with the name of the original author
> we can credit people appropriately).

I've attached my copy (slighlty modified from the original), which works
more or less well. The original author is Girish Bharadwaj.
I've also have a (semiworking) syntax for MSIL, in case anyone's
Tomas Restrepo

Content-Type: application/octet-stream;
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;

syn clear
syn match csharpError "[\\@`]"
syn match csharpError "<<<\|\.\.\|=3D>\|<>\|||=3D\|&&=3D\|[^-]->\|\*\/"
syn keyword csharpConditional 	if else switch case default
syn keyword csharpRepeat	while for foreach do goto in
syn keyword csharpBoolean	true false
syn keyword csharpConst		null
syn keyword csharpTypedef	this base
syn match csharpOperator =
=3D\|;\|,\|\.\|+=3D\|-=3D" =09
syn keyword csharpDirectional	out ref
syn keyword csharpType		bool byte char decimal double enum float int =
long sbyte short sizeof string uint ulong ushort void=20
syn keyword csharpStatement	return  internal typeof lock new operator =
syn keyword csharpClass		class interface namespace struct override
syn keyword csharpProperties	get set
syn keyword csharpException	try catch throw finally=20
syn keyword csharpScope		public private protected abstract
syn keyword csharpBranch          break continue =
nextgroup=3DcsharpUserLabelRef skipwhite
syn match   csharpUserLabelRef    "\k\+" contained
syn keyword csharpTypecast	as is
syn keyword csharpTypeConvertDecl	explicit implicit
syn keyword csharpStorageClass	static const delegate event extern fixed =
checked  unchecked sealed stackalloc virtual readonly unsafe params
syn keyword csharpExternal	namespace using
syn keyword csharpPreproc	#if #else #elif #endif #define #undef #warning =
#error #line #region #endregion

syn keyword csharpSystemClass   AccessException Activator AppDomain =
AppDomainFlags AppDomainUnloadedException =
AppDomainUnloadInProgressException ApplicationException =
ArgumentException ArgumentNullException ArgumentOutOfRangeException =
ArithmeticException Array=20
syn keyword csharpSystemClass   ArrayTypeMismatchException Attribute =
AttributeUsageAttribute BadImageFormatException BitConverter Buffer =
CallContext CLSCompliantAttribute Console ContextBoundObject =
ContextMarshalException ContextStaticAttribute   Convert
syn keyword csharpSystemClass  CoreException DBNull Delegate =
DivideByZeroException DuplicateWaitObjectException Empty =
EntryPointNotFoundException Enum Environment EventArgs Exception =
ExecutionEngineException FieldAccessException FlagsAttribute Bitfeilds
syn keyword csharpSystemClass FormatException IndexOutOfRangeException =
InvalidCastException InvalidOperationException LocalDataStore =
LocalDataStoreMgr LocalDataStoreSlot LogicalCallContext =
MarshalByRefObject Math MethodAccessException MissingFieldException
syn keyword csharpSystemClass MissingMemberException =
MissingMethodException MulticastDelegate MulticastNotSupportedException =
NonSerializedAttribute NotFiniteNumberException NotImplementedException =
NotSupportedException NullReferenceException Object ObsoleteAttribute
syn keyword csharpSystemClass OperatingSystem OutOfMemoryException =
OverflowException ParamArrayAttribute Radix Random RankException =
SerializableAttribute StackOverflowException String SystemException =
ThreadStaticAttribute TimeZone Type TypeInitializationException
syn keyword csharpSystemClass TypeLoadException TypeUnloadedException =
UnhandledExceptionEvent Value ValueType Version WeakReference =

syn keyword csharpSystemInterface IAsyncResult   ICloneable IComparable =
IConvertible ICustomFormatter IFormattable ILogicalThreadAffinative =
syn keyword csharpSystemValueType  ArgIterator Boolean Byte Char =
Currency DateTime Decimal Double Guid Int16 Int32 Int64 ParamArray =
RuntimeArgumentHandle RuntimeFieldHandle RuntimeMethodHandle =
RuntimeTypeHandle SByte Single TimeSpan TypedReference UInt16 UInt32 =
UInt64 Void

syn keyword csharpSystemDelegate  AsyncCallback EventHandler =
syn keyword csharpSystemEnum 	AttributeTargets PlatformID TypeCode

syn match   csharpSpecialError     contained "\\."
syn match   csharpSpecialCharError contained "[^']"
syn match   csharpSpecialChar      contained =
syn region   csharpString          start=3D+"+ end=3D+"+ end=3D+$+ =
syn match   csharpStringError      +"\([^"\\]\|\\.\)*$+
syn match   csharpCharacter        "'[^']*'" =
syn match   csharpCharacter        "'\\''" contains=3DcsharpSpecialChar
syn match   csharpCharacter        "'[^\\]'"
syn match   csharpNumber           =
syn match   csharpNumber           =
syn match   csharpNumber           "\<\d\+[eE][-+]\=3D\d\+[fFdD]\=3D\>"
syn match   csharpNumber           =

" unicode characters
syn match   csharpSpecial "\\u\d\{4\}"

syn cluster csharpTop =

" Comments
syn keyword csharpTodo             contained TODO FIXME XXX
syn region  csharpCommentString    contained start=3D+"+ end=3D+"+ =
end=3D+$+ end=3D+\*/+me=3Ds-1,he=3Ds-1 =
syn region  csharpComment2String   contained start=3D+"+  end=3D+$\|"+  =
syn match   csharpCommentCharacter contained "'\\[^']\{1,6\}'" =
syn match   csharpCommentCharacter contained "'\\''" =
syn match   csharpCommentCharacter contained "'[^\\]'"
syn region  csharpComment          start=3D"/\*"  end=3D"\*/" =
syn match   csharpCommentStar      contained "^\s*\*[^/]"me=3De-1
syn match   csharpCommentStar      contained "^\s*\*$"
syn match   csharpLineComment      "//.*" =

hi link csharpCommentString csharpString
hi link csharpComment2String csharpString
hi link csharpCommentCharacter csharpCharacter

if !exists("did_csharp_syntax_inits")
    let did_csharp_syntax_inits=3D1
    hi link csharpConditional Conditional
    hi link csharpError	Error
    hi link csharpRepeat Repeat
    hi link csharpBoolean Boolean
    hi link csharpConst Constant
    hi link csharpTypedef Typedef
    hi link csharpOperator Operator
    hi link csharpDirectional Operator
    hi link csharpType	Type
    hi link csharpStatement statement
    hi link csharpClass Type
    hi link csharpException Exception
    hi link csharpScope	Statement
    hi link csharpBranch Keyword
    hi link csharpUserLabelRef label
    hi link csharpTypecast statement
    hi link csharpStorageClass StorageClass
    hi link csharpExternal preproc
    hi link csharpPreproc preproc
    hi link csharpSpecialError error
    hi link csharpString string
    hi link csharpCharacter	string
    hi link csharpComment Comment
    hi link csharpLineComment Comment
    hi link csharpProperties Operator
    hi link csharpTypeConvertDecl Operator
    hi link csharpSystemClass  StorageClass
    hi link csharpSystemInterface Statement
    hi link csharpSystemValueType Type
    hi link csharpSystemDelegate Statement
    hi link csharpSystemEnum  statement
    hi csharpProperties gui=3Ditalic=20
let b:current_syntax=3D"csharp"