From bd7323d84a593bfc31f0aeb112ba442886581257 Mon Sep 17 00:00:00 2001 From: ben Date: Thu, 25 Feb 2010 20:24:41 +0100 Subject: mv vim`s runtimepath to .config/vim instead .vim --- .vim/colors/desert256.vim | 338 --------------- .vim/colors/inkpot.vim | 212 ---------- .vim/colors/tango.vim | 80 ---- .vim/compiler/mlint.vim | 44 -- .vim/ftplugin/matlab.vim | 31 -- .vim/indent/matlab.vim | 136 ------ .vim/plugin/imaps.vim | 822 ------------------------------------- .vim/plugin/jad.vim | 66 --- .vim/plugin/lodgeit.vim | 134 ------ .vim/plugin/pastie.vim | 537 ------------------------ .vim/plugin/templates.vim | 105 ----- .vim/syntax/matlab.vim | 359 ---------------- .vim/templates/changelog/change.py | 3 - .vim/templates/changelog/rel | 2 - .vim/templates/html/$ | 1 - .vim/templates/html/dl | 6 - .vim/templates/html/dt | 3 - .vim/templates/html/em | 1 - .vim/templates/html/form | 6 - .vim/templates/html/html | 17 - .vim/templates/html/input | 2 - .vim/templates/html/li | 2 - .vim/templates/html/ol | 5 - .vim/templates/html/p | 4 - .vim/templates/html/script | 4 - .vim/templates/html/ul | 5 - .vim/templates/php/$ | 1 - .vim/templates/php/dl | 6 - .vim/templates/php/dt | 3 - .vim/templates/php/em | 1 - .vim/templates/php/fore | 4 - .vim/templates/php/form | 6 - .vim/templates/php/html | 17 - .vim/templates/php/input | 2 - .vim/templates/php/li | 2 - .vim/templates/php/ol | 5 - .vim/templates/php/p | 4 - .vim/templates/php/script | 4 - .vim/templates/php/ul | 5 - .vim/templates/php/while | 4 - .vim/templates/python/fori | 2 - .vim/templates/python/gtkt | 3 - .vim/templates/python/head | 4 - .vim/templates/tex/head | 23 -- 44 files changed, 3021 deletions(-) delete mode 100644 .vim/colors/desert256.vim delete mode 100644 .vim/colors/inkpot.vim delete mode 100644 .vim/colors/tango.vim delete mode 100644 .vim/compiler/mlint.vim delete mode 100644 .vim/ftplugin/matlab.vim delete mode 100644 .vim/indent/matlab.vim delete mode 100644 .vim/plugin/imaps.vim delete mode 100644 .vim/plugin/jad.vim delete mode 100644 .vim/plugin/lodgeit.vim delete mode 100644 .vim/plugin/pastie.vim delete mode 100755 .vim/plugin/templates.vim delete mode 100644 .vim/syntax/matlab.vim delete mode 100755 .vim/templates/changelog/change.py delete mode 100755 .vim/templates/changelog/rel delete mode 100755 .vim/templates/html/$ delete mode 100755 .vim/templates/html/dl delete mode 100755 .vim/templates/html/dt delete mode 100755 .vim/templates/html/em delete mode 100755 .vim/templates/html/form delete mode 100755 .vim/templates/html/html delete mode 100755 .vim/templates/html/input delete mode 100755 .vim/templates/html/li delete mode 100755 .vim/templates/html/ol delete mode 100755 .vim/templates/html/p delete mode 100755 .vim/templates/html/script delete mode 100755 .vim/templates/html/ul delete mode 100755 .vim/templates/php/$ delete mode 100755 .vim/templates/php/dl delete mode 100755 .vim/templates/php/dt delete mode 100755 .vim/templates/php/em delete mode 100755 .vim/templates/php/fore delete mode 100755 .vim/templates/php/form delete mode 100755 .vim/templates/php/html delete mode 100755 .vim/templates/php/input delete mode 100755 .vim/templates/php/li delete mode 100755 .vim/templates/php/ol delete mode 100755 .vim/templates/php/p delete mode 100755 .vim/templates/php/script delete mode 100755 .vim/templates/php/ul delete mode 100755 .vim/templates/php/while delete mode 100755 .vim/templates/python/fori delete mode 100755 .vim/templates/python/gtkt delete mode 100755 .vim/templates/python/head delete mode 100644 .vim/templates/tex/head (limited to '.vim') diff --git a/.vim/colors/desert256.vim b/.vim/colors/desert256.vim deleted file mode 100644 index 7a97742..0000000 --- a/.vim/colors/desert256.vim +++ /dev/null @@ -1,338 +0,0 @@ -" Vim color file -" Maintainer: Henry So, Jr. - -" These are the colors of the "desert" theme by Hans Fugal with a few small -" modifications (namely that I lowered the intensity of the normal white and -" made the normal and nontext backgrounds black), modified to work with 88- -" and 256-color xterms. -" -" The original "desert" theme is available as part of the vim distribution or -" at http://hans.fugal.net/vim/colors/. -" -" The real feature of this color scheme, with a wink to the "inkpot" theme, is -" the programmatic approximation of the gui colors to the palettes of 88- and -" 256- color xterms. The functions that do this (folded away, for -" readability) are calibrated to the colors used for Thomas E. Dickey's xterm -" (version 200), which is available at http://dickey.his.com/xterm/xterm.html. -" -" I struggled with trying to parse the rgb.txt file to avoid the necessity of -" converting color names to #rrggbb form, but decided it was just not worth -" the effort. Maybe someone seeing this may decide otherwise... - -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="desert256" - -if has("gui_running") || &t_Co == 88 || &t_Co == 256 - " functions {{{ - " returns an approximate grey index for the given grey level - fun grey_number(x) - if &t_Co == 88 - if a:x < 23 - return 0 - elseif a:x < 69 - return 1 - elseif a:x < 103 - return 2 - elseif a:x < 127 - return 3 - elseif a:x < 150 - return 4 - elseif a:x < 173 - return 5 - elseif a:x < 196 - return 6 - elseif a:x < 219 - return 7 - elseif a:x < 243 - return 8 - else - return 9 - endif - else - if a:x < 14 - return 0 - else - let l:n = (a:x - 8) / 10 - let l:m = (a:x - 8) % 10 - if l:m < 5 - return l:n - else - return l:n + 1 - endif - endif - endif - endfun - - " returns the actual grey level represented by the grey index - fun grey_level(n) - if &t_Co == 88 - if a:n == 0 - return 0 - elseif a:n == 1 - return 46 - elseif a:n == 2 - return 92 - elseif a:n == 3 - return 115 - elseif a:n == 4 - return 139 - elseif a:n == 5 - return 162 - elseif a:n == 6 - return 185 - elseif a:n == 7 - return 208 - elseif a:n == 8 - return 231 - else - return 255 - endif - else - if a:n == 0 - return 0 - else - return 8 + (a:n * 10) - endif - endif - endfun - - " returns the palette index for the given grey index - fun grey_color(n) - if &t_Co == 88 - if a:n == 0 - return 16 - elseif a:n == 9 - return 79 - else - return 79 + a:n - endif - else - if a:n == 0 - return 16 - elseif a:n == 25 - return 231 - else - return 231 + a:n - endif - endif - endfun - - " returns an approximate color index for the given color level - fun rgb_number(x) - if &t_Co == 88 - if a:x < 69 - return 0 - elseif a:x < 172 - return 1 - elseif a:x < 230 - return 2 - else - return 3 - endif - else - if a:x < 75 - return 0 - else - let l:n = (a:x - 55) / 40 - let l:m = (a:x - 55) % 40 - if l:m < 20 - return l:n - else - return l:n + 1 - endif - endif - endif - endfun - - " returns the actual color level for the given color index - fun rgb_level(n) - if &t_Co == 88 - if a:n == 0 - return 0 - elseif a:n == 1 - return 139 - elseif a:n == 2 - return 205 - else - return 255 - endif - else - if a:n == 0 - return 0 - else - return 55 + (a:n * 40) - endif - endif - endfun - - " returns the palette index for the given R/G/B color indices - fun rgb_color(x, y, z) - if &t_Co == 88 - return 16 + (a:x * 16) + (a:y * 4) + a:z - else - return 16 + (a:x * 36) + (a:y * 6) + a:z - endif - endfun - - " returns the palette index to approximate the given R/G/B color levels - fun color(r, g, b) - " get the closest grey - let l:gx = grey_number(a:r) - let l:gy = grey_number(a:g) - let l:gz = grey_number(a:b) - - " get the closest color - let l:x = rgb_number(a:r) - let l:y = rgb_number(a:g) - let l:z = rgb_number(a:b) - - if l:gx == l:gy && l:gy == l:gz - " there are two possibilities - let l:dgr = grey_level(l:gx) - a:r - let l:dgg = grey_level(l:gy) - a:g - let l:dgb = grey_level(l:gz) - a:b - let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb) - let l:dr = rgb_level(l:gx) - a:r - let l:dg = rgb_level(l:gy) - a:g - let l:db = rgb_level(l:gz) - a:b - let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db) - if l:dgrey < l:drgb - " use the grey - return grey_color(l:gx) - else - " use the color - return rgb_color(l:x, l:y, l:z) - endif - else - " only one possibility - return rgb_color(l:x, l:y, l:z) - endif - endfun - - " returns the palette index to approximate the 'rrggbb' hex string - fun rgb(rgb) - let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0 - let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0 - let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0 - - return color(l:r, l:g, l:b) - endfun - - " sets the highlighting for the given group - fun X(group, fg, bg, attr) - if a:fg != "" - exec "hi " . a:group . " guifg=#" . a:fg . " ctermfg=" . rgb(a:fg) - endif - if a:bg != "" - exec "hi " . a:group . " guibg=#" . a:bg . " ctermbg=" . rgb(a:bg) - endif - if a:attr != "" - exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr - endif - endfun - " }}} - - call X("Normal", "cccccc", "000000", "") - - " highlight groups - call X("Cursor", "708090", "f0e68c", "") - "CursorIM - "Directory - "DiffAdd - "DiffChange - "DiffDelete - "DiffText - "ErrorMsg - call X("VertSplit", "c2bfa5", "7f7f7f", "reverse") - call X("Folded", "ffd700", "4d4d4d", "") - call X("FoldColumn", "d2b48c", "4d4d4d", "") - call X("IncSearch", "708090", "f0e68c", "") - "LineNr - call X("ModeMsg", "daa520", "", "") - call X("MoreMsg", "2e8b57", "", "") - call X("NonText", "addbe7", "000000", "bold") - call X("Question", "00ff7f", "", "") - call X("Search", "f5deb3", "cd853f", "") - call X("SpecialKey", "9acd32", "", "") - call X("StatusLine", "c2bfa5", "000000", "reverse") - call X("StatusLineNC", "c2bfa5", "7f7f7f", "reverse") - call X("Title", "cd5c5c", "", "") - call X("Visual", "6b8e23", "f0e68c", "reverse") - "VisualNOS - call X("WarningMsg", "fa8072", "", "") - "WildMenu - "Menu - "Scrollbar - "Tooltip - - " syntax highlighting groups - call X("Comment", "87ceeb", "", "") - call X("Constant", "ffa0a0", "", "") - call X("Identifier", "98fb98", "", "none") - call X("Statement", "f0e68c", "", "bold") - call X("PreProc", "cd5c5c", "", "") - call X("Type", "bdb76b", "", "bold") - call X("Special", "ffdead", "", "") - "Underlined - call X("Ignore", "666666", "", "") - "Error - call X("Todo", "ff4500", "eeee00", "") - - " delete functions {{{ - delf X - delf rgb - delf color - delf rgb_color - delf rgb_level - delf rgb_number - delf grey_color - delf grey_level - delf grey_number - " }}} -else - " color terminal definitions - hi SpecialKey ctermfg=darkgreen - hi NonText cterm=bold ctermfg=darkblue - hi Directory ctermfg=darkcyan - hi ErrorMsg cterm=bold ctermfg=7 ctermbg=1 - hi IncSearch cterm=NONE ctermfg=yellow ctermbg=green - hi Search cterm=NONE ctermfg=grey ctermbg=blue - hi MoreMsg ctermfg=darkgreen - hi ModeMsg cterm=NONE ctermfg=brown - hi LineNr ctermfg=3 - hi Question ctermfg=green - hi StatusLine cterm=bold,reverse - hi StatusLineNC cterm=reverse - hi VertSplit cterm=reverse - hi Title ctermfg=5 - hi Visual cterm=reverse - hi VisualNOS cterm=bold,underline - hi WarningMsg ctermfg=1 - hi WildMenu ctermfg=0 ctermbg=3 - hi Folded ctermfg=darkgrey ctermbg=NONE - hi FoldColumn ctermfg=darkgrey ctermbg=NONE - hi DiffAdd ctermbg=4 - hi DiffChange ctermbg=5 - hi DiffDelete cterm=bold ctermfg=4 ctermbg=6 - hi DiffText cterm=bold ctermbg=1 - hi Comment ctermfg=darkcyan - hi Constant ctermfg=brown - hi Special ctermfg=5 - hi Identifier ctermfg=6 - hi Statement ctermfg=3 - hi PreProc ctermfg=5 - hi Type ctermfg=2 - hi Underlined cterm=underline ctermfg=5 - hi Ignore ctermfg=darkgrey - hi Error cterm=bold ctermfg=7 ctermbg=1 -endif - -" vim: set fdl=0 fdm=marker: diff --git a/.vim/colors/inkpot.vim b/.vim/colors/inkpot.vim deleted file mode 100644 index a062248..0000000 --- a/.vim/colors/inkpot.vim +++ /dev/null @@ -1,212 +0,0 @@ -" Vim color file -" Name: inkpot.vim -" Maintainer: Ciaran McCreesh -" This should work in the GUI, rxvt-unicode (88 colour mode) and xterm (256 -" colour mode). It won't work in 8/16 colour terminals. -" -" To use a black background, :let g:inkpot_black_background = 1 - -set background=dark -hi clear -if exists("syntax_on") - syntax reset -endif - -let colors_name = "inkpot" - -" map a urxvt cube number to an xterm-256 cube number -fun! M(a) - return strpart("0135", a:a, 1) + 0 -endfun - -" map a urxvt colour to an xterm-256 colour -fun! X(a) - if &t_Co == 88 - return a:a - else - if a:a == 8 - return 237 - elseif a:a < 16 - return a:a - elseif a:a > 79 - return 232 + (3 * (a:a - 80)) - else - let l:b = a:a - 16 - let l:x = l:b % 4 - let l:y = (l:b / 4) % 4 - let l:z = (l:b / 16) - return 16 + M(l:x) + (6 * M(l:y)) + (36 * M(l:z)) - endif - endif -endfun - -if ! exists("g:inkpot_black_background") - let g:inkpot_black_background = 0 -endif - -if has("gui_running") - if ! g:inkpot_black_background - hi Normal gui=NONE guifg=#cfbfad guibg=#1e1e27 - else - hi Normal gui=NONE guifg=#cfbfad guibg=#000000 - endif - - hi IncSearch gui=BOLD guifg=#303030 guibg=#cd8b60 - hi Search gui=NONE guifg=#303030 guibg=#cd8b60 - hi ErrorMsg gui=BOLD guifg=#ffffff guibg=#ce4e4e - hi WarningMsg gui=BOLD guifg=#ffffff guibg=#ce8e4e - hi ModeMsg gui=BOLD guifg=#7e7eae guibg=NONE - hi MoreMsg gui=BOLD guifg=#7e7eae guibg=NONE - hi Question gui=BOLD guifg=#ffcd00 guibg=NONE - - hi StatusLine gui=BOLD guifg=#b9b9b9 guibg=#3e3e5e - hi User1 gui=BOLD guifg=#00ff8b guibg=#3e3e5e - hi User2 gui=BOLD guifg=#7070a0 guibg=#3e3e5e - hi StatusLineNC gui=NONE guifg=#b9b9b9 guibg=#3e3e5e - hi VertSplit gui=NONE guifg=#b9b9b9 guibg=#3e3e5e - - hi WildMenu gui=BOLD guifg=#eeeeee guibg=#6e6eaf - - hi MBENormal guifg=#cfbfad guibg=#2e2e3f - hi MBEChanged guifg=#eeeeee guibg=#2e2e3f - hi MBEVisibleNormal guifg=#cfcfcd guibg=#4e4e8f - hi MBEVisibleChanged guifg=#eeeeee guibg=#4e4e8f - - hi DiffText gui=NONE guifg=#ffffcd guibg=#4a2a4a - hi DiffChange gui=NONE guifg=#ffffcd guibg=#306b8f - hi DiffDelete gui=NONE guifg=#ffffcd guibg=#6d3030 - hi DiffAdd gui=NONE guifg=#ffffcd guibg=#306d30 - - hi Cursor gui=NONE guifg=#404040 guibg=#8b8bff - hi lCursor gui=NONE guifg=#404040 guibg=#8fff8b - hi CursorIM gui=NONE guifg=#404040 guibg=#8b8bff - - hi Folded gui=NONE guifg=#cfcfcd guibg=#4b208f - hi FoldColumn gui=NONE guifg=#8b8bcd guibg=#2e2e2e - - hi Directory gui=NONE guifg=#00ff8b guibg=NONE - hi LineNr gui=NONE guifg=#8b8bcd guibg=#2e2e2e - hi NonText gui=BOLD guifg=#8b8bcd guibg=NONE - hi SpecialKey gui=BOLD guifg=#ab60ed guibg=NONE - hi Title gui=BOLD guifg=#af4f4b guibg=NONE - hi Visual gui=NONE guifg=#eeeeee guibg=#4e4e8f - - hi Comment gui=NONE guifg=#cd8b00 guibg=NONE - hi Constant gui=NONE guifg=#ffcd8b guibg=NONE - hi String gui=NONE guifg=#ffcd8b guibg=#404040 - hi Error gui=NONE guifg=#ffffff guibg=#6e2e2e - hi Identifier gui=NONE guifg=#ff8bff guibg=NONE - hi Ignore gui=NONE - hi Number gui=NONE guifg=#f0ad6d guibg=NONE - hi PreProc gui=NONE guifg=#409090 guibg=NONE - hi Special gui=NONE guifg=#c080d0 guibg=NONE - hi SpecialChar gui=NONE guifg=#c080d0 guibg=#404040 - hi Statement gui=NONE guifg=#808bed guibg=NONE - hi Todo gui=BOLD guifg=#303030 guibg=#d0a060 - hi Type gui=NONE guifg=#ff8bff guibg=NONE - hi Underlined gui=BOLD guifg=#df9f2d guibg=NONE - hi TaglistTagName gui=BOLD guifg=#808bed guibg=NONE - - hi perlSpecialMatch gui=NONE guifg=#c080d0 guibg=#404040 - hi perlSpecialString gui=NONE guifg=#c080d0 guibg=#404040 - - hi cSpecialCharacter gui=NONE guifg=#c080d0 guibg=#404040 - hi cFormat gui=NONE guifg=#c080d0 guibg=#404040 - - hi doxygenBrief gui=NONE guifg=#fdab60 guibg=NONE - hi doxygenParam gui=NONE guifg=#fdd090 guibg=NONE - hi doxygenPrev gui=NONE guifg=#fdd090 guibg=NONE - hi doxygenSmallSpecial gui=NONE guifg=#fdd090 guibg=NONE - hi doxygenSpecial gui=NONE guifg=#fdd090 guibg=NONE - hi doxygenComment gui=NONE guifg=#ad7b20 guibg=NONE - hi doxygenSpecial gui=NONE guifg=#fdab60 guibg=NONE - hi doxygenSpecialMultilineDesc gui=NONE guifg=#ad600b guibg=NONE - hi doxygenSpecialOnelineDesc gui=NONE guifg=#ad600b guibg=NONE - - if v:version >= 700 - hi Pmenu gui=NONE guifg=#eeeeee guibg=#4e4e8f - hi PmenuSel gui=BOLD guifg=#eeeeee guibg=#2e2e3f - hi PmenuSbar gui=BOLD guifg=#eeeeee guibg=#6e6eaf - hi PmenuThumb gui=BOLD guifg=#eeeeee guibg=#6e6eaf - - hi SpellBad gui=undercurl guisp=#cc6666 - hi SpellRare gui=undercurl guisp=#cc66cc - hi SpellLocal gui=undercurl guisp=#cccc66 - hi SpellCap gui=undercurl guisp=#66cccc - - hi MatchParen gui=NONE guifg=#404040 guibg=#8fff8b - endif -else - if ! g:inkpot_black_background - exec "hi Normal cterm=NONE ctermfg=" . X(79) . " ctermbg=" . X(80) - else - exec "hi Normal cterm=NONE ctermfg=" . X(79) . " ctermbg=" . X(16) - endif - - exec "hi IncSearch cterm=BOLD ctermfg=" . X(80) . " ctermbg=" . X(73) - exec "hi Search cterm=NONE ctermfg=" . X(80) . " ctermbg=" . X(73) - exec "hi ErrorMsg cterm=BOLD ctermfg=" . X(16) . " ctermbg=" . X(48) - exec "hi WarningMsg cterm=BOLD ctermfg=" . X(16) . " ctermbg=" . X(68) - exec "hi ModeMsg cterm=BOLD ctermfg=" . X(38) . " ctermbg=" . "NONE" - exec "hi MoreMsg cterm=BOLD ctermfg=" . X(38) . " ctermbg=" . "NONE" - exec "hi Question cterm=BOLD ctermfg=" . X(52) . " ctermbg=" . "NONE" - - exec "hi StatusLine cterm=BOLD ctermfg=" . X(85) . " ctermbg=" . X(81) - exec "hi User1 cterm=BOLD ctermfg=" . X(28) . " ctermbg=" . X(81) - exec "hi User2 cterm=BOLD ctermfg=" . X(39) . " ctermbg=" . X(81) - exec "hi StatusLineNC cterm=NONE ctermfg=" . X(84) . " ctermbg=" . X(81) - exec "hi VertSplit cterm=NONE ctermfg=" . X(84) . " ctermbg=" . X(81) - - exec "hi WildMenu cterm=BOLD ctermfg=" . X(87) . " ctermbg=" . X(38) - - exec "hi MBENormal ctermfg=" . X(85) . " ctermbg=" . X(81) - exec "hi MBEChanged ctermfg=" . X(87) . " ctermbg=" . X(81) - exec "hi MBEVisibleNormal ctermfg=" . X(85) . " ctermbg=" . X(82) - exec "hi MBEVisibleChanged ctermfg=" . X(87) . " ctermbg=" . X(82) - - exec "hi DiffText cterm=NONE ctermfg=" . X(79) . " ctermbg=" . X(34) - exec "hi DiffChange cterm=NONE ctermfg=" . X(79) . " ctermbg=" . X(17) - exec "hi DiffDelete cterm=NONE ctermfg=" . X(79) . " ctermbg=" . X(32) - exec "hi DiffAdd cterm=NONE ctermfg=" . X(79) . " ctermbg=" . X(20) - - exec "hi Folded cterm=NONE ctermfg=" . X(79) . " ctermbg=" . X(35) - exec "hi FoldColumn cterm=NONE ctermfg=" . X(39) . " ctermbg=" . X(80) - - exec "hi Directory cterm=NONE ctermfg=" . X(28) . " ctermbg=" . "NONE" - exec "hi LineNr cterm=NONE ctermfg=" . X(39) . " ctermbg=" . X(80) - exec "hi NonText cterm=BOLD ctermfg=" . X(39) . " ctermbg=" . "NONE" - exec "hi SpecialKey cterm=BOLD ctermfg=" . X(55) . " ctermbg=" . "NONE" - exec "hi Title cterm=BOLD ctermfg=" . X(48) . " ctermbg=" . "NONE" - exec "hi Visual cterm=NONE ctermfg=" . X(79) . " ctermbg=" . X(38) - - exec "hi Comment cterm=NONE ctermfg=" . X(52) . " ctermbg=" . "NONE" - exec "hi Constant cterm=NONE ctermfg=" . X(73) . " ctermbg=" . "NONE" - exec "hi String cterm=NONE ctermfg=" . X(73) . " ctermbg=" . X(81) - exec "hi Error cterm=NONE ctermfg=" . X(79) . " ctermbg=" . X(32) - exec "hi Identifier cterm=NONE ctermfg=" . X(53) . " ctermbg=" . "NONE" - exec "hi Ignore cterm=NONE" - exec "hi Number cterm=NONE ctermfg=" . X(69) . " ctermbg=" . "NONE" - exec "hi PreProc cterm=NONE ctermfg=" . X(25) . " ctermbg=" . "NONE" - exec "hi Special cterm=NONE ctermfg=" . X(55) . " ctermbg=" . "NONE" - exec "hi SpecialChar cterm=NONE ctermfg=" . X(55) . " ctermbg=" . X(81) - exec "hi Statement cterm=NONE ctermfg=" . X(27) . " ctermbg=" . "NONE" - exec "hi Todo cterm=BOLD ctermfg=" . X(16) . " ctermbg=" . X(57) - exec "hi Type cterm=NONE ctermfg=" . X(71) . " ctermbg=" . "NONE" - exec "hi Underlined cterm=BOLD ctermfg=" . X(77) . " ctermbg=" . "NONE" - exec "hi TaglistTagName cterm=BOLD ctermfg=" . X(39) . " ctermbg=" . "NONE" - - if v:version >= 700 - exec "hi Pmenu cterm=NONE ctermfg=" . X(87) . " ctermbg=" . X(82) - exec "hi PmenuSel cterm=BOLD ctermfg=" . X(87) . " ctermbg=" . X(38) - exec "hi PmenuSbar cterm=BOLD ctermfg=" . X(87) . " ctermbg=" . X(39) - exec "hi PmenuThumb cterm=BOLD ctermfg=" . X(87) . " ctermbg=" . X(39) - - exec "hi SpellBad cterm=NONE ctermbg=" . X(32) - exec "hi SpellRare cterm=NONE ctermbg=" . X(33) - exec "hi SpellLocal cterm=NONE ctermbg=" . X(36) - exec "hi SpellCap cterm=NONE ctermbg=" . X(21) - exec "hi MatchParen cterm=NONE ctermbg=" . X(14) . "ctermfg=" . X(25) - endif -endif - -" vim: set et : diff --git a/.vim/colors/tango.vim b/.vim/colors/tango.vim deleted file mode 100644 index 2aa23e1..0000000 --- a/.vim/colors/tango.vim +++ /dev/null @@ -1,80 +0,0 @@ -" -" Tango Vim Color Scheme -" ======================= -" -" For best results, set up your terminal with a Tango palette. -" Instructions for GNOME Terminal: -" http://uwstopia.nl/blog/2006/07/tango-terminal -" -" author: Michele Campeotto -" -set background=dark - -hi clear -if exists("syntax_on") - syntax reset -endif - -let colors_name = "tango" - -" Default Colors -hi Normal guifg=#eeeeec guibg=#000000 -hi Normal ctermfg=grey ctermbg=black -hi NonText guifg=#555753 guibg=#000000 gui=none -hi NonText ctermfg=darkgray -hi Cursor guibg=#d3d7cf -hi lCursor guibg=#d3d7cf - -" Search -hi Search guifg=#eeeeec guibg=#c4a000 -hi Search cterm=none ctermfg=grey ctermbg=blue -hi IncSearch guibg=#eeeeec guifg=#729fcf -hi IncSearch cterm=none ctermfg=yellow ctermbg=green - -" Window Elements -hi StatusLine guifg=#eeeeec guibg=#4e9a06 gui=bold -hi StatusLine ctermfg=white ctermbg=green cterm=bold -hi StatusLineNC guifg=#d3d7df guibg=#4e9a06 -hi StatusLineNC ctermfg=lightgray ctermbg=darkgreen -hi VertSplit guifg=#eeeeec guibg=#eeeeec -hi Folded guifg=#eeeeec guibg=#75507b -hi Folded ctermfg=white ctermbg=magenta -hi Visual guifg=#d3d7cf guibg=#4e9a06 -hi Visual ctermbg=white ctermfg=lightgreen cterm=reverse - -" Specials -hi Todo guifg=#8ae234 guibg=#4e9a06 gui=bold -hi Todo ctermfg=white ctermbg=green -hi Title guifg=#eeeeec gui=bold -hi Title ctermfg=white cterm=bold - -" Syntax -hi Constant guifg=#c4a000 -hi Constant ctermfg=darkyellow -hi Number guifg=#729fcf -hi Number ctermfg=darkblue -hi Statement guifg=#4e9a06 gui=bold -hi Statement ctermfg=green -hi Identifier guifg=#8ae234 -hi Identifier ctermfg=darkgreen -hi PreProc guifg=#cc0000 -hi PreProc ctermfg=darkred -hi Comment guifg=#06989a gui=italic -hi Comment ctermfg=cyan cterm=none -hi Type guifg=#d3d7cf gui=bold -hi Type ctermfg=gray cterm=bold -hi Special guifg=#75507b -hi Special ctermfg=magenta cterm=none -hi Error guifg=#eeeeec guibg=#ef2929 -hi Error ctermfg=white ctermbg=red - -" Diff -hi DiffAdd guifg=fg guibg=#3465a4 gui=none -hi DiffAdd ctermfg=gray ctermbg=blue cterm=none -hi DiffChange guifg=fg guibg=#555753 gui=none -hi DiffChange ctermfg=gray ctermbg=darkgray cterm=none -hi DiffDelete guibg=bg -hi DiffDelete ctermfg=gray ctermbg=none cterm=none -hi DiffText guifg=fg guibg=#c4a000 gui=none -hi DiffText ctermfg=gray ctermbg=yellow cterm=none - diff --git a/.vim/compiler/mlint.vim b/.vim/compiler/mlint.vim deleted file mode 100644 index f9e9c6d..0000000 --- a/.vim/compiler/mlint.vim +++ /dev/null @@ -1,44 +0,0 @@ -" Vim compiler file -" Compiler: Matlab mlint code checker -" Maintainer: Fabrice Guy -" Latest Revision: 2008 Oct 16 -" Comment: mlint messages are either -" - L x (C y): message (where x and y are line number and -" column number) -" - L x (C y-z): message (where x is the line number, y and -" z the column numbers where the error comes from) - - -if exists("current_compiler") - finish -endif -let current_compiler = "mlint" - -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - -" mlint doesn't provide filename information except if multiple -" filenames are given -" With the following command : -" mlint -" mlint produces an output like that : -" ========== ========== -" L x (C y): ID : Message -" L x (C y): ID : Message -" .. -" .. -" ========== ========== -" L 0 (C 0): MDOTM :Filename 'filename' must end in .m or .M -" -" The filename can then be parsed -CompilerSet makeprg=mlint\ -id\ %\ %< - -CompilerSet errorformat= - \%-P==========\ %f\ ==========, - \%-G%>==========\ %s\ ==========, - \%-G%>L\ %l\ (C\ %c):\ MDOTM%m, - \L\ %l\ (C\ %c):\ %m, - \L\ %l\ (C\ %c-%*[0-9]):\ %m, - \%-Q - diff --git a/.vim/ftplugin/matlab.vim b/.vim/ftplugin/matlab.vim deleted file mode 100644 index 4ae257f..0000000 --- a/.vim/ftplugin/matlab.vim +++ /dev/null @@ -1,31 +0,0 @@ -" Vim filetype plugin file -" Language: matlab -" Maintainer: Fabrice Guy -" Last Changed: 2008 Oct 16 - -if exists("b:did_ftplugin") - finish -endif -let b:did_ftplugin = 1 - -let s:save_cpo = &cpo -set cpo-=C - -if exists("loaded_matchit") - let s:conditionalEnd = '\(([^()]*\)\@!\\([^()]*)\)\@!' - let b:match_words = '\\|\\|\\|\\|\\|\\|\\|\\|\\|\:' . s:conditionalEnd -endif - -setlocal suffixesadd=.m -setlocal suffixes+=.asv -" Change the :browse e filter to primarily show M-files -if has("gui_win32") && !exists("b:browsefilter") - let b:browsefilter="M-files (*.m)\t*.m\n" . - \ "All files (*.*)\t*.*\n" -endif - -let b:undo_ftplugin = "setlocal suffixesadd< suffixes< " - \ . "| unlet! b:browsefilter" - \ . "| unlet! b:match_words" - -let &cpo = s:save_cpo diff --git a/.vim/indent/matlab.vim b/.vim/indent/matlab.vim deleted file mode 100644 index 936ac7c..0000000 --- a/.vim/indent/matlab.vim +++ /dev/null @@ -1,136 +0,0 @@ -" Matlab indent file -" Language: Matlab -" Maintainer: Fabrice Guy -" Last Change: 2008 Oct 15 - -" Only load this indent file when no other was loaded. -if exists("b:did_indent") - finish -endif -let b:did_indent = 1 -let s:onlySubfunctionExists = 0 - -setlocal indentexpr=GetMatlabIndent() -setlocal indentkeys=!,o,O=end,=case,=else,=elseif,=otherwise,=catch - -" Only define the function once. -if exists("*GetMatlabIndent") - finish -endif - -function! s:IsMatlabContinuationLine(lnum) - let continuationLine = 0 - if a:lnum > 0 - let pnbline = getline(prevnonblank(a:lnum)) - " if we have the line continuation operator (... at the end of a line or - " ... followed by a comment) it may be a line continuation - if pnbline =~ '\.\.\.\s*$' || pnbline =~ '\.\.\.\s*%.*$' - let continuationLine = 1 - " but if the ... are part of a string or a comment, it is not a - " continuation line - let col = match(pnbline, '\.\.\.\s*$') - if col == -1 - let col = match(pnbline, '\.\.\.\s*%.*$') - endif - if has('syntax_items') - if synIDattr(synID(prevnonblank(a:lnum), col + 1, 1), "name") =~ "matlabString" || - \ synIDattr(synID(prevnonblank(a:lnum), col + 1, 1), "name") =~ "matlabComment" - let continuationLine = 0 - endif - endif - endif - endif - return continuationLine -endfunction - -function GetMatlabIndent() - " Find a non-blank line above the current line. - let plnum = prevnonblank(v:lnum - 1) - - " If the previous line is a continuation line, get the beginning of the block to - " use the indent of that line - if s:IsMatlabContinuationLine(plnum - 1) - while s:IsMatlabContinuationLine(plnum - 1) - let plnum = plnum - 1 - endwhile - endif - - " At the start of the file use zero indent. - if plnum == 0 - return 0 - endif - - let curind = indent(plnum) - if s:IsMatlabContinuationLine(v:lnum - 1) - let curind = curind + &sw - endif - " Add a 'shiftwidth' after classdef, properties, switch, methods, events, - " function, if, while, for, otherwise, case, tic, try, catch, else, elseif - if getline(plnum) =~ '^\s*\(classdef\|properties\|switch\|methods\|events\|function\|if\|while\|for\|otherwise\|case\|tic\|try\|catch\|else\|elseif\)\>' - let curind = curind + &sw - " In Matlab we have different kind of functions - " - the main function (the function with the same name than the filename) - " - the nested functions - " - the functions defined in methods (for classes) - " - subfunctions - " For the moment the main function (located line 1) doesn't produce any indentation in the - " code (default behavior in the Matlab editor) and the other kind of - " functions indent the code - if getline(plnum) =~ '^\s*\function\>' - " If it is the main function - if plnum == 1 - " look for a matching end : - " - if we find a matching end everything is fine - " - if not, then all other functions are subfunctions - normal % - if getline(line('.')) =~ '^\s*end' - let s:onlySubfunctionExists = 0 - else - let s:onlySubfunctionExists = 1 - endif - normal % - let curind = curind - &sw - else - " it is a subfunction without matching end : dedent - if s:onlySubfunctionExists - let curind = curind - &sw - endif - endif - endif - endif - - " Subtract a 'shiftwidth' on a else, elseif, end, catch, otherwise, case, - " toc - if getline(v:lnum) =~ '^\s*\(else\|elseif\|end\|catch\|otherwise\|case\|toc\)\>' - let curind = curind - &sw - endif - " No indentation in a subfunction - if getline(v:lnum) =~ '^\s*\function\>' && s:onlySubfunctionExists - let curind = curind - &sw - endif - - " First case after a switch : indent - if getline(v:lnum) =~ '^\s*case' - while plnum > 0 && (getline(plnum) =~ '^\s*%' || getline(plnum) =~ '^\s*$') - let plnum = plnum - 1 - endwhile - if getline(plnum) =~ '^\s*switch' - let curind = indent(plnum) + &sw - endif - endif - - " end in a switch / end block : dedent twice - " we use the matchit script to know if this end is the end of a switch block - if exists("b:match_words") - if getline(v:lnum) =~ '^\s*end' - normal % - if getline(line('.')) =~ "switch" - let curind = curind - &sw - endif - normal % - end - end - return curind -endfunction - -" vim:sw=2 diff --git a/.vim/plugin/imaps.vim b/.vim/plugin/imaps.vim deleted file mode 100644 index 9738936..0000000 --- a/.vim/plugin/imaps.vim +++ /dev/null @@ -1,822 +0,0 @@ -" File: imaps.vim -" Authors: Srinath Avadhanula -" Benji Fisher -" -" WWW: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/vim-latex/vimfiles/plugin/imaps.vim?only_with_tag=MAIN -" -" Description: insert mode template expander with cursor placement -" while preserving filetype indentation. -" -" $Id: imaps.vim,v 1.39 2004/05/30 07:35:40 srinathava Exp $ -" -" Documentation: {{{ -" -" Motivation: -" this script provides a way to generate insert mode mappings which do not -" suffer from some of the problem of mappings and abbreviations while allowing -" cursor placement after the expansion. It can alternatively be thought of as -" a template expander. -" -" Consider an example. If you do -" -" imap lhs something -" -" then a mapping is set up. However, there will be the following problems: -" 1. the 'ttimeout' option will generally limit how easily you can type the -" lhs. if you type the left hand side too slowly, then the mapping will not -" be activated. -" 2. if you mistype one of the letters of the lhs, then the mapping is -" deactivated as soon as you backspace to correct the mistake. -" -" If, in order to take care of the above problems, you do instead -" -" iab lhs something -" -" then the timeout problem is solved and so is the problem of mistyping. -" however, abbreviations are only expanded after typing a non-word character. -" which causes problems of cursor placement after the expansion and invariably -" spurious spaces are inserted. -" -" Usage Example: -" this script attempts to solve all these problems by providing an emulation -" of imaps wchich does not suffer from its attendant problems. Because maps -" are activated without having to press additional characters, therefore -" cursor placement is possible. furthermore, file-type specific indentation is -" preserved, because the rhs is expanded as if the rhs is typed in literally -" by the user. -" -" The script already provides some default mappings. each "mapping" is of the -" form: -" -" call IMAP (lhs, rhs, ft) -" -" Some characters in the RHS have special meaning which help in cursor -" placement. -" -" Example One: -" -" call IMAP ("bit`", "\\begin{itemize}\\\item <++>\\\end{itemize}<++>", "tex") -" -" This effectively sets up the map for "bit`" whenever you edit a latex file. -" When you type in this sequence of letters, the following text is inserted: -" -" \begin{itemize} -" \item * -" \end{itemize}<++> -" -" where * shows the cursor position. The cursor position after inserting the -" text is decided by the position of the first "place-holder". Place holders -" are special characters which decide cursor placement and movement. In the -" example above, the place holder characters are <+ and +>. After you have typed -" in the item, press and you will be taken to the next set of <++>'s. -" Therefore by placing the <++> characters appropriately, you can minimize the -" use of movement keys. -" -" NOTE: Set g:Imap_UsePlaceHolders to 0 to disable placeholders altogether. -" Set -" g:Imap_PlaceHolderStart and g:Imap_PlaceHolderEnd -" to something else if you want different place holder characters. -" Also, b:Imap_PlaceHolderStart and b:Imap_PlaceHolderEnd override the values -" of g:Imap_PlaceHolderStart and g:Imap_PlaceHolderEnd respectively. This is -" useful for setting buffer specific place hoders. -" -" Example Two: -" You can use the command to insert dynamic elements such as dates. -" call IMAP ('date`', "\=strftime('%b %d %Y')\", '') -" -" sets up the map for date` to insert the current date. -" -"--------------------------------------%<-------------------------------------- -" Bonus: This script also provides a command Snip which puts tearoff strings, -" '----%<----' above and below the visually selected range of lines. The -" length of the string is chosen to be equal to the longest line in the range. -" Recommended Usage: -" '<,'>Snip -"--------------------------------------%<-------------------------------------- -" }}} - -" ============================================================================== -" Script Options / Variables -" ============================================================================== -" Options {{{ -if !exists('g:Imap_StickyPlaceHolders') - let g:Imap_StickyPlaceHolders = 1 -endif -if !exists('g:Imap_DeleteEmptyPlaceHolders') - let g:Imap_DeleteEmptyPlaceHolders = 1 -endif -" }}} -" Variables {{{ -" s:LHS_{ft}_{char} will be generated automatically. It will look like -" s:LHS_tex_o = 'fo\|foo\|boo' and contain all mapped sequences ending in "o". -" s:Map_{ft}_{lhs} will be generated automatically. It will look like -" s:Map_c_foo = 'for(<++>; <++>; <++>)', the mapping for "foo". -" -" }}} - -" ============================================================================== -" functions for easy insert mode mappings. -" ============================================================================== -" IMAP: Adds a "fake" insert mode mapping. {{{ -" For example, doing -" IMAP('abc', 'def' ft) -" will mean that if the letters abc are pressed in insert mode, then -" they will be replaced by def. If ft != '', then the "mapping" will be -" specific to the files of type ft. -" -" Using IMAP has a few advantages over simply doing: -" imap abc def -" 1. with imap, if you begin typing abc, the cursor will not advance and -" long as there is a possible completion, the letters a, b, c will be -" displayed on on top of the other. using this function avoids that. -" 2. with imap, if a backspace or arrow key is pressed before completing -" the word, then the mapping is lost. this function allows movement. -" (this ofcourse means that this function is only limited to -" left-hand-sides which do not have movement keys or unprintable -" characters) -" It works by only mapping the last character of the left-hand side. -" when this character is typed in, then a reverse lookup is done and if -" the previous characters consititute the left hand side of the mapping, -" the previously typed characters and erased and the right hand side is -" inserted - -" IMAP: set up a filetype specific mapping. -" Description: -" "maps" the lhs to rhs in files of type 'ft'. If supplied with 2 -" additional arguments, then those are assumed to be the placeholder -" characters in rhs. If unspecified, then the placeholder characters -" are assumed to be '<+' and '+>' These placeholder characters in -" a:rhs are replaced with the users setting of -" [bg]:Imap_PlaceHolderStart and [bg]:Imap_PlaceHolderEnd settings. -" -function! IMAP(lhs, rhs, ft, ...) - - " Find the place holders to save for IMAP_PutTextWithMovement() . - if a:0 < 2 - let phs = '<+' - let phe = '+>' - else - let phs = a:1 - let phe = a:2 - endif - - let hash = s:Hash(a:lhs) - let s:Map_{a:ft}_{hash} = a:rhs - let s:phs_{a:ft}_{hash} = phs - let s:phe_{a:ft}_{hash} = phe - - " Add a:lhs to the list of left-hand sides that end with lastLHSChar: - let lastLHSChar = a:lhs[strlen(a:lhs)-1] - let hash = s:Hash(lastLHSChar) - if !exists("s:LHS_" . a:ft . "_" . hash) - let s:LHS_{a:ft}_{hash} = escape(a:lhs, '\') - else - let s:LHS_{a:ft}_{hash} = escape(a:lhs, '\') .'\|'. s:LHS_{a:ft}_{hash} - endif - - " map only the last character of the left-hand side. - if lastLHSChar == ' ' - let lastLHSChar = '' - end - exe 'inoremap ' - \ escape(lastLHSChar, '|') - \ '=LookupCharacter("' . - \ escape(lastLHSChar, '\|"') . - \ '")' -endfunction - -" }}} -" IMAP_list: list the rhs and place holders corresponding to a:lhs {{{ -" -" Added mainly for debugging purposes, but maybe worth keeping. -function! IMAP_list(lhs) - let char = a:lhs[strlen(a:lhs)-1] - let charHash = s:Hash(char) - if exists("s:LHS_" . &ft ."_". charHash) && a:lhs =~ s:LHS_{&ft}_{charHash} - let ft = &ft - elseif exists("s:LHS__" . charHash) && a:lhs =~ s:LHS__{charHash} - let ft = "" - else - return "" - endif - let hash = s:Hash(a:lhs) - return "rhs = " . s:Map_{ft}_{hash} . " place holders = " . - \ s:phs_{ft}_{hash} . " and " . s:phe_{ft}_{hash} -endfunction -" }}} -" LookupCharacter: inserts mapping corresponding to this character {{{ -" -" This function extracts from s:LHS_{&ft}_{a:char} or s:LHS__{a:char} -" the longest lhs matching the current text. Then it replaces lhs with the -" corresponding rhs saved in s:Map_{ft}_{lhs} . -" The place-holder variables are passed to IMAP_PutTextWithMovement() . -function! s:LookupCharacter(char) - if IMAP_GetVal('Imap_FreezeImap', 0) == 1 - return a:char - endif - let charHash = s:Hash(a:char) - - " The line so far, including the character that triggered this function: - let text = strpart(getline("."), 0, col(".")-1) . a:char - " Prefer a local map to a global one, even if the local map is shorter. - " Is this what we want? Do we care? - " Use '\V' (very no-magic) so that only '\' is special, and it was already - " escaped when building up s:LHS_{&ft}_{charHash} . - if exists("s:LHS_" . &ft . "_" . charHash) - \ && text =~ "\\C\\V\\(" . s:LHS_{&ft}_{charHash} . "\\)\\$" - let ft = &ft - elseif exists("s:LHS__" . charHash) - \ && text =~ "\\C\\V\\(" . s:LHS__{charHash} . "\\)\\$" - let ft = "" - else - " If this is a character which could have been used to trigger an - " abbreviation, check if an abbreviation exists. - if a:char !~ '\k' - let lastword = matchstr(getline('.'), '\k\+$', '') - if lastword != '' - " An extremeley wierd way to get around the fact that vim - " doesn't have the equivalent of the :mapcheck() function for - " abbreviations. - let _a = @a - exec "redir @a | silent! iab ".lastword." | redir END" - let abbreviationRHS = matchstr(@a."\n", "\n".'i\s\+'.lastword.'\+\s\+@\?\zs.*\ze'."\n") - - if @a =~ "No abbreviation found" || abbreviationRHS == "" - let @a = _a - return a:char - endif - - let @a = _a - let abbreviationRHS = escape(abbreviationRHS, '\<"') - exec 'let abbreviationRHS = "'.abbreviationRHS.'"' - - let lhs = lastword.a:char - let rhs = abbreviationRHS.a:char - let phs = IMAP_GetPlaceHolderStart() - let phe = IMAP_GetPlaceHolderEnd() - else - return a:char - endif - else - return a:char - endif - endif - " Find the longest left-hand side that matches the line so far. - " matchstr() returns the match that starts first. This automatically - " ensures that the longest LHS is used for the mapping. - if !exists('lhs') || !exists('rhs') - let lhs = matchstr(text, "\\C\\V\\(" . s:LHS_{ft}_{charHash} . "\\)\\$") - let hash = s:Hash(lhs) - let rhs = s:Map_{ft}_{hash} - let phs = s:phs_{ft}_{hash} - let phe = s:phe_{ft}_{hash} - endif - - if strlen(lhs) == 0 - return a:char - endif - " enough back-spaces to erase the left-hand side; -1 for the last - " character typed: - let bs = substitute(strpart(lhs, 1), ".", "\", "g") - return bs . IMAP_PutTextWithMovement(rhs, phs, phe) -endfunction - -" }}} -" IMAP_PutTextWithMovement: returns the string with movement appended {{{ -" Description: -" If a:str contains "placeholders", then appends movement commands to -" str in a way that the user moves to the first placeholder and enters -" insert or select mode. If supplied with 2 additional arguments, then -" they are assumed to be the placeholder specs. Otherwise, they are -" assumed to be '<+' and '+>'. These placeholder chars are replaced -" with the users settings of [bg]:Imap_PlaceHolderStart and -" [bg]:Imap_PlaceHolderEnd. -function! IMAP_PutTextWithMovement(str, ...) - - " The placeholders used in the particular input string. These can be - " different from what the user wants to use. - if a:0 < 2 - let phs = '<+' - let phe = '+>' - else - let phs = escape(a:1, '\') - let phe = escape(a:2, '\') - endif - - let text = a:str - - " The user's placeholder settings. - let phsUser = IMAP_GetPlaceHolderStart() - let pheUser = IMAP_GetPlaceHolderEnd() - - " Problem: depending on the setting of the 'encoding' option, a character - " such as "\xab" may not match itself. We try to get around this by - " changing the encoding of all our strings. At the end, we have to - " convert text back. - let phsEnc = s:Iconv(phs, "encode") - let pheEnc = s:Iconv(phe, "encode") - let phsUserEnc = s:Iconv(phsUser, "encode") - let pheUserEnc = s:Iconv(pheUser, "encode") - let textEnc = s:Iconv(text, "encode") - if textEnc != text - let textEncoded = 1 - else - let textEncoded = 0 - endif - - let pattern = '\V\(\.\{-}\)' .phs. '\(\.\{-}\)' .phe. '\(\.\*\)' - " If there are no placeholders, just return the text. - if textEnc !~ pattern - call IMAP_Debug('Not getting '.phs.' and '.phe.' in '.textEnc, 'imap') - return text - endif - " Break text up into "initial <+template+> final"; any piece may be empty. - let initialEnc = substitute(textEnc, pattern, '\1', '') - let templateEnc = substitute(textEnc, pattern, '\2', '') - let finalEnc = substitute(textEnc, pattern, '\3', '') - - " If the user does not want to use placeholders, then remove all but the - " first placeholder. - " Otherwise, replace all occurences of the placeholders here with the - " user's choice of placeholder settings. - if exists('g:Imap_UsePlaceHolders') && !g:Imap_UsePlaceHolders - let finalEnc = substitute(finalEnc, '\V'.phs.'\.\{-}'.phe, '', 'g') - else - let finalEnc = substitute(finalEnc, '\V'.phs.'\(\.\{-}\)'.phe, - \ phsUserEnc.'\1'.pheUserEnc, 'g') - endif - - " The substitutions are done, so convert back, if necessary. - if textEncoded - let initial = s:Iconv(initialEnc, "decode") - let template = s:Iconv(templateEnc, "decode") - let final = s:Iconv(finalEnc, "decode") - else - let initial = initialEnc - let template = templateEnc - let final = finalEnc - endif - - " Build up the text to insert: - " 1. the initial text plus an extra character; - " 2. go to Normal mode with , so it works even if 'insertmode' - " is set, and mark the position; - " 3. replace the extra character with tamplate and final; - " 4. back to Normal mode and restore the cursor position; - " 5. call IMAP_Jumpfunc(). - let template = phsUser . template . pheUser - " Old trick: insert and delete a character to get the same behavior at - " start, middle, or end of line and on empty lines. - let text = initial . "X\\:call IMAP_Mark('set')\\"_s" - let text = text . template . final - let text = text . "\\:call IMAP_Mark('go')\" - let text = text . "i\=IMAP_Jumpfunc('', 1)\" - - call IMAP_Debug('IMAP_PutTextWithMovement: text = ['.text.']', 'imap') - return text -endfunction - -" }}} -" IMAP_Jumpfunc: takes user to next <+place-holder+> {{{ -" Author: Luc Hermitte -" Arguments: -" direction: flag for the search() function. If set to '', search forwards, -" if 'b', then search backwards. See the {flags} argument of the -" |search()| function for valid values. -" inclusive: In vim, the search() function is 'exclusive', i.e we always goto -" next cursor match even if there is a match starting from the -" current cursor position. Setting this argument to 1 makes -" IMAP_Jumpfunc() also respect a match at the current cursor -" position. 'inclusive'ness is necessary for IMAP() because a -" placeholder string can occur at the very beginning of a map which -" we want to select. -" We use a non-zero value only in special conditions. Most mappings -" should use a zero value. -function! IMAP_Jumpfunc(direction, inclusive) - - " The user's placeholder settings. - let phsUser = IMAP_GetPlaceHolderStart() - let pheUser = IMAP_GetPlaceHolderEnd() - - let searchString = '' - " If this is not an inclusive search or if it is inclusive, but the - " current cursor position does not contain a placeholder character, then - " search for the placeholder characters. - if !a:inclusive || strpart(getline('.'), col('.')-1) !~ '\V\^'.phsUser - let searchString = '\V'.phsUser.'\_.\{-}'.pheUser - endif - - " If we didn't find any placeholders return quietly. - if searchString != '' && !search(searchString, a:direction) - return '' - endif - - " Open any closed folds and make this part of the text visible. - silent! foldopen! - - " Calculate if we have an empty placeholder or if it contains some - " description. - let template = - \ matchstr(strpart(getline('.'), col('.')-1), - \ '\V\^'.phsUser.'\zs\.\{-}\ze\('.pheUser.'\|\$\)') - let placeHolderEmpty = !strlen(template) - - " If we are selecting in exclusive mode, then we need to move one step to - " the right - let extramove = '' - if &selection == 'exclusive' - let extramove = 'l' - endif - - " Select till the end placeholder character. - let movement = "\v/\\V".pheUser."/e\".extramove - - " First remember what the search pattern was. s:RemoveLastHistoryItem will - " reset @/ to this pattern so we do not create new highlighting. - let g:Tex_LastSearchPattern = @/ - - " Now either goto insert mode or select mode. - if placeHolderEmpty && g:Imap_DeleteEmptyPlaceHolders - " delete the empty placeholder into the blackhole. - return movement."\"_c\:".s:RemoveLastHistoryItem."\" - else - return movement."\\:".s:RemoveLastHistoryItem."\gv\" - endif - -endfunction - -" }}} -" Maps for IMAP_Jumpfunc {{{ -" -" These mappings use and thus provide for easy user customization. When -" the user wants to map some other key to jump forward, he can do for -" instance: -" nmap ,f IMAP_JumpForward -" etc. - -" jumping forward and back in insert mode. -imap IMAP_JumpForward =IMAP_Jumpfunc('', 0) -imap IMAP_JumpBack =IMAP_Jumpfunc('b', 0) - -" jumping in normal mode -nmap IMAP_JumpForward i=IMAP_Jumpfunc('', 0) -nmap IMAP_JumpBack i=IMAP_Jumpfunc('b', 0) - -" deleting the present selection and then jumping forward. -vmap IMAP_DeleteAndJumpForward "_i=IMAP_Jumpfunc('', 0) -vmap IMAP_DeleteAndJumpBack "_i=IMAP_Jumpfunc('b', 0) - -" jumping forward without deleting present selection. -vmap IMAP_JumpForward i=IMAP_Jumpfunc('', 0) -vmap IMAP_JumpBack `=IMAP_Jumpfunc('b', 0) - -" }}} -" Default maps for IMAP_Jumpfunc {{{ -" map only if there is no mapping already. allows for user customization. -" NOTE: Default mappings for jumping to the previous placeholder are not -" provided. It is assumed that if the user will create such mappings -" hself if e so desires. -if !hasmapto('IMAP_JumpForward', 'i') - imap IMAP_JumpForward -endif -if !hasmapto('IMAP_JumpForward', 'n') - nmap IMAP_JumpForward -endif -if exists('g:Imap_StickyPlaceHolders') && g:Imap_StickyPlaceHolders - if !hasmapto('IMAP_JumpForward', 'v') - vmap IMAP_JumpForward - endif -else - if !hasmapto('IMAP_DeleteAndJumpForward', 'v') - vmap IMAP_DeleteAndJumpForward - endif -endif -" }}} - -nmap -<++> diff --git a/.vim/templates/html/ul b/.vim/templates/html/ul deleted file mode 100755 index f65ab78..0000000 --- a/.vim/templates/html/ul +++ /dev/null @@ -1,5 +0,0 @@ -
    -
  • <++>
  • - <++> -
