From e96b5b30a50a159586460fb09118d23549e82273 Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Fri, 3 Apr 2015 01:30:50 -0700 Subject: [PATCH 1/4] spicy legato --- home/vimrc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/home/vimrc b/home/vimrc index 2b3c00e..35493d3 100644 --- a/home/vimrc +++ b/home/vimrc @@ -145,6 +145,11 @@ if has('autocmd') au FileType ruby call TabTwo() augroup END + augroup whatever + au! + au BufRead,BufNewFile *.lib setlocal ft=spice + augroup END + augroup sessions au! au VimEnter * call LoadSession() From 4aa47ba39df6fb505e8e5ec10ec0bd96ffc585a9 Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Fri, 3 Apr 2015 01:32:08 -0700 Subject: [PATCH 2/4] more refactoring this dumb theme --- vim/colors/Tomorrow-Night.vim | 493 ++++++++++++++++++---------------- 1 file changed, 255 insertions(+), 238 deletions(-) diff --git a/vim/colors/Tomorrow-Night.vim b/vim/colors/Tomorrow-Night.vim index 79f4f2f..60edf95 100644 --- a/vim/colors/Tomorrow-Night.vim +++ b/vim/colors/Tomorrow-Night.vim @@ -38,250 +38,267 @@ fun X(group, fg, bg, attr) if a:attr != "" | exec "hi " . a:group . " gui=" . a:attr | endif endfun -" Vim Highlighting -call X("Normal", s:foreground, s:background, "") -call X("LineNr", s:selection, "", "") -call X("NonText", s:selection, "", "") -call X("SpecialKey", s:selection, "", "") -call X("Search", s:background, s:yellow, "") -call X("TabLine", s:window, s:foreground, "reverse") -call X("TabLineFill", s:window, s:foreground, "reverse") -call X("StatusLine", s:window, s:yellow, "reverse") -call X("StatusLineNC", s:window, s:foreground, "reverse") -call X("VertSplit", s:window, s:window, "none") -call X("Visual", "", s:selection, "") -call X("Directory", s:blue, "", "") -call X("ModeMsg", s:green, "", "") -call X("MoreMsg", s:green, "", "") -call X("Question", s:green, "", "") -call X("WarningMsg", s:red, "", "") -call X("MatchParen", "", s:selection, "") -call X("Folded", s:comment, s:background, "") -call X("FoldColumn", "", s:background, "") -if version >= 700 - call X("CursorLine", "", s:line, "none") - call X("CursorColumn", "", s:line, "none") - call X("PMenu", s:foreground, s:selection, "none") - call X("PMenuSel", s:foreground, s:selection, "reverse") - call X("SignColumn", "", s:background, "none") -end -if version >= 703 - call X("ColorColumn", "", s:line, "none") -end +"exec 'normal yiw' | exec '%s/'.@0.'$//gn' -" Standard Highlighting -call X("Comment", s:comment, "", "") -call X("Todo", s:comment, s:background, "") -call X("Title", s:comment, "", "") -call X("Identifier", s:red, "", "none") -call X("Statement", s:foreground, "", "") -call X("Conditional", s:foreground, "", "") -call X("Repeat", s:foreground, "", "") -call X("Structure", s:purple, "", "") -call X("Function", s:blue, "", "") -call X("Constant", s:orange, "", "") -call X("Keyword", s:orange, "", "") -call X("String", s:green, "", "") -call X("Special", s:foreground, "", "") -call X("PreProc", s:purple, "", "") -call X("Operator", s:aqua, "", "none") -call X("Type", s:blue, "", "none") -call X("Define", s:purple, "", "none") -call X("Include", s:blue, "", "") -"call X("Ignore", "666666", "", "") +call X("Normal", s:foreground, s:background, "") +call X("_Aqua", s:aqua, "", "") " 3 +call X("_Blue", s:blue, "", "") " 27 +call X("_Comment", s:comment, "", "") " 6 +call X("_Green", s:green, "", "") " 18 +call X("_Orange", s:orange, "", "") " 23 +call X("_Plain", s:foreground, "", "") " 12 +call X("_Purple", s:purple, "", "") " 52 +call X("_Red", s:red, "", "") " 10 +call X("_Selection", s:selection, "", "") " 3 -" Vim Highlighting -call X("vimCommand", s:red, "", "none") +call X("_AquaNone", s:aqua, "", "none") " 1 +call X("_BlueNone", s:blue, "", "none") " 1 +call X("_Bold", "", "", "bold") " 1 +call X("_LineBGNone", "", s:line, "none") " 3 +call X("_RedNone", s:red, "", "none") " 2 +call X("_SelectBG", "", s:selection, "") " 2 +call X("_LineBlue", s:line, s:blue, "") " 1 +call X("_PurpleNone", s:purple, "", "none") " 1 -" C Highlighting -call X("cType", s:yellow, "", "") -call X("cStorageClass", s:purple, "", "") -call X("cConditional", s:purple, "", "") -call X("cRepeat", s:purple, "", "") +call X("_AquaPlainNone", s:aqua, s:background, "none") " 1 +call X("_CommentPlain", s:comment, s:background, "") " 2 +call X("_PlainBG", "", s:background, "") " 1 +call X("_PlainBGNone", "", s:background, "none") " 1 +call X("_RedBGPlain", s:background, s:red, "") " 1 +call X("_YellowPlainNone", s:yellow, s:background, "none") " 1 -" PHP Highlighting -call X("phpVarSelector", s:red, "", "") -call X("phpKeyword", s:purple, "", "") -call X("phpRepeat", s:purple, "", "") -call X("phpConditional", s:purple, "", "") -call X("phpStatement", s:purple, "", "") -call X("phpMemberSelector", s:foreground, "", "") +call X("_OrangePlainNone", s:orange, s:background, "none") " 1 +call X("_PurplePlainNone", s:purple, s:background, "none") " 1 -" Ruby Highlighting -call X("rubySymbol", s:green, "", "") -call X("rubyConstant", s:yellow, "", "") -call X("rubyAccess", s:yellow, "", "") -call X("rubyAttribute", s:blue, "", "") -call X("rubyInclude", s:blue, "", "") -call X("rubyLocalVariableOrMethod", s:orange, "", "") -call X("rubyCurlyBlock", s:orange, "", "") -call X("rubyStringDelimiter", s:green, "", "") -call X("rubyInterpolationDelimiter", s:orange, "", "") -call X("rubyConditional", s:purple, "", "") -call X("rubyRepeat", s:purple, "", "") -call X("rubyControl", s:purple, "", "") -call X("rubyException", s:purple, "", "") +call X("_Search", s:background, s:yellow, "") " 1 +call X("_TabLine", s:window, s:foreground, "reverse") " 3 +call X("_VertSplit", s:window, s:window, "none") " 1 +call X("_StatusLine", s:window, s:yellow, "reverse") " 1 +call X("_PMenu", s:foreground, s:selection, "none") " 1 +call X("_PMenuSel", s:foreground, s:selection, "reverse") " 1 +call X("_diffAdd", "", "4c4e39", "") " 1 +call X("_diffChange", "", "2b5b77", "") " 1 -" Crystal Highlighting -call X("crystalSymbol", s:green, "", "") -call X("crystalConstant", s:yellow, "", "") -call X("crystalAccess", s:yellow, "", "") -call X("crystalAttribute", s:blue, "", "") -call X("crystalInclude", s:blue, "", "") -call X("crystalLocalVariableOrMethod", s:orange, "", "") -call X("crystalCurlyBlock", s:orange, "", "") -call X("crystalStringDelimiter", s:green, "", "") -call X("crystalInterpolationDelimiter", s:orange, "", "") -call X("crystalConditional", s:purple, "", "") -call X("crystalRepeat", s:purple, "", "") -call X("crystalControl", s:purple, "", "") -call X("crystalException", s:purple, "", "") - -" Python Highlighting -call X("pythonInclude", s:purple, "", "") -call X("pythonStatement", s:purple, "", "") -call X("pythonConditional", s:purple, "", "") -call X("pythonRepeat", s:purple, "", "") -call X("pythonException", s:purple, "", "") -call X("pythonFunction", s:blue, "", "") -call X("pythonPreCondit", s:purple, "", "") -call X("pythonRepeat", s:aqua, "", "") -call X("pythonExClass", s:orange, "", "") - -" JavaScript Highlighting -call X("javaScriptBraces", s:foreground, "", "") -call X("javaScriptFunction", s:purple, "", "") -call X("javaScriptConditional", s:purple, "", "") -call X("javaScriptRepeat", s:purple, "", "") -call X("javaScriptNumber", s:orange, "", "") -call X("javaScriptMember", s:orange, "", "") -call X("javascriptNull", s:orange, "", "") -call X("javascriptGlobal", s:blue, "", "") -call X("javascriptStatement", s:red, "", "") - -" CoffeeScript Highlighting -call X("coffeeRepeat", s:purple, "", "") -call X("coffeeConditional", s:purple, "", "") -call X("coffeeKeyword", s:purple, "", "") -call X("coffeeObject", s:yellow, "", "") - -" HTML Highlighting -call X("htmlTag", s:red, "", "") -call X("htmlTagName", s:red, "", "") -call X("htmlArg", s:red, "", "") -call X("htmlScriptTag", s:red, "", "") - -" Diff Highlighting -call X("diffAdd", "", "4c4e39", "") -call X("diffDelete", s:background, s:red, "") -call X("diffChange", "", "2B5B77", "") -call X("diffText", s:line, s:blue, "") - -" ShowMarks Highlighting -call X("ShowMarksHLl", s:orange, s:background, "none") -call X("ShowMarksHLo", s:purple, s:background, "none") -call X("ShowMarksHLu", s:yellow, s:background, "none") -call X("ShowMarksHLm", s:aqua, s:background, "none") - -" Lua Highlighting -call X("luaStatement", s:purple, "", "") -call X("luaRepeat", s:purple, "", "") -call X("luaCondStart", s:purple, "", "") -call X("luaCondElseif", s:purple, "", "") -call X("luaCond", s:purple, "", "") -call X("luaCondEnd", s:purple, "", "") - -" Cucumber Highlighting -call X("cucumberGiven", s:blue, "", "") -call X("cucumberGivenAnd", s:blue, "", "") - -" Go Highlighting -call X("goDirective", s:purple, "", "") -call X("goDeclaration", s:purple, "", "") -call X("goStatement", s:purple, "", "") -call X("goConditional", s:purple, "", "") -call X("goConstants", s:orange, "", "") -call X("goTodo", s:yellow, "", "") -call X("goDeclType", s:blue, "", "") -call X("goBuiltins", s:purple, "", "") -call X("goRepeat", s:purple, "", "") -call X("goLabel", s:purple, "", "") - -" Clojure Highlighting -call X("clojureConstant", s:orange, "", "") -call X("clojureBoolean", s:orange, "", "") -call X("clojureCharacter", s:orange, "", "") -call X("clojureKeyword", s:green, "", "") -call X("clojureNumber", s:orange, "", "") -call X("clojureString", s:green, "", "") -call X("clojureRegexp", s:green, "", "") -call X("clojureParen", s:aqua, "", "") -call X("clojureVariable", s:yellow, "", "") -call X("clojureCond", s:blue, "", "") -call X("clojureDefine", s:purple, "", "") -call X("clojureException", s:red, "", "") -call X("clojureFunc", s:blue, "", "") -call X("clojureMacro", s:blue, "", "") -call X("clojureRepeat", s:blue, "", "") -call X("clojureSpecial", s:purple, "", "") -call X("clojureQuote", s:blue, "", "") -call X("clojureUnquote", s:blue, "", "") -call X("clojureMeta", s:blue, "", "") -call X("clojureDeref", s:blue, "", "") -call X("clojureAnonArg", s:blue, "", "") -call X("clojureRepeat", s:blue, "", "") -call X("clojureDispatch", s:blue, "", "") - -" Scala Highlighting -call X("scalaKeyword", s:purple, "", "") -call X("scalaKeywordModifier", s:purple, "", "") -call X("scalaOperator", s:blue, "", "") -call X("scalaPackage", s:red, "", "") -call X("scalaFqn", s:foreground, "", "") -call X("scalaFqnSet", s:foreground, "", "") -call X("scalaImport", s:purple, "", "") -call X("scalaBoolean", s:orange, "", "") -call X("scalaDef", s:purple, "", "") -call X("scalaVal", s:purple, "", "") -call X("scalaVar", s:aqua, "", "") -call X("scalaClass", s:purple, "", "") -call X("scalaObject", s:purple, "", "") -call X("scalaTrait", s:purple, "", "") -call X("scalaDefName", s:blue, "", "") -call X("scalaValName", s:foreground, "", "") -call X("scalaVarName", s:foreground, "", "") -call X("scalaClassName", s:foreground, "", "") -call X("scalaType", s:yellow, "", "") -call X("scalaTypeSpecializer", s:yellow, "", "") -call X("scalaAnnotation", s:orange, "", "") -call X("scalaNumber", s:orange, "", "") -call X("scalaDefSpecializer", s:yellow, "", "") -call X("scalaClassSpecializer", s:yellow, "", "") -call X("scalaBackTick", s:green, "", "") -call X("scalaRoot", s:foreground, "", "") -call X("scalaMethodCall", s:blue, "", "") -call X("scalaCaseType", s:yellow, "", "") -call X("scalaLineComment", s:comment, "", "") -call X("scalaComment", s:comment, "", "") -call X("scalaDocComment", s:comment, "", "") -call X("scalaDocTags", s:comment, "", "") -call X("scalaEmptyString", s:green, "", "") -call X("scalaMultiLineString", s:green, "", "") -call X("scalaUnicode", s:orange, "", "") -call X("scalaString", s:green, "", "") -call X("scalaStringEscape", s:green, "", "") -call X("scalaSymbol", s:orange, "", "") -call X("scalaChar", s:orange, "", "") -call X("scalaXml", s:green, "", "") -call X("scalaConstructorSpecializer", s:yellow, "", "") -call X("scalaBackTick", s:blue, "", "") - -" Git -call X("diffAdded", s:green, "", "") -call X("diffRemoved", s:red, "", "") -call X("gitcommitSummary", "", "", "bold") - -" Delete Functions delf X +" Vim Highlighting +hi! link ColorColumn _LineBGNone +hi! link CursorColumn _LineBGNone +hi! link Directory _Blue +hi! link FoldColumn _PlainBGNone +hi! link Folded _CommentPlain +hi! link LineNr _Selection +hi! link MatchParen _SelectBG +hi! link ModeMsg _Green +hi! link MoreMsg _Green +hi! link NonText _Selection +hi! link PMenu _PMenu +hi! link PMenuSel _PMenuSel +hi! link Question _Green +hi! link Search _Search +hi! link SignColumn _PlainBG +hi! link SpecialKey _Selection +hi! link StatusLine _StatusLine +hi! link StatusLineNC _TabLine +hi! link TabLine _TabLine +hi! link TabLineFill _TabLine +hi! link VertSplit _VertSplit +hi! link Visual _SelectBG +hi! link WarningMsg _Red + +" Standard Highlighting +hi! link Comment _Comment +hi! link Conditional _Plain +hi! link Constant _Orange +hi! link CursorLine _LineBGNone +hi! link Define _PurpleNone +hi! link Function _Blue +hi! link Identifier _RedNone +hi! link Include _Blue +hi! link Keyword _Orange +hi! link Operator _AquaNone +hi! link PreProc _Purple +hi! link Repeat _Plain +hi! link Special _Plain +hi! link Statement _Plain +hi! link String _Green +hi! link Structure _Purple +hi! link Title _Comment +hi! link Todo _CommentPlain +hi! link Type _BlueNone + +hi link vimCommand _RedNone + +hi link ShowMarksHLl _OrangePlainNone +hi link ShowMarksHLm _AquaPlainNone +hi link ShowMarksHLo _PurplePlainNone +hi link ShowMarksHLu _YellowPlainNone + +hi link cConditional _Purple +hi link cRepeat _Purple +hi link cStorageClass _Purple +hi link cType _Yellow + +hi link clojureAnonArg _Blue +hi link clojureBoolean _Orange +hi link clojureCharacter _Orange +hi link clojureCond _Blue +hi link clojureConstant _Orange +hi link clojureDefine _Purple +hi link clojureDeref _Blue +hi link clojureDispatch _Blue +hi link clojureException _Red +hi link clojureFunc _Blue +hi link clojureKeyword _Green +hi link clojureMacro _Blue +hi link clojureMeta _Blue +hi link clojureNumber _Orange +hi link clojureParen _Aqua +hi link clojureQuote _Blue +hi link clojureRegexp _Green +hi link clojureRepeat _Blue +hi link clojureRepeat _Blue +hi link clojureSpecial _Purple +hi link clojureString _Green +hi link clojureUnquote _Blue +hi link clojureVariable _Yellow + +hi link coffeeConditional _Purple +hi link coffeeKeyword _Purple +hi link coffeeObject _Yellow +hi link coffeeRepeat _Purple + +hi link crystalAccess _Yellow +hi link crystalAttribute _Blue +hi link crystalConditional _Purple +hi link crystalConstant _Yellow +hi link crystalControl _Purple +hi link crystalCurlyBlock _Orange +hi link crystalException _Purple +hi link crystalInclude _Blue +hi link crystalInterpolationDelimiter _Orange +hi link crystalLocalVariableOrMethod _Orange +hi link crystalRepeat _Purple +hi link crystalStringDelimiter _Green +hi link crystalSymbol _Green + +hi link cucumberGiven _Blue +hi link cucumberGivenAnd _Blue + +hi link diffAdd _diffAdd +hi link diffChange _diffChange +hi link diffDelete _RedBGPlain +hi link diffText _LineBlue +hi link diffAdded _Green +hi link diffRemoved _Red + +hi link gitcommitSummary _Bold + +hi link goBuiltins _Purple +hi link goConditional _Purple +hi link goConstants _Orange +hi link goDeclType _Blue +hi link goDeclaration _Purple +hi link goDirective _Purple +hi link goLabel _Purple +hi link goRepeat _Purple +hi link goStatement _Purple +hi link goTodo _Yellow + +hi link htmlArg _Red +hi link htmlScriptTag _Red +hi link htmlTag _Red +hi link htmlTagName _Red + +hi link javaScriptBraces _Plain +hi link javaScriptConditional _Purple +hi link javaScriptFunction _Purple +hi link javaScriptMember _Orange +hi link javaScriptNumber _Orange +hi link javaScriptRepeat _Purple +hi link javascriptGlobal _Blue +hi link javascriptNull _Orange +hi link javascriptStatement _Red + +hi link luaCond _Purple +hi link luaCondElseif _Purple +hi link luaCondEnd _Purple +hi link luaCondStart _Purple +hi link luaRepeat _Purple +hi link luaStatement _Purple + +hi link phpConditional _Purple +hi link phpKeyword _Purple +hi link phpMemberSelector _Plain +hi link phpRepeat _Purple +hi link phpStatement _Purple +hi link phpVarSelector _Red + +hi link pythonConditional _Purple +hi link pythonExClass _Orange +hi link pythonException _Purple +hi link pythonFunction _Blue +hi link pythonInclude _Purple +hi link pythonPreCondit _Purple +hi link pythonRepeat _Aqua +hi link pythonRepeat _Purple +hi link pythonStatement _Purple + +hi link rubyAccess _Yellow +hi link rubyAttribute _Blue +hi link rubyConditional _Purple +hi link rubyConstant _Yellow +hi link rubyControl _Purple +hi link rubyCurlyBlock _Orange +hi link rubyException _Purple +hi link rubyInclude _Blue +hi link rubyInterpolationDelimiter _Orange +hi link rubyLocalVariableOrMethod _Orange +hi link rubyRepeat _Purple +hi link rubyStringDelimiter _Green +hi link rubySymbol _Green + +hi link scalaAnnotation _Orange +hi link scalaBackTick _Blue +hi link scalaBackTick _Green +hi link scalaBoolean _Orange +hi link scalaCaseType _Yellow +hi link scalaChar _Orange +hi link scalaClass _Purple +hi link scalaClassName _Plain +hi link scalaClassSpecializer _Yellow +hi link scalaComment _Comment +hi link scalaConstructorSpecializer _Yellow +hi link scalaDef _Purple +hi link scalaDefName _Blue +hi link scalaDefSpecializer _Yellow +hi link scalaDocComment _Comment +hi link scalaDocTags _Comment +hi link scalaEmptyString _Green +hi link scalaFqn _Plain +hi link scalaFqnSet _Plain +hi link scalaImport _Purple +hi link scalaKeyword _Purple +hi link scalaKeywordModifier _Purple +hi link scalaLineComment _Comment +hi link scalaMethodCall _Blue +hi link scalaMultiLineString _Green +hi link scalaNumber _Orange +hi link scalaObject _Purple +hi link scalaOperator _Blue +hi link scalaPackage _Red +hi link scalaRoot _Plain +hi link scalaString _Green +hi link scalaStringEscape _Green +hi link scalaSymbol _Orange +hi link scalaTrait _Purple +hi link scalaType _Yellow +hi link scalaTypeSpecializer _Yellow +hi link scalaUnicode _Orange +hi link scalaVal _Purple +hi link scalaValName _Plain +hi link scalaVar _Aqua +hi link scalaVarName _Plain +hi link scalaXml _Green + set background=dark From 1fb9ff620a27330d4c8b5989c46bf85333b94ed5 Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Fri, 3 Apr 2015 01:32:48 -0700 Subject: [PATCH 3/4] just freakin' include pathogen --- vim/autoload/pathogen.vim | 347 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 347 insertions(+) create mode 100644 vim/autoload/pathogen.vim diff --git a/vim/autoload/pathogen.vim b/vim/autoload/pathogen.vim new file mode 100644 index 0000000..a13ae08 --- /dev/null +++ b/vim/autoload/pathogen.vim @@ -0,0 +1,347 @@ +" pathogen.vim - path option manipulation +" Maintainer: Tim Pope +" Version: 2.3 + +" Install in ~/.vim/autoload (or ~\vimfiles\autoload). +" +" For management of individually installed plugins in ~/.vim/bundle (or +" ~\vimfiles\bundle), adding `execute pathogen#infect()` to the top of your +" .vimrc is the only other setup necessary. +" +" The API is documented inline below. + +if exists("g:loaded_pathogen") || &cp + finish +endif +let g:loaded_pathogen = 1 + +" Point of entry for basic default usage. Give a relative path to invoke +" pathogen#interpose() (defaults to "bundle/{}"), or an absolute path to invoke +" pathogen#surround(). Curly braces are expanded with pathogen#expand(): +" "bundle/{}" finds all subdirectories inside "bundle" inside all directories +" in the runtime path. +function! pathogen#infect(...) abort + for path in a:0 ? filter(reverse(copy(a:000)), 'type(v:val) == type("")') : ['bundle/{}'] + if path =~# '^\%({\=[$~\\/]\|{\=\w:[\\/]\).*[{}*]' + call pathogen#surround(path) + elseif path =~# '^\%([$~\\/]\|\w:[\\/]\)' + call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')') + call pathogen#surround(path . '/{}') + elseif path =~# '[{}*]' + call pathogen#interpose(path) + else + call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')') + call pathogen#interpose(path . '/{}') + endif + endfor + call pathogen#cycle_filetype() + if pathogen#is_disabled($MYVIMRC) + return 'finish' + endif + return '' +endfunction + +" Split a path into a list. +function! pathogen#split(path) abort + if type(a:path) == type([]) | return a:path | endif + if empty(a:path) | return [] | endif + let split = split(a:path,'\\\@]','\\&','') + endif +endfunction + +" Like findfile(), but hardcoded to use the runtimepath. +function! pathogen#runtime_findfile(file,count) abort "{{{1 + let rtp = pathogen#join(1,pathogen#split(&rtp)) + let file = findfile(a:file,rtp,a:count) + if file ==# '' + return '' + else + return fnamemodify(file,':p') + endif +endfunction + +" Section: Deprecated + +function! s:warn(msg) abort + echohl WarningMsg + echomsg a:msg + echohl NONE +endfunction + +" Prepend all subdirectories of path to the rtp, and append all 'after' +" directories in those subdirectories. Deprecated. +function! pathogen#runtime_prepend_subdirectories(path) abort + call s:warn('Change pathogen#runtime_prepend_subdirectories('.string(a:path).') to pathogen#infect('.string(a:path.'/{}').')') + return pathogen#surround(a:path . pathogen#slash() . '{}') +endfunction + +function! pathogen#incubate(...) abort + let name = a:0 ? a:1 : 'bundle/{}' + call s:warn('Change pathogen#incubate('.(a:0 ? string(a:1) : '').') to pathogen#infect('.string(name).')') + return pathogen#interpose(name) +endfunction + +" Deprecated alias for pathogen#interpose(). +function! pathogen#runtime_append_all_bundles(...) abort + if a:0 + call s:warn('Change pathogen#runtime_append_all_bundles('.string(a:1).') to pathogen#infect('.string(a:1.'/{}').')') + else + call s:warn('Change pathogen#runtime_append_all_bundles() to pathogen#infect()') + endif + return pathogen#interpose(a:0 ? a:1 . '/{}' : 'bundle/{}') +endfunction + +if exists(':Vedit') + finish +endif + +let s:vopen_warning = 0 + +function! s:find(count,cmd,file,lcd) + let rtp = pathogen#join(1,pathogen#split(&runtimepath)) + let file = pathogen#runtime_findfile(a:file,a:count) + if file ==# '' + return "echoerr 'E345: Can''t find file \"".a:file."\" in runtimepath'" + endif + if !s:vopen_warning + let s:vopen_warning = 1 + let warning = '|echohl WarningMsg|echo "Install scriptease.vim to continue using :V'.a:cmd.'"|echohl NONE' + else + let warning = '' + endif + if a:lcd + let path = file[0:-strlen(a:file)-2] + execute 'lcd `=path`' + return a:cmd.' '.pathogen#fnameescape(a:file) . warning + else + return a:cmd.' '.pathogen#fnameescape(file) . warning + endif +endfunction + +function! s:Findcomplete(A,L,P) + let sep = pathogen#slash() + let cheats = { + \'a': 'autoload', + \'d': 'doc', + \'f': 'ftplugin', + \'i': 'indent', + \'p': 'plugin', + \'s': 'syntax'} + if a:A =~# '^\w[\\/]' && has_key(cheats,a:A[0]) + let request = cheats[a:A[0]].a:A[1:-1] + else + let request = a:A + endif + let pattern = substitute(request,'/\|\'.sep,'*'.sep,'g').'*' + let found = {} + for path in pathogen#split(&runtimepath) + let path = expand(path, ':p') + let matches = split(glob(path.sep.pattern),"\n") + call map(matches,'isdirectory(v:val) ? v:val.sep : v:val') + call map(matches,'expand(v:val, ":p")[strlen(path)+1:-1]') + for match in matches + let found[match] = 1 + endfor + endfor + return sort(keys(found)) +endfunction + +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Ve :execute s:find(,'edit',,0) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vedit :execute s:find(,'edit',,0) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vopen :execute s:find(,'edit',,1) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vsplit :execute s:find(,'split',,1) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vvsplit :execute s:find(,'vsplit',,1) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vtabedit :execute s:find(,'tabedit',,1) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vpedit :execute s:find(,'pedit',,1) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vread :execute s:find(,'read',,1) + +" vim:set et sw=2 foldmethod=expr foldexpr=getline(v\:lnum)=~'^\"\ Section\:'?'>1'\:getline(v\:lnum)=~#'^fu'?'a1'\:getline(v\:lnum)=~#'^endf'?'s1'\:'=': From f233136bba1bfe99bddf60279bab1d52e870b1b9 Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Sat, 4 Apr 2015 00:14:55 -0700 Subject: [PATCH 4/4] quick insert one character --- home/vimrc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/home/vimrc b/home/vimrc index 35493d3..273864f 100644 --- a/home/vimrc +++ b/home/vimrc @@ -247,6 +247,8 @@ let leader="\\" " no-op nn : "ino " this doesn't workkkkkkkkk +nm i i?r +nm a a?r nn p "0p nn P "0P nn e :tabe