Kevin Berridge avatar Kevin Berridge committed 853cb68

added stuff

Comments (0)

Files changed (46)

+set nocompatible
+source $VIMRUNTIME/vimrc_example.vim
+source $VIMRUNTIME/mswin.vim
+behave mswin
+
+set diffexpr=MyDiff()
+function MyDiff()
+  let opt = '-a --binary '
+  if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
+  if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
+  let arg1 = v:fname_in
+  if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
+  let arg2 = v:fname_new
+  if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
+  let arg3 = v:fname_out
+  if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
+  if &sh =~ '\<cmd'
+    silent execute '!""C:\Program Files\Vim\vim70\diff" ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . '"'
+  else
+    silent execute '!C:\Program" Files\Vim\vim70\diff" ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3
+  endif
+endfunction
+
+" font
+"set guifont=Courier_New:h10
+set guifont=Consolas:h13:cANSI
+
+" No menus
+set guioptions-=T
+
+" tab prefs
+set expandtab
+set tabstop=2
+set shiftwidth=2
+set smarttab
+
+" modifies when Vim wraps text
+set lbr
+
+" indent
+set ai
+set si
+
+" shows line numbers
+set number
+
+" shows matches as you type
+set incsearch
+
+" moves cursor to matching open symbol when you type close symbol
+set showmatch
+
+" colorscheme ps_color
+" colorscheme zenburn
+colorscheme moria
+
+" Vibrant Ink color scheme
+" highlight Normal guifg=White   guibg=Black
+" highlight Cursor guifg=Black   guibg=Yellow
+" highlight Keyword guifg=#FF6600 gui=NONE
+" highlight Define guifg=#FF6600 gui=NONE
+" highlight Comment guifg=#9933CC gui=NONE
+" highlight Type guifg=White gui=NONE
+" highlight csSymbol guifg=#339999 gui=NONE
+" highlight Identifier guifg=White gui=NONE
+" highlight csStringDelimiter guifg=#66FF00
+" highlight Constant guifg=#FFEE98 gui=NONE
+" highlight Function guifg=#FFCC00 gui=NONE
+" highlight Include guifg=#FFCC00 gui=NONE
+" highlight Statement guifg=#FF6600 gui=NONE
+" highlight String guifg=#66FF00 gui=NONE
+" highlight Search guibg=White
+
+" make the arrow keys move within wrapped lines
+map <Up> gk
+imap <Up> <C-o>gk
+map <Down> gj
+imap <Down> <C-o>gj
+
+" makes 0 go to first character on the line instead of start of line
+map 0 ^
+
+" Turn backup off
+set nobackup
+
+map [[ ?{<CR>w99[{
+
+" turns on spell checking
+map <F3> :setlocal spell! spelllang=en_us<cr>
+imap <F3> <ESC>:setlocal spell! spelllang=en_us<cr>i
+
+" set any autocmds (make sure they are only set once)
+if !exists("autocommands_loaded")
+  let autocommands_loaded = 1
+  
+  " setup C# building
+  autocmd BufNewFile,BufRead *.cs compiler devenv
+
+  " setup folding
+  autocmd BufNewFile,BufRead *.cs set foldmethod=syntax
+endif
+
+" setup TFS integration
+function! Tfcheckout()
+  exe '!tf checkout "' expand('%:p') '"'
+endfunction
+command! Tfcheckout :call Tfcheckout()
+
+function! Tfcheckin()
+  exe '!tf checkin "' expand('%:p') '"'
+endfunction
+command! Tfcheckin :call Tfcheckin()
+
+" setup integrated help
+function! OnlineDoc()
+  let s:wordUnderCursor = expand("<cword>")
+
+  if &ft =~ "cs"
+    let s:url = "http://social.msdn.microsoft.com/Search/en-US/?Refinement=26&Query=" . s:wordUnderCursor
+  else
+    execute "help " . s:wordUnderCursor
+    return
+  endif
+
+  let s:browser = "\"C:\\Program Files\\Mozilla Firefox\\firefox.exe\""
+  let s:cmd = "silent !start " . s:browser . " " . s:url
+
+  execute s:cmd
+endfunction
+
+map <silent> <F1> :call OnlineDoc()<CR>
+imap <silent> <F1> <ESC>:call OnlineDoc()<CR>
+ 
+" find file script
+function! Find(name)
+  let l:_name = substitute( a:name, "\\s", "*", "g" )
+
+  let l:files = system( "dir *".l:_name."* /B /S" )
+  let l:list = split( l:files, '\n' )
+  let l:len = len( l:list )
+
+  if l:len < 1
+    echo "'".a:name."' not found"
+    return
+  elseif l:len != 1
+    let l:i = 1
+    let l:cwd = substitute( getcwd(), '\\', '\\\\', "g" )
+
+    for line in l:list
+      echo l:i . ": " . substitute( l:line, l:cwd, "", "g" )
+      let l:i += 1
+    endfor
+
+    let l:input = input( "Which ? (<enter>=nothing)\n" )
+
+    if strlen( l:input ) == 0
+      return
+    elseif strlen( substitute( l:input, "[0-9]", "", "g" ) ) > 0
+      echo "Not a number"
+      return
+    elseif l:input < 1 || l:input > l:len
+      echo "Out of range"
+      return
+    endif
+
+    let l:line = l:list[l:input-1]
+  else
+    let l:line = l:list[0]
+  endif
+  let l:line = substitute( l:line, "^[^\t]*\t./", "", "" )
+  execute ":e " . l:line
+endfunction
+
+command! -nargs=1 Find :call Find("<args>")

vimfiles/after/plugin/snipMate.vim

+" These are the mappings for snipMate.vim. Putting it here ensures that it
+" will be mapped after other plugins such as supertab.vim.
+if !exists('loaded_snips') || exists('s:did_snips_mappings')
+	finish
+endif
+let s:did_snips_mappings = 1
+
+ino <silent> <tab> <c-r>=TriggerSnippet()<cr>
+snor <silent> <tab> <esc>i<right><c-r>=TriggerSnippet()<cr>
+ino <silent> <s-tab> <c-r>=BackwardsSnippet()<cr>
+snor <silent> <s-tab> <esc>i<right><c-r>=BackwardsSnippet()<cr>
+ino <silent> <c-r><tab> <c-r>=ShowAvailableSnips()<cr>
+
+" The default mappings for these are annoying & sometimes break snipMate.
+" You can change them back if you want, I've put them here for convenience.
+snor <bs> b<bs>
+snor <right> <esc>a
+snor <left> <esc>bi
+snor ' b<bs>'
+snor ` b<bs>`
+snor % b<bs>%
+snor U b<bs>U
+snor ^ b<bs>^
+snor \ b<bs>\
+snor <c-x> b<bs><c-x>
+
+" By default load snippets in snippets_dir
+if empty(snippets_dir)
+	finish
+endif
+
+call GetSnippets(snippets_dir, '_') " Get global snippets
+
+au FileType * if &ft != 'help' | call GetSnippets(snippets_dir, &ft) | endif
+" vim:noet:sw=4:ts=4:ft=vim

vimfiles/autoload/snipMate.vim

+fun! Filename(...)
+	let filename = expand('%:t:r')
+	if filename == '' | return a:0 == 2 ? a:2 : '' | endif
+	return !a:0 || a:1 == '' ? filename : substitute(a:1, '$1', filename, 'g')
+endf
+
+fun s:RemoveSnippet()
+	unl! g:snipPos s:curPos s:snipLen s:endCol s:endLine s:prevLen
+	     \ s:lastBuf s:oldWord
+	if exists('s:update')
+		unl s:startCol s:origWordLen s:update
+		if exists('s:oldVars') | unl s:oldVars s:oldEndCol | endif
+	endif
+	aug! snipMateAutocmds
+endf
+
+fun snipMate#expandSnip(snip, col)
+	let lnum = line('.') | let col = a:col
+
+	let snippet = s:ProcessSnippet(a:snip)
+	" Avoid error if eval evaluates to nothing
+	if snippet == '' | return '' | endif
+
+	" Expand snippet onto current position with the tab stops removed
+	let snipLines = split(substitute(snippet, '$\d\+\|${\d\+.\{-}}', '', 'g'), "\n", 1)
+
+	let line = getline(lnum)
+	let afterCursor = strpart(line, col - 1)
+	" Keep text after the cursor
+	if afterCursor != "\t" && afterCursor != ' '
+		let line = strpart(line, 0, col - 1)
+		let snipLines[-1] .= afterCursor
+	else
+		let afterCursor = ''
+		" For some reason the cursor needs to move one right after this
+		if line != '' && col == 1 && &ve != 'all' && &ve != 'onemore'
+			let col += 1
+		endif
+	endif
+
+	call setline(lnum, line.snipLines[0])
+
+	" Autoindent snippet according to previous indentation
+	let indent = matchend(line, '^.\{-}\ze\(\S\|$\)') + 1
+	call append(lnum, map(snipLines[1:], "'".strpart(line, 0, indent - 1)."'.v:val"))
+
+	" Open any folds snippet expands into
+	if &fen | sil! exe lnum.','.(lnum + len(snipLines) - 1).'foldopen' | endif
+
+	let [g:snipPos, s:snipLen] = s:BuildTabStops(snippet, lnum, col - indent, indent)
+
+	if s:snipLen
+		aug snipMateAutocmds
+			au CursorMovedI * call s:UpdateChangedSnip(0)
+			au InsertEnter * call s:UpdateChangedSnip(1)
+		aug END
+		let s:lastBuf = bufnr(0) " Only expand snippet while in current buffer
+		let s:curPos = 0
+		let s:endCol = g:snipPos[s:curPos][1]
+		let s:endLine = g:snipPos[s:curPos][0]
+
+		call cursor(g:snipPos[s:curPos][0], g:snipPos[s:curPos][1])
+		let s:prevLen = [line('$'), col('$')]
+		if g:snipPos[s:curPos][2] != -1 | return s:SelectWord() | endif
+	else
+		unl g:snipPos s:snipLen
+		" Place cursor at end of snippet if no tab stop is given
+		let newlines = len(snipLines) - 1
+		call cursor(lnum + newlines, indent + len(snipLines[-1]) - len(afterCursor)
+					\ + (newlines ? 0: col - 1))
+	endif
+	return ''
+endf
+
+" Prepare snippet to be processed by s:BuildTabStops
+fun s:ProcessSnippet(snip)
+	let snippet = a:snip
+	" Evaluate eval (`...`) expressions.
+	" Using a loop here instead of a regex fixes a bug with nested "\=".
+	if stridx(snippet, '`') != -1
+		while match(snippet, '`.\{-}`') != -1
+			let snippet = substitute(snippet, '`.\{-}`',
+						\ substitute(eval(matchstr(snippet, '`\zs.\{-}\ze`')),
+						\ "\n\\%$", '', ''), '')
+		endw
+		let snippet = substitute(snippet, "\r", "\n", 'g')
+	endif
+
+	" Place all text after a colon in a tab stop after the tab stop
+	" (e.g. "${#:foo}" becomes "${:foo}foo").
+	" This helps tell the position of the tab stops later.
+	let snippet = substitute(snippet, '${\d\+:\(.\{-}\)}', '&\1', 'g')
+
+	" Update the a:snip so that all the $# become the text after
+	" the colon in their associated ${#}.
+	" (e.g. "${1:foo}" turns all "$1"'s into "foo")
+	let i = 1
+	while stridx(snippet, '${'.i) != -1
+		let s = matchstr(snippet, '${'.i.':\zs.\{-}\ze}')
+		if s != ''
+			let snippet = substitute(snippet, '$'.i, s.'&', 'g')
+		endif
+		let i += 1
+	endw
+
+	if &et " Expand tabs to spaces if 'expandtab' is set.
+		return substitute(snippet, '\t', repeat(' ', &sts ? &sts : &sw), 'g')
+	endif
+	return snippet
+endf
+
+" Counts occurences of haystack in needle
+fun s:Count(haystack, needle)
+	let counter = 0
+	let index = stridx(a:haystack, a:needle)
+	while index != -1
+		let index = stridx(a:haystack, a:needle, index+1)
+		let counter += 1
+	endw
+	return counter
+endf
+
+" Builds a list of a list of each tab stop in the snippet containing:
+" 1.) The tab stop's line number.
+" 2.) The tab stop's column number
+"     (by getting the length of the string between the last "\n" and the
+"     tab stop).
+" 3.) The length of the text after the colon for the current tab stop
+"     (e.g. "${1:foo}" would return 3). If there is no text, -1 is returned.
+" 4.) If the "${#:}" construct is given, another list containing all
+"     the matches of "$#", to be replaced with the placeholder. This list is
+"     composed the same way as the parent; the first item is the line number,
+"     and the second is the column.
+fun s:BuildTabStops(snip, lnum, col, indent)
+	let snipPos = []
+	let i = 1
+	let withoutVars = substitute(a:snip, '$\d\+', '', 'g')
+	while stridx(a:snip, '${'.i) != -1
+		let beforeTabStop = matchstr(withoutVars, '^.*\ze${'.i.'\D')
+		let withoutOthers = substitute(withoutVars, '${\('.i.'\D\)\@!\d\+.\{-}}', '', 'g')
+
+		let j = i - 1
+		call add(snipPos, [0, 0, -1])
+		let snipPos[j][0] = a:lnum + s:Count(beforeTabStop, "\n")
+		let snipPos[j][1] = a:indent + len(matchstr(withoutOthers, '.*\(\n\|^\)\zs.*\ze${'.i.'\D'))
+		if snipPos[j][0] == a:lnum | let snipPos[j][1] += a:col | endif
+
+		" Get all $# matches in another list, if ${#:name} is given
+		if stridx(withoutVars, '${'.i.':') != -1
+			let snipPos[j][2] = len(matchstr(withoutVars, '${'.i.':\zs.\{-}\ze}'))
+			let dots = repeat('.', snipPos[j][2])
+			call add(snipPos[j], [])
+			let withoutOthers = substitute(a:snip, '${\d\+.\{-}}\|$'.i.'\@!\d\+', '', 'g')
+			while match(withoutOthers, '$'.i.'\(\D\|$\)') != -1
+				let beforeMark = matchstr(withoutOthers, '^.\{-}\ze'.dots.'$'.i.'\(\D\|$\)')
+				call add(snipPos[j][3], [0, 0])
+				let snipPos[j][3][-1][0] = a:lnum + s:Count(beforeMark, "\n")
+				let snipPos[j][3][-1][1] = a:indent + (snipPos[j][3][-1][0] > a:lnum
+				                           \ ? len(matchstr(beforeMark, '.*\n\zs.*'))
+				                           \ : a:col + len(beforeMark))
+				let withoutOthers = substitute(withoutOthers, '$'.i.'\ze\(\D\|$\)', '', '')
+			endw
+		endif
+		let i += 1
+	endw
+	return [snipPos, i - 1]
+endf
+
+fun snipMate#jumpTabStop(backwards)
+	let leftPlaceholder = exists('s:origWordLen')
+	                      \ && s:origWordLen != g:snipPos[s:curPos][2]
+	if leftPlaceholder && exists('s:oldEndCol')
+		let startPlaceholder = s:oldEndCol + 1
+	endif
+
+	if exists('s:update')
+		call s:UpdatePlaceholderTabStops()
+	else
+		call s:UpdateTabStops()
+	endif
+
+	" Don't reselect placeholder if it has been modified
+	if leftPlaceholder && g:snipPos[s:curPos][2] != -1
+		if exists('startPlaceholder')
+			let g:snipPos[s:curPos][1] = startPlaceholder
+		else
+			let g:snipPos[s:curPos][1] = col('.')
+			let g:snipPos[s:curPos][2] = 0
+		endif
+	endif
+
+	let s:curPos += a:backwards ? -1 : 1
+	" Loop over the snippet when going backwards from the beginning
+	if s:curPos < 0 | let s:curPos = s:snipLen - 1 | endif
+
+	if s:curPos == s:snipLen
+		let sMode = s:endCol == g:snipPos[s:curPos-1][1]+g:snipPos[s:curPos-1][2]
+		call s:RemoveSnippet()
+		return sMode ? "\<tab>" : TriggerSnippet()
+	endif
+
+	call cursor(g:snipPos[s:curPos][0], g:snipPos[s:curPos][1])
+
+	let s:endLine = g:snipPos[s:curPos][0]
+	let s:endCol = g:snipPos[s:curPos][1]
+	let s:prevLen = [line('$'), col('$')]
+
+	return g:snipPos[s:curPos][2] == -1 ? '' : s:SelectWord()
+endf
+
+fun s:UpdatePlaceholderTabStops()
+	let changeLen = s:origWordLen - g:snipPos[s:curPos][2]
+	unl s:startCol s:origWordLen s:update
+	if !exists('s:oldVars') | return | endif
+	" Update tab stops in snippet if text has been added via "$#"
+	" (e.g., in "${1:foo}bar$1${2}").
+	if changeLen != 0
+		let curLine = line('.')
+
+		for pos in g:snipPos
+			if pos == g:snipPos[s:curPos] | continue | endif
+			let changed = pos[0] == curLine && pos[1] > s:oldEndCol
+			let changedVars = 0
+			let endPlaceholder = pos[2] - 1 + pos[1]
+			" Subtract changeLen from each tab stop that was after any of
+			" the current tab stop's placeholders.
+			for [lnum, col] in s:oldVars
+				if lnum > pos[0] | break | endif
+				if pos[0] == lnum
+					if pos[1] > col || (pos[2] == -1 && pos[1] == col)
+						let changed += 1
+					elseif col < endPlaceholder
+						let changedVars += 1
+					endif
+				endif
+			endfor
+			let pos[1] -= changeLen * changed
+			let pos[2] -= changeLen * changedVars " Parse variables within placeholders
+                                                  " e.g., "${1:foo} ${2:$1bar}"
+
+			if pos[2] == -1 | continue | endif
+			" Do the same to any placeholders in the other tab stops.
+			for nPos in pos[3]
+				let changed = nPos[0] == curLine && nPos[1] > s:oldEndCol
+				for [lnum, col] in s:oldVars
+					if lnum > nPos[0] | break | endif
+					if nPos[0] == lnum && nPos[1] > col
+						let changed += 1
+					endif
+				endfor
+				let nPos[1] -= changeLen * changed
+			endfor
+		endfor
+	endif
+	unl s:endCol s:oldVars s:oldEndCol
+endf
+
+fun s:UpdateTabStops()
+	let changeLine = s:endLine - g:snipPos[s:curPos][0]
+	let changeCol = s:endCol - g:snipPos[s:curPos][1]
+	if exists('s:origWordLen')
+		let changeCol -= s:origWordLen
+		unl s:origWordLen
+	endif
+	let lnum = g:snipPos[s:curPos][0]
+	let col = g:snipPos[s:curPos][1]
+	" Update the line number of all proceeding tab stops if <cr> has
+	" been inserted.
+	if changeLine != 0
+		let changeLine -= 1
+		for pos in g:snipPos
+			if pos[0] >= lnum
+				if pos[0] == lnum | let pos[1] += changeCol | endif
+				let pos[0] += changeLine
+			endif
+			if pos[2] == -1 | continue | endif
+			for nPos in pos[3]
+				if nPos[0] >= lnum
+					if nPos[0] == lnum | let nPos[1] += changeCol | endif
+					let nPos[0] += changeLine
+				endif
+			endfor
+		endfor
+	elseif changeCol != 0
+		" Update the column of all proceeding tab stops if text has
+		" been inserted/deleted in the current line.
+		for pos in g:snipPos
+			if pos[1] >= col && pos[0] == lnum
+				let pos[1] += changeCol
+			endif
+			if pos[2] == -1 | continue | endif
+			for nPos in pos[3]
+				if nPos[0] > lnum | break | endif
+				if nPos[0] == lnum && nPos[1] >= col
+					let nPos[1] += changeCol
+				endif
+			endfor
+		endfor
+	endif
+endf
+
+fun s:SelectWord()
+	let s:origWordLen = g:snipPos[s:curPos][2]
+	let s:oldWord = strpart(getline('.'), g:snipPos[s:curPos][1] - 1,
+				\ s:origWordLen)
+	let s:prevLen[1] -= s:origWordLen
+	if !empty(g:snipPos[s:curPos][3])
+		let s:update = 1
+		let s:endCol = -1
+		let s:startCol = g:snipPos[s:curPos][1] - 1
+	endif
+	if !s:origWordLen | return '' | endif
+	let l = col('.') != 1 ? 'l' : ''
+	if &sel == 'exclusive'
+		return "\<esc>".l.'v'.s:origWordLen."l\<c-g>"
+	endif
+	return s:origWordLen == 1 ? "\<esc>".l.'gh'
+							\ : "\<esc>".l.'v'.(s:origWordLen - 1)."l\<c-g>"
+endf
+
+" This updates the snippet as you type when text needs to be inserted
+" into multiple places (e.g. in "${1:default text}foo$1bar$1",
+" "default text" would be highlighted, and if the user types something,
+" UpdateChangedSnip() would be called so that the text after "foo" & "bar"
+" are updated accordingly)
+"
+" It also automatically quits the snippet if the cursor is moved out of it
+" while in insert mode.
+fun s:UpdateChangedSnip(entering)
+	if exists('g:snipPos') && bufnr(0) != s:lastBuf
+		call s:RemoveSnippet()
+	elseif exists('s:update') " If modifying a placeholder
+		if !exists('s:oldVars') && s:curPos + 1 < s:snipLen
+			" Save the old snippet & word length before it's updated
+			" s:startCol must be saved too, in case text is added
+			" before the snippet (e.g. in "foo$1${2}bar${1:foo}").
+			let s:oldEndCol = s:startCol
+			let s:oldVars = deepcopy(g:snipPos[s:curPos][3])
+		endif
+		let col = col('.') - 1
+
+		if s:endCol != -1
+			let changeLen = col('$') - s:prevLen[1]
+			let s:endCol += changeLen
+		else " When being updated the first time, after leaving select mode
+			if a:entering | return | endif
+			let s:endCol = col - 1
+		endif
+
+		" If the cursor moves outside the snippet, quit it
+		if line('.') != g:snipPos[s:curPos][0] || col < s:startCol ||
+					\ col - 1 > s:endCol
+			unl! s:startCol s:origWordLen s:oldVars s:update
+			return s:RemoveSnippet()
+		endif
+
+		call s:UpdateVars()
+		let s:prevLen[1] = col('$')
+	elseif exists('g:snipPos')
+		if !a:entering && g:snipPos[s:curPos][2] != -1
+			let g:snipPos[s:curPos][2] = -2
+		endif
+
+		let col = col('.')
+		let lnum = line('.')
+		let changeLine = line('$') - s:prevLen[0]
+
+		if lnum == s:endLine
+			let s:endCol += col('$') - s:prevLen[1]
+			let s:prevLen = [line('$'), col('$')]
+		endif
+		if changeLine != 0
+			let s:endLine += changeLine
+			let s:endCol = col
+		endif
+
+		" Delete snippet if cursor moves out of it in insert mode
+		if (lnum == s:endLine && (col > s:endCol || col < g:snipPos[s:curPos][1]))
+			\ || lnum > s:endLine || lnum < g:snipPos[s:curPos][0]
+			call s:RemoveSnippet()
+		endif
+	endif
+endf
+
+" This updates the variables in a snippet when a placeholder has been edited.
+" (e.g., each "$1" in "${1:foo} $1bar $1bar")
+fun s:UpdateVars()
+	let newWordLen = s:endCol - s:startCol + 1
+	let newWord = strpart(getline('.'), s:startCol, newWordLen)
+	if newWord == s:oldWord || empty(g:snipPos[s:curPos][3])
+		return
+	endif
+
+	let changeLen = g:snipPos[s:curPos][2] - newWordLen
+	let curLine = line('.')
+	let startCol = col('.')
+	let oldStartSnip = s:startCol
+	let updateTabStops = changeLen != 0
+	let i = 0
+
+	for [lnum, col] in g:snipPos[s:curPos][3]
+		if updateTabStops
+			let start = s:startCol
+			if lnum == curLine && col <= start
+				let s:startCol -= changeLen
+				let s:endCol -= changeLen
+			endif
+			for nPos in g:snipPos[s:curPos][3][(i):]
+				" This list is in ascending order, so quit if we've gone too far.
+				if nPos[0] > lnum | break | endif
+				if nPos[0] == lnum && nPos[1] > col
+					let nPos[1] -= changeLen
+				endif
+			endfor
+			if lnum == curLine && col > start
+				let col -= changeLen
+				let g:snipPos[s:curPos][3][i][1] = col
+			endif
+			let i += 1
+		endif
+
+		" "Very nomagic" is used here to allow special characters.
+		call setline(lnum, substitute(getline(lnum), '\%'.col.'c\V'.
+						\ escape(s:oldWord, '\'), escape(newWord, '\&'), ''))
+	endfor
+	if oldStartSnip != s:startCol
+		call cursor(0, startCol + s:startCol - oldStartSnip)
+	endif
+
+	let s:oldWord = newWord
+	let g:snipPos[s:curPos][2] = newWordLen
+endf
+" vim:noet:sw=4:ts=4:ft=vim

vimfiles/colors/blackboard.vim

+" Vim color scheme
+"
+" Name:         blackboard.vim
+" Maintainer:   Ben Wyrosdick <ben.wyrosdick@gmail.com> 
+" Last Change:  20 August 2009
+" License:      public domain
+" Version:      1.4
+
+set background=dark
+hi clear
+if exists("syntax_on")
+   syntax reset
+endif
+
+let g:colors_name = "blackboard"
+
+if has("gui_running")
+  "GUI Colors
+  highlight Normal guifg=White   guibg=#0B1022
+  highlight Cursor guifg=Black   guibg=Yellow
+  highlight CursorLine guibg=#191E2F
+  highlight LineNr guibg=#323232 guifg=#888888
+  highlight Folded guifg=#f1f3e8 guibg=#444444
+  highlight Pmenu guibg=#84A7C1
+
+  "General Colors
+  highlight Comment guifg=#AEAEAE
+  highlight Constant guifg=#CAFE1E
+  highlight Keyword guifg=#FFDE00
+  highlight String guifg=#00D42D
+  highlight Type guifg=#84A7C1
+  highlight Identifier guifg=#00D42D gui=NONE
+  highlight Function guifg=#FF5600 gui=NONE
+  highlight clear Search
+  highlight Search guibg=#1C3B79
+  highlight PreProc guifg=#FF5600
+
+  "HTML Colors
+  highlight link htmlTag Type
+  highlight link htmlEndTag htmlTag
+  highlight link htmlTagName htmlTag
+
+  "Ruby Colors
+  highlight link rubyClass Keyword
+  highlight link rubyDefine Keyword
+  highlight link rubyConstant Type
+  highlight link rubySymbol Constant
+  highlight link rubyStringDelimiter rubyString
+  highlight link rubyInclude Keyword
+  highlight link rubyAttribute Keyword
+  highlight link rubyInstanceVariable Normal
+
+  "Rails Colors
+  highlight link railsMethod Type
+end

vimfiles/colors/darkspectrum.vim

+" Vim color file
+"
+" Author: Brian Mock <mock.brian@gmail.com>
+"
+" Note: Based on Oblivion color scheme for gedit (gtk-source-view)
+"
+" cool help screens
+" :he group-name
+" :he highlight-groups
+" :he cterm-colors
+
+hi clear
+
+set background=dark
+if version > 580
+    " no guarantees for version 5.8 and below, but this makes it stop
+    " complaining
+    hi clear
+    if exists("syntax_on")
+	syntax reset
+    endif
+endif
+let g:colors_name="darkspectrum"
+
+hi Normal guifg=#efefef guibg=#2A2A2A
+
+" highlight groups
+hi Cursor		guibg=#ffffff guifg=#000000
+hi CursorLine	guibg=#000000
+"hi CursorLine	guibg=#3e4446
+hi CursorColumn	guibg=#464646
+
+"hi DiffText     guibg=#4e9a06 guifg=#FFFFFF gui=bold
+"hi DiffChange   guibg=#4e9a06 guifg=#FFFFFF gui=bold
+"hi DiffAdd      guibg=#204a87 guifg=#FFFFFF gui=bold
+"hi DiffDelete   guibg=#5c3566 guifg=#FFFFFF gui=bold
+
+hi DiffAdd         guifg=#ffcc7f guibg=#a67429 gui=none
+hi DiffChange      guifg=#7fbdff guibg=#425c78 gui=none
+hi DiffText        guifg=#8ae234 guibg=#4e9a06 gui=none
+"hi DiffDelete      guifg=#252723 guibg=#000000 gui=none
+hi DiffDelete      guifg=#000000 guibg=#000000 gui=none
+"hi ErrorMsg
+
+hi Number		guifg=#fce94f
+
+hi Folded		guibg=#000000 guifg=#FFFFFF gui=bold
+hi vimFold		guibg=#000000 guifg=#FFFFFF gui=bold
+hi FoldColumn	guibg=#000000 guifg=#FFFFFF gui=bold
+
+hi LineNr		guifg=#535353 guibg=#202020
+hi NonText		guifg=#535353 guibg=#202020
+hi Folded		guifg=#535353 guibg=#202020 gui=bold
+hi FoldeColumn  guifg=#535353 guibg=#202020 gui=bold
+"hi VertSplit	guibg=#ffffff guifg=#ffffff gui=none
+
+hi VertSplit	guibg=#3C3C3C guifg=#3C3C3C gui=none
+hi StatusLine   guifg=#FFFFFF guibg=#3C3C3C gui=none
+hi StatusLineNC guifg=#808080 guibg=#3C3C3C gui=none
+
+hi ModeMsg		guifg=#fce94f
+hi MoreMsg		guifg=#fce94f
+hi Visual		guifg=#FFFFFF guibg=#3465a4 gui=none
+hi VisualNOS    guifg=#FFFFFF guibg=#204a87 gui=none
+hi IncSearch	guibg=#FFFFFF guifg=#ef5939
+hi Search		guibg=#ad7fa8 guifg=#FFFFFF
+hi SpecialKey	guifg=#8ae234
+
+hi Title		guifg=#ef5939
+hi WarningMsg	guifg=#ef5939
+hi Number		guifg=#fcaf3e
+
+hi MatchParen	guibg=#ad7fa8 guifg=#FFFFFF
+hi Comment		guifg=#8a8a8a
+hi Constant		guifg=#ef5939 gui=none
+hi String		guifg=#fce94f
+hi Identifier	guifg=#729fcf
+hi Statement	guifg=#ffffff gui=bold
+hi PreProc		guifg=#ffffff gui=bold
+hi Type			guifg=#8ae234 gui=bold
+hi Special		guifg=#e9b96e
+hi Underlined	guifg=#ad7fa8 gui=underline
+hi Directory	guifg=#729fcf
+hi Ignore		guifg=#555753
+hi Todo			guifg=#FFFFFF guibg=#ef5939 gui=bold
+hi Function		guifg=#ad7fa8
+
+"hi WildMenu     guibg=#2e3436 guifg=#ffffff gui=bold
+"hi WildMenu     guifg=#7fbdff guibg=#425c78 gui=none
+hi WildMenu     guifg=#ffffff guibg=#3465a4 gui=none
+
+hi Pmenu        guibg=#000000 guifg=#c0c0c0
+hi PmenuSel     guibg=#3465a4 guifg=#ffffff
+hi PmenuSbar    guibg=#444444 guifg=#444444
+hi PmenuThumb   guibg=#888888 guifg=#888888 
+
+hi cppSTLType   guifg=#729fcf gui=bold
+
+hi spellBad     guisp=#fcaf3e
+hi spellCap     guisp=#73d216
+hi spellRare    guisp=#ad7fa8
+hi spellLocal   guisp=#729fcf
+
+hi link cppSTL          Function
+hi link Error			Todo
+hi link Character		Number
+hi link rubySymbol		Number
+hi link htmlTag			htmlEndTag
+"hi link htmlTagName     htmlTag
+hi link htmlLink		Underlined
+hi link pythonFunction	Identifier
+hi link Question		Type
+hi link CursorIM		Cursor
+hi link VisualNOS		Visual
+hi link xmlTag			Identifier
+hi link xmlTagName		Identifier
+hi link shDeref			Identifier
+hi link shVariable		Function
+hi link rubySharpBang	Special
+hi link perlSharpBang	Special
+hi link schemeFunc      Statement
+"hi link shSpecialVariables Constant
+"hi link bashSpecialVariables Constant
+
+" tabs (non gui)
+hi TabLine		guifg=#A3A3A3 guibg=#202020 gui=none
+hi TabLineFill	guifg=#535353 guibg=#202020 gui=none
+hi TabLineSel	guifg=#FFFFFF gui=bold
+"hi TabLineSel	guifg=#FFFFFF guibg=#000000 gui=bold
+" vim: sw=4 ts=4

vimfiles/colors/moria.vim

+if exists("g:moria_style")
+    let s:moria_style = g:moria_style
+else
+    let s:moria_style = &background
+endif
+
+if exists("g:moria_monochrome")
+    let s:moria_monochrome = g:moria_monochrome
+else
+    let s:moria_monochrome = 0
+endif
+
+if exists("g:moria_fontface")
+    let s:moria_fontface = g:moria_fontface
+else
+    let s:moria_fontface = "plain"
+endif
+
+execute "command! -nargs=1 Colo let g:moria_style = \"<args>\" | colo moria"
+
+if s:moria_style == "black" || s:moria_style == "dark"
+    set background=dark
+elseif s:moria_style == "light" || s:moria_style == "white"
+    set background=light
+else
+    let s:moria_style = &background 
+endif
+
+hi clear
+
+if exists("syntax_on")
+    syntax reset
+endif
+
+let colors_name = "moria"
+
+if &background == "dark"
+    if s:moria_style == "dark"
+        hi Normal ctermbg=Black ctermfg=LightGray guibg=#202020 guifg=#d0d0d0 gui=none
+
+        hi CursorColumn ctermbg=DarkGray ctermfg=White guibg=#404040 gui=none
+        hi CursorLine ctermbg=DarkGray ctermfg=White guibg=#404040 gui=none
+    elseif s:moria_style == "black"
+        hi Normal ctermbg=Black ctermfg=LightGray guibg=#000000 guifg=#d0d0d0 gui=none
+
+        hi CursorColumn ctermbg=DarkGray ctermfg=White guibg=#3a3a3a gui=none
+        hi CursorLine ctermbg=DarkGray ctermfg=White guibg=#3a3a3a gui=none
+    endif
+    if s:moria_monochrome == 1
+        hi FoldColumn ctermbg=bg guibg=bg guifg=#a0a0a0 gui=none
+        hi LineNr guifg=#a0a0a0 gui=none
+        hi MoreMsg guibg=bg guifg=#b6b6b6 gui=bold
+        hi NonText ctermfg=DarkGray guibg=bg guifg=#a0a0a0 gui=bold
+        hi Pmenu guibg=#909090 guifg=#000000 gui=none
+        hi PmenuSbar guibg=#707070 guifg=fg gui=none
+        hi PmenuThumb guibg=#d0d0d0 guifg=bg gui=none
+        hi SignColumn ctermbg=bg guibg=bg guifg=#a0a0a0 gui=none
+        hi StatusLine ctermbg=LightGray ctermfg=Black guibg=#4c4c4c guifg=fg gui=bold
+        hi StatusLineNC ctermbg=DarkGray ctermfg=Black guibg=#404040 guifg=fg gui=none
+        hi TabLine guibg=#6e6e6e guifg=fg gui=underline
+        hi TabLineFill guibg=#6e6e6e guifg=fg gui=underline
+        hi VertSplit ctermbg=LightGray ctermfg=Black guibg=#404040 guifg=fg gui=none
+        if s:moria_fontface == "mixed"
+            hi Folded guibg=#4e4e4e guifg=#c0c0c0 gui=bold
+        else
+            hi Folded guibg=#4e4e4e guifg=#c0c0c0 gui=none
+        endif            
+    else
+        hi FoldColumn ctermbg=bg guibg=bg guifg=#8fa5d1 gui=none
+        hi LineNr guifg=#8fa5d1 gui=none
+        hi MoreMsg guibg=bg guifg=#97abd5 gui=bold
+        hi NonText ctermfg=DarkGray guibg=bg guifg=#8fa5d1 gui=bold
+        hi Pmenu guibg=#6381be guifg=#000000 gui=none
+        hi PmenuSbar guibg=#41609e guifg=fg gui=none
+        hi PmenuThumb guibg=#bdcae3 guifg=bg gui=none
+        hi SignColumn ctermbg=bg guibg=bg guifg=#8fa5d1 gui=none
+        hi StatusLine ctermbg=LightGray ctermfg=Black guibg=#334b7d guifg=fg gui=bold
+        hi StatusLineNC ctermbg=DarkGray ctermfg=Black guibg=#25365a guifg=fg gui=none
+        hi TabLine guibg=#41609e guifg=fg gui=underline
+        hi TabLineFill guibg=#41609e guifg=fg gui=underline
+        hi VertSplit ctermbg=LightGray ctermfg=Black guibg=#25365a guifg=fg gui=none
+        if s:moria_fontface == "mixed"
+            hi Folded guibg=#4e4e4e guifg=#bdcae3 gui=bold
+        else
+            hi Folded guibg=#4e4e4e guifg=#bdcae3 gui=none
+        endif            
+    endif
+    hi Cursor guibg=#ffa500 guifg=bg gui=none
+    hi DiffAdd guibg=#008b00 guifg=fg gui=none
+    hi DiffChange guibg=#00008b guifg=fg gui=none
+    hi DiffDelete guibg=#8b0000 guifg=fg gui=none
+    hi DiffText guibg=#0000cd guifg=fg gui=bold
+    hi Directory guibg=bg guifg=#1e90ff gui=none
+    hi ErrorMsg guibg=#ee2c2c guifg=#ffffff gui=bold
+    hi IncSearch guibg=#e0cd78 guifg=#000000 gui=none
+    hi ModeMsg guibg=bg guifg=fg gui=bold
+    hi PmenuSel guibg=#e0e000 guifg=#000000 gui=none
+    hi Question guibg=bg guifg=#e8b87e gui=bold
+    hi Search guibg=#90e090 guifg=#000000 gui=none
+    hi SpecialKey guibg=bg guifg=#e8b87e gui=none
+    if has("spell")
+        hi SpellBad guisp=#ee2c2c gui=undercurl
+        hi SpellCap guisp=#2c2cee gui=undercurl
+        hi SpellLocal guisp=#2ceeee gui=undercurl
+        hi SpellRare guisp=#ee2cee gui=undercurl
+    endif
+    hi TabLineSel guibg=bg guifg=fg gui=bold
+    hi Title ctermbg=Black ctermfg=White guifg=fg gui=bold
+    if version >= 700
+        hi Visual ctermbg=LightGray ctermfg=Black guibg=#606060 gui=none
+    else
+        hi Visual ctermbg=LightGray ctermfg=Black guibg=#606060 guifg=fg gui=none
+    endif
+    hi VisualNOS ctermbg=DarkGray ctermfg=Black guibg=bg guifg=#a0a0a0 gui=bold,underline
+    hi WarningMsg guibg=bg guifg=#ee2c2c gui=bold
+    hi WildMenu guibg=#e0e000 guifg=#000000 gui=bold
+
+    hi Comment guibg=bg guifg=#d0d0a0 gui=none
+    hi Constant guibg=bg guifg=#87df71 gui=none
+    hi Error guibg=bg guifg=#ee2c2c gui=none
+    hi Identifier guibg=bg guifg=#7ee0ce gui=none
+    hi Ignore guibg=bg guifg=bg gui=none
+    hi lCursor guibg=#00e700 guifg=#000000 gui=none
+    hi MatchParen guibg=#008b8b gui=none
+    hi PreProc guibg=bg guifg=#d7a0d7 gui=none
+    hi Special guibg=bg guifg=#e8b87e gui=none
+    hi Todo guibg=#e0e000 guifg=#000000 gui=none
+    hi Underlined ctermbg=Black ctermfg=White guibg=bg guifg=#00a0ff gui=underline    
+
+    if s:moria_fontface == "mixed"
+        hi Statement guibg=bg guifg=#7ec0ee gui=bold
+        hi Type guibg=bg guifg=#f09479 gui=bold
+    else
+        hi Statement guibg=bg guifg=#7ec0ee gui=none
+        hi Type guibg=bg guifg=#f09479 gui=none
+    endif
+
+    hi htmlBold ctermbg=Black ctermfg=White guibg=bg guifg=fg gui=bold
+    hi htmlBoldItalic ctermbg=Black ctermfg=White guibg=bg guifg=fg gui=bold,italic
+    hi htmlBoldUnderline ctermbg=Black ctermfg=White guibg=bg guifg=fg gui=bold,underline
+    hi htmlBoldUnderlineItalic ctermbg=Black ctermfg=White guibg=bg guifg=fg gui=bold,underline,italic
+    hi htmlItalic ctermbg=Black ctermfg=White guibg=bg guifg=fg gui=italic
+    hi htmlUnderline ctermbg=Black ctermfg=White guibg=bg guifg=fg gui=underline
+    hi htmlUnderlineItalic ctermbg=Black ctermfg=White guibg=bg guifg=fg gui=underline,italic
+elseif &background == "light"
+    if s:moria_style == "light"
+        hi Normal ctermbg=White ctermfg=Black guibg=#f0f0f0 guifg=#000000 gui=none
+
+        hi CursorColumn ctermbg=LightGray ctermfg=Black guibg=#d8d8d8 gui=none
+        hi CursorLine ctermbg=LightGray ctermfg=Black guibg=#d8d8d8 gui=none
+    elseif s:moria_style == "white"
+        hi Normal ctermbg=White ctermfg=Black guibg=#ffffff guifg=#000000 gui=none
+
+        hi CursorColumn ctermbg=LightGray ctermfg=Black guibg=#dfdfdf gui=none
+        hi CursorLine ctermbg=LightGray ctermfg=Black guibg=#dfdfdf gui=none
+    endif
+    if s:moria_monochrome == 1
+        hi FoldColumn ctermbg=bg guibg=bg guifg=#7a7a7a gui=none
+        hi Folded guibg=#cfcfcf guifg=#404040 gui=bold
+        hi LineNr guifg=#7a7a7a gui=none
+        hi MoreMsg guibg=bg guifg=#505050 gui=bold
+        hi NonText ctermfg=DarkGray guibg=bg guifg=#7a7a7a gui=bold
+        hi Pmenu guibg=#9a9a9a guifg=#000000 gui=none
+        hi PmenuSbar guibg=#808080 guifg=fg gui=none
+        hi PmenuThumb guibg=#c0c0c0 guifg=fg gui=none
+        hi SignColumn ctermbg=bg guibg=bg guifg=#7a7a7a gui=none
+        hi StatusLine ctermbg=Black ctermfg=White guibg=#a0a0a0 guifg=fg gui=bold
+        hi StatusLineNC ctermbg=LightGray ctermfg=Black guibg=#b0b0b0 guifg=fg gui=none
+        hi TabLine guibg=#cdcdcd guifg=fg gui=underline
+        hi TabLineFill guibg=#cdcdcd guifg=fg gui=underline
+        hi VertSplit ctermbg=LightGray ctermfg=Black guibg=#b0b0b0 guifg=fg gui=none
+    else
+        hi FoldColumn ctermbg=bg guibg=bg guifg=#375288 gui=none
+        hi Folded guibg=#cfcfcf guifg=#25365a gui=bold
+        hi LineNr guifg=#375288 gui=none
+        hi MoreMsg guibg=bg guifg=#2f4471 gui=bold
+        hi NonText ctermfg=DarkGray guibg=bg guifg=#375288 gui=bold
+        hi Pmenu guibg=#708bc5 guifg=#000000 gui=none
+        hi PmenuSbar guibg=#4a6db5 guifg=fg gui=none
+        hi PmenuThumb guibg=#a6b7db guifg=fg gui=none
+        hi SignColumn ctermbg=bg guibg=bg guifg=#375288 gui=none
+        hi StatusLine ctermbg=Black ctermfg=White guibg=#8fa5d1 guifg=fg gui=bold
+        hi StatusLineNC ctermbg=LightGray ctermfg=Black guibg=#a6b7db guifg=fg gui=none
+        hi TabLine guibg=#b8c6e2 guifg=fg gui=underline
+        hi TabLineFill guibg=#b8c6e2 guifg=fg gui=underline
+        hi VertSplit ctermbg=LightGray ctermfg=Black guibg=#a6b7db guifg=fg gui=none
+    endif
+    hi Cursor guibg=#883400 guifg=bg gui=none
+    hi DiffAdd guibg=#008b00 guifg=#ffffff gui=none
+    hi DiffChange guibg=#00008b guifg=#ffffff gui=none
+    hi DiffDelete guibg=#8b0000 guifg=#ffffff gui=none
+    hi DiffText guibg=#0000cd guifg=#ffffff gui=bold
+    hi Directory guibg=bg guifg=#0000f0 gui=none
+    hi ErrorMsg guibg=#ee2c2c guifg=#ffffff gui=bold
+    hi IncSearch guibg=#ffcd78 gui=none
+    hi ModeMsg ctermbg=White ctermfg=Black guibg=bg guifg=fg gui=bold
+    hi PmenuSel guibg=#ffff00 guifg=#000000 gui=none
+    hi Question guibg=bg guifg=#813f11 gui=bold
+    hi Search guibg=#a0f0a0 gui=none
+    hi SpecialKey guibg=bg guifg=#912f11 gui=none
+    if has("spell")
+        hi SpellBad guisp=#ee2c2c gui=undercurl
+        hi SpellCap guisp=#2c2cee gui=undercurl
+        hi SpellLocal guisp=#008b8b gui=undercurl
+        hi SpellRare guisp=#ee2cee gui=undercurl
+    endif
+    hi TabLineSel guibg=bg guifg=fg gui=bold
+    hi Title guifg=fg gui=bold
+    if version >= 700
+        hi Visual ctermbg=LightGray ctermfg=Black guibg=#c4c4c4 gui=none
+    else
+        hi Visual ctermbg=LightGray ctermfg=Black guibg=#c4c4c4 guifg=fg gui=none
+    endif    
+    hi VisualNOS ctermbg=DarkGray ctermfg=Black guibg=bg guifg=#a0a0a0 gui=bold,underline
+    hi WarningMsg guibg=bg guifg=#ee2c2c gui=bold
+    hi WildMenu guibg=#ffff00 guifg=fg gui=bold
+
+    hi Comment guibg=bg guifg=#786000 gui=none
+    hi Constant guibg=bg guifg=#077807 gui=none
+    hi Error guibg=bg guifg=#ee2c2c gui=none
+    hi Identifier guibg=bg guifg=#007080 gui=none
+    hi Ignore guibg=bg guifg=bg gui=none
+    hi lCursor guibg=#008000 guifg=#ffffff gui=none
+    hi MatchParen guibg=#00ffff gui=none
+    hi PreProc guibg=bg guifg=#800090 gui=none
+    hi Special guibg=bg guifg=#912f11 gui=none
+    hi Statement guibg=bg guifg=#1f3f81 gui=bold
+    hi Todo guibg=#ffff00 guifg=fg gui=none
+    hi Type guibg=bg guifg=#912f11 gui=bold
+    hi Underlined ctermbg=White ctermfg=Black guibg=bg guifg=#0000cd gui=underline
+
+    hi htmlBold ctermbg=White ctermfg=Black guibg=bg guifg=fg gui=bold
+    hi htmlBoldItalic ctermbg=White ctermfg=Black guibg=bg guifg=fg gui=bold,italic
+    hi htmlBoldUnderline ctermbg=White ctermfg=Black guibg=bg guifg=fg gui=bold,underline
+    hi htmlBoldUnderlineItalic ctermbg=White ctermfg=Black guibg=bg guifg=fg gui=bold,underline,italic
+    hi htmlItalic ctermbg=White ctermfg=Black guibg=bg guifg=fg gui=italic
+    hi htmlUnderline ctermbg=White ctermfg=Black guibg=bg guifg=fg gui=underline
+    hi htmlUnderlineItalic ctermbg=White ctermfg=Black guibg=bg guifg=fg gui=underline,italic
+endif
+
+hi! default link bbcodeBold htmlBold
+hi! default link bbcodeBoldItalic htmlBoldItalic
+hi! default link bbcodeBoldItalicUnderline htmlBoldUnderlineItalic
+hi! default link bbcodeBoldUnderline htmlBoldUnderline
+hi! default link bbcodeItalic htmlItalic
+hi! default link bbcodeItalicUnderline htmlUnderlineItalic
+hi! default link bbcodeUnderline htmlUnderline

vimfiles/colors/ps_color.vim

+" Vim colour file --- PSC
+" Maintainer:	Pan, Shi Zhu <Go to the following URL for my email>
+" URL:		http://vim.sourceforge.net/scripts/script.php?script_id=760
+" Last Change:	23 Oct 2006
+" Version:	3.00
+"
+"	Please prepend [VIM] in the title when writing e-mail to me, or it will
+"	be automatically treated as spam and removed. 
+"
+"	See the help document for all details, the help document will be
+"	installed after the script has been sourced once, do not open the
+"	script when you source it for the first time.
+"
+
+" Initializations: {{{1
+"
+
+" without user_commands, all these are not possible
+if !has("user_commands")
+  finish
+end
+
+" Init the option to the default value if not defined by user.
+function! s:init_option(var, value)
+  if !exists("g:psc_".a:var)
+    execute "let s:".a:var." = ".a:value
+  else
+    let s:{a:var} = g:psc_{a:var}
+  endif
+endfunction
+command! -nargs=+ InitOpt call s:init_option(<f-args>)
+
+" give highlight setting to multiple highlight groups, maximum 20
+function! s:multi_hi(setting, ...)
+  let l:idx = a:0
+  while l:idx > 0
+    let l:hlgroup = a:{l:idx}
+    execute "highlight ".l:hlgroup." ".a:setting
+    let l:idx = l:idx - 1
+  endwhile
+endfunction
+command! -nargs=+ MultiHi call s:multi_hi(<f-args>)
+
+InitOpt style 'cool'
+InitOpt cterm_transparent 0
+InitOpt inversed_todo 0
+InitOpt use_default_for_cterm 0
+InitOpt statement_different_from_type 0
+
+if !has("gui_running")
+  call s:init_option("cterm_style", "'".s:style."'")
+
+  if s:use_default_for_cterm==1 | let s:cterm_style = 'default'
+  elseif s:use_default_for_cterm==2 | let s:cterm_style = 'defdark'
+  endif
+endif
+
+
+InitOpt other_style 0
+
+" WJMc had changed a version of this, however, it will messed up some features
+" when the psc_style being other values than 'warm' and 'cool'. The psc_style
+" is designed to accept any colorscheme name, such as 'desert'.  The following
+" code follows the basic principle of WJMc's code.
+if &background=='light'
+  if has("gui_running")
+    if s:style=='warm' || s:style=='default'
+      " nothing to do
+    elseif s:style=='cool'
+      let s:style = 'warm'
+    elseif s:style=='defdark'
+      let s:style = 'default'
+    else 
+      let s:other_style = 1
+    endif
+  else
+    if s:cterm_style=='cool' || s:cterm_style=='defdark' || s:cterm_style=='warm'
+      let s:cterm_style='default'
+    elseif s:cterm_style=='default'
+      " nothing to do
+    else 
+      let s:other_style = 1
+    endif
+  endif
+elseif &background=='dark'
+  if s:style=='warm' 
+    let s:style = 'cool'
+  elseif s:style=='default'
+    let s:style = 'defdark'
+  elseif s:style=='cool' || s:style=='defdark'
+    " nothing to do
+  else 
+    let s:other_style = 1
+  endif
+  let s:cterm_style = s:style
+else
+  echo "unrecognized background=" &background ", ps_color halt.\n"
+  finish
+endif
+
+" This should be after the style mangling
+if s:style == 'warm'
+  InitOpt fontface 'mixed'
+else
+  InitOpt fontface 'plain'
+endif
+
+
+" === Traditional Color Scheme script starts here. ===
+highlight clear
+
+if exists("syntax_on")
+  syntax reset
+endif
+
+let s:color_name = expand("<sfile>:t:r")
+
+if s:other_style==0 
+  let g:colors_name = s:color_name
+  " Go from console version to gui, the color scheme should be sourced again
+  execute "autocmd TermChanged * if g:colors_name == '".s:color_name."' | "
+	\."colo ".s:color_name." | endif"
+else
+  execute "runtime colors/".s:style.".vim"
+endif
+
+" Command to go different schemes easier.
+" This is a multi-purpose command, might be a poor design.
+" WJMc had a change for this, but the 'reloaded' style and other colorscheme
+" cannot be launched that way.
+execute "command! -nargs=1 Colo if '".s:color_name."'!=\"<args>\" |".
+	\'let g:psc_style = "<args>"| endif |'.
+	\'if g:psc_style=="warm" | set background=light | endif |'.
+	\'if g:psc_style=="cool" | set background=dark | endif |'.
+	\'colo '.s:color_name
+
+" Give control to 'reloaded' scheme if possible
+if s:style == 'reloaded'
+  finish
+endif
+
+" }}}1
+
+" Relevant Help: 
+" :h highlight-groups
+" :h psc-cterm-color-table
+" :ru syntax/hitest.vim
+"
+" Hard coded Colors Comment:
+" #aabbcc = Red aa, Green bb, Blue cc
+" we must use hard-coded colours to get more 'tender' colours
+"
+
+
+" GUI:
+"
+" I don't want to abuse folding, but here folding is used to avoid confusion. 
+if s:style=='warm' 
+  " Warm style for gui here {{{2
+  " LIGHT COLOR DEFINE START
+
+  highlight Normal		guifg=#000000	guibg=#e0e0e0
+  highlight Search		guifg=NONE	guibg=#f8f8f8
+  highlight Visual		guifg=NONE	guibg=#a6caf0
+  highlight Cursor		guifg=#f0f0f0	guibg=#008000
+  " The idea of CursorIM is pretty good, however, the feature is still buggy
+  " in the current version (Vim 7.0). 
+  " The following line will be kept commented until the bug fixed.
+  "
+  " highlight CursorIM		guifg=#f0f0f0	guibg=#800080
+  highlight Special		guifg=#907000	guibg=NONE
+  highlight Comment		guifg=#606000	guibg=NONE
+  highlight Number		guifg=#907000	guibg=NONE
+  highlight Constant		guifg=#007068	guibg=NONE
+  highlight StatusLine		guifg=fg	guibg=#a6caf0
+  highlight LineNr		guifg=#686868	guibg=NONE
+  highlight Question		guifg=fg	guibg=#d0d090
+  highlight PreProc		guifg=#009030	guibg=NONE
+  if s:statement_different_from_type==1
+    highlight Statement		guifg=#4020a0	guibg=NONE
+  else
+    highlight Statement		guifg=#2060a8	guibg=NONE
+  endif
+  highlight Type		guifg=#0850a0	guibg=NONE
+  if s:inversed_todo==1
+    highlight Todo		guifg=#e0e090	guibg=#000080
+  else
+    highlight Todo		guifg=#800000	guibg=#e0e090
+  endif
+  " NOTE THIS IS IN THE WARM SECTION
+  highlight Error		guifg=#c03000	guibg=NONE
+  highlight Identifier		guifg=#a030a0	guibg=NONE
+  highlight ModeMsg		guifg=fg	guibg=#b0b0e0
+  highlight VisualNOS		guifg=fg	guibg=#b0b0e0
+  highlight SpecialKey		guifg=#1050a0	guibg=NONE
+  highlight NonText		guifg=#002090	guibg=#d0d0d0
+  highlight Directory		guifg=#a030a0	guibg=NONE
+  highlight ErrorMsg		guifg=fg	guibg=#f0b090
+  highlight MoreMsg		guifg=#489000	guibg=NONE
+  highlight Title		guifg=#a030a0	guibg=NONE
+  highlight WarningMsg		guifg=#b02000	guibg=NONE
+  highlight WildMenu		guifg=fg	guibg=#d0d090
+  highlight Folded		guifg=NONE	guibg=#b0e0b0
+  highlight FoldColumn		guifg=fg	guibg=#90e090
+  highlight DiffAdd		guifg=NONE	guibg=#b0b0e0
+  highlight DiffChange		guifg=NONE	guibg=#e0b0e0
+  highlight DiffDelete		guifg=#002090	guibg=#d0d0d0
+  highlight DiffText		guifg=NONE	guibg=#c0e080
+  highlight SignColumn		guifg=fg	guibg=#90e090
+  highlight IncSearch		guifg=#f0f0f0	guibg=#806060
+  highlight StatusLineNC	guifg=fg	guibg=#c0c0c0
+  highlight VertSplit		guifg=fg	guibg=#c0c0c0
+  highlight Underlined		guifg=#6a5acd	guibg=NONE	gui=underline
+  highlight Ignore		guifg=bg	guibg=NONE
+  " NOTE THIS IS IN THE WARM SECTION
+  if v:version >= 700
+    if has('spell')
+      highlight SpellBad	guifg=NONE	guibg=NONE	guisp=#c03000
+      highlight SpellCap	guifg=NONE	guibg=NONE	guisp=#2060a8
+      highlight SpellRare	guifg=NONE	guibg=NONE	guisp=#a030a0
+      highlight SpellLocal	guifg=NONE	guibg=NONE	guisp=#007068
+    endif
+    highlight Pmenu		guifg=fg	guibg=#e0b0e0
+    highlight PmenuSel		guifg=#f0f0f0	guibg=#806060
+    highlight PmenuSbar		guifg=fg	guibg=#c0c0c0
+    highlight PmenuThumb	guifg=fg	guibg=#c0e080
+    highlight TabLine		guifg=fg	guibg=#c0c0c0	gui=underline
+    highlight TabLineFill	guifg=fg	guibg=#c0c0c0	gui=underline
+    highlight TabLineSel	guifg=fg	guibg=NONE
+    highlight CursorColumn	guifg=NONE	guibg=#f0b090
+    highlight CursorLine	guifg=NONE	guibg=NONE	gui=underline
+    highlight MatchParen	guifg=NONE	guibg=#c0e080
+  endif
+
+  " LIGHT COLOR DEFINE END
+  " }}}2
+elseif s:style=='cool' 
+  " Cool style for gui here {{{2
+  " DARK COLOR DEFINE START
+
+  highlight Normal		guifg=#d0d0d0	guibg=#202020
+  highlight Comment		guifg=#d0d090	guibg=NONE
+  highlight Constant		guifg=#80c0e0	guibg=NONE
+  highlight Number		guifg=#e0c060	guibg=NONE
+  highlight Identifier		guifg=#f0c0f0	guibg=NONE
+  if s:statement_different_from_type==1
+    highlight Statement		guifg=#98a8f0	guibg=NONE
+  else
+    highlight Statement		guifg=#c0d8f8	guibg=NONE
+  endif
+  highlight PreProc		guifg=#60f080	guibg=NONE
+  highlight Type		guifg=#b0d0f0	guibg=NONE
+  highlight Special		guifg=#e0c060	guibg=NONE
+  highlight Error		guifg=#f08060	guibg=NONE
+  if s:inversed_todo==1
+    highlight Todo		guifg=#d0d090	guibg=#000080
+  else
+    highlight Todo		guifg=#800000	guibg=#d0d090
+  endif
+  highlight Search		guifg=NONE	guibg=#800000
+  highlight Visual		guifg=#000000	guibg=#a6caf0
+  highlight Cursor		guifg=#000000	guibg=#00f000
+  " NOTE THIS IS IN THE COOL SECTION
+  " highlight CursorIM		guifg=#000000	guibg=#f000f0
+  highlight StatusLine		guifg=#000000	guibg=#a6caf0
+  highlight LineNr		guifg=#b0b0b0	guibg=NONE
+  highlight Question		guifg=#000000	guibg=#d0d090
+  highlight ModeMsg		guifg=fg	guibg=#000080
+  highlight VisualNOS		guifg=fg	guibg=#000080
+  highlight SpecialKey		guifg=#b0d0f0	guibg=NONE
+  highlight NonText		guifg=#6080f0	guibg=#101010
+  highlight Directory		guifg=#80c0e0	guibg=NONE
+  highlight ErrorMsg		guifg=#d0d090	guibg=#800000
+  highlight MoreMsg		guifg=#c0e080	guibg=NONE
+  highlight Title		guifg=#f0c0f0	guibg=NONE
+  highlight WarningMsg		guifg=#f08060	guibg=NONE
+  highlight WildMenu		guifg=#000000	guibg=#d0d090
+  highlight Folded		guifg=NONE	guibg=#004000
+  highlight FoldColumn		guifg=#e0e0e0	guibg=#008000
+  highlight DiffAdd		guifg=NONE	guibg=#000080
+  highlight DiffChange		guifg=NONE	guibg=#800080
+  highlight DiffDelete		guifg=#6080f0	guibg=#202020
+  highlight DiffText		guifg=#000000	guibg=#c0e080
+  highlight SignColumn		guifg=#e0e0e0	guibg=#008000
+  highlight IncSearch		guifg=#000000	guibg=#d0d0d0
+  highlight StatusLineNC	guifg=#000000	guibg=#c0c0c0
+  highlight VertSplit		guifg=#000000	guibg=#c0c0c0
+  highlight Underlined		guifg=#80a0ff	guibg=NONE	gui=underline 
+  highlight Ignore		guifg=#000000	guibg=NONE
+  " NOTE THIS IS IN THE COOL SECTION
+  if v:version >= 700
+    if has('spell')
+      highlight SpellBad	guifg=NONE	guibg=NONE	guisp=#f08060
+      highlight SpellCap	guifg=NONE	guibg=NONE	guisp=#6080f0
+      highlight SpellRare	guifg=NONE	guibg=NONE	guisp=#f0c0f0
+      highlight SpellLocal	guifg=NONE	guibg=NONE	guisp=#c0d8f8
+    endif
+    highlight Pmenu		guifg=fg	guibg=#800080
+    highlight PmenuSel		guifg=#000000	guibg=#d0d0d0
+    highlight PmenuSbar		guifg=fg	guibg=#000080
+    highlight PmenuThumb	guifg=fg	guibg=#008000
+    highlight TabLine		guifg=fg	guibg=#008000	gui=underline
+    highlight TabLineFill	guifg=fg	guibg=#008000	gui=underline
+    highlight TabLineSel	guifg=fg	guibg=NONE
+    highlight CursorColumn	guifg=NONE	guibg=#800000
+    highlight CursorLine	guifg=NONE	guibg=NONE	gui=underline
+    highlight MatchParen	guifg=NONE	guibg=#800080
+  endif
+
+  " DARK COLOR DEFINE END
+  " }}}2
+elseif s:style=='defdark'
+  highlight Normal		guifg=#f0f0f0	guibg=#000000
+endif
+
+" Take NT gui for example, If you want to use a console font such as
+" Lucida_Console with font size larger than 14, the font looks already thick,
+" and the bold font for that will be too thick, you may not want it be bold.
+" The following code does this.
+"
+" All of the bold font may be disabled, since continuously switching between
+" bold and plain font hurts consistency and will inevitably fatigue your eye!
+
+" Maximum 20 parameters for vim script function
+"
+MultiHi gui=NONE ModeMsg Search Cursor Special Comment Constant Number LineNr Question PreProc Statement Type Todo Error Identifier Normal
+
+MultiHi gui=NONE VisualNOS SpecialKey NonText Directory ErrorMsg MoreMsg Title WarningMsg WildMenu Folded FoldColumn DiffAdd DiffChange DiffDelete DiffText SignColumn
+
+" Vim 7 added stuffs
+if v:version >= 700
+  MultiHi gui=NONE Ignore PmenuSel PmenuSel PmenuSbar PmenuThumb TabLine TabLineFill TabLineSel
+
+  " the gui=undercurl guisp could only support in Vim 7
+  if has('spell')
+    MultiHi gui=undercurl SpellBad SpellCap SpellRare SpellLocal
+  endif
+  if s:style=="cool" || s:style=="warm"
+    MultiHi gui=underline TabLine TabLineFill Underlined CursorLine
+  else
+    MultiHi gui=underline TabLine Underlined
+  endif
+endif
+
+" For reversed stuffs
+MultiHi gui=NONE IncSearch StatusLine StatusLineNC VertSplit Visual
+
+if s:style=="cool" || s:style=="warm"
+  if s:fontface=="mixed"
+    MultiHi gui=bold IncSearch StatusLine StatusLineNC VertSplit Visual
+  endif
+else
+  if s:fontface=="mixed"
+    hi StatusLine gui=bold,reverse
+  else
+    hi StatusLine gui=reverse
+  endif
+  MultiHi gui=reverse IncSearch StatusLineNC VertSplit Visual
+endif
+
+" Enable the bold style
+if s:fontface=="mixed"
+  MultiHi gui=bold Question DiffText Statement Type MoreMsg ModeMsg NonText Title VisualNOS DiffDelete TabLineSel
+endif
+
+
+
+
+" Color Term:
+
+" It's not quite possible to support 'cool' and 'warm' simultaneously, since
+" we cannot expect a terminal to have more than 16 color names. 
+"
+
+" I assume Vim will never go to cterm mode when has("gui_running") returns 1,
+" Please enlighten me if I am wrong.
+"
+if !has('gui_running')
+  " cterm settings {{{1
+  if s:cterm_style=='cool'
+
+    if s:cterm_transparent
+      highlight Normal		ctermfg=LightGrey   ctermbg=NONE
+      highlight Special		ctermfg=Yellow	    ctermbg=NONE
+      highlight Comment		ctermfg=DarkYellow  ctermbg=NONE
+      highlight Constant	ctermfg=Blue	    ctermbg=NONE
+      highlight Number		ctermfg=Yellow	    ctermbg=NONE
+      highlight LineNr		ctermfg=DarkGrey    ctermbg=NONE
+      highlight PreProc		ctermfg=Green	    ctermbg=NONE
+      highlight Statement	ctermfg=Cyan	    ctermbg=NONE
+      highlight Type		ctermfg=Cyan	    ctermbg=NONE
+      highlight Error		ctermfg=Red	    ctermbg=NONE
+      highlight Identifier	ctermfg=Magenta     ctermbg=NONE
+      highlight SpecialKey	ctermfg=Cyan	    ctermbg=NONE
+      highlight NonText		ctermfg=Blue	    ctermbg=NONE
+      highlight Directory	ctermfg=Blue	    ctermbg=NONE
+      highlight MoreMsg		ctermfg=Green	    ctermbg=NONE
+      highlight Title		ctermfg=Magenta     ctermbg=NONE
+      highlight WarningMsg	ctermfg=Red	    ctermbg=NONE
+      highlight DiffDelete	ctermfg=Blue	    ctermbg=NONE
+    else
+      highlight Normal		ctermfg=LightGrey   ctermbg=Black
+      highlight Special		ctermfg=Yellow	    ctermbg=bg
+      highlight Comment		ctermfg=DarkYellow  ctermbg=bg
+      highlight Constant	ctermfg=Blue	    ctermbg=bg
+      highlight Number		ctermfg=Yellow	    ctermbg=bg
+      highlight LineNr		ctermfg=DarkGrey    ctermbg=bg
+      highlight PreProc		ctermfg=Green	    ctermbg=bg
+      highlight Statement	ctermfg=Cyan	    ctermbg=bg
+      highlight Type		ctermfg=Cyan	    ctermbg=bg
+      highlight Error		ctermfg=Red	    ctermbg=bg
+      highlight Identifier	ctermfg=Magenta     ctermbg=bg
+      highlight SpecialKey	ctermfg=Cyan	    ctermbg=bg
+      highlight NonText		ctermfg=Blue	    ctermbg=bg
+      highlight Directory	ctermfg=Blue	    ctermbg=bg
+      highlight MoreMsg		ctermfg=Green	    ctermbg=bg
+      highlight Title		ctermfg=Magenta     ctermbg=bg
+      highlight WarningMsg	ctermfg=Red	    ctermbg=bg
+      highlight DiffDelete	ctermfg=Blue	    ctermbg=bg
+    endif
+    highlight Search	 ctermfg=NONE	    ctermbg=DarkRed
+    highlight Visual	 ctermfg=Black	    ctermbg=DarkCyan
+    highlight Cursor	 ctermfg=Black	    ctermbg=Green
+    highlight StatusLine ctermfg=Black	    ctermbg=DarkCyan
+    highlight Question	 ctermfg=Black	    ctermbg=DarkYellow
+    if s:inversed_todo==0
+        highlight Todo	 ctermfg=DarkRed    ctermbg=DarkYellow
+    else
+        highlight Todo	 ctermfg=DarkYellow ctermbg=DarkBlue
+    endif
+    highlight Folded	 ctermfg=White	    ctermbg=DarkGreen
+    highlight ModeMsg	 ctermfg=Grey	    ctermbg=DarkBlue
+    highlight VisualNOS	 ctermfg=Grey	    ctermbg=DarkBlue
+    highlight ErrorMsg	 ctermfg=DarkYellow ctermbg=DarkRed
+    highlight WildMenu	 ctermfg=Black	    ctermbg=DarkYellow
+    highlight FoldColumn ctermfg=White	    ctermbg=DarkGreen
+    highlight SignColumn ctermfg=White	    ctermbg=DarkGreen
+    highlight DiffText	 ctermfg=Black	    ctermbg=DarkYellow
+
+    if v:version >= 700
+      if has('spell')
+        highlight SpellBad	ctermfg=NONE	ctermbg=DarkRed
+        highlight SpellCap	ctermfg=NONE	ctermbg=DarkBlue
+        highlight SpellRare	ctermfg=NONE	ctermbg=DarkMagenta
+        highlight SpellLocal	ctermfg=NONE	ctermbg=DarkGreen
+      endif
+      highlight Pmenu		ctermfg=fg	ctermbg=DarkMagenta
+      highlight PmenuSel	ctermfg=Black	ctermbg=fg
+      highlight PmenuSbar	ctermfg=fg	ctermbg=DarkBlue
+      highlight PmenuThumb	ctermfg=fg	ctermbg=DarkGreen
+      highlight TabLine		ctermfg=fg	ctermbg=DarkGreen	cterm=underline
+      highlight TabLineFill	ctermfg=fg	ctermbg=DarkGreen	cterm=underline
+      highlight CursorColumn	ctermfg=NONE	ctermbg=DarkRed
+      if s:cterm_transparent
+        highlight TabLineSel	ctermfg=fg	ctermbg=NONE
+        highlight CursorLine	ctermfg=NONE	ctermbg=NONE	cterm=underline
+      else
+        highlight TabLineSel	ctermfg=fg	ctermbg=bg
+        highlight CursorLine	ctermfg=NONE	ctermbg=bg	cterm=underline
+      endif
+      highlight MatchParen	ctermfg=NONE	ctermbg=DarkMagenta
+    endif
+    if &t_Co==8
+      " 8 colour terminal support, this assumes 16 colour is available through
+      " setting the 'bold' attribute, will get bright foreground colour.
+      " However, the bright background color is not available for 8-color terms.
+      "
+      " You can manually set t_Co=16 in your .vimrc to see if your terminal
+      " supports 16 colours, 
+      MultiHi cterm=none DiffText Visual Cursor Comment Todo StatusLine Question DiffChange ModeMsg VisualNOS ErrorMsg WildMenu DiffAdd Folded DiffDelete Normal PmenuThumb
+      MultiHi cterm=bold Search Special Constant Number LineNr PreProc Statement Type Error Identifier SpecialKey NonText MoreMsg Title WarningMsg FoldColumn SignColumn Directory DiffDelete
+
+    else
+      " Background > 7 is only available with 16 or more colors
+
+      " Only use the s:fontface option when there is 16-colour(or more)
+      " terminal support
+
+      MultiHi cterm=none WarningMsg Search Visual Cursor Special Comment Constant Number LineNr PreProc Todo Error Identifier Folded SpecialKey Directory ErrorMsg Normal PmenuThumb
+      MultiHi cterm=none WildMenu FoldColumn SignColumn DiffAdd DiffChange Question StatusLine DiffText
+      MultiHi cterm=reverse IncSearch StatusLineNC VertSplit
+
+      " Well, well, bold font with color 0-7 is not possible.
+      " So, the Question, StatusLine, DiffText cannot act as expected.
+
+      call s:multi_hi("cterm=".((s:fontface=="plain") ? "none" : "bold"), "Statement", "Type", "MoreMsg", "ModeMsg", "NonText", "Title", "VisualNOS", "DiffDelete", "TabLineSel")
+
+    endif
+
+  elseif s:cterm_style=='defdark'
+    highlight Normal	 ctermfg=LightGrey  ctermbg=NONE
+  endif
+  " }}}1
+endif
+
+
+" Term:
+" For console with only 4 colours (term, not cterm), we'll use the default.
+" ...
+" The default colorscheme is good enough for terms with no more than 4 colours
+"
+
+
+" Links:
+"
+if (s:style=='cool') || (s:style == 'warm')
+  " COLOR LINKS DEFINE START
+
+  highlight link		String		Constant
+  " Character must be different from strings because in many languages
+  " (especially C, C++) a 'char' variable is scalar while 'string' is pointer,
+  " mistaken a 'char' for a 'string' will cause disaster!
+  highlight link		Character	Number
+  highlight link		SpecialChar	LineNr
+  highlight link		Tag		Identifier
+  " The following are not standard hi links, 
+  " these are used by DrChip
+  highlight link		Warning		MoreMsg
+  highlight link		Notice		Constant
+  " these are used by Calendar
+  highlight link		CalToday	PreProc
+  " these are used by TagList
+  highlight link		MyTagListTagName	IncSearch
+  highlight link		MyTagListTagScope	Constant
+
+  " COLOR LINKS DEFINE END
+endif
+
+
+" Clean:
+" these clean stuffs are proved to have problem, so I removed them.
+delcommand InitOpt
+delcommand MultiHi
+" delfunction init_option
+" delfunction multi_hi
+
+" vim:et:nosta:sw=2:ts=8:
+" vim600:fdm=marker:fdl=1:

vimfiles/colors/twilight.vim

+
+set background=dark
+
+hi clear
+
+if exists("syntax_on")
+  syntax reset
+endif
+
+let colors_name = "twilight"
+
+let s:grey_blue = '#8a9597'
+let s:light_grey_blue = '#a0a8b0'
+let s:dark_grey_blue = '#34383c'
+let s:mid_grey_blue = '#64686c'
+let s:beige = '#ceb67f'
+let s:light_orange = '#ebc471'
+let s:yellow = '#e3d796'
+let s:violet = '#a999ac'
+let s:green = '#a2a96f'
+let s:lightgreen = '#c2c98f'
+let s:red = '#d08356'
+let s:cyan = '#74dad9'
+let s:darkgrey = '#1a1a1a'
+let s:grey = '#303030'
+let s:lightgrey = '#605958'
+let s:white = '#fffedc'
+
+if version >= 700
+  hi CursorLine guibg=#262626
+  hi CursorColumn guibg=#262626
+  hi MatchParen guifg=white guibg=#80a090 gui=bold
+
+  "Tabpages
+  hi TabLine guifg=#a09998 guibg=#202020 gui=underline
+  hi TabLineFill guifg=#a09998 guibg=#202020 gui=underline
+  hi TabLineSel guifg=#a09998 guibg=#404850 gui=underline
+
+  "P-Menu (auto-completion)
+  hi Pmenu guifg=#605958 guibg=#303030 gui=underline
+  hi PmenuSel guifg=#a09998 guibg=#404040 gui=underline
+  "PmenuSbar
+  "PmenuThumb
+endif
+
+hi Visual guibg=#404040
+
+"hi Cursor guifg=NONE guibg=#586068
+hi Cursor guibg=#b0d0f0
+
+
+exe 'hi Normal         guifg='.s:white             .' guibg='.s:darkgrey
+exe 'hi Underlined     guifg='.s:white             .' guibg='.s:darkgrey        .' gui=underline'
+exe 'hi NonText        guifg='.s:lightgrey         .' guibg='.s:grey
+exe 'hi SpecialKey     guifg='.s:grey              .' guibg='.s:darkgrey
+
+exe 'hi LineNr         guifg='.s:mid_grey_blue     .' guibg='.s:dark_grey_blue  .' gui=none'
+exe 'hi StatusLine     guifg='.s:white             .' guibg='.s:grey            .' gui=italic,underline'
+exe 'hi StatusLineNC   guifg='.s:lightgrey         .' guibg='.s:grey            .' gui=italic,underline'
+exe 'hi VertSplit      guifg='.s:grey              .' guibg='.s:grey            .' gui=none'
+
+exe 'hi Folded         guifg='.s:grey_blue         .' guibg='.s:dark_grey_blue  .' gui=none'
+exe 'hi FoldColumn     guifg='.s:grey_blue         .' guibg='.s:dark_grey_blue  .' gui=none'
+exe 'hi SignColumn     guifg='.s:grey_blue         .' guibg='.s:dark_grey_blue  .' gui=none'
+
+exe 'hi Comment        guifg='.s:mid_grey_blue     .' guibg='.s:darkgrey        .' gui=italic'
+exe 'hi TODO           guifg='.s:grey_blue         .' guibg='.s:darkgrey        .' gui=italic,bold'
+
+exe 'hi Title          guifg='.s:red               .' guibg='.s:darkgrey        .' gui=underline'
+
+exe 'hi Constant       guifg='.s:red               .' guibg='.s:darkgrey        .' gui=none'
+exe 'hi String         guifg='.s:green             .' guibg='.s:darkgrey        .' gui=none'
+exe 'hi Special        guifg='.s:lightgreen        .' guibg='.s:darkgrey        .' gui=none'
+
+exe 'hi Identifier     guifg='.s:grey_blue         .' guibg='.s:darkgrey        .' gui=none'
+exe 'hi Statement      guifg='.s:beige             .' guibg='.s:darkgrey        .' gui=none'
+exe 'hi Conditional    guifg='.s:beige             .' guibg='.s:darkgrey        .' gui=none'
+exe 'hi Repeat         guifg='.s:beige             .' guibg='.s:darkgrey        .' gui=none'
+exe 'hi Structure      guifg='.s:beige             .' guibg='.s:darkgrey        .' gui=none'
+exe 'hi Function       guifg='.s:violet            .' guibg='.s:darkgrey        .' gui=none'
+
+exe 'hi PreProc        guifg='.s:grey_blue         .' guibg='.s:darkgrey        .' gui=none'
+exe 'hi Operator       guifg='.s:light_orange      .' guibg='.s:darkgrey        .' gui=none'
+exe 'hi Type           guifg='.s:yellow            .' guibg='.s:darkgrey        .' gui=italic'
+
+"hi Identifier guifg=#7587a6
+" Type d: 'class'
+"hi Structure guifg=#9B859D gui=underline
+"hi Function guifg=#dad085
+" dylan: method, library, ... d: if, return, ...
+"hi Statement guifg=#7187a1 gui=NONE
+" Keywords  d: import, module...
+"hi PreProc guifg=#8fbfdc
+"gui=underline
+"hi Operator guifg=#a07020
+"hi Repeat guifg=#906040 gui=underline
+"hi Type guifg=#708090
+
+"hi Type guifg=#f9ee98 gui=NONE
+
+"hi NonText guifg=#808080 guibg=#303030
+
+"hi Macro guifg=#a0b0c0 gui=underline
+
+"Tabs, trailing spaces, etc (lcs)
+"hi SpecialKey guifg=#808080 guibg=#343434
+
+"hi TooLong guibg=#ff0000 guifg=#f8f8f8
+
+hi Search guifg=#606000 guibg=#c0c000 gui=bold
+
+hi Directory guifg=#dad085 gui=NONE
+hi Error guibg=#602020
+

vimfiles/compiler/devenv.vim

+" Vim compiler file
+" Compiler:	DevEnv
+
+if exists("current_compiler")
+  finish
+endif
+let current_compiler = "devenv"
+
+if exists(":CompilerSet") != 2		" older Vim always used :setlocal
+  command -nargs=* CompilerSet setlocal <args>
+endif
+
+" default errorformat
+CompilerSet errorformat=\ %#%f(%l\\\,%c):\ %m
+
+" default make
+CompilerSet makeprg=build.bat

vimfiles/doc/NERD_commenter.txt

+*NERD_commenter.txt*         Plugin for commenting code
+
+
+                        NERD COMMENTER REFERENCE MANUAL~
+
+
+
+
+
+==============================================================================
+CONTENTS                                               *NERDCommenterContents*
+
+    1.Intro...................................|NERDCommenter|
+    2.Functionality provided..................|NERDComFunctionality|
+        2.1 Functionality Summary.............|NERDComFunctionalitySummary|
+        2.2 Functionality Details.............|NERDComFunctionalityDetails|
+            2.2.1 Comment map.................|NERDComComment|
+            2.2.2 Nested comment map..........|NERDComNestedComment|
+            2.2.3 Toggle comment map..........|NERDComToggleComment|
+            2.2.4 Minimal comment map.........|NERDComMinimalComment|
+            2.2.5 Invert comment map..........|NERDComInvertComment|
+            2.2.6 Sexy comment map............|NERDComSexyComment|
+            2.2.7 Yank comment map............|NERDComYankComment|
+            2.2.8 Comment to EOL map..........|NERDComEOLComment|
+            2.2.9 Append com to line map......|NERDComAppendComment|
+            2.2.10 Insert comment map.........|NERDComInsertComment|
+            2.2.11 Use alternate delims map...|NERDComAltDelim|
+            2.2.12 Comment aligned maps.......|NERDComAlignedComment|
+            2.2.13 Uncomment line map.........|NERDComUncommentLine|
+        2.3 Supported filetypes...............|NERDComFiletypes|
+        2.4 Sexy Comments.....................|NERDComSexyComments|
+        2.5 The NERDComment function..........|NERDComNERDComment|
+    3.Options.................................|NERDComOptions|
+        3.1 Options summary...................|NERDComOptionsSummary|
+        3.2 Options details...................|NERDComOptionsDetails|
+        3.3 Default delimiter Options.........|NERDComDefaultDelims|
+    4. Customising key mappings...............|NERDComMappings|
+    5. Issues with the script.................|NERDComIssues|
+        5.1 Delimiter detection heuristics....|NERDComHeuristics|
+        5.2 Nesting issues....................|NERDComNesting|
+    6.The author..............................|NERDComAuthor|
+    7.Changelog...............................|NERDComChangelog|
+    8.Credits.................................|NERDComCredits|
+    9.License.................................|NERDComLicense|
+
+==============================================================================
+1. Intro                                                       *NERDCommenter*
+
+The NERD commenter provides many different commenting operations and styles
+which are invoked via key mappings and a menu. These operations are available
+for most filetypes.
+
+There are also options that allow to tweak the commenting engine to your
+taste.
+
+==============================================================================
+2. Functionality provided                               *NERDComFunctionality*
+
+------------------------------------------------------------------------------
+2.1 Functionality summary                        *NERDComFunctionalitySummary*
+
+The following key mappings are provided by default (there is also a menu
+with items corresponding to all the mappings below):
+
+[count],cc |NERDComComment|
+Comment out the current line or text selected in visual mode.
+
+
+[count],cn |NERDComNestedComment|
+Same as ,cc but forces nesting.
+
+
+[count],c<space> |NERDComToggleComment|
+Toggles the comment state of the selected line(s). If the topmost selected
+line is commented, all selected lines are uncommented and vice versa.
+
+
+[count],cm |NERDComMinimalComment|
+Comments the given lines using only one set of multipart delimiters.
+
+
+[count],ci |NERDComInvertComment|
+Toggles the comment state of the selected line(s) individually.
+
+
+[count],cs |NERDComSexyComment|
+Comments out the selected lines ``sexily''
+
+
+[count],cy |NERDComYankComment|
+Same as ,cc except that the commented line(s) are yanked first.
+
+
+,c$ |NERDComEOLComment|
+Comments the current line from the cursor to the end of line.
+
+
+,cA |NERDComAppendComment|
+Adds comment delimiters to the end of line and goes into insert mode between
+them.
+
+
+|NERDComInsertComment|
+Adds comment delimiters at the current cursor position and inserts between.
+Disabled by default.
+
+
+,ca |NERDComAltDelim|
+Switches to the alternative set of delimiters.
+
+
+[count],cl
+[count],cb    |NERDComAlignedComment|
+Same as |NERDComComment| except that the delimiters are aligned down the
+left side (,cl) or both sides (,cb).
+
+
+[count],cu |NERDComUncommentLine|
+Uncomments the selected line(s).
+
+------------------------------------------------------------------------------
+2.2 Functionality details                        *NERDComFunctionalityDetails*
+
+------------------------------------------------------------------------------
+2.2.1 Comment map                                             *NERDComComment*
+
+Default mapping: [count],cc
+Mapped to: <plug>NERDCommenterComment
+Applicable modes: normal visual visual-line visual-block.
+
+
+Comments out the current line. If multiple lines are selected in visual-line
+mode, they are all commented out.  If some text is selected in visual or
+visual-block mode then the script will try to comment out the exact text that
+is selected using multi-part delimiters if they are available.
+
+If a [count] is given in normal mode, the mapping works as though that many
+lines were selected in visual-line mode.
+
+------------------------------------------------------------------------------
+2.2.2 Nested comment map                                *NERDComNestedComment*
+
+Default mapping: [count],cn
+Mapped to: <plug>NERDCommenterNest
+Applicable modes: normal visual visual-line visual-block.
+
+Performs nested commenting.  Works the same as ,cc except that if a line is
+already commented then it will be commented again.
+
+If |'NERDUsePlaceHolders'| is set then the previous comment delimiters will
+be replaced by place-holder delimiters if needed.  Otherwise the nested
+comment will only be added if the current commenting delimiters have no right
+delimiter (to avoid syntax errors)
+
+If a [count] is given in normal mode, the mapping works as though that many
+lines were selected in visual-line mode.
+
+Related options:
+|'NERDDefaultNesting'|
+
+------------------------------------------------------------------------------
+2.2.3 Toggle comment map                                *NERDComToggleComment*
+
+Default mapping: [count],c<space>
+Mapped to: <plug>NERDCommenterToggle
+Applicable modes: normal visual-line.
+
+Toggles commenting of the lines selected. The behaviour of this mapping
+depends on whether the first line selected is commented or not.  If so, all
+selected lines are uncommented and vice versa.
+
+With this mapping, a line is only considered to be commented if it starts with
+a left delimiter.
+
+If a [count] is given in normal mode, the mapping works as though that many
+lines were selected in visual-line mode.
+
+------------------------------------------------------------------------------
+2.2.4 Minimal comment map                              *NERDComMinimalComment*
+
+Default mapping: [count],cm
+Mapped to: <plug>NERDCommenterMinimal
+Applicable modes: normal visual-line.
+
+Comments the selected lines using one set of multipart delimiters if possible.
+
+For example: if you are programming in c and you select 5 lines and press ,cm
+then a '/*' will be placed at the start of the top line and a '*/' will be
+placed at the end of the last line.
+
+Sets of multipart comment delimiters that are between the top and bottom
+selected lines are replaced with place holders (see |'NERDLPlace'|) if
+|'NERDUsePlaceHolders'| is set for the current filetype. If it is not, then
+the comment will be aborted if place holders are required to prevent illegal
+syntax.
+
+If a [count] is given in normal mode, the mapping works as though that many
+lines were selected in visual-line mode.
+
+------------------------------------------------------------------------------
+2.2.5 Invert comment map                                *NERDComInvertComment*
+
+Default mapping: ,ci
+Mapped to: <plug>NERDCommenterInvert
+Applicable modes: normal visual-line.
+
+Inverts the commented state of each selected line. If the a selected line is
+commented then it is uncommented and vice versa. Each line is examined and
+commented/uncommented individually.
+
+With this mapping, a line is only considered to be commented if it starts with
+a left delimiter.
+
+If a [count] is given in normal mode, the mapping works as though that many
+lines were selected in visual-line mode.
+
+------------------------------------------------------------------------------
+2.2.6 Sexy comment map                                    *NERDComSexyComment*
+
+Default mapping: [count],cs
+Mapped to: <plug>NERDCommenterSexy
+Applicable modes: normal, visual-line.
+
+Comments the selected line(s) ``sexily''... see |NERDComSexyComments| for
+a description of what sexy comments are. Can only be done on filetypes for
+which there is at least one set of multipart comment delimiters specified.
+
+Sexy comments cannot be nested and lines inside a sexy comment cannot be
+commented again.
+
+If a [count] is given in normal mode, the mapping works as though that many
+lines were selected in visual-line mode.
+
+Related options:
+|'NERDCompactSexyComs'|
+
+------------------------------------------------------------------------------
+2.2.7 Yank comment map                                    *NERDComYankComment*
+
+Default mapping: [count],cy
+Mapped to: <plug>NERDCommenterYank
+Applicable modes: normal visual visual-line visual-block.
+
+Same as ,cc except that it yanks the line(s) that are commented first.
+
+------------------------------------------------------------------------------
+2.2.8 Comment to EOL map                                   *NERDComEOLComment*
+
+Default mapping: ,c$
+Mapped to: <plug>NERDCommenterToEOL
+Applicable modes: normal.
+
+Comments the current line from the current cursor position up to the end of
+the line.
+
+------------------------------------------------------------------------------
+2.2.9 Append com to line map                            *NERDComAppendComment*
+
+Default mapping: ,cA
+Mapped to: <plug>NERDCommenterAppend
+Applicable modes: normal.
+
+Appends comment delimiters to the end of the current line and goes
+to insert mode between the new delimiters.
+
+------------------------------------------------------------------------------
+2.2.10 Insert comment map                               *NERDComInsertComment*
+
+Default mapping: disabled by default.
+Map it to: <plug>NERDCommenterInInsert
+Applicable modes: insert.
+
+Adds comment delimiters at the current cursor position and inserts
+between them.
+
+NOTE: prior to version 2.1.17 this was mapped to ctrl-c. To restore this
+mapping add >
+    let NERDComInsertMap='<c-c>'
+<
+to your vimrc.
+
+------------------------------------------------------------------------------
+2.2.11 Use alternate delims map                              *NERDComAltDelim*
+
+Default mapping: ,ca
+Mapped to: <plug>NERDCommenterAltDelims
+Applicable modes: normal.
+
+Changes to the alternative commenting style if one is available. For example,
+if the user is editing a c++ file using // comments and they hit ,ca
+then they will be switched over to /**/ comments.
+
+See also |NERDComDefaultDelims|
+
+------------------------------------------------------------------------------
+2.2.12 Comment aligned maps                            *NERDComAlignedComment*
+
+Default mappings: [count],cl   [count],cb
+Mapped to: <plug>NERDCommenterAlignLeft
+           <plug>NERDCommenterAlignBoth
+Applicable modes: normal visual-line.
+
+Same as ,cc except that the comment delimiters are aligned on the left side or
+both sides respectively. These comments are always nested if the line(s) are
+already commented.
+
+If a [count] is given in normal mode, the mapping works as though that many
+lines were selected in visual-line mode.
+
+------------------------------------------------------------------------------
+2.2.13 Uncomment line map                               *NERDComUncommentLine*
+
+Default mapping: [count],cu
+Mapped to: <plug>NERDCommenterUncomment
+Applicable modes: normal visual visual-line visual-block.
+
+Uncomments the current line. If multiple lines are selected in
+visual mode then they are all uncommented.
+
+When uncommenting, if the line contains multiple sets of delimiters then the
+``outtermost'' pair of delimiters will be removed.
+
+The script uses a set of heurisics to distinguish ``real'' delimiters from
+``fake'' ones when uncommenting. See |NERDComIssues| for details.
+
+If a [count] is given in normal mode, the mapping works as though that many
+lines were selected in visual-line mode.
+
+Related  options:
+|'NERDRemoveAltComs'|
+|'NERDRemoveExtraSpaces'|
+
+------------------------------------------------------------------------------
+2.3 Supported filetypes                                     *NERDComFiletypes*
+
+Filetypes that can be commented by this plugin:
+abaqus abc acedb ada ahdl amiga aml ampl ant apache apachestyle asm68k asm asn
+aspvbs atlas autohotkey autoit automake ave awk basic b bc bdf bib bindzone
+bst btm caos catalog c cfg cg ch changelog cl clean clipper cmake conf config
+context cpp crontab cs csc csp css cterm cupl csv cvs dcl debchangelog
+debcontrol debsources def diff django docbk dns dosbatch dosini dot dracula
+dsl dtd dtml dylan ecd eiffel elf elmfilt erlang eruby eterm expect exports
+fetchmail fgl focexec form fortran foxpro fstab fvwm fx gdb gdmo geek
+gentoo-package-keywords' gentoo-package-mask' gentoo-package-use' gnuplot
+gtkrc haskell hb h help hercules hog html htmldjango htmlos ia64 icon idlang
+idl indent inform inittab ishd iss ist jam java javascript jess jgraph
+jproperties jproperties jsp kconfig kix kscript lace lex lftp lifelines lilo
+lisp lite lotos lout lprolog lscript lss lua lynx m4 mail make maple masm
+master matlab mel mf mib mma model moduala.  modula2 modula3 monk mush muttrc
+named nasm nastran natural ncf netdict netrw nqc nroff nsis objc ocaml occam
+omlet omnimark openroad opl ora otl ox pascal passwd pcap pccts perl pfmain
+php phtml pic pike pilrc pine plaintex plm plsql po postscr pov povini ppd
+ppwiz procmail progress prolog psf ptcap python python qf radiance ratpoison r
+rc readline rebol registry remind rexx robots rpl rtf ruby sa samba sas sass
+sather scheme scilab screen scsh sdl sed selectbuf sgml sgmldecl sgmllnx sh
+sicad simula sinda skill slang sl slrnrc sm smarty smil smith sml snnsnet
+snnspat snnsres snobol4 spec specman spice sql sqlforms sqlj sqr squid st stp
+strace svn systemverilog tads taglist tags tak tasm tcl terminfo tex text
+plaintex texinfo texmf tf tidy tli trasys tsalt tsscl tssgm uc uil vb verilog
+verilog_systemverilog vgrindefs vhdl vim viminfo virata vo_base vrml vsejcl
+webmacro wget winbatch wml wvdial xdefaults xf86conf xhtml xkb xmath xml
+xmodmap xpm2 xpm xslt yacc yaml z8a
+
+If a language is not in the list of hardcoded supported filetypes then the
+&commentstring vim option is used.
+
+------------------------------------------------------------------------------
+2.4 Sexy Comments                                        *NERDComSexyComments*
+These are comments that use one set of multipart comment delimiters as well as
+one other marker symbol. For example: >
+    /*
+     * This is a c style sexy comment
+     * So there!
+     */
+
+    /* This is a c style sexy comment
+     * So there!
+     * But this one is ``compact'' style */
+<
+Here the multipart delimiters are /* and */ and the marker is *.
+
+------------------------------------------------------------------------------