-<++> diff --git a/.vim/templates/php/$ b/.vim/templates/php/$ deleted file mode 100755 index 86f8609..0000000 --- a/.vim/templates/php/$ +++ /dev/null @@ -1 +0,0 @@ -document.getElementById("<++>").<++> diff --git a/.vim/templates/php/dl b/.vim/templates/php/dl deleted file mode 100755 index c7bff2e..0000000 --- a/.vim/templates/php/dl +++ /dev/null @@ -1,6 +0,0 @@ -
-
<++>
-
<++>
- <++> -
-<++> diff --git a/.vim/templates/php/dt b/.vim/templates/php/dt deleted file mode 100755 index eee603e..0000000 --- a/.vim/templates/php/dt +++ /dev/null @@ -1,3 +0,0 @@ -
<++>
-
<++>
-<++> diff --git a/.vim/templates/php/em b/.vim/templates/php/em deleted file mode 100755 index 53f4852..0000000 --- a/.vim/templates/php/em +++ /dev/null @@ -1 +0,0 @@ -<++><++> diff --git a/.vim/templates/php/fore b/.vim/templates/php/fore deleted file mode 100755 index 5816e79..0000000 --- a/.vim/templates/php/fore +++ /dev/null @@ -1,4 +0,0 @@ -foreach(<++> as <++> => <++>) -{ - <++> -} diff --git a/.vim/templates/php/form b/.vim/templates/php/form deleted file mode 100755 index 5985979..0000000 --- a/.vim/templates/php/form +++ /dev/null @@ -1,6 +0,0 @@ -
-

