[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.

------=_NextPart_000_0341_01C11A86.8C1C0170
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Hi Jay,

> Especially if you are doing development in C#, I would highly recommend
it.
> 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,
so
> I will dig it up tonight (along the with the name of the original author
so
> 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
interested....
--
Tomas Restrepo
tomasr@mvps.org

------=_NextPart_000_0341_01C11A86.8C1C0170
Content-Type: application/octet-stream;
	name="csharp.vim"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="csharp.vim"

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\|!=3D\|<\|<=3D\|<<\|<<<\|>=
>\|>>>\|>=3D\|>\|&\|&&\|&=3D\|||\||\||=3D\|\\\|\\=3D\|\*\|\*=3D\|->\|%\|%=
=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 =
object
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 =
WeakReferenceException=20

syn keyword csharpSystemInterface IAsyncResult   ICloneable IComparable =
IConvertible ICustomFormatter IFormattable ILogicalThreadAffinative =
IServiceObjectProvider
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 =
UnhandledExceptionEventHandler
syn keyword csharpSystemEnum 	AttributeTargets PlatformID TypeCode

syn match   csharpSpecialError     contained "\\."
syn match   csharpSpecialCharError contained "[^']"
syn match   csharpSpecialChar      contained =
"\\\([4-9]\d\|[0-3]\d\d\|[\"\\'ntbrf]\|u\x\{4\}\)"
syn region   csharpString          start=3D+"+ end=3D+"+ end=3D+$+ =
contains=3DcsharpSpecialChar,csharpSpecialError,@Spell
syn match   csharpStringError      +"\([^"\\]\|\\.\)*$+
syn match   csharpCharacter        "'[^']*'" =
contains=3DcsharpSpecialChar,csharpSpecialCharError
syn match   csharpCharacter        "'\\''" contains=3DcsharpSpecialChar
syn match   csharpCharacter        "'[^\\]'"
syn match   csharpNumber           =
"\<\(0[0-7]*\|0[xX]\x\+\|\d\+\)[lL]\=3D\>"
syn match   csharpNumber           =
"\(\<\d\+\.\d*\|\.\d\+\)\([eE][-+]\=3D\d\+\)\=3D[fFdD]\=3D"
syn match   csharpNumber           "\<\d\+[eE][-+]\=3D\d\+[fFdD]\=3D\>"
syn match   csharpNumber           =
"\<\d\+\([eE][-+]\=3D\d\+\)\=3D[fFdD]\>"

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

syn cluster csharpTop =
add=3DcsharpString,csharpCharacter,csharpNumber,csharpSpecial,csharpStrin=
gError

" 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 =
contains=3DcsharpSpecial,csharpCommentStar,csharpSpecialChar,@Spell
syn region  csharpComment2String   contained start=3D+"+  end=3D+$\|"+  =
contains=3DcsharpSpecial,csharpSpecialChar,@Spell
syn match   csharpCommentCharacter contained "'\\[^']\{1,6\}'" =
contains=3DcsharpSpecialChar
syn match   csharpCommentCharacter contained "'\\''" =
contains=3DcsharpSpecialChar
syn match   csharpCommentCharacter contained "'[^\\]'"
syn region  csharpComment          start=3D"/\*"  end=3D"\*/" =
contains=3DcsharpCommentString,csharpCommentCharacter,csharpNumber,csharp=
Todo,@Spell
syn match   csharpCommentStar      contained "^\s*\*[^/]"me=3De-1
syn match   csharpCommentStar      contained "^\s*\*$"
syn match   csharpLineComment      "//.*" =
contains=3DcsharpComment2String,csharpCommentCharacter,csharpNumber,cshar=
pTodo,@Spell

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
endif
let b:current_syntax=3D"csharp"





------=_NextPart_000_0341_01C11A86.8C1C0170--