From c47bdd32d653df6467f012f357a12d906708b1af Mon Sep 17 00:00:00 2001 From: bood Date: Sat, 17 Aug 2013 19:58:31 +0200 Subject: [PATCH] pre final status --- install_basic_vimrc.sh | 3 +- sources_forked/vim-irblack-forked/README | 11 - .../vim-irblack-forked/colors/ir_black.vim | 220 -- sources_forked/vim-peepopen/README.md | 38 - .../vim-peepopen/plugin/peepopen.vim | 57 - ...Powerline_default_default_compatible.cache | 4 - sources_forked/vim-powerline/README.md | 0 sources_forked/vim-powerline/README.rst | 107 - sources_forked/vim-powerline/autoload/Pl.vim | 183 -- .../vim-powerline/autoload/Pl/Colorscheme.vim | 145 - .../vim-powerline/autoload/Pl/Hi.vim | 140 - .../vim-powerline/autoload/Pl/Match.vim | 43 - .../vim-powerline/autoload/Pl/Mod.vim | 40 - .../vim-powerline/autoload/Pl/Parser.vim | 371 --- .../vim-powerline/autoload/Pl/Segment.vim | 188 -- .../vim-powerline/autoload/Pl/Theme.vim | 100 - .../Powerline/Colorschemes/default.vim | 166 -- .../autoload/Powerline/Colorschemes/skwp.vim | 192 -- .../autoload/Powerline/Functions.vim | 141 - .../autoload/Powerline/Functions/ft_man.vim | 12 - .../autoload/Powerline/Functions/fugitive.vim | 7 - .../autoload/Powerline/Functions/hgrev.vim | 17 - .../Powerline/Functions/syntastic.vim | 16 - .../autoload/Powerline/Matches.vim | 13 - .../autoload/Powerline/Segments.vim | 30 - .../autoload/Powerline/Segments/ctrlp.vim | 20 - .../autoload/Powerline/Segments/ft_man.vim | 3 - .../autoload/Powerline/Segments/fugitive.vim | 5 - .../autoload/Powerline/Segments/hgrev.vim | 4 - .../autoload/Powerline/Segments/rvm.vim | 6 - .../autoload/Powerline/Segments/syntastic.vim | 5 - .../autoload/Powerline/Segments/tagbar.vim | 6 - .../Powerline/Segments/virtualenv.vim | 5 - .../autoload/Powerline/Themes/default.vim | 116 - .../autoload/Powerline/Themes/skwp.vim | 116 - .../vim-powerline/doc/Powerline.txt | 429 --- sources_forked/vim-powerline/doc/tags | 34 - .../fontpatcher/PowerlineSymbols.sfd | 319 --- .../vim-powerline/fontpatcher/README.rst | 164 -- .../vim-powerline/fontpatcher/fontpatcher | 240 -- .../vim-powerline/plugin/Powerline.vim | 69 - sources_forked/yankring/doc/yankring.txt | 1412 ---------- sources_forked/yankring/plugin/yankring.vim | 2461 ----------------- sources_non_forked/ack.vim/.gitignore | 1 - sources_non_forked/ack.vim/README.md | 114 - sources_non_forked/ack.vim/Rakefile | 23 - sources_non_forked/ack.vim/doc/ack.txt | 84 - sources_non_forked/ack.vim/plugin/ack.vim | 120 - sources_non_forked/bufexplorer/doc/tags | 24 + sources_non_forked/nginx-vim/README.md | 7 - .../nginx-vim/ftdetect/nginx.vim | 2 - sources_non_forked/nginx-vim/indent/nginx.vim | 9 - sources_non_forked/nginx-vim/syntax/nginx.vim | 664 ----- sources_non_forked/pyflake | 1 + sources_non_forked/pyflakes/README | 18 + .../pyflakes/ftplugin/python_pyflakes.vim | 73 + sources_non_forked/taglist.vim/doc/tags | 62 + .../vim-coffee-script/.gitignore | 4 - .../vim-coffee-script/Copying.md | 15 - sources_non_forked/vim-coffee-script/Makefile | 25 - sources_non_forked/vim-coffee-script/News.md | 18 - .../vim-coffee-script/Readme.md | 270 -- .../vim-coffee-script/Thanks.md | 44 - sources_non_forked/vim-coffee-script/Todo.md | 1 - .../vim-coffee-script/after/syntax/haml.vim | 9 - .../vim-coffee-script/after/syntax/html.vim | 11 - .../vim-coffee-script/compiler/coffee.vim | 82 - .../vim-coffee-script/doc/coffee-script.txt | 143 - .../vim-coffee-script/ftdetect/coffee.vim | 17 - .../vim-coffee-script/ftdetect/eco.vim | 1 - .../vim-coffee-script/ftplugin/coffee.vim | 263 -- .../vim-coffee-script/indent/coffee.vim | 351 --- .../vim-coffee-script/syntax/coffee.vim | 221 -- .../vim-coffee-script/syntax/eco.vim | 62 - .../vim-coffee-script/test/test-eco.html.eco | 12 - .../vim-coffee-script/test/test-interp.coffee | 3 - .../vim-coffee-script/test/test-ops.coffee | 90 - .../test/test-reserved.coffee | 27 - .../vim-coffee-script/test/test.html | 7 - sources_non_forked/vim-expand-region/doc/tags | 10 + .../vim-indent-object/.gitignore | 2 - .../vim-indent-object/doc/indent-object.txt | 120 - .../plugin/indent-object.vim | 224 -- .../vim-multiple-cursors/doc/tags | 21 + sources_non_forked/vim-pep8/README.mdown | 35 + .../vim-pep8/ftplugin/python_pep8.vim | 78 + .../vim-snipmate/doc/SnipMate.txt | 455 +++ .../vim-snippets/UltiSnips/elixir.snippets | 168 ++ .../UltiSnips/javascript_ember.snippets | 88 + .../vim-snippets/snippets/ls.snippets | 108 + sources_non_forked/vim-statline | 1 + update_plugins.py | 5 +- vimrcs/TODO | 1 + vimrcs/basic.vim | 156 +- vimrcs/extended.vim | 46 - vimrcs/filetypes.vim | 5 +- .../README => vimrcs/functions.vim | 0 vimrcs/plugins_config.vim | 16 - vimrcs/vimrc_bood.vim | 231 ++ 99 files changed, 1441 insertions(+), 10865 deletions(-) delete mode 100644 sources_forked/vim-irblack-forked/README delete mode 100644 sources_forked/vim-irblack-forked/colors/ir_black.vim delete mode 100644 sources_forked/vim-peepopen/README.md delete mode 100644 sources_forked/vim-peepopen/plugin/peepopen.vim delete mode 100644 sources_forked/vim-powerline/Powerline_default_default_compatible.cache delete mode 100644 sources_forked/vim-powerline/README.md delete mode 100755 sources_forked/vim-powerline/README.rst delete mode 100755 sources_forked/vim-powerline/autoload/Pl.vim delete mode 100755 sources_forked/vim-powerline/autoload/Pl/Colorscheme.vim delete mode 100755 sources_forked/vim-powerline/autoload/Pl/Hi.vim delete mode 100755 sources_forked/vim-powerline/autoload/Pl/Match.vim delete mode 100755 sources_forked/vim-powerline/autoload/Pl/Mod.vim delete mode 100755 sources_forked/vim-powerline/autoload/Pl/Parser.vim delete mode 100755 sources_forked/vim-powerline/autoload/Pl/Segment.vim delete mode 100755 sources_forked/vim-powerline/autoload/Pl/Theme.vim delete mode 100755 sources_forked/vim-powerline/autoload/Powerline/Colorschemes/default.vim delete mode 100755 sources_forked/vim-powerline/autoload/Powerline/Colorschemes/skwp.vim delete mode 100755 sources_forked/vim-powerline/autoload/Powerline/Functions.vim delete mode 100755 sources_forked/vim-powerline/autoload/Powerline/Functions/ft_man.vim delete mode 100755 sources_forked/vim-powerline/autoload/Powerline/Functions/fugitive.vim delete mode 100755 sources_forked/vim-powerline/autoload/Powerline/Functions/hgrev.vim delete mode 100755 sources_forked/vim-powerline/autoload/Powerline/Functions/syntastic.vim delete mode 100755 sources_forked/vim-powerline/autoload/Powerline/Matches.vim delete mode 100755 sources_forked/vim-powerline/autoload/Powerline/Segments.vim delete mode 100755 sources_forked/vim-powerline/autoload/Powerline/Segments/ctrlp.vim delete mode 100755 sources_forked/vim-powerline/autoload/Powerline/Segments/ft_man.vim delete mode 100755 sources_forked/vim-powerline/autoload/Powerline/Segments/fugitive.vim delete mode 100755 sources_forked/vim-powerline/autoload/Powerline/Segments/hgrev.vim delete mode 100755 sources_forked/vim-powerline/autoload/Powerline/Segments/rvm.vim delete mode 100755 sources_forked/vim-powerline/autoload/Powerline/Segments/syntastic.vim delete mode 100755 sources_forked/vim-powerline/autoload/Powerline/Segments/tagbar.vim delete mode 100755 sources_forked/vim-powerline/autoload/Powerline/Segments/virtualenv.vim delete mode 100755 sources_forked/vim-powerline/autoload/Powerline/Themes/default.vim delete mode 100755 sources_forked/vim-powerline/autoload/Powerline/Themes/skwp.vim delete mode 100755 sources_forked/vim-powerline/doc/Powerline.txt delete mode 100644 sources_forked/vim-powerline/doc/tags delete mode 100755 sources_forked/vim-powerline/fontpatcher/PowerlineSymbols.sfd delete mode 100755 sources_forked/vim-powerline/fontpatcher/README.rst delete mode 100755 sources_forked/vim-powerline/fontpatcher/fontpatcher delete mode 100755 sources_forked/vim-powerline/plugin/Powerline.vim delete mode 100755 sources_forked/yankring/doc/yankring.txt delete mode 100755 sources_forked/yankring/plugin/yankring.vim delete mode 100644 sources_non_forked/ack.vim/.gitignore delete mode 100644 sources_non_forked/ack.vim/README.md delete mode 100644 sources_non_forked/ack.vim/Rakefile delete mode 100644 sources_non_forked/ack.vim/doc/ack.txt delete mode 100644 sources_non_forked/ack.vim/plugin/ack.vim create mode 100644 sources_non_forked/bufexplorer/doc/tags delete mode 100755 sources_non_forked/nginx-vim/README.md delete mode 100755 sources_non_forked/nginx-vim/ftdetect/nginx.vim delete mode 100755 sources_non_forked/nginx-vim/indent/nginx.vim delete mode 100755 sources_non_forked/nginx-vim/syntax/nginx.vim create mode 160000 sources_non_forked/pyflake create mode 100644 sources_non_forked/pyflakes/README create mode 100644 sources_non_forked/pyflakes/ftplugin/python_pyflakes.vim create mode 100644 sources_non_forked/taglist.vim/doc/tags delete mode 100644 sources_non_forked/vim-coffee-script/.gitignore delete mode 100644 sources_non_forked/vim-coffee-script/Copying.md delete mode 100644 sources_non_forked/vim-coffee-script/Makefile delete mode 100644 sources_non_forked/vim-coffee-script/News.md delete mode 100644 sources_non_forked/vim-coffee-script/Readme.md delete mode 100644 sources_non_forked/vim-coffee-script/Thanks.md delete mode 100644 sources_non_forked/vim-coffee-script/Todo.md delete mode 100644 sources_non_forked/vim-coffee-script/after/syntax/haml.vim delete mode 100644 sources_non_forked/vim-coffee-script/after/syntax/html.vim delete mode 100644 sources_non_forked/vim-coffee-script/compiler/coffee.vim delete mode 100644 sources_non_forked/vim-coffee-script/doc/coffee-script.txt delete mode 100644 sources_non_forked/vim-coffee-script/ftdetect/coffee.vim delete mode 100644 sources_non_forked/vim-coffee-script/ftdetect/eco.vim delete mode 100644 sources_non_forked/vim-coffee-script/ftplugin/coffee.vim delete mode 100644 sources_non_forked/vim-coffee-script/indent/coffee.vim delete mode 100644 sources_non_forked/vim-coffee-script/syntax/coffee.vim delete mode 100644 sources_non_forked/vim-coffee-script/syntax/eco.vim delete mode 100644 sources_non_forked/vim-coffee-script/test/test-eco.html.eco delete mode 100644 sources_non_forked/vim-coffee-script/test/test-interp.coffee delete mode 100644 sources_non_forked/vim-coffee-script/test/test-ops.coffee delete mode 100644 sources_non_forked/vim-coffee-script/test/test-reserved.coffee delete mode 100644 sources_non_forked/vim-coffee-script/test/test.html create mode 100644 sources_non_forked/vim-expand-region/doc/tags delete mode 100644 sources_non_forked/vim-indent-object/.gitignore delete mode 100644 sources_non_forked/vim-indent-object/doc/indent-object.txt delete mode 100644 sources_non_forked/vim-indent-object/plugin/indent-object.vim create mode 100644 sources_non_forked/vim-multiple-cursors/doc/tags create mode 100644 sources_non_forked/vim-pep8/README.mdown create mode 100644 sources_non_forked/vim-pep8/ftplugin/python_pep8.vim create mode 100644 sources_non_forked/vim-snipmate/doc/SnipMate.txt create mode 100644 sources_non_forked/vim-snippets/UltiSnips/elixir.snippets create mode 100644 sources_non_forked/vim-snippets/UltiSnips/javascript_ember.snippets create mode 100644 sources_non_forked/vim-snippets/snippets/ls.snippets create mode 160000 sources_non_forked/vim-statline create mode 100644 vimrcs/TODO rename sources_forked/vim-peepopen/README => vimrcs/functions.vim (100%) create mode 100644 vimrcs/vimrc_bood.vim diff --git a/install_basic_vimrc.sh b/install_basic_vimrc.sh index 3478144d..a7e6a709 100644 --- a/install_basic_vimrc.sh +++ b/install_basic_vimrc.sh @@ -1,3 +1,4 @@ cd ~/.vim_runtime -cat ~/.vim_runtime/vimrcs/basic.vim > ~/.vimrc +mv ~/.vimrc ~/.vimrc_old +ln -s ~/.vim_runtime/vimrcs/basic.vim ~/.vimrc echo "Installed the Basic Vim configuration successfully! Enjoy :-)" diff --git a/sources_forked/vim-irblack-forked/README b/sources_forked/vim-irblack-forked/README deleted file mode 100644 index 089fe730..00000000 --- a/sources_forked/vim-irblack-forked/README +++ /dev/null @@ -1,11 +0,0 @@ -This is a version of Infinite Red's vim theme (http://blog.infinitered.com/entries/show/8) packaged to work with Tim Pope's pathogen plugin (http://www.vim.org/scripts/script.php?script_id=2332). - -To use it (assuming you're using pathogen): - -- go to your bundle directory (.vim/bundle or .vimbundles) and clone the repo: - - git clone git@github.com:wgibbs/vim-irblack.git - -- edit your .vimrc and add: - - :colorscheme ir_black diff --git a/sources_forked/vim-irblack-forked/colors/ir_black.vim b/sources_forked/vim-irblack-forked/colors/ir_black.vim deleted file mode 100644 index b06b12e2..00000000 --- a/sources_forked/vim-irblack-forked/colors/ir_black.vim +++ /dev/null @@ -1,220 +0,0 @@ -" ir_black color scheme -" More at: http://blog.infinitered.com/entries/show/8 - - -" ******************************************************************************** -" Standard colors used in all ir_black themes: -" Note, x:x:x are RGB values -" -" normal: #f6f3e8 -" -" string: #A8FF60 168:255:96 -" string inner (punc, code, etc): #00A0A0 0:160:160 -" number: #FF73FD 255:115:253 -" comments: #7C7C7C 124:124:124 -" keywords: #96CBFE 150:203:254 -" operators: white -" class: #FFFFB6 255:255:182 -" method declaration name: #FFD2A7 255:210:167 -" regular expression: #E9C062 233:192:98 -" regexp alternate: #FF8000 255:128:0 -" regexp alternate 2: #B18A3D 177:138:61 -" variable: #C6C5FE 198:197:254 -" -" Misc colors: -" red color (used for whatever): #FF6C60 255:108:96 -" light red: #FFB6B0 255:182:176 -" -" brown: #E18964 good for special -" -" lightpurpleish: #FFCCFF -" -" Interface colors: -" background color: black -" cursor (where underscore is used): #FFA560 255:165:96 -" cursor (where block is used): white -" visual selection: #1D1E2C -" current line: #151515 21:21:21 -" search selection: #07281C 7:40:28 -" line number: #3D3D3D 61:61:61 - - -" ******************************************************************************** -" The following are the preferred 16 colors for your terminal -" Colors Bright Colors -" Black #4E4E4E #7C7C7C -" Red #FF6C60 #FFB6B0 -" Green #A8FF60 #CEFFAB -" Yellow #FFFFB6 #FFFFCB -" Blue #96CBFE #FFFFCB -" Magenta #FF73FD #FF9CFE -" Cyan #C6C5FE #DFDFFE -" White #EEEEEE #FFFFFF - - -" ******************************************************************************** -set background=dark -hi clear - -if exists("syntax_on") - syntax reset -endif - -let colors_name = "ir_black" - - -"hi Example guifg=NONE guibg=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE - -" General colors -hi Normal guifg=#f6f3e8 guibg=black gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE -hi NonText guifg=#070707 guibg=black gui=NONE ctermfg=black ctermbg=NONE cterm=NONE - -hi Cursor guifg=black guibg=white gui=NONE ctermfg=black ctermbg=white cterm=reverse -hi LineNr guifg=#3D3D3D guibg=black gui=NONE ctermfg=darkgray ctermbg=NONE cterm=NONE - -hi VertSplit guifg=#202020 guibg=#202020 gui=NONE ctermfg=darkgray ctermbg=darkgray cterm=NONE -hi StatusLine guifg=#CCCCCC guibg=#202020 gui=None ctermfg=white ctermbg=darkgray cterm=NONE -hi StatusLineNC guifg=black guibg=#202020 gui=NONE ctermfg=blue ctermbg=darkgray cterm=NONE - -hi Folded guifg=#a0a8b0 guibg=#384048 gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE -hi Title guifg=#f6f3e8 guibg=NONE gui=bold ctermfg=NONE ctermbg=NONE cterm=NONE -hi Visual guifg=NONE guibg=DarkBlue gui=NONE ctermfg=NONE ctermbg=darkgray cterm=NONE - -hi SpecialKey guifg=#808080 guibg=#343434 gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE - -hi WildMenu guifg=white guibg=DarkRed gui=NONE ctermfg=white ctermbg=DarkRed cterm=NONE -hi PmenuSbar guifg=black guibg=white gui=NONE ctermfg=black ctermbg=white cterm=NONE -"hi Ignore guifg=gray guibg=black gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE - -hi Error guifg=NONE guibg=red gui=undercurl ctermfg=white ctermbg=red cterm=NONE guisp=#FF6C60 " undercurl color -hi ErrorMsg guifg=white guibg=#FF6C60 gui=BOLD ctermfg=white ctermbg=red cterm=NONE -hi WarningMsg guifg=white guibg=#FF6C60 gui=BOLD ctermfg=white ctermbg=red cterm=NONE - -" Message displayed in lower left, such as --INSERT-- -hi ModeMsg guifg=black guibg=#C6C5FE gui=BOLD ctermfg=black ctermbg=cyan cterm=BOLD - -if version >= 700 " Vim 7.x specific colors - hi CursorLine guifg=NONE guibg=#121212 gui=NONE ctermfg=NONE ctermbg=NONE cterm=BOLD - hi CursorColumn guifg=NONE guibg=#121212 gui=NONE ctermfg=NONE ctermbg=NONE cterm=BOLD - hi MatchParen guifg=#f6f3e8 guibg=#857b6f gui=BOLD ctermfg=white ctermbg=darkgray cterm=NONE - hi Pmenu guifg=#f6f3e8 guibg=#444444 gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE - hi PmenuSel guifg=#000000 guibg=#cae682 gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE - hi Search guifg=NONE guibg=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE -endif - -" Syntax highlighting -hi Comment guifg=#7C7C7C guibg=NONE gui=NONE ctermfg=darkgray ctermbg=NONE cterm=NONE -hi String guifg=#A8FF60 guibg=NONE gui=NONE ctermfg=green ctermbg=NONE cterm=NONE -hi Number guifg=#FF73FD guibg=NONE gui=NONE ctermfg=magenta ctermbg=NONE cterm=NONE - -hi Keyword guifg=#96CBFE guibg=NONE gui=NONE ctermfg=blue ctermbg=NONE cterm=NONE -hi PreProc guifg=#96CBFE guibg=NONE gui=NONE ctermfg=blue ctermbg=NONE cterm=NONE -hi Conditional guifg=#6699CC guibg=NONE gui=NONE ctermfg=blue ctermbg=NONE cterm=NONE " if else end - -hi Todo guifg=#8f8f8f guibg=NONE gui=NONE ctermfg=red ctermbg=NONE cterm=NONE -hi Constant guifg=#99CC99 guibg=NONE gui=NONE ctermfg=cyan ctermbg=NONE cterm=NONE - -hi Identifier guifg=#C6C5FE guibg=NONE gui=NONE ctermfg=cyan ctermbg=NONE cterm=NONE -hi Function guifg=#FFD2A7 guibg=NONE gui=NONE ctermfg=brown ctermbg=NONE cterm=NONE -hi Type guifg=#FFFFB6 guibg=NONE gui=NONE ctermfg=yellow ctermbg=NONE cterm=NONE -hi Statement guifg=#6699CC guibg=NONE gui=NONE ctermfg=lightblue ctermbg=NONE cterm=NONE - -hi Special guifg=#E18964 guibg=NONE gui=NONE ctermfg=white ctermbg=NONE cterm=NONE -hi Delimiter guifg=#00A0A0 guibg=NONE gui=NONE ctermfg=cyan ctermbg=NONE cterm=NONE -hi Operator guifg=#6699CC guibg=NONE gui=NONE ctermfg=blue ctermbg=NONE cterm=NONE - -hi link Character Constant -hi link Boolean Constant -hi link Float Number -hi link Repeat Statement -hi link Label Statement -hi link Exception Statement -hi link Include PreProc -hi link Define PreProc -hi link Macro PreProc -hi link PreCondit PreProc -hi link StorageClass Type -hi link Structure Type -hi link Typedef Type -hi link Tag Special -hi link SpecialChar Special -hi link SpecialComment Special -hi link Debug Special - - -" Special for Ruby -hi rubyRegexp guifg=#B18A3D guibg=NONE gui=NONE ctermfg=brown ctermbg=NONE cterm=NONE -hi rubyRegexpDelimiter guifg=#FF8000 guibg=NONE gui=NONE ctermfg=brown ctermbg=NONE cterm=NONE -hi rubyEscape guifg=white guibg=NONE gui=NONE ctermfg=cyan ctermbg=NONE cterm=NONE -hi rubyInterpolationDelimiter guifg=#00A0A0 guibg=NONE gui=NONE ctermfg=blue ctermbg=NONE cterm=NONE -hi rubyControl guifg=#6699CC guibg=NONE gui=NONE ctermfg=blue ctermbg=NONE cterm=NONE "and break, etc -"hi rubyGlobalVariable guifg=#FFCCFF guibg=NONE gui=NONE ctermfg=lightblue ctermbg=NONE cterm=NONE "yield -hi rubyStringDelimiter guifg=#336633 guibg=NONE gui=NONE ctermfg=lightgreen ctermbg=NONE cterm=NONE -"rubyInclude -"rubySharpBang -"rubyAccess -"rubyPredefinedVariable -"rubyBoolean -"rubyClassVariable -"rubyBeginEnd -"rubyRepeatModifier -"hi link rubyArrayDelimiter Special " [ , , ] -"rubyCurlyBlock { , , } - -hi link rubyClass Keyword -hi link rubyModule Keyword -hi link rubyKeyword Keyword -hi link rubyOperator Operator -hi link rubyIdentifier Identifier -hi link rubyInstanceVariable Identifier -hi link rubyGlobalVariable Identifier -hi link rubyClassVariable Identifier -hi link rubyConstant Type - - -" Special for Java -" hi link javaClassDecl Type -hi link javaScopeDecl Identifier -hi link javaCommentTitle javaDocSeeTag -hi link javaDocTags javaDocSeeTag -hi link javaDocParam javaDocSeeTag -hi link javaDocSeeTagParam javaDocSeeTag - -hi javaDocSeeTag guifg=#CCCCCC guibg=NONE gui=NONE ctermfg=darkgray ctermbg=NONE cterm=NONE -hi javaDocSeeTag guifg=#CCCCCC guibg=NONE gui=NONE ctermfg=darkgray ctermbg=NONE cterm=NONE -"hi javaClassDecl guifg=#CCFFCC guibg=NONE gui=NONE ctermfg=white ctermbg=NONE cterm=NONE - - -" Special for XML -hi link xmlTag Keyword -hi link xmlTagName Conditional -hi link xmlEndTag Identifier - - -" Special for HTML -hi link htmlTag Keyword -hi link htmlTagName Conditional -hi link htmlEndTag Identifier - - -" Special for Javascript -hi link javaScriptNumber Number - - -" Special for Python -"hi link pythonEscape Keyword - - -" Special for CSharp -hi link csXmlTag Keyword - - -" Amix customizations - -" Tab line -hi TabLineFill guifg=#000000 guibg=#000000 gui=NONE -hi TabLine guifg=black guibg=#888888 gui=NONE -hi TabLineSel guifg=white guibg=#000000 gui=bold - -" Search higlights -hi Search guifg=White guibg=DarkRed gui=NONE diff --git a/sources_forked/vim-peepopen/README.md b/sources_forked/vim-peepopen/README.md deleted file mode 100644 index 290acee8..00000000 --- a/sources_forked/vim-peepopen/README.md +++ /dev/null @@ -1,38 +0,0 @@ -vim-peepopen -============= - -A plugin for the Vim text editor. PeepOpen provides fuzzy search of filenames and paths in a programming project. - -Installation ------------- - -Get the PeepOpen.app and open it at least once to approve the Mac OS X security dialog. - -Standard: - -Copy `peepopen.vim` to your `~/.vim/plugin` directory. - -With Tim Pope's [Pathogen](http://github.com/tpope/vim-pathogen): - -Copy the entire `vim-peepopen` plugin directory to your `~/.vim/bundle` directory. - -Usage ------ - -`p` opens the current project directory with the PeepOpen application. - -Use the [vim-rooter](https://github.com/airblade/vim-rooter) plugin for automatic assignment of the current working directory for projects stored in Git. - -(Leader is mapped to '\' by default) - -### Options -Automatically quit PeepOpen when Vim exits. - -`let p:peepopen_quit = 1` - -Credits -------- - -- Initial Vim Plugin by [Andrew Stewart](http://www.airbladesoftware.com/). -- Some plugin boilerplate from [Rein Henrichs](http://reinh.com/). - diff --git a/sources_forked/vim-peepopen/plugin/peepopen.vim b/sources_forked/vim-peepopen/plugin/peepopen.vim deleted file mode 100644 index eadb413e..00000000 --- a/sources_forked/vim-peepopen/plugin/peepopen.vim +++ /dev/null @@ -1,57 +0,0 @@ -" plugin/peepopen.vim -" Author: Geoffrey Grosenbach -" License: MIT License - -" Install this file as plugin/peepopen.vim. - -" If you prefer Command-T, use this snippet in your .gvimrc: - -" if has("gui_macvim") -" macmenu &File.New\ Tab key= -" map PeepOpen -" end - -" ============================================================================ - -" Exit quickly when: -" - this plugin was already loaded (or disabled) -" - when 'compatible' is set -if &cp || exists("g:peepopen_loaded") && g:peepopen_loaded - finish -endif -let g:peepopen_loaded = 1 -let s:save_cpo = &cpo -set cpo&vim - -if !exists('g:peepopen_quit') - let g:peepopen_quit = 0 -endif - -function s:LaunchPeepOpenViaVim() - silent exe "!open -a PeepOpen " . shellescape(getcwd()) - redraw! -endfunction - -function s:QuitPeepOpenViaVim() - silent exe '!ps ax | grep PeepOpen | grep -v grep | awk "{ print $1 }" | xargs kill -QUIT' -endfunction - -command! PeepOpen :call LaunchPeepOpenViaVim() -command! PeepQuit :call QuitPeepOpenViaVim() - -if has('autocmd') && exists('g:peepopen_quit') && g:peepopen_quit - au VimLeave * :call QuitPeepOpenViaVim() -endif - -noremap +me=s-1 keepend -\ contains=@htmlCoffeeScript,htmlScriptTag,@htmlPreproc -\ containedin=htmlHead diff --git a/sources_non_forked/vim-coffee-script/compiler/coffee.vim b/sources_non_forked/vim-coffee-script/compiler/coffee.vim deleted file mode 100644 index 8def0bfc..00000000 --- a/sources_non_forked/vim-coffee-script/compiler/coffee.vim +++ /dev/null @@ -1,82 +0,0 @@ -" Language: CoffeeScript -" Maintainer: Mick Koch -" URL: http://github.com/kchmck/vim-coffee-script -" License: WTFPL - -" All this is needed to support compiling filenames with spaces, quotes, and -" such. The filename is escaped and embedded into the `makeprg` setting. -" -" Because of this, `makeprg` must be updated on every file rename. And because -" of that, `CompilerSet` can't be used because it doesn't exist when the -" rename autocmd is ran. So, we have to do some checks to see whether `compiler` -" was called locally or globally, and respect that in the rest of the script. - -if exists('current_compiler') - finish -else - let current_compiler = 'coffee' -endif - -" Pattern to check if coffee is the compiler -let s:pat = '^' . current_compiler - -" Path to CoffeeScript compiler -if !exists('coffee_compiler') - let coffee_compiler = 'coffee' -endif - -" Extra options passed to CoffeeMake -if !exists('coffee_make_options') - let coffee_make_options = '' -endif - -" Get a `makeprg` for the current filename. -function! s:GetMakePrg() - return g:coffee_compiler . ' -c ' . g:coffee_make_options . ' $* ' - \ . fnameescape(expand('%')) -endfunction - -" Set `makeprg` and return 1 if coffee is still the compiler, else return 0. -function! s:SetMakePrg() - if &l:makeprg =~ s:pat - let &l:makeprg = s:GetMakePrg() - elseif &g:makeprg =~ s:pat - let &g:makeprg = s:GetMakePrg() - else - return 0 - endif - - return 1 -endfunction - -" Set a dummy compiler so we can check whether to set locally or globally. -CompilerSet makeprg=coffee -call s:SetMakePrg() - -CompilerSet errorformat=Error:\ In\ %f\\,\ %m\ on\ line\ %l, - \Error:\ In\ %f\\,\ Parse\ error\ on\ line\ %l:\ %m, - \SyntaxError:\ In\ %f\\,\ %m, - \%-G%.%# - -" Compile the current file. -command! -bang -bar -nargs=* CoffeeMake make - -" Set `makeprg` on rename since we embed the filename in the setting. -augroup CoffeeUpdateMakePrg - autocmd! - - " Update `makeprg` if coffee is still the compiler, else stop running this - " function. - function! s:UpdateMakePrg() - if !s:SetMakePrg() - autocmd! CoffeeUpdateMakePrg - endif - endfunction - - " Set autocmd locally if compiler was set locally. - if &l:makeprg =~ s:pat - autocmd BufFilePost,BufWritePost call s:UpdateMakePrg() - else - autocmd BufFilePost,BufWritePost call s:UpdateMakePrg() - endif -augroup END diff --git a/sources_non_forked/vim-coffee-script/doc/coffee-script.txt b/sources_non_forked/vim-coffee-script/doc/coffee-script.txt deleted file mode 100644 index 88a137db..00000000 --- a/sources_non_forked/vim-coffee-script/doc/coffee-script.txt +++ /dev/null @@ -1,143 +0,0 @@ -*coffee-script.txt* For Vim version 7.3 - -============================================================================= -Author: Mick Koch *coffee-script-author* -License: WTFPL (see |coffee-script-license|) -============================================================================= - -CONTENTS *coffee-script-contents* - -|coffee-script-introduction| Introduction and Feature Summary -|coffee-script-commands| Commands -|coffee-script-settings| Settings -|compiler-coffee-script| Compiler - -{Vi does not have any of this} - -============================================================================= - -INTRODUCTION *coffee-script* - *coffee-script-introduction* - -This plugin adds support for CoffeeScript syntax, indenting, and compiling. -Also included is an eco syntax and support for CoffeeScript in Haml and HTML. - -COMMANDS *coffee-script-commands* - - *:CoffeeMake* -:CoffeeMake[!] {opts} Wrapper around |:make| that also passes options in - |g:coffee_make_options| to the compiler. Use |:silent| - to hide compiler output. See |:make| for more - information about [!] and other helpful commands. - - *:CoffeeCompile* -:[range]CoffeeCompile [vertical] [{win-size}] - Shows how the current file or [range] is compiled - to JavaScript. [vertical] (or vert) splits the - compile buffer vertically instead of horizontally, and - {win-size} sets the initial size of the buffer. It can - be closed quickly with the "q" key. - -:CoffeeCompile {watch} [vertical] [{win-size}] - The watch mode of :CoffeeCompile emulates the "Try - CoffeeScript" live preview on the CoffeeScript web - site. After making changes to the source file, - exiting insert mode will cause the preview buffer to - update automatically. {watch} should be given as - "watch" or "unwatch," where the latter will stop the - automatic updating. [vertical] is recommended, and - 'scrollbind' is useful. - - *:CoffeeLint* -:[range]CoffeeLint[!] {opts} - Run {coffeelint} on the current file and add any - errors to the quickfix list. The first error is jumped - to if [!] isn't given. Options in - |g:coffee_lint_options| and {opts} are passed along to - {coffeelint}. Although the whole file is linted, if a - [range] is given, only errors within those lines will - be considered. - - *:CoffeeRun* -:[range]CoffeeRun Compiles the file or [range] and runs the resulting - JavaScript, displaying the output. - -SETTINGS *coffee-script-settings* - -You can configure plugin behavior using global variables and syntax commands -in your |vimrc|. - -Global Settings~ - *g:coffee_compiler* -Set the path to the compiler used by |CoffeeMake| and |CoffeeCompile| (it's -{coffee} by default.) -> - let coffee_compiler = '/usr/bin/coffee' -< - *g:coffee_make_options* -Set default options |CoffeeMake| should pass to the compiler. -> - let coffee_make_options = '--bare' -< - *g:coffee_compile_vert* -Split the CoffeeCompile buffer vertically by default. -> - let coffee_compile_vert = 1 -< - *g:coffee_linter* -Set the path to the {coffeelint} executable (it's {coffeelint} by default.) -> - let coffee_linter = '/usr/bin/coffeelint' -< - *g:coffee_lint_options* -Set default options |CoffeeLint| should pass to {coffeelint}. -> - let coffee_lint_options = '-f lint.json' -< - -Syntax Highlighting~ - *ft-coffee-script-syntax* -Trailing whitespace is highlighted as an error by default. This can be -disabled with: -> - hi link coffeeSpaceError NONE - -Trailing semicolons are also considered an error (for help transitioning from -JavaScript.) This can be disabled with: -> - hi link coffeeSemicolonError NONE - -Reserved words like {function} and {var} are highlighted where they're not -allowed in CoffeeScript. This can be disabled with: -> - hi link coffeeReservedError NONE - -COMPILER *compiler-coffee-script* - -A CoffeeScript compiler is provided as a wrapper around {coffee} and can be -loaded with; -> - compiler coffee - -This is done automatically when a CoffeeScript file is opened if no other -compiler is loaded. - -============================================================================= - -LICENSE *coffee-script-license* - - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - Version 2, December 2004 - - Copyright (C) 2010 to 2012 Mick Koch - - Everyone is permitted to copy and distribute verbatim or modified - copies of this license document, and changing it is allowed as long - as the name is changed. - - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. You just DO WHAT THE FUCK YOU WANT TO. - - vim:tw=78:ts=8:ft=help:norl: diff --git a/sources_non_forked/vim-coffee-script/ftdetect/coffee.vim b/sources_non_forked/vim-coffee-script/ftdetect/coffee.vim deleted file mode 100644 index 50569298..00000000 --- a/sources_non_forked/vim-coffee-script/ftdetect/coffee.vim +++ /dev/null @@ -1,17 +0,0 @@ -" Language: CoffeeScript -" Maintainer: Mick Koch -" URL: http://github.com/kchmck/vim-coffee-script -" License: WTFPL - -autocmd BufNewFile,BufRead *.coffee set filetype=coffee -autocmd BufNewFile,BufRead *Cakefile set filetype=coffee -autocmd BufNewFile,BufRead *.coffeekup,*.ck set filetype=coffee -autocmd BufNewFile,BufRead *._coffee set filetype=coffee - -function! s:DetectCoffee() - if getline(1) =~ '^#!.*\' - set filetype=coffee - endif -endfunction - -autocmd BufNewFile,BufRead * call s:DetectCoffee() diff --git a/sources_non_forked/vim-coffee-script/ftdetect/eco.vim b/sources_non_forked/vim-coffee-script/ftdetect/eco.vim deleted file mode 100644 index b420649d..00000000 --- a/sources_non_forked/vim-coffee-script/ftdetect/eco.vim +++ /dev/null @@ -1 +0,0 @@ -autocmd BufNewFile,BufRead *.eco set filetype=eco diff --git a/sources_non_forked/vim-coffee-script/ftplugin/coffee.vim b/sources_non_forked/vim-coffee-script/ftplugin/coffee.vim deleted file mode 100644 index 44ed1b3d..00000000 --- a/sources_non_forked/vim-coffee-script/ftplugin/coffee.vim +++ /dev/null @@ -1,263 +0,0 @@ -" Language: CoffeeScript -" Maintainer: Mick Koch -" URL: http://github.com/kchmck/vim-coffee-script -" License: WTFPL - -if exists("b:did_ftplugin") - finish -endif - -let b:did_ftplugin = 1 - -setlocal formatoptions-=t formatoptions+=croql -setlocal comments=:# -setlocal commentstring=#\ %s -setlocal omnifunc=javascriptcomplete#CompleteJS - -" Enable CoffeeMake if it won't overwrite any settings. -if !len(&l:makeprg) - compiler coffee -endif - -" Check here too in case the compiler above isn't loaded. -if !exists('coffee_compiler') - let coffee_compiler = 'coffee' -endif - -" Path to coffeelint executable -if !exists('coffee_linter') - let coffee_linter = 'coffeelint' -endif - -" Options passed to CoffeeLint -if !exists('coffee_lint_options') - let coffee_lint_options = '' -endif - -" Reset the CoffeeCompile variables for the current buffer. -function! s:CoffeeCompileResetVars() - " Compiled output buffer - let b:coffee_compile_buf = -1 - let b:coffee_compile_pos = [] - - " If CoffeeCompile is watching a buffer - let b:coffee_compile_watch = 0 -endfunction - -" Clean things up in the source buffer. -function! s:CoffeeCompileClose() - exec bufwinnr(b:coffee_compile_src_buf) 'wincmd w' - silent! autocmd! CoffeeCompileAuWatch * - call s:CoffeeCompileResetVars() -endfunction - -" Update the CoffeeCompile buffer given some input lines. -function! s:CoffeeCompileUpdate(startline, endline) - let input = join(getline(a:startline, a:endline), "\n") - - " Move to the CoffeeCompile buffer. - exec bufwinnr(b:coffee_compile_buf) 'wincmd w' - - " Coffee doesn't like empty input. - if !len(input) - return - endif - - " Compile input. - let output = system(g:coffee_compiler . ' -scb 2>&1', input) - - " Be sure we're in the CoffeeCompile buffer before overwriting. - if exists('b:coffee_compile_buf') - echoerr 'CoffeeCompile buffers are messed up' - return - endif - - " Replace buffer contents with new output and delete the last empty line. - setlocal modifiable - exec '% delete _' - put! =output - exec '$ delete _' - setlocal nomodifiable - - " Highlight as JavaScript if there is no compile error. - if v:shell_error - setlocal filetype= - else - setlocal filetype=javascript - endif - - call setpos('.', b:coffee_compile_pos) -endfunction - -" Update the CoffeeCompile buffer with the whole source buffer. -function! s:CoffeeCompileWatchUpdate() - call s:CoffeeCompileUpdate(1, '$') - exec bufwinnr(b:coffee_compile_src_buf) 'wincmd w' -endfunction - -" Peek at compiled CoffeeScript in a scratch buffer. We handle ranges like this -" to prevent the cursor from being moved (and its position saved) before the -" function is called. -function! s:CoffeeCompile(startline, endline, args) - if !executable(g:coffee_compiler) - echoerr "Can't find CoffeeScript compiler `" . g:coffee_compiler . "`" - return - endif - - " If in the CoffeeCompile buffer, switch back to the source buffer and - " continue. - if !exists('b:coffee_compile_buf') - exec bufwinnr(b:coffee_compile_src_buf) 'wincmd w' - endif - - " Parse arguments. - let watch = a:args =~ '\' - let unwatch = a:args =~ '\' - let size = str2nr(matchstr(a:args, '\<\d\+\>')) - - " Determine default split direction. - if exists('g:coffee_compile_vert') - let vert = 1 - else - let vert = a:args =~ '\' - endif - - " Remove any watch listeners. - silent! autocmd! CoffeeCompileAuWatch * - - " If just unwatching, don't compile. - if unwatch - let b:coffee_compile_watch = 0 - return - endif - - if watch - let b:coffee_compile_watch = 1 - endif - - " Build the CoffeeCompile buffer if it doesn't exist. - if bufwinnr(b:coffee_compile_buf) == -1 - let src_buf = bufnr('%') - let src_win = bufwinnr(src_buf) - - " Create the new window and resize it. - if vert - let width = size ? size : winwidth(src_win) / 2 - - belowright vertical new - exec 'vertical resize' width - else - " Try to guess the compiled output's height. - let height = size ? size : min([winheight(src_win) / 2, - \ a:endline - a:startline + 2]) - - belowright new - exec 'resize' height - endif - - " We're now in the scratch buffer, so set it up. - setlocal bufhidden=wipe buftype=nofile - setlocal nobuflisted nomodifiable noswapfile nowrap - - autocmd BufWipeout call s:CoffeeCompileClose() - " Save the cursor when leaving the CoffeeCompile buffer. - autocmd BufLeave let b:coffee_compile_pos = getpos('.') - - nnoremap q :hide - - let b:coffee_compile_src_buf = src_buf - let buf = bufnr('%') - - " Go back to the source buffer and set it up. - exec bufwinnr(b:coffee_compile_src_buf) 'wincmd w' - let b:coffee_compile_buf = buf - endif - - if b:coffee_compile_watch - call s:CoffeeCompileWatchUpdate() - - augroup CoffeeCompileAuWatch - autocmd InsertLeave call s:CoffeeCompileWatchUpdate() - augroup END - else - call s:CoffeeCompileUpdate(a:startline, a:endline) - endif -endfunction - -" Complete arguments for the CoffeeCompile command. -function! s:CoffeeCompileComplete(arg, cmdline, cursor) - let args = ['unwatch', 'vertical', 'watch'] - - if !len(a:arg) - return args - endif - - let match = '^' . a:arg - - for arg in args - if arg =~ match - return [arg] - endif - endfor -endfunction - -" Run coffeelint on a file, and add any errors between @startline and @endline -" to the quickfix list. -function! s:CoffeeLint(startline, endline, bang, args) - if !executable(g:coffee_linter) - echoerr "Can't find CoffeeScript linter `" . g:coffee_linter . "`" - return - endif - - let filename = expand('%') - - if !len(filename) - echoerr 'CoffeeLint must be ran on a saved file' - return - endif - - let lines = split(system(g:coffee_linter . ' --csv ' . g:coffee_lint_options . - \ ' ' . a:args . ' ' . filename . ' 2>&1'), '\n') - let qflist = [] - - for line in lines - let match = matchlist(line, '\f\+,\(\d\+\),error,\(.\+\)') - - " Ignore invalid lines. - if !len(match) - continue - endif - - let lnum = str2nr(match[1]) - - " Don't add the error if it's not in the range. - if lnum < a:startline || lnum > a:endline - continue - endif - - let text = match[2] - - call add(qflist, {'bufnr': bufnr('%'), 'lnum': lnum, 'text': text}) - endfor - - call setqflist(qflist, 'r') - - " Don't jump if there's a bang. - if !len(a:bang) - silent! cc 1 - endif -endfunction - -" Don't overwrite the CoffeeCompile variables. -if !exists('b:coffee_compile_buf') - call s:CoffeeCompileResetVars() -endif - -" Peek at compiled CoffeeScript. -command! -range=% -bar -nargs=* -complete=customlist,s:CoffeeCompileComplete -\ CoffeeCompile call s:CoffeeCompile(, , ) -" Run some CoffeeScript. -command! -range=% -bar CoffeeRun ,:w !coffee -s -" Run coffeelint on the file. -command! -range=% -bang -bar -nargs=* CoffeeLint -\ call s:CoffeeLint(, , '', ) diff --git a/sources_non_forked/vim-coffee-script/indent/coffee.vim b/sources_non_forked/vim-coffee-script/indent/coffee.vim deleted file mode 100644 index 6e58d5e7..00000000 --- a/sources_non_forked/vim-coffee-script/indent/coffee.vim +++ /dev/null @@ -1,351 +0,0 @@ -" Language: CoffeeScript -" Maintainer: Mick Koch -" URL: http://github.com/kchmck/vim-coffee-script -" License: WTFPL - -if exists("b:did_indent") - finish -endif - -let b:did_indent = 1 - -setlocal autoindent -setlocal indentexpr=GetCoffeeIndent(v:lnum) -" Make sure GetCoffeeIndent is run when these are typed so they can be -" indented or outdented. -setlocal indentkeys+=0],0),0.,=else,=when,=catch,=finally - -" Only define the function once. -if exists("*GetCoffeeIndent") - finish -endif - -" Keywords to indent after -let s:INDENT_AFTER_KEYWORD = '^\%(if\|unless\|else\|for\|while\|until\|' -\ . 'loop\|switch\|when\|try\|catch\|finally\|' -\ . 'class\)\>' - -" Operators to indent after -let s:INDENT_AFTER_OPERATOR = '\%([([{:=]\|[-=]>\)$' - -" Keywords and operators that continue a line -let s:CONTINUATION = '\<\%(is\|isnt\|and\|or\)\>$' -\ . '\|' -\ . '\%(-\@\|\*\|/\@' - -" A compound assignment like `... = if ...` -let s:COMPOUND_ASSIGNMENT = '[:=]\s*\%(if\|unless\|for\|while\|until\|' -\ . 'switch\|try\|class\)\>' - -" A postfix condition like `return ... if ...`. -let s:POSTFIX_CONDITION = '\S\s\+\zs\<\%(if\|unless\)\>' - -" A single line else statement like `else ...` but not `else if ...` -let s:SINGLE_LINE_ELSE = '^else\s\+\%(\<\%(if\|unless\)\>\)\@!' - -" Max lines to look back for a match -let s:MAX_LOOKBACK = 50 - -" Syntax names for strings -let s:SYNTAX_STRING = 'coffee\%(String\|AssignString\|Embed\|Regex\|Heregex\|' -\ . 'Heredoc\)' - -" Syntax names for comments -let s:SYNTAX_COMMENT = 'coffee\%(Comment\|BlockComment\|HeregexComment\)' - -" Syntax names for strings and comments -let s:SYNTAX_STRING_COMMENT = s:SYNTAX_STRING . '\|' . s:SYNTAX_COMMENT - -" Get the linked syntax name of a character. -function! s:SyntaxName(linenum, col) - return synIDattr(synID(a:linenum, a:col, 1), 'name') -endfunction - -" Check if a character is in a comment. -function! s:IsComment(linenum, col) - return s:SyntaxName(a:linenum, a:col) =~ s:SYNTAX_COMMENT -endfunction - -" Check if a character is in a string. -function! s:IsString(linenum, col) - return s:SyntaxName(a:linenum, a:col) =~ s:SYNTAX_STRING -endfunction - -" Check if a character is in a comment or string. -function! s:IsCommentOrString(linenum, col) - return s:SyntaxName(a:linenum, a:col) =~ s:SYNTAX_STRING_COMMENT -endfunction - -" Check if a whole line is a comment. -function! s:IsCommentLine(linenum) - " Check the first non-whitespace character. - return s:IsComment(a:linenum, indent(a:linenum) + 1) -endfunction - -" Search a line for a regex until one is found outside a string or comment. -function! s:SmartSearch(linenum, regex) - " Start at the first column. - let col = 0 - - " Search until there are no more matches, unless a good match is found. - while 1 - call cursor(a:linenum, col + 1) - let [_, col] = searchpos(a:regex, 'cn', a:linenum) - - " No more matches. - if !col - break - endif - - if !s:IsCommentOrString(a:linenum, col) - return 1 - endif - endwhile - - " No good match found. - return 0 -endfunction - -" Check if a match should be skipped. -function! s:ShouldSkip(startlinenum, linenum, col) - " Skip if in a comment or string. - if s:IsCommentOrString(a:linenum, a:col) - return 1 - endif - - " Skip if a single line statement that isn't adjacent. - if s:SmartSearch(a:linenum, '\') && a:startlinenum - a:linenum > 1 - return 1 - endif - - " Skip if a postfix condition. - if s:SmartSearch(a:linenum, s:POSTFIX_CONDITION) && - \ !s:SmartSearch(a:linenum, s:COMPOUND_ASSIGNMENT) - return 1 - endif - - return 0 -endfunction - -" Find the farthest line to look back to, capped to line 1 (zero and negative -" numbers cause bad things). -function! s:MaxLookback(startlinenum) - return max([1, a:startlinenum - s:MAX_LOOKBACK]) -endfunction - -" Get the skip expression for searchpair(). -function! s:SkipExpr(startlinenum) - return "s:ShouldSkip(" . a:startlinenum . ", line('.'), col('.'))" -endfunction - -" Search for pairs of text. -function! s:SearchPair(start, end) - " The cursor must be in the first column for regexes to match. - call cursor(0, 1) - - let startlinenum = line('.') - - " Don't need the W flag since MaxLookback caps the search to line 1. - return searchpair(a:start, '', a:end, 'bcn', - \ s:SkipExpr(startlinenum), - \ s:MaxLookback(startlinenum)) -endfunction - -" Try to find a previous matching line. -function! s:GetMatch(curline) - let firstchar = a:curline[0] - - if firstchar == '}' - return s:SearchPair('{', '}') - elseif firstchar == ')' - return s:SearchPair('(', ')') - elseif firstchar == ']' - return s:SearchPair('\[', '\]') - elseif a:curline =~ '^else\>' - return s:SearchPair('\<\%(if\|unless\|when\)\>', '\') - elseif a:curline =~ '^catch\>' - return s:SearchPair('\', '\') - elseif a:curline =~ '^finally\>' - return s:SearchPair('\', '\') - endif - - return 0 -endfunction - -" Get the nearest previous line that isn't a comment. -function! s:GetPrevNormalLine(startlinenum) - let curlinenum = a:startlinenum - - while curlinenum - let curlinenum = prevnonblank(curlinenum - 1) - - if !s:IsCommentLine(curlinenum) - return curlinenum - endif - endwhile - - return 0 -endfunction - -" Try to find a comment in a line. -function! s:FindComment(linenum) - call cursor(a:linenum, 0) - - " Current column - let cur = 0 - " Last column in the line - let end = col('$') - 1 - - while cur != end - call cursor(0, cur + 1) - let [_, cur] = searchpos('#', 'cn', a:linenum) - - if !cur - break - endif - - if s:IsComment(a:linenum, cur) - return cur - endif - endwhile - - return 0 -endfunction - -" Get a line without comments or surrounding whitespace. -function! s:GetTrimmedLine(linenum) - let comment = s:FindComment(a:linenum) - let line = getline(a:linenum) - - if comment - " Subtract 1 to get to the column before the comment and another 1 for - " zero-based indexing. - let line = line[:comment - 2] - endif - - return substitute(substitute(line, '^\s\+', '', ''), - \ '\s\+$', '', '') -endfunction - -function! GetCoffeeIndent(curlinenum) - " Don't do anything if on the first line. - if a:curlinenum == 1 - return -1 - endif - - let prevlinenum = a:curlinenum - 1 - - " If continuing a comment, keep the indent level. - if s:IsCommentLine(prevlinenum) - return indent(prevlinenum) - endif - - let prevlinenum = s:GetPrevNormalLine(a:curlinenum) - - " Don't do anything if there's no code before. - if !prevlinenum - return -1 - endif - - " Indent based on the current line. - let curline = s:GetTrimmedLine(a:curlinenum) - - " Try to find a matching statement. This handles outdenting. - let matchlinenum = s:GetMatch(curline) - - if matchlinenum - return indent(matchlinenum) - endif - - " Try to find a matching when. - if curline =~ '^when\>' && !s:SmartSearch(prevlinenum, '\') - let linenum = a:curlinenum - - while linenum - let linenum = s:GetPrevNormalLine(linenum) - - if getline(linenum) =~ '^\s*when\>' - return indent(linenum) - endif - endwhile - - return -1 - endif - - " Indent based on the previous line. - let prevline = s:GetTrimmedLine(prevlinenum) - let previndent = indent(prevlinenum) - - " Always indent after these operators. - if prevline =~ s:INDENT_AFTER_OPERATOR - return previndent + &shiftwidth - endif - - " Indent after a continuation if it's the first. - if prevline =~ s:CONTINUATION - " If the line ends in a slash, make sure it isn't a regex. - if prevline =~ '/$' - " Move to the line so we can get the last column. - call cursor(prevlinenum) - - if s:IsString(prevlinenum, col('$') - 1) - return -1 - endif - endif - - let prevprevlinenum = s:GetPrevNormalLine(prevlinenum) - - " If the continuation is the first in the file, there can't be others before - " it. - if !prevprevlinenum - return previndent + &shiftwidth - endif - - let prevprevline = s:GetTrimmedLine(prevprevlinenum) - - " Only indent after the first continuation. - if prevprevline !~ s:CONTINUATION && prevprevline !~ s:CONTINUATION_BLOCK - return previndent + &shiftwidth - endif - - return -1 - endif - - " Indent after these keywords and compound assignments if they aren't a - " single line statement. - if prevline =~ s:INDENT_AFTER_KEYWORD || prevline =~ s:COMPOUND_ASSIGNMENT - if !s:SmartSearch(prevlinenum, '\') && prevline !~ s:SINGLE_LINE_ELSE - return previndent + &shiftwidth - endif - - return -1 - endif - - " Indent a dot access if it's the first. - if curline =~ s:DOT_ACCESS && prevline !~ s:DOT_ACCESS - return previndent + &shiftwidth - endif - - " Outdent after these keywords if they don't have a postfix condition or are - " a single-line statement. - if prevline =~ s:OUTDENT_AFTER - if !s:SmartSearch(prevlinenum, s:POSTFIX_CONDITION) || - \ s:SmartSearch(prevlinenum, '\') - return previndent - &shiftwidth - endif - endif - - " If no indent or outdent is needed, keep the indent level of the previous - " line. - return previndent -endfunction diff --git a/sources_non_forked/vim-coffee-script/syntax/coffee.vim b/sources_non_forked/vim-coffee-script/syntax/coffee.vim deleted file mode 100644 index da39e34a..00000000 --- a/sources_non_forked/vim-coffee-script/syntax/coffee.vim +++ /dev/null @@ -1,221 +0,0 @@ -" Language: CoffeeScript -" Maintainer: Mick Koch -" URL: http://github.com/kchmck/vim-coffee-script -" License: WTFPL - -" Bail if our syntax is already loaded. -if exists('b:current_syntax') && b:current_syntax == 'coffee' - finish -endif - -" Include JavaScript for coffeeEmbed. -syn include @coffeeJS syntax/javascript.vim - -" Highlight long strings. -syn sync minlines=100 - -" CoffeeScript identifiers can have dollar signs. -setlocal isident+=$ - -" These are `matches` instead of `keywords` because vim's highlighting -" priority for keywords is higher than matches. This causes keywords to be -" highlighted inside matches, even if a match says it shouldn't contain them -- -" like with coffeeAssign and coffeeDot. -syn match coffeeStatement /\<\%(return\|break\|continue\|throw\)\>/ display -hi def link coffeeStatement Statement - -syn match coffeeRepeat /\<\%(for\|while\|until\|loop\)\>/ display -hi def link coffeeRepeat Repeat - -syn match coffeeConditional /\<\%(if\|else\|unless\|switch\|when\|then\)\>/ -\ display -hi def link coffeeConditional Conditional - -syn match coffeeException /\<\%(try\|catch\|finally\)\>/ display -hi def link coffeeException Exception - -syn match coffeeKeyword /\<\%(new\|in\|of\|by\|and\|or\|not\|is\|isnt\|class\|extends\|super\|do\)\>/ -\ display -" The `own` keyword is only a keyword after `for`. -syn match coffeeKeyword /\/ contained containedin=coffeeRepeat -\ display -hi def link coffeeKeyword Keyword - -syn match coffeeOperator /\<\%(instanceof\|typeof\|delete\)\>/ display -hi def link coffeeOperator Operator - -" The first case matches symbol operators only if they have an operand before. -syn match coffeeExtendedOp /\%(\S\s*\)\@<=[+\-*/%&|\^=!<>?.]\{-1,}\|[-=]>\|--\|++\|:/ -\ display -syn match coffeeExtendedOp /\<\%(and\|or\)=/ display -hi def link coffeeExtendedOp coffeeOperator - -" This is separate from `coffeeExtendedOp` to help differentiate commas from -" dots. -syn match coffeeSpecialOp /[,;]/ display -hi def link coffeeSpecialOp SpecialChar - -syn match coffeeBoolean /\<\%(true\|on\|yes\|false\|off\|no\)\>/ display -hi def link coffeeBoolean Boolean - -syn match coffeeGlobal /\<\%(null\|undefined\)\>/ display -hi def link coffeeGlobal Type - -" A special variable -syn match coffeeSpecialVar /\<\%(this\|prototype\|arguments\)\>/ display -hi def link coffeeSpecialVar Special - -" An @-variable -syn match coffeeSpecialIdent /@\%(\I\i*\)\?/ display -hi def link coffeeSpecialIdent Identifier - -" A class-like name that starts with a capital letter -syn match coffeeObject /\<\u\w*\>/ display -hi def link coffeeObject Structure - -" A constant-like name in SCREAMING_CAPS -syn match coffeeConstant /\<\u[A-Z0-9_]\+\>/ display -hi def link coffeeConstant Constant - -" A variable name -syn cluster coffeeIdentifier contains=coffeeSpecialVar,coffeeSpecialIdent, -\ coffeeObject,coffeeConstant - -" A non-interpolated string -syn cluster coffeeBasicString contains=@Spell,coffeeEscape -" An interpolated string -syn cluster coffeeInterpString contains=@coffeeBasicString,coffeeInterp - -" Regular strings -syn region coffeeString start=/"/ skip=/\\\\\|\\"/ end=/"/ -\ contains=@coffeeInterpString -syn region coffeeString start=/'/ skip=/\\\\\|\\'/ end=/'/ -\ contains=@coffeeBasicString -hi def link coffeeString String - -" A integer, including a leading plus or minus -syn match coffeeNumber /\i\@/ display -syn match coffeeNumber /\<0[bB][01]\+\>/ display -syn match coffeeNumber /\<0[oO][0-7]\+\>/ display -hi def link coffeeNumber Number - -" A floating-point number, including a leading plus or minus -syn match coffeeFloat /\i\@/ - \ display - hi def link coffeeReservedError Error -endif - -" A normal object assignment -syn match coffeeObjAssign /@\?\I\i*\s*\ze::\@!/ contains=@coffeeIdentifier display -hi def link coffeeObjAssign Identifier - -syn keyword coffeeTodo TODO FIXME XXX contained -hi def link coffeeTodo Todo - -syn match coffeeComment /#.*/ contains=@Spell,coffeeTodo -hi def link coffeeComment Comment - -syn region coffeeBlockComment start=/####\@!/ end=/###/ -\ contains=@Spell,coffeeTodo -hi def link coffeeBlockComment coffeeComment - -" A comment in a heregex -syn region coffeeHeregexComment start=/#/ end=/\ze\/\/\/\|$/ contained -\ contains=@Spell,coffeeTodo -hi def link coffeeHeregexComment coffeeComment - -" Embedded JavaScript -syn region coffeeEmbed matchgroup=coffeeEmbedDelim -\ start=/`/ skip=/\\\\\|\\`/ end=/`/ -\ contains=@coffeeJS -hi def link coffeeEmbedDelim Delimiter - -syn region coffeeInterp matchgroup=coffeeInterpDelim start=/#{/ end=/}/ contained -\ contains=@coffeeAll -hi def link coffeeInterpDelim PreProc - -" A string escape sequence -syn match coffeeEscape /\\\d\d\d\|\\x\x\{2\}\|\\u\x\{4\}\|\\./ contained display -hi def link coffeeEscape SpecialChar - -" A regex -- must not follow a parenthesis, number, or identifier, and must not -" be followed by a number -syn region coffeeRegex start=/\%(\%()\|\i\@/ contains=@coffeeTop containedin=ALLBUT,@ecoRegions keepend -syn region ecoExpression matchgroup=ecoDelimiter start=/<%[=\-]/ end=/%>/ contains=@coffeeTop containedin=ALLBUT,@ecoRegions keepend -syn region ecoComment matchgroup=ecoComment start=/<%#/ end=/%>/ contains=@coffeeTodo,@Spell containedin=ALLBUT,@ecoRegions keepend - -" eco features not in coffeescript proper -syn keyword ecoEnd end containedin=@ecoRegions -syn match ecoIndentColon /\s+\w+:/ containedin=@ecoRegions - -" Define the default highlighting. - -hi def link ecoDelimiter Delimiter -hi def link ecoComment Comment -hi def link ecoEnd coffeeConditional -hi def link ecoIndentColon None - -let b:current_syntax = 'eco' - -" vim: nowrap sw=2 sts=2 ts=8: diff --git a/sources_non_forked/vim-coffee-script/test/test-eco.html.eco b/sources_non_forked/vim-coffee-script/test/test-eco.html.eco deleted file mode 100644 index d8c5ed4d..00000000 --- a/sources_non_forked/vim-coffee-script/test/test-eco.html.eco +++ /dev/null @@ -1,12 +0,0 @@ - - <%# comment %> - - <%# basic %> - <%- foo = "1" %> - - <%# interpolation %> - <%= " == #{ ( -> "LOL" )() } == " %> - - <%# interpolation with nested curlies %> - <%= " == #{ { a: 1, b: { c: 3, d: 4 } } } == " %> - diff --git a/sources_non_forked/vim-coffee-script/test/test-interp.coffee b/sources_non_forked/vim-coffee-script/test/test-interp.coffee deleted file mode 100644 index 399ea0d4..00000000 --- a/sources_non_forked/vim-coffee-script/test/test-interp.coffee +++ /dev/null @@ -1,3 +0,0 @@ -# Nested curlies -" >> #{ == { { { } } } == } << " -" >> #{ == { abc: { def: 42 } } == } << " diff --git a/sources_non_forked/vim-coffee-script/test/test-ops.coffee b/sources_non_forked/vim-coffee-script/test/test-ops.coffee deleted file mode 100644 index 54be8dba..00000000 --- a/sources_non_forked/vim-coffee-script/test/test-ops.coffee +++ /dev/null @@ -1,90 +0,0 @@ -# Various operators -abc instanceof def -typeof abc -delete abc -abc::def - -abc + def -abc - def -abc * def -abc / def -abc % def -abc & def -abc | def -abc ^ def -abc >> def -abc << def -abc >>> def -abc ? def -abc && def -abc and def -abc || def -abc or def - -abc += def -abc -= def -abc *= def -abc /= def -abc %= def -abc &= def -abc |= def -abc ^= def -abc >>= def -abc <<= def -abc >>>= def -abc ?= def -abc &&= def -abc ||= def - -abc and= def -abc or= def - -abc.def.ghi -abc?.def?.ghi - -abc < def -abc > def -abc = def -abc == def -abc != def -abc <= def -abc >= def - -abc++ -abc-- -++abc ---abc - -# Nested operators -abc[def] = ghi -abc[def[ghi: jkl]] = 42 -@abc[def] = ghi - -abc["#{def = 42}"] = 42 -abc["#{def.ghi = 42}"] = 42 -abc["#{def[ghi] = 42}"] = 42 -abc["#{def['ghi']}"] = 42 - -# Object assignments -abc = - def: 123 - DEF: 123 - @def: 123 - Def: 123 - 'def': 123 - 42: 123 - -# Operators shouldn't be highlighted -vector= -wand= - -abc+++ -abc--- -abc ** def -abc &&& def -abc ^^ def -abc ===== def -abc <==== def -abc >==== def -abc +== def -abc =^= def diff --git a/sources_non_forked/vim-coffee-script/test/test-reserved.coffee b/sources_non_forked/vim-coffee-script/test/test-reserved.coffee deleted file mode 100644 index b841760c..00000000 --- a/sources_non_forked/vim-coffee-script/test/test-reserved.coffee +++ /dev/null @@ -1,27 +0,0 @@ -# Should be an error -function = 42 -var = 42 - -# Shouldn't be an error -abc.with = 42 -function: 42 -var: 42 - -# Keywords shouldn't be highlighted -abc.function -abc.do -abc.break -abc.true - -abc::function -abc::do -abc::break -abc::true - -abc:: function -abc. function - -# Numbers should be highlighted -def.42 -def .42 -def::42 diff --git a/sources_non_forked/vim-coffee-script/test/test.html b/sources_non_forked/vim-coffee-script/test/test.html deleted file mode 100644 index 34791453..00000000 --- a/sources_non_forked/vim-coffee-script/test/test.html +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/sources_non_forked/vim-expand-region/doc/tags b/sources_non_forked/vim-expand-region/doc/tags new file mode 100644 index 00000000..402a0c43 --- /dev/null +++ b/sources_non_forked/vim-expand-region/doc/tags @@ -0,0 +1,10 @@ +expand-region-about expand_region.txt /*expand-region-about* +expand-region-contents expand_region.txt /*expand-region-contents* +expand-region-global-options expand_region.txt /*expand-region-global-options* +expand-region-intro expand_region.txt /*expand-region-intro* +expand-region-mappings expand_region.txt /*expand-region-mappings* +expand-region-usage expand_region.txt /*expand-region-usage* +expand_region_text_objects expand_region.txt /*expand_region_text_objects* +expand_region_use_select_mode expand_region.txt /*expand_region_use_select_mode* +vim-expand-region.txt expand_region.txt /*vim-expand-region.txt* +vim-expand-regions expand_region.txt /*vim-expand-regions* diff --git a/sources_non_forked/vim-indent-object/.gitignore b/sources_non_forked/vim-indent-object/.gitignore deleted file mode 100644 index 1b19a79f..00000000 --- a/sources_non_forked/vim-indent-object/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -tags - diff --git a/sources_non_forked/vim-indent-object/doc/indent-object.txt b/sources_non_forked/vim-indent-object/doc/indent-object.txt deleted file mode 100644 index 5b581020..00000000 --- a/sources_non_forked/vim-indent-object/doc/indent-object.txt +++ /dev/null @@ -1,120 +0,0 @@ -*indent-object.txt* Text objects based on indent levels. - - Copyright (c) 2010 Michael Smith - -Indent Text Objects - -INTRODUCTION |idntobj-introduction| -TEXT OBJECTS |idntobj-objects| -BLANK LINES |idntobj-blanklines| -ABOUT |idntobj-about| - - -============================================================================== -INTRODUCTION *idntobj-introduction* - -Vim text objects provide a convenient way to select and operate on various -types of objects. These objects include regions surrounded by various types of -brackets and various parts of language (ie sentences, paragraphs, etc). - -This plugin defines a new text object, based on indentation levels. This is -very useful in languages such as Python, in which the syntax defines scope in -terms of indentation. Using the objects defined in this plugin, an entire if -structure can be quickly selected, for example. - - -============================================================================== -TEXT OBJECTS *ai* *ii* *aI* *iI* *idntobj-objects* - -This plugin defines two new text objects. These are very similar - they differ -only in whether they include the line below the block or not. - - Key Mapping Description ~ -> - ai (A)n (I)ndentation level and line above. - ii (I)nner (I)ndentation level (no line above). - aI (A)n (I)ndentation level and lines above/below. - iI (I)nner (I)ndentation level (no lines above/below). -< - -Note that the iI mapping is mostly included simply for completeness, it is -effectively a synonym for ii. - -Just like regular text objects, these mappings can be used either with -operators expecting a motion, such as 'd' or 'c', as well as in visual mode. -In visual mode the mapping can be repeated, which has the effect of -iteratively increasing the scope of indentation block selected. Specifying a -count can be used to achieve the same effect. - -The difference between |ai| and |aI| is that |ai| includes the line -immediately above the indentation block, whereas aI includes not only that, -but also the line below. Which of these is most useful largely depends on the -structure of the language being edited. - -For example, when editing the Python code, |ai| is generally more useful, as -the line above the indentation block is usually related to it. For example, in -the following code (* is used to indicate the cursor position): -> - if foo > 3: - log("foo is big") * - foo = 3 - do_something_else() -< -the if clause is logically related to the code block, whereas the function -call below is not. It is unlikely we would want to select the line below when -we are interested in the if block. - -However, in other languages, such as Vim scripts, control structures are -usually terminated with something like 'endif'. Therefore, in this example: -> - if foo > 3 - echo "foo is big" * - let foo = 3 - endif - call do_something_else() -< -we would more likely want to include the endif when we select the if -structure. - - -============================================================================== -BLANK LINES *idntobj-blanklines* - -When scanning code blocks, the plugin usually ignores blank lines. There is an -exception to this, however, when the block being selected is not indented. In -this case if blank lines are ignored, then the entire file would be selected. -Instead when code at the top level is being indented blank lines are -considered to delimit the block. - - -============================================================================== -ABOUT *idntobj-about* - -vim-indent-object was written by Michael Smith . The -project repository is kept at: - -http://github.com/michaeljsmith/vim-indent-object - -Any feedback or criticism is welcome, and can be mailed to the author at the -above email address. Alternatively issues can be raised on the project -website. - -Licence: - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/sources_non_forked/vim-indent-object/plugin/indent-object.vim b/sources_non_forked/vim-indent-object/plugin/indent-object.vim deleted file mode 100644 index afb8edd2..00000000 --- a/sources_non_forked/vim-indent-object/plugin/indent-object.vim +++ /dev/null @@ -1,224 +0,0 @@ -"-------------------------------------------------------------------------------- -" -" Copyright (c) 2010 Michael Smith -" -" http://github.com/michaeljsmith/vim-indent-object -" -" Permission is hereby granted, free of charge, to any person obtaining a copy -" of this software and associated documentation files (the "Software"), to -" deal in the Software without restriction, including without limitation the -" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -" sell copies of the Software, and to permit persons to whom the Software is -" furnished to do so, subject to the following conditions: -" -" The above copyright notice and this permission notice shall be included in -" all copies or substantial portions of the Software. -" -" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -" IN THE SOFTWARE. -" -"-------------------------------------------------------------------------------- - -" Mappings excluding line below. -onoremap ai :cal HandleTextObjectMapping(0, 0, 0, [line("."), line("."), col("."), col(".")]) -onoremap ii :cal HandleTextObjectMapping(1, 0, 0, [line("."), line("."), col("."), col(".")]) -vnoremap ai :cal HandleTextObjectMapping(0, 0, 1, [line("'<"), line("'>"), col("'<"), col("'>")])gv -vnoremap ii :cal HandleTextObjectMapping(1, 0, 1, [line("'<"), line("'>"), col("'<"), col("'>")])gv - -" Mappings including line below. -onoremap aI :cal HandleTextObjectMapping(0, 1, 0, [line("."), line("."), col("."), col(".")]) -onoremap iI :cal HandleTextObjectMapping(1, 1, 0, [line("."), line("."), col("."), col(".")]) -vnoremap aI :cal HandleTextObjectMapping(0, 1, 1, [line("'<"), line("'>"), col("'<"), col("'>")])gv -vnoremap iI :cal HandleTextObjectMapping(1, 1, 1, [line("'<"), line("'>"), col("'<"), col("'>")])gv - -let s:l0 = -1 -let s:l1 = -1 -let s:c0 = -1 -let s:c1 = -1 - -function! TextObject(inner, incbelow, vis, range, count) - - " Record the current state of the visual region. - let vismode = "V" - - " Detect if this is a completely new visual selction session. - let new_vis = 0 - let new_vis = new_vis || s:l0 != a:range[0] - let new_vis = new_vis || s:l1 != a:range[1] - let new_vis = new_vis || s:c0 != a:range[2] - let new_vis = new_vis || s:c1 != a:range[3] - - let s:l0 = a:range[0] - let s:l1 = a:range[1] - let s:c0 = a:range[2] - let s:c1 = a:range[3] - - " Repeatedly increase the scope of the selection. - let itr_cnt = 0 - let cnt = a:count - while cnt > 0 - - " Look for the minimum indentation in the current visual region. - let l = s:l0 - let idnt_invalid = 1000 - let idnt = idnt_invalid - while l <= s:l1 - if !(getline(l) =~ "^\\s*$") - let idnt = min([idnt, indent(l)]) - endif - let l += 1 - endwhile - - " Keep track of where the range should be expanded to. - let l_1 = s:l0 - let l_1o = l_1 - let l2 = s:l1 - let l2o = l2 - - " If we are highlighting only blank lines, we may not have found a - " valid indent. In this case we need to look for the next and previous - " non blank lines and check which of those has the largest indent. - if idnt == idnt_invalid - let idnt = 0 - let pnb = prevnonblank(s:l0) - if pnb - let idnt = max([idnt, indent(pnb)]) - let l_1 = pnb - endif - let nnb = nextnonblank(s:l0) - if nnb - let idnt = max([idnt, indent(nnb)]) - endif - - " If we are in whitespace at the beginning of a block, skip over - " it when we are selecting the range. Similarly, if we are in - " whitespace at the end, ignore it. - if idnt > indent(pnb) - let l_1 = nnb - endif - if idnt > indent(nnb) - let l2 = pnb - endif - endif - - " Search backward for the first line with less indent than the target - " indent (skipping blank lines). - let blnk = getline(l_1) =~ "^\\s*$" - while l_1 > 0 && ((idnt == 0 && !blnk) || (idnt != 0 && (blnk || indent(l_1) >= idnt))) - if !blnk || !a:inner - let l_1o = l_1 - endif - let l_1 -= 1 - let blnk = getline(l_1) =~ "^\\s*$" - endwhile - - " Search forward for the first line with more indent than the target - " indent (skipping blank lines). - let line_cnt = line("$") - let blnk = getline(l2) =~ "^\\s*$" - while l2 <= line_cnt && ((idnt == 0 && !blnk) || (idnt != 0 && (blnk || indent(l2) >= idnt))) - if !blnk || !a:inner - let l2o = l2 - endif - let l2 += 1 - let blnk = getline(l2) =~ "^\\s*$" - endwhile - - " Determine which of these extensions to include. Include neither if - " we are selecting an 'inner' object. Exclude the bottom unless are - " told to include it. - let idnt2 = max([indent(l_1), indent(l2)]) - if indent(l_1) < idnt2 || a:inner - let l_1 = l_1o - endif - if indent(l2) < idnt2 || a:inner || !a:incbelow - let l2 = l2o - endif - let l_1 = max([l_1, 1]) - let l2 = min([l2, line("$")]) - - " Extend the columns to the start and end. - " If inner is selected, set the final cursor pos to the start - " of the text in the line. - let c_1 = 1 - if a:inner - let c_1 = match(getline(l_1), "\\c\\S") + 1 - endif - let c2 = len(getline(l2)) - if !a:inner - let c2 += 1 - endif - - " Make sure there's no change if we haven't really made a - " significant change in linewise mode - this makes sure that - " we can iteratively increase selection in linewise mode. - if itr_cnt == 0 && vismode ==# 'V' && s:l0 == l_1 && s:l1 == l2 - let c_1 = s:c0 - let c2 = s:c1 - endif - - " Check whether the visual region has changed. - let chg = 0 - let chg = chg || s:l0 != l_1 - let chg = chg || s:l1 != l2 - let chg = chg || s:c0 != c_1 - let chg = chg || s:c1 != c2 - - if vismode ==# 'V' && new_vis - let chg = 1 - endif - - " Update the vars. - let s:l0 = l_1 - let s:l1 = l2 - let s:c0 = c_1 - let s:c1 = c2 - - " If there was no change, then don't decrement the count (it didn't - " count because it didn't do anything). - if chg - let cnt = cnt - 1 - else - " Since this didn't work, push the selection back one char. This - " will have the effect of getting the enclosing block. Do it at - " the beginning rather than the end - the beginning is very likely - " to be only one indentation level different. - if s:l0 == 0 - return - endif - let s:l0 -= 1 - let s:c0 = len(getline(s:l0)) - endif - - let itr_cnt += 1 - - endwhile - - " Apply the range we have found. Make sure to use the current visual mode. - call cursor(s:l0, s:c0) - exe "normal! " . vismode - call cursor(s:l1, s:c1) - normal! o - - " Update these static variables - we need to keep these up-to-date between - " invocations because it's the only way we can detect whether it's a new - " visual mode. We need to know if it's a new visual mode because otherwise - " if there's a single line block in visual line mode and we select it with - " "V", we can't tell whether it's already been selected using Vii. - exe "normal! \" - let s:l0 = line("'<") - let s:l1 = line("'>") - let s:c0 = col("'<") - let s:c1 = col("'>") - normal gv - -endfunction - -function! HandleTextObjectMapping(inner, incbelow, vis, range) - call TextObject(a:inner, a:incbelow, a:vis, a:range, v:count1) -endfunction diff --git a/sources_non_forked/vim-multiple-cursors/doc/tags b/sources_non_forked/vim-multiple-cursors/doc/tags new file mode 100644 index 00000000..5efd6085 --- /dev/null +++ b/sources_non_forked/vim-multiple-cursors/doc/tags @@ -0,0 +1,21 @@ +MultipleCursorsFind multiple_cursors.txt /*MultipleCursorsFind* +g:multi_cursor_exit_from_insert_mode multiple_cursors.txt /*g:multi_cursor_exit_from_insert_mode* +g:multi_cursor_exit_from_visual_mode multiple_cursors.txt /*g:multi_cursor_exit_from_visual_mode* +g:multi_cursor_next_key multiple_cursors.txt /*g:multi_cursor_next_key* +g:multi_cursor_prev_key multiple_cursors.txt /*g:multi_cursor_prev_key* +g:multi_cursor_quit_key multiple_cursors.txt /*g:multi_cursor_quit_key* +g:multi_cursor_skip_key multiple_cursors.txt /*g:multi_cursor_skip_key* +g:multi_cursor_start_key multiple_cursors.txt /*g:multi_cursor_start_key* +g:multi_cursor_use_default_mapping multiple_cursors.txt /*g:multi_cursor_use_default_mapping* +multiple-cursors-contents multiple_cursors.txt /*multiple-cursors-contents* +multiple-cursors-contributing multiple_cursors.txt /*multiple-cursors-contributing* +multiple-cursors-credit multiple_cursors.txt /*multiple-cursors-credit* +multiple-cursors-global-options multiple_cursors.txt /*multiple-cursors-global-options* +multiple-cursors-intro multiple_cursors.txt /*multiple-cursors-intro* +multiple-cursors-issues multiple_cursors.txt /*multiple-cursors-issues* +multiple-cursors-license multiple_cursors.txt /*multiple-cursors-license* +multiple-cursors-mappings multiple_cursors.txt /*multiple-cursors-mappings* +multiple-cursors-references multiple_cursors.txt /*multiple-cursors-references* +multiple-cursors-usage multiple_cursors.txt /*multiple-cursors-usage* +vim-multiple-cursors multiple_cursors.txt /*vim-multiple-cursors* +vim-multiple-cursors.txt multiple_cursors.txt /*vim-multiple-cursors.txt* diff --git a/sources_non_forked/vim-pep8/README.mdown b/sources_non_forked/vim-pep8/README.mdown new file mode 100644 index 00000000..b3b2fc3a --- /dev/null +++ b/sources_non_forked/vim-pep8/README.mdown @@ -0,0 +1,35 @@ +vim-pep8 ![Project status](http://stillmaintained.com/nvie/vim-pep8.png) +======== + +Installation +------------ +1. Install [pep8](http://pypi.python.org/pypi/pep8/) +2. Copy the file `ftplugin/python_pep8.vim` to your `~/.vim/ftplugin` directory + + +Usage +----- +1. Open a Python file +2. Press `` to run `pep8` on it + +It shows the errors inside a quickfix window, which will allow your to quickly +jump to the error locations by simply pressing [Enter]. + + +Customization +------------- +If you don't want to use the `` key for PEP8-checking, simply remap it to +another key. It autodetects whether it has been remapped and won't register +the `` key if so. For example, to remap it to `` instead, use: + + autocmd FileType python map :call Pep8() + + +Tips +---- +This plugin goes well together with the following plugins: + +- [PyFlakes](http://github.com/nvie/vim-pyflakes) (Python static syntax checker + under ``) +- [PyUnit](http://github.com/nvie/vim-pyunit) (unit test helper under `` + and ``) diff --git a/sources_non_forked/vim-pep8/ftplugin/python_pep8.vim b/sources_non_forked/vim-pep8/ftplugin/python_pep8.vim new file mode 100644 index 00000000..a2beb206 --- /dev/null +++ b/sources_non_forked/vim-pep8/ftplugin/python_pep8.vim @@ -0,0 +1,78 @@ +" +" Python filetype plugin for running pep8 +" Language: Python (ft=python) +" Maintainer: Vincent Driessen +" Version: Vim 7 (may work with lower Vim versions, but not tested) +" URL: http://github.com/nvie/vim-pep8 +" +" Only do this when not done yet for this buffer +if exists("b:loaded_pep8_ftplugin") + finish +endif +let b:loaded_pep8_ftplugin = 1 + +if !exists("g:pep8_args") + let g:pep8_args = "" +endif + +let s:pep8_cmd="pep8" + +if !exists("*Pep8()") + function Pep8() + if !executable(s:pep8_cmd) + echoerr "File " . s:pep8_cmd . " not found. Please install it first." + return + endif + + set lazyredraw " delay redrawing + cclose " close any existing cwindows + + " store old grep settings (to restore later) + let l:old_gfm=&grepformat + let l:old_gp=&grepprg + + " write any changes before continuing + if &readonly == 0 + update + endif + + " perform the grep itself + let &grepformat="%f:%l:%c: %m" + let &grepprg=s:pep8_cmd . " --repeat " . g:pep8_args + silent! grep! % + + " restore grep settings + let &grepformat=l:old_gfm + let &grepprg=l:old_gp + + " open cwindow + let has_results=getqflist() != [] + if has_results + execute 'belowright copen' + setlocal wrap + nnoremap c :cclose + nnoremap q :cclose + endif + + set nolazyredraw + redraw! + + if has_results == 0 + " Show OK status + hi Green ctermfg=green + echohl Green + echon "PEP8 safe" + echohl + endif + endfunction +endif + +" Add mappings, unless the user didn't want this. +" The default mapping is registered under to by default, unless the user +" remapped it already (or a mapping exists already for ) +if !exists("no_plugin_maps") && !exists("no_pep8_maps") + if !hasmapto('Pep8(') + noremap :call Pep8() + noremap! :call Pep8() + endif +endif diff --git a/sources_non_forked/vim-snipmate/doc/SnipMate.txt b/sources_non_forked/vim-snipmate/doc/SnipMate.txt new file mode 100644 index 00000000..06708a2b --- /dev/null +++ b/sources_non_forked/vim-snipmate/doc/SnipMate.txt @@ -0,0 +1,455 @@ +*SnipMate.txt* Plugin for using TextMate-style snippets in Vim. + +SnipMate *snippet* *snippets* *SnipMate* +Last Change: December 27, 2009 + +1. Description |SnipMate-description| +2. Usage |SnipMate-usage| +3. Interface and Settings |SnipMate-interface| |SnipMate-settings| +4. Snippet syntax |SnipMate-syntax| +5. Snippet sources |SnipMate-snippet-sources| +6. Disadvantages to TextMate |SnipMate-disadvantages| +7. Contact |SnipMate-contact| +8. License |SnipMate-license| + +For Vim version 7.0 or later. +This plugin only works if 'compatible' is not set. +{Vi does not have any of these features.} + +SnipMate depends on vim-addon-mw-utils and tlib. + +============================================================================== +DESCRIPTION *SnipMate-description* + +SnipMate implements snippet features in Vim. A snippet is like a template, +reducing repetitive insertion of pieces of text. Snippets can contain +placeholders for modifying the text if necessary or interpolated code for +evaluation. For example, in C, typing "for" then pushing could expand +to: > + + for (i = 0; i < count; i++) { + /* code */ + } + +SnipMate is inspired by TextMate's snippet features. + +============================================================================== +USAGE *SnipMate-usage* + +Every snippet consists of an expansion and a trigger. Typing a trigger into +your buffer and then hitting your trigger key ( by default, see +|SnipMate-mappings|) will replace the trigger with the expansion text. + +The expansion text can optionally include tab stops. When it does, upon +expansion of the snippet, the cursor is placed at the first one, and the user +can jump between each tab stop. Each of these tab stops can be represented by +default placeholder text. If such a placeholder is provided, then the text of +the placeholder can be repeated in the snippet at specified mirrors. Any edits +to the placeholder are instantly updated at every mirror. + +SnipMate allows multiple snippets to use the same trigger. When triggered, +a list of all snippets with that trigger is provided and prompts for which +snippet to use. + + *SnipMate-scopes* +SnipMate searches for snippets inside a directory named "snippets" inside each +entry in 'runtimepath'. Which files are loaded depends on 'filetype' and +'syntax'; see |SnipMate-syntax| for more information. Snippets are loaded and +refreshed automatically on demand. + +Note: SnipMate does not ship with any snippets. In order to use it, the user +must either write their own snippets or obtain some from a repository like +https://github.com/honza/vim-snippets + +============================================================================== +INTERFACE AND SETTINGS *SnipMate-interface* *SnipMate-settings* + + *SnipMate-commands* +Commands~ + + *:SnipMateOpenSnippetFiles* +:SnipMateOpenSnippetFiles Opens a list of all valid snippet locations + based on the current scope |SnipMate-scopes|. + Only existing files and non-existing .snippets + files will be shown, with the existing files + shown first. + + *SnipMate-options* +Options~ + +g:snips_author A variable used in some snippets in place of + the author's (your) name. Similar to + $TM_FULLNAME in TextMate. For example, > + snippet name + `g:snips_author` +< creates a snippet "name" that expands to your + name. + +g:snipMate This |Dictionary| contains other SnipMate + options. In short add > + let g:snipMate = {} +< to your .vimrc before setting other SnipMate + options. + +g:snipMate.scope_aliases A |Dictionary| associating certain filetypes + with other scopes |SnipMate-scopes|. The + entries consist of a filetype as the key and + a comma-separated list of aliases as the + value. For example, > + let g:snipMate.scope_aliases = {} + let g:snipMate.scope_aliases['ruby'] + \ = 'ruby,ruby-rails' +< tells SnipMate that "ruby-rails" snippets in + addition to "ruby" snippets should be loaded + when editing files with 'filetype' set to + "ruby" or contains "ruby" as an entry in the + case of dotted filetypes. + +g:snipMate['no_match_completion_feedkeys_chars'] + A string inserted when no match for a trigger + is found. By default a tab is inserted + according to 'expandtab', 'tabstop', and + 'softtabstop'. Set it to the empty string to + prevent anything from being inserted. + + *SnipMate-mappings* +Mappings~ + +The mappings SnipMate uses can be customized with the |:map| commands. For +example, to change the key that triggers snippets and moves to the next +tabstop, > + + :imap SnipMateNextOrTrigger + :smap SnipMateNextOrTrigger + +The list of possible mappings is as follows: + +SnipMateNextOrTrigger Default: Mode: Insert, Select + Jumps to the next tab stop or, if none exists, + try to expand a snippet. Use in both insert + and select modes. + +SnipMateBack Default: Mode: Insert, Select + Jump to the previous tab stop, if it exists. + Use in both insert and select modes. + +SnipMateShow Default: Mode: Insert + Show all available snippets (that start with + the previous text, if it exists). Use in + insert mode. + +SnipMateVisual Default: Mode: Visual + See |SnipMate-visual|. + +Additionally, is mapped in visual mode in .snippets files for retabbing +snippets. + +============================================================================== +SYNTAX *snippet-syntax* *SnipMate-syntax* + +SnipMate looks inside of each entry of 'rtp' (or |SnipMate-snippet-sources|) +for a directory named /snippets/. Based on the 'filetype' and 'syntax' +settings (taking into account the dotted syntax), the following files are read +for snippets: > + + .../snippets/.snippets + .../snippets//.snippets + .../snippets//.snippet + .../snippets///.snippet + +where is an entry in 'filetype' or 'syntax', is an arbitrary +name, is the trigger for a snippet, and is +a description used for |SnipMate-multisnip|. + +A .snippet file defines a single snippet with the trigger (and description) +determined by the filename. The entire contents of the file are used as the +snippet expansion text. + +Multiple snippets can be defined in *.snippets files. Each snippet definition +looks something like: > + + snippet trigger optional description + guard left_from_cursor='^\s*' + expanded text + more expanded text + +< *SnipMate-multisnip* +The description is optional. If it is left out and a second snippet inside the +same .snippets file uses the same trigger, the second one will overwrite the +first. Otherwise multisnip is used. + +The guard condition line is also optional. It can be used to make a snippet +available only in some cases. The value should be a VimL expression. + +Note: Hard tabs in the expansion text are required. When the snippet is +expanded in the text and 'expandtab' is set, each tab will be replaced with +spaces based on 'softtabstop' if nonzero or 'shiftwidth' otherwise. + +Comments can be made in .snippets files by starting a line with a # character. +However these can't be used inside of snippet definitions: > + + # this is a correct comment + snippet trigger + expanded text + snippet another_trigger + # this isn't a comment! + expanded text + +This should hopefully be clear with the included syntax highlighting. + + *snipMate-extends* +Borrowing from UltiSnips, .snippets files can also contain an extends +directive, for example: > + + extends html, javascript, css + +will tell SnipMate to also read html, javascript, and css snippets. + + *SnipMate-tabstops* +Tab stops~ + +A tab stop, specified by ${#} where # is a number, tells SnipMate where to +position the cursor next. The special tab stop ${0} denotes the last cursor +position; in its absence, the cursor is placed at the end of the snippet. + +For example, to place the cursor first on the id of a
tag, allow +the user to press to go to the middle of it, and finally end after +
: > + + snippet div +
+ ${2} +
+ +< *SnipMate-placeholders* *SnipMate-mirrors* +Placeholders and Mirrors~ + +Placeholder text can be supplied using "${#:text}", where # is the number of +the tab stop. This text then can be copied throughout the snippet using "$#", +given # is the same number as used before. So, to make a C for loop: > + + snippet for + for (${2:i}; $2 < ${1:count}; $1++) { + ${4} + } + +This will cause "count" to first be selected and change if the user starts +typing. When is pressed, the "i" in ${2}'s position will be selected; +all $2 variables will default to "i" and automatically be updated if the user +starts typing. + +NOTE: "$#" syntax is used only for mirrors, not for tab stops as in TextMate. + +Mirrors can also be used inside of placeholders. For instance: > + + snippet opt + + +Will, as usual, cause "option" to first be selected and update all the $1 +variables if the user starts typing. Since one of these variables is inside of +${2}, this text will then be used as a placeholder for the next tab stop, +allowing the user to change it if he wishes. + +To copy a value throughout a snippet without supplying default text, simply +use the "${#:}" construct without the text, e.g.: > + + snippet foo + ${1:}bar$1 + +< *SnipMate-visual* +There is a special placeholder called {VISUAL}. If you visually select text, +then press Vim switches to insert mode. The next snippet you'll expand +will replace {VISUAL} by the text which was selected previously. + + *SnipMate-eval* +Interpolated Vim Script~ + +Snippets can also contain Vim script commands that are executed (via |eval()|) +when the snippet is inserted. Commands are given inside backticks (`...`); for +TextMates's functionality, use the |system()| function. E.g.: > + + snippet date + `system("date +%Y-%m-%d")` + +will insert the current date, assuming you are on a Unix system. Note that you +can also (and should) use |strftime()| for this example. + +Filename([{expr}] [, {defaultText}]) *SnipMate-Filename()* + +Since the current filename is used often in snippets, a default function +has been defined for it in SnipMate.vim, appropriately called Filename(). + +With no arguments, the default filename without an extension is returned; +the first argument specifies what to place before or after the filename, +and the second argument supplies the default text to be used if the file +has not been named. "$1" in the first argument is replaced with the filename; +if you only want the filename to be returned, the first argument can be left +blank. Examples: > + + snippet filename + `Filename()` + snippet filename_with_default + `Filename('', 'name')` + snippet filename_foo + `Filename('$1_foo')` + +The first example returns the filename if it the file has been named, and an +empty string if it hasn't. The second returns the filename if it's been named, +and "name" if it hasn't. The third returns the filename followed by "_foo" if +it has been named, and an empty string if it hasn't. + +============================================================================== +SNIPPET SOURCES *SnipMate-snippet-sources* + +SnipMate is configurable. + +plugin/SnipMate.vim assigns three important keys: > + + " default implementation collecting snippets by handlers + let g:SnipMate['get_snippets'] = SnipMate#GetSnippets + " default handler: + let g:SnipMateSources['default'] = SnipMate#DefaultPool + " default directories containing snippets: + let g:SnipMate['snippet_dirs'] + \ = funcref#Function('return split(&runtimepath,",")') + +You can override all of those settings. + +You can see that the default set of snippets is determined by Vim's 'rtp'. + +Example 1:~ +autoload/SnipMate_python_demo.vim shows how you can register additional +sources such as creating snippets on the fly representing python function +definitions found in the current file. + +Example 2:~ +Add to your ~/.vimrc: For each know snippet add a second version ending in _ +adding folding markers > + + let g:commentChar = { + \ 'vim': '"', + \ 'c': '//', + \ 'cpp': '//', + \ 'sh': '#', + \ 'python': '#' + \ } + " url https://github.com/garbas/vim-snipmate/issues/49 + fun! AddFolding(text) + return substitute(a:text,'\n'," ".g:commentChar[&ft]." {{{\n",1)."\n".g:commentChar[&ft]." }}}" + endf + + fun! SnippetsWithFolding(scopes, trigger, result) + " hacky: temporarely remove this function to prevent infinite recursion: + call remove(g:SnipMateSources, 'with_folding') + " get list of snippets: + let result = SnipMate#GetSnippets(a:scopes, substitute(a:trigger,'_\(\*\)\?$','\1','')) + let g:SnipMateSources['with_folding'] = funcref#Function('SnippetsWithFolding') + + " add folding: + for k in keys(result) + let a:result[k.'_'] = map(result[k],'AddFolding(v:val)') + endfor + endf + + " force setting default: + runtime plugin/SnipMate.vim + " add our own source + let g:SnipMateSources['with_folding'] = funcref#Function('SnippetsWithFolding') + +See |SnipMate-syntax| for more details about all possible relative locations +to 'rtp' can be found in. + +============================================================================== +DISADVANTAGES *SnipMate-disadvantages* + +SnipMate.vim currently has the following disadvantages to TextMate's snippets: + - Nested placeholders are not currently possible. E.g.: > + '${3}' +< In TextMate this would first highlight ' id="some_id"', and if + you hit delete it would automatically skip ${2} and go to ${3} + on the next , but if you didn't delete it it would highlight + "some_id" first. You cannot do this in SnipMate.vim. + - Regex cannot be performed on variables, such as "${1/.*/\U&}" + - Placeholders cannot span multiple lines. + - Activating snippets in different scopes of the same file is + not possible. + +Perhaps some of these features will be added in a later release. + +============================================================================== +CHANGELOG *SnipMate-changelog* + +0.85 - 2013-04-03 +----------------- + +* Allow trigger key customization +* Enable undoing of snippet expansion +* Support backslash escaping in snippets +* Add support for {VISUAL} +* Expand filetype extension with scope_aliases +* Add expansion guards +* Enable per-buffer expansion of snippets +* Fix 'cpo' compatibility +* Update supertab compatibility +* Enable customization of various things through g:SnipMate + +* Disable spelling in snippet files +* Highlight trigger names in .snippets files + +* Update many snippets +* Separate sample snippets into separate repository + +0.84 +---- + +* Unreleased version by Michael Sanders, available on his GitHub, + + +0.83 - 2009-07-13 +----------------- + +* Last release done by Michael Sanders, available at + + +============================================================================== +CONTACT *SnipMate-contact* *SnipMate-author* + +SnipMate is currently maintained by: + - Rok Garbas + - Marc Weber (marco-oweber@gmx.de) + - Adnan Zafar + +For bug reports, issues, or questions, check out the Issues page on GitHub: +https://github.com/garbas/vim-snipmate/issues + +The original author, Michael Sanders, can be reached at: +msanders42+snipmate gmail com + + +============================================================================== +LICENSE *SnipMate-license* + +SnipMate is released under the MIT license: + +Copyright 2009-2010 Michael Sanders. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +The software is provided "as is", without warranty of any kind, express or +implied, including but not limited to the warranties of merchantability, +fitness for a particular purpose and noninfringement. In no event shall the +authors or copyright holders be liable for any claim, damages or other +liability, whether in an action of contract, tort or otherwise, arising from, +out of or in connection with the software or the use or other dealings in the +software. + +============================================================================== + vim:tw=78:ts=8:ft=help:norl: diff --git a/sources_non_forked/vim-snippets/UltiSnips/elixir.snippets b/sources_non_forked/vim-snippets/UltiSnips/elixir.snippets new file mode 100644 index 00000000..ae7ea201 --- /dev/null +++ b/sources_non_forked/vim-snippets/UltiSnips/elixir.snippets @@ -0,0 +1,168 @@ +# Credit: @iurifg + +snippet do +do + ${1} +end +endsnippet + +snippet if "if .. do .. end" +if ${1:condition} do + ${2:expression} +end +endsnippet + +snippet if "if .. do: .." +if ${1:condition}, do: ${2:expression} +endsnippet + +snippet ife "if .. do .. else .. end" +if ${1:condition} do + ${2:expression} +else + ${3:expression} +end +endsnippet + +snippet ife "if .. do: .. else:" +if ${1:condition}, do: ${2}, else: ${3} +endsnippet + +snippet unless "unless .. do .. end" +unless ${1} do + ${2} +end +endsnippet + +snippet unless "unless .. do: .." +unless ${1:condition}, do: ${2} +endsnippet + +snippet unlesse "unless .. do .. else .. end" +unless ${1:condition} do + ${2} +else + ${3} +end +endsnippet + +snippet unlesse "unless .. do: .. else:" +unless ${1:condition}, do: ${2}, else: ${3} +endsnippet + +snippet cond +"cond do" +${1} -> + ${2} +end +endsnippet + +snippet case +case ${1} do +${2} -> + ${3} +end +endsnippet + +snippet def +def ${1:name} do + ${2} +end +endsnippet + +snippet defin "def function(n), do: n" +def ${1:name}, do: ${2} +endsnippet + +snippet defg +def ${1:name} when ${2:guard-condition} do + ${3} +end +endsnippet + +snippet defim +defimpl ${1:protocol_name}, for: ${2:data_type} do + ${3} +end +endsnippet + +snippet defma +defmacro ${1:name} do + ${2} +end +endsnippet + +snippet defmo +defmodule ${1:module_name} do + ${2} +end +endsnippet + +snippet defp +defp ${1:name} do + ${2} +end +endsnippet + +snippet defpr +defprotocol ${1:name}, [${2:function}] +endsnippet + +snippet defr +defrecord ${1:record_name}, ${2:fields} +endsnippet + +snippet doc +@doc """ +${1} +""" +endsnippet + +snippet fn +fn(${1:args}) -> ${2} end +endsnippet + +snippet fun +function do + ${1} +end +endsnippet + +snippet mdoc +@moduledoc """ +${1} +""" +endsnippet + +snippet rec +receive do +${1} -> + ${2} +end +endsnippet + +snippet req +require ${1:module_name} +endsnippet + +snippet imp +import ${1:module_name} +endsnippet + +snippet ali "alias old-module to shorthand" +alias ${1:module_name} +endsnippet + +snippet test +test "${1:test_name}" do + ${2} +end +endsnippet + +snippet try "try .. rescue .. end" +try do + ${1} +rescue + ${2} -> ${3} +end +endsnippet diff --git a/sources_non_forked/vim-snippets/UltiSnips/javascript_ember.snippets b/sources_non_forked/vim-snippets/UltiSnips/javascript_ember.snippets new file mode 100644 index 00000000..543a26ad --- /dev/null +++ b/sources_non_forked/vim-snippets/UltiSnips/javascript_ember.snippets @@ -0,0 +1,88 @@ +################################################################### +# Ember snippets # +################################################################### + +# Application +snippet eapp "App.Name = Ember.Application.create({});" +${1:App.Name} = Ember.Application.create({}); +endsnippet + +# Models +snippet emod "App.ModelName = Ember.Model.extend({...});" +${1:model_name} = Ember.Model.extend({ + ${0://Properties here...} +}); +endsnippet + +# View +snippet eview "App.ViewName = Ember.Model.extend({...});" +${1:view_name} = Ember.View.extend({ + ${0://Properties here...} +}); +endsnippet + +# Controller +snippet econtroller "App.ControllerName = Ember.Model.extend({...});" +${1:controller_name} = Ember.ObjectController.extend({ + ${0://Properties here...} +}); +endsnippet + +# Route +snippet eroute "App.RouteName = Ember.Route.extend({...});" +${1:route_name} = Ember.Route.extend({ + ${0://Properties here...} +}); +endsnippet + +snippet eview "App.ViewName = Ember.Model.create({...});" +${1:view_name} = Ember.View.create({ + ${0://Properties here...} +}); +endsnippet + +# Object +snippet eobj "App.ObjectName = Ember.Object.extend({...});" +${1:object_name} = Ember.Object.create({ + ${0://Properties here...} +}); +endsnippet + +# Mixin +snippet emix "App.MixinName = Ember.Model.extend({...});" +${1:view_name} = Ember.Mixin.create({ + ${0://Properties here...} +}); +endsnippet + +# Ember getter and setter +snippet eget "this.get('property');" +${1:this}.get('${2:property}'); +endsnippet + +snippet eset "this.set('property', value);" +${1:this}.set('${2:property}', ${3:value}); +endsnippet + +# Computer properties +snippet cpro "property_name: function() {...}.property()," +${1:property_name}: function() { + ${0://body...} +}.property('${3:argumenet}'), +endsnippet + +snippet cpro ": function() {...}.property('property')," +${1:property_name}: function() { + ${0://body...} +}.property(), +endsnippet + + +# Observes +snippet proo "property_name: function() {...}.property()" +${1:property_name}: function() { + ${0://body...} +}.observes('${3:property}'), +endsnippet + +# vim:ft=snippets: diff --git a/sources_non_forked/vim-snippets/snippets/ls.snippets b/sources_non_forked/vim-snippets/snippets/ls.snippets new file mode 100644 index 00000000..909b35ee --- /dev/null +++ b/sources_non_forked/vim-snippets/snippets/ls.snippets @@ -0,0 +1,108 @@ +# Closure loop +snippet forinlet + for ${1:name} in ${2:array} + let $1 + ${3} +# Array comprehension +snippet fora + for ${1:name} in ${2:array} + ${3} +# Object comprehension +snippet foro + for ${1:key}, ${2:value} of ${3:object} + ${4} +# Range comprehension (inclusive) +snippet forr + for ${1:name} from ${2:start} to ${3:finish} + ${4} +snippet forrb + for ${1:name} from ${2:start} to ${3:finish} by ${4:step} + ${5} +# Range comprehension (exclusive) +snippet forrex + for ${1:name} from ${2:start} til ${3:finish} + ${4} +snippet forrexb + for ${1:name} from ${2:start} til ${3:finish} by ${4:step} + ${5} +# Function +snippet fun + (${1:args}) -> + ${2} +# Function (bound) +snippet bfun + (${1:args}) ~> + ${2} +# Class +snippet cla class .. + class ${1:`substitute(Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`} + ${2} +snippet cla class .. constructor: .. + class ${1:`substitute(Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`} + (${2:args}) -> + ${3} + + ${4} +snippet cla class .. extends .. + class ${1:`substitute(Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`} extends ${2:ParentClass} + ${3} +snippet cla class .. extends .. constructor: .. + class ${1:`substitute(Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`} extends ${2:ParentClass} + (${3:args}) -> + ${4} + + ${5} +# If +snippet if + if ${1:condition} + ${2} +# If __ Else +snippet ife + if ${1:condition} + ${2} + else + ${3} +# Else if +snippet elif + else if ${1:condition} + ${2} +# Ternary If +snippet ifte + if ${1:condition} then ${2:value} else ${3:other} +# Unless +snippet unl + ${1:action} unless ${2:condition} +# Switch +snippet swi + switch ${1:object} + case ${2:value} + ${3} + default void +snippet mat + match ${1:object} + | ${2:value} => ${3} + | otherwise => void + +# Log +snippet log + console.log ${1} +# stringify +snippet str + JSON.stringify ${1}, void, 2 + +# Try __ Catch +snippet try + try + ${1} + catch ${2:error} + ${3} +# Require +snippet req + ${2:$1} = require '${1}'${3} +# Require! +snippet req! + require! ${1} + +# Export +snippet exp + ${1:root} = exports ? this diff --git a/sources_non_forked/vim-statline b/sources_non_forked/vim-statline new file mode 160000 index 00000000..45d369ef --- /dev/null +++ b/sources_non_forked/vim-statline @@ -0,0 +1 @@ +Subproject commit 45d369eff6e2c5441ba21918825a8c215a44a951 diff --git a/update_plugins.py b/update_plugins.py index 381c0161..2d4785ea 100644 --- a/update_plugins.py +++ b/update_plugins.py @@ -8,21 +8,19 @@ from os import path #--- Globals ---------------------------------------------- PLUGINS = """ -ack.vim https://github.com/mileszs/ack.vim bufexplorer https://github.com/corntrace/bufexplorer ctrlp.vim https://github.com/kien/ctrlp.vim mayansmoke https://github.com/vim-scripts/mayansmoke nerdtree https://github.com/scrooloose/nerdtree nginx.vim https://github.com/vim-scripts/nginx.vim open_file_under_cursor.vim https://github.com/amix/open_file_under_cursor.vim +pyflakes https://github.com/vim-scripts/pyflakes snipmate-snippets https://github.com/scrooloose/snipmate-snippets taglist.vim https://github.com/vim-scripts/taglist.vim tlib https://github.com/vim-scripts/tlib vim-addon-mw-utils https://github.com/MarcWeber/vim-addon-mw-utils vim-bundle-mako https://github.com/sophacles/vim-bundle-mako -vim-coffee-script https://github.com/kchmck/vim-coffee-script vim-colors-solarized https://github.com/altercation/vim-colors-solarized -vim-indent-object https://github.com/michaeljsmith/vim-indent-object vim-less https://github.com/groenewege/vim-less vim-markdown https://github.com/tpope/vim-markdown vim-pyte https://github.com/therubymug/vim-pyte @@ -31,6 +29,7 @@ vim-snippets https://github.com/honza/vim-snippets vim-surround https://github.com/tpope/vim-surround vim-expand-region https://github.com/terryma/vim-expand-region vim-multiple-cursors https://github.com/terryma/vim-multiple-cursors +vim-pep8 https://github.com/xiaocao/vim-pep8 """.strip() GITHUB_ZIP = '%s/archive/master.zip' diff --git a/vimrcs/TODO b/vimrcs/TODO new file mode 100644 index 00000000..3d3e1007 --- /dev/null +++ b/vimrcs/TODO @@ -0,0 +1 @@ +https://github.com/millermedeiros/vim-statline diff --git a/vimrcs/basic.vim b/vimrcs/basic.vim index 2e31754d..7228dcef 100644 --- a/vimrcs/basic.vim +++ b/vimrcs/basic.vim @@ -44,7 +44,7 @@ " => General """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Sets how many lines of history VIM has to remember -set history=700 +set history=2048 " Enable filetype plugins filetype plugin on @@ -70,7 +70,7 @@ command W w !sudo tee % > /dev/null " => VIM user interface """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Set 7 lines to the cursor - when moving vertically using j/k -set so=7 +set so=10 " Turn on the WiLd menu set wildmenu @@ -87,7 +87,7 @@ endif set ruler " Height of the command bar -set cmdheight=2 +set cmdheight=1 " A buffer becomes hidden when it is abandoned set hid @@ -117,7 +117,7 @@ set magic " Show matching brackets when text indicator is over them set showmatch " How many tenths of a second to blink when matching brackets -set mat=2 +set mat=3 " No annoying sound on errors set noerrorbells @@ -126,7 +126,7 @@ set t_vb= set tm=500 " Add a bit extra margin to the left -set foldcolumn=1 +set foldcolumn=0 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -137,6 +137,9 @@ syntax enable try colorscheme desert + "colorscheme peaksea + "colorscheme solarized + "colorscheme mayansmoke catch endtry @@ -204,6 +207,10 @@ vnoremap # :call VisualSelection('b', '') map j gj map k gk +" Turn off vim'S horroble REgex +nnoremap / /\v +vnoremap / /\v + " Map to / (search) and Ctrl- to ? (backwards search) map / map ? @@ -211,38 +218,43 @@ map ? " Disable highlight when is pressed map :noh -" Smart way to move between windows -map j -map k -map h -map l -" Close the current buffer -map bd :Bclose +"" ###Taps +"" ### +"" Smart way to move between windows +"map j +"map k +"map h +"map l -" Close all the buffers -map ba :1,1000 bd! +"" Close the current buffer +"map bd :Bclose -" Useful mappings for managing tabs -map tn :tabnew -map to :tabonly -map tc :tabclose -map tm :tabmove -map t :tabnext +"" Close all the buffers +"map ba :1,1000 bd! -" Opens a new tab with the current buffer's path -" Super useful when editing files in the same directory -map te :tabedit =expand("%:p:h")/ +"" Useful mappings for managing tabs +"map tn :tabnew +"map to :tabonly +"map tc :tabclose +"map tm :tabmove +"map t :tabnext -" Switch CWD to the directory of the open buffer -map cd :cd %:p:h:pwd +"" Opens a new tab with the current buffer's path +"" Super useful when editing files in the same directory +"map te :tabedit =expand("%:p:h")/ -" Specify the behavior when switching between buffers -try - set switchbuf=useopen,usetab,newtab - set stal=2 -catch -endtry +"" Switch CWD to the directory of the open buffer +"map cd :cd %:p:h:pwd + +"" Specify the behavior when switching between buffers +"try +" set switchbuf=useopen,usetab,newtab +" set stal=2 +"catch +"endtry + +""### Taps ENd " Return to last edit position when opening files (You want this!) autocmd BufReadPost * @@ -259,9 +271,18 @@ set viminfo^=% " Always show the status line set laststatus=2 -" Format the status line -set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l +set statusline= " clear the statusline for when vimrc is reloaded +set statusline+=%-3.3n\ " buffer number +set statusline+=%F\ " file name +set statusline+=%h%m%r%w " flags +""set statusline+=[%{strlen(&ft)?&ft:'none'}, " filetype +""set statusline+=%{strlen(&fenc)?&fenc:&enc}, " encoding +""set statusline+=%{&fileformat}] " file format +set statusline+=%= " right align +set statusline+=%{synIDattr(synID(line('.'),col('.'),1),'name')}\ " highlight +set statusline+=%b,0x%-8B\ " current char +set statusline+=%-14.(%l,%c%V%)\ %<%P " offset """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Editing mappings @@ -269,18 +290,6 @@ set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ " Remap VIM 0 to first non-blank character map 0 ^ -" Move a line of text using ALT+[jk] or Comamnd+[jk] on mac -nmap mz:m+`z -nmap mz:m-2`z -vmap :m'>+`mzgv`yo`z -vmap :m'<-2`>my` - nmap - vmap - vmap -endif " Delete trailing white space on save, useful for Python and CoffeeScript ;) func! DeleteTrailingWS() @@ -288,40 +297,11 @@ func! DeleteTrailingWS() %s/\s\+$//ge exe "normal `z" endfunc + autocmd BufWrite *.py :call DeleteTrailingWS() autocmd BufWrite *.coffee :call DeleteTrailingWS() -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" => vimgrep searching and cope displaying -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" When you press gv you vimgrep after the selected text -vnoremap gv :call VisualSelection('gv', '') - -" Open vimgrep and put the cursor in the right position -map g :vimgrep // **/*. - -" Vimgreps in the current file -map :vimgrep // % - -" When you press r you can search and replace the selected text -vnoremap r :call VisualSelection('replace', '') - -" Do :help cope if you are unsure what cope is. It's super useful! -" -" When you search with vimgrep, display your results in cope by doing: -" cc -" -" To go to the next search result do: -" n -" -" To go to the previous search results do: -" p -" -map cc :botright cope -map co ggVGy:tabnew:set syntax=qfpgg -map n :cn -map p :cp """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -343,12 +323,15 @@ map s? z= " Remove the Windows ^M - when the encodings gets messed up noremap m mmHmt:%s///ge'tzt'm -" Quickly open a buffer for scripbble -map q :e ~/buffer " Toggle paste mode on and off map pp :setlocal paste! +"folding settings (with +set foldmethod=indent "fold based on indent +set foldnestmax=10 "deepest fold is 10 levels +set nofoldenable "dont fold by default +set foldlevel=1 "this is just what i use """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -390,23 +373,4 @@ function! HasPaste() return '' endfunction -" Don't close window, when deleting a buffer -command! Bclose call BufcloseCloseIt() -function! BufcloseCloseIt() - let l:currentBufNum = bufnr("%") - let l:alternateBufNum = bufnr("#") - if buflisted(l:alternateBufNum) - buffer # - else - bnext - endif - - if bufnr("%") == l:currentBufNum - new - endif - - if buflisted(l:currentBufNum) - execute("bdelete! ".l:currentBufNum) - endif -endfunction diff --git a/vimrcs/extended.vim b/vimrcs/extended.vim index 6373d424..e4b947f1 100644 --- a/vimrcs/extended.vim +++ b/vimrcs/extended.vim @@ -52,33 +52,6 @@ catch endtry -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" => Command mode related -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" Smart mappings on the command line -cno $h e ~/ -cno $d e ~/Desktop/ -cno $j e ./ -cno $c e eCurrentFileDir("e") - -" $q is super useful when browsing on the command line -" it deletes everything until the last slash -cno $q eDeleteTillSlash() - -" Bash like keys for the command line -cnoremap -cnoremap -cnoremap - -cnoremap -cnoremap - -" Map ½ to something useful -map ½ $ -cmap ½ $ -imap ½ $ - - """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Parenthesis/bracket """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -115,25 +88,6 @@ autocmd FileType css set omnifunc=csscomplete#CompleteCSS """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Helper functions """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -func! DeleteTillSlash() - let g:cmd = getcmdline() - - if has("win16") || has("win32") - let g:cmd_edited = substitute(g:cmd, "\\(.*\[\\\\]\\).*", "\\1", "") - else - let g:cmd_edited = substitute(g:cmd, "\\(.*\[/\]\\).*", "\\1", "") - endif - - if g:cmd == g:cmd_edited - if has("win16") || has("win32") - let g:cmd_edited = substitute(g:cmd, "\\(.*\[\\\\\]\\).*\[\\\\\]", "\\1", "") - else - let g:cmd_edited = substitute(g:cmd, "\\(.*\[/\]\\).*/", "\\1", "") - endif - endif - - return g:cmd_edited -endfunc func! CurrentFileDir(cmd) return a:cmd . " " . expand("%:p:h") . "/" diff --git a/vimrcs/filetypes.vim b/vimrcs/filetypes.vim index 65fa0699..c618d972 100644 --- a/vimrcs/filetypes.vim +++ b/vimrcs/filetypes.vim @@ -4,8 +4,6 @@ let python_highlight_all = 1 au FileType python syn keyword pythonDecorator True None False self -au BufNewFile,BufRead *.jinja set syntax=htmljinja -au BufNewFile,BufRead *.mako set ft=mako au FileType python map F :set foldmethod=indent @@ -18,6 +16,9 @@ au FileType python map 2 /def au FileType python map C ?class au FileType python map D ?def +autocmd BufWrite *.py :call DeleteTrailingWS() + + """""""""""""""""""""""""""""" " => JavaScript section diff --git a/sources_forked/vim-peepopen/README b/vimrcs/functions.vim similarity index 100% rename from sources_forked/vim-peepopen/README rename to vimrcs/functions.vim diff --git a/vimrcs/plugins_config.vim b/vimrcs/plugins_config.vim index 6ac0d330..89cb4190 100644 --- a/vimrcs/plugins_config.vim +++ b/vimrcs/plugins_config.vim @@ -29,16 +29,6 @@ let MRU_Max_Entries = 400 map f :MRU -"""""""""""""""""""""""""""""" -" => YankRing -"""""""""""""""""""""""""""""" -if has("win16") || has("win32") - " Don't do anything -else - let g:yankring_history_dir = '~/.vim_runtime/temp_dirs/' -endif - - """""""""""""""""""""""""""""" " => CTRL-P """""""""""""""""""""""""""""" @@ -51,12 +41,6 @@ let g:ctrlp_max_height = 20 let g:ctrlp_custom_ignore = 'node_modules\|^\.DS_Store\|^\.git\|^\.coffee' -"""""""""""""""""""""""""""""" -" => Peepopen -"""""""""""""""""""""""""""""" -map j :PeepOpen - - """""""""""""""""""""""""""""" " => ZenCoding diff --git a/vimrcs/vimrc_bood.vim b/vimrcs/vimrc_bood.vim new file mode 100644 index 00000000..a9044317 --- /dev/null +++ b/vimrcs/vimrc_bood.vim @@ -0,0 +1,231 @@ +" Bood vim Config + + +"""""""""""""""""""""" +"""" General +"""""""""""""""""""""" + +" Sets how many lines of history VIM has to remember +set history=700 + +" Enable filetype plugins +filetype plugin on +filetype indent on + +" Set to auto read when a file is changed from the outside +set autoread + +" Uncomment the next line to make Vim more Vi-compatible +" NOTE: debian.vim sets 'nocompatible'. Setting 'compatible' changes numerous +" options, so any other options should be set AFTER setting 'compatible'. +"set compatible + + + +" With a map leader it's possible to do extra key combinations +" " like w saves the current file + let mapleader = "," + let g:mapleader = "," + + + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" => VIM user interface +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + + + + + +" Set 7 lines to the cursor - when moving vertically using j/k +set so=7 + +" Turn on the WiLd menu +set wildmenu + +" " Ignore compiled files +set wildignore=*.o,*~,*.pyc +"if has("win16") || has("win32") +" set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*/.DS_Store +"else +" set wildignore+=.git\*,.hg\*,.svn\* +"endif + +"Always show current position +set ruler + + +" Highlight search results +set hlsearch +" +" " Makes search act like search in modern browsers +set incsearch + +"For regular expressions turn magic on +set magic + +"Show matching brackets when text indicator is over them +set showmatch +" How many tenths of a second to blink when matching brackets +set mat=2 + + +" Turn off vim'S horroble REgex +nnoremap / /\v +vnoremap / /\v + + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" => Colors and Fonts +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" " Enable syntax highlighting + syntax enable +" +try + colorscheme desert +catch +endtry + + +set background=dark + +"Set utf8 as standard encoding and en_US as the standard language +set encoding=utf8 + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" => Text, tab and indent related +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" " Use spaces instead of tabs +set expandtab +" +" " Be smart when using tabs ;) +set smarttab +" +" " 1 tab == 4 spaces +set shiftwidth=4 +set tabstop=4 +" +" " Linebreak on 500 characters +set lbr +set tw=500 +" +set ai "Auto indent +set si "Smart indent +set wrap "Wrap lines + + + +""""""""""""""""""""""""""""" +" => Visual mode related +""""""""""""""""""""""""""""""" +" " Visual mode pressing * or # searches for the current selection +" " Super useful! From an idea by Michael Naumann +vnoremap * :call VisualSelection('f', '') +vnoremap # :call VisualSelection('b', '') + + + +" Uncomment the following to have Vim jump to the last position when +" reopening a file +if has("autocmd") + au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif +endif + + +set viminfo^=% + + + +" Delete trailing white space on save, useful for Python and CoffeeScript ;) + +autocmd BufWrite *.py :call DeleteTrailingWS() + + + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" => Turn persistent undo on +" " means that you can undo even when you close a buffer/VIM +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +"try +" set undodir=~/.vim_runtime/temp_dirs/undodir +" set undofile +" catch +"endtry + + + + +" Uncommenting the next line enables syntax highlighting by default. +if has("syntax") + syntax on +endif + + +"################ +"Python +"################ +let python_highlight_all = 1 + + + +" Uncomment the following to have Vim load indentation rules and plugins +" according to the detected filetype. +"if has("autocmd") +" filetype plugin indent on +"endif + +" The following are commented out as they cause vim to behave a lot +" differently from regular Vi. They are highly recommended though. +"set showcmd " Show (partial) command in status line. +"set showmatch " Show matching brackets. +set ignorecase " Do case insensitive matching +set smartcase " Do smart case matching +"set incsearch " Incremental search +"set autowrite " Automatically save before commands like :next and :make +"set hidden " Hide buffers when they are abandoned +"set mouse=a " Enable mouse usage (all modes) + + + + +"Forget to open File with sudo +cmap w!! w !sudo tee % >/dev/null +cmap x!! x !sudo tee % >/dev/null + + +function! VisualSelection(direction, extra_filter) range + let l:saved_reg = @" + execute "normal! vgvy" + + let l:pattern = escape(@", '\\/.*$^~[]') + let l:pattern = substitute(l:pattern, "\n$", "", "") + + if a:direction == 'b' + execute "normal ?" . l:pattern . "^M" + elseif a:direction == 'gv' + call CmdLine("vimgrep " . '/'. l:pattern . '/' . ' **/*.' . a:extra_filter) + elseif a:direction == 'replace' + call CmdLine("%s" . '/'. l:pattern . '/') + elseif a:direction == 'f' + execute "normal /" . l:pattern . "^M" + endif + + let @/ = l:pattern + let @" = l:saved_reg +endfunction + +" Returns true if paste mode is enabled +function! HasPaste() + if &paste + return 'PASTE MODE ' + en + return '' +endfunction + +func! DeleteTrailingWS() + exe "normal mz" + %s/\s\+$//ge + exe "normal `z" +endfunc + +