- <++> -

-
-<++> diff --git a/.vim/templates/php/html b/.vim/templates/php/html deleted file mode 100755 index 618a876..0000000 --- a/.vim/templates/php/html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - <+title+> - - - -

<+title+>

- <++> - - diff --git a/.vim/templates/php/input b/.vim/templates/php/input deleted file mode 100755 index 670e334..0000000 --- a/.vim/templates/php/input +++ /dev/null @@ -1,2 +0,0 @@ - -<++> diff --git a/.vim/templates/php/li b/.vim/templates/php/li deleted file mode 100755 index b04522c..0000000 --- a/.vim/templates/php/li +++ /dev/null @@ -1,2 +0,0 @@ -
  • <++>
  • -<++> diff --git a/.vim/templates/php/ol b/.vim/templates/php/ol deleted file mode 100755 index 119e490..0000000 --- a/.vim/templates/php/ol +++ /dev/null @@ -1,5 +0,0 @@ -
      -
    1. <++>
    2. - <++> -
    -<++> diff --git a/.vim/templates/php/p b/.vim/templates/php/p deleted file mode 100755 index 92cd897..0000000 --- a/.vim/templates/php/p +++ /dev/null @@ -1,4 +0,0 @@ -

    - <++> -

    -<++> diff --git a/.vim/templates/php/script b/.vim/templates/php/script deleted file mode 100755 index 61aab67..0000000 --- a/.vim/templates/php/script +++ /dev/null @@ -1,4 +0,0 @@ - -<++> diff --git a/.vim/templates/php/ul b/.vim/templates/php/ul deleted file mode 100755 index f65ab78..0000000 --- a/.vim/templates/php/ul +++ /dev/null @@ -1,5 +0,0 @@ -
      -
    • <++>
    • - <++> -
    -<++> diff --git a/.vim/templates/php/while b/.vim/templates/php/while deleted file mode 100755 index 0e6e202..0000000 --- a/.vim/templates/php/while +++ /dev/null @@ -1,4 +0,0 @@ -while(<++>) -{ - <++> -} diff --git a/.vim/templates/python/fori b/.vim/templates/python/fori deleted file mode 100755 index 4fb67c9..0000000 --- a/.vim/templates/python/fori +++ /dev/null @@ -1,2 +0,0 @@ -for <++> in <++>: - <++> diff --git a/.vim/templates/python/gtkt b/.vim/templates/python/gtkt deleted file mode 100755 index c8a62c1..0000000 --- a/.vim/templates/python/gtkt +++ /dev/null @@ -1,3 +0,0 @@ -gtk.threads_enter() -<++> -gtk.threads_leave() diff --git a/.vim/templates/python/head b/.vim/templates/python/head deleted file mode 100755 index 5567fe9..0000000 --- a/.vim/templates/python/head +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env python -# vim:fileencoding=utf-8:ft=python -# - diff --git a/.vim/templates/tex/head b/.vim/templates/tex/head deleted file mode 100644 index 572c2d0..0000000 --- a/.vim/templates/tex/head +++ /dev/null @@ -1,23 +0,0 @@ -\documentclass{scrartcl} -\usepackage{graphicx} -\usepackage[utf8]{inputenc} -\usepackage[ngerman]{babel} -\usepackage[automark]{scrpage2} -\pagestyle{scrheadings} - -\ihead{<+links+>} -\chead{\pagemark} -\ohead{\headmark} -\author{Phillip Berndt} -\date{\today{}} -\title{<++>} - - -\begin{document} -\maketitle -\tableofcontents -\newpage - -\section{<++>} - -\end{document} -- cgit