From f3143286d3f9e1e2f05586198748e907d159e780 Mon Sep 17 00:00:00 2001 From: Max Alcala Date: Fri, 19 Feb 2016 10:35:36 -0600 Subject: [PATCH] updated plugins and added eslint goodies --- my_configs.vim | 4 +- sources_non_forked/ack.vim/LICENSE | 89 ++ sources_non_forked/ack.vim/README.md | 9 - sources_non_forked/ack.vim/autoload/ack.vim | 2 +- sources_non_forked/ag.vim/README.md | 7 +- sources_non_forked/ag.vim/autoload/ag.vim | 22 +- sources_non_forked/ctrlp.vim/readme.md | 3 + sources_non_forked/goyo.vim/autoload/goyo.vim | 19 +- sources_non_forked/nerdtree/CHANGELOG | 153 +++ sources_non_forked/nerdtree/LICENCE | 13 + sources_non_forked/nerdtree/README.markdown | 21 +- .../nerdtree/autoload/nerdtree.vim | 8 +- .../nerdtree/autoload/nerdtree/ui_glue.vim | 70 +- sources_non_forked/nerdtree/doc/NERD_tree.txt | 211 +--- .../nerdtree/lib/nerdtree/bookmark.vim | 57 +- .../nerdtree/lib/nerdtree/creator.vim | 103 +- .../nerdtree/lib/nerdtree/nerdtree.vim | 74 +- .../nerdtree/lib/nerdtree/notifier.vim | 4 +- .../nerdtree/lib/nerdtree/opener.vim | 29 +- .../nerdtree/lib/nerdtree/path.vim | 44 +- .../nerdtree/lib/nerdtree/tree_dir_node.vim | 109 +- .../nerdtree/lib/nerdtree/tree_file_node.vim | 139 +-- .../nerdtree/lib/nerdtree/ui.vim | 141 ++- .../nerdtree_plugin/exec_menuitem.vim | 1 - .../nerdtree/nerdtree_plugin/fs_menu.vim | 77 +- .../nerdtree/plugin/NERD_tree.vim | 17 +- .../nerdtree/syntax/nerdtree.vim | 43 +- sources_non_forked/syntastic/CONTRIBUTING.md | 6 +- sources_non_forked/syntastic/README.markdown | 43 +- .../syntastic/autoload/syntastic/c.vim | 32 +- .../syntastic/autoload/syntastic/log.vim | 9 +- .../autoload/syntastic/preprocess.vim | 364 +++++-- .../syntastic/autoload/syntastic/util.vim | 153 ++- .../syntastic/doc/syntastic.txt | 228 ++-- .../syntastic/plugin/syntastic.vim | 97 +- .../plugin/syntastic/autoloclist.vim | 6 +- .../syntastic/plugin/syntastic/checker.vim | 33 +- .../syntastic/plugin/syntastic/loclist.vim | 28 +- .../syntastic/plugin/syntastic/registry.vim | 29 +- .../syntax_checkers/ansible/ansible_lint.vim | 52 + .../{snowcrash.vim => drafter.vim} | 16 +- .../syntax_checkers/asciidoc/asciidoc.vim | 16 +- .../syntastic/syntax_checkers/asm/gcc.vim | 9 +- .../syntastic/syntax_checkers/bro/bro.vim | 8 +- .../syntax_checkers/c/clang_check.vim | 3 + .../syntax_checkers/c/clang_tidy.vim | 3 + .../syntax_checkers/coffee/coffeelint.vim | 9 +- .../syntastic/syntax_checkers/coq/coqtop.vim | 2 +- .../syntax_checkers/cpp/clang_check.vim | 2 - .../syntax_checkers/cpp/clang_tidy.vim | 2 - .../syntax_checkers/cpp/cppcheck.vim | 2 - .../syntastic/syntax_checkers/cpp/oclint.vim | 2 - .../syntastic/syntax_checkers/cpp/pc_lint.vim | 2 - .../syntax_checkers/css/mixedindentlint.vim | 22 + .../syntastic/syntax_checkers/css/phpcs.vim | 2 - .../syntastic/syntax_checkers/css/recess.vim | 2 - .../syntax_checkers/css/stylelint.vim | 47 + .../syntax_checkers/docbk/xmllint.vim | 2 - .../dockerfile/dockerfile_lint.vim | 53 + .../syntastic/syntax_checkers/go/go.vim | 13 +- .../syntax_checkers/go/gometalinter.vim | 53 + .../syntastic/syntax_checkers/go/gotype.vim | 4 +- .../syntastic/syntax_checkers/go/govet.vim | 2 +- .../syntax_checkers/haskell/ghc-mod.vim | 9 +- .../syntax_checkers/haskell/hlint.vim | 1 + .../syntax_checkers/jade/jade_lint.vim | 40 + .../syntax_checkers/java/checkstyle.vim | 36 +- .../syntastic/syntax_checkers/java/javac.vim | 51 +- .../syntax_checkers/javascript/eslint.vim | 32 +- .../syntax_checkers/javascript/flow.vim | 2 +- .../syntax_checkers/javascript/jscs.vim | 17 +- .../syntax_checkers/javascript/jsxhint.vim | 4 + .../javascript/mixedindentlint.vim | 40 + .../syntax_checkers/javascript/standard.vim | 10 +- .../syntax_checkers/markdown/mdl.vim | 2 +- .../syntastic/syntax_checkers/nix/nix.vim | 9 +- .../syntastic/syntax_checkers/nroff/igor.vim | 2 - .../syntastic/syntax_checkers/objc/oclint.vim | 2 - .../syntax_checkers/objcpp/oclint.vim | 2 - .../syntax_checkers/perl/podchecker.vim | 2 - .../syntastic/syntax_checkers/python/mypy.vim | 5 +- .../syntastic/syntax_checkers/qml/qmllint.vim | 39 + .../syntastic/syntax_checkers/r/lint.vim | 1 - .../syntastic/syntax_checkers/r/lintr.vim | 81 ++ .../syntastic/syntax_checkers/rmd/lintr.vim | 23 + .../syntax_checkers/rst/rst2pseudoxml.vim | 12 +- .../syntastic/syntax_checkers/rst/sphinx.vim | 8 +- .../syntastic/syntax_checkers/ruby/flog.vim | 72 ++ .../syntax_checkers/scss/mixedindentlint.vim | 22 + .../syntastic/syntax_checkers/scss/sass.vim | 2 - .../syntastic/syntax_checkers/scss/sassc.vim | 2 - .../syntax_checkers/scss/scss_lint.vim | 13 +- .../syntax_checkers/scss/stylelint.vim | 23 + .../syntax_checkers/slim/slim_lint.vim | 39 + .../syntastic/syntax_checkers/sql/sqlint.vim | 50 + .../syntax_checkers/stylus/stylint.vim | 43 + .../syntastic/syntax_checkers/text/igor.vim | 2 - .../syntax_checkers/typescript/eslint.vim | 23 + .../syntax_checkers/typescript/tsc.vim | 5 + .../syntax_checkers/typescript/tslint.vim | 6 +- .../syntax_checkers/verilog/iverilog.vim | 38 + .../syntastic/syntax_checkers/vhdl/vcom.vim | 55 + .../syntastic/syntax_checkers/vim/vimlint.vim | 2 + .../syntax_checkers/xhtml/jshint.vim | 2 - .../syntax_checkers/xquery/basex.vim | 51 + .../syntax_checkers/xslt/xmllint.vim | 2 - .../syntastic/syntax_checkers/yaml/jsyaml.vim | 1 + .../syntax_checkers/yaml/yamllint.vim | 52 + sources_non_forked/tlib/autoload/tlib.vim | 5 +- .../tlib/autoload/tlib/Filter_cnf.vim | 4 +- .../tlib/autoload/tlib/Filter_glob.vim | 8 +- .../tlib/autoload/tlib/Object.vim | 11 +- .../tlib/autoload/tlib/Test.vim | 10 +- .../tlib/autoload/tlib/TestChild.vim | 10 +- .../tlib/autoload/tlib/World.vim | 53 +- .../tlib/autoload/tlib/agent.vim | 74 +- sources_non_forked/tlib/autoload/tlib/arg.vim | 267 ++++- .../tlib/autoload/tlib/assert.vim | 44 + .../tlib/autoload/tlib/balloon.vim | 25 +- .../tlib/autoload/tlib/buffer.vim | 61 +- .../tlib/autoload/tlib/cache.vim | 55 +- .../tlib/autoload/tlib/char.vim | 10 +- sources_non_forked/tlib/autoload/tlib/cmd.vim | 16 +- .../tlib/autoload/tlib/comments.vim | 33 +- .../tlib/autoload/tlib/date.vim | 47 +- .../tlib/autoload/tlib/dictionary.vim | 15 + sources_non_forked/tlib/autoload/tlib/dir.vim | 12 +- .../tlib/autoload/tlib/eval.vim | 35 +- .../tlib/autoload/tlib/file.vim | 117 ++- .../tlib/autoload/tlib/hook.vim | 10 +- .../tlib/autoload/tlib/input.vim | 50 +- .../tlib/autoload/tlib/list.vim | 7 +- .../tlib/autoload/tlib/loclist.vim | 13 + .../tlib/autoload/tlib/notify.vim | 9 +- .../tlib/autoload/tlib/progressbar.vim | 16 +- sources_non_forked/tlib/autoload/tlib/qfl.vim | 314 ++++++ sources_non_forked/tlib/autoload/tlib/rx.vim | 15 +- .../tlib/autoload/tlib/scratch.vim | 13 +- .../tlib/autoload/tlib/string.vim | 18 +- .../tlib/autoload/tlib/syntax.vim | 17 +- sources_non_forked/tlib/autoload/tlib/sys.vim | 170 ++- sources_non_forked/tlib/autoload/tlib/tab.vim | 10 +- sources_non_forked/tlib/autoload/tlib/tag.vim | 10 +- .../tlib/autoload/tlib/time.vim | 29 +- .../tlib/autoload/tlib/trace.vim | 117 +++ .../tlib/autoload/tlib/type.vim | 58 +- sources_non_forked/tlib/autoload/tlib/var.vim | 10 +- sources_non_forked/tlib/autoload/tlib/vcs.vim | 55 +- sources_non_forked/tlib/autoload/tlib/win.vim | 10 +- sources_non_forked/tlib/doc/tlib.txt | 393 ++++++- sources_non_forked/tlib/plugin/02tlib.vim | 70 +- sources_non_forked/vim-airline-themes/LICENSE | 21 + .../vim-airline-themes/README.md | 51 + .../autoload/airline/themes/badwolf.vim | 0 .../autoload/airline/themes/base16.vim | 44 +- .../autoload/airline/themes/base16_3024.vim | 73 ++ .../autoload/airline/themes/base16_apathy.vim | 73 ++ .../autoload/airline/themes/base16_ashes.vim | 73 ++ .../airline/themes/base16_atelierdune.vim | 73 ++ .../airline/themes/base16_atelierforest.vim | 73 ++ .../airline/themes/base16_atelierheath.vim | 73 ++ .../airline/themes/base16_atelierlakeside.vim | 73 ++ .../airline/themes/base16_atelierseaside.vim | 73 ++ .../autoload/airline/themes/base16_bespin.vim | 73 ++ .../autoload/airline/themes/base16_brewer.vim | 73 ++ .../autoload/airline/themes/base16_bright.vim | 73 ++ .../autoload/airline/themes/base16_chalk.vim | 73 ++ .../airline/themes/base16_codeschool.vim | 73 ++ .../autoload/airline/themes/base16_colors.vim | 73 ++ .../airline/themes/base16_default.vim | 73 ++ .../airline/themes/base16_eighties.vim | 73 ++ .../autoload/airline/themes/base16_embers.vim | 73 ++ .../autoload/airline/themes/base16_flat.vim | 73 ++ .../autoload/airline/themes/base16_google.vim | 73 ++ .../airline/themes/base16_grayscale.vim | 73 ++ .../airline/themes/base16_greenscreen.vim | 73 ++ .../airline/themes/base16_harmonic16.vim | 73 ++ .../airline/themes/base16_hopscotch.vim | 73 ++ .../airline/themes/base16_isotope.vim | 73 ++ .../airline/themes/base16_londontube.vim | 73 ++ .../airline/themes/base16_marrakesh.vim | 73 ++ .../autoload/airline/themes/base16_mocha.vim | 73 ++ .../airline/themes/base16_monokai.vim | 73 ++ .../autoload/airline/themes/base16_ocean.vim | 73 ++ .../airline/themes/base16_paraiso.vim | 73 ++ .../autoload/airline/themes/base16_pop.vim | 73 ++ .../airline/themes/base16_railscasts.vim | 73 ++ .../airline/themes/base16_shapeshifter.vim | 73 ++ .../airline/themes/base16_solarized.vim | 73 ++ .../airline/themes/base16_summerfruit.vim | 73 ++ .../airline/themes/base16_tomorrow.vim | 73 ++ .../airline/themes/base16_twilight.vim | 73 ++ .../autoload/airline/themes/base16color.vim | 77 ++ .../autoload/airline/themes/behelit.vim | 1 + .../autoload/airline/themes/bubblegum.vim | 0 .../autoload/airline/themes/cool.vim | 63 ++ .../autoload/airline/themes/dark.vim | 102 ++ .../autoload/airline/themes/distinguished.vim | 59 ++ .../autoload/airline/themes/durant.vim | 0 .../autoload/airline/themes/hybrid.vim | 0 .../autoload/airline/themes/hybridline.vim | 0 .../autoload/airline/themes/jellybeans.vim | 80 ++ .../autoload/airline/themes/kalisi.vim | 0 .../autoload/airline/themes/kolor.vim | 0 .../autoload/airline/themes/laederon.vim | 0 .../autoload/airline/themes/light.vim | 0 .../autoload/airline/themes/lucius.vim | 0 .../autoload/airline/themes/luna.vim | 0 .../autoload/airline/themes/molokai.vim | 0 .../autoload/airline/themes/monochrome.vim | 0 .../autoload/airline/themes/murmur.vim | 0 .../autoload/airline/themes/papercolor.vim | 0 .../autoload/airline/themes/powerlineish.vim | 0 .../autoload/airline/themes/raven.vim | 0 .../autoload/airline/themes/serene.vim | 0 .../autoload/airline/themes/silver.vim | 0 .../autoload/airline/themes/simple.vim | 0 .../autoload/airline/themes/sol.vim | 0 .../autoload/airline/themes/solarized.vim | 0 .../autoload/airline/themes/term.vim | 92 ++ .../autoload/airline/themes/tomorrow.vim | 0 .../autoload/airline/themes/ubaryd.vim | 0 .../autoload/airline/themes/understated.vim | 0 .../autoload/airline/themes/wombat.vim | 0 .../autoload/airline/themes/xtermlight.vim | 45 + .../autoload/airline/themes/zenburn.vim | 0 .../plugin/airline-themes.vim | 7 + sources_non_forked/vim-airline/.travis.yml | 4 + sources_non_forked/vim-airline/CHANGELOG.md | 104 ++ .../vim-airline/CONTRIBUTING.md | 32 + sources_non_forked/vim-airline/LICENSE | 2 +- sources_non_forked/vim-airline/README.md | 71 +- .../vim-airline/autoload/airline.vim | 15 +- .../vim-airline/autoload/airline/builder.vim | 4 +- .../vim-airline/autoload/airline/debug.vim | 2 +- .../autoload/airline/deprecation.vim | 32 - .../autoload/airline/extensions.vim | 32 +- .../autoload/airline/extensions/branch.vim | 151 ++- .../airline/extensions/bufferline.vim | 2 +- .../autoload/airline/extensions/capslock.vim | 2 +- .../autoload/airline/extensions/commandt.vim | 2 +- .../autoload/airline/extensions/csv.vim | 2 +- .../autoload/airline/extensions/ctrlp.vim | 2 +- .../autoload/airline/extensions/ctrlspace.vim | 9 +- .../autoload/airline/extensions/default.vim | 26 +- .../autoload/airline/extensions/eclim.vim | 2 +- .../autoload/airline/extensions/example.vim | 2 +- .../autoload/airline/extensions/hunks.vim | 19 +- .../autoload/airline/extensions/netrw.vim | 2 +- .../autoload/airline/extensions/nrrwrgn.vim | 5 +- .../airline/extensions/promptline.vim | 2 +- .../autoload/airline/extensions/quickfix.vim | 2 +- .../autoload/airline/extensions/syntastic.vim | 2 +- .../autoload/airline/extensions/tabline.vim | 61 +- .../airline/extensions/tabline/autoshow.vim | 10 +- .../airline/extensions/tabline/buffers.vim | 33 +- .../airline/extensions/tabline/buflist.vim | 38 +- .../airline/extensions/tabline/ctrlspace.vim | 97 ++ .../extensions/tabline/formatters/default.vim | 2 +- .../tabline/formatters/unique_tail.vim | 2 +- .../formatters/unique_tail_improved.vim | 2 +- .../airline/extensions/tabline/tabs.vim | 18 +- .../autoload/airline/extensions/tagbar.vim | 2 +- .../autoload/airline/extensions/tmuxline.vim | 2 +- .../autoload/airline/extensions/undotree.vim | 2 +- .../autoload/airline/extensions/unicode.vim | 22 + .../autoload/airline/extensions/unite.vim | 2 +- .../airline/extensions/virtualenv.vim | 20 +- .../airline/extensions/whitespace.vim | 56 +- .../autoload/airline/extensions/wordcount.vim | 36 + .../wordcount/formatters/default.vim | 58 + .../autoload/airline/extensions/ycm.vim | 36 + .../autoload/airline/highlighter.vim | 66 +- .../vim-airline/autoload/airline/init.vim | 38 +- .../vim-airline/autoload/airline/msdos.vim | 57 + .../vim-airline/autoload/airline/parts.vim | 4 +- .../vim-airline/autoload/airline/section.vim | 2 +- .../vim-airline/autoload/airline/themes.vim | 5 +- .../autoload/airline/themes/jellybeans.vim | 52 - .../vim-airline/autoload/airline/util.vim | 2 +- .../vim-airline/doc/airline.txt | 147 ++- .../vim-airline/plugin/airline.vim | 42 +- sources_non_forked/vim-airline/t/commands.vim | 4 + sources_non_forked/vim-airline/t/themes.vim | 4 +- .../vim-commentary/README.markdown | 2 +- .../vim-commentary/doc/commentary.txt | 3 - .../vim-commentary/plugin/commentary.vim | 22 +- .../vim-fugitive/doc/fugitive.txt | 44 +- .../vim-fugitive/plugin/fugitive.vim | 331 ++++-- sources_non_forked/vim-go/README.md | 164 +-- .../vim-go/autoload/go/alternate.vim | 30 + .../vim-go/autoload/go/asmfmt.vim | 52 + sources_non_forked/vim-go/autoload/go/cmd.vim | 288 +++-- .../vim-go/autoload/go/complete.vim | 26 +- sources_non_forked/vim-go/autoload/go/def.vim | 21 +- .../vim-go/autoload/go/errcheck.vim | 54 - sources_non_forked/vim-go/autoload/go/fmt.vim | 100 +- .../vim-go/autoload/go/import.vim | 47 +- .../vim-go/autoload/go/jobcontrol.vim | 179 ++++ .../vim-go/autoload/go/lint.vim | 203 +++- .../vim-go/autoload/go/list.vim | 126 +++ .../vim-go/autoload/go/oracle.vim | 124 ++- .../vim-go/autoload/go/package.vim | 21 +- .../vim-go/autoload/go/path.vim | 10 +- .../vim-go/autoload/go/rename.vim | 41 +- .../vim-go/autoload/go/term.vim | 128 +++ .../vim-go/autoload/go/tool.vim | 69 +- .../vim-go/autoload/go/util.vim | 102 +- sources_non_forked/vim-go/compiler/go.vim | 21 +- sources_non_forked/vim-go/doc/vim-go.txt | 457 ++++++-- .../vim-go/ftdetect/gofiletype.vim | 12 +- sources_non_forked/vim-go/ftplugin/asm.vim | 17 + .../vim-go/ftplugin/go/commands.vim | 79 +- .../vim-go/ftplugin/go/mappings.vim | 60 ++ .../vim-go/gosnippets/snippets/go.snip | 5 +- .../vim-go/indent/gohtmltmpl.vim | 39 + sources_non_forked/vim-go/plugin/go.vim | 36 +- sources_non_forked/vim-go/syntax/go.vim | 148 ++- .../vim-go/syntax/gotexttmpl.vim | 6 +- .../vim-indent-object/doc/indent-object.txt | 6 + .../plugin/indent-object.vim | 18 +- sources_non_forked/vim-less/ftplugin/less.vim | 2 +- .../vim-markdown/README.markdown | 5 + .../vim-markdown/syntax/markdown.vim | 18 +- .../vim-multiple-cursors/.travis.yml | 10 +- .../vim-multiple-cursors/CONTRIBUTING.md | 23 + .../vim-multiple-cursors/Gemfile.lock | 30 +- .../vim-multiple-cursors/README.md | 41 +- .../autoload/multiple_cursors.vim | 69 +- .../doc/multiple_cursors.txt | 12 +- .../plugin/multiple_cursors.vim | 13 +- .../spec/benchmark_spec.rb | 1 + .../spec/multiple_cursors_spec.rb | 314 +++++- .../vim-snipmate/Contributors.md | 1 + .../vim-snipmate/autoload/snipMate.vim | 23 +- .../vim-snipmate/autoload/snipmate/legacy.vim | 2 +- .../vim-snipmate/doc/snipMate.txt | 25 +- sources_non_forked/vim-snippets/README.md | 20 + .../vim-snippets/UltiSnips/all.snippets | 72 +- .../vim-snippets/UltiSnips/c.snippets | 30 +- ...smine.snippets => coffee-jasmine.snippets} | 0 .../UltiSnips/coffee-react.snippets | 80 ++ .../vim-snippets/UltiSnips/coffee.snippets | 4 + .../vim-snippets/UltiSnips/django.snippets | 385 ++++--- .../vim-snippets/UltiSnips/eruby.snippets | 68 +- .../vim-snippets/UltiSnips/haskell.snippets | 68 -- .../UltiSnips/htmldjango.snippets | 298 +++++- ...r.snippets => javascript-angular.snippets} | 0 ...ber.snippets => javascript-ember.snippets} | 0 ...e.snippets => javascript-jasmine.snippets} | 74 +- ...doc.snippets => javascript-jsdoc.snippets} | 0 .../UltiSnips/javascript-node.snippets | 65 ++ .../UltiSnips/javascript-openui5.snippets | 205 ++++ .../UltiSnips/javascript.snippets | 2 +- .../vim-snippets/UltiSnips/lua.snippets | 59 ++ .../vim-snippets/UltiSnips/pandoc.snippets | 2 +- ..._laravel.snippets => php-laravel.snippets} | 0 ..._phpunit.snippets => php-phpunit.snippets} | 0 ...ymfony2.snippets => php-symfony2.snippets} | 0 .../vim-snippets/UltiSnips/python.snippets | 74 +- .../vim-snippets/UltiSnips/rails.snippets | 16 +- .../vim-snippets/UltiSnips/ruby.snippets | 12 - .../vim-snippets/UltiSnips/rust.snippets | 6 + .../vim-snippets/UltiSnips/scss.snippets | 57 - .../UltiSnips/supercollider.snippets | 10 + .../UltiSnips/typescript.snippets | 3 + .../vim-snippets/pythonx/vimsnippets.py | 72 ++ .../vim-snippets/snippets/c.snippets | 27 +- .../vim-snippets/snippets/cmake.snippets | 83 +- .../vim-snippets/snippets/cpp.snippets | 8 + .../vim-snippets/snippets/eelixir.snippets | 8 - .../vim-snippets/snippets/elixir.snippets | 8 +- .../vim-snippets/snippets/eruby.snippets | 24 +- .../vim-snippets/snippets/haskell.snippets | 47 +- .../vim-snippets/snippets/html.snippets | 126 +-- .../vim-snippets/snippets/htmldjango.snippets | 3 +- .../javascript/javascript.d3.snippets | 4 +- .../javascript/javascript.es6.snippets | 28 + .../snippets/javascript/javascript.snippets | 22 +- .../vim-snippets/snippets/jinja.snippets | 142 +++ .../vim-snippets/snippets/perl6.snippets | 116 ++ .../vim-snippets/snippets/php.snippets | 27 +- .../vim-snippets/snippets/puppet.snippets | 2 +- .../vim-snippets/snippets/python.snippets | 32 +- .../vim-snippets/snippets/rails.snippets | 4 +- .../vim-snippets/snippets/rst.snippets | 31 +- .../vim-snippets/snippets/ruby.snippets | 10 +- .../vim-snippets/snippets/rust.snippets | 18 +- .../vim-snippets/snippets/scss.snippets | 4 +- .../vim-snippets/snippets/simplemvcf.snippets | 122 +++ .../vim-snippets/snippets/slim.snippets | 27 +- .../vim-snippets/snippets/stylus.snippets | 994 +++++++++--------- .../snippets/supercollider.snippets | 22 + .../snippets/systemverilog.snippets | 60 +- .../vim-snippets/snippets/tex.snippets | 15 +- .../vim-snippets/snippets/verilog.snippets | 63 ++ .../vim-snippets/snippets/xml.snippets | 12 + sources_non_forked/vim-snippets/tests.sh | 14 +- .../vim-surround/plugin/surround.vim | 8 +- update_plugins.py | 3 +- vimrcs/filetypes.vim | 45 +- vimrcs/plugins_config.vim | 11 +- 402 files changed, 14389 insertions(+), 4024 deletions(-) create mode 100644 sources_non_forked/ack.vim/LICENSE create mode 100644 sources_non_forked/nerdtree/CHANGELOG create mode 100644 sources_non_forked/nerdtree/LICENCE create mode 100644 sources_non_forked/syntastic/syntax_checkers/ansible/ansible_lint.vim rename sources_non_forked/syntastic/syntax_checkers/apiblueprint/{snowcrash.vim => drafter.vim} (82%) create mode 100644 sources_non_forked/syntastic/syntax_checkers/css/mixedindentlint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/css/stylelint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/dockerfile/dockerfile_lint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/go/gometalinter.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/jade/jade_lint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/javascript/mixedindentlint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/qml/qmllint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/r/lintr.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/rmd/lintr.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/ruby/flog.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/scss/mixedindentlint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/scss/stylelint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/slim/slim_lint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/sql/sqlint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/stylus/stylint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/typescript/eslint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/verilog/iverilog.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/vhdl/vcom.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/xquery/basex.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/yaml/yamllint.vim create mode 100644 sources_non_forked/tlib/autoload/tlib/assert.vim create mode 100644 sources_non_forked/tlib/autoload/tlib/dictionary.vim create mode 100644 sources_non_forked/tlib/autoload/tlib/loclist.vim create mode 100644 sources_non_forked/tlib/autoload/tlib/qfl.vim create mode 100644 sources_non_forked/tlib/autoload/tlib/trace.vim create mode 100644 sources_non_forked/vim-airline-themes/LICENSE create mode 100644 sources_non_forked/vim-airline-themes/README.md rename sources_non_forked/{vim-airline => vim-airline-themes}/autoload/airline/themes/badwolf.vim (100%) rename sources_non_forked/{vim-airline => vim-airline-themes}/autoload/airline/themes/base16.vim (78%) create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_3024.vim create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_apathy.vim create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_ashes.vim create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_atelierdune.vim create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_atelierforest.vim create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_atelierheath.vim create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_atelierlakeside.vim create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_atelierseaside.vim create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_bespin.vim create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_brewer.vim create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_bright.vim create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_chalk.vim create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_codeschool.vim create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_colors.vim create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_default.vim create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_eighties.vim create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_embers.vim create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_flat.vim create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_google.vim create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_grayscale.vim create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_greenscreen.vim create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_harmonic16.vim create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_hopscotch.vim create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_isotope.vim create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_londontube.vim create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_marrakesh.vim create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_mocha.vim create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_monokai.vim create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_ocean.vim create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_paraiso.vim create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_pop.vim create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_railscasts.vim create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_shapeshifter.vim create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_solarized.vim create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_summerfruit.vim create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_tomorrow.vim create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_twilight.vim create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16color.vim rename sources_non_forked/{vim-airline => vim-airline-themes}/autoload/airline/themes/behelit.vim (97%) rename sources_non_forked/{vim-airline => vim-airline-themes}/autoload/airline/themes/bubblegum.vim (100%) create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/cool.vim create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/dark.vim create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/distinguished.vim rename sources_non_forked/{vim-airline => vim-airline-themes}/autoload/airline/themes/durant.vim (100%) rename sources_non_forked/{vim-airline => vim-airline-themes}/autoload/airline/themes/hybrid.vim (100%) rename sources_non_forked/{vim-airline => vim-airline-themes}/autoload/airline/themes/hybridline.vim (100%) create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/jellybeans.vim rename sources_non_forked/{vim-airline => vim-airline-themes}/autoload/airline/themes/kalisi.vim (100%) rename sources_non_forked/{vim-airline => vim-airline-themes}/autoload/airline/themes/kolor.vim (100%) rename sources_non_forked/{vim-airline => vim-airline-themes}/autoload/airline/themes/laederon.vim (100%) rename sources_non_forked/{vim-airline => vim-airline-themes}/autoload/airline/themes/light.vim (100%) rename sources_non_forked/{vim-airline => vim-airline-themes}/autoload/airline/themes/lucius.vim (100%) rename sources_non_forked/{vim-airline => vim-airline-themes}/autoload/airline/themes/luna.vim (100%) rename sources_non_forked/{vim-airline => vim-airline-themes}/autoload/airline/themes/molokai.vim (100%) rename sources_non_forked/{vim-airline => vim-airline-themes}/autoload/airline/themes/monochrome.vim (100%) rename sources_non_forked/{vim-airline => vim-airline-themes}/autoload/airline/themes/murmur.vim (100%) rename sources_non_forked/{vim-airline => vim-airline-themes}/autoload/airline/themes/papercolor.vim (100%) rename sources_non_forked/{vim-airline => vim-airline-themes}/autoload/airline/themes/powerlineish.vim (100%) rename sources_non_forked/{vim-airline => vim-airline-themes}/autoload/airline/themes/raven.vim (100%) rename sources_non_forked/{vim-airline => vim-airline-themes}/autoload/airline/themes/serene.vim (100%) rename sources_non_forked/{vim-airline => vim-airline-themes}/autoload/airline/themes/silver.vim (100%) rename sources_non_forked/{vim-airline => vim-airline-themes}/autoload/airline/themes/simple.vim (100%) rename sources_non_forked/{vim-airline => vim-airline-themes}/autoload/airline/themes/sol.vim (100%) rename sources_non_forked/{vim-airline => vim-airline-themes}/autoload/airline/themes/solarized.vim (100%) create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/term.vim rename sources_non_forked/{vim-airline => vim-airline-themes}/autoload/airline/themes/tomorrow.vim (100%) rename sources_non_forked/{vim-airline => vim-airline-themes}/autoload/airline/themes/ubaryd.vim (100%) rename sources_non_forked/{vim-airline => vim-airline-themes}/autoload/airline/themes/understated.vim (100%) rename sources_non_forked/{vim-airline => vim-airline-themes}/autoload/airline/themes/wombat.vim (100%) create mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/xtermlight.vim rename sources_non_forked/{vim-airline => vim-airline-themes}/autoload/airline/themes/zenburn.vim (100%) create mode 100644 sources_non_forked/vim-airline-themes/plugin/airline-themes.vim create mode 100644 sources_non_forked/vim-airline/CHANGELOG.md create mode 100644 sources_non_forked/vim-airline/CONTRIBUTING.md delete mode 100644 sources_non_forked/vim-airline/autoload/airline/deprecation.vim create mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/tabline/ctrlspace.vim create mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/unicode.vim create mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/wordcount.vim create mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/wordcount/formatters/default.vim create mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/ycm.vim create mode 100644 sources_non_forked/vim-airline/autoload/airline/msdos.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/themes/jellybeans.vim create mode 100644 sources_non_forked/vim-go/autoload/go/alternate.vim create mode 100644 sources_non_forked/vim-go/autoload/go/asmfmt.vim delete mode 100644 sources_non_forked/vim-go/autoload/go/errcheck.vim create mode 100644 sources_non_forked/vim-go/autoload/go/jobcontrol.vim create mode 100644 sources_non_forked/vim-go/autoload/go/list.vim create mode 100644 sources_non_forked/vim-go/autoload/go/term.vim create mode 100644 sources_non_forked/vim-go/ftplugin/asm.vim create mode 100644 sources_non_forked/vim-go/ftplugin/go/mappings.vim create mode 100644 sources_non_forked/vim-multiple-cursors/CONTRIBUTING.md rename sources_non_forked/vim-snippets/UltiSnips/{coffee_jasmine.snippets => coffee-jasmine.snippets} (100%) create mode 100644 sources_non_forked/vim-snippets/UltiSnips/coffee-react.snippets delete mode 100644 sources_non_forked/vim-snippets/UltiSnips/haskell.snippets rename sources_non_forked/vim-snippets/UltiSnips/{javascript_angular.snippets => javascript-angular.snippets} (100%) rename sources_non_forked/vim-snippets/UltiSnips/{javascript_ember.snippets => javascript-ember.snippets} (100%) rename sources_non_forked/vim-snippets/UltiSnips/{javascript_jasmine.snippets => javascript-jasmine.snippets} (73%) rename sources_non_forked/vim-snippets/UltiSnips/{javascript_jsdoc.snippets => javascript-jsdoc.snippets} (100%) create mode 100644 sources_non_forked/vim-snippets/UltiSnips/javascript-node.snippets create mode 100644 sources_non_forked/vim-snippets/UltiSnips/javascript-openui5.snippets rename sources_non_forked/vim-snippets/UltiSnips/{php_laravel.snippets => php-laravel.snippets} (100%) rename sources_non_forked/vim-snippets/UltiSnips/{php_phpunit.snippets => php-phpunit.snippets} (100%) rename sources_non_forked/vim-snippets/UltiSnips/{php_symfony2.snippets => php-symfony2.snippets} (100%) delete mode 100644 sources_non_forked/vim-snippets/UltiSnips/scss.snippets create mode 100644 sources_non_forked/vim-snippets/UltiSnips/supercollider.snippets create mode 100644 sources_non_forked/vim-snippets/UltiSnips/typescript.snippets create mode 100644 sources_non_forked/vim-snippets/snippets/javascript/javascript.es6.snippets create mode 100644 sources_non_forked/vim-snippets/snippets/jinja.snippets create mode 100644 sources_non_forked/vim-snippets/snippets/perl6.snippets create mode 100644 sources_non_forked/vim-snippets/snippets/simplemvcf.snippets create mode 100644 sources_non_forked/vim-snippets/snippets/supercollider.snippets create mode 100644 sources_non_forked/vim-snippets/snippets/verilog.snippets create mode 100644 sources_non_forked/vim-snippets/snippets/xml.snippets diff --git a/my_configs.vim b/my_configs.vim index fa5a39dd..8b3d15ab 100644 --- a/my_configs.vim +++ b/my_configs.vim @@ -1,6 +1,6 @@ " add line number :set number -:set colorcolumn=80 +" :set colorcolumn=80 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -10,3 +10,5 @@ " set clipboard=unnamed +let g:syntastic_javascript_args = "-c ./.eslintrc" + diff --git a/sources_non_forked/ack.vim/LICENSE b/sources_non_forked/ack.vim/LICENSE new file mode 100644 index 00000000..056ea36c --- /dev/null +++ b/sources_non_forked/ack.vim/LICENSE @@ -0,0 +1,89 @@ +ack.vim is distributed under the same license terms as Vim itself, which you +can find in full with `:help license` within Vim, or copied in full herein. + +Copyright (c) 2007-2015 Antoine Imbert + and contributors. + +Maintainers may be contacted via GitHub Issues at: + + https://github.com/mileszs/ack.vim/issues + + +VIM LICENSE + +I) There are no restrictions on distributing unmodified copies of Vim except + that they must include this license text. You can also distribute + unmodified parts of Vim, likewise unrestricted except that they must + include this license text. You are also allowed to include executables + that you made from the unmodified Vim sources, plus your own usage + examples and Vim scripts. + +II) It is allowed to distribute a modified (or extended) version of Vim, + including executables and/or source code, when the following four + conditions are met: + 1) This license text must be included unmodified. + 2) The modified Vim must be distributed in one of the following five ways: + a) If you make changes to Vim yourself, you must clearly describe in + the distribution how to contact you. When the maintainer asks you + (in any way) for a copy of the modified Vim you distributed, you + must make your changes, including source code, available to the + maintainer without fee. The maintainer reserves the right to + include your changes in the official version of Vim. What the + maintainer will do with your changes and under what license they + will be distributed is negotiable. If there has been no negotiation + then this license, or a later version, also applies to your changes. + The current maintainer is Bram Moolenaar . If this + changes it will be announced in appropriate places (most likely + vim.sf.net, www.vim.org and/or comp.editors). When it is completely + impossible to contact the maintainer, the obligation to send him + your changes ceases. Once the maintainer has confirmed that he has + received your changes they will not have to be sent again. + b) If you have received a modified Vim that was distributed as + mentioned under a) you are allowed to further distribute it + unmodified, as mentioned at I). If you make additional changes the + text under a) applies to those changes. + c) Provide all the changes, including source code, with every copy of + the modified Vim you distribute. This may be done in the form of a + context diff. You can choose what license to use for new code you + add. The changes and their license must not restrict others from + making their own changes to the official version of Vim. + d) When you have a modified Vim which includes changes as mentioned + under c), you can distribute it without the source code for the + changes if the following three conditions are met: + - The license that applies to the changes permits you to distribute + the changes to the Vim maintainer without fee or restriction, and + permits the Vim maintainer to include the changes in the official + version of Vim without fee or restriction. + - You keep the changes for at least three years after last + distributing the corresponding modified Vim. When the maintainer + or someone who you distributed the modified Vim to asks you (in + any way) for the changes within this period, you must make them + available to him. + - You clearly describe in the distribution how to contact you. This + contact information must remain valid for at least three years + after last distributing the corresponding modified Vim, or as long + as possible. + e) When the GNU General Public License (GPL) applies to the changes, + you can distribute the modified Vim under the GNU GPL version 2 or + any later version. + 3) A message must be added, at least in the output of the ":version" + command and in the intro screen, such that the user of the modified Vim + is able to see that it was modified. When distributing as mentioned + under 2)e) adding the message is only required for as far as this does + not conflict with the license used for the changes. + 4) The contact information as required under 2)a) and 2)d) must not be + removed or changed, except that the person himself can make + corrections. + +III) If you distribute a modified version of Vim, you are encouraged to use + the Vim license for your changes and make them available to the + maintainer, including the source code. The preferred way to do this is + by e-mail or by uploading the files to a server and e-mailing the URL. + If the number of changes is small (e.g., a modified Makefile) e-mailing a + context diff will do. The e-mail address to be used is + + +IV) It is not allowed to remove this license from the distribution of the Vim + sources, parts of it or from a modified version. You may use this + license for previous Vim releases instead of the license that they came + with, at your option. diff --git a/sources_non_forked/ack.vim/README.md b/sources_non_forked/ack.vim/README.md index c2e87067..a82bb804 100644 --- a/sources_non_forked/ack.vim/README.md +++ b/sources_non_forked/ack.vim/README.md @@ -129,15 +129,6 @@ optional background search execution with [vim-dispatch], and auto-previewing. Please see [the Github releases page][releases]. -### 1.0.9 (unreleased) - -* Fix location list and layout of quickfix when using Dispatch (#154) -* Fix the quick help overlay clobbering the list mappings -* Fix `:AckFile` when using Dispatch -* Restore original `'makeprg'` and `'errorformat'` when using Dispatch -* Arrow keys also work for auto-preview (#158) -* Internal refactoring and clean-up - ## Credits This plugin is derived from Antoine Imbert's blog post [Ack and Vim diff --git a/sources_non_forked/ack.vim/autoload/ack.vim b/sources_non_forked/ack.vim/autoload/ack.vim index 12237e4e..814c533b 100644 --- a/sources_non_forked/ack.vim/autoload/ack.vim +++ b/sources_non_forked/ack.vim/autoload/ack.vim @@ -5,7 +5,7 @@ if exists('g:ack_use_dispatch') endif else let g:ack_use_dispatch = 0 -end +endif "----------------------------------------------------------------------------- " Public API diff --git a/sources_non_forked/ag.vim/README.md b/sources_non_forked/ag.vim/README.md index c0e92cbe..9e43262a 100644 --- a/sources_non_forked/ag.vim/README.md +++ b/sources_non_forked/ag.vim/README.md @@ -21,13 +21,13 @@ Vim has various ways of installing plugins, the standard way is in [the document cd ~/.vim/bundle && git clone https://github.com/rking/ag.vim ag && echo "set runtimepath^=~/.vim/bundle/ag" >> ~/.vimrc ``` - Then open vim and rum `:helptags ~/.vim/bundle/ag/doc`. + Then open vim and run `:helptags ~/.vim/bundle/ag/doc`. ### Configuration ### You can specify a custom ag name and path in your .vimrc like so: - let g:agprg=" --vimgrep" + let g:ag_prg=" --vimgrep" You can configure ag.vim to always start searching from your project root instead of the cwd @@ -67,6 +67,9 @@ In the quickfix window, you can use: gv to open in vertical split silently q to close the quickfix window +### Related Plugin ### +[vim-ag-anything](https://github.com/Chun-Yang/vim-ag-anything) adds an 'ga' action to search any text object. + ### Acknowledgements ### This Vim plugin is derived (and by derived, I mean copied, almost entirely) diff --git a/sources_non_forked/ag.vim/autoload/ag.vim b/sources_non_forked/ag.vim/autoload/ag.vim index 6703396b..432ef444 100644 --- a/sources_non_forked/ag.vim/autoload/ag.vim +++ b/sources_non_forked/ag.vim/autoload/ag.vim @@ -1,17 +1,26 @@ " NOTE: You must, of course, install ag / the_silver_searcher -" FIXME: Delete deprecated options below on or after 15-7 (6 months from when they were changed) {{{ +" FIXME: Delete deprecated options below on or after 2016-4 (6 months from when the deprecation warning was added) {{{ if exists("g:agprg") let g:ag_prg = g:agprg + echohl WarningMsg + call input('g:agprg is deprecated and will be removed. Please use g:ag_prg') + echohl None endif if exists("g:aghighlight") let g:ag_highlight = g:aghighlight + echohl WarningMsg + call input('g:aghighlight is deprecated and will be removed. Please use g:ag_highlight') + echohl None endif if exists("g:agformat") let g:ag_format = g:agformat + echohl WarningMsg + call input('g:agformat is deprecated and will be removed. Please use g:ag_format') + echohl None endif " }}} FIXME: Delete the deprecated options above on or after 15-7 (6 months from when they were changed) @@ -79,6 +88,11 @@ function! ag#Ag(cmd, args) let l:grepargs = a:args . join(a:000, ' ') end + if empty(l:grepargs) + echo "Usage: ':Ag {pattern}' (or just :Ag to search for the word under the cursor). See ':help :Ag' for more information." + return + endif + " Format, used to manage column jump if a:cmd =~# '-g$' let s:ag_format_backup=g:ag_format @@ -169,8 +183,12 @@ function! ag#Ag(cmd, args) echom "ag.vim keys: q=quit /e/t/h/v=enter/edit/tab/split/vsplit go/T/H/gv=preview versions of same" endif endif - else + else " Close the split window automatically: + cclose + lclose + echohl WarningMsg echom 'No matches for "'.a:args.'"' + echohl None endif endfunction diff --git a/sources_non_forked/ctrlp.vim/readme.md b/sources_non_forked/ctrlp.vim/readme.md index bcd07c7f..d495fffb 100644 --- a/sources_non_forked/ctrlp.vim/readme.md +++ b/sources_non_forked/ctrlp.vim/readme.md @@ -1,3 +1,6 @@ +#**This project is unmaintained** +**You should use [this fork](https://github.com/ctrlpvim/ctrlp.vim) instead.** + # ctrlp.vim Full path fuzzy __file__, __buffer__, __mru__, __tag__, __...__ finder for Vim. diff --git a/sources_non_forked/goyo.vim/autoload/goyo.vim b/sources_non_forked/goyo.vim/autoload/goyo.vim index 9d3d1eb5..edacd10b 100644 --- a/sources_non_forked/goyo.vim/autoload/goyo.vim +++ b/sources_non_forked/goyo.vim/autoload/goyo.vim @@ -33,7 +33,7 @@ function! s:get_color(group, attr) endfunction function! s:set_color(group, attr, color) - let gui = has('gui_running') + let gui = a:color =~ '^#' execute printf("hi %s %s%s=%s", a:group, gui ? 'gui' : 'cterm', a:attr, a:color) endfunction @@ -106,7 +106,7 @@ function! s:resize_pads() endfunction function! s:tranquilize() - let bg = s:get_color('Normal', 'bg') + let bg = s:get_color('Normal', 'bg#') for grp in ['NonText', 'FoldColumn', 'ColorColumn', 'VertSplit', \ 'StatusLine', 'StatusLineNC', 'SignColumn'] " -1 on Vim / '' on GVim @@ -269,7 +269,9 @@ function! s:goyo_on(dim) if exists('g:goyo_callbacks[0]') call g:goyo_callbacks[0]() endif - silent! doautocmd User GoyoEnter + if exists('#User#GoyoEnter') + doautocmd User GoyoEnter + endif endfunction function! s:goyo_off() @@ -344,6 +346,9 @@ function! s:goyo_off() if goyo_disabled_airline && !exists("#airline") AirlineToggle + " For some reason, Airline requires two refreshes to avoid display + " artifacts + silent! AirlineRefresh silent! AirlineRefresh endif @@ -363,7 +368,9 @@ function! s:goyo_off() if exists('g:goyo_callbacks[1]') call g:goyo_callbacks[1]() endif - silent! doautocmd User GoyoLeave + if exists('#User#GoyoLeave') + doautocmd User GoyoLeave + endif endfunction function! s:relsz(expr, limit) @@ -414,6 +421,10 @@ function! goyo#execute(bang, dim) if exists('#goyo') == 0 call s:goyo_on(a:dim) elseif !empty(a:dim) + if winnr('$') < 5 + call s:goyo_off() + return goyo#execute(a:bang, a:dim) + endif let dim = s:parse_arg(a:dim) if !empty(dim) let t:goyo_dim = dim diff --git a/sources_non_forked/nerdtree/CHANGELOG b/sources_non_forked/nerdtree/CHANGELOG new file mode 100644 index 00000000..2e08dd2a --- /dev/null +++ b/sources_non_forked/nerdtree/CHANGELOG @@ -0,0 +1,153 @@ +Next + - Rename "primary" and "secondary" trees to "tab" and "window" trees. + - Move a bunch of buffer level variables into the NERDTree and UI classes. + - Display cascading dirs on one line to save vertical/horizontal space (@matt-gardner: brainstorming/testing) + - Remove the old style UI - Remove 'NERDTreeDirArrows' option. + - On windows default to + and ~ for expand/collapse directory symbols. + - Lots more refactoring. Move a bunch of b: level vars into b:NERDTree and friends. + +5.0.0 + - Refactor the code significantly: + * Break the classes out into their own files. + * Make the majority of the code OO - previously large parts were + effectively a tangle of "global" methods. + - Add an API to assign flags to nodes. This allows VCS plugins like + https://github.com/Xuyuanp/nerdtree-git-plugin to exist. Thanks to + Xuyuanp for helping design/test/build said API. + - add 'scope' argument to the key map API see :help NERDTreeAddKeyMap() + - add magic [[dir]] and [[file]] flags to NERDTreeIgnore + - add support for custom path filters. See :help NERDTreeAddPathFilter() + - add path listener API. See :help NERDTreePathListenerAPI. + - expand the fs menu functionality to list file properties (PhilRunninger, + apbarrero, JESii) + - make bookmarks work with `~` home shortcuts (hiberabyss) + - show OSX specific fsmenu options in regular vim on mac (evindor) + - make dir arrow icons configurable (PickRelated) + - optimise node sorting performance when opening large dirs (vtsang) + - make the root note render prettier by truncating it at a path slash (gcmt) + - remove NERDChristmasTree option - its always christmas now + - add "cascade" open and closing for dirs containing only another single + dir. See :help NERDTreeCascadeOpenSingleChildDir (pendulm) + + Many other fixes, doc updates and contributions from: + actionshrimp + SchDen + egalpin + cperl82 - many small fixes + toiffel + WoLpH + handcraftedbits + devmanhinton + xiaodili + zhangoose + gastropoda + mixvin + alvan + lucascaton + kelaban + shanesmith + staeff + pendulm + stephenprater + franksort + agrussellknives + AndrewRadev + Twinside + +4.2.0 + - Add NERDTreeDirArrows option to make the UI use pretty arrow chars + instead of the old +~| chars to define the tree structure (sickill) + - shift the syntax highlighting out into its own syntax file (gnap) + - add some mac specific options to the filesystem menu - for macvim + only (andersonfreitas) + - Add NERDTreeMinimalUI option to remove some non functional parts of the + nerdtree ui (camthompson) + - tweak the behaviour of :NERDTreeFind - see :help :NERDTreeFind for the + new behaviour (benjamingeiger) + - if no name is given to :Bookmark, make it default to the name of the + target file/dir (minyoung) + - use 'file' completion when doing copying, create, and move + operations (EvanDotPro) + - lots of misc bug fixes (paddyoloughlin, sdewald, camthompson, Vitaly + Bogdanov, AndrewRadev, mathias, scottstvnsn, kml, wycats, me RAWR!) + +4.1.0 + features: + - NERDTreeFind to reveal the node for the current buffer in the tree, + see |NERDTreeFind|. This effectively merges the FindInNERDTree plugin (by + Doug McInnes) into the script. + - make NERDTreeQuitOnOpen apply to the t/T keymaps too. Thanks to Stefan + Ritter and Rémi Prévost. + - truncate the root node if wider than the tree window. Thanks to Victor + Gonzalez. + + bugfixes: + - really fix window state restoring + - fix some win32 path escaping issues. Thanks to Stephan Baumeister, Ricky, + jfilip1024, and Chris Chambers + +4.0.0 + - add a new programmable menu system (see :help NERDTreeMenu). + - add new APIs to add menus/menu-items to the menu system as well as + custom key mappings to the NERD tree buffer (see :help NERDTreeAPI). + - removed the old API functions + - added a mapping to maximize/restore the size of nerd tree window, thanks + to Guillaume Duranceau for the patch. See :help NERDTree-A for details. + + - fix a bug where secondary nerd trees (netrw hijacked trees) and + NERDTreeQuitOnOpen didnt play nicely, thanks to Curtis Harvey. + - fix a bug where the script ignored directories whose name ended in a dot, + thanks to Aggelos Orfanakos for the patch. + - fix a bug when using the x mapping on the tree root, thanks to Bryan + Venteicher for the patch. + - fix a bug where the cursor position/window size of the nerd tree buffer + wasnt being stored on closing the window, thanks to Richard Hart. + - fix a bug where NERDTreeMirror would mirror the wrong tree + +3.1.1 + - fix a bug where a non-listed no-name buffer was getting created every + time the tree windows was created, thanks to Derek Wyatt and owen1 + - make behave the same as the 'o' mapping + - some helptag fixes in the doc, thanks strull + - fix a bug when using :set nohidden and opening a file where the previous + buf was modified. Thanks iElectric + - other minor fixes + +3.1.0 + New features: + - add mappings to open files in a vsplit, see :help NERDTree-s and :help + NERDTree-gs + - make the statusline for the nerd tree window default to something + hopefully more useful. See :help 'NERDTreeStatusline' + Bugfixes: + - make the hijack netrw functionality work when vim is started with "vim + " (thanks to Alf Mikula for the patch). + - fix a bug where the CWD wasnt being changed for some operations even when + NERDTreeChDirMode==2 (thanks to Lucas S. Buchala) + - add -bar to all the nerd tree :commands so they can chain with other + :commands (thanks to tpope) + - fix bugs when ignorecase was set (thanks to nach) + - fix a bug with the relative path code (thanks to nach) + - fix a bug where doing a :cd would cause :NERDTreeToggle to fail (thanks nach) + + +3.0.1 + Bugfixes: + - fix bugs with :NERDTreeToggle and :NERDTreeMirror when 'hidden + was not set + - fix a bug where :NERDTree would fail if was relative and + didnt start with a ./ or ../ Thanks to James Kanze. + - make the q mapping work with secondary (:e style) trees, + thanks to jamessan + - fix a bunch of small bugs with secondary trees + + More insane refactoring. + +3.0.0 + - hijack netrw so that doing an :edit will put a NERD tree in + the window rather than a netrw browser. See :help 'NERDTreeHijackNetrw' + - allow sharing of trees across tabs, see :help :NERDTreeMirror + - remove "top" and "bottom" as valid settings for NERDTreeWinPos + - change the '' mapping to 'i' + - change the 'H' mapping to 'I' + - lots of refactoring diff --git a/sources_non_forked/nerdtree/LICENCE b/sources_non_forked/nerdtree/LICENCE new file mode 100644 index 00000000..8b1a9d81 --- /dev/null +++ b/sources_non_forked/nerdtree/LICENCE @@ -0,0 +1,13 @@ + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + +Copyright (C) 2004 Sam Hocevar + +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. diff --git a/sources_non_forked/nerdtree/README.markdown b/sources_non_forked/nerdtree/README.markdown index 0317e624..f4ca8607 100644 --- a/sources_non_forked/nerdtree/README.markdown +++ b/sources_non_forked/nerdtree/README.markdown @@ -55,7 +55,7 @@ The following features and functionality are provided by the NERD tree: Installation ------------ -[pathogen.vim](https://github.com/tpope/vim-pathogen) is the recommended way to install nerdtree. +####[pathogen.vim](https://github.com/tpope/vim-pathogen) cd ~/.vim/bundle git clone https://github.com/scrooloose/nerdtree.git @@ -63,6 +63,12 @@ Installation Then reload vim, run `:Helptags`, and check out `:help NERD_tree.txt`. +####[apt-vim](https://github.com/egalpin/apt-vim) + + apt-vim install -y https://github.com/scrooloose/nerdtree.git + + + Faq --- @@ -85,11 +91,13 @@ Stick this in your vimrc: `autocmd vimenter * NERDTree` > How can I open a NERDTree automatically when vim starts up if no files were specified? -Stick this in your vimrc +Stick this in your vimrc: autocmd StdinReadPre * let s:std_in=1 autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif +Note: Now start vim with plain `vim`, not `vim .` + > How can I map a specific key or shortcut to open NERDTree? Stick this in your vimrc to open NERDTree with `Ctrl+n` (you can set whatever key you want): @@ -100,8 +108,15 @@ Stick this in your vimrc to open NERDTree with `Ctrl+n` (you can set whatever ke Stick this in your vimrc: - autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif + autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif > Can I have different highlighting for different file extensions? See here: https://github.com/scrooloose/nerdtree/issues/433#issuecomment-92590696 + +> How can I change default arrows? + +Use these variables in your vimrc. Note that below are default arrow symbols + + let g:NERDTreeDirArrowExpandable = '▸' + let g:NERDTreeDirArrowCollapsible = '▾' diff --git a/sources_non_forked/nerdtree/autoload/nerdtree.vim b/sources_non_forked/nerdtree/autoload/nerdtree.vim index 37d7d105..3ad2a031 100644 --- a/sources_non_forked/nerdtree/autoload/nerdtree.vim +++ b/sources_non_forked/nerdtree/autoload/nerdtree.vim @@ -4,17 +4,17 @@ endif let g:loaded_nerdtree_autoload = 1 function! nerdtree#version() - return '4.2.0' + return '5.0.0' endfunction " SECTION: General Functions {{{1 "============================================================ "FUNCTION: nerdtree#checkForBrowse(dir) {{{2 -"inits a secondary nerd tree in the current buffer if appropriate +"inits a window tree in the current buffer if appropriate function! nerdtree#checkForBrowse(dir) if a:dir != '' && isdirectory(a:dir) - call g:NERDTreeCreator.CreateSecondary(a:dir) + call g:NERDTreeCreator.CreateWindowTree(a:dir) endif endfunction @@ -94,7 +94,7 @@ endfunction " FUNCTION: nerdtree#postSourceActions() {{{2 function! nerdtree#postSourceActions() - call g:NERDTreeBookmark.CacheBookmarks(0) + call g:NERDTreeBookmark.CacheBookmarks(1) call nerdtree#ui_glue#createDefaultBindings() "load all nerdtree plugins diff --git a/sources_non_forked/nerdtree/autoload/nerdtree/ui_glue.vim b/sources_non_forked/nerdtree/autoload/nerdtree/ui_glue.vim index 1f922df1..05f03c96 100644 --- a/sources_non_forked/nerdtree/autoload/nerdtree/ui_glue.vim +++ b/sources_non_forked/nerdtree/autoload/nerdtree/ui_glue.vim @@ -105,7 +105,7 @@ endfunction "FUNCTION: s:activateBookmark() {{{1 "handle the user activating a bookmark function! s:activateBookmark(bm) - call a:bm.activate(!a:bm.path.isDirectory ? {'where': 'p'} : {}) + call a:bm.activate(b:NERDTree, !a:bm.path.isDirectory ? {'where': 'p'} : {}) endfunction " FUNCTION: nerdtree#ui_glue#bookmarkNode(name) {{{1 @@ -140,9 +140,7 @@ endfunction " FUNCTION: s:chRoot(node) {{{1 " changes the current root to the selected one function! s:chRoot(node) - call a:node.makeRoot() - call b:NERDTree.render() - call b:NERDTreeRoot.putCursorHere(0, 0) + call b:NERDTree.changeRoot(a:node) endfunction " FUNCTION: s:nerdtree#ui_glue#chRootCwd() {{{1 @@ -157,7 +155,7 @@ function! nerdtree#ui_glue#chRootCwd() if cwd.str() == g:NERDTreeFileNode.GetRootForTab().path.str() return endif - call s:chRoot(g:NERDTreeDirNode.New(cwd)) + call s:chRoot(g:NERDTreeDirNode.New(cwd, b:NERDTree)) endfunction " FUNCTION: nnerdtree#ui_glue#clearBookmarks(bookmarks) {{{1 @@ -173,6 +171,7 @@ function! nerdtree#ui_glue#clearBookmarks(bookmarks) call bookmark.delete() endfor endif + call b:NERDTree.root.refresh() call b:NERDTree.render() endfunction @@ -208,8 +207,8 @@ endfunction " FUNCTION: s:closeTreeWindow() {{{1 " close the tree window function! s:closeTreeWindow() - if b:NERDTreeType ==# "secondary" && b:NERDTreePreviousBuf != -1 - exec "buffer " . b:NERDTreePreviousBuf + if b:NERDTree.isWinTree() && b:NERDTree.previousBuf() != -1 + exec "buffer " . b:NERDTree.previousBuf() else if winnr("$") > 1 call g:NERDTree.Close() @@ -227,6 +226,7 @@ function! s:deleteBookmark(bm) if nr2char(getchar()) ==# 'y' try call a:bm.delete() + call b:NERDTree.root.refresh() call b:NERDTree.render() redraw catch /^NERDTree/ @@ -241,7 +241,7 @@ endfunction " FUNCTION: s:displayHelp() {{{1 " toggles the help display function! s:displayHelp() - let b:treeShowHelp = b:treeShowHelp ? 0 : 1 + call b:NERDTree.ui.toggleHelp() call b:NERDTree.render() call b:NERDTree.ui.centerView() endfunction @@ -269,27 +269,29 @@ function! s:findAndRevealPath() endtry if p.isUnder(cwd) - call g:NERDTreeCreator.CreatePrimary(cwd.str()) + call g:NERDTreeCreator.CreateTabTree(cwd.str()) else - call g:NERDTreeCreator.CreatePrimary(p.getParent().str()) + call g:NERDTreeCreator.CreateTabTree(p.getParent().str()) endif else if !p.isUnder(g:NERDTreeFileNode.GetRootForTab().path) if !g:NERDTree.IsOpen() - call g:NERDTreeCreator.TogglePrimary('') + call g:NERDTreeCreator.ToggleTabTree('') else call g:NERDTree.CursorToTreeWin() endif - let b:NERDTreeShowHidden = g:NERDTreeShowHidden - call s:chRoot(g:NERDTreeDirNode.New(p.getParent())) + call b:NERDTree.setShowHidden(g:NERDTreeShowHidden) + call s:chRoot(g:NERDTreeDirNode.New(p.getParent(), b:NERDTree)) else if !g:NERDTree.IsOpen() - call g:NERDTreeCreator.TogglePrimary("") + call g:NERDTreeCreator.ToggleTabTree("") endif endif endif call g:NERDTree.CursorToTreeWin() - call b:NERDTreeRoot.reveal(p) + let node = b:NERDTree.root.reveal(p) + call b:NERDTree.render() + call node.putCursorHere(1,0) if p.isUnixHiddenFile() let g:NERDTreeShowHidden = showhidden @@ -312,7 +314,7 @@ function! s:handleLeftClick() endfor if currentNode.path.isDirectory - if startToCur =~# g:NERDTreeUI.MarkupReg() && startToCur =~# '[+~▾▸] \?$' + if startToCur =~# g:NERDTreeUI.MarkupReg() && startToCur =~# '[+~'.g:NERDTreeDirArrowExpandable.g:NERDTreeDirArrowCollapsible.'] \?$' call currentNode.activate() return endif @@ -409,7 +411,7 @@ endfunction " FUNCTION: s:jumpToRoot() {{{1 " moves the cursor to the root node function! s:jumpToRoot() - call b:NERDTreeRoot.putCursorHere(1, 0) + call b:NERDTree.root.putCursorHere(1, 0) call b:NERDTree.ui.centerView() endfunction @@ -442,13 +444,13 @@ endfunction " put the cursor on the given bookmark and, if its a file, open it function! nerdtree#ui_glue#openBookmark(name) try - let targetNode = g:NERDTreeBookmark.GetNodeForName(a:name, 0) + let targetNode = g:NERDTreeBookmark.GetNodeForName(a:name, 0, b:NERDTree) call targetNode.putCursorHere(0, 1) redraw! catch /^NERDTree.BookmarkedNodeNotFoundError/ call nerdtree#echo("note - target node is not cached") let bookmark = g:NERDTreeBookmark.BookmarkFor(a:name) - let targetNode = g:NERDTreeFileNode.New(bookmark.path) + let targetNode = g:NERDTreeFileNode.New(bookmark.path, b:NERDTree) endtry if targetNode.path.isDirectory call targetNode.openExplorer() @@ -510,7 +512,7 @@ endfunction " put the cursor on the node associate with the given name function! nerdtree#ui_glue#revealBookmark(name) try - let targetNode = g:NERDTreeBookmark.GetNodeForName(a:name, 0) + let targetNode = g:NERDTreeBookmark.GetNodeForName(a:name, 0, b:NERDTree) call targetNode.putCursorHere(0, 1) catch /^NERDTree.BookmarkNotFoundError/ call nerdtree#echo("Bookmark isnt cached under the current root") @@ -522,7 +524,7 @@ endfunction " will be reloaded. function! s:refreshRoot() call nerdtree#echo("Refreshing the root node. This could take a while...") - call b:NERDTreeRoot.refresh() + call b:NERDTree.root.refresh() call b:NERDTree.render() redraw call nerdtree#echo("Refreshing the root node. This could take a while... DONE") @@ -545,10 +547,10 @@ endfunction " FUNCTION: nerdtree#ui_glue#setupCommands() {{{1 function! nerdtree#ui_glue#setupCommands() - command! -n=? -complete=dir -bar NERDTree :call g:NERDTreeCreator.CreatePrimary('') - command! -n=? -complete=dir -bar NERDTreeToggle :call g:NERDTreeCreator.TogglePrimary('') + command! -n=? -complete=dir -bar NERDTree :call g:NERDTreeCreator.CreateTabTree('') + command! -n=? -complete=dir -bar NERDTreeToggle :call g:NERDTreeCreator.ToggleTabTree('') command! -n=0 -bar NERDTreeClose :call g:NERDTree.Close() - command! -n=1 -complete=customlist,nerdtree#completeBookmarks -bar NERDTreeFromBookmark call g:NERDTreeCreator.CreatePrimary('') + command! -n=1 -complete=customlist,nerdtree#completeBookmarks -bar NERDTreeFromBookmark call g:NERDTreeCreator.CreateTabTree('') command! -n=0 -bar NERDTreeMirror call g:NERDTreeCreator.CreateMirror() command! -n=0 -bar NERDTreeFind call s:findAndRevealPath() command! -n=0 -bar NERDTreeFocus call NERDTreeFocus() @@ -602,28 +604,28 @@ endfunction "keepState: 1 if the current root should be left open when the tree is "re-rendered function! nerdtree#ui_glue#upDir(keepState) - let cwd = b:NERDTreeRoot.path.str({'format': 'UI'}) + let cwd = b:NERDTree.root.path.str({'format': 'UI'}) if cwd ==# "/" || cwd =~# '^[^/]..$' call nerdtree#echo("already at top dir") else if !a:keepState - call b:NERDTreeRoot.close() + call b:NERDTree.root.close() endif - let oldRoot = b:NERDTreeRoot + let oldRoot = b:NERDTree.root - if empty(b:NERDTreeRoot.parent) - let path = b:NERDTreeRoot.path.getParent() - let newRoot = g:NERDTreeDirNode.New(path) + if empty(b:NERDTree.root.parent) + let path = b:NERDTree.root.path.getParent() + let newRoot = g:NERDTreeDirNode.New(path, b:NERDTree) call newRoot.open() - call newRoot.transplantChild(b:NERDTreeRoot) - let b:NERDTreeRoot = newRoot + call newRoot.transplantChild(b:NERDTree.root) + let b:NERDTree.root = newRoot else - let b:NERDTreeRoot = b:NERDTreeRoot.parent + let b:NERDTree.root = b:NERDTree.root.parent endif if g:NERDTreeChDirMode ==# 2 - call b:NERDTreeRoot.path.changeToDir() + call b:NERDTree.root.path.changeToDir() endif call b:NERDTree.render() diff --git a/sources_non_forked/nerdtree/doc/NERD_tree.txt b/sources_non_forked/nerdtree/doc/NERD_tree.txt index cfc8ed9b..1ad8e181 100644 --- a/sources_non_forked/nerdtree/doc/NERD_tree.txt +++ b/sources_non_forked/nerdtree/doc/NERD_tree.txt @@ -37,9 +37,7 @@ CONTENTS *NERDTree-contents* 4.3.Menu API..........................|NERDTreeAddPathFilter()| 4.4.Path Listener API.................|NERDTreePathListenerAPI| 5.About...................................|NERDTreeAbout| - 6.Changelog...............................|NERDTreeChangelog| - 7.Credits.................................|NERDTreeCredits| - 8.License.................................|NERDTreeLicense| + 6.License.................................|NERDTreeLicense| ============================================================================== 1. Intro *NERDTree* @@ -673,9 +671,6 @@ NERD tree. These options should be set in your vimrc. |'NERDTreeMinimalUI'| Disables display of the 'Bookmarks' label and 'Press ? for help' text. -|'NERDTreeDirArrows'| Tells the NERD tree to use arrows instead of - + ~ chars when displaying directories. - |'NERDTreeCascadeOpenSingleChildDir'| Cascade open while selected directory has only one child that also is a directory. @@ -778,13 +773,13 @@ Default: 1. If set to 1, doing a > :edit < -will open up a "secondary" NERD tree instead of a netrw in the target window. +will open up a window level NERD tree instead of a netrw in the target window. -Secondary NERD trees behaves slightly different from a regular trees in the +Window level trees behaves slightly different from a regular trees in the following respects: 1. 'o' will open the selected file in the same window as the tree, replacing it. - 2. you can have as many secondary tree as you want in the same tab. + 2. you can have one tree per window - instead of per tab. ------------------------------------------------------------------------------ *'NERDTreeIgnore'* @@ -947,7 +942,7 @@ Other examples: > ------------------------------------------------------------------------------ *'NERDTreeStatusline'* Values: Any valid statusline setting. -Default: %{b:NERDTreeRoot.path.strForOS(0)} +Default: %{b:NERDTree.root.path.strForOS(0)} Tells the script what to use as the |'statusline'| setting for NERD tree windows. @@ -988,19 +983,6 @@ of the following lines to set this option: > let NERDTreeMinimalUI=1 < ------------------------------------------------------------------------------- - *'NERDTreeDirArrows'* -Values: 0 or 1 -Default: 0. - -This option is used to change the default look of directory nodes displayed in -the tree. When set to 0 it shows old-school bars (|), + and ~ chars. If set to -1 it shows right and down arrows. Use one of the follow lines to set this -option: > - let NERDTreeDirArrows=0 - let NERDTreeDirArrows=1 -< - ------------------------------------------------------------------------------ *'NERDTreeCascadeOpenSingleChildDir'* Values: 0 or 1 @@ -1205,7 +1187,7 @@ Use this API if you want to run a callback for events on Path objects. E.G > "This function will be called whenever a Path object is created. "a:event is an object that contains a bunch of relevant info - - "including the path in question. See lib/event.vim for details. + "including the path in question. See lib/nerdtree/event.vim for details. endfunction < Current events supported: @@ -1235,187 +1217,8 @@ The latest stable versions can be found at The latest dev versions are on github http://github.com/scrooloose/nerdtree - ============================================================================== -6. Changelog *NERDTreeChangelog* - -Next - - add 'scope' argument to the key map API - - add NERDTreeCustomIgnoreFilter hook - needs doc - - add magic [[dir]] and [[file]] flags to NERDTreeIgnore - - add support for custom path filters. See :help NERDTreeAddPathFilter() - - add path listener API. See :help NERDTreePathListenerAPI. - -4.2.0 - - Add NERDTreeDirArrows option to make the UI use pretty arrow chars - instead of the old +~| chars to define the tree structure (sickill) - - shift the syntax highlighting out into its own syntax file (gnap) - - add some mac specific options to the filesystem menu - for macvim - only (andersonfreitas) - - Add NERDTreeMinimalUI option to remove some non functional parts of the - nerdtree ui (camthompson) - - tweak the behaviour of :NERDTreeFind - see :help :NERDTreeFind for the - new behaviour (benjamingeiger) - - if no name is given to :Bookmark, make it default to the name of the - target file/dir (minyoung) - - use 'file' completion when doing copying, create, and move - operations (EvanDotPro) - - lots of misc bug fixes (paddyoloughlin, sdewald, camthompson, Vitaly - Bogdanov, AndrewRadev, mathias, scottstvnsn, kml, wycats, me RAWR!) - -4.1.0 - features: - - NERDTreeFind to reveal the node for the current buffer in the tree, - see |NERDTreeFind|. This effectively merges the FindInNERDTree plugin (by - Doug McInnes) into the script. - - make NERDTreeQuitOnOpen apply to the t/T keymaps too. Thanks to Stefan - Ritter and Rémi Prévost. - - truncate the root node if wider than the tree window. Thanks to Victor - Gonzalez. - - bugfixes: - - really fix window state restoring - - fix some win32 path escaping issues. Thanks to Stephan Baumeister, Ricky, - jfilip1024, and Chris Chambers - -4.0.0 - - add a new programmable menu system (see :help NERDTreeMenu). - - add new APIs to add menus/menu-items to the menu system as well as - custom key mappings to the NERD tree buffer (see :help NERDTreeAPI). - - removed the old API functions - - added a mapping to maximize/restore the size of nerd tree window, thanks - to Guillaume Duranceau for the patch. See :help NERDTree-A for details. - - - fix a bug where secondary nerd trees (netrw hijacked trees) and - NERDTreeQuitOnOpen didnt play nicely, thanks to Curtis Harvey. - - fix a bug where the script ignored directories whose name ended in a dot, - thanks to Aggelos Orfanakos for the patch. - - fix a bug when using the x mapping on the tree root, thanks to Bryan - Venteicher for the patch. - - fix a bug where the cursor position/window size of the nerd tree buffer - wasnt being stored on closing the window, thanks to Richard Hart. - - fix a bug where NERDTreeMirror would mirror the wrong tree - -3.1.1 - - fix a bug where a non-listed no-name buffer was getting created every - time the tree windows was created, thanks to Derek Wyatt and owen1 - - make behave the same as the 'o' mapping - - some helptag fixes in the doc, thanks strull - - fix a bug when using :set nohidden and opening a file where the previous - buf was modified. Thanks iElectric - - other minor fixes - -3.1.0 - New features: - - add mappings to open files in a vsplit, see :help NERDTree-s and :help - NERDTree-gs - - make the statusline for the nerd tree window default to something - hopefully more useful. See :help 'NERDTreeStatusline' - Bugfixes: - - make the hijack netrw functionality work when vim is started with "vim - " (thanks to Alf Mikula for the patch). - - fix a bug where the CWD wasnt being changed for some operations even when - NERDTreeChDirMode==2 (thanks to Lucas S. Buchala) - - add -bar to all the nerd tree :commands so they can chain with other - :commands (thanks to tpope) - - fix bugs when ignorecase was set (thanks to nach) - - fix a bug with the relative path code (thanks to nach) - - fix a bug where doing a :cd would cause :NERDTreeToggle to fail (thanks nach) - - -3.0.1 - Bugfixes: - - fix bugs with :NERDTreeToggle and :NERDTreeMirror when 'hidden - was not set - - fix a bug where :NERDTree would fail if was relative and - didnt start with a ./ or ../ Thanks to James Kanze. - - make the q mapping work with secondary (:e style) trees, - thanks to jamessan - - fix a bunch of small bugs with secondary trees - - More insane refactoring. - -3.0.0 - - hijack netrw so that doing an :edit will put a NERD tree in - the window rather than a netrw browser. See :help 'NERDTreeHijackNetrw' - - allow sharing of trees across tabs, see :help :NERDTreeMirror - - remove "top" and "bottom" as valid settings for NERDTreeWinPos - - change the '' mapping to 'i' - - change the 'H' mapping to 'I' - - lots of refactoring - -============================================================================== -7. Credits *NERDTreeCredits* - -Thanks to the following people for testing, bug reports, ideas etc. Without -you I probably would have got bored of the hacking the NERD tree and -just downloaded pr0n instead. - - Tim Carey-Smith (halorgium) - Vigil - Nick Brettell - Thomas Scott Urban - Terrance Cohen - Yegappan Lakshmanan - Jason Mills - Michael Geddes (frogonwheels) - Yu Jun - Michael Madsen - AOYAMA Shotaro - Zhang Weiwu - Niels Aan de Brugh - Olivier Yiptong - Zhang Shuhan - Cory Echols - Piotr Czachur - Yuan Jiang - Matan Nassau - Maxim Kim - Charlton Wang - Matt Wozniski (godlygeek) - knekk - Sean Chou - Ryan Penn - Simon Peter Nicholls - Michael Foobar - Tomasz Chomiuk - Denis Pokataev - Tim Pope (tpope) - James Kanze - James Vega (jamessan) - Frederic Chanal (nach) - Alf Mikula - Lucas S. Buchala - Curtis Harvey - Guillaume Duranceau - Richard Hart (hates) - Doug McInnes - Stefan Ritter - Rémi Prévost - Victor Gonzalez - Stephan Baumeister - Ricky - jfilip1024 - Chris Chambers - Vitaly Bogdanov - Patrick O'Loughlin (paddyoloughlin) - Cam Thompson (camthompson) - Marcin Kulik (sickill) - Steve DeWald (sdewald) - Ivan Necas (iNecas) - George Ang (gnap) - Evan Coury (EvanDotPro) - Andrew Radev (AndrewRadev) - Matt Gauger (mathias) - Scott Stevenson (scottstvnsn) - Anderson Freitas (andersonfreitas) - Kamil K. Lemański (kml) - Yehuda Katz (wycats) - Min-Young Wu (minyoung) - Benjamin Geiger (benjamingeiger) - -============================================================================== -8. License *NERDTreeLicense* +6. License *NERDTreeLicense* The NERD tree is released under the wtfpl. See http://sam.zoy.org/wtfpl/COPYING. diff --git a/sources_non_forked/nerdtree/lib/nerdtree/bookmark.vim b/sources_non_forked/nerdtree/lib/nerdtree/bookmark.vim index 8a94b256..81242605 100644 --- a/sources_non_forked/nerdtree/lib/nerdtree/bookmark.vim +++ b/sources_non_forked/nerdtree/lib/nerdtree/bookmark.vim @@ -3,9 +3,9 @@ let s:Bookmark = {} let g:NERDTreeBookmark = s:Bookmark -" FUNCTION: Bookmark.activate() {{{1 -function! s:Bookmark.activate(...) - call self.open(a:0 ? a:1 : {}) +" FUNCTION: Bookmark.activate(nerdtree) {{{1 +function! s:Bookmark.activate(nerdtree, ...) + call self.open(a:nerdtree, a:0 ? a:1 : {}) endfunction " FUNCTION: Bookmark.AddBookmark(name, path) {{{1 @@ -87,6 +87,7 @@ function! s:Bookmark.CacheBookmarks(silent) let name = substitute(i, '^\(.\{-}\) .*$', '\1', '') let path = substitute(i, '^.\{-} \(.*\)$', '\1', '') + let path = fnamemodify(path, ':p') try let bookmark = s:Bookmark.New(name, g:NERDTreePath.New(path)) @@ -127,26 +128,18 @@ endfunction " Delete this bookmark. If the node for this bookmark is under the current " root, then recache bookmarks for its Path object function! s:Bookmark.delete() - let node = {} - try - let node = self.getNode(1) - catch /^NERDTree.BookmarkedNodeNotFoundError/ - endtry call remove(s:Bookmark.Bookmarks(), index(s:Bookmark.Bookmarks(), self)) - if !empty(node) - call node.path.cacheDisplayString() - endif call s:Bookmark.Write() endfunction -" FUNCTION: Bookmark.getNode(searchFromAbsoluteRoot) {{{1 +" FUNCTION: Bookmark.getNode(nerdtree, searchFromAbsoluteRoot) {{{1 " Gets the treenode for this bookmark " " Args: " searchFromAbsoluteRoot: specifies whether we should search from the current " tree root, or the highest cached node -function! s:Bookmark.getNode(searchFromAbsoluteRoot) - let searchRoot = a:searchFromAbsoluteRoot ? g:NERDTreeDirNode.AbsoluteTreeRoot() : b:NERDTreeRoot +function! s:Bookmark.getNode(nerdtree, searchFromAbsoluteRoot) + let searchRoot = a:searchFromAbsoluteRoot ? a:nerdtree.root.AbsoluteTreeRoot() : a:nerdtree.root let targetNode = searchRoot.findNode(self.path) if empty(targetNode) throw "NERDTree.BookmarkedNodeNotFoundError: no node was found for bookmark: " . self.name @@ -154,12 +147,12 @@ function! s:Bookmark.getNode(searchFromAbsoluteRoot) return targetNode endfunction -" FUNCTION: Bookmark.GetNodeForName(name, searchFromAbsoluteRoot) {{{1 +" FUNCTION: Bookmark.GetNodeForName(name, searchFromAbsoluteRoot, nerdtree) {{{1 " Class method that finds the bookmark with the given name and returns the " treenode for it. -function! s:Bookmark.GetNodeForName(name, searchFromAbsoluteRoot) +function! s:Bookmark.GetNodeForName(name, searchFromAbsoluteRoot, nerdtree) let bookmark = s:Bookmark.BookmarkFor(a:name) - return bookmark.getNode(a:searchFromAbsoluteRoot) + return bookmark.getNode(nerdtree, a:searchFromAbsoluteRoot) endfunction " FUNCTION: Bookmark.GetSelected() {{{1 @@ -209,8 +202,11 @@ function! s:Bookmark.New(name, path) return newBookmark endfunction -" FUNCTION: Bookmark.open([options]) {{{1 +" FUNCTION: Bookmark.open(nerdtree, [options]) {{{1 "Args: +" +"nerdtree: the tree to load open the bookmark in +" "A dictionary containing the following keys (all optional): " 'where': Specifies whether the node should be opened in new split/tab or in " the previous window. Can be either 'v' (vertical split), 'h' @@ -219,11 +215,11 @@ endfunction " 'keepopen': dont close the tree window " 'stay': open the file, but keep the cursor in the tree win " -function! s:Bookmark.open(...) +function! s:Bookmark.open(nerdtree, ...) let opts = a:0 ? a:1 : {} if self.path.isDirectory && !has_key(opts, 'where') - call self.toRoot() + call self.toRoot(a:nerdtree) else let opener = g:NERDTreeOpener.New(self.path, opts) call opener.open(self) @@ -265,26 +261,24 @@ function! s:Bookmark.str() return '>' . self.name . ' ' . pathStr endfunction -" FUNCTION: Bookmark.toRoot() {{{1 +" FUNCTION: Bookmark.toRoot(nerdtree) {{{1 " Make the node for this bookmark the new tree root -function! s:Bookmark.toRoot() +function! s:Bookmark.toRoot(nerdtree) if self.validate() try - let targetNode = self.getNode(1) + let targetNode = self.getNode(a:nerdtree, 1) catch /^NERDTree.BookmarkedNodeNotFoundError/ - let targetNode = g:NERDTreeFileNode.New(s:Bookmark.BookmarkFor(self.name).path) + let targetNode = g:NERDTreeFileNode.New(s:Bookmark.BookmarkFor(self.name).path, a:nerdtree) endtry - call targetNode.makeRoot() - call b:NERDTree.render() - call targetNode.putCursorHere(0, 0) + call a:nerdtree.changeRoot(targetNode) endif endfunction -" FUNCTION: Bookmark.ToRoot(name) {{{1 +" FUNCTION: Bookmark.ToRoot(name, nerdtree) {{{1 " Make the node for this bookmark the new tree root -function! s:Bookmark.ToRoot(name) +function! s:Bookmark.ToRoot(name, nerdtree) let bookmark = s:Bookmark.BookmarkFor(a:name) - call bookmark.toRoot() + call bookmark.toRoot(a:nerdtree) endfunction " FUNCTION: Bookmark.validate() {{{1 @@ -293,7 +287,6 @@ function! s:Bookmark.validate() return 1 else call s:Bookmark.CacheBookmarks(1) - call b:NERDTree.render() call nerdtree#echo(self.name . "now points to an invalid location. See :help NERDTreeInvalidBookmarks for info.") return 0 endif @@ -304,7 +297,7 @@ endfunction function! s:Bookmark.Write() let bookmarkStrings = [] for i in s:Bookmark.Bookmarks() - call add(bookmarkStrings, i.name . ' ' . i.path.str()) + call add(bookmarkStrings, i.name . ' ' . fnamemodify(i.path.str(), ':~')) endfor "add a blank line before the invalid ones diff --git a/sources_non_forked/nerdtree/lib/nerdtree/creator.vim b/sources_non_forked/nerdtree/lib/nerdtree/creator.vim index 2d6a5c2e..9775d31c 100644 --- a/sources_non_forked/nerdtree/lib/nerdtree/creator.vim +++ b/sources_non_forked/nerdtree/lib/nerdtree/creator.vim @@ -1,5 +1,5 @@ "CLASS: Creator -"Creates primary/secondary/mirror nerdtree windows. Sets up all the window and +"Creates tab/window/mirror nerdtree windows. Sets up all the window and "buffer options and key mappings etc. "============================================================ let s:Creator = {} @@ -16,7 +16,7 @@ function! s:Creator._bindMappings() command! -buffer -complete=customlist,nerdtree#completeBookmarks -nargs=1 RevealBookmark :call nerdtree#ui_glue#revealBookmark('') command! -buffer -complete=customlist,nerdtree#completeBookmarks -nargs=1 OpenBookmark :call nerdtree#ui_glue#openBookmark('') command! -buffer -complete=customlist,nerdtree#completeBookmarks -nargs=* ClearBookmarks call nerdtree#ui_glue#clearBookmarks('') - command! -buffer -complete=customlist,nerdtree#completeBookmarks -nargs=+ BookmarkToRoot call g:NERDTreeBookmark.ToRoot('') + command! -buffer -complete=customlist,nerdtree#completeBookmarks -nargs=+ BookmarkToRoot call g:NERDTreeBookmark.ToRoot('', b:NERDTree) command! -buffer -nargs=0 ClearAllBookmarks call g:NERDTreeBookmark.ClearAll() call b:NERDTree.render() command! -buffer -nargs=0 ReadBookmarks call g:NERDTreeBookmark.CacheBookmarks(0) call b:NERDTree.render() command! -buffer -nargs=0 WriteBookmarks call g:NERDTreeBookmark.Write() @@ -32,22 +32,26 @@ function! s:Creator.BufNamePrefix() return 'NERD_tree_' endfunction -"FUNCTION: s:Creator.CreatePrimary(a:name) {{{1 -function! s:Creator.CreatePrimary(name) +"FUNCTION: s:Creator.CreateTabTree(a:name) {{{1 +function! s:Creator.CreateTabTree(name) let creator = s:Creator.New() - call creator.createPrimary(a:name) + call creator.createTabTree(a:name) endfunction -"FUNCTION: s:Creator.createPrimary(a:name) {{{1 +"FUNCTION: s:Creator.createTabTree(a:name) {{{1 "name: the name of a bookmark or a directory -function! s:Creator.createPrimary(name) +function! s:Creator.createTabTree(name) let path = self._pathForString(a:name) - + "abort if exception was thrown (bookmark/dir doesn't exist) if empty(path) return endif + if path == {} + return + endif + "if instructed to, then change the vim CWD to the dir the NERDTree is "inited in if g:NERDTreeChDirMode != 0 @@ -58,32 +62,26 @@ function! s:Creator.createPrimary(name) if g:NERDTree.IsOpen() call g:NERDTree.Close() endif - unlet t:NERDTreeBufName + + call self._removeTreeBufForTab() endif call self._createTreeWin() - call self._createNERDTree(path) - let b:NERDTreeType = "primary" - let b:treeShowHelp = 0 - let b:NERDTreeIgnoreEnabled = 1 - let b:NERDTreeShowFiles = g:NERDTreeShowFiles - let b:NERDTreeShowHidden = g:NERDTreeShowHidden - let b:NERDTreeShowBookmarks = g:NERDTreeShowBookmarks - + call self._createNERDTree(path, "tab") call b:NERDTree.render() - call b:NERDTreeRoot.putCursorHere(0, 0) + call b:NERDTree.root.putCursorHere(0, 0) call self._broadcastInitEvent() endfunction -"FUNCTION: s:Creator.CreateSecondary(dir) {{{1 -function! s:Creator.CreateSecondary(dir) +"FUNCTION: s:Creator.CreateWindowTree(dir) {{{1 +function! s:Creator.CreateWindowTree(dir) let creator = s:Creator.New() - call creator.createSecondary(a:dir) + call creator.createWindowTree(a:dir) endfunction -"FUNCTION: s:Creator.createSecondary(dir) {{{1 -function! s:Creator.createSecondary(dir) +"FUNCTION: s:Creator.createWindowTree(dir) {{{1 +function! s:Creator.createWindowTree(dir) try let path = g:NERDTreePath.New(a:dir) catch /^NERDTree.InvalidArgumentsError/ @@ -96,14 +94,13 @@ function! s:Creator.createSecondary(dir) let previousBuf = expand("#") - "we need a unique name for each secondary tree buffer to ensure they are + "we need a unique name for each window tree buffer to ensure they are "all independent exec "silent edit " . self._nextBufferName() - let b:NERDTreePreviousBuf = bufnr(previousBuf) - call self._createNERDTree(path) + call self._createNERDTree(path, "window") + let b:NERDTree._previousBuf = bufnr(previousBuf) call self._setCommonBufOptions() - let b:NERDTreeType = "secondary" call b:NERDTree.render() @@ -111,8 +108,8 @@ function! s:Creator.createSecondary(dir) endfunction " FUNCTION: s:Creator._createNERDTree(path) {{{1 -function! s:Creator._createNERDTree(path) - let b:NERDTree = g:NERDTree.New(a:path) +function! s:Creator._createNERDTree(path, type) + let b:NERDTree = g:NERDTree.New(a:path, a:type) "TODO: This is kept for compatability only since many things use "b:NERDTreeRoot instead of the new NERDTree.root "Remove this one day @@ -145,7 +142,7 @@ function! s:Creator.createMirror() let i = 0 while i < len(treeBufNames) let bufName = treeBufNames[i] - let treeRoot = getbufvar(bufName, "NERDTreeRoot") + let treeRoot = getbufvar(bufName, "NERDTree").root let options[i+1 . '. ' . treeRoot.path.str() . ' (buf name: ' . bufName . ')'] = bufName let i = i + 1 endwhile @@ -201,6 +198,15 @@ function! s:Creator._createTreeWin() call self._setCommonBufOptions() endfunction +"FUNCTION: s:Creator._isBufHidden(nr) {{{1 +function! s:Creator._isBufHidden(nr) + redir => bufs + silent ls! + redir END + + return bufs =~ a:nr . '..h' +endfunction + "FUNCTION: s:Creator.New() {{{1 function! s:Creator.New() let newCreator = copy(self) @@ -245,7 +251,7 @@ function! s:Creator._pathForString(str) let path = g:NERDTreePath.New(dir) catch /^NERDTree.InvalidArgumentsError/ call nerdtree#echo("No bookmark or directory found for: " . a:str) - return + return {} endtry endif if !path.isDirectory @@ -255,6 +261,23 @@ function! s:Creator._pathForString(str) return path endfunction +" Function: s:Creator._removeTreeBufForTab() {{{1 +function! s:Creator._removeTreeBufForTab() + let buf = bufnr(t:NERDTreeBufName) + + "if &hidden is not set then it will already be gone + if buf != -1 + + "nerdtree buf may be mirrored/displayed elsewhere + if self._isBufHidden(buf) + exec "bwipeout " . buf + endif + + endif + + unlet t:NERDTreeBufName +endfunction + "FUNCTION: s:Creator._setCommonBufOptions() {{{1 function! s:Creator._setCommonBufOptions() "throwaway buffer options @@ -283,12 +306,6 @@ function! s:Creator._setCommonBufOptions() endif call self._setupStatusline() - - let b:treeShowHelp = 0 - let b:NERDTreeIgnoreEnabled = 1 - let b:NERDTreeShowFiles = g:NERDTreeShowFiles - let b:NERDTreeShowHidden = g:NERDTreeShowHidden - let b:NERDTreeShowBookmarks = g:NERDTreeShowBookmarks call self._bindMappings() setlocal filetype=nerdtree endfunction @@ -318,20 +335,20 @@ function! s:Creator._tabpagevar(tabnr, var) return v endfunction -"FUNCTION: s:Creator.TogglePrimary(dir) {{{1 -function! s:Creator.TogglePrimary(dir) +"FUNCTION: s:Creator.ToggleTabTree(dir) {{{1 +function! s:Creator.ToggleTabTree(dir) let creator = s:Creator.New() - call creator.togglePrimary(a:dir) + call creator.toggleTabTree(a:dir) endfunction -"FUNCTION: s:Creator.togglePrimary(dir) {{{1 +"FUNCTION: s:Creator.toggleTabTree(dir) {{{1 "Toggles the NERD tree. I.e the NERD tree is open, it is closed, if it is "closed it is restored or initialized (if it doesnt exist) " "Args: "dir: the full path for the root node (is only used if the NERD tree is being "initialized. -function! s:Creator.togglePrimary(dir) +function! s:Creator.toggleTabTree(dir) if g:NERDTree.ExistsForTab() if !g:NERDTree.IsOpen() call self._createTreeWin() @@ -343,7 +360,7 @@ function! s:Creator.togglePrimary(dir) call g:NERDTree.Close() endif else - call self.createPrimary(a:dir) + call self.createTabTree(a:dir) endif endfunction diff --git a/sources_non_forked/nerdtree/lib/nerdtree/nerdtree.vim b/sources_non_forked/nerdtree/lib/nerdtree/nerdtree.vim index 55f3dd75..73a30f7a 100644 --- a/sources_non_forked/nerdtree/lib/nerdtree/nerdtree.vim +++ b/sources_non_forked/nerdtree/lib/nerdtree/nerdtree.vim @@ -8,8 +8,30 @@ function! s:NERDTree.AddPathFilter(callback) call add(s:NERDTree.PathFilters(), a:callback) endfunction +"FUNCTION: s:NERDTree.changeRoot(node) {{{1 +function! s:NERDTree.changeRoot(node) + if a:node.path.isDirectory + let self.root = a:node + else + call a:node.cacheParent() + let self.root = a:node.parent + endif + + call self.root.open() + + "change dir to the dir of the new root if instructed to + if g:NERDTreeChDirMode ==# 2 + exec "cd " . self.root.path.str({'format': 'Edit'}) + endif + + call self.render() + call self.root.putCursorHere(0, 0) + + silent doautocmd User NERDTreeNewRoot +endfunction + "FUNCTION: s:NERDTree.Close() {{{1 -"Closes the primary NERD tree window for this tab +"Closes the tab tree window for this tab function! s:NERDTree.Close() if !s:NERDTree.IsOpen() return @@ -43,7 +65,7 @@ endfunction "FUNCTION: s:NERDTree.CursorToBookmarkTable(){{{1 "Places the cursor at the top of the bookmarks table function! s:NERDTree.CursorToBookmarkTable() - if !b:NERDTreeShowBookmarks + if !b:NERDTree.ui.getShowBookmarks() throw "NERDTree.IllegalOperationError: cant find bookmark table, bookmarks arent active" endif @@ -73,13 +95,18 @@ endfunction " Function: s:NERDTree.ExistsForBuffer() {{{1 " Returns 1 if a nerd tree root exists in the current buffer function! s:NERDTree.ExistsForBuf() - return exists("b:NERDTreeRoot") + return exists("b:NERDTree") endfunction " Function: s:NERDTree.ExistsForTab() {{{1 " Returns 1 if a nerd tree root exists in the current tab function! s:NERDTree.ExistsForTab() - return exists("t:NERDTreeBufName") + if !exists("t:NERDTreeBufName") + return + end + + "check b:NERDTree is still there and hasn't been e.g. :bdeleted + return !empty(getbufvar(bufnr(t:NERDTreeBufName), 'NERDTree')) endfunction function! s:NERDTree.ForCurrentBuf() @@ -90,14 +117,29 @@ function! s:NERDTree.ForCurrentBuf() endif endfunction +"FUNCTION: s:NERDTree.ForCurrentTab() {{{1 +function! s:NERDTree.ForCurrentTab() + if !s:NERDTree.ExistsForTab() + return + endif + + let bufnr = bufnr(t:NERDTreeBufName) + return getbufvar(bufnr, "NERDTree") +endfunction + +"FUNCTION: s:NERDTree.getRoot() {{{1 +function! s:NERDTree.getRoot() + return self.root +endfunction + "FUNCTION: s:NERDTree.GetWinNum() {{{1 "gets the nerd tree window number for this tab function! s:NERDTree.GetWinNum() if exists("t:NERDTreeBufName") return bufwinnr(t:NERDTreeBufName) - else - return -1 endif + + return -1 endfunction "FUNCTION: s:NERDTree.IsOpen() {{{1 @@ -105,6 +147,16 @@ function! s:NERDTree.IsOpen() return s:NERDTree.GetWinNum() != -1 endfunction +"FUNCTION: s:NERDTree.isTabTree() {{{1 +function! s:NERDTree.isTabTree() + return self._type == "tab" +endfunction + +"FUNCTION: s:NERDTree.isWinTree() {{{1 +function! s:NERDTree.isWinTree() + return self._type == "window" +endfunction + "FUNCTION: s:NERDTree.MustBeOpen() {{{1 function! s:NERDTree.MustBeOpen() if !s:NERDTree.IsOpen() @@ -113,11 +165,11 @@ function! s:NERDTree.MustBeOpen() endfunction "FUNCTION: s:NERDTree.New() {{{1 -function! s:NERDTree.New(path) +function! s:NERDTree.New(path, type) let newObj = copy(self) let newObj.ui = g:NERDTreeUI.New(newObj) - let newObj.root = g:NERDTreeDirNode.New(a:path) - + let newObj.root = g:NERDTreeDirNode.New(a:path, newObj) + let newObj._type = a:type return newObj endfunction @@ -129,6 +181,10 @@ function! s:NERDTree.PathFilters() return s:NERDTree._PathFilters endfunction +"FUNCTION: s:NERDTree.previousBuf() {{{1 +function! s:NERDTree.previousBuf() + return self._previousBuf +endfunction "FUNCTION: s:NERDTree.render() {{{1 "A convenience function - since this is called often diff --git a/sources_non_forked/nerdtree/lib/nerdtree/notifier.vim b/sources_non_forked/nerdtree/lib/nerdtree/notifier.vim index b445f8ad..00041b85 100644 --- a/sources_non_forked/nerdtree/lib/nerdtree/notifier.vim +++ b/sources_non_forked/nerdtree/lib/nerdtree/notifier.vim @@ -11,8 +11,8 @@ function! s:Notifier.AddListener(event, funcname) call add(listeners, a:funcname) endfunction -function! s:Notifier.NotifyListeners(event, path, params) - let event = g:NERDTreeEvent.New(b:NERDTree, a:path, a:event, a:params) +function! s:Notifier.NotifyListeners(event, path, nerdtree, params) + let event = g:NERDTreeEvent.New(a:nerdtree, a:path, a:event, a:params) for listener in s:Notifier.GetListenersForEvent(a:event) call {listener}(event) diff --git a/sources_non_forked/nerdtree/lib/nerdtree/opener.vim b/sources_non_forked/nerdtree/lib/nerdtree/opener.vim index 3a6b3924..00947cdb 100644 --- a/sources_non_forked/nerdtree/lib/nerdtree/opener.vim +++ b/sources_non_forked/nerdtree/lib/nerdtree/opener.vim @@ -64,7 +64,7 @@ endfunction "FUNCTION: Opener._gotoTargetWin() {{{1 function! s:Opener._gotoTargetWin() - if b:NERDTreeType ==# "secondary" + if b:NERDTree.isWinTree() if self._where == 'v' vsplit elseif self._where == 'h' @@ -149,7 +149,7 @@ function! s:Opener.New(path, opts) let newObj._keepopen = nerdtree#has_opt(a:opts, 'keepopen') let newObj._where = has_key(a:opts, 'where') ? a:opts['where'] : '' - let newObj._treetype = b:NERDTreeType + let newObj._nerdtree = b:NERDTree call newObj._saveCursorPos() return newObj @@ -247,34 +247,25 @@ function! s:Opener._openFile() endif call self._gotoTargetWin() - - if self._treetype ==# "secondary" - call self._path.edit() - else - call self._path.edit() - - - if self._stay - call self._restoreCursorPos() - endif + call self._path.edit() + if self._stay + call self._restoreCursorPos() endif endfunction "FUNCTION: Opener._openDirectory(node) {{{1 function! s:Opener._openDirectory(node) - if self._treetype ==# "secondary" + if self._nerdtree.isWinTree() call self._gotoTargetWin() - call g:NERDTreeCreator.CreateSecondary(a:node.path.str()) + call g:NERDTreeCreator.CreateWindow(a:node.path.str()) else call self._gotoTargetWin() if empty(self._where) - call a:node.makeRoot() - call b:NERDTree.render() - call a:node.putCursorHere(0, 0) + call b:NERDTree.changeRoot(a:node) elseif self._where == 't' - call g:NERDTreeCreator.CreatePrimary(a:node.path.str()) + call g:NERDTreeCreator.CreateTabTree(a:node.path.str()) else - call g:NERDTreeCreator.CreateSecondary(a:node.path.str()) + call g:NERDTreeCreator.CreateWindowTree(a:node.path.str()) endif endif diff --git a/sources_non_forked/nerdtree/lib/nerdtree/path.vim b/sources_non_forked/nerdtree/lib/nerdtree/path.vim index 2af07ddb..df18505f 100644 --- a/sources_non_forked/nerdtree/lib/nerdtree/path.vim +++ b/sources_non_forked/nerdtree/lib/nerdtree/path.vim @@ -40,9 +40,7 @@ endfunction "FUNCTION: Path.cacheDisplayString() {{{1 function! s:Path.cacheDisplayString() abort - let self.cachedDisplayString = self.flagSet.renderToString() - - let self.cachedDisplayString .= self.getLastPathComponent(1) + let self.cachedDisplayString = self.getLastPathComponent(1) if self.isExecutable let self.cachedDisplayString = self.cachedDisplayString . '*' @@ -406,11 +404,11 @@ function! s:Path.isUnixHiddenPath() endif endfunction -"FUNCTION: Path.ignore() {{{1 +"FUNCTION: Path.ignore(nerdtree) {{{1 "returns true if this path should be ignored -function! s:Path.ignore() +function! s:Path.ignore(nerdtree) "filter out the user specified paths to ignore - if b:NERDTreeIgnoreEnabled + if a:nerdtree.ui.isIgnoreFilterEnabled() for i in g:NERDTreeIgnore if self._ignorePatternMatches(i) return 1 @@ -418,18 +416,18 @@ function! s:Path.ignore() endfor for callback in g:NERDTree.PathFilters() - if {callback}({'path': self, 'nerdtree': b:NERDTree}) + if {callback}({'path': self, 'nerdtree': a:nerdtree}) return 1 endif endfor endif "dont show hidden files unless instructed to - if b:NERDTreeShowHidden ==# 0 && self.isUnixHiddenFile() + if !a:nerdtree.ui.getShowHidden() && self.isUnixHiddenFile() return 1 endif - if b:NERDTreeShowFiles ==# 0 && self.isDirectory ==# 0 + if a:nerdtree.ui.getShowFiles() ==# 0 && self.isDirectory ==# 0 return 1 endif @@ -455,10 +453,22 @@ function! s:Path._ignorePatternMatches(pattern) return self.getLastPathComponent(0) =~# pat endfunction -"FUNCTION: Path.isUnder(path) {{{1 -"return 1 if this path is somewhere under the given path in the filesystem. +"FUNCTION: Path.isAncestor(path) {{{1 +"return 1 if this path is somewhere above the given path in the filesystem. " "a:path should be a dir +function! s:Path.isAncestor(path) + if !self.isDirectory + return 0 + endif + + let this = self.str() + let that = a:path.str() + return stridx(that, this) == 0 +endfunction + +"FUNCTION: Path.isUnder(path) {{{1 +"return 1 if this path is somewhere under the given path in the filesystem. function! s:Path.isUnder(path) if a:path.isDirectory == 0 return 0 @@ -572,16 +582,16 @@ function! s:Path.readInfoFromDisk(fullpath) endif endfunction -"FUNCTION: Path.refresh() {{{1 -function! s:Path.refresh() +"FUNCTION: Path.refresh(nerdtree) {{{1 +function! s:Path.refresh(nerdtree) call self.readInfoFromDisk(self.str()) - call g:NERDTreePathNotifier.NotifyListeners('refresh', self, {}) + call g:NERDTreePathNotifier.NotifyListeners('refresh', self, a:nerdtree, {}) call self.cacheDisplayString() endfunction -"FUNCTION: Path.refreshFlags() {{{1 -function! s:Path.refreshFlags() - call g:NERDTreePathNotifier.NotifyListeners('refreshFlags', self, {}) +"FUNCTION: Path.refreshFlags(nerdtree) {{{1 +function! s:Path.refreshFlags(nerdtree) + call g:NERDTreePathNotifier.NotifyListeners('refreshFlags', self, a:nerdtree, {}) call self.cacheDisplayString() endfunction diff --git a/sources_non_forked/nerdtree/lib/nerdtree/tree_dir_node.vim b/sources_non_forked/nerdtree/lib/nerdtree/tree_dir_node.vim index 765982df..48e9bda3 100644 --- a/sources_non_forked/nerdtree/lib/nerdtree/tree_dir_node.vim +++ b/sources_non_forked/nerdtree/lib/nerdtree/tree_dir_node.vim @@ -9,7 +9,7 @@ let g:NERDTreeDirNode = s:TreeDirNode "FUNCTION: TreeDirNode.AbsoluteTreeRoot(){{{1 "class method that returns the highest cached ancestor of the current root function! s:TreeDirNode.AbsoluteTreeRoot() - let currentNode = b:NERDTreeRoot + let currentNode = b:NERDTree.root while currentNode.parent != {} let currentNode = currentNode.parent endwhile @@ -21,7 +21,7 @@ unlet s:TreeDirNode.activate function! s:TreeDirNode.activate(...) let opts = a:0 ? a:1 : {} call self.toggleOpen(opts) - call b:NERDTree.render() + call self.getNerdtree().render() call self.putCursorHere(0, 0) endfunction @@ -68,11 +68,27 @@ endfunction "Returns: "the newly created node function! s:TreeDirNode.createChild(path, inOrder) - let newTreeNode = g:NERDTreeFileNode.New(a:path) + let newTreeNode = g:NERDTreeFileNode.New(a:path, self.getNerdtree()) call self.addChild(newTreeNode, a:inOrder) return newTreeNode endfunction +"FUNCTION: TreeDirNode.displayString() {{{1 +unlet s:TreeDirNode.displayString +function! s:TreeDirNode.displayString() + let cascade = self.getCascade() + let rv = "" + for node in cascade + let rv = rv . node.path.displayString() + endfor + + let sym = cascade[-1].isOpen ? g:NERDTreeDirArrowCollapsible : g:NERDTreeDirArrowExpandable + + let flags = cascade[-1].path.flagSet.renderToString() + + return sym . ' ' . flags . rv +endfunction + "FUNCTION: TreeDirNode.findNode(path) {{{1 "Will find one of the children (recursively) that has the given path " @@ -98,6 +114,33 @@ function! s:TreeDirNode.findNode(path) return {} endfunction +"FUNCTION: TreeDirNode.getCascade() {{{1 +"Return an array of dir nodes (starting from self) that can be cascade opened. +function! s:TreeDirNode.getCascade() + + let rv = [self] + let node = self + + while 1 + let vc = node.getVisibleChildren() + if len(vc) != 1 + break + endif + + let visChild = vc[0] + + "TODO: optimize + if !visChild.path.isDirectory + break + endif + + call add(rv, visChild) + let node = visChild + endwhile + + return rv +endfunction + "FUNCTION: TreeDirNode.getChildCount() {{{1 "Returns the number of children this node has function! s:TreeDirNode.getChildCount() @@ -171,6 +214,12 @@ function! s:TreeDirNode.getChildIndex(path) return -1 endfunction +"FUNCTION: TreeDirNode.getDirChildren() {{{1 +"Get all children that are directories +function! s:TreeDirNode.getDirChildren() + return filter(self.children, 'v:val.path.isDirectory == 1') +endfunction + "FUNCTION: TreeDirNode.GetSelected() {{{1 "Returns the current node if it is a dir node, or else returns the current "nodes parent @@ -199,7 +248,7 @@ endfunction function! s:TreeDirNode.getVisibleChildren() let toReturn = [] for i in self.children - if i.path.ignore() ==# 0 + if i.path.ignore(self.getNerdtree()) ==# 0 call add(toReturn, i) endif endfor @@ -212,6 +261,13 @@ function! s:TreeDirNode.hasVisibleChildren() return self.getVisibleChildCount() != 0 endfunction +"FUNCTION: TreeDirNode.isCascadable() {{{1 +"true if this dir has only one visible child - which is also a dir +function! s:TreeDirNode.isCascadable() + let c = self.getVisibleChildren() + return len(c) == 1 && c[0].path.isDirectory +endfunction + "FUNCTION: TreeDirNode._initChildren() {{{1 "Removes all childen from this node and re-reads them " @@ -244,19 +300,15 @@ function! s:TreeDirNode._initChildren(silent) for i in files "filter out the .. and . directories - "Note: we must match .. AND ../ cos sometimes the globpath returns + "Note: we must match .. AND ../ since sometimes the globpath returns "../ for path with strange chars (eg $) -" if i !~# '\/\.\.\/\?$' && i !~# '\/\.\/\?$' -" - " Regular expression is too expensive. Use simply string comparison - " instead - if i[len(i)-3:2] != ".." && i[len(i)-2:2] != ".." && + if i[len(i)-3:2] != ".." && i[len(i)-2:2] != ".." && \ i[len(i)-2:1] != "." && i[len(i)-1] != "." "put the next file in a new node and attach it try let path = g:NERDTreePath.New(i) call self.createChild(path, 0) - call g:NERDTreePathNotifier.NotifyListeners('init', path, {}) + call g:NERDTreePathNotifier.NotifyListeners('init', path, self.getNerdtree(), {}) catch /^NERDTree.\(InvalidArguments\|InvalidFiletype\)Error/ let invalidFilesFound += 1 endtry @@ -275,13 +327,13 @@ function! s:TreeDirNode._initChildren(silent) return self.getChildCount() endfunction -"FUNCTION: TreeDirNode.New(path) {{{1 +"FUNCTION: TreeDirNode.New(path, nerdtree) {{{1 "Returns a new TreeNode object with the given path and parent " "Args: -"path: a path object representing the full filesystem path to the file/dir that the node represents -unlet s:TreeDirNode.New -function! s:TreeDirNode.New(path) +"path: dir that the node represents +"nerdtree: the tree the node belongs to +function! s:TreeDirNode.New(path, nerdtree) if a:path.isDirectory != 1 throw "NERDTree.InvalidArgumentsError: A TreeDirNode object must be instantiated with a directory Path object." endif @@ -293,6 +345,7 @@ function! s:TreeDirNode.New(path) let newTreeNode.children = [] let newTreeNode.parent = {} + let newTreeNode._nerdtree = a:nerdtree return newTreeNode endfunction @@ -356,7 +409,7 @@ endfunction "FUNCTION: TreeDirNode._openInNewTab() {{{1 function! s:TreeDirNode._openInNewTab() tabnew - call g:NERDTreeCreator.CreatePrimary(self.path.str()) + call g:NERDTreeCreator.CreateTabTree(self.path.str()) endfunction "FUNCTION: TreeDirNode.openRecursively() {{{1 @@ -377,7 +430,7 @@ endfunction "Args: "forceOpen: 1 if this node should be opened regardless of file filters function! s:TreeDirNode._openRecursively2(forceOpen) - if self.path.ignore() ==# 0 || a:forceOpen + if self.path.ignore(self.getNerdtree()) ==# 0 || a:forceOpen let self.isOpen = 1 if self.children ==# [] call self._initChildren(1) @@ -394,7 +447,7 @@ endfunction "FUNCTION: TreeDirNode.refresh() {{{1 unlet s:TreeDirNode.refresh function! s:TreeDirNode.refresh() - call self.path.refresh() + call self.path.refresh(self.getNerdtree()) "if this node was ever opened, refresh its children if self.isOpen || !empty(self.children) @@ -425,7 +478,7 @@ function! s:TreeDirNode.refresh() "the node doesnt exist so create it else - let newNode = g:NERDTreeFileNode.New(path) + let newNode = g:NERDTreeFileNode.New(path, self.getNerdtree()) let newNode.parent = self call add(newChildNodes, newNode) endif @@ -450,7 +503,7 @@ endfunction "FUNCTION: TreeDirNode.refreshFlags() {{{1 unlet s:TreeDirNode.refreshFlags function! s:TreeDirNode.refreshFlags() - call self.path.refreshFlags() + call self.path.refreshFlags(self.getNerdtree()) for i in self.children call i.refreshFlags() endfor @@ -458,13 +511,16 @@ endfunction "FUNCTION: TreeDirNode.refreshDirFlags() {{{1 function! s:TreeDirNode.refreshDirFlags() - call self.path.refreshFlags() + call self.path.refreshFlags(self.getNerdtree()) endfunction "FUNCTION: TreeDirNode.reveal(path) {{{1 "reveal the given path, i.e. cache and open all treenodes needed to display it "in the UI -function! s:TreeDirNode.reveal(path) +"Returns the revealed node +function! s:TreeDirNode.reveal(path, ...) + let opts = a:0 ? a:1 : {} + if !a:path.isUnder(self.path) throw "NERDTree.InvalidArgumentsError: " . a:path.str() . " should be under " . self.path.str() endif @@ -473,9 +529,10 @@ function! s:TreeDirNode.reveal(path) if self.path.equals(a:path.getParent()) let n = self.findNode(a:path) - call b:NERDTree.render() - call n.putCursorHere(1,0) - return + if has_key(opts, "open") + call n.open() + endif + return n endif let p = a:path @@ -484,7 +541,7 @@ function! s:TreeDirNode.reveal(path) endwhile let n = self.findNode(p) - call n.reveal(a:path) + return n.reveal(a:path, opts) endfunction "FUNCTION: TreeDirNode.removeChild(treenode) {{{1 diff --git a/sources_non_forked/nerdtree/lib/nerdtree/tree_file_node.vim b/sources_non_forked/nerdtree/lib/nerdtree/tree_file_node.vim index b4924d78..adb0e96b 100644 --- a/sources_non_forked/nerdtree/lib/nerdtree/tree_file_node.vim +++ b/sources_non_forked/nerdtree/lib/nerdtree/tree_file_node.vim @@ -19,7 +19,7 @@ function! s:TreeFileNode.bookmark(name) "it so we can update its display string let oldMarkedNode = {} try - let oldMarkedNode = g:NERDTreeBookmark.GetNodeForName(a:name, 1) + let oldMarkedNode = g:NERDTreeBookmark.GetNodeForName(a:name, 1, self.getNerdtree()) catch /^NERDTree.BookmarkNotFoundError/ catch /^NERDTree.BookmarkedNodeNotFoundError/ endtry @@ -41,7 +41,7 @@ function! s:TreeFileNode.cacheParent() if parentPath.equals(self.path) throw "NERDTree.CannotCacheParentError: already at root" endif - let self.parent = s:TreeFileNode.New(parentPath) + let self.parent = s:TreeFileNode.New(parentPath, self.getNerdtree()) endif endfunction @@ -59,7 +59,7 @@ endfunction function! s:TreeFileNode.copy(dest) call self.path.copy(a:dest) let newPath = g:NERDTreePath.New(a:dest) - let parent = b:NERDTreeRoot.findNode(newPath.getParent()) + let parent = self.getNerdtree().root.findNode(newPath.getParent()) if !empty(parent) call parent.refresh() return parent.findNode(newPath) @@ -83,7 +83,7 @@ endfunction "Return: "a string that can be used in the view to represent this node function! s:TreeFileNode.displayString() - return self.path.displayString() + return self.path.flagSet.renderToString() . self.path.displayString() endfunction "FUNCTION: TreeFileNode.equals(treenode) {{{1 @@ -165,7 +165,7 @@ function! s:TreeFileNode.findSibling(direction) "if the next node is not an ignored node (i.e. wont show up in the "view) then return it - if self.parent.children[siblingIndx].path.ignore() ==# 0 + if self.parent.children[siblingIndx].path.ignore(self.getNerdtree()) ==# 0 return self.parent.children[siblingIndx] endif @@ -178,11 +178,16 @@ function! s:TreeFileNode.findSibling(direction) return {} endfunction +"FUNCTION: TreeFileNode.getNerdtree(){{{1 +function! s:TreeFileNode.getNerdtree() + return self._nerdtree +endfunction + "FUNCTION: TreeFileNode.GetRootForTab(){{{1 "get the root node for this tab function! s:TreeFileNode.GetRootForTab() if g:NERDTree.ExistsForTab() - return getbufvar(t:NERDTreeBufName, 'NERDTreeRoot') + return getbufvar(t:NERDTreeBufName, 'NERDTree').root end return {} endfunction @@ -195,7 +200,7 @@ function! s:TreeFileNode.GetSelected() if path ==# {} return {} endif - return b:NERDTreeRoot.findNode(path) + return b:NERDTree.root.findNode(path) catch /^NERDTree/ return {} endtry @@ -205,51 +210,32 @@ endfunction "returns 1 if this node should be visible according to the tree filters and "hidden file filters (and their on/off status) function! s:TreeFileNode.isVisible() - return !self.path.ignore() + return !self.path.ignore(self.getNerdtree()) endfunction "FUNCTION: TreeFileNode.isRoot() {{{1 -"returns 1 if this node is b:NERDTreeRoot function! s:TreeFileNode.isRoot() if !g:NERDTree.ExistsForBuf() throw "NERDTree.NoTreeError: No tree exists for the current buffer" endif - return self.equals(b:NERDTreeRoot) + return self.equals(self.getNerdtree().root) endfunction -"FUNCTION: TreeFileNode.makeRoot() {{{1 -"Make this node the root of the tree -function! s:TreeFileNode.makeRoot() - if self.path.isDirectory - let b:NERDTreeRoot = self - else - call self.cacheParent() - let b:NERDTreeRoot = self.parent - endif - - call b:NERDTreeRoot.open() - - "change dir to the dir of the new root if instructed to - if g:NERDTreeChDirMode ==# 2 - exec "cd " . b:NERDTreeRoot.path.str({'format': 'Edit'}) - endif - - silent doautocmd User NERDTreeNewRoot -endfunction - -"FUNCTION: TreeFileNode.New(path) {{{1 +"FUNCTION: TreeFileNode.New(path, nerdtree) {{{1 "Returns a new TreeNode object with the given path and parent " "Args: -"path: a path object representing the full filesystem path to the file/dir that the node represents -function! s:TreeFileNode.New(path) +"path: file/dir that the node represents +"nerdtree: the tree the node belongs to +function! s:TreeFileNode.New(path, nerdtree) if a:path.isDirectory - return g:NERDTreeDirNode.New(a:path) + return g:NERDTreeDirNode.New(a:path, a:nerdtree) else let newTreeNode = copy(self) let newTreeNode.path = a:path let newTreeNode.parent = {} + let newTreeNode._nerdtree = a:nerdtree return newTreeNode endif endfunction @@ -289,7 +275,7 @@ endfunction "recurseUpward: try to put the cursor on the parent if the this node isnt "visible function! s:TreeFileNode.putCursorHere(isJump, recurseUpward) - let ln = b:NERDTree.ui.getLineNum(self) + let ln = self.getNerdtree().ui.getLineNum(self) if ln != -1 if a:isJump mark ' @@ -298,11 +284,11 @@ function! s:TreeFileNode.putCursorHere(isJump, recurseUpward) else if a:recurseUpward let node = self - while node != {} && b:NERDTree.ui.getLineNum(node) ==# -1 + while node != {} && self.getNerdtree().ui.getLineNum(node) ==# -1 let node = node.parent call node.open() endwhile - call b:NERDTree.render() + call self._nerdtree.render() call node.putCursorHere(a:isJump, 0) endif endif @@ -310,12 +296,12 @@ endfunction "FUNCTION: TreeFileNode.refresh() {{{1 function! s:TreeFileNode.refresh() - call self.path.refresh() + call self.path.refresh(self.getNerdtree()) endfunction "FUNCTION: TreeFileNode.refreshFlags() {{{1 function! s:TreeFileNode.refreshFlags() - call self.path.refreshFlags() + call self.path.refreshFlags(self.getNerdtree()) endfunction "FUNCTION: TreeFileNode.rename() {{{1 @@ -326,7 +312,7 @@ function! s:TreeFileNode.rename(newName) call self.parent.removeChild(self) let parentPath = self.path.getParent() - let newParent = b:NERDTreeRoot.findNode(parentPath) + let newParent = self.getNerdtree().root.findNode(parentPath) if newParent != {} call newParent.createChild(self.path, 1) @@ -337,70 +323,24 @@ endfunction "FUNCTION: TreeFileNode.renderToString {{{1 "returns a string representation for this tree to be rendered in the view function! s:TreeFileNode.renderToString() - return self._renderToString(0, 0, [], self.getChildCount() ==# 1) + return self._renderToString(0, 0) endfunction "Args: "depth: the current depth in the tree for this call "drawText: 1 if we should actually draw the line for this node (if 0 then the "child nodes are rendered only) -"vertMap: a binary array that indicates whether a vertical bar should be draw "for each depth in the tree -"isLastChild:true if this curNode is the last child of its parent -function! s:TreeFileNode._renderToString(depth, drawText, vertMap, isLastChild) +function! s:TreeFileNode._renderToString(depth, drawText) let output = "" if a:drawText ==# 1 - let treeParts = '' + let treeParts = repeat(' ', a:depth - 1) - "get all the leading spaces and vertical tree parts for this line - if a:depth > 1 - for j in a:vertMap[0:-2] - if g:NERDTreeDirArrows - let treeParts = treeParts . ' ' - else - if j ==# 1 - let treeParts = treeParts . '| ' - else - let treeParts = treeParts . ' ' - endif - endif - endfor + if !self.path.isDirectory + let treeParts = treeParts . ' ' endif - "get the last vertical tree part for this line which will be different - "if this node is the last child of its parent - if !g:NERDTreeDirArrows - if a:isLastChild - let treeParts = treeParts . '`' - else - let treeParts = treeParts . '|' - endif - endif - - "smack the appropriate dir/file symbol on the line before the file/dir - "name itself - if self.path.isDirectory - if self.isOpen - if g:NERDTreeDirArrows - let treeParts = treeParts . '▾ ' - else - let treeParts = treeParts . '~' - endif - else - if g:NERDTreeDirArrows - let treeParts = treeParts . '▸ ' - else - let treeParts = treeParts . '+' - endif - endif - else - if g:NERDTreeDirArrows - let treeParts = treeParts . ' ' - else - let treeParts = treeParts . '-' - endif - endif let line = treeParts . self.displayString() let output = output . line . "\n" @@ -410,18 +350,15 @@ function! s:TreeFileNode._renderToString(depth, drawText, vertMap, isLastChild) if self.path.isDirectory ==# 1 && self.isOpen ==# 1 let childNodesToDraw = self.getVisibleChildren() - if len(childNodesToDraw) > 0 - "draw all the nodes children except the last - let lastIndx = len(childNodesToDraw)-1 - if lastIndx > 0 - for i in childNodesToDraw[0:lastIndx-1] - let output = output . i._renderToString(a:depth + 1, 1, add(copy(a:vertMap), 1), 0) - endfor - endif + if self.isCascadable() && a:depth > 0 - "draw the last child, indicating that it IS the last - let output = output . childNodesToDraw[lastIndx]._renderToString(a:depth + 1, 1, add(copy(a:vertMap), 0), 1) + let output = output . childNodesToDraw[0]._renderToString(a:depth, 0) + + elseif len(childNodesToDraw) > 0 + for i in childNodesToDraw + let output = output . i._renderToString(a:depth + 1, 1) + endfor endif endif diff --git a/sources_non_forked/nerdtree/lib/nerdtree/ui.vim b/sources_non_forked/nerdtree/lib/nerdtree/ui.vim index 22e450c8..1ad44698 100644 --- a/sources_non_forked/nerdtree/lib/nerdtree/ui.vim +++ b/sources_non_forked/nerdtree/lib/nerdtree/ui.vim @@ -21,18 +21,18 @@ endfunction "prints out the quick help function! s:UI._dumpHelp() let old_h = @h - if b:treeShowHelp ==# 1 + if self.getShowHelp() let @h= "\" NERD tree (" . nerdtree#version() . ") quickhelp~\n" let @h=@h."\" ============================\n" let @h=@h."\" File node mappings~\n" let @h=@h."\" ". (g:NERDTreeMouseMode ==# 3 ? "single" : "double") ."-click,\n" let @h=@h."\" ,\n" - if b:NERDTreeType ==# "primary" + if self.nerdtree.isTabTree() let @h=@h."\" ". g:NERDTreeMapActivateNode .": open in prev window\n" else let @h=@h."\" ". g:NERDTreeMapActivateNode .": open in current window\n" endif - if b:NERDTreeType ==# "primary" + if self.nerdtree.isTabTree() let @h=@h."\" ". g:NERDTreeMapPreview .": preview\n" endif let @h=@h."\" ". g:NERDTreeMapOpenInTab.": open in new tab\n" @@ -87,10 +87,10 @@ function! s:UI._dumpHelp() let @h=@h."\"\n\" ----------------------------\n" let @h=@h."\" Tree filtering mappings~\n" - let @h=@h."\" ". g:NERDTreeMapToggleHidden .": hidden files (" . (b:NERDTreeShowHidden ? "on" : "off") . ")\n" - let @h=@h."\" ". g:NERDTreeMapToggleFilters .": file filters (" . (b:NERDTreeIgnoreEnabled ? "on" : "off") . ")\n" - let @h=@h."\" ". g:NERDTreeMapToggleFiles .": files (" . (b:NERDTreeShowFiles ? "on" : "off") . ")\n" - let @h=@h."\" ". g:NERDTreeMapToggleBookmarks .": bookmarks (" . (b:NERDTreeShowBookmarks ? "on" : "off") . ")\n" + let @h=@h."\" ". g:NERDTreeMapToggleHidden .": hidden files (" . (self.getShowHidden() ? "on" : "off") . ")\n" + let @h=@h."\" ". g:NERDTreeMapToggleFilters .": file filters (" . (self.isIgnoreFilterEnabled() ? "on" : "off") . ")\n" + let @h=@h."\" ". g:NERDTreeMapToggleFiles .": files (" . (self.getShowFiles() ? "on" : "off") . ")\n" + let @h=@h."\" ". g:NERDTreeMapToggleBookmarks .": bookmarks (" . (self.getShowBookmarks() ? "on" : "off") . ")\n" "add quickhelp entries for each custom key map let @h=@h."\"\n\" ----------------------------\n" @@ -116,7 +116,7 @@ function! s:UI._dumpHelp() let @h=@h."\" :ClearBookmarks []\n" let @h=@h."\" :ClearAllBookmarks\n" silent! put h - elseif g:NERDTreeMinimalUI == 0 + elseif !self.isMinimal() let @h="\" Press ". g:NERDTreeMapHelp ." for help\n" silent! put h endif @@ -129,6 +129,12 @@ endfunction function! s:UI.New(nerdtree) let newObj = copy(self) let newObj.nerdtree = a:nerdtree + let newObj._showHelp = 0 + let newObj._ignoreEnabled = 1 + let newObj._showFiles = g:NERDTreeShowFiles + let newObj._showHidden = g:NERDTreeShowHidden + let newObj._showBookmarks = g:NERDTreeShowBookmarks + return newObj endfunction @@ -149,18 +155,11 @@ function! s:UI.getPath(ln) "check to see if we have the root node if a:ln == rootLine - return b:NERDTreeRoot.path - endif - - if !g:NERDTreeDirArrows - " in case called from outside the tree - if line !~# '^ *[|`▸▾ ]' || line =~# '^$' - return {} - endif + return self.nerdtree.root.path endif if line ==# s:UI.UpDirLine() - return b:NERDTreeRoot.path.getParent() + return self.nerdtree.root.path.getParent() endif let indent = self._indentLevelFor(line) @@ -183,7 +182,7 @@ function! s:UI.getPath(ln) "have we reached the top of the tree? if lnum == rootLine - let dir = b:NERDTreeRoot.path.str({'format': 'UI'}) . dir + let dir = self.nerdtree.root.path.str({'format': 'UI'}) . dir break endif if curLineStripped =~# '/$' @@ -196,7 +195,7 @@ function! s:UI.getPath(ln) endif endif endwhile - let curFile = b:NERDTreeRoot.path.drive . dir . curFile + let curFile = self.nerdtree.root.path.drive . dir . curFile let toReturn = g:NERDTreePath.New(curFile) return toReturn endfunction @@ -206,19 +205,19 @@ endfunction function! s:UI.getLineNum(file_node) "if the node is the root then return the root line no. if a:file_node.isRoot() - return b:NERDTree.ui.getRootLineNum() + return self.getRootLineNum() endif let totalLines = line("$") "the path components we have matched so far - let pathcomponents = [substitute(b:NERDTreeRoot.path.str({'format': 'UI'}), '/ *$', '', '')] + let pathcomponents = [substitute(self.nerdtree.root.path.str({'format': 'UI'}), '/ *$', '', '')] "the index of the component we are searching for let curPathComponent = 1 let fullpath = a:file_node.path.str({'format': 'UI'}) - let lnum = b:NERDTree.ui.getRootLineNum() + let lnum = self.getRootLineNum() while lnum > 0 let lnum = lnum + 1 "have we reached the bottom of the tree? @@ -259,15 +258,33 @@ function! s:UI.getRootLineNum() return rootLine endfunction +"FUNCTION: s:UI.getShowBookmarks() {{{1 +function! s:UI.getShowBookmarks() + return self._showBookmarks +endfunction + +"FUNCTION: s:UI.getShowFiles() {{{1 +function! s:UI.getShowFiles() + return self._showFiles +endfunction + +"FUNCTION: s:UI.getShowHelp() {{{1 +function! s:UI.getShowHelp() + return self._showHelp +endfunction + +"FUNCTION: s:UI.getShowHidden() {{{1 +function! s:UI.getShowHidden() + return self._showHidden +endfunction + "FUNCTION: s:UI._indentLevelFor(line) {{{1 function! s:UI._indentLevelFor(line) - let level = match(a:line, '[^ \-+~▸▾`|]') / s:UI.IndentWid() - " check if line includes arrows - if match(a:line, '[▸▾]') > -1 - " decrement level as arrow uses 3 ascii chars - let level = level - 1 - endif - return level + "have to do this work around because match() returns bytes, not chars + let numLeadBytes = match(a:line, '\M\[^ '.g:NERDTreeDirArrowExpandable.g:NERDTreeDirArrowCollapsible.']') + let leadChars = strchars(a:line[0:numLeadBytes-1]) + + return leadChars / s:UI.IndentWid() endfunction "FUNCTION: s:UI.IndentWid() {{{1 @@ -275,19 +292,25 @@ function! s:UI.IndentWid() return 2 endfunction +"FUNCTION: s:UI.isIgnoreFilterEnabled() {{{1 +function! s:UI.isIgnoreFilterEnabled() + return self._ignoreEnabled == 1 +endfunction + +"FUNCTION: s:UI.isMinimal() {{{1 +function! s:UI.isMinimal() + return g:NERDTreeMinimalUI +endfunction + "FUNCTION: s:UI.MarkupReg() {{{1 function! s:UI.MarkupReg() - if g:NERDTreeDirArrows - return '^\([▾▸] \| \+[▾▸] \| \+\)' - endif - - return '^[ `|]*[\-+~]' + return '^\(['.g:NERDTreeDirArrowExpandable.g:NERDTreeDirArrowCollapsible.'] \| \+['.g:NERDTreeDirArrowExpandable.g:NERDTreeDirArrowCollapsible.'] \| \+\)' endfunction "FUNCTION: s:UI._renderBookmarks {{{1 function! s:UI._renderBookmarks() - if g:NERDTreeMinimalUI == 0 + if !self.isMinimal() call setline(line(".")+1, ">----------Bookmarks----------") call cursor(line(".")+1, col(".")) endif @@ -334,6 +357,11 @@ function! s:UI.saveScreenState() call nerdtree#exec(win . "wincmd w") endfunction +"FUNCTION: s:UI.setShowHidden(val) {{{1 +function! s:UI.setShowHidden(val) + let self._showHidden = a:val +endfunction + "FUNCTION: s:UI._stripMarkup(line, removeLeadingSpaces){{{1 "returns the given line with all the tree parts stripped off " @@ -390,29 +418,29 @@ function! s:UI.render() call self._dumpHelp() "delete the blank line before the help and add one after it - if g:NERDTreeMinimalUI == 0 + if !self.isMinimal() call setline(line(".")+1, "") call cursor(line(".")+1, col(".")) endif - if b:NERDTreeShowBookmarks + if self.getShowBookmarks() call self._renderBookmarks() endif "add the 'up a dir' line - if !g:NERDTreeMinimalUI + if !self.isMinimal() call setline(line(".")+1, s:UI.UpDirLine()) call cursor(line(".")+1, col(".")) endif "draw the header line - let header = b:NERDTreeRoot.path.str({'format': 'UI', 'truncateTo': winwidth(0)}) + let header = self.nerdtree.root.path.str({'format': 'UI', 'truncateTo': winwidth(0)}) call setline(line(".")+1, header) call cursor(line(".")+1, col(".")) "draw the tree let old_o = @o - let @o = b:NERDTreeRoot.renderToString() + let @o = self.nerdtree.root.renderToString() silent put o let @o = old_o @@ -443,47 +471,52 @@ function! s:UI.renderViewSavingPosition() let currentNode = currentNode.parent endwhile - call b:NERDTree.render() + call self.render() if currentNode != {} call currentNode.putCursorHere(0, 0) endif endfunction +"FUNCTION: s:UI.toggleHelp() {{{1 +function! s:UI.toggleHelp() + let self._showHelp = !self._showHelp +endfunction + " FUNCTION: s:UI.toggleIgnoreFilter() {{{1 " toggles the use of the NERDTreeIgnore option function! s:UI.toggleIgnoreFilter() - let b:NERDTreeIgnoreEnabled = !b:NERDTreeIgnoreEnabled - call b:NERDTree.ui.renderViewSavingPosition() - call b:NERDTree.ui.centerView() + let self._ignoreEnabled = !self._ignoreEnabled + call self.renderViewSavingPosition() + call self.centerView() endfunction " FUNCTION: s:UI.toggleShowBookmarks() {{{1 " toggles the display of bookmarks function! s:UI.toggleShowBookmarks() - let b:NERDTreeShowBookmarks = !b:NERDTreeShowBookmarks - if b:NERDTreeShowBookmarks - call b:NERDTree.render() + let self._showBookmarks = !self._showBookmarks + if self.getShowBookmarks() + call self.nerdtree.render() call g:NERDTree.CursorToBookmarkTable() else - call b:NERDTree.ui.renderViewSavingPosition() + call self.renderViewSavingPosition() endif - call b:NERDTree.ui.centerView() + call self.centerView() endfunction " FUNCTION: s:UI.toggleShowFiles() {{{1 " toggles the display of hidden files function! s:UI.toggleShowFiles() - let b:NERDTreeShowFiles = !b:NERDTreeShowFiles - call b:NERDTree.ui.renderViewSavingPosition() - call b:NERDTree.ui.centerView() + let self._showFiles = !self._showFiles + call self.renderViewSavingPosition() + call self.centerView() endfunction " FUNCTION: s:UI.toggleShowHidden() {{{1 " toggles the display of hidden files function! s:UI.toggleShowHidden() - let b:NERDTreeShowHidden = !b:NERDTreeShowHidden - call b:NERDTree.ui.renderViewSavingPosition() + let self._showHidden = !self._showHidden + call self.renderViewSavingPosition() call self.centerView() endfunction diff --git a/sources_non_forked/nerdtree/nerdtree_plugin/exec_menuitem.vim b/sources_non_forked/nerdtree/nerdtree_plugin/exec_menuitem.vim index e7a7c532..c53650a5 100644 --- a/sources_non_forked/nerdtree/nerdtree_plugin/exec_menuitem.vim +++ b/sources_non_forked/nerdtree/nerdtree_plugin/exec_menuitem.vim @@ -2,7 +2,6 @@ " File: exec_menuitem.vim " Description: plugin for NERD Tree that provides an execute file menu item " Maintainer: Martin Grenfell -" Last Change: 22 July, 2009 " License: This program is free software. It comes without any warranty, " to the extent permitted by applicable law. You can redistribute " it and/or modify it under the terms of the Do What The Fuck You diff --git a/sources_non_forked/nerdtree/nerdtree_plugin/fs_menu.vim b/sources_non_forked/nerdtree/nerdtree_plugin/fs_menu.vim index e99a85be..20a9fcd3 100644 --- a/sources_non_forked/nerdtree/nerdtree_plugin/fs_menu.vim +++ b/sources_non_forked/nerdtree/nerdtree_plugin/fs_menu.vim @@ -2,7 +2,6 @@ " File: fs_menu.vim " Description: plugin for the NERD Tree that provides a file system menu " Maintainer: Martin Grenfell -" Last Change: 17 July, 2009 " License: This program is free software. It comes without any warranty, " to the extent permitted by applicable law. You can redistribute " it and/or modify it under the terms of the Do What The Fuck You @@ -24,7 +23,7 @@ call NERDTreeAddMenuItem({'text': '(a)dd a childnode', 'shortcut': 'a', 'callbac call NERDTreeAddMenuItem({'text': '(m)ove the current node', 'shortcut': 'm', 'callback': 'NERDTreeMoveNode'}) call NERDTreeAddMenuItem({'text': '(d)elete the current node', 'shortcut': 'd', 'callback': 'NERDTreeDeleteNode'}) -if has("gui_mac") || has("gui_macvim") +if has("gui_mac") || has("gui_macvim") || has("mac") call NERDTreeAddMenuItem({'text': '(r)eveal in Finder the current node', 'shortcut': 'r', 'callback': 'NERDTreeRevealInFinder'}) call NERDTreeAddMenuItem({'text': '(o)pen the current node with system editor', 'shortcut': 'o', 'callback': 'NERDTreeExecuteFile'}) call NERDTreeAddMenuItem({'text': '(q)uicklook the current node', 'shortcut': 'q', 'callback': 'NERDTreeQuickLook'}) @@ -34,18 +33,11 @@ if g:NERDTreePath.CopyingSupported() call NERDTreeAddMenuItem({'text': '(c)opy the current node', 'shortcut': 'c', 'callback': 'NERDTreeCopyNode'}) endif -"FUNCTION: s:echo(msg){{{1 -function! s:echo(msg) - redraw - echomsg "NERDTree: " . a:msg -endfunction - -"FUNCTION: s:echoWarning(msg){{{1 -function! s:echoWarning(msg) - echohl warningmsg - call s:echo(a:msg) - echohl normal -endfunction +if has("unix") || has("osx") + call NERDTreeAddMenuItem({'text': '(l)ist the current node', 'shortcut': 'l', 'callback': 'NERDTreeListNode'}) +else + call NERDTreeAddMenuItem({'text': '(l)ist the current node', 'shortcut': 'l', 'callback': 'NERDTreeListNodeWin32'}) +endif "FUNCTION: s:promptToDelBuffer(bufnum, msg){{{1 "prints out the given msg and, if the user responds by pushing 'y' then the @@ -107,17 +99,17 @@ function! NERDTreeAddNode() \ "", curDirNode.path.str() . g:NERDTreePath.Slash(), "file") if newNodeName ==# '' - call s:echo("Node Creation Aborted.") + call nerdtree#echo("Node Creation Aborted.") return endif try let newPath = g:NERDTreePath.Create(newNodeName) - let parentNode = b:NERDTreeRoot.findNode(newPath.getParent()) + let parentNode = b:NERDTree.root.findNode(newPath.getParent()) - let newTreeNode = g:NERDTreeFileNode.New(newPath) + let newTreeNode = g:NERDTreeFileNode.New(newPath, b:NERDTree) if empty(parentNode) - call b:NERDTreeRoot.refresh() + call b:NERDTree.root.refresh() call b:NERDTree.render() elseif parentNode.isOpen || !empty(parentNode.children) call parentNode.addChild(newTreeNode, 1) @@ -125,7 +117,7 @@ function! NERDTreeAddNode() call newTreeNode.putCursorHere(1, 0) endif catch /^NERDTree/ - call s:echoWarning("Node Not Created.") + call nerdtree#echoWarning("Node Not Created.") endtry endfunction @@ -138,7 +130,7 @@ function! NERDTreeMoveNode() \ "", curNode.path.str(), "file") if newNodePath ==# '' - call s:echo("Node Renaming Aborted.") + call nerdtree#echo("Node Renaming Aborted.") return endif @@ -159,7 +151,7 @@ function! NERDTreeMoveNode() redraw catch /^NERDTree/ - call s:echoWarning("Node Not Renamed.") + call nerdtree#echoWarning("Node Not Renamed.") endtry endfunction @@ -199,10 +191,33 @@ function! NERDTreeDeleteNode() redraw catch /^NERDTree/ - call s:echoWarning("Could not remove node") + call nerdtree#echoWarning("Could not remove node") endtry else - call s:echo("delete aborted") + call nerdtree#echo("delete aborted") + endif + +endfunction + +" FUNCTION: NERDTreeListNode() {{{1 +function! NERDTreeListNode() + let treenode = g:NERDTreeFileNode.GetSelected() + if treenode != {} + let metadata = split(system('ls -ld ' . shellescape(treenode.path.str())), '\n') + call nerdtree#echo(metadata[0]) + else + call nerdtree#echo("No information avaialable") + endif +endfunction + +" FUNCTION: NERDTreeListNodeWin32() {{{1 +function! NERDTreeListNodeWin32() + let treenode = g:NERDTreeFileNode.GetSelected() + if treenode != {} + let metadata = split(system('DIR /Q ' . shellescape(treenode.path.str()) . ' | FINDSTR "^[012][0-9]/[0-3][0-9]/[12][0-9][0-9][0-9]"'), '\n') + call nerdtree#echo(metadata[0]) + else + call nerdtree#echo("No information avaialable") endif endfunction @@ -221,7 +236,7 @@ function! NERDTreeCopyNode() let confirmed = 1 if currentNode.path.copyingWillOverwrite(newNodePath) - call s:echo("Warning: copying may overwrite files! Continue? (yN)") + call nerdtree#echo("Warning: copying may overwrite files! Continue? (yN)") let choice = nr2char(getchar()) let confirmed = choice ==# 'y' endif @@ -230,22 +245,23 @@ function! NERDTreeCopyNode() try let newNode = currentNode.copy(newNodePath) if empty(newNode) - call b:NERDTreeRoot.refresh() + call b:NERDTree.root.refresh() call b:NERDTree.render() else call NERDTreeRender() call newNode.putCursorHere(0, 0) endif catch /^NERDTree/ - call s:echoWarning("Could not copy node") + call nerdtree#echoWarning("Could not copy node") endtry endif else - call s:echo("Copy aborted.") + call nerdtree#echo("Copy aborted.") endif redraw endfunction +" FUNCTION: NERDTreeQuickLook() {{{1 function! NERDTreeQuickLook() let treenode = g:NERDTreeFileNode.GetSelected() if treenode != {} @@ -253,18 +269,19 @@ function! NERDTreeQuickLook() endif endfunction +" FUNCTION: NERDTreeRevealInFinder() {{{1 function! NERDTreeRevealInFinder() let treenode = g:NERDTreeFileNode.GetSelected() if treenode != {} - let x = system("open -R '" . treenode.path.str() . "'") + call system("open -R '" . treenode.path.str() . "'") endif endfunction +" FUNCTION: NERDTreeExecuteFile() {{{1 function! NERDTreeExecuteFile() let treenode = g:NERDTreeFileNode.GetSelected() if treenode != {} - let x = system("open '" . treenode.path.str() . "'") + call system("open '" . treenode.path.str() . "'") endif endfunction - " vim: set sw=4 sts=4 et fdm=marker: diff --git a/sources_non_forked/nerdtree/plugin/NERD_tree.vim b/sources_non_forked/nerdtree/plugin/NERD_tree.vim index 966838c3..bbcc55f6 100644 --- a/sources_non_forked/nerdtree/plugin/NERD_tree.vim +++ b/sources_non_forked/nerdtree/plugin/NERD_tree.vim @@ -1,8 +1,6 @@ " ============================================================================ " File: NERD_tree.vim -" Description: vim global plugin that provides a nice tree explorer " Maintainer: Martin Grenfell -" Last Change: 28 December, 2011 " License: This program is free software. It comes without any warranty, " to the extent permitted by applicable law. You can redistribute " it and/or modify it under the terms of the Do What The Fuck You @@ -67,7 +65,14 @@ call s:initVariable("g:NERDTreeShowFiles", 1) call s:initVariable("g:NERDTreeShowHidden", 0) call s:initVariable("g:NERDTreeShowLineNumbers", 0) call s:initVariable("g:NERDTreeSortDirs", 1) -call s:initVariable("g:NERDTreeDirArrows", !nerdtree#runningWindows()) + +if !nerdtree#runningWindows() + call s:initVariable("g:NERDTreeDirArrowExpandable", "▸") + call s:initVariable("g:NERDTreeDirArrowCollapsible", "▾") +else + call s:initVariable("g:NERDTreeDirArrowExpandable", "+") + call s:initVariable("g:NERDTreeDirArrowCollapsible", "~") +endif call s:initVariable("g:NERDTreeCascadeOpenSingleChildDir", 1) if !exists("g:NERDTreeSortOrder") @@ -83,8 +88,8 @@ if !exists('g:NERDTreeStatusline') "the exists() crap here is a hack to stop vim spazzing out when "loading a session that was created with an open nerd tree. It spazzes - "because it doesnt store b:NERDTreeRoot (its a b: var, and its a hash) - let g:NERDTreeStatusline = "%{exists('b:NERDTreeRoot')?b:NERDTreeRoot.path.str():''}" + "because it doesnt store b:NERDTree(its a b: var, and its a hash) + let g:NERDTreeStatusline = "%{exists('b:NERDTree')?b:NERDTree.root.path.str():''}" endif call s:initVariable("g:NERDTreeWinPos", "left") @@ -188,7 +193,7 @@ function! NERDTreeFocus() if g:NERDTree.IsOpen() call g:NERDTree.CursorToTreeWin() else - call g:NERDTreeCreator.TogglePrimary("") + call g:NERDTreeCreator.ToggleTabTree("") endif endfunction diff --git a/sources_non_forked/nerdtree/syntax/nerdtree.vim b/sources_non_forked/nerdtree/syntax/nerdtree.vim index 5f7b49cc..8a4e4245 100644 --- a/sources_non_forked/nerdtree/syntax/nerdtree.vim +++ b/sources_non_forked/nerdtree/syntax/nerdtree.vim @@ -22,42 +22,19 @@ syn match NERDTreeLinkDir #.*/ ->#me=e-3 containedin=NERDTreeDir "highlighing for directory nodes and file nodes syn match NERDTreeDirSlash #/# containedin=NERDTreeDir -if g:NERDTreeDirArrows - syn match NERDTreeClosable #▾# containedin=NERDTreeDir,NERDTreeFile - syn match NERDTreeOpenable #▸# containedin=NERDTreeDir,NERDTreeFile +exec 'syn match NERDTreeClosable #'.escape(g:NERDTreeDirArrowCollapsible, '~').'# containedin=NERDTreeDir,NERDTreeFile' +exec 'syn match NERDTreeOpenable #'.escape(g:NERDTreeDirArrowExpandable, '~').'# containedin=NERDTreeDir,NERDTreeFile' - syn match NERDTreeDir #[^▾▸ ].*/# - syn match NERDTreeExecFile #^ .*\*\($\| \)# contains=NERDTreeRO,NERDTreeBookmark - syn match NERDTreeFile #^[^"\.▾▸] *[^▾▸]*# contains=NERDTreeLink,NERDTreeRO,NERDTreeBookmark,NERDTreeExecFile +let s:dirArrows = escape(g:NERDTreeDirArrowCollapsible, '~').escape(g:NERDTreeDirArrowExpandable, '~') +exec 'syn match NERDTreeDir #[^'.s:dirArrows.' ].*/#' +syn match NERDTreeExecFile #^ .*\*\($\| \)# contains=NERDTreeRO,NERDTreeBookmark +exec 'syn match NERDTreeFile #^[^"\.'.s:dirArrows.'] *[^'.s:dirArrows.']*# contains=NERDTreeLink,NERDTreeRO,NERDTreeBookmark,NERDTreeExecFile' - "highlighting for readonly files - syn match NERDTreeRO # *\zs.*\ze \[RO\]# contains=NERDTreeIgnore,NERDTreeBookmark,NERDTreeFile +"highlighting for readonly files +syn match NERDTreeRO # *\zs.*\ze \[RO\]# contains=NERDTreeIgnore,NERDTreeBookmark,NERDTreeFile - syn match NERDTreeFlags #^ *\zs\[.\]# containedin=NERDTreeFile - syn match NERDTreeFlags #\[.\]# containedin=NERDTreeDir -else - "highlighting for the ~/+ symbols for the directory nodes - syn match NERDTreeClosable #\~\<# - syn match NERDTreeClosable #\~\.# - syn match NERDTreeOpenable #+\<# - syn match NERDTreeOpenable #+\.#he=e-1 - - "highlighting for the tree structural parts - syn match NERDTreePart #|# - syn match NERDTreePart #`# - syn match NERDTreePartFile #[|`]-#hs=s+1 contains=NERDTreePart - - syn match NERDTreeDir #[^-| `].*/# contains=NERDTreeLink,NERDTreeOpenable,NERDTreeClosable - syn match NERDTreeExecFile #[|` ].*\*\($\| \)# contains=NERDTreeLink,NERDTreePart,NERDTreePartFile,NERDTreeBookmark - syn match NERDTreeFile #|-.*# contains=NERDTreeLink,NERDTreePart,NERDTreePartFile,NERDTreeBookmark,NERDTreeExecFile - syn match NERDTreeFile #`-.*# contains=NERDTreeLink,NERDTreePart,NERDTreePartFile,NERDTreeBookmark,NERDTreeExecFile - - "highlighting for readonly files - syn match NERDTreeRO #|-.*\[RO\]#he=e-5 contains=NERDTreeIgnore,NERDTreeBookmark,NERDTreePart,NERDTreePartFile - - syn match NERDTreeFlags #-\[.\]# containedin=NERDTreeFile,NERDTreePartFile - syn match NERDTreeFlags #[+~]\zs\[.\]# containedin=NERDTreeDir -endif +syn match NERDTreeFlags #^ *\zs\[.\]# containedin=NERDTreeFile,NERDTreeExecFile +syn match NERDTreeFlags #\[.\]# containedin=NERDTreeDir syn match NERDTreeCWD #^[ diff --git a/sources_non_forked/syntastic/README.markdown b/sources_non_forked/syntastic/README.markdown index b9e08c4e..aa5d842f 100644 --- a/sources_non_forked/syntastic/README.markdown +++ b/sources_non_forked/syntastic/README.markdown @@ -35,7 +35,7 @@ 4.8. [How can I pass additional arguments to a checker?](#faqargs) 4.9. [Syntastic supports several checkers for my filetype - how do I tell which one(s) to use?](#faqcheckers) 4.10. [What is the difference between syntax checkers and style checkers?](#faqstyle) -4.11. [I have enabled multiple checkers for the current filetype. How can I display all of the errors from all of the checkers together?](#faqaggregate) +4.11. [I have enabled multiple checkers for the current filetype. How can I display all errors from all checkers together?](#faqaggregate) 4.12. [How can I jump between the different errors without using the location list at the bottom of the window?](#faqlnext) 4.13. [The error window is closed automatically when I :quit the current buffer but not when I :bdelete it?](#faqbdelete) 5. [Resources](#otherresources) @@ -53,22 +53,23 @@ are detected, the user is notified and is happy because they didn't have to compile their code or execute their script to find them. At the time of this writing, syntastic has checking plugins for ActionScript, -Ada, API Blueprint, AppleScript, AsciiDoc, ASM, BEMHTML, Bro, Bourne shell, C, -C++, C#, Cabal, Chef, CoffeeScript, Coco, Coq, CSS, Cucumber, CUDA, D, Dart, -DocBook, Dust, Elixir, Erlang, eRuby, Fortran, Gentoo metadata, GLSL, Go, Haml, -Haskell, Haxe, Handlebars, HSS, HTML, Java, JavaScript, JSON, JSX, LESS, Lex, -Limbo, LISP, LLVM intermediate language, Lua, Markdown, MATLAB, Mercury, NASM, -Nix, Objective-C, Objective-C++, OCaml, Perl, Perl POD, PHP, gettext Portable -Object, OS X and iOS property lists, Puppet, Python, R, Racket, Relax NG, -reStructuredText, RPM spec, Ruby, SASS/SCSS, Scala, Slim, SML, Sphinx, Tcl, -TeX, Texinfo, Twig, TypeScript, Vala, Verilog, VHDL, VimL, xHtml, XML, XSLT, +Ada, Ansible configurations, API Blueprint, AppleScript, AsciiDoc, ASM, +BEMHTML, Bro, Bourne shell, C, C++, C#, Cabal, Chef, CoffeeScript, Coco, Coq, +CSS, Cucumber, CUDA, D, Dart, DocBook, Dockerfile, Dust, Elixir, Erlang, +eRuby, Fortran, Gentoo metadata, GLSL, Go, Haml, Haskell, Haxe, Handlebars, +HSS, HTML, Jade, Java, JavaScript, JSON, JSX, LESS, Lex, Limbo, LISP, LLVM +intermediate language, Lua, Markdown, MATLAB, Mercury, NASM, Nix, Objective-C, +Objective-C++, OCaml, Perl, Perl POD, PHP, gettext Portable Object, OS X and +iOS property lists, Puppet, Python, QML, R, Racket, Relax NG, reStructuredText, +RPM spec, Ruby, SASS/SCSS, Scala, Slim, SML, Sphinx, SQL, Stylus, Tcl, TeX, +Texinfo, Twig, TypeScript, Vala, Verilog, VHDL, VimL, xHtml, XML, XSLT, XQuery, YACC, YAML, z80, Zope page templates, and zsh. See the [wiki][3] for details about the corresponding supported checkers. A number of third-party Vim plugins also provide checkers for syntastic, -for example: [omnisharp-vim][25], [rust.vim][12], [syntastic-extras][26], -[syntastic-more][27], [vim-crystal][29], [vim-eastwood][28], and -[vim-swift][24]. +for example: [merlin][30], [omnisharp-vim][25], [rust.vim][12], +[syntastic-extras][26], [syntastic-more][27], [vim-crystal][29], +[vim-eastwood][28], and [vim-swift][24]. Below is a screenshot showing the methods that Syntastic uses to display syntax errors. Note that, in practise, you will only have a subset of these methods @@ -159,10 +160,10 @@ following: ## 3\. Recommended settings -Syntastic has a large number of options that can be configured, and the -defaults are not particularly well suitable for new users. It is recommended -that you start by adding the following lines to your `vimrc` file, and return -to them after reading the manual (see `:help syntastic` in Vim): +Syntastic has numerous options that can be configured, and the defaults +are not particularly well suitable for new users. It is recommended +that you start by adding the following lines to your `vimrc` file, and +return to them after reading the manual (see `:help syntastic` in Vim): ```vim set statusline+=%#warningmsg# set statusline+=%{SyntasticStatuslineFlag()} @@ -380,7 +381,7 @@ See `:help syntastic_quiet_messages` for details. __4.11. Q. I have enabled multiple checkers for the current filetype. How can I -display all of the errors from all of the checkers together?__ +display all errors from all checkers together?__ A. Set `g:syntastic_aggregate_errors` to 1 in your `vimrc`: ```vim @@ -427,7 +428,8 @@ There are also a dedicated [google group][5], and a Syntastic aims to provide a common interface to syntax checkers for as many languages as possible. For particular languages, there are, of course, other plugins that provide more functionality than syntastic. You might want to take -a look at [jedi-vim][7], [python-mode][8], or [YouCompleteMe][9]. +a look at [ghcmod-vim][31], [jedi-vim][7], [python-mode][8], [vim-go][32], or +[YouCompleteMe][9]. [0]: https://github.com/scrooloose/syntastic/raw/master/_assets/screenshot_1.png [1]: https://github.com/tpope/vim-pathogen @@ -459,6 +461,9 @@ a look at [jedi-vim][7], [python-mode][8], or [YouCompleteMe][9]. [27]: https://github.com/roktas/syntastic-more [28]: https://github.com/venantius/vim-eastwood [29]: https://github.com/rhysd/vim-crystal +[30]: https://github.com/the-lambda-church/merlin +[31]: https://github.com/eagletmt/ghcmod-vim +[32]: https://github.com/fatih/vim-go } # $... = array (...) -snippet array +snippet array b $${1:arrayName} = array('${2}' => ${3}); snippet try try { @@ -601,4 +601,29 @@ snippet tc { ${0:code} } +snippet te + throw new ${1:Exception}("${2:Error Processing Request}"); +snippet fpc "file_put_contents" b + file_put_contents(${1:file}, ${2:content}${3:, FILE_APPEND});$0 + +snippet sr "str_replace" + str_replace(${1:search}, ${2:replace}, ${3:subject})$0 + +snippet ia "in_array" + in_array(${1:needle}, ${2:haystack})$0 + +snippet is "isset" + isset(${1:var})$0 + +snippet isa "isset array" + isset($${1:array}[${2:key}])$0 + +snippet in "is_null" + is_null($${1:var})$0 + +snippet fe "file_exists" + file_exists(${1:file})$0 + +snippet id "is_dir" + is_dir(${1:path})$0 diff --git a/sources_non_forked/vim-snippets/snippets/puppet.snippets b/sources_non_forked/vim-snippets/snippets/puppet.snippets index 8b0a4109..9e9ceeb2 100644 --- a/sources_non_forked/vim-snippets/snippets/puppet.snippets +++ b/sources_non_forked/vim-snippets/snippets/puppet.snippets @@ -221,7 +221,7 @@ snippet package snippet yumrepo yumrepo { "${1:repo name}": - Descr => "${2:$1}", + descr => "${2:$1}", enabled => ${0:1}, } diff --git a/sources_non_forked/vim-snippets/snippets/python.snippets b/sources_non_forked/vim-snippets/snippets/python.snippets index ea5f2c98..0f68acbd 100644 --- a/sources_non_forked/vim-snippets/snippets/python.snippets +++ b/sources_non_forked/vim-snippets/snippets/python.snippets @@ -1,6 +1,9 @@ snippet #! #!/usr/bin/env python # -*- coding: utf-8 -*- +snippet #!3 + #!/usr/bin/env python3 + # -*- coding: utf-8 -*- snippet imp import ${0:module} snippet uni @@ -125,28 +128,43 @@ snippet _ __${1:init}__ # python debugger (pdb) snippet pdb - import pdb; pdb.set_trace() + import pdb + pdb.set_trace() +# bpython debugger (bpdb) +snippet bpdb + import bpdb + bpdb.set_trace() # ipython debugger (ipdb) snippet ipdb - import ipdb; ipdb.set_trace() + import ipdb + ipdb.set_trace() # embed ipython itself snippet iem - import IPython; IPython.embed() + import IPython + IPython.embed() # ipython debugger (pdbbb) snippet pdbbb - import pdbpp; pdbpp.set_trace() + import pdbpp + pdbpp.set_trace() # remote python debugger (rpdb) snippet rpdb - import rpdb; rpdb.set_trace() + import rpdb + rpdb.set_trace() # ptpython snippet ptpython from ptpython.repl import embed embed(globals(), locals(), vi_mode=${1:False}, history_filename=${2:None}) # python console debugger (pudb) snippet pudb - import pudb; pudb.set_trace() + import pudb + pudb.set_trace() +# pdb in nosetests +snippet nosetrace + from nose.tools import set_trace + set_trace() snippet pprint - import pprint; pprint.pprint(${1}) + import pprint + pprint.pprint(${1}) snippet " """${0:doc} """ diff --git a/sources_non_forked/vim-snippets/snippets/rails.snippets b/sources_non_forked/vim-snippets/snippets/rails.snippets index 6018621d..e8342222 100644 --- a/sources_non_forked/vim-snippets/snippets/rails.snippets +++ b/sources_non_forked/vim-snippets/snippets/rails.snippets @@ -348,7 +348,7 @@ snippet mct ${0} end snippet migration class .. < ActiveRecord::Migration .. def up .. def down .. end - class ${1:class_name} < ActiveRecord::Migration + class `substitute( substitute(vim_snippets#Filename(), '^\d\+_', '',''), '\(_\|^\)\(.\)', '\u\2', 'g')` < ActiveRecord::Migration def up ${0} end @@ -357,7 +357,7 @@ snippet migration class .. < ActiveRecord::Migration .. def up .. def down .. en end end snippet migration class .. < ActiveRecord::Migration .. def change .. end - class ${1:class_name} < ActiveRecord::Migration + class `substitute( substitute(vim_snippets#Filename(), '^\d\+_', '',''), '\(_\|^\)\(.\)', '\u\2', 'g')` < ActiveRecord::Migration def change ${0} end diff --git a/sources_non_forked/vim-snippets/snippets/rst.snippets b/sources_non_forked/vim-snippets/snippets/rst.snippets index f4d99d7a..b1852458 100644 --- a/sources_non_forked/vim-snippets/snippets/rst.snippets +++ b/sources_non_forked/vim-snippets/snippets/rst.snippets @@ -56,11 +56,40 @@ snippet err: snippet cau: .. caution:: ${0:Watch out!} -#Spinx only +#Sphinx only snippet sid: .. sidebar:: ${1:Title} ${0} +snippet tod: + .. todo:: + ${0} +snippet lis: + .. list-table:: ${0:Title} + :header-rows: 1 + :stub-columns: 1 + + * - x1,y1 + - x2,y1 + - x3,y1 + * - x1,y2 + - x2,y2 + - x3,y2 + * - x1,y3 + - x2,y3 + - x3,y3 + +snippet toc: + .. toctree:: + :maxdepth: 2 + + ${0} +snippet dow: + :download:`${0:text} <${1:path}>` +snippet ref: + :ref:`${0:text} <${1:path}>` +snippet doc: + :doc:`${0:text} <${1:path}>` # CJK optimize, CJK has no space between charaters snippet *c \ *${1:Emphasis}*\ ${0} diff --git a/sources_non_forked/vim-snippets/snippets/ruby.snippets b/sources_non_forked/vim-snippets/snippets/ruby.snippets index 6b9d85d7..e9509a29 100644 --- a/sources_non_forked/vim-snippets/snippets/ruby.snippets +++ b/sources_non_forked/vim-snippets/snippets/ruby.snippets @@ -1,12 +1,7 @@ -# encoding for Ruby 1.9 snippet enc # encoding: utf-8 - -# #!/usr/bin/env ruby snippet #! #!/usr/bin/env ruby - # encoding: utf-8 - # New Block snippet =b =begin rdoc @@ -29,15 +24,12 @@ snippet beg ${0} rescue ${1:Exception} => ${2:e} end - snippet req require require '${1}' snippet reqr require_relative '${1}' snippet # # => -snippet end - __END__ snippet case case ${1:object} when ${2:condition} @@ -115,7 +107,7 @@ snippet cla class .. end class ${1:`substitute(vim_snippets#Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`} ${0} end -snippet cla class .. initialize .. end +snippet clai class .. initialize .. end class ${1:`substitute(vim_snippets#Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`} def initialize(${2:args}) ${0} diff --git a/sources_non_forked/vim-snippets/snippets/rust.snippets b/sources_non_forked/vim-snippets/snippets/rust.snippets index c273f537..9bf896f6 100644 --- a/sources_non_forked/vim-snippets/snippets/rust.snippets +++ b/sources_non_forked/vim-snippets/snippets/rust.snippets @@ -7,6 +7,10 @@ snippet fn "Function definition" fn ${1:function_name}(${2})${3} { ${0} } +snippet pfn "Function definition" + pub fn ${1:function_name}(${2})${3} { + ${0} + } snippet test "Unit test function" #[test] fn ${1:test_function_name}() { @@ -27,10 +31,14 @@ snippet main "Main function" pub fn main() { ${0} } -snippet let "let variable declaration" - let ${1:name}${2:: ${3:type}} = ${4}; -snippet letm "let mut variable declaration" - let mut ${1:name}${2:: ${3:type}} = ${4}; +snippet let "let variable declaration with type inference" + let ${1} = ${2}; +snippet lett "let variable declaration with explicit type annotation" + let ${1}: ${2} = ${3}; +snippet letm "let mut variable declaration with type inference" + let mut ${1} = ${2}; +snippet lettm "let mut variable declaration with explicit type annotation" + let mut ${1}: ${2} = ${3}; snippet pln "println!" println!("${1}"); snippet pln, "println! with format param" @@ -106,7 +114,7 @@ snippet loop "loop {}" b loop { ${0} } -snippet while "while loop" +snippet wh "while loop" while ${1:condition} { ${0} } diff --git a/sources_non_forked/vim-snippets/snippets/scss.snippets b/sources_non_forked/vim-snippets/snippets/scss.snippets index 9a208cab..998a1200 100644 --- a/sources_non_forked/vim-snippets/snippets/scss.snippets +++ b/sources_non_forked/vim-snippets/snippets/scss.snippets @@ -1,3 +1,5 @@ +extends css + snippet $ $${1:variable}: ${0:value}; snippet imp @@ -8,7 +10,7 @@ snippet mix } snippet inc @include ${1:mixin}(${2}); -snippet ex +snippet ext @extend ${0}; snippet fun @function ${1:name}(${2:args}) { diff --git a/sources_non_forked/vim-snippets/snippets/simplemvcf.snippets b/sources_non_forked/vim-snippets/snippets/simplemvcf.snippets new file mode 100644 index 00000000..2ef6a653 --- /dev/null +++ b/sources_non_forked/vim-snippets/snippets/simplemvcf.snippets @@ -0,0 +1,122 @@ +snippet sm_controller + db->select('SELECT * FROM '.$table.' WHERE ${3:where}', $data); + } + + public function getRows($where) + { + return $this->db->select('SELECT * FROM '.$table.'); + } + + public function insert($data) + { + $this->db->insert($table, $data); + } + + public function update($data, $where) + { + $this->db->update($table ,$data, $where); + } + + public function delete($where) + { + $this->db->delete($table, $where); + } + } +snippet sm_render + View::render('${1:view}', $${2:array}); +snippet sm_render_template + View::renderTemplate('${1:part}', $${2:array}); + +# database +snippet sm_db_select + $this->db->select(${1:sql}, ${2:where}); + +snippet sm_db_insert + $this->db->insert(${1:table}, ${2:data}); + +snippet sm_db_update + $this->db->update(${1:table}, ${2:data}, ${3:where}); + +snippet sm_db_delete + $this->db->delete(${1:table}, ${2:where}); + +snippet sm_db_truncate + $this->db->delete(${1:table}); + +#session +snippet sm_session_set + Session::set(${1:key}, ${2:value}); + +snippet sm_session_get + Session::get(${1:key}); + +snippet sm_session_pull + Session::pull(${1:key}); + +snippet sm_session_id + Session::id(); + +snippet sm_session_destroy + Session::set(${1:key}); + +snippet sm_session_display + Session::display(); + +#url +snippet sm_url_redirect + Url:redirect('${1:path}'); + +snippet sm_url_previous + Url:previous(); + +snippet sm_url_templatepath + Url:templatePath(); + +snippet sm_url_autolink + Url:autolink('${1:string}'); diff --git a/sources_non_forked/vim-snippets/snippets/slim.snippets b/sources_non_forked/vim-snippets/snippets/slim.snippets index 8eeb4a53..885ca8d7 100644 --- a/sources_non_forked/vim-snippets/snippets/slim.snippets +++ b/sources_non_forked/vim-snippets/snippets/slim.snippets @@ -1,3 +1,16 @@ +snippet pry + - binding.pry +snippet renp + = render partial: '${0}' +# Forms +# ===== +snippet fieldset + fieldset + legend ${1} +snippet css + link rel="stylesheet" href="${1:style.css}" type="text/css" media="${2:all}" +snippet script + script src="${1:script.js}" type="text/javascript" # Some useful Unicode entities # ============================ # Non-Breaking Space @@ -48,17 +61,3 @@ snippet backspace # ⎋ snippet esc ⎋ - -# Forms -# ===== -snippet fieldset - fieldset - legend ${1} - -# Assets -# ====== -snippet css - link rel="stylesheet" href="${1:style.css}" type="text/css" media="${2:all}" - -snippet script - script src="${1:script.js}" type="text/javascript" diff --git a/sources_non_forked/vim-snippets/snippets/stylus.snippets b/sources_non_forked/vim-snippets/snippets/stylus.snippets index d03d1781..205f8479 100644 --- a/sources_non_forked/vim-snippets/snippets/stylus.snippets +++ b/sources_non_forked/vim-snippets/snippets/stylus.snippets @@ -1,993 +1,993 @@ snippet ! - !important + !important snippet bdi:m+ - -moz-border-image url(${1}) ${2:0} ${3:0} ${4:0} ${5:0} ${6:stretch} ${0:stretch} + -moz-border-image url(${1}) ${2:0} ${3:0} ${4:0} ${5:0} ${6:stretch} ${0:stretch} snippet bdi:m - -moz-border-image ${0} + -moz-border-image ${0} snippet bdrz:m - -moz-border-radius ${0} + -moz-border-radius ${0} snippet bxsh:m+ - -moz-box-shadow ${1:0} ${2:0} ${3:0} ${0} + -moz-box-shadow ${1:0} ${2:0} ${3:0} ${0} snippet bxsh:m - -moz-box-shadow ${0} + -moz-box-shadow ${0} snippet bdi:w+ - -webkit-border-image url(${1}) ${2:0} ${3:0} ${4:0} ${5:0} ${6:stretch} ${0:stretch} + -webkit-border-image url(${1}) ${2:0} ${3:0} ${4:0} ${5:0} ${6:stretch} ${0:stretch} snippet bdi:w - -webkit-border-image ${0} + -webkit-border-image ${0} snippet bdrz:w - -webkit-border-radius ${0} + -webkit-border-radius ${0} snippet bxsh:w+ - -webkit-box-shadow ${1:0} ${2:0} ${3:0} ${0} + -webkit-box-shadow ${1:0} ${2:0} ${3:0} ${0} snippet bxsh:w - -webkit-box-shadow ${0} + -webkit-box-shadow ${0} snippet @f - @font-face ${0} + @font-face ${0} snippet @i - @import '${0}' + @import '${0}' snippet @r - @require '${0}' + @require '${0}' snippet @m - @media ${1:screen} + @media ${1:screen} snippet @msmw - @media screen and (min-width: ${0}px) + @media screen and (min-width: ${0}px) snippet @ext - @extend .${1} - ${0} + @extend .${1} + ${0} snippet bg+ - background ${1} url(${2}) ${3:0} ${4:0} ${0:no-repeat} + background ${1} url(${2}) ${3:0} ${4:0} ${0:no-repeat} snippet bga - background-attachment ${0} + background-attachment ${0} snippet bga:f - background-attachment fixed + background-attachment fixed snippet bga:s - background-attachment scroll + background-attachment scroll snippet bgbk - background-break ${0} + background-break ${0} snippet bgbk:bb - background-break bounding-box + background-break bounding-box snippet bgbk:c - background-break continuous + background-break continuous snippet bgbk:eb - background-break each-box + background-break each-box snippet bgcp - background-clip ${0} + background-clip ${0} snippet bgcp:bb - background-clip border-box + background-clip border-box snippet bgcp:cb - background-clip content-box + background-clip content-box snippet bgcp:nc - background-clip no-clip + background-clip no-clip snippet bgcp:pb - background-clip padding-box + background-clip padding-box snippet bgc - background-color ${0} + background-color ${0} snippet bgc:t - background-color transparent + background-color transparent snippet bgi - background-image url(${0}) + background-image url(${0}) snippet bgi:n - background-image none + background-image none snippet bgo - background-origin ${0} + background-origin ${0} snippet bgo:bb - background-origin border-box + background-origin border-box snippet bgo:cb - background-origin content-box + background-origin content-box snippet bgo:pb - background-origin padding-box + background-origin padding-box snippet bgpx - background-position-x ${0} + background-position-x ${0} snippet bgpy - background-position-y ${0} + background-position-y ${0} snippet bgp - background-position ${1:0} ${0:0} + background-position ${1:0} ${0:0} snippet bgr - background-repeat ${0} + background-repeat ${0} snippet bgr:n - background-repeat no-repeat + background-repeat no-repeat snippet bgr:x - background-repeat repeat-x + background-repeat repeat-x snippet bgr:y - background-repeat repeat-y + background-repeat repeat-y snippet bgr:r - background-repeat repeat + background-repeat repeat snippet bgz - background-size ${0} + background-size ${0} snippet bgz:a - background-size auto + background-size auto snippet bgz:ct - background-size contain + background-size contain snippet bgz:cv - background-size cover + background-size cover snippet bg - background ${0} + background ${0} snippet bg:ie - filter progid:DXImageTransform.Microsoft.AlphaImageLoader(src='${1}',sizingMethod='${0:crop}') + filter progid:DXImageTransform.Microsoft.AlphaImageLoader(src='${1}',sizingMethod='${0:crop}') snippet bg:n - background none + background none snippet bd+ - border ${1:1px} ${2:solid} ${0} + border ${1:1px} ${2:solid} ${0} snippet bdb+ - border-bottom ${1:1px} ${2:solid} ${0} + border-bottom ${1:1px} ${2:solid} ${0} snippet bdbc - border-bottom-color ${0} + border-bottom-color ${0} snippet bdbi - border-bottom-image url(${0}) + border-bottom-image url(${0}) snippet bdbi:n - border-bottom-image none + border-bottom-image none snippet bdbli - border-bottom-left-image url(${0}) + border-bottom-left-image url(${0}) snippet bdbli:c - border-bottom-left-image continue + border-bottom-left-image continue snippet bdbli:n - border-bottom-left-image none + border-bottom-left-image none snippet bdblrz - border-bottom-left-radius ${0} + border-bottom-left-radius ${0} snippet bdbri - border-bottom-right-image url(${0}) + border-bottom-right-image url(${0}) snippet bdbri:c - border-bottom-right-image continue + border-bottom-right-image continue snippet bdbri:n - border-bottom-right-image none + border-bottom-right-image none snippet bdbrrz - border-bottom-right-radius ${0} + border-bottom-right-radius ${0} snippet bdbs - border-bottom-style ${0} + border-bottom-style ${0} snippet bdbs:n - border-bottom-style none + border-bottom-style none snippet bdbw - border-bottom-width ${0} + border-bottom-width ${0} snippet bdb - border-bottom ${0} + border-bottom ${0} snippet bdb:n - border-bottom none + border-bottom none snippet bdbk - border-break ${0} + border-break ${0} snippet bdbk:c - border-break close + border-break close snippet bdcl - border-collapse ${0} + border-collapse ${0} snippet bdcl:c - border-collapse collapse + border-collapse collapse snippet bdcl:s - border-collapse separate + border-collapse separate snippet bdc - border-color ${0} + border-color ${0} snippet bdci - border-corner-image url(${0}) + border-corner-image url(${0}) snippet bdci:c - border-corner-image continue + border-corner-image continue snippet bdci:n - border-corner-image none + border-corner-image none snippet bdf - border-fit ${0} + border-fit ${0} snippet bdf:c - border-fit clip + border-fit clip snippet bdf:of - border-fit overwrite + border-fit overwrite snippet bdf:ow - border-fit overwrite + border-fit overwrite snippet bdf:r - border-fit repeat + border-fit repeat snippet bdf:sc - border-fit scale + border-fit scale snippet bdf:sp - border-fit space + border-fit space snippet bdf:st - border-fit stretch + border-fit stretch snippet bdi - border-image url(${1}) ${2:0} ${3:0} ${4:0} ${5:0} ${6:stretch} ${0:stretch} + border-image url(${1}) ${2:0} ${3:0} ${4:0} ${5:0} ${6:stretch} ${0:stretch} snippet bdi:n - border-image none + border-image none snippet bdl+ - border-left ${1:1px} ${2:solid} ${0} + border-left ${1:1px} ${2:solid} ${0} snippet bdlc - border-left-color ${0} + border-left-color ${0} snippet bdli - border-left-image url(${0}) + border-left-image url(${0}) snippet bdli:n - border-left-image none + border-left-image none snippet bdls - border-left-style ${0} + border-left-style ${0} snippet bdls:n - border-left-style none + border-left-style none snippet bdlw - border-left-width ${0} + border-left-width ${0} snippet bdl - border-left ${0} + border-left ${0} snippet bdl:n - border-left none + border-left none snippet bdlt - border-length ${0} + border-length ${0} snippet bdlt:a - border-length auto + border-length auto snippet bdrz - border-radius ${0} + border-radius ${0} snippet bdr+ - border-right ${1:1px} ${2:solid} ${0} + border-right ${1:1px} ${2:solid} ${0} snippet bdrc - border-right-color ${0} + border-right-color ${0} snippet bdri - border-right-image url(${0}) + border-right-image url(${0}) snippet bdri:n - border-right-image none + border-right-image none snippet bdrs - border-right-style ${0} + border-right-style ${0} snippet bdrs:n - border-right-style none + border-right-style none snippet bdrw - border-right-width ${0} + border-right-width ${0} snippet bdr - border-right ${0} + border-right ${0} snippet bdr:n - border-right none + border-right none snippet bdsp - border-spacing ${0} + border-spacing ${0} snippet bds - border-style ${0} + border-style ${0} snippet bds:ds - border-style dashed + border-style dashed snippet bds:dtds - border-style dot-dash + border-style dot-dash snippet bds:dtdtds - border-style dot-dot-dash + border-style dot-dot-dash snippet bds:dt - border-style dotted + border-style dotted snippet bds:db - border-style double + border-style double snippet bds:g - border-style groove + border-style groove snippet bds:h - border-style hidden + border-style hidden snippet bds:i - border-style inset + border-style inset snippet bds:n - border-style none + border-style none snippet bds:o - border-style outset + border-style outset snippet bds:r - border-style ridge + border-style ridge snippet bds:s - border-style solid + border-style solid snippet bds:w - border-style wave + border-style wave snippet bdt+ - border-top ${1:1px} ${2:solid} ${0} + border-top ${1:1px} ${2:solid} ${0} snippet bdtc - border-top-color ${0} + border-top-color ${0} snippet bdti - border-top-image url(${0}) + border-top-image url(${0}) snippet bdti:n - border-top-image none + border-top-image none snippet bdtli - border-top-left-image url(${0}) + border-top-left-image url(${0}) snippet bdtli:c - border-corner-image continue + border-corner-image continue snippet bdtli:n - border-corner-image none + border-corner-image none snippet bdtlrz - border-top-left-radius ${0} + border-top-left-radius ${0} snippet bdtri - border-top-right-image url(${0}) + border-top-right-image url(${0}) snippet bdtri:c - border-top-right-image continue + border-top-right-image continue snippet bdtri:n - border-top-right-image none + border-top-right-image none snippet bdtrrz - border-top-right-radius ${0} + border-top-right-radius ${0} snippet bdts - border-top-style ${0} + border-top-style ${0} snippet bdts:n - border-top-style none + border-top-style none snippet bdtw - border-top-width ${0} + border-top-width ${0} snippet bdt - border-top ${0} + border-top ${0} snippet bdt:n - border-top none + border-top none snippet bdw - border-width ${0} + border-width ${0} snippet bd - border ${0} + border ${0} snippet bd:n - border none + border none snippet b - bottom ${0} + bottom ${0} snippet b:a - bottom auto + bottom auto snippet bxsh+ - box-shadow ${1:0} ${2:0} ${3:0} ${0} + box-shadow ${1:0} ${2:0} ${3:0} ${0} snippet bxsh - box-shadow ${0} + box-shadow ${0} snippet bxsh:n - box-shadow none + box-shadow none snippet bxz - box-sizing ${0} + box-sizing ${0} snippet bxz:bb - box-sizing border-box + box-sizing border-box snippet bxz:cb - box-sizing content-box + box-sizing content-box snippet cps - caption-side ${0} + caption-side ${0} snippet cps:b - caption-side bottom + caption-side bottom snippet cps:t - caption-side top + caption-side top snippet cl - clear ${0} + clear ${0} snippet cl:b - clear both + clear both snippet cl:l - clear left + clear left snippet cl:n - clear none + clear none snippet cl:r - clear right + clear right snippet cp - clip ${0} + clip ${0} snippet cp:a - clip auto + clip auto snippet cp:r - clip rect(${1:0} ${2:0} ${3:0} ${0:0}) + clip rect(${1:0} ${2:0} ${3:0} ${0:0}) snippet c - color ${0} + color ${0} snippet ct - content ${0} + content ${0} snippet ct:a - content attr(${0}) + content attr(${0}) snippet ct:cq - content close-quote + content close-quote snippet ct:c - content counter(${0}) + content counter(${0}) snippet ct:cs - content counters(${0}) + content counters(${0}) snippet ct:ncq - content no-close-quote + content no-close-quote snippet ct:noq - content no-open-quote + content no-open-quote snippet ct:n - content normal + content normal snippet ct:oq - content open-quote + content open-quote snippet coi - counter-increment ${0} + counter-increment ${0} snippet cor - counter-reset ${0} + counter-reset ${0} snippet cur - cursor ${0} + cursor ${0} snippet cur:a - cursor auto + cursor auto snippet cur:c - cursor crosshair + cursor crosshair snippet cur:d - cursor default + cursor default snippet cur:ha - cursor hand + cursor hand snippet cur:he - cursor help + cursor help snippet cur:m - cursor move + cursor move snippet cur:p - cursor pointer + cursor pointer snippet cur:t - cursor text + cursor text snippet d - display ${0} + display ${0} snippet d:mib - display -moz-inline-box + display -moz-inline-box snippet d:mis - display -moz-inline-stack + display -moz-inline-stack snippet d:b - display block + display block snippet d:cp - display compact + display compact snippet d:ib - display inline-block + display inline-block snippet d:itb - display inline-table + display inline-table snippet d:i - display inline + display inline snippet d:li - display list-item + display list-item snippet d:n - display none + display none snippet d:ri - display run-in + display run-in snippet d:tbcp - display table-caption + display table-caption snippet d:tbc - display table-cell + display table-cell snippet d:tbclg - display table-column-group + display table-column-group snippet d:tbcl - display table-column + display table-column snippet d:tbfg - display table-footer-group + display table-footer-group snippet d:tbhg - display table-header-group + display table-header-group snippet d:tbrg - display table-row-group + display table-row-group snippet d:tbr - display table-row + display table-row snippet d:tb - display table + display table snippet ec - empty-cells ${0} + empty-cells ${0} snippet ec:h - empty-cells hide + empty-cells hide snippet ec:s - empty-cells show + empty-cells show snippet exp - expression() + expression() snippet fl - float ${0} + float ${0} snippet fl:l - float left + float left snippet fl:n - float none + float none snippet fl:r - float right + float right snippet f+ - font ${1:1em} ${2:Arial},${0:sans-serif} + font ${1:1em} ${2:Arial},${0:sans-serif} snippet fef - font-effect ${0} + font-effect ${0} snippet fef:eb - font-effect emboss + font-effect emboss snippet fef:eg - font-effect engrave + font-effect engrave snippet fef:n - font-effect none + font-effect none snippet fef:o - font-effect outline + font-effect outline snippet femp - font-emphasize-position ${0} + font-emphasize-position ${0} snippet femp:a - font-emphasize-position after + font-emphasize-position after snippet femp:b - font-emphasize-position before + font-emphasize-position before snippet fems - font-emphasize-style ${0} + font-emphasize-style ${0} snippet fems:ac - font-emphasize-style accent + font-emphasize-style accent snippet fems:c - font-emphasize-style circle + font-emphasize-style circle snippet fems:ds - font-emphasize-style disc + font-emphasize-style disc snippet fems:dt - font-emphasize-style dot + font-emphasize-style dot snippet fems:n - font-emphasize-style none + font-emphasize-style none snippet fem - font-emphasize ${0} + font-emphasize ${0} snippet ff - font-family ${0} + font-family ${0} snippet ff:c - font-family ${0:'Monotype Corsiva','Comic Sans MS'},cursive + font-family ${0:'Monotype Corsiva','Comic Sans MS'},cursive snippet ff:f - font-family ${0:Capitals,Impact},fantasy + font-family ${0:Capitals,Impact},fantasy snippet ff:m - font-family ${0:Monaco,'Courier New'},monospace + font-family ${0:Monaco,'Courier New'},monospace snippet ff:ss - font-family ${0:Helvetica,Arial},sans-serif + font-family ${0:Helvetica,Arial},sans-serif snippet ff:s - font-family ${0:Georgia,'Times New Roman'},serif + font-family ${0:Georgia,'Times New Roman'},serif snippet fza - font-size-adjust ${0} + font-size-adjust ${0} snippet fza:n - font-size-adjust none + font-size-adjust none snippet fz - font-size ${0} + font-size ${0} snippet fsm - font-smooth ${0} + font-smooth ${0} snippet fsm:aw - font-smooth always + font-smooth always snippet fsm:a - font-smooth auto + font-smooth auto snippet fsm:n - font-smooth never + font-smooth never snippet fst - font-stretch ${0} + font-stretch ${0} snippet fst:c - font-stretch condensed + font-stretch condensed snippet fst:e - font-stretch expanded + font-stretch expanded snippet fst:ec - font-stretch extra-condensed + font-stretch extra-condensed snippet fst:ee - font-stretch extra-expanded + font-stretch extra-expanded snippet fst:n - font-stretch normal + font-stretch normal snippet fst:sc - font-stretch semi-condensed + font-stretch semi-condensed snippet fst:se - font-stretch semi-expanded + font-stretch semi-expanded snippet fst:uc - font-stretch ultra-condensed + font-stretch ultra-condensed snippet fst:ue - font-stretch ultra-expanded + font-stretch ultra-expanded snippet fs - font-style ${0} + font-style ${0} snippet fs:i - font-style italic + font-style italic snippet fs:n - font-style normal + font-style normal snippet fs:o - font-style oblique + font-style oblique snippet fv - font-variant ${0} + font-variant ${0} snippet fv:n - font-variant normal + font-variant normal snippet fv:sc - font-variant small-caps + font-variant small-caps snippet fw - font-weight ${0} + font-weight ${0} snippet fw:b - font-weight bold + font-weight bold snippet fw:br - font-weight bolder + font-weight bolder snippet fw:lr - font-weight lighter + font-weight lighter snippet fw:n - font-weight normal + font-weight normal snippet f - font ${0} + font ${0} snippet h - height ${0} + height ${0} snippet h:a - height auto + height auto snippet l - left ${0} + left ${0} snippet l:a - left auto + left auto snippet lts - letter-spacing ${0} + letter-spacing ${0} snippet lh - line-height ${0} + line-height ${0} snippet lisi - list-style-image url(${0}) + list-style-image url(${0}) snippet lisi:n - list-style-image none + list-style-image none snippet lisp - list-style-position ${0} + list-style-position ${0} snippet lisp:i - list-style-position inside + list-style-position inside snippet lisp:o - list-style-position outside + list-style-position outside snippet list - list-style-type ${0} + list-style-type ${0} snippet list:c - list-style-type circle + list-style-type circle snippet list:dclz - list-style-type decimal-leading-zero + list-style-type decimal-leading-zero snippet list:dc - list-style-type decimal + list-style-type decimal snippet list:d - list-style-type disc + list-style-type disc snippet list:lr - list-style-type lower-roman + list-style-type lower-roman snippet list:n - list-style-type none + list-style-type none snippet list:s - list-style-type square + list-style-type square snippet list:ur - list-style-type upper-roman + list-style-type upper-roman snippet lis - list-style ${0} + list-style ${0} snippet lis:n - list-style none + list-style none snippet mb - margin-bottom ${0} + margin-bottom ${0} snippet mb:a - margin-bottom auto + margin-bottom auto snippet ml - margin-left ${0} + margin-left ${0} snippet ml:a - margin-left auto + margin-left auto snippet mr - margin-right ${0} + margin-right ${0} snippet mr:a - margin-right auto + margin-right auto snippet mt - margin-top ${0} + margin-top ${0} snippet mt:a - margin-top auto + margin-top auto snippet m - margin ${0} + margin ${0} snippet m:4 - margin ${1:0} ${2:0} ${3:0} ${0:0} + margin ${1:0} ${2:0} ${3:0} ${0:0} snippet m:3 - margin ${1:0} ${2:0} ${0:0} + margin ${1:0} ${2:0} ${0:0} snippet m:2 - margin ${1:0} ${0:0} + margin ${1:0} ${0:0} snippet m:0 - margin 0 + margin 0 snippet m:a - margin auto + margin auto snippet mah - max-height ${0} + max-height ${0} snippet mah:n - max-height none + max-height none snippet maw - max-width ${0} + max-width ${0} snippet maw:n - max-width none + max-width none snippet mih - min-height ${0} + min-height ${0} snippet miw - min-width ${0} + min-width ${0} snippet op - opacity ${0} + opacity ${0} snippet op:ie - filter progid:DXImageTransform.Microsoft.Alpha(Opacity=${0:100}) + filter progid:DXImageTransform.Microsoft.Alpha(Opacity=${0:100}) snippet op:ms - -ms-filter 'progid:DXImageTransform.Microsoft.Alpha(Opacity=${0:100})' + -ms-filter 'progid:DXImageTransform.Microsoft.Alpha(Opacity=${0:100})' snippet orp - orphans ${0} + orphans ${0} snippet o+ - outline ${1:1px} ${2:solid} ${0} + outline ${1:1px} ${2:solid} ${0} snippet oc - outline-color ${0} + outline-color ${0} snippet oc:i - outline-color invert + outline-color invert snippet oo - outline-offset ${0} + outline-offset ${0} snippet os - outline-style ${0} + outline-style ${0} snippet ow - outline-width ${0} + outline-width ${0} snippet o - outline ${0} + outline ${0} snippet o:n - outline none + outline none snippet ovs - overflow-style ${0} + overflow-style ${0} snippet ovs:a - overflow-style auto + overflow-style auto snippet ovs:mq - overflow-style marquee + overflow-style marquee snippet ovs:mv - overflow-style move + overflow-style move snippet ovs:p - overflow-style panner + overflow-style panner snippet ovs:s - overflow-style scrollbar + overflow-style scrollbar snippet ovx - overflow-x ${0} + overflow-x ${0} snippet ovx:a - overflow-x auto + overflow-x auto snippet ovx:h - overflow-x hidden + overflow-x hidden snippet ovx:s - overflow-x scroll + overflow-x scroll snippet ovx:v - overflow-x visible + overflow-x visible snippet ovy - overflow-y ${0} + overflow-y ${0} snippet ovy:a - overflow-y auto + overflow-y auto snippet ovy:h - overflow-y hidden + overflow-y hidden snippet ovy:s - overflow-y scroll + overflow-y scroll snippet ovy:v - overflow-y visible + overflow-y visible snippet ov - overflow ${0} + overflow ${0} snippet ov:a - overflow auto + overflow auto snippet ov:h - overflow hidden + overflow hidden snippet ov:s - overflow scroll + overflow scroll snippet ov:v - overflow visible + overflow visible snippet pb - padding-bottom ${0} + padding-bottom ${0} snippet pl - padding-left ${0} + padding-left ${0} snippet pr - padding-right ${0} + padding-right ${0} snippet pt - padding-top ${0} + padding-top ${0} snippet p - padding ${0} + padding ${0} snippet p:4 - padding ${1:0} ${2:0} ${3:0} ${0:0} + padding ${1:0} ${2:0} ${3:0} ${0:0} snippet p:3 - padding ${1:0} ${2:0} ${0:0} + padding ${1:0} ${2:0} ${0:0} snippet p:2 - padding ${1:0} ${0:0} + padding ${1:0} ${0:0} snippet p:0 - padding 0 + padding 0 snippet pgba - page-break-after ${0} + page-break-after ${0} snippet pgba:aw - page-break-after always + page-break-after always snippet pgba:a - page-break-after auto + page-break-after auto snippet pgba:l - page-break-after left + page-break-after left snippet pgba:r - page-break-after right + page-break-after right snippet pgbb - page-break-before ${0} + page-break-before ${0} snippet pgbb:aw - page-break-before always + page-break-before always snippet pgbb:a - page-break-before auto + page-break-before auto snippet pgbb:l - page-break-before left + page-break-before left snippet pgbb:r - page-break-before right + page-break-before right snippet pgbi - page-break-inside ${0} + page-break-inside ${0} snippet pgbi:a - page-break-inside auto + page-break-inside auto snippet pgbi:av - page-break-inside avoid + page-break-inside avoid snippet pos - position ${0} + position ${0} snippet pos:a - position absolute + position absolute snippet pos:f - position fixed + position fixed snippet pos:r - position relative + position relative snippet pos:s - position static + position static snippet q - quotes ${0} + quotes ${0} snippet q:en - quotes '\201C' '\201D' '\2018' '\2019' + quotes '\201C' '\201D' '\2018' '\2019' snippet q:n - quotes none + quotes none snippet q:ru - quotes '\00AB' '\00BB' '\201E' '\201C' + quotes '\00AB' '\00BB' '\201E' '\201C' snippet rz - resize ${0} + resize ${0} snippet rz:b - resize both + resize both snippet rz:h - resize horizontal + resize horizontal snippet rz:n - resize none + resize none snippet rz:v - resize vertical + resize vertical snippet r - right ${0} + right ${0} snippet r:a - right auto + right auto snippet tbl - table-layout ${0} + table-layout ${0} snippet tbl:a - table-layout auto + table-layout auto snippet tbl:f - table-layout fixed + table-layout fixed snippet tal - text-align-last ${0} + text-align-last ${0} snippet tal:a - text-align-last auto + text-align-last auto snippet tal:c - text-align-last center + text-align-last center snippet tal:l - text-align-last left + text-align-last left snippet tal:r - text-align-last right + text-align-last right snippet ta - text-align ${0} + text-align ${0} snippet ta:c - text-align center + text-align center snippet ta:l - text-align left + text-align left snippet ta:r - text-align right + text-align right snippet td - text-decoration ${0} + text-decoration ${0} snippet td:l - text-decoration line-through + text-decoration line-through snippet td:n - text-decoration none + text-decoration none snippet td:o - text-decoration overline + text-decoration overline snippet td:u - text-decoration underline + text-decoration underline snippet te - text-emphasis ${0} + text-emphasis ${0} snippet te:ac - text-emphasis accent + text-emphasis accent snippet te:a - text-emphasis after + text-emphasis after snippet te:b - text-emphasis before + text-emphasis before snippet te:c - text-emphasis circle + text-emphasis circle snippet te:ds - text-emphasis disc + text-emphasis disc snippet te:dt - text-emphasis dot + text-emphasis dot snippet te:n - text-emphasis none + text-emphasis none snippet th - text-height ${0} + text-height ${0} snippet th:a - text-height auto + text-height auto snippet th:f - text-height font-size + text-height font-size snippet th:m - text-height max-size + text-height max-size snippet th:t - text-height text-size + text-height text-size snippet ti - text-indent ${0} + text-indent ${0} snippet ti:- - text-indent -9999px + text-indent -9999px snippet tj - text-justify ${0} + text-justify ${0} snippet tj:a - text-justify auto + text-justify auto snippet tj:d - text-justify distribute + text-justify distribute snippet tj:ic - text-justify inter-cluster + text-justify inter-cluster snippet tj:ii - text-justify inter-ideograph + text-justify inter-ideograph snippet tj:iw - text-justify inter-word + text-justify inter-word snippet tj:k - text-justify kashida + text-justify kashida snippet tj:t - text-justify tibetan + text-justify tibetan snippet to+ - text-outline ${1:0} ${2:0} ${0} + text-outline ${1:0} ${2:0} ${0} snippet to - text-outline ${0} + text-outline ${0} snippet to:n - text-outline none + text-outline none snippet tr - text-replace ${0} + text-replace ${0} snippet tr:n - text-replace none + text-replace none snippet tsh+ - text-shadow ${1:0} ${2:0} ${3:0} ${0} + text-shadow ${1:0} ${2:0} ${3:0} ${0} snippet tsh - text-shadow ${0} + text-shadow ${0} snippet tsh:n - text-shadow none + text-shadow none snippet tt - text-transform ${0} + text-transform ${0} snippet tt:c - text-transform capitalize + text-transform capitalize snippet tt:l - text-transform lowercase + text-transform lowercase snippet tt:n - text-transform none + text-transform none snippet tt:u - text-transform uppercase + text-transform uppercase snippet tw - text-wrap ${0} + text-wrap ${0} snippet tw:no - text-wrap none + text-wrap none snippet tw:n - text-wrap normal + text-wrap normal snippet tw:s - text-wrap suppress + text-wrap suppress snippet tw:u - text-wrap unrestricted + text-wrap unrestricted snippet t - top ${0} + top ${0} snippet t:a - top auto + top auto snippet va - vertical-align ${0} + vertical-align ${0} snippet va:bl - vertical-align baseline + vertical-align baseline snippet va:b - vertical-align bottom + vertical-align bottom snippet va:m - vertical-align middle + vertical-align middle snippet va:sub - vertical-align sub + vertical-align sub snippet va:sup - vertical-align super + vertical-align super snippet va:tb - vertical-align text-bottom + vertical-align text-bottom snippet va:tt - vertical-align text-top + vertical-align text-top snippet va:t - vertical-align top + vertical-align top snippet v - visibility ${0} + visibility ${0} snippet v:c - visibility collapse + visibility collapse snippet v:h - visibility hidden + visibility hidden snippet v:v - visibility visible + visibility visible snippet whsc - white-space-collapse ${0} + white-space-collapse ${0} snippet whsc:ba - white-space-collapse break-all + white-space-collapse break-all snippet whsc:bs - white-space-collapse break-strict + white-space-collapse break-strict snippet whsc:k - white-space-collapse keep-all + white-space-collapse keep-all snippet whsc:l - white-space-collapse loose + white-space-collapse loose snippet whsc:n - white-space-collapse normal + white-space-collapse normal snippet whs - white-space ${0} + white-space ${0} snippet whs:n - white-space normal + white-space normal snippet whs:nw - white-space nowrap + white-space nowrap snippet whs:pl - white-space pre-line + white-space pre-line snippet whs:pw - white-space pre-wrap + white-space pre-wrap snippet whs:p - white-space pre + white-space pre snippet wid - widows ${0} + widows ${0} snippet w - width ${0} + width ${0} snippet w:a - width auto + width auto snippet wob - word-break ${0} + word-break ${0} snippet wob:ba - word-break break-all + word-break break-all snippet wob:bs - word-break break-strict + word-break break-strict snippet wob:k - word-break keep-all + word-break keep-all snippet wob:l - word-break loose + word-break loose snippet wob:n - word-break normal + word-break normal snippet wos - word-spacing ${0} + word-spacing ${0} snippet wow - word-wrap ${0} + word-wrap ${0} snippet wow:no - word-wrap none + word-wrap none snippet wow:n - word-wrap normal + word-wrap normal snippet wow:s - word-wrap suppress + word-wrap suppress snippet wow:u - word-wrap unrestricted + word-wrap unrestricted snippet z - z-index ${0} + z-index ${0} snippet z:a - z-index auto + z-index auto snippet zoo - zoom 1 + zoom 1 snippet :h - :hover + :hover snippet :fc - :first-child + :first-child snippet :lc - :last-child + :last-child snippet :nc - :nth-child(${0}) + :nth-child(${0}) snippet :nlc - :nth-last-child(${0}) + :nth-last-child(${0}) snippet :oc - :only-child + :only-child snippet :a - :after + :after snippet :b - :before + :before snippet ::a - ::after + ::after snippet ::b - ::before + ::before snippet if - if ${0} + if ${0} snippet mix - ${1}(${0}) + ${1}(${0}) snippet for - for ${1:i} in ${0} + for ${1:i} in ${0} snippet keyf - @keyframes ${0} + @keyframes ${0} diff --git a/sources_non_forked/vim-snippets/snippets/supercollider.snippets b/sources_non_forked/vim-snippets/snippets/supercollider.snippets new file mode 100644 index 00000000..afaefb69 --- /dev/null +++ b/sources_non_forked/vim-snippets/snippets/supercollider.snippets @@ -0,0 +1,22 @@ +snippet b + ( + ${0} + ) +snippet if + if (${1}) { + ${0} + } +snippet ife + if (${1}) { + ${2} + } { + ${0} + } +snippet for + for (${1:1}, ${2:10}) { |i| + ${0} + } +snippet sdef + SynthDef(\\${1:synthName}, {${2} + ${0} + }).add; diff --git a/sources_non_forked/vim-snippets/snippets/systemverilog.snippets b/sources_non_forked/vim-snippets/snippets/systemverilog.snippets index 86d664f6..70a9d2d3 100644 --- a/sources_non_forked/vim-snippets/snippets/systemverilog.snippets +++ b/sources_non_forked/vim-snippets/snippets/systemverilog.snippets @@ -1,37 +1,6 @@ -# if statement -snippet if - if (${1}) begin - ${0} - end -# If/else statements -snippet ife - if (${1}) begin - ${2} - end - else begin - ${1} - end -# Else if statement -snippet eif - else if (${1}) begin - ${0} - end -#Else statement -snippet el - else begin - ${0} - end -# While statement -snippet wh - while (${1}) begin - ${0} - end -# Repeat Loop -snippet rep - repeat (${1}) begin - ${0} - end -# Foreach Loopo +extends verilog + +# Foreach Loop snippet fe foreach (${1}) begin ${0} @@ -41,24 +10,6 @@ snippet dowh do begin ${0} end while (${1}); -# Case statement -snippet case - case (${1}) - {$2}: begin - ${0} - end - default: begin - end - endcase -# CaseZ statement -snippet casez -casez (${1}) - {$2}: begin - ${0} - end - default: begin - end - endcase # Combinational always block snippet alc always_comb begin ${1:: statement_label} @@ -74,11 +25,6 @@ snippet all always_latch begin ${1:: statement_label} ${0} end $1 -# Module block -snippet mod - module ${1:module_name} (${2}); - ${0} - endmodule : $1 # Class snippet cl class ${1:class_name}; diff --git a/sources_non_forked/vim-snippets/snippets/tex.snippets b/sources_non_forked/vim-snippets/snippets/tex.snippets index 0727cb45..a618ceb1 100644 --- a/sources_non_forked/vim-snippets/snippets/tex.snippets +++ b/sources_non_forked/vim-snippets/snippets/tex.snippets @@ -76,6 +76,14 @@ snippet enum enumerate environment \begin{enumerate} \item ${0} \end{enumerate} +snippet enuma enumerate environment + \begin{enumerate}[(a)] + \item ${0} + \end{enumerate} +snippet enumi enumerate environment + \begin{enumerate}[(i)] + \item ${0} + \end{enumerate} # Itemize snippet itemize itemize environment \begin{itemize} @@ -249,7 +257,7 @@ snippet frac \frac{}{} snippet sum \sum^{}_{} \sum^{${1:n}}_{${2:i=1}} ${0} snippet lim \lim_{} - \lim_{${1:x \to +\infty}} ${0} + \lim_{${1:n \to \infty}} ${0} snippet frame frame environment \begin{frame}[${1:t}]{${2:title}} ${0} @@ -275,7 +283,11 @@ snippet col2 two-column environment ${0} \end{column} \end{columns} +snippet \{ \{ \} + \\{ ${0} \\} #delimiter +snippet lr left right + \left${1} ${0} \right$1 snippet lr( left( right) \left( ${0} \right) snippet lr| left| right| @@ -286,7 +298,6 @@ snippet lr[ left[ right] \left[ ${0} \right] snippet lra langle rangle \langle ${0} \rangle - # Code listings snippet lst \begin{listing}[language=${1:language}] diff --git a/sources_non_forked/vim-snippets/snippets/verilog.snippets b/sources_non_forked/vim-snippets/snippets/verilog.snippets new file mode 100644 index 00000000..5cd80f39 --- /dev/null +++ b/sources_non_forked/vim-snippets/snippets/verilog.snippets @@ -0,0 +1,63 @@ +# if statement +snippet if + if (${1}) begin + ${0} + end +# If/else statements +snippet ife + if (${1}) begin + ${2} + end + else begin + ${1} + end +# Else if statement +snippet eif + else if (${1}) begin + ${0} + end +#Else statement +snippet el + else begin + ${0} + end +# While statement +snippet wh + while (${1}) begin + ${0} + end +# Repeat Loop +snippet rep + repeat (${1}) begin + ${0} + end +# Case statement +snippet case + case (${1:/* variable */}) + ${2:/* value */}: begin + ${3} + end + default: begin + ${4} + end + endcase +# CaseZ statement +snippet casez + casez (${1:/* variable */}) + ${2:/* value */}: begin + ${3} + end + default: begin + ${4} + end + endcase +# Always block +snippet al + always @(${1:/* sensitive list */}) begin + ${0} + end +# Module block +snippet mod + module ${1:module_name} (${2}); + ${0} + endmodule diff --git a/sources_non_forked/vim-snippets/snippets/xml.snippets b/sources_non_forked/vim-snippets/snippets/xml.snippets new file mode 100644 index 00000000..0ab346ba --- /dev/null +++ b/sources_non_forked/vim-snippets/snippets/xml.snippets @@ -0,0 +1,12 @@ +# xml declaration +snippet xml + +# tag +snippet t + <${1:}> + ${2} + +# inline tag +snippet ti + <${1:}>${2} + diff --git a/sources_non_forked/vim-snippets/tests.sh b/sources_non_forked/vim-snippets/tests.sh index 5b93b6ba..07f0ff31 100644 --- a/sources_non_forked/vim-snippets/tests.sh +++ b/sources_non_forked/vim-snippets/tests.sh @@ -1,15 +1,15 @@ #!/usr/bin/env bash -SPACED=$(grep -REn '^ .+' --include '*.snippets' snippets); +SPACED=$(grep -REn '^ .+' --include '*.snippets' snippets) if [[ $? -ne 1 ]]; then - echo These snippet lines are indented with spaces:; - echo; - echo "$SPACED"; - echo; + echo These snippet lines are indented with spaces: + echo + echo "$SPACED" + echo echo Tests failed! - exit 1; + exit 1 fi echo Tests passed! -exit 0; +exit 0 diff --git a/sources_non_forked/vim-surround/plugin/surround.vim b/sources_non_forked/vim-surround/plugin/surround.vim index 82b016ed..6a986e89 100644 --- a/sources_non_forked/vim-surround/plugin/surround.vim +++ b/sources_non_forked/vim-surround/plugin/surround.vim @@ -164,7 +164,7 @@ function! s:wrap(string,char,type,removed,special) elseif newchar ==# ':' let before = ':' let after = '' - elseif newchar =~# "[tT\<,]" + elseif newchar =~# "[tT\<]" let dounmapp = 0 let dounmapb = 0 if !maparg(">","c") @@ -200,7 +200,7 @@ function! s:wrap(string,char,type,removed,special) let before = '<'.tag.attributes.'>' let after = '' endif - if newchar == "\" || newchar == "," + if newchar == "\" if type ==# "v" || type ==# "V" let before .= "\n\t" endif @@ -386,7 +386,7 @@ function! s:dosurround(...) " {{{1 let strcount = (scount == 1 ? "" : scount) if char == '/' exe 'norm! '.strcount.'[/d'.strcount.']/' - elseif char =~# '[[:punct:]]' && char !~# '[][(){}<>"''`]' + elseif char =~# '[[:punct:][:space:]]' && char !~# '[][(){}<>"''`]' exe 'norm! T'.char if getline('.')[col('.')-1] == char exe 'norm! l' @@ -416,7 +416,7 @@ function! s:dosurround(...) " {{{1 norm! "_x call setreg('"','/**/',"c") let keeper = substitute(substitute(keeper,'^/\*\s\=','',''),'\s\=\*$','','') - elseif char =~# '[[:punct:]]' && char !~# '[][(){}<>]' + elseif char =~# '[[:punct:][:space:]]' && char !~# '[][(){}<>]' exe 'norm! F'.char exe 'norm! df'.char else diff --git a/update_plugins.py b/update_plugins.py index bdea53d8..b0b6300e 100644 --- a/update_plugins.py +++ b/update_plugins.py @@ -32,7 +32,8 @@ 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-fugitive https://github.com/tpope/vim-fugitive -vim-airline https://github.com/bling/vim-airline +vim-airline https://github.com/vim-airline/vim-airline +vim-airline-themes https://github.com/vim-airline/vim-airline-themes goyo.vim https://github.com/junegunn/goyo.vim vim-zenroom2 https://github.com/amix/vim-zenroom2 syntastic https://github.com/scrooloose/syntastic diff --git a/vimrcs/filetypes.vim b/vimrcs/filetypes.vim index f6a58f6b..61e2bd6f 100644 --- a/vimrcs/filetypes.vim +++ b/vimrcs/filetypes.vim @@ -22,27 +22,32 @@ au FileType python map D ?def """""""""""""""""""""""""""""" " => JavaScript section """"""""""""""""""""""""""""""" -au FileType javascript call JavaScriptFold() -au FileType javascript setl fen -au FileType javascript setl nocindent - -au FileType javascript imap $log();hi -au FileType javascript imap alert();hi - -au FileType javascript inoremap $r return -au FileType javascript inoremap $f //--- PH ----------------------------------------------FP2xi - -function! JavaScriptFold() - setl foldmethod=syntax - setl foldlevelstart=1 - syn region foldBraces start=/{/ end=/}/ transparent fold keepend extend - - function! FoldText() - return substitute(getline(v:foldstart), '{.*', '{...}', '') - endfunction - setl foldtext=FoldText() -endfunction +au BufNewFile,BufRead *.es6 set ft=javascript +au BufNewFile,BufRead *.es6 set syntax=javascript +au BufNewFile,BufRead *.ejs set ft=html +au BufNewFile,BufRead *.ejs set syntax=html +" au FileType javascript call JavaScriptFold() +"au FileType javascript setl fen +" au FileType javascript setl nocindent +" +"au FileType javascript imap $log();hi +"au FileType javascript imap alert();hi +" +"au FileType javascript inoremap $r return +"au FileType javascript inoremap $f //--- PH ----------------------------------------------FP2xi +" +"function! JavaScriptFold() +" setl foldmethod=syntax +" setl foldlevelstart=1 +" syn region foldBraces start=/{/ end=/}/ transparent fold keepend extend +" +" function! FoldText() +" return substitute(getline(v:foldstart), '{.*', '{...}', '') +" endfunction +" setl foldtext=FoldText() +"endfunction +" """""""""""""""""""""""""""""" " => CoffeeScript section diff --git a/vimrcs/plugins_config.vim b/vimrcs/plugins_config.vim index bbff26f5..24fadc51 100644 --- a/vimrcs/plugins_config.vim +++ b/vimrcs/plugins_config.vim @@ -117,7 +117,16 @@ nnoremap z :Goyo " => Syntastic (syntax checker) """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" let g:syntastic_python_checkers=['pyflakes'] -let g:syntastic_javascript_checkers = ['jshint'] +let g:syntastic_javascript_checkers = ['eslint'] + +set statusline+=%#warningmsg# +set statusline+=%{SyntasticStatuslineFlag()} +set statusline+=%* + +let g:syntastic_always_populate_loc_list = 1 +" let g:syntastic_auto_loc_list = 1 +let g:syntastic_check_on_open = 1 +let g:syntastic_check_on_wq = 0 " Custom CoffeeScript SyntasticCheck func! SyntasticCheckCoffeescript()