From 6711ae645336d5574840fa38fe54af34f77dab70 Mon Sep 17 00:00:00 2001 From: Amir Salihefendic Date: Thu, 22 Aug 2019 17:34:32 +0200 Subject: [PATCH 01/40] Make sure that enter is never overriden in the quickfix window --- vimrcs/extended.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vimrcs/extended.vim b/vimrcs/extended.vim index a4f0c9b9..1c7ab82a 100644 --- a/vimrcs/extended.vim +++ b/vimrcs/extended.vim @@ -142,6 +142,8 @@ map co ggVGy:tabnew:set syntax=qfpgg map n :cn map p :cp +" Make sure that enter is never overriden in the quickfix window +autocmd BufReadPost quickfix nnoremap """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" From 3aefdbd21a18d5b83e42eaf4dc722b0c5918f6f2 Mon Sep 17 00:00:00 2001 From: Amir Salihefendic Date: Thu, 22 Aug 2019 17:36:17 +0200 Subject: [PATCH 02/40] Updated plugins --- sources_non_forked/ale/LICENSE | 2 +- .../ale/ale_linters/asm/gcc.vim | 5 +- .../ale/ale_linters/c/clangd.vim | 8 +- .../ale/ale_linters/c/clangtidy.vim | 9 +- .../ale/ale_linters/c/cppcheck.vim | 22 +- .../ale/ale_linters/c/cquery.vim | 10 +- sources_non_forked/ale/ale_linters/c/gcc.vim | 6 +- .../ale/ale_linters/cpp/clangcheck.vim | 3 +- .../ale/ale_linters/cpp/clangd.vim | 8 +- .../ale/ale_linters/cpp/clangtidy.vim | 9 +- .../ale/ale_linters/cpp/cppcheck.vim | 22 +- .../ale/ale_linters/cpp/cquery.vim | 10 +- .../ale/ale_linters/cpp/gcc.vim | 6 +- sources_non_forked/ale/ale_linters/cs/csc.vim | 95 + .../ale/ale_linters/cs/mcsc.vim | 34 +- .../ale/ale_linters/elm/elm_ls.vim | 37 + .../ale/ale_linters/elm/elm_lsp.vim | 22 - .../ale/ale_linters/erlang/dialyzer.vim | 93 + .../ale/ale_linters/go/bingo.vim | 6 +- .../ale/ale_linters/go/gobuild.vim | 1 + .../ale/ale_linters/go/gofmt.vim | 8 +- .../ale/ale_linters/go/golangci_lint.vim | 3 + .../ale/ale_linters/go/golint.vim | 2 +- .../ale/ale_linters/go/gometalinter.vim | 2 + .../ale/ale_linters/go/gopls.vim | 8 +- .../ale/ale_linters/go/gosimple.vim | 3 +- .../ale/ale_linters/go/gotype.vim | 3 +- .../ale/ale_linters/go/govet.vim | 1 + .../ale/ale_linters/go/langserver.vim | 3 +- .../ale/ale_linters/go/staticcheck.vim | 5 +- .../ale/ale_linters/java/checkstyle.vim | 35 +- .../ale/ale_linters/java/eclipselsp.vim | 30 +- .../ale/ale_linters/java/javac.vim | 5 + .../ale/ale_linters/java/javalsp.vim | 36 +- .../ale/ale_linters/javascript/eslint.vim | 2 +- .../ale/ale_linters/javascript/xo.vim | 4 +- .../ale/ale_linters/objc/clangd.vim | 8 +- .../ale/ale_linters/objcpp/clangd.vim | 8 +- .../ale/ale_linters/php/phpcs.vim | 11 +- .../ale/ale_linters/powershell/powershell.vim | 22 +- .../ale/ale_linters/pug/puglint.vim | 16 +- .../ale/ale_linters/purescript/ls.vim | 49 + .../ale/ale_linters/python/mypy.vim | 1 + .../ale/ale_linters/reason/ls.vim | 23 + .../ale/ale_linters/ruby/sorbet.vim | 23 + .../ale/ale_linters/rust/cargo.vim | 19 +- .../ale/ale_linters/terraform/terraform.vim | 49 + .../ale/ale_linters/tex/texlab.vim | 21 + .../ale/ale_linters/typescript/eslint.vim | 2 +- .../ale/ale_linters/typescript/xo.vim | 4 +- sources_non_forked/ale/autoload/ale.vim | 2 +- sources_non_forked/ale/autoload/ale/ant.vim | 41 + .../ale/autoload/ale/assert.vim | 12 + sources_non_forked/ale/autoload/ale/c.vim | 220 +- .../ale/autoload/ale/completion.vim | 109 +- .../ale/autoload/ale/debugging.vim | 13 +- .../ale/autoload/ale/engine.vim | 4 + .../ale/autoload/ale/events.vim | 2 +- sources_non_forked/ale/autoload/ale/fix.vim | 61 +- .../ale/autoload/ale/fix/registry.vim | 32 +- .../ale/autoload/ale/fixers/black.vim | 4 + .../ale/autoload/ale/fixers/clangformat.vim | 13 +- .../ale/autoload/ale/fixers/clangtidy.vim | 52 + .../ale/autoload/ale/fixers/eslint.vim | 18 +- .../ale/autoload/ale/fixers/gnatpp.vim | 17 + .../ale/autoload/ale/fixers/gofmt.vim | 3 +- .../ale/autoload/ale/fixers/goimports.vim | 3 +- .../ale/autoload/ale/fixers/gomod.vim | 3 +- .../ale/autoload/ale/fixers/hindent.vim | 20 + .../ale/autoload/ale/fixers/pgformatter.vim | 12 + .../ale/autoload/ale/fixers/prettier.vim | 10 +- .../ale/fixers/reorder_python_imports.vim | 25 + .../ale/autoload/ale/fixers/sorbet.vim | 19 + sources_non_forked/ale/autoload/ale/go.vim | 17 + .../ale/autoload/ale/handlers/ccls.vim | 14 +- .../ale/autoload/ale/handlers/cppcheck.vim | 41 + .../ale/autoload/ale/handlers/eslint.vim | 143 +- .../ale/autoload/ale/handlers/gcc.vim | 24 + .../ale/autoload/ale/handlers/rust.vim | 10 +- .../ale/autoload/ale/highlight.vim | 126 +- sources_non_forked/ale/autoload/ale/java.vim | 6 + .../ale/autoload/ale/linter.vim | 9 +- sources_non_forked/ale/autoload/ale/list.vim | 84 +- .../ale/autoload/ale/loclist_jumping.vim | 2 +- sources_non_forked/ale/autoload/ale/lsp.vim | 93 +- .../ale/autoload/ale/lsp/message.vim | 7 +- .../ale/autoload/ale/lsp/response.vim | 2 +- .../ale/autoload/ale/lsp_linter.vim | 55 +- sources_non_forked/ale/autoload/ale/path.vim | 11 +- .../ale/autoload/ale/python.vim | 2 +- sources_non_forked/ale/autoload/ale/sign.vim | 28 + .../ale/autoload/asyncomplete/sources/ale.vim | 26 + sources_non_forked/ale/doc/ale-ada.txt | 11 + sources_non_forked/ale/doc/ale-c.txt | 19 +- sources_non_forked/ale/doc/ale-cpp.txt | 19 +- sources_non_forked/ale/doc/ale-cs.txt | 90 +- .../ale/doc/ale-development.txt | 5 +- sources_non_forked/ale/doc/ale-elm.txt | 38 +- sources_non_forked/ale/doc/ale-erlang.txt | 29 + sources_non_forked/ale/doc/ale-go.txt | 10 + sources_non_forked/ale/doc/ale-handlebars.txt | 7 + sources_non_forked/ale/doc/ale-haskell.txt | 22 + sources_non_forked/ale/doc/ale-hcl.txt | 2 +- sources_non_forked/ale/doc/ale-java.txt | 96 +- sources_non_forked/ale/doc/ale-purescript.txt | 33 + sources_non_forked/ale/doc/ale-python.txt | 32 +- sources_non_forked/ale/doc/ale-reasonml.txt | 38 +- sources_non_forked/ale/doc/ale-ruby.txt | 20 + sources_non_forked/ale/doc/ale-sql.txt | 18 + .../doc/ale-supported-languages-and-tools.txt | 10 + sources_non_forked/ale/doc/ale-terraform.txt | 14 +- sources_non_forked/ale/doc/ale-tex.txt | 20 + sources_non_forked/ale/doc/ale.txt | 138 +- sources_non_forked/ale/plugin/ale.vim | 11 +- .../rplugin/python3/deoplete/sources/ale.py | 16 +- sources_non_forked/ale/supported-tools.md | 16 +- sources_non_forked/goyo.vim/autoload/goyo.vim | 2 +- sources_non_forked/lightline.vim/.travis.yml | 4 +- sources_non_forked/lightline.vim/README.md | 6 + .../lightline.vim/autoload/lightline.vim | 10 +- .../lightline/colorscheme/ayu_mirage.vim | 39 + .../lightline/colorscheme/powerlineish.vim | 28 + .../lightline/colorscheme/selenized_dark.vim | 50 + .../lightline.vim/doc/lightline.txt | 19 +- .../lightline.vim/plugin/lightline.vim | 12 +- .../lightline.vim/test/.themisrc | 2 + .../lightline.vim/test/popup.vim | 19 + .../lightline.vim/test/quickfix.vim | 25 + .../nerdtree/.github/ISSUE_TEMPLATE.md | 28 - .../nerdtree/.github/ISSUE_TEMPLATE/bug.md | 45 + .../.github/ISSUE_TEMPLATE/feature_request.md | 8 + .../.github/ISSUE_TEMPLATE/question.md | 24 + .../nerdtree/.github/PULL_REQUEST_TEMPLATE.md | 13 + sources_non_forked/nerdtree/CHANGELOG | 179 - sources_non_forked/nerdtree/CHANGELOG.md | 222 ++ .../nerdtree/autoload/nerdtree.vim | 41 +- .../nerdtree/autoload/nerdtree/ui_glue.vim | 48 +- sources_non_forked/nerdtree/doc/NERDTree.txt | 151 +- .../nerdtree/lib/nerdtree/bookmark.vim | 4 +- .../nerdtree/lib/nerdtree/creator.vim | 11 +- .../nerdtree/lib/nerdtree/menu_controller.vim | 8 +- .../nerdtree/lib/nerdtree/nerdtree.vim | 16 +- .../nerdtree/lib/nerdtree/opener.vim | 30 +- .../nerdtree/lib/nerdtree/path.vim | 30 +- .../nerdtree/lib/nerdtree/tree_dir_node.vim | 5 + .../nerdtree/lib/nerdtree/ui.vim | 16 +- .../nerdtree/nerdtree_plugin/fs_menu.vim | 32 +- .../nerdtree/plugin/NERD_tree.vim | 1 + sources_non_forked/nginx.vim/README.md | 40 +- .../nginx.vim/snippets/nginx.snippets | 166 - .../vim-bundle-mako/indent/mako.vim | 85 +- .../vim-fugitive/autoload/fugitive.vim | 3356 +++++++++++------ .../vim-fugitive/doc/fugitive.txt | 340 +- .../vim-fugitive/plugin/fugitive.vim | 121 +- .../vim-fugitive/syntax/fugitive.vim | 31 +- .../vim-fugitive/syntax/fugitiveblame.vim | 7 + .../vim-gitgutter/.github/issue_template.md | 4 - sources_non_forked/vim-gitgutter/README.mkd | 95 +- .../vim-gitgutter/autoload/gitgutter.vim | 53 +- .../vim-gitgutter/autoload/gitgutter/diff.vim | 12 +- .../autoload/gitgutter/highlight.vim | 103 +- .../vim-gitgutter/autoload/gitgutter/hunk.vim | 98 +- .../vim-gitgutter/autoload/gitgutter/sign.vim | 170 +- .../autoload/gitgutter/utility.vim | 90 +- .../vim-gitgutter/doc/gitgutter.txt | 97 +- .../vim-gitgutter/plugin/gitgutter.vim | 31 +- sources_non_forked/vim-gitgutter/test/test | 2 +- .../vim-gitgutter/test/test_gitgutter.vim | 365 +- sources_non_forked/vim-go/.github/FUNDING.yml | 1 + .../vim-go/.github/ISSUE_TEMPLATE.md | 7 +- sources_non_forked/vim-go/CHANGELOG.md | 89 + sources_non_forked/vim-go/README.md | 11 +- .../vim-go/autoload/go/auto.vim | 12 +- sources_non_forked/vim-go/autoload/go/cmd.vim | 4 +- .../vim-go/autoload/go/complete.vim | 29 +- .../vim-go/autoload/go/complete_test.vim | 28 +- .../vim-go/autoload/go/config.vim | 21 +- .../vim-go/autoload/go/debug.vim | 23 +- .../vim-go/autoload/go/debug_test.vim | 12 + sources_non_forked/vim-go/autoload/go/def.vim | 4 +- .../vim-go/autoload/go/def_test.vim | 197 +- sources_non_forked/vim-go/autoload/go/doc.vim | 12 + .../vim-go/autoload/go/issue.vim | 16 +- .../vim-go/autoload/go/lint.vim | 34 +- .../vim-go/autoload/go/lint_test.vim | 129 +- sources_non_forked/vim-go/autoload/go/lsp.vim | 486 ++- .../autoload/go/lsp/completionitemkind.vim | 18 +- .../vim-go/autoload/go/lsp/lsp.vim | 58 + .../vim-go/autoload/go/lsp/lsp_test.vim | 32 + .../vim-go/autoload/go/lsp/message.vim | 80 +- .../vim-go/autoload/go/lsp_test.vim | 49 + sources_non_forked/vim-go/autoload/go/mod.vim | 8 +- .../vim-go/autoload/go/package.vim | 76 +- .../vim-go/autoload/go/promise.vim | 50 + .../vim-go/autoload/go/promise_test.vim | 41 + .../vim-go/autoload/go/statusline.vim | 16 +- .../vim-go/autoload/go/template.vim | 9 +- .../vim-go/autoload/go/term.vim | 28 +- .../vim-go/autoload/go/term_test.vim | 2 + .../test/src/example/example_test.go | 10 + .../vim-go/autoload/go/test.vim | 13 +- .../vim-go/autoload/go/test_test.vim | 15 +- .../vim-go/autoload/go/tool.vim | 10 +- .../vim-go/autoload/go/util.vim | 16 +- sources_non_forked/vim-go/autoload/gotest.vim | 21 +- sources_non_forked/vim-go/doc/vim-go.txt | 113 +- .../vim-go/ftplugin/go/commands.vim | 7 + .../vim-go/gosnippets/UltiSnips/go.snippets | 4 +- sources_non_forked/vim-go/plugin/go.vim | 102 +- sources_non_forked/vim-go/scripts/install-vim | 4 +- sources_non_forked/vim-go/scripts/runtest.vim | 10 +- sources_non_forked/vim-markdown/Makefile | 6 + sources_non_forked/vim-markdown/README.md | 303 +- .../vim-markdown/after/ftplugin/markdown.vim | 53 +- .../vim-markdown/doc/vim-markdown.txt | 269 +- .../vim-markdown/syntax/markdown.vim | 4 +- .../vim-markdown/test/python-folding.vader | 15 +- .../vim-markdown/test/toc.vader | 4 - .../vim-multiple-cursors/README.md | 28 +- .../doc/multiple_cursors.txt | 14 +- .../plugin/multiple_cursors.vim | 4 +- .../spec/multiple_cursors_spec.rb | 4 +- sources_non_forked/vim-repeat/README.markdown | 1 + .../vim-snippets/UltiSnips/html.snippets | 4 + .../UltiSnips/javascript-node.snippets | 2 +- .../vim-snippets/UltiSnips/lua.snippets | 2 +- .../vim-snippets/UltiSnips/python.snippets | 8 +- .../vim-snippets/UltiSnips/r.snippets | 3 +- .../vim-snippets/UltiSnips/ruby.snippets | 2 +- .../vim-snippets/UltiSnips/sh.snippets | 8 +- .../vim-snippets/UltiSnips/tex.snippets | 2 +- .../vim-snippets/UltiSnips/zsh.snippets | 9 +- .../vim-snippets/snippets/cpp.snippets | 4 + .../vim-snippets/snippets/css.snippets | 223 +- .../vim-snippets/snippets/eelixir.snippets | 34 +- .../vim-snippets/snippets/go.snippets | 6 - .../javascript/javascript-react.snippets | 17 +- .../javascript/javascript-redux.snippets | 37 + .../javascript/javascript.es6.snippets | 55 - .../snippets/javascript/javascript.snippets | 65 +- .../vim-snippets/snippets/sass.snippets | 228 ++ .../vim-snippets/snippets/stylus.snippets | 230 +- .../vim-snippets/snippets/tex.snippets | 2 +- .../vim-surround/plugin/surround.vim | 11 +- 244 files changed, 9486 insertions(+), 3395 deletions(-) create mode 100644 sources_non_forked/ale/ale_linters/cs/csc.vim create mode 100644 sources_non_forked/ale/ale_linters/elm/elm_ls.vim delete mode 100644 sources_non_forked/ale/ale_linters/elm/elm_lsp.vim create mode 100644 sources_non_forked/ale/ale_linters/erlang/dialyzer.vim create mode 100644 sources_non_forked/ale/ale_linters/purescript/ls.vim create mode 100644 sources_non_forked/ale/ale_linters/reason/ls.vim create mode 100644 sources_non_forked/ale/ale_linters/ruby/sorbet.vim create mode 100644 sources_non_forked/ale/ale_linters/terraform/terraform.vim create mode 100644 sources_non_forked/ale/ale_linters/tex/texlab.vim create mode 100644 sources_non_forked/ale/autoload/ale/ant.vim create mode 100644 sources_non_forked/ale/autoload/ale/fixers/clangtidy.vim create mode 100644 sources_non_forked/ale/autoload/ale/fixers/gnatpp.vim create mode 100644 sources_non_forked/ale/autoload/ale/fixers/hindent.vim create mode 100644 sources_non_forked/ale/autoload/ale/fixers/pgformatter.vim create mode 100644 sources_non_forked/ale/autoload/ale/fixers/reorder_python_imports.vim create mode 100644 sources_non_forked/ale/autoload/ale/fixers/sorbet.vim create mode 100644 sources_non_forked/ale/autoload/asyncomplete/sources/ale.vim create mode 100644 sources_non_forked/ale/doc/ale-purescript.txt create mode 100644 sources_non_forked/lightline.vim/autoload/lightline/colorscheme/ayu_mirage.vim create mode 100644 sources_non_forked/lightline.vim/autoload/lightline/colorscheme/powerlineish.vim create mode 100644 sources_non_forked/lightline.vim/autoload/lightline/colorscheme/selenized_dark.vim create mode 100644 sources_non_forked/lightline.vim/test/popup.vim create mode 100644 sources_non_forked/lightline.vim/test/quickfix.vim delete mode 100644 sources_non_forked/nerdtree/.github/ISSUE_TEMPLATE.md create mode 100644 sources_non_forked/nerdtree/.github/ISSUE_TEMPLATE/bug.md create mode 100644 sources_non_forked/nerdtree/.github/ISSUE_TEMPLATE/feature_request.md create mode 100644 sources_non_forked/nerdtree/.github/ISSUE_TEMPLATE/question.md create mode 100644 sources_non_forked/nerdtree/.github/PULL_REQUEST_TEMPLATE.md delete mode 100644 sources_non_forked/nerdtree/CHANGELOG create mode 100644 sources_non_forked/nerdtree/CHANGELOG.md delete mode 100644 sources_non_forked/nginx.vim/snippets/nginx.snippets create mode 100644 sources_non_forked/vim-fugitive/syntax/fugitiveblame.vim create mode 100644 sources_non_forked/vim-go/.github/FUNDING.yml create mode 100644 sources_non_forked/vim-go/autoload/go/lsp/lsp.vim create mode 100644 sources_non_forked/vim-go/autoload/go/lsp/lsp_test.vim create mode 100644 sources_non_forked/vim-go/autoload/go/lsp_test.vim create mode 100644 sources_non_forked/vim-go/autoload/go/promise.vim create mode 100644 sources_non_forked/vim-go/autoload/go/promise_test.vim create mode 100644 sources_non_forked/vim-go/autoload/go/test-fixtures/test/src/example/example_test.go create mode 100644 sources_non_forked/vim-snippets/snippets/javascript/javascript-redux.snippets delete mode 100644 sources_non_forked/vim-snippets/snippets/javascript/javascript.es6.snippets diff --git a/sources_non_forked/ale/LICENSE b/sources_non_forked/ale/LICENSE index 739ccae0..f8f3524d 100644 --- a/sources_non_forked/ale/LICENSE +++ b/sources_non_forked/ale/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2016-2018, w0rp +Copyright (c) 2016-2019, w0rp All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/sources_non_forked/ale/ale_linters/asm/gcc.vim b/sources_non_forked/ale/ale_linters/asm/gcc.vim index 72b293c0..eecab6ef 100644 --- a/sources_non_forked/ale/ale_linters/asm/gcc.vim +++ b/sources_non_forked/ale/ale_linters/asm/gcc.vim @@ -5,7 +5,10 @@ call ale#Set('asm_gcc_executable', 'gcc') call ale#Set('asm_gcc_options', '-Wall') function! ale_linters#asm#gcc#GetCommand(buffer) abort - return '%e -x assembler -fsyntax-only ' + " `-o /dev/null` or `-o null` is needed to catch all errors, + " -fsyntax-only doesn't catch everything. + return '%e -x assembler' + \ . ' -o ' . g:ale#util#nul_file \ . '-iquote ' . ale#Escape(fnamemodify(bufname(a:buffer), ':p:h')) \ . ' ' . ale#Var(a:buffer, 'asm_gcc_options') . ' -' endfunction diff --git a/sources_non_forked/ale/ale_linters/c/clangd.vim b/sources_non_forked/ale/ale_linters/c/clangd.vim index 918eadcc..79b600fa 100644 --- a/sources_non_forked/ale/ale_linters/c/clangd.vim +++ b/sources_non_forked/ale/ale_linters/c/clangd.vim @@ -4,12 +4,6 @@ call ale#Set('c_clangd_executable', 'clangd') call ale#Set('c_clangd_options', '') -function! ale_linters#c#clangd#GetProjectRoot(buffer) abort - let l:project_root = ale#path#FindNearestFile(a:buffer, 'compile_commands.json') - - return !empty(l:project_root) ? fnamemodify(l:project_root, ':h') : '' -endfunction - function! ale_linters#c#clangd#GetCommand(buffer) abort return '%e' . ale#Pad(ale#Var(a:buffer, 'c_clangd_options')) endfunction @@ -19,5 +13,5 @@ call ale#linter#Define('c', { \ 'lsp': 'stdio', \ 'executable': {b -> ale#Var(b, 'c_clangd_executable')}, \ 'command': function('ale_linters#c#clangd#GetCommand'), -\ 'project_root': function('ale_linters#c#clangd#GetProjectRoot'), +\ 'project_root': function('ale#c#FindProjectRoot'), \}) diff --git a/sources_non_forked/ale/ale_linters/c/clangtidy.vim b/sources_non_forked/ale/ale_linters/c/clangtidy.vim index 6484f8af..f998866a 100644 --- a/sources_non_forked/ale/ale_linters/c/clangtidy.vim +++ b/sources_non_forked/ale/ale_linters/c/clangtidy.vim @@ -11,9 +11,12 @@ call ale#Set('c_clangtidy_executable', 'clang-tidy') " http://clang.llvm.org/extra/clang-tidy/checks/list.html call ale#Set('c_clangtidy_checks', []) -" Set this option to manually set some options for clang-tidy. +" Set this option to manually set some options for clang-tidy to use as compile +" flags. " This will disable compile_commands.json detection. call ale#Set('c_clangtidy_options', '') +" Set this option to manually set options for clang-tidy directly. +call ale#Set('c_clangtidy_extra_options', '') call ale#Set('c_build_dir', '') function! ale_linters#c#clangtidy#GetCommand(buffer) abort @@ -25,8 +28,12 @@ function! ale_linters#c#clangtidy#GetCommand(buffer) abort \ ? ale#Var(a:buffer, 'c_clangtidy_options') \ : '' + " Get the options to pass directly to clang-tidy + let l:extra_options = ale#Var(a:buffer, 'c_clangtidy_extra_options') + return '%e' \ . (!empty(l:checks) ? ' -checks=' . ale#Escape(l:checks) : '') + \ . (!empty(l:extra_options) ? ' ' . ale#Escape(l:extra_options) : '') \ . ' %s' \ . (!empty(l:build_dir) ? ' -p ' . ale#Escape(l:build_dir) : '') \ . (!empty(l:options) ? ' -- ' . l:options : '') diff --git a/sources_non_forked/ale/ale_linters/c/cppcheck.vim b/sources_non_forked/ale/ale_linters/c/cppcheck.vim index 851f9f11..309b2851 100644 --- a/sources_non_forked/ale/ale_linters/c/cppcheck.vim +++ b/sources_non_forked/ale/ale_linters/c/cppcheck.vim @@ -5,23 +5,17 @@ call ale#Set('c_cppcheck_executable', 'cppcheck') call ale#Set('c_cppcheck_options', '--enable=style') function! ale_linters#c#cppcheck#GetCommand(buffer) abort - " Search upwards from the file for compile_commands.json. - " - " If we find it, we'll `cd` to where the compile_commands.json file is, - " then use the file to set up import paths, etc. - let l:compile_commmands_path = ale#path#FindNearestFile(a:buffer, 'compile_commands.json') - - let l:cd_command = !empty(l:compile_commmands_path) - \ ? ale#path#CdString(fnamemodify(l:compile_commmands_path, ':h')) - \ : '' - let l:compile_commands_option = !empty(l:compile_commmands_path) - \ ? '--project=compile_commands.json ' + let l:cd_command = ale#handlers#cppcheck#GetCdCommand(a:buffer) + let l:compile_commands_option = ale#handlers#cppcheck#GetCompileCommandsOptions(a:buffer) + let l:buffer_path_include = empty(l:compile_commands_option) + \ ? ale#handlers#cppcheck#GetBufferPathIncludeOptions(a:buffer) \ : '' return l:cd_command - \ . '%e -q --language=c ' - \ . l:compile_commands_option - \ . ale#Var(a:buffer, 'c_cppcheck_options') + \ . '%e -q --language=c' + \ . ale#Pad(l:compile_commands_option) + \ . ale#Pad(ale#Var(a:buffer, 'c_cppcheck_options')) + \ . l:buffer_path_include \ . ' %t' endfunction diff --git a/sources_non_forked/ale/ale_linters/c/cquery.vim b/sources_non_forked/ale/ale_linters/c/cquery.vim index d2be9cd9..ff0f34af 100644 --- a/sources_non_forked/ale/ale_linters/c/cquery.vim +++ b/sources_non_forked/ale/ale_linters/c/cquery.vim @@ -5,13 +5,15 @@ call ale#Set('c_cquery_executable', 'cquery') call ale#Set('c_cquery_cache_directory', expand('~/.cache/cquery')) function! ale_linters#c#cquery#GetProjectRoot(buffer) abort - let l:project_root = ale#path#FindNearestFile(a:buffer, 'compile_commands.json') + " Try to find cquery configuration files first. + let l:config = ale#path#FindNearestFile(a:buffer, '.cquery') - if empty(l:project_root) - let l:project_root = ale#path#FindNearestFile(a:buffer, '.cquery') + if !empty(l:config) + return fnamemodify(l:config, ':h') endif - return !empty(l:project_root) ? fnamemodify(l:project_root, ':h') : '' + " Fall back on default project root detection. + return ale#c#FindProjectRoot(a:buffer) endfunction function! ale_linters#c#cquery#GetInitializationOptions(buffer) abort diff --git a/sources_non_forked/ale/ale_linters/c/gcc.vim b/sources_non_forked/ale/ale_linters/c/gcc.vim index d965965d..1df1018e 100644 --- a/sources_non_forked/ale/ale_linters/c/gcc.vim +++ b/sources_non_forked/ale/ale_linters/c/gcc.vim @@ -9,7 +9,11 @@ function! ale_linters#c#gcc#GetCommand(buffer, output) abort " -iquote with the directory the file is in makes #include work for " headers in the same directory. - return '%e -S -x c -fsyntax-only' + " + " `-o /dev/null` or `-o null` is needed to catch all errors, + " -fsyntax-only doesn't catch everything. + return '%e -S -x c' + \ . ' -o ' . g:ale#util#nul_file \ . ' -iquote ' . ale#Escape(fnamemodify(bufname(a:buffer), ':p:h')) \ . ale#Pad(l:cflags) \ . ale#Pad(ale#Var(a:buffer, 'c_gcc_options')) . ' -' diff --git a/sources_non_forked/ale/ale_linters/cpp/clangcheck.vim b/sources_non_forked/ale/ale_linters/cpp/clangcheck.vim index b511a413..7d32a57c 100644 --- a/sources_non_forked/ale/ale_linters/cpp/clangcheck.vim +++ b/sources_non_forked/ale/ale_linters/cpp/clangcheck.vim @@ -12,7 +12,8 @@ function! ale_linters#cpp#clangcheck#GetCommand(buffer) abort let l:build_dir = ale#Var(a:buffer, 'c_build_dir') if empty(l:build_dir) - let l:build_dir = ale#path#Dirname(ale#c#FindCompileCommands(a:buffer)) + let [l:root, l:json_file] = ale#c#FindCompileCommands(a:buffer) + let l:build_dir = ale#path#Dirname(l:json_file) endif " The extra arguments in the command are used to prevent .plist files from diff --git a/sources_non_forked/ale/ale_linters/cpp/clangd.vim b/sources_non_forked/ale/ale_linters/cpp/clangd.vim index 4a8ff4f6..fab605f4 100644 --- a/sources_non_forked/ale/ale_linters/cpp/clangd.vim +++ b/sources_non_forked/ale/ale_linters/cpp/clangd.vim @@ -4,12 +4,6 @@ call ale#Set('cpp_clangd_executable', 'clangd') call ale#Set('cpp_clangd_options', '') -function! ale_linters#cpp#clangd#GetProjectRoot(buffer) abort - let l:project_root = ale#path#FindNearestFile(a:buffer, 'compile_commands.json') - - return !empty(l:project_root) ? fnamemodify(l:project_root, ':h') : '' -endfunction - function! ale_linters#cpp#clangd#GetCommand(buffer) abort return '%e' . ale#Pad(ale#Var(a:buffer, 'cpp_clangd_options')) endfunction @@ -19,5 +13,5 @@ call ale#linter#Define('cpp', { \ 'lsp': 'stdio', \ 'executable': {b -> ale#Var(b, 'cpp_clangd_executable')}, \ 'command': function('ale_linters#cpp#clangd#GetCommand'), -\ 'project_root': function('ale_linters#cpp#clangd#GetProjectRoot'), +\ 'project_root': function('ale#c#FindProjectRoot'), \}) diff --git a/sources_non_forked/ale/ale_linters/cpp/clangtidy.vim b/sources_non_forked/ale/ale_linters/cpp/clangtidy.vim index 841b795f..085bc332 100644 --- a/sources_non_forked/ale/ale_linters/cpp/clangtidy.vim +++ b/sources_non_forked/ale/ale_linters/cpp/clangtidy.vim @@ -5,9 +5,12 @@ call ale#Set('cpp_clangtidy_executable', 'clang-tidy') " Set this option to check the checks clang-tidy will apply. call ale#Set('cpp_clangtidy_checks', []) -" Set this option to manually set some options for clang-tidy. +" Set this option to manually set some options for clang-tidy to use as compile +" flags. " This will disable compile_commands.json detection. call ale#Set('cpp_clangtidy_options', '') +" Set this option to manually set options for clang-tidy directly. +call ale#Set('cpp_clangtidy_extra_options', '') call ale#Set('c_build_dir', '') function! ale_linters#cpp#clangtidy#GetCommand(buffer) abort @@ -19,8 +22,12 @@ function! ale_linters#cpp#clangtidy#GetCommand(buffer) abort \ ? ale#Var(a:buffer, 'cpp_clangtidy_options') \ : '' + " Get the options to pass directly to clang-tidy + let l:extra_options = ale#Var(a:buffer, 'cpp_clangtidy_extra_options') + return '%e' \ . (!empty(l:checks) ? ' -checks=' . ale#Escape(l:checks) : '') + \ . (!empty(l:extra_options) ? ' ' . ale#Escape(l:extra_options) : '') \ . ' %s' \ . (!empty(l:build_dir) ? ' -p ' . ale#Escape(l:build_dir) : '') \ . (!empty(l:options) ? ' -- ' . l:options : '') diff --git a/sources_non_forked/ale/ale_linters/cpp/cppcheck.vim b/sources_non_forked/ale/ale_linters/cpp/cppcheck.vim index 5173d698..7cd80dbc 100644 --- a/sources_non_forked/ale/ale_linters/cpp/cppcheck.vim +++ b/sources_non_forked/ale/ale_linters/cpp/cppcheck.vim @@ -5,23 +5,17 @@ call ale#Set('cpp_cppcheck_executable', 'cppcheck') call ale#Set('cpp_cppcheck_options', '--enable=style') function! ale_linters#cpp#cppcheck#GetCommand(buffer) abort - " Search upwards from the file for compile_commands.json. - " - " If we find it, we'll `cd` to where the compile_commands.json file is, - " then use the file to set up import paths, etc. - let l:compile_commmands_path = ale#path#FindNearestFile(a:buffer, 'compile_commands.json') - - let l:cd_command = !empty(l:compile_commmands_path) - \ ? ale#path#CdString(fnamemodify(l:compile_commmands_path, ':h')) - \ : '' - let l:compile_commands_option = !empty(l:compile_commmands_path) - \ ? '--project=compile_commands.json ' + let l:cd_command = ale#handlers#cppcheck#GetCdCommand(a:buffer) + let l:compile_commands_option = ale#handlers#cppcheck#GetCompileCommandsOptions(a:buffer) + let l:buffer_path_include = empty(l:compile_commands_option) + \ ? ale#handlers#cppcheck#GetBufferPathIncludeOptions(a:buffer) \ : '' return l:cd_command - \ . '%e -q --language=c++ ' - \ . l:compile_commands_option - \ . ale#Var(a:buffer, 'cpp_cppcheck_options') + \ . '%e -q --language=c++' + \ . ale#Pad(l:compile_commands_option) + \ . ale#Pad(ale#Var(a:buffer, 'cpp_cppcheck_options')) + \ . l:buffer_path_include \ . ' %t' endfunction diff --git a/sources_non_forked/ale/ale_linters/cpp/cquery.vim b/sources_non_forked/ale/ale_linters/cpp/cquery.vim index 0dd9f6ad..2971cdcb 100644 --- a/sources_non_forked/ale/ale_linters/cpp/cquery.vim +++ b/sources_non_forked/ale/ale_linters/cpp/cquery.vim @@ -5,13 +5,15 @@ call ale#Set('cpp_cquery_executable', 'cquery') call ale#Set('cpp_cquery_cache_directory', expand('~/.cache/cquery')) function! ale_linters#cpp#cquery#GetProjectRoot(buffer) abort - let l:project_root = ale#path#FindNearestFile(a:buffer, 'compile_commands.json') + " Try to find cquery configuration files first. + let l:config = ale#path#FindNearestFile(a:buffer, '.cquery') - if empty(l:project_root) - let l:project_root = ale#path#FindNearestFile(a:buffer, '.cquery') + if !empty(l:config) + return fnamemodify(l:config, ':h') endif - return !empty(l:project_root) ? fnamemodify(l:project_root, ':h') : '' + " Fall back on default project root detection. + return ale#c#FindProjectRoot(a:buffer) endfunction function! ale_linters#cpp#cquery#GetInitializationOptions(buffer) abort diff --git a/sources_non_forked/ale/ale_linters/cpp/gcc.vim b/sources_non_forked/ale/ale_linters/cpp/gcc.vim index c427020b..108d6d70 100644 --- a/sources_non_forked/ale/ale_linters/cpp/gcc.vim +++ b/sources_non_forked/ale/ale_linters/cpp/gcc.vim @@ -9,7 +9,11 @@ function! ale_linters#cpp#gcc#GetCommand(buffer, output) abort " -iquote with the directory the file is in makes #include work for " headers in the same directory. - return '%e -S -x c++ -fsyntax-only' + " + " `-o /dev/null` or `-o null` is needed to catch all errors, + " -fsyntax-only doesn't catch everything. + return '%e -S -x c++' + \ . ' -o ' . g:ale#util#nul_file \ . ' -iquote ' . ale#Escape(fnamemodify(bufname(a:buffer), ':p:h')) \ . ale#Pad(l:cflags) \ . ale#Pad(ale#Var(a:buffer, 'cpp_gcc_options')) . ' -' diff --git a/sources_non_forked/ale/ale_linters/cs/csc.vim b/sources_non_forked/ale/ale_linters/cs/csc.vim new file mode 100644 index 00000000..308abc77 --- /dev/null +++ b/sources_non_forked/ale/ale_linters/cs/csc.vim @@ -0,0 +1,95 @@ +call ale#Set('cs_csc_options', '') +call ale#Set('cs_csc_source', '') +call ale#Set('cs_csc_assembly_path', []) +call ale#Set('cs_csc_assemblies', []) + +function! s:GetWorkingDirectory(buffer) abort + let l:working_directory = ale#Var(a:buffer, 'cs_csc_source') + + if !empty(l:working_directory) + return l:working_directory + endif + + return expand('#' . a:buffer . ':p:h') +endfunction + +function! ale_linters#cs#csc#GetCommand(buffer) abort + " Pass assembly paths via the -lib: parameter. + let l:path_list = ale#Var(a:buffer, 'cs_csc_assembly_path') + + let l:lib_option = !empty(l:path_list) + \ ? '/lib:' . join(map(copy(l:path_list), 'ale#Escape(v:val)'), ',') + \ : '' + + " Pass paths to DLL files via the -r: parameter. + let l:assembly_list = ale#Var(a:buffer, 'cs_csc_assemblies') + + let l:r_option = !empty(l:assembly_list) + \ ? '/r:' . join(map(copy(l:assembly_list), 'ale#Escape(v:val)'), ',') + \ : '' + + " register temporary module target file with ale + " register temporary module target file with ALE. + let l:out = ale#command#CreateFile(a:buffer) + + " The code is compiled as a module and the output is redirected to a + " temporary file. + return ale#path#CdString(s:GetWorkingDirectory(a:buffer)) + \ . 'csc /unsafe' + \ . ale#Pad(ale#Var(a:buffer, 'cs_csc_options')) + \ . ale#Pad(l:lib_option) + \ . ale#Pad(l:r_option) + \ . ' /out:' . l:out + \ . ' /t:module' + \ . ' /recurse:' . ale#Escape('*.cs') +endfunction + +function! ale_linters#cs#csc#Handle(buffer, lines) abort + " Look for lines like the following. + " + " Tests.cs(12,29): error CSXXXX: ; expected + " + " NOTE: pattern also captures file name as linter compiles all + " files within the source tree rooted at the specified source + " path and not just the file loaded in the buffer + let l:patterns = [ + \ '^\v(.+\.cs)\((\d+),(\d+)\)\:\s+([^ ]+)\s+([cC][sS][^ ]+):\s(.+)$', + \ '^\v([^ ]+)\s+([Cc][sS][^ ]+):\s+(.+)$', + \] + let l:output = [] + + let l:dir = s:GetWorkingDirectory(a:buffer) + + for l:match in ale#util#GetMatches(a:lines, l:patterns) + if len(l:match) > 6 && strlen(l:match[5]) > 2 && l:match[5][:1] is? 'CS' + call add(l:output, { + \ 'filename': ale#path#GetAbsPath(l:dir, l:match[1]), + \ 'lnum': l:match[2] + 0, + \ 'col': l:match[3] + 0, + \ 'type': l:match[4] is# 'error' ? 'E' : 'W', + \ 'code': l:match[5], + \ 'text': l:match[6] , + \}) + elseif strlen(l:match[2]) > 2 && l:match[2][:1] is? 'CS' + call add(l:output, { + \ 'filename':'', + \ 'lnum': -1, + \ 'col': -1, + \ 'type': l:match[1] is# 'error' ? 'E' : 'W', + \ 'code': l:match[2], + \ 'text': l:match[3], + \}) + endif + endfor + + return l:output +endfunction + +call ale#linter#Define('cs',{ +\ 'name': 'csc', +\ 'output_stream': 'stdout', +\ 'executable': 'csc', +\ 'command': function('ale_linters#cs#csc#GetCommand'), +\ 'callback': 'ale_linters#cs#csc#Handle', +\ 'lint_file': 1 +\}) diff --git a/sources_non_forked/ale/ale_linters/cs/mcsc.vim b/sources_non_forked/ale/ale_linters/cs/mcsc.vim index dd067eba..0e4e5667 100644 --- a/sources_non_forked/ale/ale_linters/cs/mcsc.vim +++ b/sources_non_forked/ale/ale_linters/cs/mcsc.vim @@ -52,20 +52,34 @@ function! ale_linters#cs#mcsc#Handle(buffer, lines) abort " NOTE: pattern also captures file name as linter compiles all " files within the source tree rooted at the specified source " path and not just the file loaded in the buffer - let l:pattern = '^\v(.+\.cs)\((\d+),(\d+)\)\: ([^ ]+) ([^ ]+): (.+)$' + let l:patterns = [ + \ '^\v(.+\.cs)\((\d+),(\d+)\)\:\s+([^ ]+)\s+([cC][sS][^ ]+):\s(.+)$', + \ '^\v([^ ]+)\s+([Cc][sS][^ ]+):\s+(.+)$', + \] let l:output = [] let l:dir = s:GetWorkingDirectory(a:buffer) - for l:match in ale#util#GetMatches(a:lines, l:pattern) - call add(l:output, { - \ 'filename': ale#path#GetAbsPath(l:dir, l:match[1]), - \ 'lnum': l:match[2] + 0, - \ 'col': l:match[3] + 0, - \ 'type': l:match[4] is# 'error' ? 'E' : 'W', - \ 'code': l:match[5], - \ 'text': l:match[6], - \}) + for l:match in ale#util#GetMatches(a:lines, l:patterns) + if len(l:match) > 6 && strlen(l:match[5]) > 2 && l:match[5][:1] is? 'CS' + call add(l:output, { + \ 'filename': ale#path#GetAbsPath(l:dir, l:match[1]), + \ 'lnum': l:match[2] + 0, + \ 'col': l:match[3] + 0, + \ 'type': l:match[4] is# 'error' ? 'E' : 'W', + \ 'code': l:match[5], + \ 'text': l:match[6] , + \}) + elseif strlen(l:match[2]) > 2 && l:match[2][:1] is? 'CS' + call add(l:output, { + \ 'filename':'', + \ 'lnum': -1, + \ 'col': -1, + \ 'type': l:match[1] is# 'error' ? 'E' : 'W', + \ 'code': l:match[2], + \ 'text': l:match[3], + \}) + endif endfor return l:output diff --git a/sources_non_forked/ale/ale_linters/elm/elm_ls.vim b/sources_non_forked/ale/ale_linters/elm/elm_ls.vim new file mode 100644 index 00000000..374ef8de --- /dev/null +++ b/sources_non_forked/ale/ale_linters/elm/elm_ls.vim @@ -0,0 +1,37 @@ +" Author: antew - https://github.com/antew +" Description: elm-language-server integration for elm (diagnostics, formatting, and more) + +call ale#Set('elm_ls_executable', 'elm-language-server') +call ale#Set('elm_ls_use_global', get(g:, 'ale_use_global_executables', 1)) +call ale#Set('elm_ls_elm_path', 'elm') +call ale#Set('elm_ls_elm_format_path', 'elm-format') +call ale#Set('elm_ls_elm_test_path', 'elm-test') + +function! elm_ls#GetRootDir(buffer) abort + let l:elm_json = ale#path#FindNearestFile(a:buffer, 'elm.json') + + return !empty(l:elm_json) ? fnamemodify(l:elm_json, ':p:h') : '' +endfunction + +function! elm_ls#GetOptions(buffer) abort + return { + \ 'runtime': 'node', + \ 'elmPath': ale#Var(a:buffer, 'elm_ls_elm_path'), + \ 'elmFormatPath': ale#Var(a:buffer, 'elm_ls_elm_format_path'), + \ 'elmTestPath': ale#Var(a:buffer, 'elm_ls_elm_test_path'), + \} +endfunction + +call ale#linter#Define('elm', { +\ 'name': 'elm_ls', +\ 'lsp': 'stdio', +\ 'executable': {b -> ale#node#FindExecutable(b, 'elm_ls', [ +\ 'node_modules/.bin/elm-language-server', +\ 'node_modules/.bin/elm-lsp', +\ 'elm-lsp' +\ ])}, +\ 'command': '%e --stdio', +\ 'project_root': function('elm_ls#GetRootDir'), +\ 'language': 'elm', +\ 'initialization_options': function('elm_ls#GetOptions') +\}) diff --git a/sources_non_forked/ale/ale_linters/elm/elm_lsp.vim b/sources_non_forked/ale/ale_linters/elm/elm_lsp.vim deleted file mode 100644 index 2259286f..00000000 --- a/sources_non_forked/ale/ale_linters/elm/elm_lsp.vim +++ /dev/null @@ -1,22 +0,0 @@ -" Author: antew - https://github.com/antew -" Description: LSP integration for elm, currently supports diagnostics (linting) - -call ale#Set('elm_lsp_executable', 'elm-lsp') -call ale#Set('elm_lsp_use_global', get(g:, 'ale_use_global_executables', 0)) - -function! elm_lsp#GetRootDir(buffer) abort - let l:elm_json = ale#path#FindNearestFile(a:buffer, 'elm.json') - - return !empty(l:elm_json) ? fnamemodify(l:elm_json, ':p:h') : '' -endfunction - -call ale#linter#Define('elm', { -\ 'name': 'elm_lsp', -\ 'lsp': 'stdio', -\ 'executable': {b -> ale#node#FindExecutable(b, 'elm_lsp', [ -\ 'node_modules/.bin/elm-lsp', -\ ])}, -\ 'command': '%e --stdio', -\ 'project_root': function('elm_lsp#GetRootDir'), -\ 'language': 'elm' -\}) diff --git a/sources_non_forked/ale/ale_linters/erlang/dialyzer.vim b/sources_non_forked/ale/ale_linters/erlang/dialyzer.vim new file mode 100644 index 00000000..7af64c4f --- /dev/null +++ b/sources_non_forked/ale/ale_linters/erlang/dialyzer.vim @@ -0,0 +1,93 @@ +" Author: Autoine Gagne - https://github.com/AntoineGagne +" Description: Define a checker that runs dialyzer on Erlang files. + +let g:ale_erlang_dialyzer_executable = +\ get(g:, 'ale_erlang_dialyzer_executable', 'dialyzer') +let g:ale_erlang_dialyzer_plt_file = +\ get(g:, 'ale_erlang_dialyzer_plt_file', '') +let g:ale_erlang_dialyzer_rebar3_profile = +\ get(g:, 'ale_erlang_dialyzer_rebar3_profile', 'default') + +function! ale_linters#erlang#dialyzer#GetRebar3Profile(buffer) abort + return ale#Var(a:buffer, 'erlang_dialyzer_rebar3_profile') +endfunction + +function! ale_linters#erlang#dialyzer#FindPlt(buffer) abort + let l:plt_file = '' + let l:rebar3_profile = ale_linters#erlang#dialyzer#GetRebar3Profile(a:buffer) + let l:plt_file_directory = ale#path#FindNearestDirectory(a:buffer, '_build' . l:rebar3_profile) + + if !empty(l:plt_file_directory) + let l:plt_file = split(globpath(l:plt_file_directory, '/*_plt'), '\n') + endif + + if !empty(l:plt_file) + return l:plt_file[0] + endif + + if !empty($REBAR_PLT_DIR) + return expand('$REBAR_PLT_DIR/dialyzer/plt') + endif + + return expand('$HOME/.dialyzer_plt') +endfunction + +function! ale_linters#erlang#dialyzer#GetPlt(buffer) abort + let l:plt_file = ale#Var(a:buffer, 'erlang_dialyzer_plt_file') + + if !empty(l:plt_file) + return l:plt_file + endif + + return ale_linters#erlang#dialyzer#FindPlt(a:buffer) +endfunction + +function! ale_linters#erlang#dialyzer#GetExecutable(buffer) abort + return ale#Var(a:buffer, 'erlang_dialyzer_executable') +endfunction + +function! ale_linters#erlang#dialyzer#GetCommand(buffer) abort + let l:command = ale#Escape(ale_linters#erlang#dialyzer#GetExecutable(a:buffer)) + \ . ' -n' + \ . ' --plt ' . ale#Escape(ale_linters#erlang#dialyzer#GetPlt(a:buffer)) + \ . ' -Wunmatched_returns' + \ . ' -Werror_handling' + \ . ' -Wrace_conditions' + \ . ' -Wunderspecs' + \ . ' %s' + + return l:command +endfunction + +function! ale_linters#erlang#dialyzer#Handle(buffer, lines) abort + " Match patterns like the following: + " + " erl_tidy_prv_fmt.erl:3: Callback info about the provider behaviour is not available + let l:pattern = '^\S\+:\(\d\+\): \(.\+\)$' + let l:output = [] + + for l:line in a:lines + let l:match = matchlist(l:line, l:pattern) + + if len(l:match) != 0 + let l:code = l:match[2] + + call add(l:output, { + \ 'lnum': str2nr(l:match[1]), + \ 'lcol': 0, + \ 'text': l:code, + \ 'type': 'W' + \}) + endif + endfor + + return l:output +endfunction + +call ale#linter#Define('erlang', { +\ 'name': 'dialyzer', +\ 'executable': function('ale_linters#erlang#dialyzer#GetExecutable'), +\ 'command': function('ale_linters#erlang#dialyzer#GetCommand'), +\ 'callback': function('ale_linters#erlang#dialyzer#Handle'), +\ 'lint_file': 1 +\}) diff --git a/sources_non_forked/ale/ale_linters/go/bingo.vim b/sources_non_forked/ale/ale_linters/go/bingo.vim index e446bdcc..1e43f8e4 100644 --- a/sources_non_forked/ale/ale_linters/go/bingo.vim +++ b/sources_non_forked/ale/ale_linters/go/bingo.vim @@ -5,11 +5,13 @@ call ale#Set('go_bingo_executable', 'bingo') call ale#Set('go_bingo_options', '--mode stdio') function! ale_linters#go#bingo#GetCommand(buffer) abort - return '%e' . ale#Pad(ale#Var(a:buffer, 'go_bingo_options')) + return ale#go#EnvString(a:buffer) . '%e' . ale#Pad(ale#Var(a:buffer, 'go_bingo_options')) endfunction function! ale_linters#go#bingo#FindProjectRoot(buffer) abort - let l:project_root = ale#path#FindNearestFile(a:buffer, 'go.mod') + let l:go_modules_off = ale#Var(a:buffer, 'go_go111module') is# 'off' + let l:project_root = l:go_modules_off ? + \ '' : ale#path#FindNearestFile(a:buffer, 'go.mod') let l:mods = ':h' if empty(l:project_root) diff --git a/sources_non_forked/ale/ale_linters/go/gobuild.vim b/sources_non_forked/ale/ale_linters/go/gobuild.vim index 374ded35..1dfb6daa 100644 --- a/sources_non_forked/ale/ale_linters/go/gobuild.vim +++ b/sources_non_forked/ale/ale_linters/go/gobuild.vim @@ -11,6 +11,7 @@ function! ale_linters#go#gobuild#GetCommand(buffer) abort " Run go test in local directory with relative path return ale#path#BufferCdString(a:buffer) + \ . ale#go#EnvString(a:buffer) \ . ale#Var(a:buffer, 'go_go_executable') . ' test' \ . (!empty(l:options) ? ' ' . l:options : '') \ . ' -c -o /dev/null ./' diff --git a/sources_non_forked/ale/ale_linters/go/gofmt.vim b/sources_non_forked/ale/ale_linters/go/gofmt.vim index 337deef8..a233b422 100644 --- a/sources_non_forked/ale/ale_linters/go/gofmt.vim +++ b/sources_non_forked/ale/ale_linters/go/gofmt.vim @@ -1,10 +1,16 @@ " Author: neersighted " Description: gofmt for Go files +function! ale_linters#go#gofmt#GetCommand(buffer) abort + return ale#go#EnvString(a:buffer) + \ . '%e -e %t' +endfunction + + call ale#linter#Define('go', { \ 'name': 'gofmt', \ 'output_stream': 'stderr', \ 'executable': 'gofmt', -\ 'command': 'gofmt -e %t', +\ 'command': function('ale_linters#go#gofmt#GetCommand'), \ 'callback': 'ale#handlers#unix#HandleAsError', \}) diff --git a/sources_non_forked/ale/ale_linters/go/golangci_lint.vim b/sources_non_forked/ale/ale_linters/go/golangci_lint.vim index 357f7949..dd0e975a 100644 --- a/sources_non_forked/ale/ale_linters/go/golangci_lint.vim +++ b/sources_non_forked/ale/ale_linters/go/golangci_lint.vim @@ -10,13 +10,16 @@ function! ale_linters#go#golangci_lint#GetCommand(buffer) abort let l:options = ale#Var(a:buffer, 'go_golangci_lint_options') let l:lint_package = ale#Var(a:buffer, 'go_golangci_lint_package') + if l:lint_package return ale#path#BufferCdString(a:buffer) + \ . ale#go#EnvString(a:buffer) \ . '%e run ' \ . l:options endif return ale#path#BufferCdString(a:buffer) + \ . ale#go#EnvString(a:buffer) \ . '%e run ' \ . ale#Escape(l:filename) \ . ' ' . l:options diff --git a/sources_non_forked/ale/ale_linters/go/golint.vim b/sources_non_forked/ale/ale_linters/go/golint.vim index 765e1477..79bfaeb5 100644 --- a/sources_non_forked/ale/ale_linters/go/golint.vim +++ b/sources_non_forked/ale/ale_linters/go/golint.vim @@ -7,7 +7,7 @@ call ale#Set('go_golint_options', '') function! ale_linters#go#golint#GetCommand(buffer) abort let l:options = ale#Var(a:buffer, 'go_golint_options') - return '%e' + return ale#go#EnvString(a:buffer) . '%e' \ . (!empty(l:options) ? ' ' . l:options : '') \ . ' %t' endfunction diff --git a/sources_non_forked/ale/ale_linters/go/gometalinter.vim b/sources_non_forked/ale/ale_linters/go/gometalinter.vim index 19d70a81..eed9550a 100644 --- a/sources_non_forked/ale/ale_linters/go/gometalinter.vim +++ b/sources_non_forked/ale/ale_linters/go/gometalinter.vim @@ -14,11 +14,13 @@ function! ale_linters#go#gometalinter#GetCommand(buffer) abort " be calculated to absolute paths in the Handler if l:lint_package return ale#path#BufferCdString(a:buffer) + \ . ale#go#EnvString(a:buffer) \ . '%e' \ . (!empty(l:options) ? ' ' . l:options : '') . ' .' endif return ale#path#BufferCdString(a:buffer) + \ . ale#go#EnvString(a:buffer) \ . '%e' \ . ' --include=' . ale#Escape(ale#util#EscapePCRE(l:filename)) \ . (!empty(l:options) ? ' ' . l:options : '') . ' .' diff --git a/sources_non_forked/ale/ale_linters/go/gopls.vim b/sources_non_forked/ale/ale_linters/go/gopls.vim index c411dc2b..dcff5ec7 100644 --- a/sources_non_forked/ale/ale_linters/go/gopls.vim +++ b/sources_non_forked/ale/ale_linters/go/gopls.vim @@ -6,11 +6,15 @@ call ale#Set('go_gopls_executable', 'gopls') call ale#Set('go_gopls_options', '--mode stdio') function! ale_linters#go#gopls#GetCommand(buffer) abort - return '%e' . ale#Pad(ale#Var(a:buffer, 'go_gopls_options')) + return ale#go#EnvString(a:buffer) + \ . '%e' + \ . ale#Pad(ale#Var(a:buffer, 'go_gopls_options')) endfunction function! ale_linters#go#gopls#FindProjectRoot(buffer) abort - let l:project_root = ale#path#FindNearestFile(a:buffer, 'go.mod') + let l:go_modules_off = ale#Var(a:buffer, 'go_go111module') is# 'off' + let l:project_root = l:go_modules_off ? + \ '' : ale#path#FindNearestFile(a:buffer, 'go.mod') let l:mods = ':h' if empty(l:project_root) diff --git a/sources_non_forked/ale/ale_linters/go/gosimple.vim b/sources_non_forked/ale/ale_linters/go/gosimple.vim index 281a0e53..ad52c621 100644 --- a/sources_non_forked/ale/ale_linters/go/gosimple.vim +++ b/sources_non_forked/ale/ale_linters/go/gosimple.vim @@ -2,7 +2,8 @@ " Description: gosimple for Go files function! ale_linters#go#gosimple#GetCommand(buffer) abort - return ale#path#BufferCdString(a:buffer) . ' gosimple .' + return ale#path#BufferCdString(a:buffer) . ' ' + \ . ale#go#EnvString(a:buffer) . 'gosimple .' endfunction call ale#linter#Define('go', { diff --git a/sources_non_forked/ale/ale_linters/go/gotype.vim b/sources_non_forked/ale/ale_linters/go/gotype.vim index d5d563aa..6a5149ca 100644 --- a/sources_non_forked/ale/ale_linters/go/gotype.vim +++ b/sources_non_forked/ale/ale_linters/go/gotype.vim @@ -6,7 +6,8 @@ function! ale_linters#go#gotype#GetCommand(buffer) abort return '' endif - return ale#path#BufferCdString(a:buffer) . ' gotype -e .' + return ale#path#BufferCdString(a:buffer) . ' ' + \ . ale#go#EnvString(a:buffer) . 'gotype -e .' endfunction call ale#linter#Define('go', { diff --git a/sources_non_forked/ale/ale_linters/go/govet.vim b/sources_non_forked/ale/ale_linters/go/govet.vim index bb81d5d0..dddafe17 100644 --- a/sources_non_forked/ale/ale_linters/go/govet.vim +++ b/sources_non_forked/ale/ale_linters/go/govet.vim @@ -11,6 +11,7 @@ function! ale_linters#go#govet#GetCommand(buffer) abort let l:options = ale#Var(a:buffer, 'go_govet_options') return ale#path#BufferCdString(a:buffer) . ' ' + \ . ale#go#EnvString(a:buffer) \ . ale#Var(a:buffer, 'go_go_executable') . ' vet ' \ . (!empty(l:options) ? ' ' . l:options : '') \ . ' .' diff --git a/sources_non_forked/ale/ale_linters/go/langserver.vim b/sources_non_forked/ale/ale_linters/go/langserver.vim index 776186c7..7130db40 100644 --- a/sources_non_forked/ale/ale_linters/go/langserver.vim +++ b/sources_non_forked/ale/ale_linters/go/langserver.vim @@ -15,8 +15,9 @@ function! ale_linters#go#langserver#GetCommand(buffer) abort endif let l:options = uniq(sort(l:options)) + let l:env = ale#go#EnvString(a:buffer) - return join(extend(l:executable, l:options), ' ') + return l:env . join(extend(l:executable, l:options), ' ') endfunction call ale#linter#Define('go', { diff --git a/sources_non_forked/ale/ale_linters/go/staticcheck.vim b/sources_non_forked/ale/ale_linters/go/staticcheck.vim index 26fe0193..ed40c6c2 100644 --- a/sources_non_forked/ale/ale_linters/go/staticcheck.vim +++ b/sources_non_forked/ale/ale_linters/go/staticcheck.vim @@ -8,17 +8,18 @@ function! ale_linters#go#staticcheck#GetCommand(buffer) abort let l:filename = expand('#' . a:buffer . ':t') let l:options = ale#Var(a:buffer, 'go_staticcheck_options') let l:lint_package = ale#Var(a:buffer, 'go_staticcheck_lint_package') + let l:env = ale#go#EnvString(a:buffer) " BufferCdString is used so that we can be sure the paths output from " staticcheck can be calculated to absolute paths in the Handler if l:lint_package return ale#path#BufferCdString(a:buffer) - \ . 'staticcheck' + \ . l:env . 'staticcheck' \ . (!empty(l:options) ? ' ' . l:options : '') . ' .' endif return ale#path#BufferCdString(a:buffer) - \ . 'staticcheck' + \ . l:env . 'staticcheck' \ . (!empty(l:options) ? ' ' . l:options : '') \ . ' ' . ale#Escape(l:filename) endfunction diff --git a/sources_non_forked/ale/ale_linters/java/checkstyle.vim b/sources_non_forked/ale/ale_linters/java/checkstyle.vim index 3159cd55..7901ff7e 100644 --- a/sources_non_forked/ale/ale_linters/java/checkstyle.vim +++ b/sources_non_forked/ale/ale_linters/java/checkstyle.vim @@ -1,6 +1,10 @@ " Author: Devon Meunier " Description: checkstyle for Java files +call ale#Set('java_checkstyle_executable', 'checkstyle') +call ale#Set('java_checkstyle_config', '/google_checks.xml') +call ale#Set('java_checkstyle_options', '') + function! ale_linters#java#checkstyle#Handle(buffer, lines) abort let l:output = [] @@ -17,6 +21,10 @@ function! ale_linters#java#checkstyle#Handle(buffer, lines) abort \}) endfor + if !empty(l:output) + return l:output + endif + " old checkstyle versions let l:pattern = '\v(.+):(\d+): ([^:]+): (.+)$' @@ -31,19 +39,32 @@ function! ale_linters#java#checkstyle#Handle(buffer, lines) abort return l:output endfunction +function! s:GetConfig(buffer, config) abort + if ale#path#IsAbsolute(a:config) + return a:config + endif + + let s:file = ale#path#FindNearestFile(a:buffer, a:config) + + return !empty(s:file) ? s:file : a:config +endfunction + function! ale_linters#java#checkstyle#GetCommand(buffer) abort - return 'checkstyle ' - \ . ale#Var(a:buffer, 'java_checkstyle_options') + let l:options = ale#Var(a:buffer, 'java_checkstyle_options') + let l:config_option = ale#Var(a:buffer, 'java_checkstyle_config') + let l:config = l:options !~# '\v(^| )-c' && !empty(l:config_option) + \ ? s:GetConfig(a:buffer, l:config_option) + \ : '' + + return '%e' + \ . ale#Pad(l:options) + \ . (!empty(l:config) ? ' -c ' . ale#Escape(l:config) : '') \ . ' %s' endfunction -if !exists('g:ale_java_checkstyle_options') - let g:ale_java_checkstyle_options = '-c /google_checks.xml' -endif - call ale#linter#Define('java', { \ 'name': 'checkstyle', -\ 'executable': 'checkstyle', +\ 'executable': {b -> ale#Var(b, 'java_checkstyle_executable')}, \ 'command': function('ale_linters#java#checkstyle#GetCommand'), \ 'callback': 'ale_linters#java#checkstyle#Handle', \ 'lint_file': 1, diff --git a/sources_non_forked/ale/ale_linters/java/eclipselsp.vim b/sources_non_forked/ale/ale_linters/java/eclipselsp.vim index d0ea9d6c..2648893b 100644 --- a/sources_non_forked/ale/ale_linters/java/eclipselsp.vim +++ b/sources_non_forked/ale/ale_linters/java/eclipselsp.vim @@ -4,6 +4,8 @@ let s:version_cache = {} call ale#Set('java_eclipselsp_path', ale#path#Simplify($HOME . '/eclipse.jdt.ls')) +call ale#Set('java_eclipselsp_config_path', '') +call ale#Set('java_eclipselsp_workspace_path', '') call ale#Set('java_eclipselsp_executable', 'java') function! ale_linters#java#eclipselsp#Executable(buffer) abort @@ -32,11 +34,23 @@ function! ale_linters#java#eclipselsp#JarPath(buffer) abort return l:files[0] endif + " Search jar file within system package path + let l:files = globpath('/usr/share/java/jdtls/plugins', 'org.eclipse.equinox.launcher_\d\.\d\.\d\d\d\.*\.jar', 1, 1) + + if len(l:files) == 1 + return l:files[0] + endif + return '' endfunction function! ale_linters#java#eclipselsp#ConfigurationPath(buffer) abort let l:path = fnamemodify(ale_linters#java#eclipselsp#JarPath(a:buffer), ':p:h:h') + let l:config_path = ale#Var(a:buffer, 'java_eclipselsp_config_path') + + if !empty(l:config_path) + return ale#path#Simplify(l:config_path) + endif if has('win32') let l:path = l:path . '/config_win' @@ -76,6 +90,16 @@ function! ale_linters#java#eclipselsp#CommandWithVersion(buffer, version_lines, return ale_linters#java#eclipselsp#Command(a:buffer, l:version) endfunction +function! ale_linters#java#eclipselsp#WorkspacePath(buffer) abort + let l:wspath = ale#Var(a:buffer, 'java_eclipselsp_workspace_path') + + if !empty(l:wspath) + return l:wspath + endif + + return ale#path#Dirname(ale#java#FindProjectRoot(a:buffer)) +endfunction + function! ale_linters#java#eclipselsp#Command(buffer, version) abort let l:path = ale#Var(a:buffer, 'java_eclipselsp_path') @@ -89,11 +113,11 @@ function! ale_linters#java#eclipselsp#Command(buffer, version) abort \ '-noverify', \ '-Xmx1G', \ '-jar', - \ ale_linters#java#eclipselsp#JarPath(a:buffer), + \ ale#Escape(ale_linters#java#eclipselsp#JarPath(a:buffer)), \ '-configuration', - \ ale_linters#java#eclipselsp#ConfigurationPath(a:buffer), + \ ale#Escape(ale_linters#java#eclipselsp#ConfigurationPath(a:buffer)), \ '-data', - \ ale#java#FindProjectRoot(a:buffer) + \ ale#Escape(ale_linters#java#eclipselsp#WorkspacePath(a:buffer)) \ ] if ale#semver#GTE(a:version, [1, 9]) diff --git a/sources_non_forked/ale/ale_linters/java/javac.vim b/sources_non_forked/ale/ale_linters/java/javac.vim index 3883783b..8bb52c0b 100644 --- a/sources_non_forked/ale/ale_linters/java/javac.vim +++ b/sources_non_forked/ale/ale_linters/java/javac.vim @@ -21,6 +21,11 @@ function! ale_linters#java#javac#RunWithImportPaths(buffer) abort let l:command = ale#gradle#BuildClasspathCommand(a:buffer) endif + " Try to use Ant if Gradle and Maven aren't available + if empty(l:command) + let l:command = ale#ant#BuildClasspathCommand(a:buffer) + endif + if empty(l:command) return ale_linters#java#javac#GetCommand(a:buffer, [], {}) endif diff --git a/sources_non_forked/ale/ale_linters/java/javalsp.vim b/sources_non_forked/ale/ale_linters/java/javalsp.vim index a327363d..baf584c8 100644 --- a/sources_non_forked/ale/ale_linters/java/javalsp.vim +++ b/sources_non_forked/ale/ale_linters/java/javalsp.vim @@ -1,16 +1,47 @@ " Author: Horacio Sanson " Description: Support for the Java language server https://github.com/georgewfraser/vscode-javac -call ale#Set('java_javalsp_executable', 'java') +call ale#Set('java_javalsp_executable', '') +call ale#Set('java_javalsp_config', {}) function! ale_linters#java#javalsp#Executable(buffer) abort return ale#Var(a:buffer, 'java_javalsp_executable') endfunction +function! ale_linters#java#javalsp#Config(buffer) abort + let l:defaults = { 'java': { 'classPath': [], 'externalDependencies': [] } } + let l:config = ale#Var(a:buffer, 'java_javalsp_config') + + " Ensure the config dictionary contains both classPath and + " externalDependencies keys to avoid a NPE crash on Java Language Server. + call extend(l:config, l:defaults, 'keep') + call extend(l:config['java'], l:defaults['java'], 'keep') + + return l:config +endfunction + function! ale_linters#java#javalsp#Command(buffer) abort let l:executable = ale_linters#java#javalsp#Executable(a:buffer) - return ale#Escape(l:executable) . ' -Xverify:none -m javacs/org.javacs.Main' + if fnamemodify(l:executable, ':t') is# 'java' + " For backward compatibility. + let l:cmd = [ + \ ale#Escape(l:executable), + \ '--add-exports jdk.compiler/com.sun.tools.javac.api=javacs', + \ '--add-exports jdk.compiler/com.sun.tools.javac.code=javacs', + \ '--add-exports jdk.compiler/com.sun.tools.javac.comp=javacs', + \ '--add-exports jdk.compiler/com.sun.tools.javac.main=javacs', + \ '--add-exports jdk.compiler/com.sun.tools.javac.tree=javacs', + \ '--add-exports jdk.compiler/com.sun.tools.javac.model=javacs', + \ '--add-exports jdk.compiler/com.sun.tools.javac.util=javacs', + \ '--add-opens jdk.compiler/com.sun.tools.javac.api=javacs', + \ '-m javacs/org.javacs.Main', + \] + + return join(l:cmd, ' ') + else + return ale#Escape(l:executable) + endif endfunction call ale#linter#Define('java', { @@ -20,4 +51,5 @@ call ale#linter#Define('java', { \ 'command': function('ale_linters#java#javalsp#Command'), \ 'language': 'java', \ 'project_root': function('ale#java#FindProjectRoot'), +\ 'lsp_config': function('ale_linters#java#javalsp#Config') \}) diff --git a/sources_non_forked/ale/ale_linters/javascript/eslint.vim b/sources_non_forked/ale/ale_linters/javascript/eslint.vim index 8aeac2d8..31fb413f 100644 --- a/sources_non_forked/ale/ale_linters/javascript/eslint.vim +++ b/sources_non_forked/ale/ale_linters/javascript/eslint.vim @@ -6,5 +6,5 @@ call ale#linter#Define('javascript', { \ 'output_stream': 'both', \ 'executable': function('ale#handlers#eslint#GetExecutable'), \ 'command': function('ale#handlers#eslint#GetCommand'), -\ 'callback': 'ale#handlers#eslint#Handle', +\ 'callback': 'ale#handlers#eslint#HandleJSON', \}) diff --git a/sources_non_forked/ale/ale_linters/javascript/xo.vim b/sources_non_forked/ale/ale_linters/javascript/xo.vim index 4ba39101..e24f4a82 100644 --- a/sources_non_forked/ale/ale_linters/javascript/xo.vim +++ b/sources_non_forked/ale/ale_linters/javascript/xo.vim @@ -14,7 +14,7 @@ endfunction function! ale_linters#javascript#xo#GetCommand(buffer) abort return ale#Escape(ale_linters#javascript#xo#GetExecutable(a:buffer)) \ . ' ' . ale#Var(a:buffer, 'javascript_xo_options') - \ . ' --reporter unix --stdin --stdin-filename %s' + \ . ' --reporter json --stdin --stdin-filename %s' endfunction " xo uses eslint and the output format is the same @@ -22,5 +22,5 @@ call ale#linter#Define('javascript', { \ 'name': 'xo', \ 'executable': function('ale_linters#javascript#xo#GetExecutable'), \ 'command': function('ale_linters#javascript#xo#GetCommand'), -\ 'callback': 'ale#handlers#eslint#Handle', +\ 'callback': 'ale#handlers#eslint#HandleJSON', \}) diff --git a/sources_non_forked/ale/ale_linters/objc/clangd.vim b/sources_non_forked/ale/ale_linters/objc/clangd.vim index ab52fec3..318d85b5 100644 --- a/sources_non_forked/ale/ale_linters/objc/clangd.vim +++ b/sources_non_forked/ale/ale_linters/objc/clangd.vim @@ -4,12 +4,6 @@ call ale#Set('objc_clangd_executable', 'clangd') call ale#Set('objc_clangd_options', '') -function! ale_linters#objc#clangd#GetProjectRoot(buffer) abort - let l:project_root = ale#path#FindNearestFile(a:buffer, 'compile_commands.json') - - return !empty(l:project_root) ? fnamemodify(l:project_root, ':h') : '' -endfunction - function! ale_linters#objc#clangd#GetCommand(buffer) abort return '%e' . ale#Pad(ale#Var(a:buffer, 'objc_clangd_options')) endfunction @@ -19,5 +13,5 @@ call ale#linter#Define('objc', { \ 'lsp': 'stdio', \ 'executable': {b -> ale#Var(b, 'objc_clangd_executable')}, \ 'command': function('ale_linters#objc#clangd#GetCommand'), -\ 'project_root': function('ale_linters#objc#clangd#GetProjectRoot'), +\ 'project_root': function('ale#c#FindProjectRoot'), \}) diff --git a/sources_non_forked/ale/ale_linters/objcpp/clangd.vim b/sources_non_forked/ale/ale_linters/objcpp/clangd.vim index 3991d2ac..29455325 100644 --- a/sources_non_forked/ale/ale_linters/objcpp/clangd.vim +++ b/sources_non_forked/ale/ale_linters/objcpp/clangd.vim @@ -4,12 +4,6 @@ call ale#Set('objcpp_clangd_executable', 'clangd') call ale#Set('objcpp_clangd_options', '') -function! ale_linters#objcpp#clangd#GetProjectRoot(buffer) abort - let l:project_root = ale#path#FindNearestFile(a:buffer, 'compile_commands.json') - - return !empty(l:project_root) ? fnamemodify(l:project_root, ':h') : '' -endfunction - function! ale_linters#objcpp#clangd#GetCommand(buffer) abort return '%e' . ale#Pad(ale#Var(a:buffer, 'objcpp_clangd_options')) endfunction @@ -19,5 +13,5 @@ call ale#linter#Define('objcpp', { \ 'lsp': 'stdio', \ 'executable': {b -> ale#Var(b, 'objcpp_clangd_executable')}, \ 'command': function('ale_linters#objcpp#clangd#GetCommand'), -\ 'project_root': function('ale_linters#objcpp#clangd#GetProjectRoot'), +\ 'project_root': function('ale#c#FindProjectRoot'), \}) diff --git a/sources_non_forked/ale/ale_linters/php/phpcs.vim b/sources_non_forked/ale/ale_linters/php/phpcs.vim index 1c92bbb2..11b81e84 100644 --- a/sources_non_forked/ale/ale_linters/php/phpcs.vim +++ b/sources_non_forked/ale/ale_linters/php/phpcs.vim @@ -10,13 +10,13 @@ call ale#Set('php_phpcs_use_global', get(g:, 'ale_use_global_executables', 0)) function! ale_linters#php#phpcs#GetCommand(buffer) abort let l:standard = ale#Var(a:buffer, 'php_phpcs_standard') let l:standard_option = !empty(l:standard) - \ ? '--standard=' . l:standard + \ ? '--standard=' . ale#Escape(l:standard) \ : '' - let l:options = ale#Var(a:buffer, 'php_phpcs_options') - return '%e -s --report=emacs --stdin-path=%s' - \ . ale#Pad(l:standard_option) - \ . ale#Pad(l:options) + return ale#path#BufferCdString(a:buffer) + \ . '%e -s --report=emacs --stdin-path=%s' + \ . ale#Pad(l:standard_option) + \ . ale#Pad(ale#Var(a:buffer, 'php_phpcs_options')) endfunction function! ale_linters#php#phpcs#Handle(buffer, lines) abort @@ -36,6 +36,7 @@ function! ale_linters#php#phpcs#Handle(buffer, lines) abort \ 'col': l:match[2] + 0, \ 'text': l:text, \ 'type': l:type is# 'error' ? 'E' : 'W', + \ 'sub_type': 'style', \}) endfor diff --git a/sources_non_forked/ale/ale_linters/powershell/powershell.vim b/sources_non_forked/ale/ale_linters/powershell/powershell.vim index 51ded71d..a63191fd 100644 --- a/sources_non_forked/ale/ale_linters/powershell/powershell.vim +++ b/sources_non_forked/ale/ale_linters/powershell/powershell.vim @@ -49,11 +49,19 @@ function! ale_linters#powershell#powershell#Handle(buffer, lines) abort let l:matchcount = 1 endif - let l:item = { - \ 'lnum': str2nr(l:match[1]), - \ 'col': str2nr(l:match[2]), - \ 'type': 'E', - \} + " If the match is 0, it was a failed match + " probably due to an unexpected token which + " contained a newline. Reset matchcount. to + " continue to the next match + if !empty(l:match[1]) + let l:item = { + \ 'lnum': str2nr(l:match[1]), + \ 'col': str2nr(l:match[2]), + \ 'type': 'E', + \} + else + let l:matchcount = 0 + endif elseif l:matchcount == 2 " Second match[0] grabs the full line in order " to handles the text @@ -84,8 +92,8 @@ endfunction call ale#linter#Define('powershell', { \ 'name': 'powershell', -\ 'executable_callback': 'ale_linters#powershell#powershell#GetExecutable', -\ 'command_callback': 'ale_linters#powershell#powershell#GetCommand', +\ 'executable': function('ale_linters#powershell#powershell#GetExecutable'), +\ 'command': function('ale_linters#powershell#powershell#GetCommand'), \ 'output_stream': 'stdout', \ 'callback': 'ale_linters#powershell#powershell#Handle', \}) diff --git a/sources_non_forked/ale/ale_linters/pug/puglint.vim b/sources_non_forked/ale/ale_linters/pug/puglint.vim index c4e0e233..c819cc45 100644 --- a/sources_non_forked/ale/ale_linters/pug/puglint.vim +++ b/sources_non_forked/ale/ale_linters/pug/puglint.vim @@ -31,6 +31,20 @@ function! ale_linters#pug#puglint#GetCommand(buffer) abort \ . ' -r inline %t' endfunction +function! ale_linters#pug#puglint#Handle(buffer, lines) abort + for l:line in a:lines[:10] + if l:line =~# '^SyntaxError: ' + return [{ + \ 'lnum': 1, + \ 'text': 'puglint configuration error (type :ALEDetail for more information)', + \ 'detail': join(a:lines, "\n"), + \}] + endif + endfor + + return ale#handlers#unix#HandleAsError(a:buffer, a:lines) +endfunction + call ale#linter#Define('pug', { \ 'name': 'puglint', \ 'executable': {b -> ale#node#FindExecutable(b, 'pug_puglint', [ @@ -38,5 +52,5 @@ call ale#linter#Define('pug', { \ ])}, \ 'output_stream': 'stderr', \ 'command': function('ale_linters#pug#puglint#GetCommand'), -\ 'callback': 'ale#handlers#unix#HandleAsError', +\ 'callback': 'ale_linters#pug#puglint#Handle', \}) diff --git a/sources_non_forked/ale/ale_linters/purescript/ls.vim b/sources_non_forked/ale/ale_linters/purescript/ls.vim new file mode 100644 index 00000000..1c5f937f --- /dev/null +++ b/sources_non_forked/ale/ale_linters/purescript/ls.vim @@ -0,0 +1,49 @@ +" Author: Drew Olson +" Description: Integrate ALE with purescript-language-server. + +call ale#Set('purescript_ls_executable', 'purescript-language-server') +call ale#Set('purescript_ls_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('purescript_ls_config', {}) + +function! ale_linters#purescript#ls#GetExecutable(buffer) abort + return ale#node#FindExecutable(a:buffer, 'purescript_ls', [ + \ 'node_modules/.bin/purescript-language-server', + \]) +endfunction + +function! ale_linters#purescript#ls#GetCommand(buffer) abort + let l:executable = ale_linters#purescript#ls#GetExecutable(a:buffer) + + return ale#Escape(l:executable) . ' --stdio' +endfunction + +function! ale_linters#purescript#ls#FindProjectRoot(buffer) abort + let l:config = ale#path#FindNearestFile(a:buffer, 'bower.json') + + if !empty(l:config) + return fnamemodify(l:config, ':h') + endif + + let l:config = ale#path#FindNearestFile(a:buffer, 'psc-package.json') + + if !empty(l:config) + return fnamemodify(l:config, ':h') + endif + + let l:config = ale#path#FindNearestFile(a:buffer, 'spago.dhall') + + if !empty(l:config) + return fnamemodify(l:config, ':h') + endif + + return '' +endfunction + +call ale#linter#Define('purescript', { +\ 'name': 'purescript-language-server', +\ 'lsp': 'stdio', +\ 'executable': function('ale_linters#purescript#ls#GetExecutable'), +\ 'command': function('ale_linters#purescript#ls#GetCommand'), +\ 'project_root': function('ale_linters#purescript#ls#FindProjectRoot'), +\ 'lsp_config': {b -> ale#Var(b, 'purescript_ls_config')}, +\}) diff --git a/sources_non_forked/ale/ale_linters/python/mypy.vim b/sources_non_forked/ale/ale_linters/python/mypy.vim index c4c6507f..dc4044e6 100644 --- a/sources_non_forked/ale/ale_linters/python/mypy.vim +++ b/sources_non_forked/ale/ale_linters/python/mypy.vim @@ -78,4 +78,5 @@ call ale#linter#Define('python', { \ 'executable': function('ale_linters#python#mypy#GetExecutable'), \ 'command': function('ale_linters#python#mypy#GetCommand'), \ 'callback': 'ale_linters#python#mypy#Handle', +\ 'output_stream': 'both' \}) diff --git a/sources_non_forked/ale/ale_linters/reason/ls.vim b/sources_non_forked/ale/ale_linters/reason/ls.vim new file mode 100644 index 00000000..fb1114ae --- /dev/null +++ b/sources_non_forked/ale/ale_linters/reason/ls.vim @@ -0,0 +1,23 @@ +" Author: David Buchan-Swanson +" Description: Integrate ALE with reason-language-server. + +call ale#Set('reason_ls_executable', '') + +function! ale_linters#reason#ls#FindProjectRoot(buffer) abort + let l:reason_config = ale#path#FindNearestFile(a:buffer, 'bsconfig.json') + + if !empty(l:reason_config) + return fnamemodify(l:reason_config, ':h') + endif + + return '' +endfunction + +call ale#linter#Define('reason', { +\ 'name': 'reason-language-server', +\ 'lsp': 'stdio', +\ 'executable': {buffer -> ale#Var(buffer, 'reason_ls_executable')}, +\ 'command': '%e', +\ 'project_root': function('ale_linters#reason#ls#FindProjectRoot'), +\ 'language': 'reason', +\}) diff --git a/sources_non_forked/ale/ale_linters/ruby/sorbet.vim b/sources_non_forked/ale/ale_linters/ruby/sorbet.vim new file mode 100644 index 00000000..ee765a6e --- /dev/null +++ b/sources_non_forked/ale/ale_linters/ruby/sorbet.vim @@ -0,0 +1,23 @@ +call ale#Set('ruby_sorbet_executable', 'srb') +call ale#Set('ruby_sorbet_options', '') + +function! ale_linters#ruby#sorbet#GetCommand(buffer) abort + let l:executable = ale#Var(a:buffer, 'ruby_sorbet_executable') + let l:options = ale#Var(a:buffer, 'ruby_sorbet_options') + + return ale#handlers#ruby#EscapeExecutable(l:executable, 'srb') + \ . ' tc' + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . ' --lsp --disable-watchman' +endfunction + +call ale#linter#Define('ruby', { +\ 'name': 'sorbet', +\ 'aliases': ['srb'], +\ 'lsp': 'stdio', +\ 'language': 'ruby', +\ 'executable': {b -> ale#Var(b, 'ruby_sorbet_executable')}, +\ 'command': function('ale_linters#ruby#sorbet#GetCommand'), +\ 'project_root': function('ale#ruby#FindProjectRoot') +\}) + diff --git a/sources_non_forked/ale/ale_linters/rust/cargo.vim b/sources_non_forked/ale/ale_linters/rust/cargo.vim index f98dee9b..99178585 100644 --- a/sources_non_forked/ale/ale_linters/rust/cargo.vim +++ b/sources_non_forked/ale/ale_linters/rust/cargo.vim @@ -25,14 +25,11 @@ endfunction function! ale_linters#rust#cargo#GetCommand(buffer, version) abort let l:use_check = ale#Var(a:buffer, 'rust_cargo_use_check') \ && ale#semver#GTE(a:version, [0, 17, 0]) - let l:use_all_targets = l:use_check - \ && ale#Var(a:buffer, 'rust_cargo_check_all_targets') + let l:use_all_targets = ale#Var(a:buffer, 'rust_cargo_check_all_targets') \ && ale#semver#GTE(a:version, [0, 22, 0]) - let l:use_examples = l:use_check - \ && ale#Var(a:buffer, 'rust_cargo_check_examples') + let l:use_examples = ale#Var(a:buffer, 'rust_cargo_check_examples') \ && ale#semver#GTE(a:version, [0, 22, 0]) - let l:use_tests = l:use_check - \ && ale#Var(a:buffer, 'rust_cargo_check_tests') + let l:use_tests = ale#Var(a:buffer, 'rust_cargo_check_tests') \ && ale#semver#GTE(a:version, [0, 22, 0]) let l:include_features = ale#Var(a:buffer, 'rust_cargo_include_features') @@ -69,7 +66,15 @@ function! ale_linters#rust#cargo#GetCommand(buffer, version) abort if ale#Var(a:buffer, 'rust_cargo_use_clippy') let l:subcommand = 'clippy' - let l:clippy_options = ' ' . ale#Var(a:buffer, 'rust_cargo_clippy_options') + let l:clippy_options = ale#Var(a:buffer, 'rust_cargo_clippy_options') + + if l:clippy_options =~# '^-- ' + let l:clippy_options = join(split(l:clippy_options, '-- ')) + endif + + if l:clippy_options isnot# '' + let l:clippy_options = ' -- ' . l:clippy_options + endif endif return l:nearest_cargo_prefix . 'cargo ' diff --git a/sources_non_forked/ale/ale_linters/terraform/terraform.vim b/sources_non_forked/ale/ale_linters/terraform/terraform.vim new file mode 100644 index 00000000..0429cb7a --- /dev/null +++ b/sources_non_forked/ale/ale_linters/terraform/terraform.vim @@ -0,0 +1,49 @@ +" Author: Keith Maxwell +" Description: terraform fmt to check for errors + +call ale#Set('terraform_terraform_executable', 'terraform') + +function! ale_linters#terraform#terraform#GetExecutable(buffer) abort + return ale#Var(a:buffer, 'terraform_terraform_executable') +endfunction + +function! ale_linters#terraform#terraform#GetCommand(buffer) abort + return ale#Escape(ale_linters#terraform#terraform#GetExecutable(a:buffer)) + \ . ' fmt -no-color --check=true -' +endfunction + +function! ale_linters#terraform#terraform#Handle(buffer, lines) abort + let l:head = '^Error running fmt: In : ' + let l:output = [] + let l:patterns = [ + \ l:head.'At \(\d\+\):\(\d\+\): \(.*\)$', + \ l:head.'\(.*\)$' + \] + + for l:match in ale#util#GetMatches(a:lines, l:patterns) + if len(l:match[2]) > 0 + call add(l:output, { + \ 'lnum': str2nr(l:match[1]), + \ 'col': str2nr(l:match[2]), + \ 'text': l:match[3], + \ 'type': 'E', + \}) + else + call add(l:output, { + \ 'lnum': line('$'), + \ 'text': l:match[1], + \ 'type': 'E', + \}) + endif + endfor + + return l:output +endfunction + +call ale#linter#Define('terraform', { +\ 'name': 'terraform', +\ 'output_stream': 'stderr', +\ 'executable': function('ale_linters#terraform#terraform#GetExecutable'), +\ 'command': function('ale_linters#terraform#terraform#GetCommand'), +\ 'callback': 'ale_linters#terraform#terraform#Handle', +\}) diff --git a/sources_non_forked/ale/ale_linters/tex/texlab.vim b/sources_non_forked/ale/ale_linters/tex/texlab.vim new file mode 100644 index 00000000..5ead74b4 --- /dev/null +++ b/sources_non_forked/ale/ale_linters/tex/texlab.vim @@ -0,0 +1,21 @@ +" Author: Ricardo Liang +" Description: Texlab language server (Rust rewrite) + +call ale#Set('tex_texlab_executable', 'texlab') +call ale#Set('tex_texlab_options', '') + +function! ale_linters#tex#texlab#GetProjectRoot(buffer) abort + return '' +endfunction + +function! ale_linters#tex#texlab#GetCommand(buffer) abort + return '%e' . ale#Pad(ale#Var(a:buffer, 'tex_texlab_options')) +endfunction + +call ale#linter#Define('tex', { +\ 'name': 'texlab', +\ 'lsp': 'stdio', +\ 'executable': {b -> ale#Var(b, 'tex_texlab_executable')}, +\ 'command': function('ale_linters#tex#texlab#GetCommand'), +\ 'project_root': function('ale_linters#tex#texlab#GetProjectRoot'), +\}) diff --git a/sources_non_forked/ale/ale_linters/typescript/eslint.vim b/sources_non_forked/ale/ale_linters/typescript/eslint.vim index bf849337..33a21440 100644 --- a/sources_non_forked/ale/ale_linters/typescript/eslint.vim +++ b/sources_non_forked/ale/ale_linters/typescript/eslint.vim @@ -5,5 +5,5 @@ call ale#linter#Define('typescript', { \ 'name': 'eslint', \ 'executable': function('ale#handlers#eslint#GetExecutable'), \ 'command': function('ale#handlers#eslint#GetCommand'), -\ 'callback': 'ale#handlers#eslint#Handle', +\ 'callback': 'ale#handlers#eslint#HandleJSON', \}) diff --git a/sources_non_forked/ale/ale_linters/typescript/xo.vim b/sources_non_forked/ale/ale_linters/typescript/xo.vim index 8b015efd..0a3a717b 100644 --- a/sources_non_forked/ale/ale_linters/typescript/xo.vim +++ b/sources_non_forked/ale/ale_linters/typescript/xo.vim @@ -11,7 +11,7 @@ endfunction function! ale_linters#typescript#xo#GetCommand(buffer) abort return ale#Escape(ale_linters#typescript#xo#GetExecutable(a:buffer)) \ . ale#Pad(ale#Var(a:buffer, 'typescript_xo_options')) - \ . ' --reporter unix --stdin --stdin-filename %s' + \ . ' --reporter json --stdin --stdin-filename %s' endfunction " xo uses eslint and the output format is the same @@ -19,5 +19,5 @@ call ale#linter#Define('typescript', { \ 'name': 'xo', \ 'executable': function('ale_linters#typescript#xo#GetExecutable'), \ 'command': function('ale_linters#typescript#xo#GetCommand'), -\ 'callback': 'ale#handlers#eslint#Handle', +\ 'callback': 'ale#handlers#eslint#HandleJSON', \}) diff --git a/sources_non_forked/ale/autoload/ale.vim b/sources_non_forked/ale/autoload/ale.vim index 04329dfd..3a4e79c8 100644 --- a/sources_non_forked/ale/autoload/ale.vim +++ b/sources_non_forked/ale/autoload/ale.vim @@ -156,7 +156,7 @@ function! ale#Queue(delay, ...) abort endif endfunction -let s:current_ale_version = [2, 4, 0] +let s:current_ale_version = [2, 5, 0] " A function used to check for ALE features in files outside of the project. function! ale#Has(feature) abort diff --git a/sources_non_forked/ale/autoload/ale/ant.vim b/sources_non_forked/ale/autoload/ale/ant.vim new file mode 100644 index 00000000..689b444b --- /dev/null +++ b/sources_non_forked/ale/autoload/ale/ant.vim @@ -0,0 +1,41 @@ +" Author: Andrew Lee . +" Inspired by ale/gradle.vim by Michael Pardo +" Description: Functions for working with Ant projects. + +" Given a buffer number, find an Ant project root +function! ale#ant#FindProjectRoot(buffer) abort + let l:build_xml_path = ale#path#FindNearestFile(a:buffer, 'build.xml') + + if !empty(l:build_xml_path) + return fnamemodify(l:build_xml_path, ':h') + endif + + return '' +endfunction + +" Given a buffer number, find the path to the `ant` executable. Returns an empty +" string if cannot find the executable. +function! ale#ant#FindExecutable(buffer) abort + if executable('ant') + return 'ant' + endif + + return '' +endfunction + +" Given a buffer number, build a command to print the classpath of the root +" project. Returns an empty string if cannot build the command. +function! ale#ant#BuildClasspathCommand(buffer) abort + let l:executable = ale#ant#FindExecutable(a:buffer) + let l:project_root = ale#ant#FindProjectRoot(a:buffer) + + if !empty(l:executable) && !empty(l:project_root) + return ale#path#CdString(l:project_root) + \ . ale#Escape(l:executable) + \ . ' classpath' + \ . ' -S' + \ . ' -q' + endif + + return '' +endfunction diff --git a/sources_non_forked/ale/autoload/ale/assert.vim b/sources_non_forked/ale/autoload/ale/assert.vim index ed90792d..dac5efb7 100644 --- a/sources_non_forked/ale/autoload/ale/assert.vim +++ b/sources_non_forked/ale/autoload/ale/assert.vim @@ -96,6 +96,13 @@ function! ale#assert#Fixer(expected_result) abort AssertEqual a:expected_result, l:result endfunction +function! ale#assert#FixerNotExecuted() abort + let l:buffer = bufnr('') + let l:result = s:ProcessDeferredCommands(s:FixerFunction(l:buffer))[-1] + + Assert empty(l:result), "The fixer will be executed when it shouldn't be" +endfunction + function! ale#assert#LinterNotExecuted() abort let l:buffer = bufnr('') let l:linter = s:GetLinter() @@ -158,6 +165,7 @@ endfunction function! ale#assert#SetUpFixerTestCommands() abort command! -nargs=+ GivenCommandOutput :call ale#assert#GivenCommandOutput() command! -nargs=+ AssertFixer :call ale#assert#Fixer() + command! -nargs=0 AssertFixerNotExecuted :call ale#assert#FixerNotExecuted() endfunction " A dummy function for making sure this module is loaded. @@ -316,4 +324,8 @@ function! ale#assert#TearDownFixerTest() abort if exists(':AssertFixer') delcommand AssertFixer endif + + if exists(':AssertFixerNotExecuted') + delcommand AssertFixerNotExecuted + endif endfunction diff --git a/sources_non_forked/ale/autoload/ale/c.vim b/sources_non_forked/ale/autoload/ale/c.vim index a9289e22..5540ec14 100644 --- a/sources_non_forked/ale/autoload/ale/c.vim +++ b/sources_non_forked/ale/autoload/ale/c.vim @@ -23,104 +23,117 @@ function! ale#c#GetBuildDirectory(buffer) abort return l:build_dir endif - return ale#path#Dirname(ale#c#FindCompileCommands(a:buffer)) + let [l:root, l:json_file] = ale#c#FindCompileCommands(a:buffer) + + return ale#path#Dirname(l:json_file) endfunction - -function! ale#c#FindProjectRoot(buffer) abort - for l:project_filename in g:__ale_c_project_filenames - let l:full_path = ale#path#FindNearestFile(a:buffer, l:project_filename) - - if !empty(l:full_path) - let l:path = fnamemodify(l:full_path, ':h') - - " Correct .git path detection. - if fnamemodify(l:path, ':t') is# '.git' - let l:path = fnamemodify(l:path, ':h') - endif - - return l:path - endif - endfor - - return '' -endfunction - -function! ale#c#AreSpecialCharsBalanced(option) abort - " Escape \" - let l:option_escaped = substitute(a:option, '\\"', '', 'g') - - " Retain special chars only - let l:special_chars = substitute(l:option_escaped, '[^"''()`]', '', 'g') - let l:special_chars = split(l:special_chars, '\zs') - - " Check if they are balanced +function! ale#c#ShellSplit(line) abort let l:stack = [] + let l:args = [''] + let l:prev = '' - for l:char in l:special_chars - if l:char is# ')' - if len(l:stack) == 0 || get(l:stack, -1) isnot# '(' - return 0 - endif - - call remove(l:stack, -1) - elseif l:char is# '(' - call add(l:stack, l:char) - else - if len(l:stack) > 0 && get(l:stack, -1) is# l:char + for l:char in split(a:line, '\zs') + if l:char is# '''' + if len(l:stack) > 0 && get(l:stack, -1) is# '''' call remove(l:stack, -1) - else + elseif (len(l:stack) == 0 || get(l:stack, -1) isnot# '"') && l:prev isnot# '\' call add(l:stack, l:char) endif + elseif (l:char is# '"' || l:char is# '`') && l:prev isnot# '\' + if len(l:stack) > 0 && get(l:stack, -1) is# l:char + call remove(l:stack, -1) + elseif len(l:stack) == 0 || get(l:stack, -1) isnot# '''' + call add(l:stack, l:char) + endif + elseif (l:char is# '(' || l:char is# '[' || l:char is# '{') && l:prev isnot# '\' + if len(l:stack) == 0 || get(l:stack, -1) isnot# '''' + call add(l:stack, l:char) + endif + elseif (l:char is# ')' || l:char is# ']' || l:char is# '}') && l:prev isnot# '\' + if len(l:stack) > 0 && get(l:stack, -1) is# {')': '(', ']': '[', '}': '{'}[l:char] + call remove(l:stack, -1) + endif + elseif l:char is# ' ' && len(l:stack) == 0 + if len(get(l:args, -1)) > 0 + call add(l:args, '') + endif + + continue endif + + let l:args[-1] = get(l:args, -1) . l:char endfor - return len(l:stack) == 0 + return l:args endfunction function! ale#c#ParseCFlags(path_prefix, cflag_line) abort - let l:split_lines = split(a:cflag_line) + let l:cflags_list = [] + + let l:split_lines = ale#c#ShellSplit(a:cflag_line) let l:option_index = 0 while l:option_index < len(l:split_lines) - let l:next_option_index = l:option_index + 1 - - " Join space-separated option - while l:next_option_index < len(l:split_lines) - \&& stridx(l:split_lines[l:next_option_index], '-') != 0 - let l:next_option_index += 1 - endwhile - - let l:option = join(l:split_lines[l:option_index : l:next_option_index-1], ' ') - call remove(l:split_lines, l:option_index, l:next_option_index-1) - call insert(l:split_lines, l:option, l:option_index) - - " Ignore invalid or conflicting options - if stridx(l:option, '-') != 0 - \|| stridx(l:option, '-o') == 0 - \|| stridx(l:option, '-c') == 0 - call remove(l:split_lines, l:option_index) - let l:option_index = l:option_index - 1 - " Fix relative path - elseif stridx(l:option, '-I') == 0 - if !(stridx(l:option, ':') == 2+1 || stridx(l:option, '/') == 2+0) - let l:option = '-I' . a:path_prefix . s:sep . l:option[2:] - call remove(l:split_lines, l:option_index) - call insert(l:split_lines, l:option, l:option_index) - endif - endif - + let l:option = l:split_lines[l:option_index] let l:option_index = l:option_index + 1 + + " Include options, that may need relative path fix + if stridx(l:option, '-I') == 0 + \ || stridx(l:option, '-iquote') == 0 + \ || stridx(l:option, '-isystem') == 0 + \ || stridx(l:option, '-idirafter') == 0 + if stridx(l:option, '-I') == 0 && l:option isnot# '-I' + let l:arg = join(split(l:option, '\zs')[2:], '') + let l:option = '-I' + else + let l:arg = l:split_lines[l:option_index] + let l:option_index = l:option_index + 1 + endif + + " Fix relative paths if needed + if stridx(l:arg, s:sep) != 0 && stridx(l:arg, '/') != 0 + let l:rel_path = substitute(l:arg, '"', '', 'g') + let l:rel_path = substitute(l:rel_path, '''', '', 'g') + let l:arg = ale#Escape(a:path_prefix . s:sep . l:rel_path) + endif + + call add(l:cflags_list, l:option) + call add(l:cflags_list, l:arg) + " Options with arg that can be grouped with the option or separate + elseif stridx(l:option, '-D') == 0 || stridx(l:option, '-B') == 0 + call add(l:cflags_list, l:option) + + if l:option is# '-D' || l:option is# '-B' + call add(l:cflags_list, l:split_lines[l:option_index]) + let l:option_index = l:option_index + 1 + endif + " Options that have an argument (always separate) + elseif l:option is# '-iprefix' || stridx(l:option, '-iwithprefix') == 0 + \ || l:option is# '-isysroot' || l:option is# '-imultilib' + call add(l:cflags_list, l:option) + call add(l:cflags_list, l:split_lines[l:option_index]) + let l:option_index = l:option_index + 1 + " Options without argument + elseif (stridx(l:option, '-W') == 0 && stridx(l:option, '-Wa,') != 0 && stridx(l:option, '-Wl,') != 0 && stridx(l:option, '-Wp,') != 0) + \ || l:option is# '-w' || stridx(l:option, '-pedantic') == 0 + \ || l:option is# '-ansi' || stridx(l:option, '-std=') == 0 + \ || (stridx(l:option, '-f') == 0 && stridx(l:option, '-fdump') != 0 && stridx(l:option, '-fdiagnostics') != 0 && stridx(l:option, '-fno-show-column') != 0) + \ || stridx(l:option, '-O') == 0 + \ || l:option is# '-C' || l:option is# '-CC' || l:option is# '-trigraphs' + \ || stridx(l:option, '-nostdinc') == 0 || stridx(l:option, '-iplugindir=') == 0 + \ || stridx(l:option, '--sysroot=') == 0 || l:option is# '--no-sysroot-suffix' + \ || stridx(l:option, '-m') == 0 + call add(l:cflags_list, l:option) + endif endwhile - call uniq(l:split_lines) - - return join(l:split_lines, ' ') + return join(l:cflags_list, ' ') endfunction function! ale#c#ParseCFlagsFromMakeOutput(buffer, make_output) abort if !g:ale_c_parse_makefile - return '' + return v:null endif let l:buffer_filename = expand('#' . a:buffer . ':t') @@ -140,14 +153,17 @@ function! ale#c#ParseCFlagsFromMakeOutput(buffer, make_output) abort return ale#c#ParseCFlags(l:makefile_dir, l:cflag_line) endfunction -" Given a buffer number, find the build subdirectory with compile commands -" The subdirectory is returned without the trailing / +" Given a buffer number, find the project directory containing +" compile_commands.json, and the path to the compile_commands.json file. +" +" If compile_commands.json cannot be found, two empty strings will be +" returned. function! ale#c#FindCompileCommands(buffer) abort " Look above the current source file to find compile_commands.json let l:json_file = ale#path#FindNearestFile(a:buffer, 'compile_commands.json') if !empty(l:json_file) - return l:json_file + return [fnamemodify(l:json_file, ':h'), l:json_file] endif " Search in build directories if we can't find it in the project. @@ -157,12 +173,42 @@ function! ale#c#FindCompileCommands(buffer) abort let l:json_file = l:c_build_dir . s:sep . 'compile_commands.json' if filereadable(l:json_file) - return l:json_file + return [l:path, l:json_file] endif endfor endfor - return '' + return ['', ''] +endfunction + +" Find the project root for C/C++ projects. +" +" The location of compile_commands.json will be used to find project roots. +" +" If compile_commands.json cannot be found, other common configuration files +" will be used to detect the project root. +function! ale#c#FindProjectRoot(buffer) abort + let [l:root, l:json_file] = ale#c#FindCompileCommands(a:buffer) + + " Fall back on detecting the project root based on other filenames. + if empty(l:root) + for l:project_filename in g:__ale_c_project_filenames + let l:full_path = ale#path#FindNearestFile(a:buffer, l:project_filename) + + if !empty(l:full_path) + let l:path = fnamemodify(l:full_path, ':h') + + " Correct .git path detection. + if fnamemodify(l:path, ':t') is# '.git' + let l:path = fnamemodify(l:path, ':h') + endif + + return l:path + endif + endfor + endif + + return l:root endfunction " Cache compile_commands.json data in a Dictionary, so we don't need to read @@ -194,10 +240,14 @@ function! s:GetLookupFromCompileCommandsFile(compile_commands_file) abort let l:raw_data = [] silent! let l:raw_data = json_decode(join(readfile(a:compile_commands_file), '')) + if type(l:raw_data) isnot v:t_list + let l:raw_data = [] + endif + let l:file_lookup = {} let l:dir_lookup = {} - for l:entry in l:raw_data + for l:entry in (type(l:raw_data) is v:t_list ? l:raw_data : []) let l:basename = tolower(fnamemodify(l:entry.file, ':t')) let l:file_lookup[l:basename] = get(l:file_lookup, l:basename, []) + [l:entry] @@ -274,25 +324,25 @@ function! ale#c#FlagsFromCompileCommands(buffer, compile_commands_file) abort endfunction function! ale#c#GetCFlags(buffer, output) abort - let l:cflags = ' ' + let l:cflags = v:null if ale#Var(a:buffer, 'c_parse_makefile') && !empty(a:output) let l:cflags = ale#c#ParseCFlagsFromMakeOutput(a:buffer, a:output) endif if ale#Var(a:buffer, 'c_parse_compile_commands') - let l:json_file = ale#c#FindCompileCommands(a:buffer) + let [l:root, l:json_file] = ale#c#FindCompileCommands(a:buffer) if !empty(l:json_file) let l:cflags = ale#c#FlagsFromCompileCommands(a:buffer, l:json_file) endif endif - if l:cflags is# ' ' + if l:cflags is v:null let l:cflags = ale#c#IncludeOptions(ale#c#FindLocalHeaderPaths(a:buffer)) endif - return l:cflags + return l:cflags isnot v:null ? l:cflags : '' endfunction function! ale#c#GetMakeCommand(buffer) abort diff --git a/sources_non_forked/ale/autoload/ale/completion.vim b/sources_non_forked/ale/autoload/ale/completion.vim index 03cc6471..ebf32909 100644 --- a/sources_non_forked/ale/autoload/ale/completion.vim +++ b/sources_non_forked/ale/autoload/ale/completion.vim @@ -52,6 +52,7 @@ let s:should_complete_map = { \ 'lisp': s:lisp_regex, \ 'typescript': '\v[a-zA-Z$_][a-zA-Z$_0-9]*$|\.$|''$|"$', \ 'rust': '\v[a-zA-Z$_][a-zA-Z$_0-9]*$|\.$|::$', +\ 'cpp': '\v[a-zA-Z$_][a-zA-Z$_0-9]*$|\.$|::$|-\>$', \} " Regular expressions for finding the start column to replace with completion. @@ -59,11 +60,13 @@ let s:omni_start_map = { \ '': '\v[a-zA-Z$_][a-zA-Z$_0-9]*$', \} -" A map of exact characters for triggering LSP completions. +" A map of exact characters for triggering LSP completions. Do not forget to +" update self.input_patterns in ale.py in updating entries in this map. let s:trigger_character_map = { \ '': ['.'], \ 'typescript': ['.', '''', '"'], \ 'rust': ['.', '::'], +\ 'cpp': ['.', '::', '->'], \} function! s:GetFiletypeValue(map, filetype) abort @@ -169,7 +172,7 @@ function! s:ReplaceCompletionOptions() abort let b:ale_old_omnifunc = &l:omnifunc endif - let &l:omnifunc = 'ale#completion#OmniFunc' + let &l:omnifunc = 'ale#completion#AutomaticOmniFunc' endif if l:source is# 'ale-automatic' @@ -215,19 +218,11 @@ function! ale#completion#GetCompletionPosition() abort return l:column - len(l:match) - 1 endfunction +function! ale#completion#GetCompletionPositionForDeoplete(input) abort + return match(a:input, '\k*$') +endfunction + function! ale#completion#GetCompletionResult() abort - " Parse a new response if there is one. - if exists('b:ale_completion_response') - \&& exists('b:ale_completion_parser') - let l:response = b:ale_completion_response - let l:parser = b:ale_completion_parser - - unlet b:ale_completion_response - unlet b:ale_completion_parser - - let b:ale_completion_result = function(l:parser)(l:response) - endif - if exists('b:ale_completion_result') return b:ale_completion_result endif @@ -235,7 +230,7 @@ function! ale#completion#GetCompletionResult() abort return v:null endfunction -function! ale#completion#OmniFunc(findstart, base) abort +function! ale#completion#AutomaticOmniFunc(findstart, base) abort if a:findstart return ale#completion#GetCompletionPosition() else @@ -247,15 +242,20 @@ function! ale#completion#OmniFunc(findstart, base) abort endif endfunction -function! ale#completion#Show(response, completion_parser) abort +function! ale#completion#Show(result) abort if ale#util#Mode() isnot# 'i' return endif " Set the list in the buffer, temporarily replace omnifunc with our " function, and then start omni-completion. - let b:ale_completion_response = a:response - let b:ale_completion_parser = a:completion_parser + let b:ale_completion_result = a:result + + " Don't try to open the completion menu if there's nothing to show. + if empty(b:ale_completion_result) + return + endif + " Replace completion options shortly before opening the menu. call s:ReplaceCompletionOptions() @@ -267,6 +267,14 @@ function! ale#completion#Show(response, completion_parser) abort \ {-> ale#util#FeedKeys("\(ale_show_completion_menu)")} \) endif + + if l:source is# 'ale-callback' + call b:CompleteCallback(b:ale_completion_result) + endif +endfunction + +function! ale#completion#GetAllTriggers() abort + return deepcopy(s:trigger_character_map) endfunction function! s:CompletionStillValid(request_id) abort @@ -279,6 +287,8 @@ function! s:CompletionStillValid(request_id) abort \&& ( \ b:ale_completion_info.column == l:column \ || b:ale_completion_info.source is# 'deoplete' + \ || b:ale_completion_info.source is# 'ale-omnifunc' + \ || b:ale_completion_info.source is# 'ale-callback' \) endfunction @@ -474,8 +484,7 @@ function! ale#completion#HandleTSServerResponse(conn_id, response) abort endif elseif l:command is# 'completionEntryDetails' call ale#completion#Show( - \ a:response, - \ 'ale#completion#ParseTSServerCompletionEntryDetails', + \ ale#completion#ParseTSServerCompletionEntryDetails(a:response), \) endif endfunction @@ -487,8 +496,7 @@ function! ale#completion#HandleLSPResponse(conn_id, response) abort endif call ale#completion#Show( - \ a:response, - \ 'ale#completion#ParseLSPCompletions', + \ ale#completion#ParseLSPCompletions(a:response), \) endfunction @@ -529,10 +537,7 @@ function! s:OnReady(linter, lsp_details) abort let l:message = ale#lsp#message#Completion( \ l:buffer, \ b:ale_completion_info.line, - \ min([ - \ b:ale_completion_info.line_length, - \ b:ale_completion_info.column, - \ ]) + 1, + \ b:ale_completion_info.column, \ ale#completion#GetTriggerCharacter(&filetype, b:ale_completion_info.prefix), \) endif @@ -564,13 +569,26 @@ endfunction " This function can be used to manually trigger autocomplete, even when " g:ale_completion_enabled is set to false -function! ale#completion#GetCompletions(source) abort +function! ale#completion#GetCompletions(...) abort + let l:source = get(a:000, 0, '') + let l:options = get(a:000, 1, {}) + + if len(a:000) > 2 + throw 'Too many arguments!' + endif + + let l:CompleteCallback = get(l:options, 'callback', v:null) + + if l:CompleteCallback isnot v:null + let b:CompleteCallback = l:CompleteCallback + endif + let [l:line, l:column] = getpos('.')[1:2] let l:prefix = ale#completion#GetPrefix(&filetype, l:line, l:column) - if a:source is# 'ale-automatic' && empty(l:prefix) - return + if l:source is# 'ale-automatic' && empty(l:prefix) + return 0 endif let l:line_length = len(getline('.')) @@ -582,18 +600,47 @@ function! ale#completion#GetCompletions(source) abort \ 'prefix': l:prefix, \ 'conn_id': 0, \ 'request_id': 0, - \ 'source': a:source, + \ 'source': l:source, \} unlet! b:ale_completion_result let l:buffer = bufnr('') let l:Callback = function('s:OnReady') + let l:started = 0 + for l:linter in ale#linter#Get(&filetype) if !empty(l:linter.lsp) - call ale#lsp_linter#StartLSP(l:buffer, l:linter, l:Callback) + if ale#lsp_linter#StartLSP(l:buffer, l:linter, l:Callback) + let l:started = 1 + endif endif endfor + + return l:started +endfunction + +function! ale#completion#OmniFunc(findstart, base) abort + if a:findstart + let l:started = ale#completion#GetCompletions('ale-omnifunc') + + if !l:started + " This is the special value for cancelling completions silently. + " See :help complete-functions + return -3 + endif + + return ale#completion#GetCompletionPosition() + else + let l:result = ale#completion#GetCompletionResult() + + while l:result is v:null && !complete_check() + sleep 2ms + let l:result = ale#completion#GetCompletionResult() + endwhile + + return l:result isnot v:null ? l:result : [] + endif endfunction function! s:TimerHandler(...) abort diff --git a/sources_non_forked/ale/autoload/ale/debugging.vim b/sources_non_forked/ale/autoload/ale/debugging.vim index e4bf5e7e..379c0d73 100644 --- a/sources_non_forked/ale/autoload/ale/debugging.vim +++ b/sources_non_forked/ale/autoload/ale/debugging.vim @@ -62,7 +62,7 @@ function! s:Echo(message) abort execute 'echo a:message' endfunction -function! s:GetLinterVariables(filetype, linter_names) abort +function! s:GetLinterVariables(filetype, exclude_linter_names) abort let l:variable_list = [] let l:filetype_parts = split(a:filetype, '\.') @@ -73,7 +73,7 @@ function! s:GetLinterVariables(filetype, linter_names) abort " Include matching variables. if !empty(l:match) \&& index(l:filetype_parts, l:match[1]) >= 0 - \&& index(a:linter_names, l:match[2]) >= 0 + \&& index(a:exclude_linter_names, l:match[2]) == -1 call add(l:variable_list, l:key) endif endfor @@ -211,10 +211,11 @@ function! ale#debugging#Info() abort let l:all_names = map(copy(l:all_linters), 'v:val[''name'']') let l:enabled_names = map(copy(l:enabled_linters), 'v:val[''name'']') + let l:exclude_names = filter(copy(l:all_names), 'index(l:enabled_names, v:val) == -1') " Load linter variables to display " This must be done after linters are loaded. - let l:variable_list = s:GetLinterVariables(l:filetype, l:enabled_names) + let l:variable_list = s:GetLinterVariables(l:filetype, l:exclude_names) let l:fixers = ale#fix#registry#SuggestedFixers(l:filetype) let l:fixers = uniq(sort(l:fixers[0] + l:fixers[1])) @@ -238,6 +239,12 @@ function! ale#debugging#Info() abort endfunction function! ale#debugging#InfoToClipboard() abort + if !has('clipboard') + call s:Echo('clipboard not available. Try :ALEInfoToFile instead.') + + return + endif + redir => l:output silent call ale#debugging#Info() redir END diff --git a/sources_non_forked/ale/autoload/ale/engine.vim b/sources_non_forked/ale/autoload/ale/engine.vim index 7db808d6..491d3c2e 100644 --- a/sources_non_forked/ale/autoload/ale/engine.vim +++ b/sources_non_forked/ale/autoload/ale/engine.vim @@ -710,6 +710,10 @@ function! ale#engine#Cleanup(buffer) abort return endif + if exists('*ale#lsp#CloseDocument') + call ale#lsp#CloseDocument(a:buffer) + endif + if !has_key(g:ale_buffer_info, a:buffer) return endif diff --git a/sources_non_forked/ale/autoload/ale/events.vim b/sources_non_forked/ale/autoload/ale/events.vim index c3dbd378..da554ef9 100644 --- a/sources_non_forked/ale/autoload/ale/events.vim +++ b/sources_non_forked/ale/autoload/ale/events.vim @@ -128,7 +128,7 @@ function! ale#events#Init() abort endif if g:ale_lint_on_insert_leave - autocmd InsertLeave * call ale#Queue(0) + autocmd InsertLeave * if ale#Var(str2nr(expand('')), 'lint_on_insert_leave') | call ale#Queue(0) | endif endif if g:ale_echo_cursor || g:ale_cursor_detail diff --git a/sources_non_forked/ale/autoload/ale/fix.vim b/sources_non_forked/ale/autoload/ale/fix.vim index 92ae3e14..9987fbdd 100644 --- a/sources_non_forked/ale/autoload/ale/fix.vim +++ b/sources_non_forked/ale/autoload/ale/fix.vim @@ -2,46 +2,60 @@ call ale#Set('fix_on_save_ignore', {}) " Apply fixes queued up for buffers which may be hidden. " Vim doesn't let you modify hidden buffers. -function! ale#fix#ApplyQueuedFixes() abort - let l:buffer = bufnr('') - let l:data = get(g:ale_fix_buffer_data, l:buffer, {'done': 0}) +function! ale#fix#ApplyQueuedFixes(buffer) abort + let l:data = get(g:ale_fix_buffer_data, a:buffer, {'done': 0}) + let l:has_bufline_api = exists('*deletebufline') && exists('*setbufline') - if !l:data.done + if !l:data.done || (!l:has_bufline_api && a:buffer isnot bufnr('')) return endif - call remove(g:ale_fix_buffer_data, l:buffer) + call remove(g:ale_fix_buffer_data, a:buffer) if l:data.changes_made - let l:start_line = len(l:data.output) + 1 - let l:end_line = len(l:data.lines_before) - - if l:end_line >= l:start_line - let l:save = winsaveview() - silent execute l:start_line . ',' . l:end_line . 'd_' - call winrestview(l:save) - endif - " If the file is in DOS mode, we have to remove carriage returns from " the ends of lines before calling setline(), or we will see them " twice. - let l:lines_to_set = getbufvar(l:buffer, '&fileformat') is# 'dos' + let l:new_lines = getbufvar(a:buffer, '&fileformat') is# 'dos' \ ? map(copy(l:data.output), 'substitute(v:val, ''\r\+$'', '''', '''')') \ : l:data.output + let l:first_line_to_remove = len(l:new_lines) + 1 - call setline(1, l:lines_to_set) + " Use a Vim API for setting lines in other buffers, if available. + if l:has_bufline_api + call setbufline(a:buffer, 1, l:new_lines) + call deletebufline(a:buffer, l:first_line_to_remove, '$') + " Fall back on setting lines the old way, for the current buffer. + else + let l:old_line_length = len(l:data.lines_before) + + if l:old_line_length >= l:first_line_to_remove + let l:save = winsaveview() + silent execute + \ l:first_line_to_remove . ',' . l:old_line_length . 'd_' + call winrestview(l:save) + endif + + call setline(1, l:new_lines) + endif if l:data.should_save - if empty(&buftype) - noautocmd :w! + if a:buffer is bufnr('') + if empty(&buftype) + noautocmd :w! + else + set nomodified + endif else - set nomodified + call writefile(l:new_lines, expand(a:buffer . ':p')) " no-custom-checks + call setbufvar(a:buffer, '&modified', 0) endif endif endif if l:data.should_save - let l:should_lint = g:ale_fix_on_save + let l:should_lint = ale#Var(a:buffer, 'fix_on_save') + \ && ale#Var(a:buffer, 'lint_on_save') else let l:should_lint = l:data.changes_made endif @@ -52,7 +66,7 @@ function! ale#fix#ApplyQueuedFixes() abort " fixing problems. if g:ale_enabled \&& l:should_lint - \&& !ale#events#QuitRecently(l:buffer) + \&& !ale#events#QuitRecently(a:buffer) call ale#Queue(0, l:data.should_save ? 'lint_file' : '') endif endfunction @@ -83,7 +97,7 @@ function! ale#fix#ApplyFixes(buffer, output) abort " We can only change the lines of a buffer which is currently open, " so try and apply the fixes to the current buffer. - call ale#fix#ApplyQueuedFixes() + call ale#fix#ApplyQueuedFixes(a:buffer) endfunction function! s:HandleExit(job_info, buffer, job_output, data) abort @@ -399,5 +413,4 @@ endfunction " Set up an autocmd command to try and apply buffer fixes when available. augroup ALEBufferFixGroup autocmd! - autocmd BufEnter * call ale#fix#ApplyQueuedFixes() -augroup END + autocmd BufEnter * call ale#fix#ApplyQueuedFixes(str2nr(expand(''))) diff --git a/sources_non_forked/ale/autoload/ale/fix/registry.vim b/sources_non_forked/ale/autoload/ale/fix/registry.vim index 3a36f367..7a553ccc 100644 --- a/sources_non_forked/ale/autoload/ale/fix/registry.vim +++ b/sources_non_forked/ale/autoload/ale/fix/registry.vim @@ -115,6 +115,11 @@ let s:default_registry = { \ 'suggested_filetypes': ['scala'], \ 'description': 'Fix Scala files using scalafmt', \ }, +\ 'sorbet': { +\ 'function': 'ale#fixers#sorbet#Fix', +\ 'suggested_filetypes': ['ruby'], +\ 'description': 'Fix ruby files with srb tc --autocorrect.', +\ }, \ 'standard': { \ 'function': 'ale#fixers#standard#Fix', \ 'suggested_filetypes': ['javascript'], @@ -145,6 +150,11 @@ let s:default_registry = { \ 'suggested_filetypes': ['php'], \ 'description': 'Fix PHP files with php-cs-fixer.', \ }, +\ 'clangtidy': { +\ 'function': 'ale#fixers#clangtidy#Fix', +\ 'suggested_filetypes': ['c', 'cpp', 'objc'], +\ 'description': 'Fix C/C++ and ObjectiveC files with clang-tidy.', +\ }, \ 'clang-format': { \ 'function': 'ale#fixers#clangformat#Fix', \ 'suggested_filetypes': ['c', 'cpp', 'cuda'], @@ -205,6 +215,11 @@ let s:default_registry = { \ 'suggested_filetypes': ['haskell'], \ 'description': 'Fix Haskell files with brittany.', \ }, +\ 'hindent': { +\ 'function': 'ale#fixers#hindent#Fix', +\ 'suggested_filetypes': ['haskell'], +\ 'description': 'Fix Haskell files with hindent.', +\ }, \ 'hlint': { \ 'function': 'ale#fixers#hlint#Fix', \ 'suggested_filetypes': ['haskell'], @@ -297,7 +312,7 @@ let s:default_registry = { \ }, \ 'styler': { \ 'function': 'ale#fixers#styler#Fix', -\ 'suggested_filetypes': ['r'], +\ 'suggested_filetypes': ['r', 'rmarkdown'], \ 'description': 'Fix R files with styler.', \ }, \ 'latexindent': { @@ -305,6 +320,21 @@ let s:default_registry = { \ 'suggested_filetypes': ['tex'], \ 'description' : 'Indent code within environments, commands, after headings and within special code blocks.', \ }, +\ 'pgformatter': { +\ 'function': 'ale#fixers#pgformatter#Fix', +\ 'suggested_filetypes': ['sql'], +\ 'description': 'A PostgreSQL SQL syntax beautifier', +\ }, +\ 'reorder-python-imports': { +\ 'function': 'ale#fixers#reorder_python_imports#Fix', +\ 'suggested_filetypes': ['python'], +\ 'description': 'Sort Python imports with reorder-python-imports.', +\ }, +\ 'gnatpp': { +\ 'function': 'ale#fixers#gnatpp#Fix', +\ 'suggested_filetypes': ['ada'], +\ 'description': 'Format Ada files with gnatpp.', +\ }, \} " Reset the function registry to the default entries. diff --git a/sources_non_forked/ale/autoload/ale/fixers/black.vim b/sources_non_forked/ale/autoload/ale/fixers/black.vim index 367b8d52..fba6c3b4 100644 --- a/sources_non_forked/ale/autoload/ale/fixers/black.vim +++ b/sources_non_forked/ale/autoload/ale/fixers/black.vim @@ -29,6 +29,10 @@ function! ale#fixers#black#Fix(buffer) abort let l:options = ale#Var(a:buffer, 'python_black_options') + if expand('#' . a:buffer . ':e') is? 'pyi' + let l:options .= '--pyi' + endif + return { \ 'command': l:cd_string . ale#Escape(l:executable) . l:exec_args \ . (!empty(l:options) ? ' ' . l:options : '') diff --git a/sources_non_forked/ale/autoload/ale/fixers/clangformat.vim b/sources_non_forked/ale/autoload/ale/fixers/clangformat.vim index eae1a7b4..ea5743a5 100644 --- a/sources_non_forked/ale/autoload/ale/fixers/clangformat.vim +++ b/sources_non_forked/ale/autoload/ale/fixers/clangformat.vim @@ -13,10 +13,15 @@ function! ale#fixers#clangformat#GetExecutable(buffer) abort endfunction function! ale#fixers#clangformat#Fix(buffer) abort + let l:executable = ale#Escape(ale#fixers#clangformat#GetExecutable(a:buffer)) + let l:filename = ale#Escape(bufname(a:buffer)) let l:options = ale#Var(a:buffer, 'c_clangformat_options') - return { - \ 'command': ale#Escape(ale#fixers#clangformat#GetExecutable(a:buffer)) - \ . ' ' . l:options, - \} + let l:command = l:executable . ' --assume-filename=' . l:filename + + if l:options isnot# '' + let l:command .= ' ' . l:options + endif + + return {'command': l:command} endfunction diff --git a/sources_non_forked/ale/autoload/ale/fixers/clangtidy.vim b/sources_non_forked/ale/autoload/ale/fixers/clangtidy.vim new file mode 100644 index 00000000..b37360a7 --- /dev/null +++ b/sources_non_forked/ale/autoload/ale/fixers/clangtidy.vim @@ -0,0 +1,52 @@ +scriptencoding utf-8 +" Author: ObserverOfTime +" Description: Fixing C/C++ files with clang-tidy. + +function! s:set_variables() abort + let l:use_global = get(g:, 'ale_use_global_executables', 0) + + for l:ft in ['c', 'cpp'] + call ale#Set(l:ft . '_clangtidy_executable', 'clang-tidy') + call ale#Set(l:ft . '_clangtidy_use_global', l:use_global) + call ale#Set(l:ft . '_clangtidy_checks', []) + call ale#Set(l:ft . '_clangtidy_options', '') + call ale#Set(l:ft . '_clangtidy_extra_options', '') + call ale#Set(l:ft . '_clangtidy_fix_errors', 1) + endfor + + call ale#Set('c_build_dir', '') +endfunction + +call s:set_variables() + +function! ale#fixers#clangtidy#Var(buffer, name) abort + let l:ft = getbufvar(str2nr(a:buffer), '&filetype') + let l:ft = l:ft =~# 'cpp' ? 'cpp' : 'c' + + return ale#Var(a:buffer, l:ft . '_clangtidy_' . a:name) +endfunction + +function! ale#fixers#clangtidy#GetCommand(buffer) abort + let l:checks = join(ale#fixers#clangtidy#Var(a:buffer, 'checks'), ',') + let l:extra_options = ale#fixers#clangtidy#Var(a:buffer, 'extra_options') + let l:build_dir = ale#c#GetBuildDirectory(a:buffer) + let l:options = empty(l:build_dir) + \ ? ale#fixers#clangtidy#Var(a:buffer, 'options') : '' + let l:fix_errors = ale#fixers#clangtidy#Var(a:buffer, 'fix_errors') + + return ' -fix' . (l:fix_errors ? ' -fix-errors' : '') + \ . (empty(l:checks) ? '' : ' -checks=' . ale#Escape(l:checks)) + \ . (empty(l:extra_options) ? '' : ' ' . l:extra_options) + \ . (empty(l:build_dir) ? '' : ' -p ' . ale#Escape(l:build_dir)) + \ . ' %t' . (empty(l:options) ? '' : ' -- ' . l:options) +endfunction + +function! ale#fixers#clangtidy#Fix(buffer) abort + let l:executable = ale#fixers#clangtidy#Var(a:buffer, 'executable') + let l:command = ale#fixers#clangtidy#GetCommand(a:buffer) + + return { + \ 'command': ale#Escape(l:executable) . l:command, + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/sources_non_forked/ale/autoload/ale/fixers/eslint.vim b/sources_non_forked/ale/autoload/ale/fixers/eslint.vim index 0f57cba6..62e692b1 100644 --- a/sources_non_forked/ale/autoload/ale/fixers/eslint.vim +++ b/sources_non_forked/ale/autoload/ale/fixers/eslint.vim @@ -35,9 +35,18 @@ endfunction function! ale#fixers#eslint#ApplyFixForVersion(buffer, version) abort let l:executable = ale#handlers#eslint#GetExecutable(a:buffer) - let l:config = ale#handlers#eslint#FindConfig(a:buffer) + let l:options = ale#Var(a:buffer, 'javascript_eslint_options') - if empty(l:config) + " Use the configuration file from the options, if configured. + if l:options =~# '\v(^| )-c|(^| )--config' + let l:config = '' + let l:has_config = 1 + else + let l:config = ale#handlers#eslint#FindConfig(a:buffer) + let l:has_config = !empty(l:config) + endif + + if !l:has_config return 0 endif @@ -45,6 +54,7 @@ function! ale#fixers#eslint#ApplyFixForVersion(buffer, version) abort if l:executable =~# 'eslint_d$' && ale#semver#GTE(a:version, [3, 19, 0]) return { \ 'command': ale#node#Executable(a:buffer, l:executable) + \ . ale#Pad(l:options) \ . ' --stdin-filename %s --stdin --fix-to-stdout', \ 'process_with': 'ale#fixers#eslint#ProcessEslintDOutput', \} @@ -54,6 +64,7 @@ function! ale#fixers#eslint#ApplyFixForVersion(buffer, version) abort if ale#semver#GTE(a:version, [4, 9, 0]) return { \ 'command': ale#node#Executable(a:buffer, l:executable) + \ . ale#Pad(l:options) \ . ' --stdin-filename %s --stdin --fix-dry-run --format=json', \ 'process_with': 'ale#fixers#eslint#ProcessFixDryRunOutput', \} @@ -61,7 +72,8 @@ function! ale#fixers#eslint#ApplyFixForVersion(buffer, version) abort return { \ 'command': ale#node#Executable(a:buffer, l:executable) - \ . ' -c ' . ale#Escape(l:config) + \ . ale#Pad(l:options) + \ . (!empty(l:config) ? ' -c ' . ale#Escape(l:config) : '') \ . ' --fix %t', \ 'read_temporary_file': 1, \} diff --git a/sources_non_forked/ale/autoload/ale/fixers/gnatpp.vim b/sources_non_forked/ale/autoload/ale/fixers/gnatpp.vim new file mode 100644 index 00000000..bf3d484e --- /dev/null +++ b/sources_non_forked/ale/autoload/ale/fixers/gnatpp.vim @@ -0,0 +1,17 @@ +" Author: tim +" Description: Fix files with gnatpp. + +call ale#Set('ada_gnatpp_executable', 'gnatpp') +call ale#Set('ada_gnatpp_options', '') + +function! ale#fixers#gnatpp#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'ada_gnatpp_executable') + let l:options = ale#Var(a:buffer, 'ada_gnatpp_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . ' %t', + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/sources_non_forked/ale/autoload/ale/fixers/gofmt.vim b/sources_non_forked/ale/autoload/ale/fixers/gofmt.vim index 66b67a9e..d5a539b9 100644 --- a/sources_non_forked/ale/autoload/ale/fixers/gofmt.vim +++ b/sources_non_forked/ale/autoload/ale/fixers/gofmt.vim @@ -7,9 +7,10 @@ call ale#Set('go_gofmt_options', '') function! ale#fixers#gofmt#Fix(buffer) abort let l:executable = ale#Var(a:buffer, 'go_gofmt_executable') let l:options = ale#Var(a:buffer, 'go_gofmt_options') + let l:env = ale#go#EnvString(a:buffer) return { - \ 'command': ale#Escape(l:executable) + \ 'command': l:env . ale#Escape(l:executable) \ . ' -l -w' \ . (empty(l:options) ? '' : ' ' . l:options) \ . ' %t', diff --git a/sources_non_forked/ale/autoload/ale/fixers/goimports.vim b/sources_non_forked/ale/autoload/ale/fixers/goimports.vim index 783d0206..65f0fd98 100644 --- a/sources_non_forked/ale/autoload/ale/fixers/goimports.vim +++ b/sources_non_forked/ale/autoload/ale/fixers/goimports.vim @@ -7,13 +7,14 @@ call ale#Set('go_goimports_options', '') function! ale#fixers#goimports#Fix(buffer) abort let l:executable = ale#Var(a:buffer, 'go_goimports_executable') let l:options = ale#Var(a:buffer, 'go_goimports_options') + let l:env = ale#go#EnvString(a:buffer) if !executable(l:executable) return 0 endif return { - \ 'command': ale#Escape(l:executable) + \ 'command': l:env . ale#Escape(l:executable) \ . ' -l -w -srcdir %s' \ . (empty(l:options) ? '' : ' ' . l:options) \ . ' %t', diff --git a/sources_non_forked/ale/autoload/ale/fixers/gomod.vim b/sources_non_forked/ale/autoload/ale/fixers/gomod.vim index 68895f9b..ee8c46c9 100644 --- a/sources_non_forked/ale/autoload/ale/fixers/gomod.vim +++ b/sources_non_forked/ale/autoload/ale/fixers/gomod.vim @@ -2,9 +2,10 @@ call ale#Set('go_go_executable', 'go') function! ale#fixers#gomod#Fix(buffer) abort let l:executable = ale#Var(a:buffer, 'go_go_executable') + let l:env = ale#go#EnvString(a:buffer) return { - \ 'command': ale#Escape(l:executable) . ' mod edit -fmt %t', + \ 'command': l:env . ale#Escape(l:executable) . ' mod edit -fmt %t', \ 'read_temporary_file': 1, \} endfunction diff --git a/sources_non_forked/ale/autoload/ale/fixers/hindent.vim b/sources_non_forked/ale/autoload/ale/fixers/hindent.vim new file mode 100644 index 00000000..b6009a2c --- /dev/null +++ b/sources_non_forked/ale/autoload/ale/fixers/hindent.vim @@ -0,0 +1,20 @@ +" Author: AlexeiDrake +" Description: Integration of hindent formatting with ALE. +" +call ale#Set('haskell_hindent_executable', 'hindent') + +function! ale#fixers#hindent#GetExecutable(buffer) abort + let l:executable = ale#Var(a:buffer, 'haskell_hindent_executable') + + return ale#handlers#haskell_stack#EscapeExecutable(l:executable, 'hindent') +endfunction + +function! ale#fixers#hindent#Fix(buffer) abort + let l:executable = ale#fixers#hindent#GetExecutable(a:buffer) + + return { + \ 'command': l:executable + \ . ' %t', + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/sources_non_forked/ale/autoload/ale/fixers/pgformatter.vim b/sources_non_forked/ale/autoload/ale/fixers/pgformatter.vim new file mode 100644 index 00000000..9ea08ec6 --- /dev/null +++ b/sources_non_forked/ale/autoload/ale/fixers/pgformatter.vim @@ -0,0 +1,12 @@ +call ale#Set('sql_pgformatter_executable', 'pg_format') +call ale#Set('sql_pgformatter_options', '') + +function! ale#fixers#pgformatter#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'sql_pgformatter_executable') + let l:options = ale#Var(a:buffer, 'sql_pgformatter_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . (empty(l:options) ? '' : ' ' . l:options), + \} +endfunction diff --git a/sources_non_forked/ale/autoload/ale/fixers/prettier.vim b/sources_non_forked/ale/autoload/ale/fixers/prettier.vim index b7f0ecd7..23120777 100644 --- a/sources_non_forked/ale/autoload/ale/fixers/prettier.vim +++ b/sources_non_forked/ale/autoload/ale/fixers/prettier.vim @@ -39,9 +39,15 @@ function! ale#fixers#prettier#ApplyFixForVersion(buffer, version) abort let l:options = ale#Var(a:buffer, 'javascript_prettier_options') let l:parser = '' + let l:filetypes = split(getbufvar(a:buffer, '&filetype'), '\.') + + if index(l:filetypes, 'handlebars') > -1 + let l:parser = 'glimmer' + endif + " Append the --parser flag depending on the current filetype (unless it's " already set in g:javascript_prettier_options). - if empty(expand('#' . a:buffer . ':e')) && match(l:options, '--parser') == -1 + if empty(expand('#' . a:buffer . ':e')) && l:parser is# '' && match(l:options, '--parser') == -1 " Mimic Prettier's defaults. In cases without a file extension or " filetype (scratch buffer), Prettier needs `parser` set to know how " to process the buffer. @@ -65,7 +71,7 @@ function! ale#fixers#prettier#ApplyFixForVersion(buffer, version) abort \ 'html': 'html', \} - for l:filetype in split(getbufvar(a:buffer, '&filetype'), '\.') + for l:filetype in l:filetypes if has_key(l:prettier_parsers, l:filetype) let l:parser = l:prettier_parsers[l:filetype] break diff --git a/sources_non_forked/ale/autoload/ale/fixers/reorder_python_imports.vim b/sources_non_forked/ale/autoload/ale/fixers/reorder_python_imports.vim new file mode 100644 index 00000000..42a0a6e2 --- /dev/null +++ b/sources_non_forked/ale/autoload/ale/fixers/reorder_python_imports.vim @@ -0,0 +1,25 @@ +" Author: jake +" Description: Fixing Python imports with reorder-python-imports. + +call ale#Set('python_reorder_python_imports_executable', 'reorder-python-imports') +call ale#Set('python_reorder_python_imports_options', '') +call ale#Set('python_reorder_python_imports_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! ale#fixers#reorder_python_imports#Fix(buffer) abort + let l:executable = ale#python#FindExecutable( + \ a:buffer, + \ 'python_reorder_python_imports', + \ ['reorder-python-imports'], + \) + + if !executable(l:executable) + return 0 + endif + + let l:options = ale#Var(a:buffer, 'python_reorder_python_imports_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . (!empty(l:options) ? ' ' . l:options : '') . ' -', + \} +endfunction diff --git a/sources_non_forked/ale/autoload/ale/fixers/sorbet.vim b/sources_non_forked/ale/autoload/ale/fixers/sorbet.vim new file mode 100644 index 00000000..182f7300 --- /dev/null +++ b/sources_non_forked/ale/autoload/ale/fixers/sorbet.vim @@ -0,0 +1,19 @@ +call ale#Set('ruby_sorbet_executable', 'srb') +call ale#Set('ruby_sorbet_options', '') + +function! ale#fixers#sorbet#GetCommand(buffer) abort + let l:executable = ale#Var(a:buffer, 'ruby_sorbet_executable') + let l:options = ale#Var(a:buffer, 'ruby_sorbet_options') + + return ale#handlers#ruby#EscapeExecutable(l:executable, 'srb') + \ . ' tc' + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . ' --autocorrect --file %t' +endfunction + +function! ale#fixers#sorbet#Fix(buffer) abort + return { + \ 'command': ale#fixers#sorbet#GetCommand(a:buffer), + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/sources_non_forked/ale/autoload/ale/go.vim b/sources_non_forked/ale/autoload/ale/go.vim index cd7d9503..4a21e596 100644 --- a/sources_non_forked/ale/autoload/ale/go.vim +++ b/sources_non_forked/ale/autoload/ale/go.vim @@ -25,3 +25,20 @@ function! ale#go#FindProjectRoot(buffer) abort return '' endfunction + + +call ale#Set('go_go111module', '') + +" Return a string setting Go-specific environment variables +function! ale#go#EnvString(buffer) abort + let l:env = '' + + " GO111MODULE - turn go modules behavior on/off + let l:go111module = ale#Var(a:buffer, 'go_go111module') + + if !empty(l:go111module) + let l:env = ale#Env('GO111MODULE', l:go111module) . l:env + endif + + return l:env +endfunction diff --git a/sources_non_forked/ale/autoload/ale/handlers/ccls.vim b/sources_non_forked/ale/autoload/ale/handlers/ccls.vim index 29dd6aed..1e2aa318 100644 --- a/sources_non_forked/ale/autoload/ale/handlers/ccls.vim +++ b/sources_non_forked/ale/autoload/ale/handlers/ccls.vim @@ -3,15 +3,17 @@ scriptencoding utf-8 " Description: Utilities for ccls function! ale#handlers#ccls#GetProjectRoot(buffer) abort - let l:project_root = ale#path#FindNearestFile(a:buffer, '.ccls-root') + " Try to find ccls configuration files first. + let l:config = ale#path#FindNearestFile(a:buffer, '.ccls-root') - if empty(l:project_root) - let l:project_root = ale#path#FindNearestFile(a:buffer, 'compile_commands.json') + if empty(l:config) + let l:config = ale#path#FindNearestFile(a:buffer, '.ccls') endif - if empty(l:project_root) - let l:project_root = ale#path#FindNearestFile(a:buffer, '.ccls') + if !empty(l:config) + return fnamemodify(l:config, ':h') endif - return !empty(l:project_root) ? fnamemodify(l:project_root, ':h') : '' + " Fall back on default project root detection. + return ale#c#FindProjectRoot(a:buffer) endfunction diff --git a/sources_non_forked/ale/autoload/ale/handlers/cppcheck.vim b/sources_non_forked/ale/autoload/ale/handlers/cppcheck.vim index dc56cd0b..6d8fa15d 100644 --- a/sources_non_forked/ale/autoload/ale/handlers/cppcheck.vim +++ b/sources_non_forked/ale/autoload/ale/handlers/cppcheck.vim @@ -1,5 +1,46 @@ " Description: Handle errors for cppcheck. +function! ale#handlers#cppcheck#GetCdCommand(buffer) abort + let [l:dir, l:json_path] = ale#c#FindCompileCommands(a:buffer) + let l:cd_command = !empty(l:dir) ? ale#path#CdString(l:dir) : '' + + return l:cd_command +endfunction + +function! ale#handlers#cppcheck#GetBufferPathIncludeOptions(buffer) abort + let l:buffer_path_include = '' + + " Get path to this buffer so we can include it into cppcheck with -I + " This could be expanded to get more -I directives from the compile + " command in compile_commands.json, if it's found. + let l:buffer_path = fnamemodify(bufname(a:buffer), ':p:h') + let l:buffer_path_include = ' -I' . ale#Escape(l:buffer_path) + + return l:buffer_path_include +endfunction + +function! ale#handlers#cppcheck#GetCompileCommandsOptions(buffer) abort + " If the current buffer is modified, using compile_commands.json does no + " good, so include the file's directory instead. It's not quite as good as + " using --project, but is at least equivalent to running cppcheck on this + " file manually from the file's directory. + let l:modified = getbufvar(a:buffer, '&modified') + + if l:modified + return '' + endif + + " Search upwards from the file for compile_commands.json. + " + " If we find it, we'll `cd` to where the compile_commands.json file is, + " then use the file to set up import paths, etc. + let [l:dir, l:json_path] = ale#c#FindCompileCommands(a:buffer) + + return !empty(l:json_path) + \ ? '--project=' . ale#Escape(l:json_path[len(l:dir) + 1: ]) + \ : '' +endfunction + function! ale#handlers#cppcheck#HandleCppCheckFormat(buffer, lines) abort " Look for lines like the following. " diff --git a/sources_non_forked/ale/autoload/ale/handlers/eslint.vim b/sources_non_forked/ale/autoload/ale/handlers/eslint.vim index 5183f4cd..4d533ff2 100644 --- a/sources_non_forked/ale/autoload/ale/handlers/eslint.vim +++ b/sources_non_forked/ale/autoload/ale/handlers/eslint.vim @@ -44,16 +44,9 @@ function! ale#handlers#eslint#GetCommand(buffer) abort return ale#node#Executable(a:buffer, l:executable) \ . (!empty(l:options) ? ' ' . l:options : '') - \ . ' -f unix --stdin --stdin-filename %s' + \ . ' -f json --stdin --stdin-filename %s' endfunction -let s:col_end_patterns = [ -\ '\vParsing error: Unexpected token (.+) ?', -\ '\v''(.+)'' is not defined.', -\ '\v%(Unexpected|Redundant use of) [''`](.+)[''`]', -\ '\vUnexpected (console) statement', -\] - function! s:AddHintsForTypeScriptParsingErrors(output) abort for l:item in a:output let l:item.text = substitute( @@ -90,22 +83,71 @@ function! s:CheckForBadConfig(buffer, lines) abort return 0 endfunction -function! ale#handlers#eslint#Handle(buffer, lines) abort - if s:CheckForBadConfig(a:buffer, a:lines) - return [{ - \ 'lnum': 1, - \ 'text': 'eslint configuration error (type :ALEDetail for more information)', - \ 'detail': join(a:lines, "\n"), - \}] +function! s:parseJSON(buffer, lines) abort + try + let l:parsed = json_decode(a:lines[-1]) + catch + return [] + endtry + + if type(l:parsed) != v:t_list || empty(l:parsed) + return [] endif - if a:lines == ['Could not connect'] - return [{ - \ 'lnum': 1, - \ 'text': 'Could not connect to eslint_d. Try updating eslint_d or killing it.', - \}] + let l:errors = l:parsed[0]['messages'] + + if empty(l:errors) + return [] endif + let l:output = [] + + for l:error in l:errors + let l:obj = ({ + \ 'lnum': get(l:error, 'line', 0), + \ 'text': get(l:error, 'message', ''), + \ 'type': 'E', + \}) + + if get(l:error, 'severity', 0) is# 1 + let l:obj.type = 'W' + endif + + if has_key(l:error, 'ruleId') + let l:code = l:error['ruleId'] + + " Sometimes ESLint returns null here + if !empty(l:code) + let l:obj.code = l:code + endif + endif + + if has_key(l:error, 'column') + let l:obj.col = l:error['column'] + endif + + if has_key(l:error, 'endColumn') + let l:obj.end_col = l:error['endColumn'] - 1 + endif + + if has_key(l:error, 'endLine') + let l:obj.end_lnum = l:error['endLine'] + endif + + call add(l:output, l:obj) + endfor + + return l:output +endfunction + +let s:col_end_patterns = [ +\ '\vParsing error: Unexpected token (.+) ?', +\ '\v''(.+)'' is not defined.', +\ '\v%(Unexpected|Redundant use of) [''`](.+)[''`]', +\ '\vUnexpected (console) statement', +\] + +function! s:parseLines(buffer, lines) abort " Matches patterns line the following: " " /path/to/some-filename.js:47:14: Missing trailing comma. [Warning/comma-dangle] @@ -120,12 +162,6 @@ function! ale#handlers#eslint#Handle(buffer, lines) abort for l:match in ale#util#GetMatches(a:lines, [l:pattern, l:parsing_pattern]) let l:text = l:match[3] - if ale#Var(a:buffer, 'javascript_eslint_suppress_eslintignore') - if l:text =~# '^File ignored' - continue - endif - endif - let l:obj = { \ 'lnum': l:match[1] + 0, \ 'col': l:match[2] + 0, @@ -143,11 +179,6 @@ function! ale#handlers#eslint#Handle(buffer, lines) abort " The code can be something like 'Error/foo/bar', or just 'Error' if !empty(get(l:split_code, 1)) let l:obj.code = join(l:split_code[1:], '/') - - if l:obj.code is# 'no-trailing-spaces' - \&& !ale#Var(a:buffer, 'warn_about_trailing_whitespace') - continue - endif endif for l:col_match in ale#util#GetMatches(l:text, s:col_end_patterns) @@ -157,9 +188,59 @@ function! ale#handlers#eslint#Handle(buffer, lines) abort call add(l:output, l:obj) endfor + return l:output +endfunction + +function! s:FilterResult(buffer, obj) abort + if ale#Var(a:buffer, 'javascript_eslint_suppress_eslintignore') + if a:obj.text =~# '^File ignored' + return 0 + endif + endif + + if has_key(a:obj, 'code') && a:obj.code is# 'no-trailing-spaces' + \&& !ale#Var(a:buffer, 'warn_about_trailing_whitespace') + return 0 + endif + + return 1 +endfunction + +function! s:HandleESLintOutput(buffer, lines, type) abort + if s:CheckForBadConfig(a:buffer, a:lines) + return [{ + \ 'lnum': 1, + \ 'text': 'eslint configuration error (type :ALEDetail for more information)', + \ 'detail': join(a:lines, "\n"), + \}] + endif + + if a:lines == ['Could not connect'] + return [{ + \ 'lnum': 1, + \ 'text': 'Could not connect to eslint_d. Try updating eslint_d or killing it.', + \}] + endif + + if a:type is# 'json' + let l:output = s:parseJSON(a:buffer, a:lines) + else + let l:output = s:parseLines(a:buffer, a:lines) + endif + + call filter(l:output, {idx, obj -> s:FilterResult(a:buffer, obj)}) + if expand('#' . a:buffer . ':t') =~? '\.tsx\?$' call s:AddHintsForTypeScriptParsingErrors(l:output) endif return l:output endfunction + +function! ale#handlers#eslint#HandleJSON(buffer, lines) abort + return s:HandleESLintOutput(a:buffer, a:lines, 'json') +endfunction + +function! ale#handlers#eslint#Handle(buffer, lines) abort + return s:HandleESLintOutput(a:buffer, a:lines, 'lines') +endfunction diff --git a/sources_non_forked/ale/autoload/ale/handlers/gcc.vim b/sources_non_forked/ale/autoload/ale/handlers/gcc.vim index 72d639da..ec16b977 100644 --- a/sources_non_forked/ale/autoload/ale/handlers/gcc.vim +++ b/sources_non_forked/ale/autoload/ale/handlers/gcc.vim @@ -11,6 +11,7 @@ let s:pragma_error = '#pragma once in main file' " :10:27: error: invalid operands to binary - (have ‘int’ and ‘char *’) " -:189:7: note: $/${} is unnecessary on arithmetic variables. [SC2004] let s:pattern = '\v^([a-zA-Z]?:?[^:]+):(\d+):(\d+)?:? ([^:]+): (.+)$' +let s:inline_pattern = '\v inlined from .* at \:(\d+):(\d+):$' function! s:IsHeaderFile(filename) abort return a:filename =~? '\v\.(h|hpp)$' @@ -25,6 +26,28 @@ function! s:RemoveUnicodeQuotes(text) abort return l:text endfunction +function! s:ParseInlinedFunctionProblems(buffer, lines) abort + let l:output = [] + let l:pos_match = [] + + for l:line in a:lines + let l:match = matchlist(l:line, s:pattern) + + if !empty(l:match) && !empty(l:pos_match) + call add(l:output, { + \ 'lnum': str2nr(l:pos_match[1]), + \ 'col': str2nr(l:pos_match[2]), + \ 'type': (l:match[4] is# 'error' || l:match[4] is# 'fatal error') ? 'E' : 'W', + \ 'text': s:RemoveUnicodeQuotes(l:match[5]), + \}) + endif + + let l:pos_match = matchlist(l:line, s:inline_pattern) + endfor + + return l:output +endfunction + " Report problems inside of header files just for gcc and clang function! s:ParseProblemsInHeaders(buffer, lines) abort let l:output = [] @@ -129,6 +152,7 @@ endfunction function! ale#handlers#gcc#HandleGCCFormatWithIncludes(buffer, lines) abort let l:output = ale#handlers#gcc#HandleGCCFormat(a:buffer, a:lines) + call extend(l:output, s:ParseInlinedFunctionProblems(a:buffer, a:lines)) call extend(l:output, s:ParseProblemsInHeaders(a:buffer, a:lines)) return l:output diff --git a/sources_non_forked/ale/autoload/ale/handlers/rust.vim b/sources_non_forked/ale/autoload/ale/handlers/rust.vim index dda6466e..a7fac464 100644 --- a/sources_non_forked/ale/autoload/ale/handlers/rust.vim +++ b/sources_non_forked/ale/autoload/ale/handlers/rust.vim @@ -56,14 +56,20 @@ function! ale#handlers#rust#HandleRustErrors(buffer, lines) abort endif if !empty(l:span) - call add(l:output, { + let l:output_line = { \ 'lnum': l:span.line_start, \ 'end_lnum': l:span.line_end, \ 'col': l:span.column_start, \ 'end_col': l:span.column_end-1, \ 'text': empty(l:span.label) ? l:error.message : printf('%s: %s', l:error.message, l:span.label), \ 'type': toupper(l:error.level[0]), - \}) + \} + + if has_key(l:error, 'rendered') && !empty(l:error.rendered) + let l:output_line.detail = l:error.rendered + endif + + call add(l:output, l:output_line) endif endfor endfor diff --git a/sources_non_forked/ale/autoload/ale/highlight.vim b/sources_non_forked/ale/autoload/ale/highlight.vim index 172f9d54..cb7911e1 100644 --- a/sources_non_forked/ale/autoload/ale/highlight.vim +++ b/sources_non_forked/ale/autoload/ale/highlight.vim @@ -26,41 +26,6 @@ endif let s:MAX_POS_VALUES = 8 let s:MAX_COL_SIZE = 1073741824 " pow(2, 30) -" Check if we have neovim's buffer highlight API -" -" Below we define some functions' implementation conditionally if this API -" exists or not. -" -" The API itself is more ergonomic and neovim performs highlights positions -" rebases during edits so we see less stalled highlights. -let s:nvim_api = exists('*nvim_buf_add_highlight') && exists('*nvim_buf_clear_namespace') - -function! ale#highlight#HasNeovimApi() abort - return s:nvim_api -endfunction - -function! ale#highlight#nvim_buf_clear_namespace(...) abort - return call('nvim_buf_clear_namespace', a:000) -endfunction - -function! ale#highlight#nvim_buf_add_highlight(...) abort - return call('nvim_buf_add_highlight', a:000) -endfunction - -function! s:ale_nvim_highlight_id(bufnr) abort - let l:id = getbufvar(a:bufnr, 'ale_nvim_highlight_id', -1) - - if l:id is -1 - " NOTE: This will highlight nothing but will allocate new id - let l:id = ale#highlight#nvim_buf_add_highlight( - \ a:bufnr, 0, '', 0, 0, -1 - \) - call setbufvar(a:bufnr, 'ale_nvim_highlight_id', l:id) - endif - - return l:id -endfunction - function! ale#highlight#CreatePositions(line, col, end_line, end_col) abort if a:line >= a:end_line " For single lines, just return the one position. @@ -86,88 +51,29 @@ endfunction " except these which have matching loclist item entries. function! ale#highlight#RemoveHighlights() abort - if ale#highlight#HasNeovimApi() - if get(b:, 'ale_nvim_highlight_id', 0) - let l:bufnr = bufnr('%') - " NOTE: 0, -1 means from 0 line till the end of buffer - call ale#highlight#nvim_buf_clear_namespace( - \ l:bufnr, - \ b:ale_nvim_highlight_id, - \ 0, -1 - \) + for l:match in getmatches() + if l:match.group =~? '\v^ALE(Style)?(Error|Warning|Info)(Line)?$' + call matchdelete(l:match.id) endif - else - for l:match in getmatches() - if l:match.group =~# '^ALE' - call matchdelete(l:match.id) - endif - endfor - endif + endfor endfunction function! s:highlight_line(bufnr, lnum, group) abort - if ale#highlight#HasNeovimApi() - let l:highlight_id = s:ale_nvim_highlight_id(a:bufnr) - call ale#highlight#nvim_buf_add_highlight( - \ a:bufnr, l:highlight_id, a:group, - \ a:lnum - 1, 0, -1 - \) - else - call matchaddpos(a:group, [a:lnum]) - endif + call matchaddpos(a:group, [a:lnum]) endfunction function! s:highlight_range(bufnr, range, group) abort - if ale#highlight#HasNeovimApi() - let l:highlight_id = s:ale_nvim_highlight_id(a:bufnr) - " NOTE: lines and columns indicies are 0-based in nvim_buf_* API. - let l:lnum = a:range.lnum - 1 - let l:end_lnum = a:range.end_lnum - 1 - let l:col = a:range.col - 1 - let l:end_col = a:range.end_col - - if l:lnum >= l:end_lnum - " For single lines, just return the one position. - call ale#highlight#nvim_buf_add_highlight( - \ a:bufnr, l:highlight_id, a:group, - \ l:lnum, l:col, l:end_col - \) - else - " highlight first line from start till the line end - call ale#highlight#nvim_buf_add_highlight( - \ a:bufnr, l:highlight_id, a:group, - \ l:lnum, l:col, -1 - \) - - " highlight all lines between the first and last entirely - let l:cur = l:lnum + 1 - - while l:cur < l:end_lnum - call ale#highlight#nvim_buf_add_highlight( - \ a:bufnr, l:highlight_id, a:group, - \ l:cur, 0, -1 - \ ) - let l:cur += 1 - endwhile - - call ale#highlight#nvim_buf_add_highlight( - \ a:bufnr, l:highlight_id, a:group, - \ l:end_lnum, 0, l:end_col - \) - endif - else - " Set all of the positions, which are chunked into Lists which - " are as large as will be accepted by matchaddpos. - call map( - \ ale#highlight#CreatePositions( - \ a:range.lnum, - \ a:range.col, - \ a:range.end_lnum, - \ a:range.end_col - \ ), - \ 'matchaddpos(a:group, v:val)' - \) - endif + " Set all of the positions, which are chunked into Lists which + " are as large as will be accepted by matchaddpos. + call map( + \ ale#highlight#CreatePositions( + \ a:range.lnum, + \ a:range.col, + \ a:range.end_lnum, + \ a:range.end_col + \ ), + \ 'matchaddpos(a:group, v:val)' + \) endfunction function! ale#highlight#UpdateHighlights() abort diff --git a/sources_non_forked/ale/autoload/ale/java.vim b/sources_non_forked/ale/autoload/ale/java.vim index b7fd10bd..e641ac6c 100644 --- a/sources_non_forked/ale/autoload/ale/java.vim +++ b/sources_non_forked/ale/autoload/ale/java.vim @@ -16,5 +16,11 @@ function! ale#java#FindProjectRoot(buffer) abort return fnamemodify(l:maven_pom_file, ':h') endif + let l:ant_root = ale#ant#FindProjectRoot(a:buffer) + + if !empty(l:ant_root) + return l:ant_root + endif + return '' endfunction diff --git a/sources_non_forked/ale/autoload/ale/linter.vim b/sources_non_forked/ale/autoload/ale/linter.vim index 8c657675..78dcd3a2 100644 --- a/sources_non_forked/ale/autoload/ale/linter.vim +++ b/sources_non_forked/ale/autoload/ale/linter.vim @@ -13,10 +13,13 @@ let s:default_ale_linter_aliases = { \ 'Dockerfile': 'dockerfile', \ 'csh': 'sh', \ 'plaintex': 'tex', +\ 'rmarkdown': 'r', \ 'systemverilog': 'verilog', \ 'verilog_systemverilog': ['verilog_systemverilog', 'verilog'], \ 'vimwiki': 'markdown', \ 'vue': ['vue', 'javascript'], +\ 'xsd': ['xsd', 'xml'], +\ 'xslt': ['xslt', 'xml'], \ 'zsh': 'sh', \} @@ -355,12 +358,14 @@ function! ale#linter#Define(filetype, linter) abort " This command will throw from the sandbox. let &l:equalprg=&l:equalprg + let l:new_linter = ale#linter#PreProcess(a:filetype, a:linter) + if !has_key(s:linters, a:filetype) let s:linters[a:filetype] = [] endif - let l:new_linter = ale#linter#PreProcess(a:filetype, a:linter) - + " Remove previously defined linters with the same name. + call filter(s:linters[a:filetype], 'v:val.name isnot# a:linter.name') call add(s:linters[a:filetype], l:new_linter) endfunction diff --git a/sources_non_forked/ale/autoload/ale/list.vim b/sources_non_forked/ale/autoload/ale/list.vim index 63d97f35..4bfe2a7b 100644 --- a/sources_non_forked/ale/autoload/ale/list.vim +++ b/sources_non_forked/ale/autoload/ale/list.vim @@ -71,8 +71,8 @@ function! s:FixList(buffer, list) abort return l:new_list endfunction -function! s:BufWinId(buffer) abort - return exists('*bufwinid') ? bufwinid(str2nr(a:buffer)) : 0 +function! s:WinFindBuf(buffer) abort + return exists('*win_findbuf') ? win_findbuf(str2nr(a:buffer)) : [0] endfunction function! s:SetListsImpl(timer_id, buffer, loclist) abort @@ -88,19 +88,24 @@ function! s:SetListsImpl(timer_id, buffer, loclist) abort call setqflist([], 'r', {'title': l:title}) endif elseif g:ale_set_loclist - " If windows support is off, bufwinid() may not exist. + " If windows support is off, win_findbuf() may not exist. " We'll set result in the current window, which might not be correct, " but it's better than nothing. - let l:id = s:BufWinId(a:buffer) + let l:ids = s:WinFindBuf(a:buffer) - if has('nvim') - call setloclist(l:id, s:FixList(a:buffer, a:loclist), ' ', l:title) - else - call setloclist(l:id, s:FixList(a:buffer, a:loclist)) - call setloclist(l:id, [], 'r', {'title': l:title}) - endif + for l:id in l:ids + if has('nvim') + call setloclist(l:id, s:FixList(a:buffer, a:loclist), ' ', l:title) + else + call setloclist(l:id, s:FixList(a:buffer, a:loclist)) + call setloclist(l:id, [], 'r', {'title': l:title}) + endif + endfor endif + " Save the current view before opening/closing any window + call setbufvar(a:buffer, 'ale_winview', winsaveview()) + " Open a window to show the problems if we need to. " " We'll check if the current buffer's List is not empty here, so the @@ -108,8 +113,6 @@ function! s:SetListsImpl(timer_id, buffer, loclist) abort if s:ShouldOpen(a:buffer) && !empty(a:loclist) let l:winnr = winnr() let l:mode = mode() - let l:reset_visual_selection = l:mode is? 'v' || l:mode is# "\" - let l:reset_character_selection = l:mode is? 's' || l:mode is# "\" " open windows vertically instead of default horizontally let l:open_type = '' @@ -131,15 +134,18 @@ function! s:SetListsImpl(timer_id, buffer, loclist) abort wincmd p endif - if l:reset_visual_selection || l:reset_character_selection - " If we were in a selection mode before, select the last selection. - normal! gv - - if l:reset_character_selection - " Switch back to Select mode, if we were in that. + " Return to original mode when applicable + if mode() != l:mode + if l:mode is? 'v' || l:mode is# "\" + " Reset our last visual selection + normal! gv + elseif l:mode is? 's' || l:mode is# "\" + " Reset our last character selection normal! "\" endif endif + + call s:RestoreViewIfNeeded(a:buffer) endif " If ALE isn't currently checking for more problems, close the window if @@ -150,6 +156,30 @@ function! s:SetListsImpl(timer_id, buffer, loclist) abort endif endfunction +" Try to restore the window view after closing any of the lists to avoid making +" the it moving around, especially useful when on insert mode +function! s:RestoreViewIfNeeded(buffer) abort + let l:saved_view = getbufvar(a:buffer, 'ale_winview', {}) + + " Saved view is empty, can't do anything + if empty(l:saved_view) + return + endif + + " Check wether the cursor has moved since linting was actually requested. If + " the user has indeed moved lines, do nothing + let l:current_view = winsaveview() + + if l:current_view['lnum'] != l:saved_view['lnum'] + return + endif + + " Anchor view by topline if the list is set to open horizontally + if ale#Var(a:buffer, 'list_vertical') == 0 + call winrestview({'topline': l:saved_view['topline']}) + endif +endfunction + function! ale#list#SetLists(buffer, loclist) abort if get(g:, 'ale_set_lists_synchronously') == 1 \|| getbufvar(a:buffer, 'ale_save_event_fired', 0) @@ -173,21 +203,31 @@ function! s:CloseWindowIfNeeded(buffer) abort return endif + let l:did_close_any_list = 0 + try " Only close windows if the quickfix list or loclist is completely empty, " including errors set through other means. if g:ale_set_quickfix if empty(getqflist()) cclose + let l:did_close_any_list = 1 endif else - let l:win_id = s:BufWinId(a:buffer) + let l:win_ids = s:WinFindBuf(a:buffer) - if g:ale_set_loclist && empty(getloclist(l:win_id)) - lclose - endif + for l:win_id in l:win_ids + if g:ale_set_loclist && empty(getloclist(l:win_id)) + lclose + let l:did_close_any_list = 1 + endif + endfor endif " Ignore 'Cannot close last window' errors. catch /E444/ endtry + + if l:did_close_any_list + call s:RestoreViewIfNeeded(a:buffer) + endif endfunction diff --git a/sources_non_forked/ale/autoload/ale/loclist_jumping.vim b/sources_non_forked/ale/autoload/ale/loclist_jumping.vim index 1d3ef7e5..55097d12 100644 --- a/sources_non_forked/ale/autoload/ale/loclist_jumping.vim +++ b/sources_non_forked/ale/autoload/ale/loclist_jumping.vim @@ -111,7 +111,7 @@ function! ale#loclist_jumping#Jump(direction, ...) abort if !empty(l:nearest) normal! m` - call cursor(l:nearest) + call cursor([l:nearest[0], max([l:nearest[1], 1])]) endif endfunction diff --git a/sources_non_forked/ale/autoload/ale/lsp.vim b/sources_non_forked/ale/autoload/ale/lsp.vim index 7186d2a9..017096cd 100644 --- a/sources_non_forked/ale/autoload/ale/lsp.vim +++ b/sources_non_forked/ale/autoload/ale/lsp.vim @@ -321,7 +321,69 @@ endfunction function! s:SendInitMessage(conn) abort let [l:init_id, l:init_data] = ale#lsp#CreateMessageData( - \ ale#lsp#message#Initialize(a:conn.root, a:conn.init_options), + \ ale#lsp#message#Initialize( + \ a:conn.root, + \ a:conn.init_options, + \ { + \ 'workspace': { + \ 'applyEdit': v:false, + \ 'didChangeConfiguration': { + \ 'dynamicRegistration': v:false, + \ }, + \ 'symbol': { + \ 'dynamicRegistration': v:false, + \ }, + \ 'workspaceFolders': v:false, + \ 'configuration': v:false, + \ }, + \ 'textDocument': { + \ 'synchronization': { + \ 'dynamicRegistration': v:false, + \ 'willSave': v:false, + \ 'willSaveWaitUntil': v:false, + \ 'didSave': v:true, + \ }, + \ 'completion': { + \ 'dynamicRegistration': v:false, + \ 'completionItem': { + \ 'snippetSupport': v:false, + \ 'commitCharactersSupport': v:false, + \ 'documentationFormat': ['plaintext'], + \ 'deprecatedSupport': v:false, + \ 'preselectSupport': v:false, + \ }, + \ 'contextSupport': v:false, + \ }, + \ 'hover': { + \ 'dynamicRegistration': v:false, + \ 'contentFormat': ['plaintext'], + \ }, + \ 'references': { + \ 'dynamicRegistration': v:false, + \ }, + \ 'documentSymbol': { + \ 'dynamicRegistration': v:false, + \ 'hierarchicalDocumentSymbolSupport': v:false, + \ }, + \ 'definition': { + \ 'dynamicRegistration': v:false, + \ 'linkSupport': v:false, + \ }, + \ 'typeDefinition': { + \ 'dynamicRegistration': v:false, + \ }, + \ 'publishDiagnostics': { + \ 'relatedInformation': v:true, + \ }, + \ 'codeAction': { + \ 'dynamicRegistration': v:false, + \ }, + \ 'rename': { + \ 'dynamicRegistration': v:false, + \ }, + \ }, + \ }, + \ ), \) let a:conn.init_request_id = l:init_id call s:SendMessageData(a:conn, l:init_data) @@ -484,6 +546,35 @@ function! ale#lsp#OpenDocument(conn_id, buffer, language_id) abort return l:opened endfunction +" Notify LSP servers or tsserver that a document is closed, if opened before. +" If a document is closed, 1 will be returned, otherwise 0 will be returned. +" +" Only the buffer number is required here. A message will be sent to every +" language server that was notified previously of the document being opened. +function! ale#lsp#CloseDocument(buffer) abort + let l:closed = 0 + + " The connection keys are sorted so the messages are easier to test, and + " so messages are sent in a consistent order. + for l:conn_id in sort(keys(s:connections)) + let l:conn = s:connections[l:conn_id] + + if l:conn.initialized && has_key(l:conn.open_documents, a:buffer) + if l:conn.is_tsserver + let l:message = ale#lsp#tsserver_message#Close(a:buffer) + else + let l:message = ale#lsp#message#DidClose(a:buffer) + endif + + call ale#lsp#Send(l:conn_id, l:message) + call remove(l:conn.open_documents, a:buffer) + let l:closed = 1 + endif + endfor + + return l:closed +endfunction + " Notify LSP servers or tsserver that a document has changed, if needed. " If a notification is sent, 1 will be returned, otherwise 0 will be returned. function! ale#lsp#NotifyForChanges(conn_id, buffer) abort diff --git a/sources_non_forked/ale/autoload/ale/lsp/message.vim b/sources_non_forked/ale/autoload/ale/lsp/message.vim index 4ad94c4b..b6b14a22 100644 --- a/sources_non_forked/ale/autoload/ale/lsp/message.vim +++ b/sources_non_forked/ale/autoload/ale/lsp/message.vim @@ -28,14 +28,13 @@ function! ale#lsp#message#GetNextVersionID() abort return l:id endfunction -function! ale#lsp#message#Initialize(root_path, initialization_options) abort - " TODO: Define needed capabilities. +function! ale#lsp#message#Initialize(root_path, options, capabilities) abort " NOTE: rootPath is deprecated in favour of rootUri return [0, 'initialize', { \ 'processId': getpid(), \ 'rootPath': a:root_path, - \ 'capabilities': {}, - \ 'initializationOptions': a:initialization_options, + \ 'capabilities': a:capabilities, + \ 'initializationOptions': a:options, \ 'rootUri': ale#path#ToURI(a:root_path), \}] endfunction diff --git a/sources_non_forked/ale/autoload/ale/lsp/response.vim b/sources_non_forked/ale/autoload/ale/lsp/response.vim index 9ce05260..30da77e1 100644 --- a/sources_non_forked/ale/autoload/ale/lsp/response.vim +++ b/sources_non_forked/ale/autoload/ale/lsp/response.vim @@ -90,7 +90,7 @@ function! ale#lsp#response#ReadTSServerDiagnostics(response) abort \ 'lnum': l:diagnostic.start.line, \ 'col': l:diagnostic.start.offset, \ 'end_lnum': l:diagnostic.end.line, - \ 'end_col': l:diagnostic.end.offset, + \ 'end_col': l:diagnostic.end.offset - 1, \} if has_key(l:diagnostic, 'code') diff --git a/sources_non_forked/ale/autoload/ale/lsp_linter.vim b/sources_non_forked/ale/autoload/ale/lsp_linter.vim index f70042dd..190a16b4 100644 --- a/sources_non_forked/ale/autoload/ale/lsp_linter.vim +++ b/sources_non_forked/ale/autoload/ale/lsp_linter.vim @@ -8,6 +8,9 @@ if !has_key(s:, 'lsp_linter_map') let s:lsp_linter_map = {} endif +" A Dictionary to track one-shot handlers for custom LSP requests +let s:custom_handlers_map = get(s:, 'custom_handlers_map', {}) + " Check if diagnostics for a particular linter should be ignored. function! s:ShouldIgnore(buffer, linter_name) abort " Ignore all diagnostics if LSP integration is disabled. @@ -31,7 +34,7 @@ endfunction function! s:HandleLSPDiagnostics(conn_id, response) abort let l:linter_name = s:lsp_linter_map[a:conn_id] let l:filename = ale#path#FromURI(a:response.params.uri) - let l:buffer = bufnr(l:filename) + let l:buffer = bufnr('^' . l:filename . '$') let l:info = get(g:ale_buffer_info, l:buffer, {}) if empty(l:info) @@ -49,7 +52,7 @@ endfunction function! s:HandleTSServerDiagnostics(response, error_type) abort let l:linter_name = 'tsserver' - let l:buffer = bufnr(a:response.body.file) + let l:buffer = bufnr('^' . a:response.body.file . '$') let l:info = get(g:ale_buffer_info, l:buffer, {}) if empty(l:info) @@ -407,9 +410,57 @@ endfunction " Clear LSP linter data for the linting engine. function! ale#lsp_linter#ClearLSPData() abort let s:lsp_linter_map = {} + let s:custom_handlers_map = {} endfunction " Just for tests. function! ale#lsp_linter#SetLSPLinterMap(replacement_map) abort let s:lsp_linter_map = a:replacement_map endfunction + +function! s:HandleLSPResponseToCustomRequests(conn_id, response) abort + if has_key(a:response, 'id') + \&& has_key(s:custom_handlers_map, a:response.id) + let l:Handler = remove(s:custom_handlers_map, a:response.id) + call l:Handler(a:response) + endif +endfunction + +function! s:OnReadyForCustomRequests(args, linter, lsp_details) abort + let l:id = a:lsp_details.connection_id + let l:request_id = ale#lsp#Send(l:id, a:args.message) + + if l:request_id > 0 && has_key(a:args, 'handler') + let l:Callback = function('s:HandleLSPResponseToCustomRequests') + call ale#lsp#RegisterCallback(l:id, l:Callback) + let s:custom_handlers_map[l:request_id] = a:args.handler + endif +endfunction + +" Send a custom request to an LSP linter. +function! ale#lsp_linter#SendRequest(buffer, linter_name, message, ...) abort + let l:filetype = ale#linter#ResolveFiletype(getbufvar(a:buffer, '&filetype')) + let l:linter_list = ale#linter#GetAll(l:filetype) + let l:linter_list = filter(l:linter_list, {_, v -> v.name is# a:linter_name}) + + if len(l:linter_list) < 1 + throw 'Linter "' . a:linter_name . '" not found!' + endif + + let l:linter = l:linter_list[0] + + if empty(l:linter.lsp) + throw 'Linter "' . a:linter_name . '" does not support LSP!' + endif + + let l:is_notification = a:message[0] + let l:callback_args = {'message': a:message} + + if !l:is_notification && a:0 + let l:callback_args.handler = a:1 + endif + + let l:Callback = function('s:OnReadyForCustomRequests', [l:callback_args]) + + return ale#lsp_linter#StartLSP(a:buffer, l:linter, l:Callback) +endfunction diff --git a/sources_non_forked/ale/autoload/ale/path.vim b/sources_non_forked/ale/autoload/ale/path.vim index 60d42eb5..84c26d0a 100644 --- a/sources_non_forked/ale/autoload/ale/path.vim +++ b/sources_non_forked/ale/autoload/ale/path.vim @@ -3,13 +3,20 @@ " simplify a path, and fix annoying issues with paths on Windows. " -" Forward slashes are changed to back slashes so path equality works better. +" Forward slashes are changed to back slashes so path equality works better +" on Windows. Back slashes are changed to forward slashes on Unix. +" +" Unix paths can technically contain back slashes, but in practice no path +" should, and replacing back slashes with forward slashes makes linters work +" in environments like MSYS. " " Paths starting with more than one forward slash are changed to only one " forward slash, to prevent the paths being treated as special MSYS paths. function! ale#path#Simplify(path) abort if has('unix') - return substitute(simplify(a:path), '^//\+', '/', 'g') " no-custom-checks + let l:unix_path = substitute(a:path, '\\', '/', 'g') + + return substitute(simplify(l:unix_path), '^//\+', '/', 'g') " no-custom-checks endif let l:win_path = substitute(a:path, '/', '\\', 'g') diff --git a/sources_non_forked/ale/autoload/ale/python.vim b/sources_non_forked/ale/autoload/ale/python.vim index 2f28214b..7ed22367 100644 --- a/sources_non_forked/ale/autoload/ale/python.vim +++ b/sources_non_forked/ale/autoload/ale/python.vim @@ -25,7 +25,7 @@ function! ale#python#FindProjectRootIni(buffer) abort \|| filereadable(l:path . '/tox.ini') \|| filereadable(l:path . '/mypy.ini') \|| filereadable(l:path . '/pycodestyle.cfg') - \|| filereadable(l:path . '/flake8.cfg') + \|| filereadable(l:path . '/.flake8') \|| filereadable(l:path . '/.flake8rc') \|| filereadable(l:path . '/pylama.ini') \|| filereadable(l:path . '/pylintrc') diff --git a/sources_non_forked/ale/autoload/ale/sign.vim b/sources_non_forked/ale/autoload/ale/sign.vim index 7395b0e2..eb0dd1cd 100644 --- a/sources_non_forked/ale/autoload/ale/sign.vim +++ b/sources_non_forked/ale/autoload/ale/sign.vim @@ -82,6 +82,34 @@ execute 'sign define ALEInfoSign text=' . s:EscapeSignText(g:ale_sign_info) \ . ' texthl=ALEInfoSign linehl=ALEInfoLine' sign define ALEDummySign +if has('nvim-0.3.2') + if !hlexists('ALEErrorSignLineNr') + highlight link ALEErrorSignLineNr CursorLineNr + endif + + if !hlexists('ALEStyleErrorSignLineNr') + highlight link ALEStyleErrorSignLineNr CursorLineNr + endif + + if !hlexists('ALEWarningSignLineNr') + highlight link ALEWarningSignLineNr CursorLineNr + endif + + if !hlexists('ALEStyleWarningSignLineNr') + highlight link ALEStyleWarningSignLineNr CursorLineNr + endif + + if !hlexists('ALEInfoSignLineNr') + highlight link ALEInfoSignLineNr CursorLineNr + endif + + sign define ALEErrorSign numhl=ALEErrorSignLineNr + sign define ALEStyleErrorSign numhl=ALEStyleErrorSignLineNr + sign define ALEWarningSign numhl=ALEWarningSignLineNr + sign define ALEStyleWarningSign numhl=ALEStyleWarningSignLineNr + sign define ALEInfoSign numhl=ALEInfoSignLineNr +endif + function! ale#sign#GetSignName(sublist) abort let l:priority = g:ale#util#style_warning_priority diff --git a/sources_non_forked/ale/autoload/asyncomplete/sources/ale.vim b/sources_non_forked/ale/autoload/asyncomplete/sources/ale.vim new file mode 100644 index 00000000..ce793773 --- /dev/null +++ b/sources_non_forked/ale/autoload/asyncomplete/sources/ale.vim @@ -0,0 +1,26 @@ +function! asyncomplete#sources#ale#get_source_options(...) abort + let l:default = extend({ + \ 'name': 'ale', + \ 'completor': function('asyncomplete#sources#ale#completor'), + \ 'whitelist': ['*'], + \ 'triggers': asyncomplete#sources#ale#get_triggers(), + \ }, a:0 >= 1 ? a:1 : {}) + + return extend(l:default, {'refresh_pattern': '\k\+$'}) +endfunction + +function! asyncomplete#sources#ale#get_triggers() abort + let l:triggers = ale#completion#GetAllTriggers() + let l:triggers['*'] = l:triggers[''] + + return l:triggers +endfunction + +function! asyncomplete#sources#ale#completor(options, context) abort + let l:keyword = matchstr(a:context.typed, '\w\+$') + let l:startcol = a:context.col - len(l:keyword) + + call ale#completion#GetCompletions('ale-callback', { 'callback': {completions -> + \ asyncomplete#complete(a:options.name, a:context, l:startcol, completions) + \ }}) +endfunction diff --git a/sources_non_forked/ale/doc/ale-ada.txt b/sources_non_forked/ale/doc/ale-ada.txt index 93e3261a..2ac30c0a 100644 --- a/sources_non_forked/ale/doc/ale-ada.txt +++ b/sources_non_forked/ale/doc/ale-ada.txt @@ -21,5 +21,16 @@ g:ale_ada_gcc_options *g:ale_ada_gcc_options* This variable can be set to pass additional options to gcc. +=============================================================================== +gnatpp *ale-ada-gnatpp* + +g:ale_ada_gnatpp_options *g:ale_ada_gnatpp_options* + *b:ale_ada_gnatpp_options* + Type: |String| + Default: `''` + + This variable can be set to pass extra options to the gnatpp fixer. + + =============================================================================== vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/sources_non_forked/ale/doc/ale-c.txt b/sources_non_forked/ale/doc/ale-c.txt index be0a3d77..c9eb79db 100644 --- a/sources_non_forked/ale/doc/ale-c.txt +++ b/sources_non_forked/ale/doc/ale-c.txt @@ -156,7 +156,7 @@ g:ale_c_clangtidy_options *g:ale_c_clangtidy_options* Type: |String| Default: `''` - This variable can be changed to modify flags given to clang-tidy. + This variable can be changed to modify compiler flags given to clang-tidy. - Setting this variable to a non-empty string, - and working in a buffer where no compilation database is found using @@ -169,6 +169,23 @@ g:ale_c_clangtidy_options *g:ale_c_clangtidy_options* of the |g:ale_c_build_dir_names| directories of the project tree. +g:ale_c_clangtidy_extra_options *g:ale_c_clangtidy_extra_options* + *b:ale_c_clangtidy_extra_options* + Type: |String| + Default: `''` + + This variable can be changed to modify flags given to clang-tidy. + + +g:ale_c_clangtidy_fix_errors *g:ale_c_clangtidy_fix_errors* + *b:ale_c_clangtidy_fix_errors* + Type: |Number| + Default: `1` + + This variable can be changed to disable the `-fix-errors` option for the + |clangtidy| fixer. + + =============================================================================== cppcheck *ale-c-cppcheck* diff --git a/sources_non_forked/ale/doc/ale-cpp.txt b/sources_non_forked/ale/doc/ale-cpp.txt index e1f64ab5..ead3be28 100644 --- a/sources_non_forked/ale/doc/ale-cpp.txt +++ b/sources_non_forked/ale/doc/ale-cpp.txt @@ -125,7 +125,7 @@ g:ale_cpp_clangtidy_options *g:ale_cpp_clangtidy_options* Type: |String| Default: `''` - This variable can be changed to modify flags given to clang-tidy. + This variable can be changed to modify compiler flags given to clang-tidy. - Setting this variable to a non-empty string, - and working in a buffer where no compilation database is found using @@ -138,6 +138,23 @@ g:ale_cpp_clangtidy_options *g:ale_cpp_clangtidy_options* of the |g:ale_c_build_dir_names| directories of the project tree. +g:ale_cpp_clangtidy_extra_options *g:ale_cpp_clangtidy_extra_options* + *b:ale_cpp_clangtidy_extra_options* + Type: |String| + Default: `''` + + This variable can be changed to modify flags given to clang-tidy. + + +g:ale_cpp_clangtidy_fix_errors *g:ale_cpp_clangtidy_fix_errors* + *b:ale_cpp_clangtidy_fix_errors* + Type: |Number| + Default: `1` + + This variable can be changed to disable the `-fix-errors` option for the + |clangtidy| fixer. + + =============================================================================== clazy *ale-cpp-clazy* diff --git a/sources_non_forked/ale/doc/ale-cs.txt b/sources_non_forked/ale/doc/ale-cs.txt index 01e6348f..abcc43eb 100644 --- a/sources_non_forked/ale/doc/ale-cs.txt +++ b/sources_non_forked/ale/doc/ale-cs.txt @@ -6,11 +6,97 @@ In addition to the linters that are provided with ALE, C# code can be checked with the OmniSharp plugin. See here: https://github.com/OmniSharp/omnisharp-vim +=============================================================================== +csc *ale-cs-csc* + + The |ale-cs-csc| linter checks for semantic errors when files are opened or + saved. + + See |ale-lint-file-linters| for more information on linters which do not + check for problems while you type. + + The csc linter uses the mono csc compiler providing full c# 7 and newer + support to generate a temporary module target file (/t:module). The module + includes including all '*.cs' files contained in the directory tree rooted + at the path defined by the |g:ale_cs_csc_source| or |b:ale_cs_csc_source| + variabl and all sub directories. + + It will in future replace the |ale-cs-mcs| and |ale-cs-mcsc| linters as both + utilizer the mcsc compiler which according to mono porject ist further + developed and as of writint these lines only receives maintenance updates. + The down is that the csc compiler does not support the -sytax option any more + and therefore |ale-cs-csc| linter doese not offer any as you type syntax + checking like the |ale-cs-mcsc| linter doesn't. + + The paths to search for additional assembly files can be specified using the + |g:ale_cs_csc_assembly_path| or |b:ale_cs_csc_assembly_path| variables. + + NOTE: ALE will not find any errors in files apart from syntax errors if any + one of the source files contains a syntax error. Syntax errors must be fixed + first before other errors will be shown. + + +g:ale_cs_csc_options *g:ale_cs_csc_options* + *b:ale_cs_csc_options* + Type: |String| + Default: `''` + + This option can be set to pass additional arguments to the `csc` compiler. + + For example, to add the dotnet package which is not added per default: > + + let g:ale_cs_mcs_options = ' /warn:4 /langversion:7.2' +< + NOTE: the `/unsafe` option is always passed to `csc`. + + +g:ale_cs_csc_source *g:ale_cs_csc_source* + *b:ale_cs_csc_source* + Type: |String| + Default: `''` + + This variable defines the root path of the directory tree searched for the + '*.cs' files to be linted. If this option is empty, the source file's + directory will be used. + + NOTE: Currently it is not possible to specify sub directories and + directory sub trees which shall not be searched for *.cs files. + + +g:ale_cs_csc_assembly_path *g:ale_cs_csc_assembly_path* + *b:ale_cs_csc_assembly_path* + Type: |List| + Default: `[]` + + This variable defines a list of path strings to be searched for external + assembly files. The list is passed to the csc compiler using the `/lib:` + flag. + + +g:ale_cs_csc_assemblies *g:ale_cs_csc_assemblies* + *b:ale_cs_csc_assemblies* + Type: |List| + Default: `[]` + + This variable defines a list of external assembly (*.dll) files required + by the mono mcs compiler to generate a valid module target. The list is + passed the csc compiler using the `/r:` flag. + + For example: > + + " Compile C# programs with the Unity engine DLL file on Mac. + let g:ale_cs_mcsc_assemblies = [ + \ '/Applications/Unity/Unity.app/Contents/Frameworks/Managed/UnityEngine.dll', + \ 'path-to-unityproject/obj/Debug', + \] +< + =============================================================================== mcs *ale-cs-mcs* - The `mcs` linter looks only for syntax errors while you type. See |ale-cs-mcsc| - for the separately configured linter for checking for semantic errors. + The `mcs` linter looks only for syntax errors while you type. See + |ale-cs-mcsc| for the separately configured linter for checking for semantic + errors. g:ale_cs_mcs_options *g:ale_cs_mcs_options* diff --git a/sources_non_forked/ale/doc/ale-development.txt b/sources_non_forked/ale/doc/ale-development.txt index 9c9f0394..16b16483 100644 --- a/sources_non_forked/ale/doc/ale-development.txt +++ b/sources_non_forked/ale/doc/ale-development.txt @@ -151,9 +151,9 @@ ALE is tested with a suite of tests executed in Travis CI and AppVeyor. ALE runs tests with the following versions of Vim in the following environments. 1. Vim 8.0.0027 on Linux via Travis CI. -2. Vim 8.1.0204 on Linux via Travis CI. +2. Vim 8.1.0519 on Linux via Travis CI. 3. NeoVim 0.2.0 on Linux via Travis CI. -4. NeoVim 0.3.0 on Linux via Travis CI. +4. NeoVim 0.3.5 on Linux via Travis CI. 5. Vim 8 (stable builds) on Windows via AppVeyor. If you are developing ALE code on Linux, Mac OSX, or BSD, you can run ALEs @@ -351,6 +351,7 @@ given the above setup are as follows. `GivenCommandOutput [...]` - Define output for ale#command#Run. `AssertFixer results` - Check the fixer results +`AssertFixerNotExecuted` - Check that fixers will not be executed. =============================================================================== diff --git a/sources_non_forked/ale/doc/ale-elm.txt b/sources_non_forked/ale/doc/ale-elm.txt index bb7a6132..823b53e1 100644 --- a/sources_non_forked/ale/doc/ale-elm.txt +++ b/sources_non_forked/ale/doc/ale-elm.txt @@ -29,20 +29,44 @@ g:ale_elm_format_options *g:ale_elm_format_options* This variable can be set to pass additional options to elm-format. =============================================================================== -elm-lsp *ale-elm-elm-lsp* +elm-ls *ale-elm-elm-ls* -g:ale_elm_lsp_executable *g:ale_elm_lsp_executable* - *b:ale_elm_lsp_executable* +g:ale_elm_ls_executable *g:ale_elm_ls_executable* + *b:ale_elm_ls_executable* Type: |String| - Default: `'elm-lsp'` + Default: `'elm-language-server'` See |ale-integrations-local-executables| -g:ale_elm_lsp_use_global *g:ale_elm_lsp_use_global* - *b:ale_elm_lsp_use_global* +g:ale_elm_ls_use_global *g:ale_elm_ls_use_global* + *b:ale_elm_ls_use_global* Type: |Number| - Default: `get(g:, 'ale_use_global_executables', 0)` + Default: `get(g:, 'ale_use_global_executables', 1)` + + See |ale-integrations-local-executables| + + +g:ale_elm_ls_elm_path *g:ale_elm_ls_elm_path* + *b:ale_elm_ls_elm_path* + Type: |String| + Default: `'elm'` + + See |ale-integrations-local-executables| + + +g:ale_elm_ls_elm_format_path *g:ale_elm_ls_elm_format_path* + *b:ale_elm_ls_elm_format_path* + Type: |String| + Default: `'elm-format'` + + See |ale-integrations-local-executables| + + +g:ale_elm_ls_elm_test_path *g:ale_elm_ls_elm_test_path* + *b:ale_elm_ls_elm_test_path* + Type: |String| + Default: `'elm-test'` See |ale-integrations-local-executables| diff --git a/sources_non_forked/ale/doc/ale-erlang.txt b/sources_non_forked/ale/doc/ale-erlang.txt index ad3c1e5a..59993a99 100644 --- a/sources_non_forked/ale/doc/ale-erlang.txt +++ b/sources_non_forked/ale/doc/ale-erlang.txt @@ -3,6 +3,35 @@ ALE Erlang Integration *ale-erlang-options* =============================================================================== +dialyzer *ale-erlang-dialyzer* + +g:ale_erlang_dialyzer_executable *g:ale_erlang_dialyzer_executable* + *b:ale_erlang_dialyzer_executable* + Type: |String| + Default: `'dialyzer'` + + This variable can be changed to specify the dialyzer executable. + + +g:ale_erlang_dialyzer_plt_file *g:ale_erlang_dialyzer_plt_file* + *b:ale_erlang_dialyzer_plt_file* + Type: |String| + + This variable can be changed to specify the path to the PLT file. By + default, it will search for the PLT file inside the `_build` directory. If + there isn't one, it will fallback to the path `$REBAR_PLT_DIR/dialyzer/plt`. + Otherwise, it will default to `$HOME/.dialyzer_plt`. + + +g:ale_erlang_dialyzer_rebar3_profile *g:ale_erlang_dialyzer_rebar3_profile* + *b:ale_erlang_dialyzer_rebar3_profile* + Type: |String| + Default: `'default'` + + This variable can be changed to specify the profile that is used to + run dialyzer with rebar3. + +------------------------------------------------------------------------------- erlc *ale-erlang-erlc* g:ale_erlang_erlc_options *g:ale_erlang_erlc_options* diff --git a/sources_non_forked/ale/doc/ale-go.txt b/sources_non_forked/ale/doc/ale-go.txt index 611e3fdd..be53783e 100644 --- a/sources_non_forked/ale/doc/ale-go.txt +++ b/sources_non_forked/ale/doc/ale-go.txt @@ -30,6 +30,16 @@ g:ale_go_go_executable *g:ale_go_go_options* the `gomod` fixer. +g:ale_go_go111module *g:ale_go_go111module* + *b:ale_go_go111module* + Type: |String| + Default: `''` + + Override the value of the `$GO111MODULE` environment variable for + golang tools. + + + =============================================================================== bingo *ale-go-bingo* diff --git a/sources_non_forked/ale/doc/ale-handlebars.txt b/sources_non_forked/ale/doc/ale-handlebars.txt index 061c5d3c..5daec5b3 100644 --- a/sources_non_forked/ale/doc/ale-handlebars.txt +++ b/sources_non_forked/ale/doc/ale-handlebars.txt @@ -2,6 +2,13 @@ ALE Handlebars Integration *ale-handlebars-options* +=============================================================================== +prettier *ale-handlebars-prettier* + +See |ale-javascript-prettier| for information about the available options. +Uses glimmer parser by default. + + =============================================================================== ember-template-lint *ale-handlebars-embertemplatelint* diff --git a/sources_non_forked/ale/doc/ale-haskell.txt b/sources_non_forked/ale/doc/ale-haskell.txt index e2073e37..5dd3ec15 100644 --- a/sources_non_forked/ale/doc/ale-haskell.txt +++ b/sources_non_forked/ale/doc/ale-haskell.txt @@ -12,6 +12,7 @@ g:ale_haskell_brittany_executable *g:ale_haskell_brittany_executable* This variable can be changed to use a different executable for brittany. + =============================================================================== floskell *ale-haskell-floskell* @@ -22,6 +23,7 @@ g:ale_haskell_floskell_executable *g:ale_haskell_floskell_executable* This variable can be changed to use a different executable for floskell. + =============================================================================== ghc *ale-haskell-ghc* @@ -32,6 +34,7 @@ g:ale_haskell_ghc_options *g:ale_haskell_ghc_options* This variable can be changed to modify flags given to ghc. + =============================================================================== ghc-mod *ale-haskell-ghc-mod* @@ -42,6 +45,7 @@ g:ale_haskell_ghc_mod_executable *g:ale_haskell_ghc_mod_executable* This variable can be changed to use a different executable for ghc-mod. + =============================================================================== cabal-ghc *ale-haskell-cabal-ghc* @@ -53,6 +57,7 @@ g:ale_haskell_cabal_ghc_options *g:ale_haskell_cabal_ghc_options* This variable can be changed to modify flags given to ghc through cabal exec. + =============================================================================== hdevtools *ale-haskell-hdevtools* @@ -87,6 +92,18 @@ g:ale_haskell_hfmt_executable *g:ale_haskell_hfmt_executable* This variable can be changed to use a different executable for hfmt. + +=============================================================================== +hindent *ale-haskell-hindent* + +g:ale_haskell_hindent_executable *g:ale_haskell_hindent_executable* + *b:ale_haskell_hindent_executable* + Type: |String| + Default: `'hindent'` + + This variable can be changed to use a different executable for hindent. + + =============================================================================== hlint *ale-haskell-hlint* @@ -106,6 +123,7 @@ g:ale_haskell_hlint_options g:ale_haskell_hlint_options This variable can be used to pass extra options to the underlying hlint executable. + =============================================================================== stack-build *ale-haskell-stack-build* @@ -117,6 +135,7 @@ g:ale_haskell_stack_build_options *g:ale_haskell_stack_build_options* We default to using `'--fast'`. Since Stack generates binaries, your programs will be slower unless you separately rebuild them outside of ALE. + =============================================================================== stack-ghc *ale-haskell-stack-ghc* @@ -128,6 +147,7 @@ g:ale_haskell_stack_ghc_options *g:ale_haskell_stack_ghc_options* This variable can be changed to modify flags given to ghc through `stack ghc` + =============================================================================== stylish-haskell *ale-haskell-stylish-haskell* @@ -139,6 +159,7 @@ g:ale_haskell_stylish_haskell_executable This variable can be changed to use a different executable for stylish-haskell. + =============================================================================== hie *ale-haskell-hie* @@ -150,5 +171,6 @@ g:ale_haskell_hie_executable *g:ale_haskell_hie_executable* This variable can be changed to use a different executable for the haskell ide engine. i.e. `'hie-wrapper'` + =============================================================================== vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/sources_non_forked/ale/doc/ale-hcl.txt b/sources_non_forked/ale/doc/ale-hcl.txt index 8060ac44..59b0a9da 100644 --- a/sources_non_forked/ale/doc/ale-hcl.txt +++ b/sources_non_forked/ale/doc/ale-hcl.txt @@ -5,7 +5,7 @@ ALE HCL Integration *ale-hcl-options* =============================================================================== terraform-fmt *ale-hcl-terraform-fmt* -See |ale-terraform-fmt| for information about the available options. +See |ale-terraform-fmt-fixer| for information about the available options. =============================================================================== vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/sources_non_forked/ale/doc/ale-java.txt b/sources_non_forked/ale/doc/ale-java.txt index 2805c9c8..32f0e6eb 100644 --- a/sources_non_forked/ale/doc/ale-java.txt +++ b/sources_non_forked/ale/doc/ale-java.txt @@ -5,14 +5,41 @@ ALE Java Integration *ale-java-options* =============================================================================== checkstyle *ale-java-checkstyle* +g:ale_java_checkstyle_config *g:ale_java_checkstyle_config* + *b:ale_java_checkstyle_config* + + Type: |String| + Default: `'/google_checks.xml'` + + A path to a checkstyle configuration file. + + If a configuration file is specified with |g:ale_java_checkstyle_options|, + it will be preferred over this setting. + + The path to the configuration file can be an absolute path or a relative + path. ALE will search for the relative path in parent directories. + + +g:ale_java_checkstyle_executable *g:ale_java_checkstyle_executable* + *b:ale_java_checkstyle_executable* + + Type: |String| + Default: 'checkstyle' + + This variable can be changed to modify the executable used for checkstyle. + + g:ale_java_checkstyle_options *g:ale_java_checkstyle_options* *b:ale_java_checkstyle_options* - Type: String - Default: '-c /google_checks.xml' + Type: |String| + Default: `''` This variable can be changed to modify flags given to checkstyle. + If a configuration file is specified with `-c`, it will be used instead of + configuration files set with |g:ale_java_checkstyle_config|. + =============================================================================== javac *ale-java-javac* @@ -90,16 +117,46 @@ or This generates a dist/mac or dist/windows directory that contains the language server. To let ALE use this language server you need to set the -g:ale_java_javalsp_executable variable to the absolute path of the java +g:ale_java_javalsp_executable variable to the absolute path of the launcher executable in this directory. g:ale_java_javalsp_executable *g:ale_java_javalsp_executable* *b:ale_java_javalsp_executable* Type: |String| - Default: `'java'` + Default: `''` -This variable can be changed to use a different executable for java. +This variable must be set to the absolute path of the language server launcher +executable. For example: +> + let g:ale_java_javalsp_executable=/java-language-server/dist/mac/bin/launcher +< +g:ale_java_javalsp_config *g:ale_java_javalsp_config* + *b:ale_java_javalsp_config* + Type: |Dictionary| + Default: `{}` + +The javalsp linter automatically detects external depenencies for Maven and +Gradle projects. In case the javalsp fails to detect some of them, you can +specify them setting a dictionary to |g:ale_java_javalsp_config| variable. +> + let g:ale_java_javalsp_executable = + \ { + \ 'java': { + \ 'externalDependencies': [ + \ 'junit:junit:jar:4.12:test', " Maven format + \ 'junit:junit:4.1' " Gradle format + \ ], + \ 'classPath': [ + \ 'lib/some-dependency.jar', + \ '/android-sdk/platforms/android-28.jar' + \ ] + \ } + \ } + +The Java language server will look for the dependencies you specify in +`externalDependencies` array in your Maven and Gradle caches ~/.m2 and +~/.gradle. =============================================================================== eclipselsp *ale-java-eclipselsp* @@ -118,7 +175,7 @@ located inside the repository folder `eclipse.jdt.ls`. Please ensure to set |g:ale_java_eclipselsp_path| to the absolute path of that folder. You could customize compiler options and code assists of the server. -Under your project folder, modify the file `.settings/org.eclipse.jdt.core.prefs` +Under your project folder, modify the file `.settings/org.eclipse.jdt.core.prefs` with options presented at https://help.eclipse.org/neon/topic/org.eclipse.jdt.doc.isv/reference/api/org/eclipse/jdt/core/JavaCore.html. @@ -130,7 +187,7 @@ g:ale_java_eclipselsp_path *g:ale_java_eclipselsp_path* Absolute path to the location of the eclipse.jdt.ls repository folder. Or if you have VSCode extension installed the absolute path to the VSCode extensions - folder (e.g. $HOME/.vscode/extensions in Linux). + folder (e.g. $HOME/.vscode/extensions/redhat.java-0.4x.0 in Linux). g:ale_java_eclipselsp_executable *g:ale_java_eclipse_executable* @@ -141,6 +198,31 @@ g:ale_java_eclipselsp_executable *g:ale_java_eclipse_executable* This variable can be set to change the executable path used for java. +g:ale_java_eclipselsp_config_path *g:ale_java_eclipse_config_path* + *b:ale_java_eclipse_config_path* + Type: |String| + Default: `''` + + Set this variable to change the configuration directory path used by + eclipselsp (e.g. `$HOME/.jdtls` in Linux). + By default ALE will attempt to use the configuration within the installation + directory. + This setting is particularly useful when eclipselsp is installed in a + non-writable directory like `/usr/share/java/jdtls`, as is the case when + installed via system package. + + +g:ale_java_eclipselsp_workspace_path *g:ale_java_eclipselsp_workspace_path* + *b:ale_java_eclipselsp_workspace_path* + + Type: |String| + Default: `''` + + If you have Eclipse installed is good idea to set this variable to the + absolute path of the Eclipse workspace. If not set this value will be set to + the parent folder of the project root. + + =============================================================================== uncrustify *ale-java-uncrustify* diff --git a/sources_non_forked/ale/doc/ale-purescript.txt b/sources_non_forked/ale/doc/ale-purescript.txt new file mode 100644 index 00000000..33fd2429 --- /dev/null +++ b/sources_non_forked/ale/doc/ale-purescript.txt @@ -0,0 +1,33 @@ +=============================================================================== +ALE PureScript Integration *ale-purescript-options* + + +=============================================================================== +purescript-language-server *ale-purescript-language-server* + +PureScript Language Server + (https://github.com/nwolverson/purescript-language-server) + +g:ale_purescript_ls_executable g:ale_purescript_ls_executable + b:ale_purescript_ls_executable + Type: |String| + Default: `'purescript-language-server'` + + PureScript language server executable. + +g:ale_purescript_ls_config g:ale_purescript_ls_config + b:ale_purescript_ls_config + Type: |Dictionary| + Default: `{}` + + Dictionary containing configuration settings that will be passed to the + language server. For example, with a spago project: + { + \ 'purescript': { + \ 'addSpagoSources': v:true, + \ 'addNpmPath': v:true, + \ 'buildCommand': 'spago build -- --json-errors' + \ } + \} +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/sources_non_forked/ale/doc/ale-python.txt b/sources_non_forked/ale/doc/ale-python.txt index 7dd3b65d..9d5846d2 100644 --- a/sources_non_forked/ale/doc/ale-python.txt +++ b/sources_non_forked/ale/doc/ale-python.txt @@ -29,7 +29,7 @@ ALE will look for configuration files with the following filenames. > tox.ini mypy.ini pycodestyle.cfg - flake8.cfg + .flake8 .flake8rc pylama.ini pylintrc @@ -672,6 +672,36 @@ g:ale_python_pyre_auto_pipenv *g:ale_python_pyre_auto_pipenv* if true. This is overridden by a manually-set executable. +=============================================================================== +reorder-python-imports *ale-python-reorder_python_imports* + +g:ale_python_reorder_python_imports_executable + *g:ale_python_reorder_python_imports_executable* + *b:ale_python_reorder_python_imports_executable* + Type: |String| + Default: `'reorder-python-imports'` + + See |ale-integrations-local-executables| + + +g:ale_python_reorder_python_imports_options + *g:ale_python_reorder_python_imports_options* + *b:ale_python_reorder_python_imports_options* + Type: |String| + Default: `''` + + This variable can be set to pass extra options to reorder-python-imports. + + +g:ale_python_reorder_python_imports_use_global + *g:ale_python_reorder_python_imports_use_global* + *b:ale_python_reorder_python_imports_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + =============================================================================== vulture *ale-python-vulture* diff --git a/sources_non_forked/ale/doc/ale-reasonml.txt b/sources_non_forked/ale/doc/ale-reasonml.txt index 426d4c46..b8729a55 100644 --- a/sources_non_forked/ale/doc/ale-reasonml.txt +++ b/sources_non_forked/ale/doc/ale-reasonml.txt @@ -5,18 +5,19 @@ ALE ReasonML Integration *ale-reasonml-options* =============================================================================== merlin *ale-reasonml-merlin* - To use merlin linter for ReasonML source code you need to make sure Merlin - for Vim is correctly configured. See the corresponding Merlin wiki page for - detailed instructions - (https://github.com/the-lambda-church/merlin/wiki/vim-from-scratch). +To use merlin linter for ReasonML source code you need to make sure Merlin for +Vim is correctly configured. See the corresponding Merlin wiki page for +detailed instructions: +https://github.com/the-lambda-church/merlin/wiki/vim-from-scratch =============================================================================== ols *ale-reasonml-ols* - The `ocaml-language-server` is the engine that powers OCaml and ReasonML - editor support using the Language Server Protocol. See the installation - instructions: - https://github.com/freebroccolo/ocaml-language-server#installation +The `ocaml-language-server` is the engine that powers OCaml and ReasonML +editor support using the Language Server Protocol. See the installation +instructions: +https://github.com/freebroccolo/ocaml-language-server#installation + g:ale_reason_ols_executable *g:ale_reason_ols_executable* *b:ale_reason_ols_executable* @@ -25,6 +26,7 @@ g:ale_reason_ols_executable *g:ale_reason_ols_executable* This variable can be set to change the executable path for `ols`. + g:ale_reason_ols_use_global *g:ale_reason_ols_use_global* *b:ale_reason_ols_use_global* Type: |String| @@ -33,6 +35,24 @@ g:ale_reason_ols_use_global *g:ale_reason_ols_use_global* This variable can be set to `1` to always use the globally installed executable. See also |ale-integrations-local-executables|. + +=============================================================================== +reason-language-server *ale-reasonml-language-server* + +Note: You must set an executable - there is no 'default' install location. +Go to https://github.com/jaredly/reason-language-server and download the +latest release. You can place it anywhere, but ensure you set the executable +path. + + +g:ale_reason_ls_executable *g:ale_reason_ls_executable* + *b:ale_reason_ls_executable* + Type: |String| + + This variable defines the standard location of the language server + executable. This must be set. + + =============================================================================== refmt *ale-reasonml-refmt* @@ -43,6 +63,7 @@ g:ale_reasonml_refmt_executable *g:ale_reasonml_refmt_executable* This variable can be set to pass the path of the refmt fixer. + g:ale_reasonml_refmt_options *g:ale_reasonml_refmt_options* *b:ale_reasonml_refmt_options* Type: |String| @@ -50,5 +71,6 @@ g:ale_reasonml_refmt_options *g:ale_reasonml_refmt_options* This variable can be set to pass additional options to the refmt fixer. + =============================================================================== vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/sources_non_forked/ale/doc/ale-ruby.txt b/sources_non_forked/ale/doc/ale-ruby.txt index bf971e7c..e373ab8e 100644 --- a/sources_non_forked/ale/doc/ale-ruby.txt +++ b/sources_non_forked/ale/doc/ale-ruby.txt @@ -129,6 +129,26 @@ g:ale_ruby_solargraph_executable *g:ale_ruby_solargraph_executable* from binstubs or a bundle. +=============================================================================== +sorbet *ale-ruby-sorbet* + +g:ale_ruby_sorbet_executable *g:ale_ruby_sorbet_executable* + *b:ale_ruby_sorbet_executable* + Type: String + Default: `'srb'` + + Override the invoked sorbet binary. Set this to `'bundle'` to invoke + `'bundle` `exec` srb'. + + +g:ale_ruby_sorbet_options *g:ale_ruby_sorbet_options* + *b:ale_ruby_sorbet_options* + Type: |String| + Default: `''` + + This variable can be change to modify flags given to sorbet. + + =============================================================================== standardrb *ale-ruby-standardrb* diff --git a/sources_non_forked/ale/doc/ale-sql.txt b/sources_non_forked/ale/doc/ale-sql.txt index 75d4b0cf..f9bc6ac2 100644 --- a/sources_non_forked/ale/doc/ale-sql.txt +++ b/sources_non_forked/ale/doc/ale-sql.txt @@ -2,6 +2,24 @@ ALE SQL Integration *ale-sql-options* +=============================================================================== +pgformatter *ale-sql-pgformatter* + +g:ale_sql_pgformatter_executable *g:ale_sql_pgformatter_executable* + *b:ale_sql_pgformatter_executable* + Type: |String| + Default: `'pg_format'` + + This variable sets executable used for pgformatter. + +g:ale_sql_pgformatter_options *g:ale_sql_pgformatter_options* + *b:ale_sql_pgformatter_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to the pgformatter fixer. + + =============================================================================== sqlfmt *ale-sql-sqlfmt* diff --git a/sources_non_forked/ale/doc/ale-supported-languages-and-tools.txt b/sources_non_forked/ale/doc/ale-supported-languages-and-tools.txt index d6fbafa6..37345f7b 100644 --- a/sources_non_forked/ale/doc/ale-supported-languages-and-tools.txt +++ b/sources_non_forked/ale/doc/ale-supported-languages-and-tools.txt @@ -14,6 +14,7 @@ Notes: * Ada * `gcc` + * `gnatpp` * Ansible * `ansible-lint` * API Blueprint @@ -53,6 +54,7 @@ Notes: * `gcc` * `uncrustify` * C# + * `csc`!! * `mcs` * `mcsc`!! * `uncrustify` @@ -181,6 +183,7 @@ Notes: * `hdevtools` * `hfmt` * `hie` + * `hindent` * `hlint` * `stack-build`!! * `stack-ghc` @@ -236,6 +239,7 @@ Notes: * `lacheck` * `proselint` * `redpen` + * `texlab` * `textlint` * `vale` * `write-good` @@ -337,6 +341,8 @@ Notes: * `languageserver` * `puppet` * `puppet-lint` +* PureScript + * `purescript-language-server` * Python * `autopep8` * `bandit` @@ -352,6 +358,7 @@ Notes: * `pylint`!! * `pyls` * `pyre` + * `reorder-python-imports` * `vulture`!! * `yapf` * QML @@ -365,6 +372,7 @@ Notes: * ReasonML * `merlin` * `ols` + * `reason-language-server` * `refmt` * reStructuredText * `alex`!! @@ -386,6 +394,7 @@ Notes: * `ruby` * `rufo` * `solargraph` + * `sorbet` * `standardrb` * Rust * `cargo`!! @@ -414,6 +423,7 @@ Notes: * `solhint` * `solium` * SQL + * `pgformatter` * `sqlfmt` * `sqlint` * Stylus diff --git a/sources_non_forked/ale/doc/ale-terraform.txt b/sources_non_forked/ale/doc/ale-terraform.txt index 49a55028..387fd732 100644 --- a/sources_non_forked/ale/doc/ale-terraform.txt +++ b/sources_non_forked/ale/doc/ale-terraform.txt @@ -3,7 +3,7 @@ ALE Terraform Integration *ale-terraform-options* =============================================================================== -fmt *ale-terraform-fmt* +terraform-fmt-fixer *ale-terraform-fmt-fixer* g:ale_terraform_fmt_executable *g:ale_terraform_fmt_executable* *b:ale_terraform_fmt_executable* @@ -20,6 +20,18 @@ g:ale_terraform_fmt_options *g:ale_terraform_fmt_options* Default: `''` +=============================================================================== +terraform *ale-terraform-terraform* + +g:ale_terraform_terraform_executable *g:ale_terraform_terraform_executable* + *b:ale_terraform_terraform_executable* + + Type: |String| + Default: `'terraform'` + + This variable can be changed to use a different executable for terraform. + + =============================================================================== tflint *ale-terraform-tflint* diff --git a/sources_non_forked/ale/doc/ale-tex.txt b/sources_non_forked/ale/doc/ale-tex.txt index b1b09117..ceb9fa81 100644 --- a/sources_non_forked/ale/doc/ale-tex.txt +++ b/sources_non_forked/ale/doc/ale-tex.txt @@ -53,5 +53,25 @@ g:ale_tex_latexindent_options *g:ale_tex_latexindent_options* +=============================================================================== +texlab *ale-tex-texlab* + +g:ale_tex_texlab_executable *g:ale_tex_texlab_executable* + *b:ale_tex_texlab_executable* + Type: |String| + Default: `'texlab'` + + This variable can be changed to change the path to texlab. + + +g:ale_tex_texlab_options *g:ale_tex_texlab_options* + *b:ale_tex_texlab_options* + Type: |String| + Default: `''` + + This variable can be changed to modify flags given to texlab. + + + =============================================================================== vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/sources_non_forked/ale/doc/ale.txt b/sources_non_forked/ale/doc/ale.txt index 2a086981..beca8546 100644 --- a/sources_non_forked/ale/doc/ale.txt +++ b/sources_non_forked/ale/doc/ale.txt @@ -84,7 +84,7 @@ have even saved your changes. ALE will check your code in the following circumstances, which can be configured with the associated options. * When you modify a buffer. - |g:ale_lint_on_text_changed| -* On leaving insert mode. (off by default) - |g:ale_lint_on_insert_leave| +* On leaving insert mode. - |g:ale_lint_on_insert_leave| * When you open a new or modified buffer. - |g:ale_lint_on_enter| * When you save a buffer. - |g:ale_lint_on_save| * When the filetype changes for a buffer. - |g:ale_lint_on_filetype_changed| @@ -341,6 +341,17 @@ completion source for Deoplete is named `'ale'`, and should enabled automatically if Deoplete is enabled and configured correctly. Deoplete integration should not be combined with ALE's own implementation. + *ale-asyncomplete-integration* + +ALE additionally integrates with asyncomplete.vim for offering automatic +completion data. ALE's asyncomplete source requires registration and should +use the defaults provided by the|asyncomplete#sources#ale#get_source_options| function > + + " Use ALE's function for asyncomplete defaults + au User asyncomplete_setup call asyncomplete#register_source(asyncomplete#sources#ale#get_source_options({ + \ 'priority': 10, " Provide your own overrides here + \ })) +> ALE also offers its own completion implementation, which does not require any other plugins. Suggestions will be made while you type after completion is enabled. ALE's own completion implementation can be enabled by setting @@ -349,6 +360,12 @@ is loaded. The delay for completion can be configured with |g:ale_completion_delay|. This setting should not be enabled if you wish to use ALE as a completion source for other plugins. +ALE provides an 'omnifunc' function |ale#completion#OmniFunc| for triggering +completion manually with CTRL-X CTRL-O. |i_CTRL-X_CTRL-O| > + + " Use ALE's function for omnicompletion. + set omnifunc=ale#completion#OmniFunc +< ALE will only suggest so many possible matches for completion. The maximum number of items can be controlled with |g:ale_completion_max_suggestions|. @@ -947,7 +964,7 @@ g:ale_lint_on_save *g:ale_lint_on_save* g:ale_lint_on_text_changed *g:ale_lint_on_text_changed* Type: |String| - Default: `'always'` + Default: `'normal'` This option controls how ALE will check your files as you make changes. The following values can be used. @@ -972,9 +989,10 @@ g:ale_lint_on_text_changed *g:ale_lint_on_text_changed* g:ale_lint_on_insert_leave *g:ale_lint_on_insert_leave* + *b:ale_lint_on_insert_leave* Type: |Number| - Default: `0` + Default: `1` When set to `1` in your vimrc file, this option will cause ALE to run linters when you leave insert mode. @@ -986,6 +1004,10 @@ g:ale_lint_on_insert_leave *g:ale_lint_on_insert_leave* " Make using Ctrl+C do the same as Escape, to trigger autocmd commands inoremap < + A buffer-local version of this setting `b:ale_lint_on_insert_leave` can be + set to `0` to disable linting when leaving insert mode. The setting must + be enabled globally to be enabled locally. + You should set this setting once before ALE is loaded, and restart Vim if you want to change your preferences. See |ale-lint-settings-on-startup|. @@ -1006,10 +1028,13 @@ g:ale_linter_aliases *g:ale_linter_aliases* \ 'Dockerfile': 'dockerfile', \ 'csh': 'sh', \ 'plaintex': 'tex', + \ 'rmarkdown': 'r', \ 'systemverilog': 'verilog', \ 'verilog_systemverilog': ['verilog_systemverilog', 'verilog'], \ 'vimwiki': 'markdown', \ 'vue': ['vue', 'javascript'], + \ 'xsd': ['xsd', 'xml'], + \ 'xslt': ['xslt', 'xml'], \ 'zsh': 'sh', \} < @@ -1412,6 +1437,15 @@ g:ale_set_signs *g:ale_set_signs* |ALEWarningLine| - All items with `'type': 'W'` |ALEInfoLine| - All items with `'type': 'I'` + With Neovim 0.3.2 or higher, ALE uses `numhl` option to highlight 'number' + column. It uses the following highlight groups. + + |ALEErrorSignLineNr| - Items with `'type': 'E'` + |ALEWarningSignLineNr| - Items with `'type': 'W'` + |ALEInfoSignLineNr| - Items with `'type': 'I'` + |ALEStyleErrorSignLineNr| - Items with `'type': 'E'` and `'sub_type': 'style'` + |ALEStyleWarningSignLineNr| - Items with `'type': 'W'` and `'sub_type': 'style'` + The markers for the highlights can be customized with the following options: |g:ale_sign_error| @@ -1696,6 +1730,15 @@ ALEErrorSign *ALEErrorSign* The highlight for error signs. See |g:ale_set_signs|. +ALEErrorSignLineNr *ALEErrorSignLineNr* + + Default: `highlight link ALEErrorSignLineNr CursorLineNr` + + The highlight for error signs. See |g:ale_set_signs|. + + NOTE: This highlight is only available on Neovim 0.3.2 or higher. + + ALEInfo *ALEInfo.* *ALEInfo-highlight* Default: `highlight link ALEInfo ALEWarning` @@ -1720,6 +1763,15 @@ ALEInfoLine *ALEInfoLine* See |g:ale_set_signs| and |g:ale_set_highlights|. +ALEInfoSignLineNr *ALEInfoSignLineNr* + + Default: `highlight link ALEInfoSignLineNr CursorLineNr` + + The highlight for error signs. See |g:ale_set_signs|. + + NOTE: This highlight is only available on Neovim 0.3.2 or higher. + + ALEStyleError *ALEStyleError* Default: `highlight link ALEStyleError ALEError` @@ -1734,6 +1786,15 @@ ALEStyleErrorSign *ALEStyleErrorSign* The highlight for style error signs. See |g:ale_set_signs|. +ALEStyleErrorSignLineNr *ALEStyleErrorSignLineNr* + + Default: `highlight link ALEStyleErrorSignLineNr CursorLineNr` + + The highlight for error signs. See |g:ale_set_signs|. + + NOTE: This highlight is only available on Neovim 0.3.2 or higher. + + ALEStyleWarning *ALEStyleWarning* Default: `highlight link ALEStyleWarning ALEError` @@ -1748,6 +1809,15 @@ ALEStyleWarningSign *ALEStyleWarningSign* The highlight for style warning signs. See |g:ale_set_signs|. +ALEStyleWarningSignLineNr *ALEStyleWarningSignLineNr* + + Default: `highlight link ALEStyleWarningSignLineNr CursorLineNr` + + The highlight for error signs. See |g:ale_set_signs|. + + NOTE: This highlight is only available on Neovim 0.3.2 or higher. + + ALEVirtualTextError *ALEVirtualTextError* Default: `highlight link ALEVirtualTextError ALEError` @@ -1807,6 +1877,15 @@ ALEWarningSign *ALEWarningSign* The highlight for warning signs. See |g:ale_set_signs|. +ALEWarningSignLineNr *ALEWarningSignLineNr* + + Default: `highlight link ALEWarningSignLineNr CursorLineNr` + + The highlight for error signs. See |g:ale_set_signs|. + + NOTE: This highlight is only available on Neovim 0.3.2 or higher. + + =============================================================================== 7. Linter/Fixer Options *ale-integration-options* @@ -1913,6 +1992,7 @@ documented in additional help files. ada.....................................|ale-ada-options| gcc...................................|ale-ada-gcc| + gnatpp................................|ale-ada-gnatpp| ansible.................................|ale-ansible-options| ansible-lint..........................|ale-ansible-ansible-lint| asciidoc................................|ale-asciidoc-options| @@ -1961,6 +2041,7 @@ documented in additional help files. uncrustify............................|ale-cpp-uncrustify| ccls..................................|ale-cpp-ccls| c#......................................|ale-cs-options| + csc...................................|ale-cs-csc| mcs...................................|ale-cs-mcs| mcsc..................................|ale-cs-mcsc| uncrustify............................|ale-cs-uncrustify| @@ -1988,9 +2069,10 @@ documented in additional help files. credo.................................|ale-elixir-credo| elm.....................................|ale-elm-options| elm-format............................|ale-elm-elm-format| - elm-lsp...............................|ale-elm-elm-lsp| + elm-ls................................|ale-elm-elm-ls| elm-make..............................|ale-elm-elm-make| erlang..................................|ale-erlang-options| + dialyzer..............................|ale-erlang-dialyzer| erlc..................................|ale-erlang-erlc| syntaxerl.............................|ale-erlang-syntaxerl| eruby...................................|ale-eruby-options| @@ -2027,6 +2109,7 @@ documented in additional help files. hackfmt...............................|ale-hack-hackfmt| hhast.................................|ale-hack-hhast| handlebars..............................|ale-handlebars-options| + prettier..............................|ale-handlebars-prettier| ember-template-lint...................|ale-handlebars-embertemplatelint| haskell.................................|ale-haskell-options| brittany..............................|ale-haskell-brittany| @@ -2036,6 +2119,7 @@ documented in additional help files. cabal-ghc.............................|ale-haskell-cabal-ghc| hdevtools.............................|ale-haskell-hdevtools| hfmt..................................|ale-haskell-hfmt| + hindent...............................|ale-haskell-hindent| hlint.................................|ale-haskell-hlint| stack-build...........................|ale-haskell-stack-build| stack-ghc.............................|ale-haskell-stack-ghc| @@ -2160,6 +2244,8 @@ documented in additional help files. puppet................................|ale-puppet-puppet| puppetlint............................|ale-puppet-puppetlint| puppet-languageserver.................|ale-puppet-languageserver| + purescript..............................|ale-purescript-options| + purescript-language-server............|ale-purescript-language-server| pyrex (cython)..........................|ale-pyrex-options| cython................................|ale-pyrex-cython| python..................................|ale-python-options| @@ -2177,6 +2263,7 @@ documented in additional help files. pylint................................|ale-python-pylint| pyls..................................|ale-python-pyls| pyre..................................|ale-python-pyre| + reorder-python-imports................|ale-python-reorder_python_imports| vulture...............................|ale-python-vulture| yapf..................................|ale-python-yapf| qml.....................................|ale-qml-options| @@ -2187,6 +2274,7 @@ documented in additional help files. reasonml................................|ale-reasonml-options| merlin................................|ale-reasonml-merlin| ols...................................|ale-reasonml-ols| + reason-language-server................|ale-reasonml-language-server| refmt.................................|ale-reasonml-refmt| restructuredtext........................|ale-restructuredtext-options| textlint..............................|ale-restructuredtext-textlint| @@ -2199,6 +2287,7 @@ documented in additional help files. ruby..................................|ale-ruby-ruby| rufo..................................|ale-ruby-rufo| solargraph............................|ale-ruby-solargraph| + sorbet................................|ale-ruby-sorbet| standardrb............................|ale-ruby-standardrb| rust....................................|ale-rust-options| cargo.................................|ale-rust-cargo| @@ -2229,6 +2318,7 @@ documented in additional help files. spec....................................|ale-spec-options| rpmlint...............................|ale-spec-rpmlint| sql.....................................|ale-sql-options| + pgformatter...........................|ale-sql-pgformatter| sqlfmt................................|ale-sql-sqlfmt| stylus..................................|ale-stylus-options| stylelint.............................|ale-stylus-stylelint| @@ -2239,12 +2329,14 @@ documented in additional help files. tcl.....................................|ale-tcl-options| nagelfar..............................|ale-tcl-nagelfar| terraform...............................|ale-terraform-options| - fmt...................................|ale-terraform-fmt| + terraform-fmt-fixer...................|ale-terraform-fmt-fixer| + terraform.............................|ale-terraform-terraform| tflint................................|ale-terraform-tflint| tex.....................................|ale-tex-options| chktex................................|ale-tex-chktex| lacheck...............................|ale-tex-lacheck| latexindent...........................|ale-tex-latexindent| + texlab................................|ale-tex-texlab| texinfo.................................|ale-texinfo-options| write-good............................|ale-texinfo-write-good| text....................................|ale-text-options| @@ -2797,6 +2889,13 @@ ale#command#ManageFile(buffer, filename) *ale#command#ManageFile()* manages directories separately with the |ale#command#ManageDirectory| function. +ale#completion#OmniFunc(findstart, base) *ale#completion#OmniFunc()* + + A completion function to use with 'omnifunc'. + + See |ale-completion|. + + ale#engine#GetLoclist(buffer) *ale#engine#GetLoclist()* Given a buffer number, this function will return the list of problems @@ -3174,6 +3273,33 @@ ale#linter#PreventLoading(filetype) *ale#linter#PreventLoading()* |runtimepath| for that filetype. This function can be called from vimrc or similar to prevent ALE from loading linters. + +ale#lsp_linter#SendRequest(buffer, linter_name, message, [Handler]) + *ale#lsp_linter#SendRequest()* + + Send a custom request to an LSP linter. The arguments are defined as + follows: + + `buffer` A valid buffer number. + + `linter_name` A |String| identifying an LSP linter that is available and + enabled for the |filetype| of `buffer`. + + `message` A |List| in the form `[is_notification, method, parameters]`, + containing three elements: + `is_notification` - an |Integer| that has value 1 if the + request is a notification, 0 otherwise; + `method` - a |String|, identifying an LSP method supported + by `linter`; + `parameters` - a |dictionary| of LSP parameters that are + applicable to `method`. + + `Handler` Optional argument, meaningful only when `message[0]` is 0. + A |Funcref| that is called when a response to the request is + received, and takes as unique argument a dictionary + representing the response obtained from the server. + + ale#other_source#ShowResults(buffer, linter_name, loclist) *ale#other_source#ShowResults()* @@ -3312,7 +3438,7 @@ snazzy looking ale glass logo. Cheers, Mark! 11. Contact *ale-contact* If you like this plugin, and wish to get in touch, check out the GitHub -page for issues and more at https://github.com/w0rp/ale +page for issues and more at https://github.com/dense-analysis/ale If you wish to contact the author of this plugin directly, please feel free to send an email to devw0rp@gmail.com. diff --git a/sources_non_forked/ale/plugin/ale.vim b/sources_non_forked/ale/plugin/ale.vim index cf39d632..6262a7c4 100644 --- a/sources_non_forked/ale/plugin/ale.vim +++ b/sources_non_forked/ale/plugin/ale.vim @@ -71,12 +71,12 @@ let g:ale_linter_aliases = get(g:, 'ale_linter_aliases', {}) let g:ale_lint_delay = get(g:, 'ale_lint_delay', 200) " This flag can be set to 'never' to disable linting when text is changed. -" This flag can also be set to 'insert' or 'normal' to lint when text is -" changed only in insert or normal mode respectively. -let g:ale_lint_on_text_changed = get(g:, 'ale_lint_on_text_changed', 'always') +" This flag can also be set to 'always' or 'insert' to lint when text is +" changed in both normal and insert mode, or only in insert mode respectively. +let g:ale_lint_on_text_changed = get(g:, 'ale_lint_on_text_changed', 'normal') " This flag can be set to 1 to enable linting when leaving insert mode. -let g:ale_lint_on_insert_leave = get(g:, 'ale_lint_on_insert_leave', 0) +let g:ale_lint_on_insert_leave = get(g:, 'ale_lint_on_insert_leave', 1) " This flag can be set to 0 to disable linting when the buffer is entered. let g:ale_lint_on_enter = get(g:, 'ale_lint_on_enter', 1) @@ -142,6 +142,9 @@ let g:ale_completion_enabled = get(g:, 'ale_completion_enabled', 0) " Enable automatic detection of pipenv for Python linters. let g:ale_python_auto_pipenv = get(g:, 'ale_python_auto_pipenv', 0) +" This variable can be overridden to set the GO111MODULE environment variable. +let g:ale_go_go111module = get(g:, 'ale_go_go111module', '') + if g:ale_set_balloons call ale#balloon#Enable() endif diff --git a/sources_non_forked/ale/rplugin/python3/deoplete/sources/ale.py b/sources_non_forked/ale/rplugin/python3/deoplete/sources/ale.py index 7ed2f6c0..3955ed2d 100644 --- a/sources_non_forked/ale/rplugin/python3/deoplete/sources/ale.py +++ b/sources_non_forked/ale/rplugin/python3/deoplete/sources/ale.py @@ -21,13 +21,23 @@ class Source(Base): self.name = 'ale' self.mark = '[L]' - self.rank = 100 + self.rank = 1000 self.is_bytepos = True self.min_pattern_length = 1 + # Do not forget to update s:trigger_character_map in completion.vim in + # updating entries in this map. + self.input_patterns = { + '_': r'\.\w*$', + 'rust': r'(\.|::)\w*$', + 'typescript': r'(\.|\'|")\w*$', + 'cpp': r'(\.|::|->)\w*$', + } # Returns an integer for the start position, as with omnifunc. - def get_completion_position(self): - return self.vim.call('ale#completion#GetCompletionPosition') + def get_complete_position(self, context): + return self.vim.call( + 'ale#completion#GetCompletionPositionForDeoplete', context['input'] + ) def gather_candidates(self, context): # Stop early if ALE can't provide completion data for this buffer. diff --git a/sources_non_forked/ale/supported-tools.md b/sources_non_forked/ale/supported-tools.md index 18d69388..c933f510 100644 --- a/sources_non_forked/ale/supported-tools.md +++ b/sources_non_forked/ale/supported-tools.md @@ -23,6 +23,7 @@ formatting. * Ada * [gcc](https://gcc.gnu.org) + * [gnatpp](https://docs.adacore.com/gnat_ugn-docs/html/gnat_ugn/gnat_ugn/gnat_utility_programs.html#the-gnat-pretty-printer-gnatpp) :floppy_disk: * Ansible * [ansible-lint](https://github.com/willthames/ansible-lint) * API Blueprint @@ -62,6 +63,7 @@ formatting. * [gcc](https://gcc.gnu.org/) * [uncrustify](https://github.com/uncrustify/uncrustify) * C# + * [csc](http://www.mono-project.com/docs/about-mono/languages/csharp/) :floppy_disk: see:`help ale-cs-csc` for details and configuration * [mcs](http://www.mono-project.com/docs/about-mono/languages/csharp/) see:`help ale-cs-mcs` for details * [mcsc](http://www.mono-project.com/docs/about-mono/languages/csharp/) :floppy_disk: see:`help ale-cs-mcsc` for details and configuration * [uncrustify](https://github.com/uncrustify/uncrustify) @@ -124,14 +126,14 @@ formatting. * [hadolint](https://github.com/hadolint/hadolint) * Elixir * [credo](https://github.com/rrrene/credo) - * [dialyxir](https://github.com/jeremyjh/dialyxir) - * [dogma](https://github.com/lpil/dogma) + * [dialyxir](https://github.com/jeremyjh/dialyxir) :floppy_disk: + * [dogma](https://github.com/lpil/dogma) :floppy_disk: * [elixir-ls](https://github.com/JakeBecker/elixir-ls) :warning: * [mix](https://hexdocs.pm/mix/Mix.html) :warning: :floppy_disk: * Elm * [elm-format](https://github.com/avh4/elm-format) * [elm-lsp](https://github.com/antew/elm-lsp) - * [elm-make](https://github.com/elm-lang/elm-make) + * [elm-make](https://github.com/elm/compiler) * Erb * [erb](https://apidock.com/ruby/ERB) * [erubi](https://github.com/jeremyevans/erubi) @@ -190,6 +192,7 @@ formatting. * [hdevtools](https://hackage.haskell.org/package/hdevtools) * [hfmt](https://github.com/danstiner/hfmt) * [hie](https://github.com/haskell/haskell-ide-engine) + * [hindent](https://hackage.haskell.org/package/hindent) * [hlint](https://hackage.haskell.org/package/hlint) * [stack-build](https://haskellstack.org/) :floppy_disk: * [stack-ghc](https://haskellstack.org/) @@ -245,6 +248,7 @@ formatting. * [lacheck](https://www.ctan.org/pkg/lacheck) * [proselint](http://proselint.com/) * [redpen](http://redpen.cc/) + * [texlab](https://texlab.netlify.com) ([Rust rewrite](https://github.com/latex-lsp/texlab/tree/rust)) * [textlint](https://textlint.github.io/) * [vale](https://github.com/ValeLint/vale) * [write-good](https://github.com/btford/write-good) @@ -346,6 +350,8 @@ formatting. * [languageserver](https://github.com/lingua-pupuli/puppet-editor-services) * [puppet](https://puppet.com) * [puppet-lint](https://puppet-lint.com) +* PureScript + * [purescript-language-server](https://github.com/nwolverson/purescript-language-server) * Python * [autopep8](https://github.com/hhatto/autopep8) * [bandit](https://github.com/PyCQA/bandit) :warning: @@ -361,6 +367,7 @@ formatting. * [pylint](https://www.pylint.org/) :floppy_disk: * [pyls](https://github.com/palantir/python-language-server) :warning: * [pyre](https://github.com/facebook/pyre-check) :warning: + * [reorder-python-imports](https://github.com/asottile/reorder_python_imports) * [vulture](https://github.com/jendrikseipp/vulture) :warning: :floppy_disk: * [yapf](https://github.com/google/yapf) * QML @@ -374,6 +381,7 @@ formatting. * ReasonML * [merlin](https://github.com/the-lambda-church/merlin) see `:help ale-reasonml-ols` for configuration instructions * [ols](https://github.com/freebroccolo/ocaml-language-server) + * [reason-language-server](https://github.com/jaredly/reason-language-server) * [refmt](https://github.com/reasonml/reason-cli) * reStructuredText * [alex](https://github.com/wooorm/alex) :floppy_disk: @@ -395,6 +403,7 @@ formatting. * [ruby](https://www.ruby-lang.org) * [rufo](https://github.com/ruby-formatter/rufo) * [solargraph](https://solargraph.org) + * [sorbet](https://github.com/sorbet/sorbet) * [standardrb](https://github.com/testdouble/standard) * Rust * [cargo](https://github.com/rust-lang/cargo) :floppy_disk: (see `:help ale-integration-rust` for configuration instructions) @@ -423,6 +432,7 @@ formatting. * [solhint](https://github.com/protofire/solhint) * [solium](https://github.com/duaraghav8/Solium) * SQL + * [pgformatter](https://github.com/darold/pgFormatter) * [sqlfmt](https://github.com/jackc/sqlfmt) * [sqlint](https://github.com/purcell/sqlint) * Stylus diff --git a/sources_non_forked/goyo.vim/autoload/goyo.vim b/sources_non_forked/goyo.vim/autoload/goyo.vim index 94216d1a..6667620e 100644 --- a/sources_non_forked/goyo.vim/autoload/goyo.vim +++ b/sources_non_forked/goyo.vim/autoload/goyo.vim @@ -260,7 +260,7 @@ function! s:goyo_on(dim) augroup goyo autocmd! - autocmd TabLeave * call s:goyo_off() + autocmd TabLeave * nested call s:goyo_off() autocmd VimResized * call s:resize_pads() autocmd ColorScheme * call s:tranquilize() autocmd BufWinEnter * call s:hide_linenr() | call s:hide_statusline() diff --git a/sources_non_forked/lightline.vim/.travis.yml b/sources_non_forked/lightline.vim/.travis.yml index 179c66dc..9c8184a2 100644 --- a/sources_non_forked/lightline.vim/.travis.yml +++ b/sources_non_forked/lightline.vim/.travis.yml @@ -1,7 +1,5 @@ language: generic -sudo: false - install: - git clone --depth=1 https://github.com/thinca/vim-themis /tmp/themis - (if ! test -d $HOME/vim-$VIM_VERSION/bin; then @@ -18,6 +16,8 @@ cache: - $HOME/vim-$VIM_VERSION env: + - VIM_VERSION=8.1.1775 + - VIM_VERSION=8.1.1700 - VIM_VERSION=8.1.0000 - VIM_VERSION=8.0.0000 - VIM_VERSION=7.4 diff --git a/sources_non_forked/lightline.vim/README.md b/sources_non_forked/lightline.vim/README.md index 1e6eb816..656fe90c 100644 --- a/sources_non_forked/lightline.vim/README.md +++ b/sources_non_forked/lightline.vim/README.md @@ -52,11 +52,17 @@ landscape is my colorscheme, which is a high-contrast cterm-supported colorschem + Orthogonality. The plugin does not rely on the implementation of other plugins. Such plugin crossing settings should be configured by users. ## Installation +### [Vim packages](http://vimhelp.appspot.com/repeat.txt.html#packages) (since Vim 7.4.1528) + + git clone https://github.com/itchyny/lightline.vim ~/.vim/pack/plugins/start/lightline + ### [Pathogen](https://github.com/tpope/vim-pathogen) 1. Install with the following command. git clone https://github.com/itchyny/lightline.vim ~/.vim/bundle/lightline.vim +2. Generate help tags with `:Helptags`. + ### [Vundle](https://github.com/VundleVim/Vundle.vim) 1. Add the following configuration to your `.vimrc`. diff --git a/sources_non_forked/lightline.vim/autoload/lightline.vim b/sources_non_forked/lightline.vim/autoload/lightline.vim index 2076a114..127622c0 100644 --- a/sources_non_forked/lightline.vim/autoload/lightline.vim +++ b/sources_non_forked/lightline.vim/autoload/lightline.vim @@ -2,7 +2,7 @@ " Filename: autoload/lightline.vim " Author: itchyny " License: MIT License -" Last Change: 2018/11/24 12:00:00. +" Last Change: 2019/08/20 14:00:00. " ============================================================================= let s:save_cpo = &cpo @@ -11,6 +11,7 @@ set cpo&vim let s:_ = 1 " 1: uninitialized, 2: disabled function! lightline#update() abort + if &buftype ==# 'popup' | return | endif if s:_ if s:_ == 2 | return | endif call lightline#init() @@ -20,7 +21,7 @@ function! lightline#update() abort return endif let w = winnr() - let s = winnr('$') == 1 ? [lightline#statusline(0)] : [lightline#statusline(0), lightline#statusline(1)] + let s = winnr('$') == 1 && w > 0 ? [lightline#statusline(0)] : [lightline#statusline(0), lightline#statusline(1)] for n in range(1, winnr('$')) call setwinvar(n, '&statusline', s[n!=w]) call setwinvar(n, 'lightline', n!=w) @@ -45,7 +46,10 @@ function! lightline#enable() abort call lightline#update() augroup lightline autocmd! - autocmd WinEnter,BufWinEnter,FileType,SessionLoadPost * call lightline#update() + autocmd WinEnter,BufEnter,SessionLoadPost * call lightline#update() + if !has('patch-8.1.1715') + autocmd FileType qf call lightline#update() + endif autocmd SessionLoadPost * call lightline#highlight() autocmd ColorScheme * if !has('vim_starting') || expand('') !=# 'macvim' \ | call lightline#update() | call lightline#highlight() | endif diff --git a/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/ayu_mirage.vim b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/ayu_mirage.vim new file mode 100644 index 00000000..85da9025 --- /dev/null +++ b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/ayu_mirage.vim @@ -0,0 +1,39 @@ +" ============================================================================= +" Filename: autoload/lightline/colorscheme/ayu_mirage.vim +" Author: impulse +" License: MIT License +" Last Change: 2019/08/11 11:52:20. +" ============================================================================= +let s:base0 = [ '#d9d7ce', 244 ] +let s:base1 = [ '#d9d7ce', 247 ] +let s:base2 = [ '#607080', 248 ] +let s:base3 = [ '#d9d7ce', 252 ] +let s:base00 = [ '#272d38', 242 ] +let s:base01 = [ '#272d38', 240 ] +let s:base02 = [ '#212733', 238 ] +let s:base023 = [ '#212733', 236 ] +let s:base03 = [ '#ffc44c', 235 ] +let s:yellow = [ '#ffc44c', 180 ] +let s:orange = [ '#ffae57', 173 ] +let s:red = [ '#f07178', 203 ] +let s:magenta = [ '#d4bfff', 216 ] +let s:blue = [ '#59c2ff', 117 ] +let s:cyan = s:blue +let s:green = [ '#bbe67e', 119 ] +let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}} +let s:p.normal.left = [ [ s:base02, s:blue ], [ s:base3, s:base01 ] ] +let s:p.normal.middle = [ [ s:base2, s:base02 ] ] +let s:p.normal.right = [ [ s:base02, s:base0 ], [ s:base1, s:base01 ] ] +let s:p.inactive.left = [ [ s:base1, s:base01 ], [ s:base3, s:base01 ] ] +let s:p.inactive.middle = [ [ s:base1, s:base023 ] ] +let s:p.inactive.right = [ [ s:base1, s:base01 ], [ s:base2, s:base02 ] ] +let s:p.insert.left = [ [ s:base02, s:green ], [ s:base3, s:base01 ] ] +let s:p.replace.left = [ [ s:base023, s:red ], [ s:base3, s:base01 ] ] +let s:p.visual.left = [ [ s:base02, s:magenta ], [ s:base3, s:base01 ] ] +let s:p.tabline.tabsel = [ [ s:base02, s:base03 ] ] +let s:p.tabline.left = [ [ s:base3, s:base00 ] ] +let s:p.tabline.middle = [ [ s:base2, s:base02 ] ] +let s:p.tabline.right = [ [ s:base2, s:base00 ] ] +let s:p.normal.error = [ [ s:base03, s:red ] ] +let s:p.normal.warning = [ [ s:base023, s:yellow ] ] +let g:lightline#colorscheme#ayu_mirage#palette = lightline#colorscheme#flatten(s:p) diff --git a/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/powerlineish.vim b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/powerlineish.vim new file mode 100644 index 00000000..34058a87 --- /dev/null +++ b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/powerlineish.vim @@ -0,0 +1,28 @@ +" ============================================================================= +" Filename: autoload/lightline/colorscheme/powerlineish.vim +" Author: itchyny +" License: MIT License +" Last Change: 2019/06/12 18:47:00. +" ============================================================================= + +let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}} +let s:p.normal.left = [ ['darkestgreen', 'brightgreen', 'bold'], ['white', 'gray0'] ] +let s:p.normal.right = [ ['gray10', 'gray2'], ['white', 'gray1'], ['white', 'gray0'] ] +let s:p.inactive.right = [ ['gray1', 'gray5'], ['gray4', 'gray1'], ['gray4', 'gray0'] ] +let s:p.inactive.left = s:p.inactive.right[1:] +let s:p.insert.left = [ ['darkestcyan', 'white', 'bold'], ['mediumcyan', 'darkestblue'] ] +let s:p.insert.right = [ [ 'darkestblue', 'mediumcyan' ], [ 'mediumcyan', 'darkblue' ], [ 'mediumcyan', 'darkestblue' ] ] +let s:p.replace.left = [ ['white', 'brightred', 'bold'], ['white', 'gray0'] ] +let s:p.visual.left = [ ['black', 'brightestorange', 'bold'], ['white', 'gray0'] ] +let s:p.normal.middle = [ [ 'white', 'gray0' ] ] +let s:p.insert.middle = [ [ 'mediumcyan', 'darkestblue' ] ] +let s:p.replace.middle = s:p.normal.middle +let s:p.replace.right = s:p.normal.right +let s:p.tabline.left = [ [ 'gray9', 'gray0' ] ] +let s:p.tabline.tabsel = [ [ 'gray9', 'gray2' ] ] +let s:p.tabline.middle = [ [ 'gray2', 'gray0' ] ] +let s:p.tabline.right = [ [ 'gray9', 'gray1' ] ] +let s:p.normal.error = [ [ 'gray9', 'brightestred' ] ] +let s:p.normal.warning = [ [ 'gray1', 'yellow' ] ] + +let g:lightline#colorscheme#powerlineish#palette = lightline#colorscheme#fill(s:p) diff --git a/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/selenized_dark.vim b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/selenized_dark.vim new file mode 100644 index 00000000..585b948b --- /dev/null +++ b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/selenized_dark.vim @@ -0,0 +1,50 @@ +" ============================================================================= +" Filename: autoload/lightline/colorscheme/selenized_dark.vim +" Author: Charles Hall +" License: MIT License +" Last Change: 2019/07/22 11:05:34. +" ============================================================================= + +" https://github.com/jan-warchol/selenized/blob/master/the-values.md#selenized-dark +let s:black = [ "#184956", 0 ] +let s:red = [ "#fa5750", 1 ] +let s:green = [ "#75b938", 2 ] +let s:yellow = [ "#dbb32d", 3 ] +let s:blue = [ "#4695f7", 4 ] +let s:magenta = [ "#f275be", 5 ] +let s:cyan = [ "#41c7b9", 6 ] +let s:white = [ "#72898f", 7 ] +let s:brblack = [ "#2d5b69", 8 ] +let s:brred = [ "#ff665c", 9 ] +let s:brgreen = [ "#84c747", 10 ] +let s:bryellow = [ "#ebc13d", 11 ] +let s:brblue = [ "#58a3ff", 12 ] +let s:brmagenta = [ "#ff84cd", 13 ] +let s:brcyan = [ "#53d6c7", 14 ] +let s:brwhite = [ "#cad8d9", 15 ] + +let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}} + +let s:p.normal.right = [[ s:black, s:blue ],[ s:cyan, s:brblack ],[ s:white, s:black ]] +let s:p.normal.left = [[ s:black, s:blue ],[ s:cyan, s:brblack ]] +let s:p.normal.middle = [[ s:black, s:black ]] +let s:p.normal.error = [[ s:black, s:red ]] +let s:p.normal.warning = [[ s:black, s:yellow ]] + +let s:p.insert.right = [[ s:black, s:green ],[ s:cyan, s:brblack ],[ s:white, s:black ]] +let s:p.insert.left = [[ s:black, s:green ],[ s:cyan, s:brblack ]] + +let s:p.visual.right = [[ s:black, s:magenta ],[ s:cyan, s:brblack ],[ s:white, s:black ]] +let s:p.visual.left = [[ s:black, s:magenta ],[ s:cyan, s:brblack ]] + +let s:p.inactive.left = [[ s:brblue, s:brblack ],[ s:cyan, s:brblack ]] +let s:p.inactive.right = [[ s:brblue, s:brblack ],[ s:cyan, s:brblack ]] + +let s:p.replace.right = [[ s:black, s:red ],[ s:cyan, s:brblack ],[ s:white, s:black ]] +let s:p.replace.left = [[ s:black, s:red ],[ s:cyan, s:brblack ]] + +let s:p.tabline.right = [[ s:black, s:red ]] +let s:p.tabline.left = [[ s:cyan, s:brblack ]] +let s:p.tabline.tabsel = [[ s:black, s:blue ]] + +let g:lightline#colorscheme#selenized_dark#palette = lightline#colorscheme#flatten(s:p) diff --git a/sources_non_forked/lightline.vim/doc/lightline.txt b/sources_non_forked/lightline.vim/doc/lightline.txt index 7c2a886b..cf64523b 100644 --- a/sources_non_forked/lightline.vim/doc/lightline.txt +++ b/sources_non_forked/lightline.vim/doc/lightline.txt @@ -4,7 +4,7 @@ Version: 0.1 Author: itchyny (https://github.com/itchyny) License: MIT License Repository: https://github.com/itchyny/lightline.vim -Last Change: 2018/04/28 00:08:18. +Last Change: 2019/08/14 10:46:55. CONTENTS *lightline-contents* @@ -226,10 +226,12 @@ OPTIONS *lightline-option* < g:lightline.colorscheme *g:lightline.colorscheme* The colorscheme for lightline.vim. - Currently, wombat, solarized, powerline, jellybeans, Tomorrow, - Tomorrow_Night, Tomorrow_Night_Blue, Tomorrow_Night_Eighties, - PaperColor, seoul256, landscape, one, darcula, molokai, materia, - material, OldHope, nord, 16color and deus are available. + Currently, wombat, solarized, powerline, powerlineish, + jellybeans, molokai, seoul256, darcula, selenized_dark, + Tomorrow, Tomorrow_Night, Tomorrow_Night_Blue, + Tomorrow_Night_Bright, Tomorrow_Night_Eighties, PaperColor, + landscape, one, materia, material, OldHope, nord, deus, + srcery_drk, ayu_mirage and 16color are available. The default value is: > let g:lightline.colorscheme = 'default' @@ -986,12 +988,15 @@ Problem 1: *lightline-problem-1* 1. Put all the files under $VIM. - If you are using |vim-pathogen|, install this plugin with the - following command. + If you are to install this plugin using |vim-pathogen|: + + 1. Install this plugin with the following command. > git clone https://github.com/itchyny/lightline.vim \ ~/.vim/bundle/lightline.vim < + 2. Generate help tags with |:Helptags|. + If you are to install this plugin using |Vundle|: 1. Add the following configuration to your diff --git a/sources_non_forked/lightline.vim/plugin/lightline.vim b/sources_non_forked/lightline.vim/plugin/lightline.vim index fc8f5981..d08517d7 100644 --- a/sources_non_forked/lightline.vim/plugin/lightline.vim +++ b/sources_non_forked/lightline.vim/plugin/lightline.vim @@ -2,7 +2,7 @@ " Filename: plugin/lightline.vim " Author: itchyny " License: MIT License -" Last Change: 2018/06/22 08:49:00. +" Last Change: 2019/07/30 12:00:00. " ============================================================================= if exists('g:loaded_lightline') || v:version < 700 @@ -15,12 +15,20 @@ set cpo&vim augroup lightline autocmd! - autocmd WinEnter,BufWinEnter,FileType,SessionLoadPost * call lightline#update() + autocmd WinEnter,BufEnter,SessionLoadPost * call lightline#update() + if !has('patch-8.1.1715') + autocmd FileType qf call lightline#update() + endif autocmd SessionLoadPost * call lightline#highlight() autocmd ColorScheme * if !has('vim_starting') || expand('') !=# 'macvim' \ | call lightline#update() | call lightline#highlight() | endif autocmd CursorMoved,BufUnload * call lightline#update_once() augroup END +" This quickfix option was introduced at Vim 85850f3a5ef9, which is the commit +" just before 8.1.1715. Before this patch, autocmd FileType is required to +" overwrite the statusline of the quickfix and location windows. +let g:qf_disable_statusline = 1 + let &cpo = s:save_cpo unlet s:save_cpo diff --git a/sources_non_forked/lightline.vim/test/.themisrc b/sources_non_forked/lightline.vim/test/.themisrc index c226c089..6e0121ce 100644 --- a/sources_non_forked/lightline.vim/test/.themisrc +++ b/sources_non_forked/lightline.vim/test/.themisrc @@ -18,3 +18,5 @@ endfunction function! SID(name) abort return function(printf("\%d_%s", s:sid('autoload/lightline.vim'), a:name)) endfunction + +filetype plugin on diff --git a/sources_non_forked/lightline.vim/test/popup.vim b/sources_non_forked/lightline.vim/test/popup.vim new file mode 100644 index 00000000..cc4e882a --- /dev/null +++ b/sources_non_forked/lightline.vim/test/popup.vim @@ -0,0 +1,19 @@ +if !exists('*popup_menu') || !exists('*win_execute') + finish +endif + +let s:suite = themis#suite('popup') +let s:assert = themis#helper('assert') + +function! s:suite.before_each() + let g:lightline = {} + call lightline#init() + tabnew + tabonly +endfunction + +function! s:suite.win_execute_setfiletype() + let id = popup_menu(['aaa', 'bbb'], {}) + call win_execute(id, 'setfiletype vim') + call popup_close(id) +endfunction diff --git a/sources_non_forked/lightline.vim/test/quickfix.vim b/sources_non_forked/lightline.vim/test/quickfix.vim new file mode 100644 index 00000000..df4fce7a --- /dev/null +++ b/sources_non_forked/lightline.vim/test/quickfix.vim @@ -0,0 +1,25 @@ +let s:suite = themis#suite('quickfix') +let s:assert = themis#helper('assert') + +function! s:suite.before_each() + let g:lightline = {} + call lightline#init() + tabnew + tabonly +endfunction + +function! s:suite.quickfix_statusline() + call setloclist(winnr(), []) + lopen + wincmd p + call setloclist(winnr(), []) + for n in range(1, winnr('$')) + let statusline = getwinvar(n, '&statusline') + call s:assert.match(statusline, 'lightline') + if has('patch-8.1.1715') + call s:assert.match(statusline, n == 1 ? '_active_' : '_inactive_') + else + call s:assert.match(statusline, n != 1 ? '_active_' : '_inactive_') + endif + endfor +endfunction diff --git a/sources_non_forked/nerdtree/.github/ISSUE_TEMPLATE.md b/sources_non_forked/nerdtree/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index c3ca5eff..00000000 --- a/sources_non_forked/nerdtree/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,28 +0,0 @@ - - -### Environment - - -* Operating System: -* Vim version `:version`: -* NERDTree version `git rev-parse --short HEAD`: -* NERDTree settings applied in your vimrc, if any: - ```vim - ``` - -### Process - - -1. - -### Current Result - - -### Expected Result - - -### Screenshot(s) - -### Possible Fix - - diff --git a/sources_non_forked/nerdtree/.github/ISSUE_TEMPLATE/bug.md b/sources_non_forked/nerdtree/.github/ISSUE_TEMPLATE/bug.md new file mode 100644 index 00000000..dd351350 --- /dev/null +++ b/sources_non_forked/nerdtree/.github/ISSUE_TEMPLATE/bug.md @@ -0,0 +1,45 @@ +--- +name: "Bug Report" +about: "NERDTree is misbehaving? Tell us about it." +labels: bug +--- + + +#### Self-Diagnosis + +- [ ] I have searched the [issues](https://github.com/scrooloose/nerdtree/issues) for an answer to my question. +- [ ] I have reviewed the NERDTree documentation. `:h NERDTree` +- [ ] I have reviewed the [Wiki](https://github.com/scrooloose/nerdtree/wiki). +- [ ] I have searched the web for an answer to my question. + +#### Environment (for bug reports) +- [ ] Operating System: +- [ ] Vim/Neovim version `:echo v:version`: +- [ ] NERDTree version, found on 1st line in NERDTree quickhelp `?`: +- [ ] vimrc settings + - [ ] NERDTree variables + ```vim + ``` + - Other NERDTree-dependent Plugins + - [ ] jistr/vim-nerdtree-tabs + - [ ] ryanoasis/vim-devicons + - [ ] tiagofumo/vim-nerdtree-syntax-highlight + - [ ] Xuyuanp/nerdtree-git-plugin + - [ ] Others (specify): + - [ ] I've verified the issue occurs with only NERDTree installed. + +#### Steps to Reproduce the Issue +1. + +#### Current Result (Include screenshots where appropriate.) + +#### Expected Result + diff --git a/sources_non_forked/nerdtree/.github/ISSUE_TEMPLATE/feature_request.md b/sources_non_forked/nerdtree/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..35db0f6a --- /dev/null +++ b/sources_non_forked/nerdtree/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,8 @@ +--- +name: "Feature Request" +about: "What new feature are you requesting for NERDTree?" +labels: "feature request" +--- + +#### Description + diff --git a/sources_non_forked/nerdtree/.github/ISSUE_TEMPLATE/question.md b/sources_non_forked/nerdtree/.github/ISSUE_TEMPLATE/question.md new file mode 100644 index 00000000..25f15b02 --- /dev/null +++ b/sources_non_forked/nerdtree/.github/ISSUE_TEMPLATE/question.md @@ -0,0 +1,24 @@ +--- +name: "General Question" +about: "Having trouble setting up NERDTree? Need clarification on a setting? Ask your question here." +labels: "general question" +--- + + +#### Self-Diagnosis + +- [ ] I have searched the [issues](https://github.com/scrooloose/nerdtree/issues) for an answer to my question. +- [ ] I have reviewed the NERDTree documentation. `:h NERDTree` +- [ ] I have reviewed the [Wiki](https://github.com/scrooloose/nerdtree/wiki). +- [ ] I have searched the web for an answer to my question. + +#### State Your Question + diff --git a/sources_non_forked/nerdtree/.github/PULL_REQUEST_TEMPLATE.md b/sources_non_forked/nerdtree/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..ccd5bf8d --- /dev/null +++ b/sources_non_forked/nerdtree/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,13 @@ +### Description of Changes +Closes # + + +--- +### New Version Info + +- [ ] Derive a new version number. Increment the: + - [ ] `MAJOR` version when you make incompatible API changes + - [ ] `MINOR` version when you add functionality in a backwards-compatible manner + - [ ] `PATCH` version when you make backwards-compatible bug fixes +- [ ] Update [CHANGELOG.md](https://github.com/scrooloose/nerdtree/blob/master/CHANGELOG.md), following the established pattern. +- [ ] Tag the merge commit, e.g. `git tag -a 3.1.4 -m "v3.1.4" && git push origin --tags` diff --git a/sources_non_forked/nerdtree/CHANGELOG b/sources_non_forked/nerdtree/CHANGELOG deleted file mode 100644 index 6dac46dd..00000000 --- a/sources_non_forked/nerdtree/CHANGELOG +++ /dev/null @@ -1,179 +0,0 @@ -Next - - Fix broken "t" and "T" mappings, tabs now open at end (lifecrisis) #759 - - Update doc with already existing mapping variables (asnr) #699 - - Fix the broken g:NERDTreeBookmarksSort setting (lifecrisis) #696 - - Correct NERDTreeIgnore pattern in doc (cntoplolicon) #648 - - Remove empty segments when splitting path (sooth-sayer) #574 - - Suppress autocmds less agressively (wincent) #578 #691 - - Add an Issues template to ask for more info initially. - - Fix markdown headers in readme (josephfrazier) #676 - - Don't touch @o and @h registers when rendering - - Fix bug with files and directories with dollar signs (alegen) #649 - - Reuse/reopen existing window trees where possible #244 - - Remove NERDTree.previousBuf() - - Change color of arrow (Leeiio) #630 - - Improved a tip in README.markdown (ggicci) #628 - - Shorten delete confimration of empty directory to 'y' (mikeperri) #530 - - Fix API call to open directory tree in window (devm33) #533 - - Change default arrows on non-Windows platforms (gwilk) #546 - - Update to README - combine cd and git clone (zwhitchcox) #584 - - Update to README - Tip: start NERDTree when vim starts (therealplato) #593 - - Escape filename when moving an open buffer (zacharyvoase) #595 - - Fixed incorrect :helptags command in README (curran) #619 - - Fixed incomplete escaping of folder arrows (adityanatraj) #548 - - Added NERDTreeCascadeSingleChildDir option (juanibiapina) #558 - - Replace strchars() with backward compatible workaround. - - Add support for copy command in Windows (SkylerLipthay) #231 - - Fixed typo in README.markdown - :Helptags -> :helptags - - 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/CHANGELOG.md b/sources_non_forked/nerdtree/CHANGELOG.md new file mode 100644 index 00000000..9e494175 --- /dev/null +++ b/sources_non_forked/nerdtree/CHANGELOG.md @@ -0,0 +1,222 @@ +# Change Log + +#### 5.3... +- **.0**: Add file extension and size to sorting capabilities [#1029](https://github.com/scrooloose/nerdtree/pull/1029) +#### 5.2... +- **.9**: Suppress events for intermediate window/tab/buffer changes [#1026](https://github.com/scrooloose/nerdtree/pull/1026) +- **.8**: Revert [#1019](https://github.com/scrooloose/nerdtree/pull/1019) to fix nvim artifacts and flickering. (PhilRunninger) [#1021](https://github.com/scrooloose/nerdtree/pull/1021) +- **.7**: Use :mode only in neovim. MacVim still needs to use :redraw! [#1019](https://github.com/scrooloose/nerdtree/pull/1019) +- **.6**: In CHANGELOG.md and PR template, make reference to PR a true HTML link. [#1017](https://github.com/scrooloose/nerdtree/pull/1017) +- **.5**: Use `:mode` instead of `:redraw!` when updating menu. (PhilRunninger) [#1016](https://github.com/scrooloose/nerdtree/pull/1016) +- **.4**: When searching for root line num, stop at end of file. (PhilRunninger) [#1015](https://github.com/scrooloose/nerdtree/pull/1015) +- **.3**: Fix `` key map on the bookmark (lkebin) [#1014](https://github.com/scrooloose/nerdtree/pull/1014) +- **.2**: Make Enter work on the `.. ( up a dir )` line (PhilRunninger) [#1013](https://github.com/scrooloose/nerdtree/pull/1013) +- **.1**: Fix nerdtree#version() on Windows. (PhilRunninger) +- **.0**: Expand functionality of `` mapping. (PhilRunninger) [#1011](https://github.com/scrooloose/nerdtree/pull/1011) +#### 5.1... +- **.3**: Remove @mentions from PR template and change log. They weren't working. (PhilRunninger) [#1009](https://github.com/scrooloose/nerdtree/pull/1009) +- **.2**: Fix NERDTree opening with the wrong size. (PhilRunninger) [#1008](https://github.com/scrooloose/nerdtree/pull/1008) +- **.1**: Update Changelog and create PR Template (PhilRunninger) [#1007](https://github.com/scrooloose/nerdtree/pull/1007) +- **.0**: Too many changes for one patch... + - Refresh a dir_node if the file wasn't found in it, and look once more. (PhilRunninger) [#1005](https://github.com/scrooloose/nerdtree/pull/1005) + - Add a "copy path to clipboard" menu option (PhilRunninger) [#1002](https://github.com/scrooloose/nerdtree/pull/1002) + - Enable root refresh on "vim ." a different way than [#999](https://github.com/scrooloose/nerdtree/pull/999). (PhilRunninger) [#1001](https://github.com/scrooloose/nerdtree/pull/1001) + - Fix refreshroot (PhilRunninger) [#999](https://github.com/scrooloose/nerdtree/pull/999) + - Change version check to look for 703 not 730 (vhalis) [#994](https://github.com/scrooloose/nerdtree/pull/994) + - Change minimum vim (PhilRunninger) [#991](https://github.com/scrooloose/nerdtree/pull/991) + - Allow multi-character DirArrows (PhilRunninger) [#985](https://github.com/scrooloose/nerdtree/pull/985) + - Remove redraw! while still clearing last message empty string. (PhilRunninger) [#979](https://github.com/scrooloose/nerdtree/pull/979) + - fix `_initChildren` function value set to numChildrenCached error (terryding77) [#969](https://github.com/scrooloose/nerdtree/pull/969) + - On Windows, do a case-insensitive comparison of paths. (PhilRunninger) [#967](https://github.com/scrooloose/nerdtree/pull/967) + - Remove the **Please wait... DONE** messages. (PhilRunninger) [#966](https://github.com/scrooloose/nerdtree/pull/966) + - Smarter delimiter default (PhilRunninger) [#963](https://github.com/scrooloose/nerdtree/pull/963) + - Update directory .vimdc readme example (spencerdcarlson) [#961](https://github.com/scrooloose/nerdtree/pull/961) + - Preview bookmarks (PhilRunninger) [#956](https://github.com/scrooloose/nerdtree/pull/956) + - Add new value to NERDTreeQuitOnOpen to close bookmark table (PhilRunninger) [#955](https://github.com/scrooloose/nerdtree/pull/955) + - Add an :EditBookmarks command to edit the bookmarks file (PhilRunninger) [#954](https://github.com/scrooloose/nerdtree/pull/954) + - Before copying, turn off &shellslash. Restore after copy is finished. (PhilRunninger) [#952](https://github.com/scrooloose/nerdtree/pull/952) + - Set a maximum window size when zooming. (PhilRunninger) [#950](https://github.com/scrooloose/nerdtree/pull/950) + - Confirm the wipeout of a unsaved buffer whose file has been renamed. (PhilRunninger) [#949](https://github.com/scrooloose/nerdtree/pull/949) + - Escape a backslash so it can be used in a key mapping. (PhilRunninger) [#948](https://github.com/scrooloose/nerdtree/pull/948) + - Add a NERDTreeMinimalMenu feature (tuzz) [#938](https://github.com/scrooloose/nerdtree/pull/938) + - fixed root path error for windows (zcodes) [#935](https://github.com/scrooloose/nerdtree/pull/935) + - Restore getDirChildren for use in nerdtree-project-plugin. (PhilRunninger) [#929](https://github.com/scrooloose/nerdtree/pull/929) + - Document NERDTreeNodeDelimiter [#912](https://github.com/scrooloose/nerdtree/pull/912) (PhilRunninger) [#926](https://github.com/scrooloose/nerdtree/pull/926) + - Allow modification of menu keybindings (Leandros) [#923](https://github.com/scrooloose/nerdtree/pull/923) + - Add two more disqualifications for isCascadable(). (PhilRunninger) [#914](https://github.com/scrooloose/nerdtree/pull/914) + - Allow highlighting more than one flag. (kristijanhusak) [#908](https://github.com/scrooloose/nerdtree/pull/908) + - Support sorting files and directories by modification time. (PhilRunninger) [#901](https://github.com/scrooloose/nerdtree/pull/901) + - Parse . and .. from path string with trailing slash. (PhilRunninger) [#899](https://github.com/scrooloose/nerdtree/pull/899) + - Force sort to recalculate the cached sortKey. (PhilRunninger) [#898](https://github.com/scrooloose/nerdtree/pull/898) + - Add NERDTreeRefreshRoot command (wgfm) [#897](https://github.com/scrooloose/nerdtree/pull/897) + - Call Resolve on the file's path when calling :NERDTreeFind. (PhilRunninger) [#896](https://github.com/scrooloose/nerdtree/pull/896) + - Catch all errors, not just NERDTree errors. (PhilRunninger) [#894](https://github.com/scrooloose/nerdtree/pull/894) + - Fix typo in help file (lvoisin) [#892](https://github.com/scrooloose/nerdtree/pull/892) + - Make NERDTreeCreator set the `'nolist'` option (lifecrisis) [#889](https://github.com/scrooloose/nerdtree/pull/889) + - Refresh buffers after `m`, `m` operation on a folder (PhilRunninger) [#888](https://github.com/scrooloose/nerdtree/pull/888) + - Use a better arg for FINDSTR when using the m,l command in Windows. (PhilRunninger) [#887](https://github.com/scrooloose/nerdtree/pull/887) + - Fix the / motions, which currently fail with cascades (lifecrisis) [#886](https://github.com/scrooloose/nerdtree/pull/886) + - Function "s:UI.getLineNum()" doesn't always work on cascades. (lifecrisis) [#882](https://github.com/scrooloose/nerdtree/pull/882) + - NERDTreeCWD: reset CWD if changed by NERDTreeFocus (PhilRunninger) [#878](https://github.com/scrooloose/nerdtree/pull/878) + - Use tabnext instead of gt to allow users to remap gt. (PhilRunninger) [#877](https://github.com/scrooloose/nerdtree/pull/877) + - Do a case sensitive comparison of new/existing buffers. (PhilRunninger) [#875](https://github.com/scrooloose/nerdtree/pull/875) + - Fix opening sub-directories that have commas in their name. (PhilRunninger) [#873](https://github.com/scrooloose/nerdtree/pull/873) + - Add new command to open NERDTree in the root of a VCS repository. (PhilRunninger) [#872](https://github.com/scrooloose/nerdtree/pull/872) + - Make sure the path to the bookmarks file exists before writing it. (PhilRunninger) [#871](https://github.com/scrooloose/nerdtree/pull/871) + - Unzoom NERDTree when opening a file (PhilRunninger) [#870](https://github.com/scrooloose/nerdtree/pull/870) + - Support unusual characters in file and directory names (PhilRunninger) [#868](https://github.com/scrooloose/nerdtree/pull/868) + - Reword renamed-buffer prompt to be more clear (aflock) [#867](https://github.com/scrooloose/nerdtree/pull/867) + - Default to placing cursor on root when closing bookmark table (lifecrisis) [#866](https://github.com/scrooloose/nerdtree/pull/866) + - Fix issues with sorting of nodes (PhilRunninger) [#856](https://github.com/scrooloose/nerdtree/pull/856) + - Better OSX detection (bubba-h57) [#853](https://github.com/scrooloose/nerdtree/pull/853) + - Bugfix - ensure keymaps dictionary exists before using it (mnussbaum) [#852](https://github.com/scrooloose/nerdtree/pull/852) + - Decrease startup-time by avoiding linear-time iteration over key mappings (mnussbaum) [#851](https://github.com/scrooloose/nerdtree/pull/851) + - Add code to sort mappings in quickhelp (lifecrisis) [#849](https://github.com/scrooloose/nerdtree/pull/849) + - Use ":clearjumps" in new NERDTree windows (lifecrisis) [#844](https://github.com/scrooloose/nerdtree/pull/844) + - Like m-c did before, create parent directories if needed on m-m. (PhilRunninger) [#840](https://github.com/scrooloose/nerdtree/pull/840) + - BUGFIX: Repair a problem with the `'u'` mapping. (lifecrisis) [#838](https://github.com/scrooloose/nerdtree/pull/838) + - Make the NERDTree buffer writable when rendering it. (PhilRunninger) [#837](https://github.com/scrooloose/nerdtree/pull/837) + - Code cleanup: Remove unsupported bookmark table mappings (lifecrisis) [#835](https://github.com/scrooloose/nerdtree/pull/835) + - Replace strcharpart() with substitute() for backward compatibility (bravestarr) [#834](https://github.com/scrooloose/nerdtree/pull/834) + - Fixed error `unknown function strcharpart` for older versions of Vim (hav4ik) [#833](https://github.com/scrooloose/nerdtree/pull/833) + - Clear output when NERDTree menu is aborted (lifecrisis) [#832](https://github.com/scrooloose/nerdtree/pull/832) + - Display a path with multi-byte characters correctly when it is truncated (bravestarr) [#830](https://github.com/scrooloose/nerdtree/pull/830) + - Support revealing file and executing file with xdg-open for Linux (ngnmhieu) [#824](https://github.com/scrooloose/nerdtree/pull/824) + - If node isn't open, count children on disk before deleting. (PhilRunninger) [#822](https://github.com/scrooloose/nerdtree/pull/822) + - Add new variable g:NERDTreeRemoveFileCmd (kutsan) [#816](https://github.com/scrooloose/nerdtree/pull/816) + - Use a better check for existence of the NERDTree buffer. (PhilRunninger) [#814](https://github.com/scrooloose/nerdtree/pull/814) + - Fix focussing previous buffer when closing NERDTree (mrubli) [#801](https://github.com/scrooloose/nerdtree/pull/801) + - Update the docs for "NERDTreeStatusline" (lifecrisis) [#796](https://github.com/scrooloose/nerdtree/pull/796) + - BUGFIX: Unstable behavior in the "getPath()" method (lifecrisis) [#795](https://github.com/scrooloose/nerdtree/pull/795) + - Revert the bugfix from pull request [#785](https://github.com/scrooloose/nerdtree/pull/785) (lifecrisis) [#794](https://github.com/scrooloose/nerdtree/pull/794) + - BUGFIX: Allow ":NERDTreeFind" to discover hidden files (lifecrisis) [#786](https://github.com/scrooloose/nerdtree/pull/786) + - BUGFIX: Allow ":NERDTreeFind" to reveal new files (lifecrisis) [#785](https://github.com/scrooloose/nerdtree/pull/785) + - Add modelines (lifecrisis) [#782](https://github.com/scrooloose/nerdtree/pull/782) + - Change the type of completion used by NERDTreeFind (lifecrisis) [#781](https://github.com/scrooloose/nerdtree/pull/781) + - change NERDTreeFind with args (zhenyangze) [#778](https://github.com/scrooloose/nerdtree/pull/778) + - Style Choice: Using confirm() when deleting a bookmark (lifecrisis) [#777](https://github.com/scrooloose/nerdtree/pull/777) + - remove useless substitute when `file =~# "/$"` (skyblueee) [#773](https://github.com/scrooloose/nerdtree/pull/773) + - remove useless removeLeadingSpaces in _stripMarkup (skyblueee) [#772](https://github.com/scrooloose/nerdtree/pull/772) + - Make the "o" mapping consistent with "x" (lifecrisis) [#769](https://github.com/scrooloose/nerdtree/pull/769) + - Fix a problem with the "x" handler (lifecrisis) [#768](https://github.com/scrooloose/nerdtree/pull/768) + - Clean up the handler for the "x" mapping (lifecrisis) [#767](https://github.com/scrooloose/nerdtree/pull/767) + - Revert change to tab opening method (lifecrisis) [#766](https://github.com/scrooloose/nerdtree/pull/766) + - BUGFIX: Add back support for "b:NERDTreeRoot" (lifecrisis) [#765](https://github.com/scrooloose/nerdtree/pull/765) + - Fix broken "t" and "T" mappings, tabs now open at end (lifecrisis) [#759](https://github.com/scrooloose/nerdtree/pull/759) + - Update doc with already existing mapping variables (asnr) [#699](https://github.com/scrooloose/nerdtree/pull/699) + - Fix the broken g:NERDTreeBookmarksSort setting (lifecrisis) [#696](https://github.com/scrooloose/nerdtree/pull/696) + - Correct NERDTreeIgnore pattern in doc (cntoplolicon) [#648](https://github.com/scrooloose/nerdtree/pull/648) + - Remove empty segments when splitting path (sooth-sayer) [#574](https://github.com/scrooloose/nerdtree/pull/574) + - Suppress autocmds less agressively (wincent) [#578](https://github.com/scrooloose/nerdtree/pull/578) [#691](https://github.com/scrooloose/nerdtree/pull/691) + - Add an Issues template to ask for more info initially. + - Fix markdown headers in readme (josephfrazier) [#676](https://github.com/scrooloose/nerdtree/pull/676) + - Don't touch `@o` and `@h` registers when rendering + - Fix bug with files and directories with dollar signs (alegen) [#649](https://github.com/scrooloose/nerdtree/pull/649) + - Reuse/reopen existing window trees where possible [#244](https://github.com/scrooloose/nerdtree/pull/244) + - Remove NERDTree.previousBuf() + - Change color of arrow (Leeiio) [#630](https://github.com/scrooloose/nerdtree/pull/630) + - Improved a tip in README.markdown (ggicci) [#628](https://github.com/scrooloose/nerdtree/pull/628) + - Shorten delete confimration of empty directory to `y` (mikeperri) [#530](https://github.com/scrooloose/nerdtree/pull/530) + - Fix API call to open directory tree in window (devm33) [#533](https://github.com/scrooloose/nerdtree/pull/533) + - Change default arrows on non-Windows platforms (gwilk) [#546](https://github.com/scrooloose/nerdtree/pull/546) + - Update to README - combine cd and git clone (zwhitchcox) [#584](https://github.com/scrooloose/nerdtree/pull/584) + - Update to README - Tip: start NERDTree when vim starts (therealplato) [#593](https://github.com/scrooloose/nerdtree/pull/593) + - Escape filename when moving an open buffer (zacharyvoase) [#595](https://github.com/scrooloose/nerdtree/pull/595) + - Fixed incorrect :helptags command in README (curran) [#619](https://github.com/scrooloose/nerdtree/pull/619) + - Fixed incomplete escaping of folder arrows (adityanatraj) [#548](https://github.com/scrooloose/nerdtree/pull/548) + - Added NERDTreeCascadeSingleChildDir option (juanibiapina) [#558](https://github.com/scrooloose/nerdtree/pull/558) + - Replace strchars() with backward compatible workaround. + - Add support for copy command in Windows (SkylerLipthay) [#231](https://github.com/scrooloose/nerdtree/pull/231) + - Fixed typo in README.markdown - :Helptags -> :helptags + - 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**, **agrussellknives**, **alvan**, **AndrewRadev**, **cperl82** (*many small fixes*), **devmanhinton**, **egalpin**, **franksort**, **gastropoda**, **handcraftedbits**, **kelaban**, **lucascaton**, **mixvin**, **pendulm**, **SchDen**, **shanesmith**, **staeff**, **stephenprater**, **toiffel**, **Twinside**, **WoLpH**, **xiaodili**, **zhangoose** + +#### 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 from: **AndrewRadev**, **Bogdanov**, **camthompson**, **kml**, **mathias**, **paddyoloughlin**, **scottstvnsn**, **sdewald**, **Vitaly**, **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/autoload/nerdtree.vim b/sources_non_forked/nerdtree/autoload/nerdtree.vim index fd192827..4391565e 100644 --- a/sources_non_forked/nerdtree/autoload/nerdtree.vim +++ b/sources_non_forked/nerdtree/autoload/nerdtree.vim @@ -3,13 +3,38 @@ if exists("g:loaded_nerdtree_autoload") endif let g:loaded_nerdtree_autoload = 1 -function! nerdtree#version() - return '5.0.0' +let s:rootNERDTreePath = resolve(expand(":p:h:h")) +function! nerdtree#version(...) + let l:changelog = readfile(join([s:rootNERDTreePath, "CHANGELOG.md"], nerdtree#slash())) + let l:text = 'Unknown' + let l:line = 0 + while l:line <= len(l:changelog) + if l:changelog[l:line] =~ '\d\+\.\d\+' + let l:text = substitute(l:changelog[l:line], '.*\(\d\+.\d\+\).*', '\1', '') + let l:text .= substitute(l:changelog[l:line+1], '^.\{-}\(\.\d\+\).\{-}:\(.*\)', a:0>0 ? '\1:\2' : '\1', '') + break + endif + let l:line += 1 + endwhile + return l:text endfunction " SECTION: General Functions {{{1 "============================================================ +function! nerdtree#slash() + + if nerdtree#runningWindows() + if exists('+shellslash') && &shellslash + return '/' + endif + + return '\' + endif + + return '/' +endfunction + "FUNCTION: nerdtree#and(x,y) {{{2 " Implements and() function for Vim <= 7.2 function! nerdtree#and(x,y) @@ -129,13 +154,13 @@ function! nerdtree#deprecated(func, ...) endif endfunction -" FUNCTION: nerdtree#exec(cmd) {{{2 -" Same as :exec cmd but with eventignore set for the duration -" to disable the autocommands used by NERDTree (BufEnter, -" BufLeave and VimEnter) -function! nerdtree#exec(cmd) +" FUNCTION: nerdtree#exec(cmd, ignoreAll) {{{2 +" Same as :exec cmd but, if ignoreAll is TRUE, set eventignore=all for the duration +function! nerdtree#exec(cmd, ignoreAll) let old_ei = &ei - set ei=BufEnter,BufLeave,VimEnter + if a:ignoreAll + set ei=all + endif exec a:cmd let &ei = old_ei endfunction diff --git a/sources_non_forked/nerdtree/autoload/nerdtree/ui_glue.vim b/sources_non_forked/nerdtree/autoload/nerdtree/ui_glue.vim index a82ff18e..f0458680 100644 --- a/sources_non_forked/nerdtree/autoload/nerdtree/ui_glue.vim +++ b/sources_non_forked/nerdtree/autoload/nerdtree/ui_glue.vim @@ -14,6 +14,10 @@ function! nerdtree#ui_glue#createDefaultBindings() call NERDTreeAddKeyMap({ 'key': '<2-LeftMouse>', 'scope': "Bookmark", 'callback': s."activateBookmark" }) call NERDTreeAddKeyMap({ 'key': '<2-LeftMouse>', 'scope': "all", 'callback': s."activateAll" }) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapCustomOpen, 'scope':'FileNode', 'callback': s."customOpenFile"}) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapCustomOpen, 'scope':'DirNode', 'callback': s."customOpenDir"}) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapCustomOpen, 'scope':'Bookmark', 'callback': s."customOpenBookmark"}) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapCustomOpen, 'scope':'all', 'callback': s."activateAll" }) call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapActivateNode, 'scope': "DirNode", 'callback': s."activateDirNode" }) call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapActivateNode, 'scope': "FileNode", 'callback': s."activateFileNode" }) @@ -76,6 +80,35 @@ endfunction "SECTION: Interface bindings {{{1 "============================================================ +"FUNCTION: s:customOpenFile() {{{1 +" Open file node with the "custom" key, initially . +function! s:customOpenFile(node) + call a:node.activate(s:initCustomOpenArgs().file) +endfunction + +"FUNCTION: s:customOpenDir() {{{1 +" Open directory node with the "custom" key, initially . +function! s:customOpenDir(node) + call s:activateDirNode(a:node, s:initCustomOpenArgs().dir) +endfunction + +"FUNCTION: s:customOpenBookmark() {{{1 +" Open bookmark node with the "custom" key, initially . +function! s:customOpenBookmark(node) + if a:node.path.isDirectory + call a:node.activate(b:NERDTree, s:initCustomOpenArgs().dir) + else + call a:node.activate(b:NERDTree, s:initCustomOpenArgs().file) + endif +endfunction + +"FUNCTION: s:initCustomOpenArgs() {{{1 +" Make sure NERDTreeCustomOpenArgs has needed keys +function! s:initCustomOpenArgs() + let g:NERDTreeCustomOpenArgs = get(g:, 'NERDTreeCustomOpenArgs', {}) + return extend(g:NERDTreeCustomOpenArgs, {'file':{'reuse': 'all', 'where': 'p'}, 'dir':{}}, 'keep') +endfunction + "FUNCTION: s:activateAll() {{{1 "handle the user activating the updir line function! s:activateAll() @@ -84,15 +117,16 @@ function! s:activateAll() endif endfunction -" FUNCTION: s:activateDirNode(directoryNode) {{{1 -function! s:activateDirNode(directoryNode) +" FUNCTION: s:activateDirNode(directoryNode, options) {{{1 +" Open a directory with optional options +function! s:activateDirNode(directoryNode, ...) if a:directoryNode.isRoot() && a:directoryNode.isOpen call nerdtree#echo('cannot close tree root') return endif - call a:directoryNode.activate() + call a:directoryNode.activate((a:0 > 0) ? a:1 : {}) endfunction "FUNCTION: s:activateFileNode() {{{1 @@ -367,7 +401,7 @@ function! s:jumpToLastChild(node) call s:jumpToChild(a:node, 1) endfunction -" FUNCTION: s:jumpToChild(node, last) {{{2 +" FUNCTION: s:jumpToChild(node, last) {{{1 " Jump to the first or last child node at the same file system level. " " Args: @@ -425,7 +459,7 @@ function! s:jumpToPrevSibling(node) call s:jumpToSibling(a:node, 0) endfunction -" FUNCTION: s:jumpToSibling(node, forward) {{{2 +" FUNCTION: s:jumpToSibling(node, forward) {{{1 " Move the cursor to the next or previous node at the same file system level. " " Args: @@ -540,11 +574,11 @@ function! s:refreshRoot() call nerdtree#echo("Refreshing the root node. This could take a while...") let l:curWin = winnr() - call nerdtree#exec(g:NERDTree.GetWinNum() . "wincmd w") + call nerdtree#exec(g:NERDTree.GetWinNum() . "wincmd w", 1) call b:NERDTree.root.refresh() call b:NERDTree.render() redraw - call nerdtree#exec(l:curWin . "wincmd w") + call nerdtree#exec(l:curWin . "wincmd w", 1) call nerdtree#echo("") endfunction diff --git a/sources_non_forked/nerdtree/doc/NERDTree.txt b/sources_non_forked/nerdtree/doc/NERDTree.txt index 93635bd0..14f70782 100644 --- a/sources_non_forked/nerdtree/doc/NERDTree.txt +++ b/sources_non_forked/nerdtree/doc/NERDTree.txt @@ -247,12 +247,12 @@ i........Open selected file in a split window.......................|NERDTree-i| gi.......Same as i, but leave the cursor on the NERDTree...........|NERDTree-gi| s........Open selected file in a new vsplit.........................|NERDTree-s| gs.......Same as s, but leave the cursor on the NERDTree...........|NERDTree-gs| +.....User-definable custom open action.......................|NERDTree-| O........Recursively open the selected directory....................|NERDTree-O| x........Close the current nodes parent.............................|NERDTree-x| X........Recursively close all children of the current node.........|NERDTree-X| e........Edit the current dir.......................................|NERDTree-e| -............same as |NERDTree-o|. double-click....same as |NERDTree-o|. middle-click....same as |NERDTree-i| for files, and |NERDTree-e| for dirs. @@ -319,7 +319,7 @@ The default key combo for this mapping is "g" + NERDTreeMapActivateNode (see ------------------------------------------------------------------------------ *NERDTree-t* Default key: t -Map setting: NERDTreeMapOpenInTab +Map setting: *NERDTreeMapOpenInTab* Applies to: files and directories. Opens the selected file in a new tab. If a directory is selected, a fresh @@ -332,7 +332,7 @@ in a new tab. ------------------------------------------------------------------------------ *NERDTree-T* Default key: T -Map setting: NERDTreeMapOpenInTabSilent +Map setting: *NERDTreeMapOpenInTabSilent* Applies to: files and directories. The same as |NERDTree-t| except that the focus is kept in the current tab. @@ -340,7 +340,7 @@ The same as |NERDTree-t| except that the focus is kept in the current tab. ------------------------------------------------------------------------------ *NERDTree-i* Default key: i -Map setting: NERDTreeMapOpenSplit +Map setting: *NERDTreeMapOpenSplit* Applies to: files. Opens the selected file in a new split window and puts the cursor in the new @@ -349,7 +349,7 @@ window. ------------------------------------------------------------------------------ *NERDTree-gi* Default key: gi -Map setting: NERDTreeMapPreviewSplit +Map setting: *NERDTreeMapPreviewSplit* Applies to: files. The same as |NERDTree-i| except that the cursor is not moved. @@ -360,7 +360,7 @@ The default key combo for this mapping is "g" + NERDTreeMapOpenSplit (see ------------------------------------------------------------------------------ *NERDTree-s* Default key: s -Map setting: NERDTreeMapOpenVSplit +Map setting: *NERDTreeMapOpenVSplit* Applies to: files. Opens the selected file in a new vertically split window and puts the cursor @@ -369,7 +369,7 @@ in the new window. ------------------------------------------------------------------------------ *NERDTree-gs* Default key: gs -Map setting: NERDTreeMapPreviewVSplit +Map setting: *NERDTreeMapPreviewVSplit* Applies to: files. The same as |NERDTree-s| except that the cursor is not moved. @@ -377,10 +377,19 @@ The same as |NERDTree-s| except that the cursor is not moved. The default key combo for this mapping is "g" + NERDTreeMapOpenVSplit (see |NERDTree-s|). +------------------------------------------------------------------------------ + *NERDTree-* +Default key: +Map setting: *NERDTreeMapCustomOpen* +Applies to: files, directories, and bookmarks + +Performs a customized open action on the selected node. This allows the user +to define an action that behaves differently from any of the standard +keys. See |NERDTreeCustomOpenArgs| for more details. ------------------------------------------------------------------------------ *NERDTree-O* Default key: O -Map setting: NERDTreeMapOpenRecursively +Map setting: *NERDTreeMapOpenRecursively* Applies to: directories. Recursively opens the selected directory. @@ -393,7 +402,7 @@ cached. This is handy, especially if you have .svn directories. ------------------------------------------------------------------------------ *NERDTree-x* Default key: x -Map setting: NERDTreeMapCloseDir +Map setting: *NERDTreeMapCloseDir* Applies to: files and directories. Closes the parent of the selected node. @@ -401,7 +410,7 @@ Closes the parent of the selected node. ------------------------------------------------------------------------------ *NERDTree-X* Default key: X -Map setting: NERDTreeMapCloseChildren +Map setting: *NERDTreeMapCloseChildren* Applies to: directories. Recursively closes all children of the selected directory. @@ -411,7 +420,7 @@ Tip: To quickly "reset" the tree, use |NERDTree-P| with this mapping. ------------------------------------------------------------------------------ *NERDTree-e* Default key: e -Map setting: NERDTreeMapOpenExpl +Map setting: *NERDTreeMapOpenExpl* Applies to: files and directories. |:edit|s the selected directory, or the selected file's directory. This could @@ -421,7 +430,7 @@ result in a NERDTree or a netrw being opened, depending on ------------------------------------------------------------------------------ *NERDTree-D* Default key: D -Map setting: NERDTreeMapDeleteBookmark +Map setting: *NERDTreeMapDeleteBookmark* Applies to: lines in the bookmarks table Deletes the currently selected bookmark. @@ -429,7 +438,7 @@ Deletes the currently selected bookmark. ------------------------------------------------------------------------------ *NERDTree-P* Default key: P -Map setting: NERDTreeMapJumpRoot +Map setting: *NERDTreeMapJumpRoot* Applies to: no restrictions. Jump to the tree root. @@ -437,7 +446,7 @@ Jump to the tree root. ------------------------------------------------------------------------------ *NERDTree-p* Default key: p -Map setting: NERDTreeMapJumpParent +Map setting: *NERDTreeMapJumpParent* Applies to: files and directories. Jump to the parent node of the selected node. @@ -445,7 +454,7 @@ Jump to the parent node of the selected node. ------------------------------------------------------------------------------ *NERDTree-K* Default key: K -Map setting: NERDTreeMapJumpFirstChild +Map setting: *NERDTreeMapJumpFirstChild* Applies to: files and directories. Jump to the first child of the current nodes parent. @@ -458,7 +467,7 @@ If the cursor is already on the first node then do the following: ------------------------------------------------------------------------------ *NERDTree-J* Default key: J -Map setting: NERDTreeMapJumpLastChild +Map setting: *NERDTreeMapJumpLastChild* Applies to: files and directories. Jump to the last child of the current nodes parent. @@ -471,7 +480,7 @@ If the cursor is already on the last node then do the following: ------------------------------------------------------------------------------ *NERDTree-C-J* Default key: -Map setting: NERDTreeMapJumpNextSibling +Map setting: *NERDTreeMapJumpNextSibling* Applies to: files and directories. Jump to the next sibling of the selected node. @@ -479,7 +488,7 @@ Jump to the next sibling of the selected node. ------------------------------------------------------------------------------ *NERDTree-C-K* Default key: -Map setting: NERDTreeMapJumpPrevSibling +Map setting: *NERDTreeMapJumpPrevSibling* Applies to: files and directories. Jump to the previous sibling of the selected node. @@ -487,7 +496,7 @@ Jump to the previous sibling of the selected node. ------------------------------------------------------------------------------ *NERDTree-C* Default key: C -Map setting: NERDTreeMapChangeRoot +Map setting: *NERDTreeMapChangeRoot* Applies to: files and directories. Make the selected directory node the new tree root. If a file is selected, its @@ -496,7 +505,7 @@ parent is used. ------------------------------------------------------------------------------ *NERDTree-u* Default key: u -Map setting: NERDTreeMapUpdir +Map setting: *NERDTreeMapUpdir* Applies to: no restrictions. Move the tree root up a dir (like doing a "cd .."). @@ -504,7 +513,7 @@ Move the tree root up a dir (like doing a "cd .."). ------------------------------------------------------------------------------ *NERDTree-U* Default key: U -Map setting: NERDTreeMapUpdirKeepOpen +Map setting: *NERDTreeMapUpdirKeepOpen* Applies to: no restrictions. Like |NERDTree-u| except that the old tree root is kept open. @@ -512,7 +521,7 @@ Like |NERDTree-u| except that the old tree root is kept open. ------------------------------------------------------------------------------ *NERDTree-r* Default key: r -Map setting: NERDTreeMapRefresh +Map setting: *NERDTreeMapRefresh* Applies to: files and directories. If a dir is selected, recursively refresh that dir, i.e. scan the filesystem @@ -523,7 +532,7 @@ If a file node is selected then the above is done on it's parent. ------------------------------------------------------------------------------ *NERDTree-R* Default key: R -Map setting: NERDTreeMapRefreshRoot +Map setting: *NERDTreeMapRefreshRoot* Applies to: no restrictions. Recursively refresh the tree root. @@ -531,7 +540,7 @@ Recursively refresh the tree root. ------------------------------------------------------------------------------ *NERDTree-m* Default key: m -Map setting: NERDTreeMapMenu +Map setting: *NERDTreeMapMenu* Applies to: files and directories. Display the NERDTree menu. See |NERDTreeMenu| for details. @@ -539,7 +548,7 @@ Display the NERDTree menu. See |NERDTreeMenu| for details. ------------------------------------------------------------------------------ *NERDTree-cd* Default key: cd -Map setting: NERDTreeMapChdir +Map setting: *NERDTreeMapChdir* Applies to: files and directories. Change Vim's current working directory to that of the selected node. @@ -547,7 +556,7 @@ Change Vim's current working directory to that of the selected node. ------------------------------------------------------------------------------ *NERDTree-CD* Default key: CD -Map setting: NERDTreeMapCWD +Map setting: *NERDTreeMapCWD* Applies to: no restrictions. Change the NERDTree root to Vim's current working directory. @@ -555,7 +564,7 @@ Change the NERDTree root to Vim's current working directory. ------------------------------------------------------------------------------ *NERDTree-I* Default key: I -Map setting: NERDTreeMapToggleHidden +Map setting: *NERDTreeMapToggleHidden* Applies to: no restrictions. Toggles whether hidden files (i.e. "dot files") are displayed. @@ -563,7 +572,7 @@ Toggles whether hidden files (i.e. "dot files") are displayed. ------------------------------------------------------------------------------ *NERDTree-f* Default key: f -Map setting: NERDTreeMapToggleFilters +Map setting: *NERDTreeMapToggleFilters* Applies to: no restrictions. Toggles whether file filters are used. See |NERDTreeIgnore| for details. @@ -571,7 +580,7 @@ Toggles whether file filters are used. See |NERDTreeIgnore| for details. ------------------------------------------------------------------------------ *NERDTree-F* Default key: F -Map setting: NERDTreeMapToggleFiles +Map setting: *NERDTreeMapToggleFiles* Applies to: no restrictions. Toggles whether file nodes are displayed. @@ -579,7 +588,7 @@ Toggles whether file nodes are displayed. ------------------------------------------------------------------------------ *NERDTree-B* Default key: B -Map setting: NERDTreeMapToggleBookmarks +Map setting: *NERDTreeMapToggleBookmarks* Applies to: no restrictions. Toggles whether the bookmarks table is displayed. @@ -587,7 +596,7 @@ Toggles whether the bookmarks table is displayed. ------------------------------------------------------------------------------ *NERDTree-q* Default key: q -Map setting: NERDTreeMapQuit +Map setting: *NERDTreeMapQuit* Applies to: no restrictions. Closes the NERDTree window. @@ -595,7 +604,7 @@ Closes the NERDTree window. ------------------------------------------------------------------------------ *NERDTree-A* Default key: A -Map setting: NERDTreeMapToggleZoom +Map setting: *NERDTreeMapToggleZoom* Applies to: no restrictions. Maximize (zoom) and minimize the NERDTree window. @@ -603,7 +612,7 @@ Maximize (zoom) and minimize the NERDTree window. ------------------------------------------------------------------------------ *NERDTree-?* Default key: ? -Map setting: NERDTreeMapHelp +Map setting: *NERDTreeMapHelp* Applies to: no restrictions. Toggles whether the quickhelp is displayed. @@ -625,7 +634,7 @@ Related tags: |NERDTree-m| |NERDTreeApi| ------------------------------------------------------------------------------ *NERDTreeMenu-j* Default key: j -Map option: NERDTreeMenuDown +Map option: *NERDTreeMenuDown* Applies to: The NERDTree menu. Moves the cursor down. @@ -633,7 +642,7 @@ Moves the cursor down. ------------------------------------------------------------------------------ *NERDTreeMenu-k* Default key: k -Map option: NERDTreeMenuUp +Map option: *NERDTreeMenuUp* Applies to: The NERDTree menu. Moves the cursor up. @@ -754,6 +763,9 @@ the NERDTree. These settings should be set in your vimrc, using `:let`. file or directory name from the rest of the characters on the line of text. +|NERDTreeCustomOpenArgs| A dictionary with values that control how a node + is opened with the |NERDTree-| key. + ------------------------------------------------------------------------------ 3.2. Customisation details *NERDTreeSettingsDetails* @@ -1031,28 +1043,31 @@ window. Use one of the follow lines for this setting: > Values: a list of regular expressions. Default: ['\/$', '*', '\.swp$', '\.bak$', '\~$'] -This setting is a list of regular expressions which are used to specify the -order of nodes under their parent. +This setting is a list of regular expressions which are used to group or sort +the nodes under their parent. For example, if the setting is: > ['\.vim$', '\.c$', '\.h$', '*', 'foobar'] < -then all .vim files will be placed at the top, followed by all .c files then +then all .vim files will be grouped at the top, followed by all .c files then all .h files. All files containing the string 'foobar' will be placed at the end. The star is a special flag: it tells the script that every node that doesn't match any of the other regexps should be placed here. -If no star is present in NERDTreeSortOrder then one is automatically -appended to the array. +If no star is present in NERDTreeSortOrder, then one is automatically +appended to the end of the list. The regex '\/$' should be used to match directory nodes. -A special flag can be used to sort by the modification timestamps of files and -directories. It is either '[[timestamp]]' for ascending, or '[[-timestamp]]' -for descending. If placed at the beginning of the list, files and directories -are sorted by timestamp, and then by the remaining items in the sort order -list. If this flag is in any other position of the list, timestamp sorting is -done secondarily. See examples 4, 5, and 6 below. +Files can also be sorted by 1) the modification timestamp, 2) the size, or 3) +the extension. Directories are always sorted by name. To accomplish this, the +following special flags are used: + [[timestamp]] [[-timestamp]] [[size]] [[-size]] [[extension]] +The hyphen specifies a descending sort; extensions are sorted in ascending +order only. If placed at the beginning of the list, files are sorted according +to these flags first, and then grouped by the remaining items in the list. If +the flags are in any other position of the list, this special sorting is done +secondarily. See examples 4, 5, and 6 below. After this sorting is done, the files in each group are sorted alphabetically. @@ -1060,20 +1075,20 @@ Examples: > (1) ['*', '\/$'] (2) [] (3) ['\/$', '\.rb$', '\.php$', '*', '\.swp$', '\.bak$', '\~$'] - (4) ['[[timestamp]]'] - (5) ['\/$', '*', '[[-timestamp]]'] - (6) ['\.md$', '\.c$', '[[-timestamp]]', '*'] + (4) ['[[-size]]'] + (5) ['\/$', '*', '[[timestamp]]'] + (6) ['foo','\/$','[[extension]]'] < 1. Directories will appear last, everything else will appear above. 2. Everything will simply appear in alphabetical order. 3. Dirs will appear first, then ruby and php. Swap files, bak files and vim backup files will appear last with everything else preceding them. -4. All files and directories are sorted by timestamp, oldest first. If any - files have identical timestamps, they are sorted alphabetically. -5. Directories are first, newest to oldest, then everything else, newest to - oldest. -6. Markdown files first, followed by C source files, then everything else. - Each group is shown newest to oldest. +4. Everything is sorted by size, largest to smallest, with directories + considered to have size 0 bytes. +5. Directories will appear first alphabetically, followed by files, sorted by + timestamp, oldest first. +6. Files and directories matching 'foo' first, followed by other directories, + then all other files. Each section of files is sorted by file extension. ------------------------------------------------------------------------------ *NERDTreeStatusline* @@ -1233,6 +1248,32 @@ when specifying by hex or Unicode. > let NERDTreeNodeDelimiter="\u00a0" "non-breaking space let NERDTreeNodeDelimiter="😀" "smiley face < +------------------------------------------------------------------------------ + *NERDTreeCustomOpenArgs* +Values: A nested dictionary, as described below +Default: {'file': {'reuse': 'all', 'where': 'p'}, 'dir': {}} + +This dictionary contains two keys, 'file' and 'dir', whose values each are +another dictionary. The inner dictionary is a set of parameters used by +|NERDTree-| to open a file or directory. Setting these parameters allows you +to customize the way the node is opened. The default value matches what +|NERDTree-o| does. To change that behavior, use these keys and +values in the inner dictionaries: + +'where': specifies whether the node should be opened in a new split ("h" or + "v"), in a new tab ("t") or, in the last window ("p"). +'reuse': if file is already shown in a window, jump there; takes values + "all", "currenttab", or empty +'keepopen': boolean (0 or 1); if true, the tree window will not be closed +'stay': boolean (0 or 1); if true, remain in tree window after opening + +For example: +To open files and directories (creating a new NERDTree) in a new tab, > + {'file':{'where': 't'}, 'dir':{'where':'t'}} +< +To open a file always in the current tab, and expand directories in place, > + {'file': {'reuse':'currenttab', 'where':'p', 'keepopen':1, 'stay':1}} +< ============================================================================== 4. The NERDTree API *NERDTreeAPI* diff --git a/sources_non_forked/nerdtree/lib/nerdtree/bookmark.vim b/sources_non_forked/nerdtree/lib/nerdtree/bookmark.vim index c633a8f2..b206e7a4 100644 --- a/sources_non_forked/nerdtree/lib/nerdtree/bookmark.vim +++ b/sources_non_forked/nerdtree/lib/nerdtree/bookmark.vim @@ -159,8 +159,8 @@ endfunction " FUNCTION: s:Edit() {{{1 " opens the NERDTreeBookmarks file for manual editing function! s:Bookmark.Edit() - execute "wincmd w" - execute "edit ".g:NERDTreeBookmarksFile + call nerdtree#exec("wincmd w", 1) + call nerdtree#exec("edit ".g:NERDTreeBookmarksFile, 1) endfunction " FUNCTION: Bookmark.getNode(nerdtree, searchFromAbsoluteRoot) {{{1 diff --git a/sources_non_forked/nerdtree/lib/nerdtree/creator.vim b/sources_non_forked/nerdtree/lib/nerdtree/creator.vim index 980cf805..efd3cc81 100644 --- a/sources_non_forked/nerdtree/lib/nerdtree/creator.vim +++ b/sources_non_forked/nerdtree/lib/nerdtree/creator.vim @@ -13,9 +13,6 @@ let g:NERDTreeCreator = s:Creator " FUNCTION: s:Creator._bindMappings() {{{1 function! s:Creator._bindMappings() - "make do the same as the activate node mapping - nnoremap :call nerdtree#ui_glue#invokeKeyMap(g:NERDTreeMapActivateNode) - call g:NERDTreeKeyMap.BindAll() command! -buffer -nargs=? Bookmark :call nerdtree#ui_glue#bookmarkNode('') @@ -189,18 +186,20 @@ function! s:Creator._createTreeWin() let t:NERDTreeBufName = self._nextBufferName() silent! execute l:splitLocation . 'vertical ' . l:splitSize . ' new' silent! execute 'edit ' . t:NERDTreeBufName + silent! execute 'vertical resize '. l:splitSize else silent! execute l:splitLocation . 'vertical ' . l:splitSize . ' split' silent! execute 'buffer ' . t:NERDTreeBufName endif + setlocal winfixwidth + call self._setCommonBufOptions() if has('patch-7.4.1925') clearjumps endif - setlocal winfixwidth endfunction " FUNCTION: s:Creator._isBufHidden(nr) {{{1 @@ -218,14 +217,14 @@ function! s:Creator.New() return newCreator endfunction -" FUNCTION: s:Creator._nextBufferName() {{{2 +" FUNCTION: s:Creator._nextBufferName() {{{1 " returns the buffer name for the next nerd tree function! s:Creator._nextBufferName() let name = s:Creator.BufNamePrefix() . self._nextBufferNumber() return name endfunction -" FUNCTION: s:Creator._nextBufferNumber() {{{2 +" FUNCTION: s:Creator._nextBufferNumber() {{{1 " the number to add to the nerd tree buffer name to make the buf name unique function! s:Creator._nextBufferNumber() if !exists("s:Creator._NextBufNum") diff --git a/sources_non_forked/nerdtree/lib/nerdtree/menu_controller.vim b/sources_non_forked/nerdtree/lib/nerdtree/menu_controller.vim index 26dbd296..05e82d97 100644 --- a/sources_non_forked/nerdtree/lib/nerdtree/menu_controller.vim +++ b/sources_non_forked/nerdtree/lib/nerdtree/menu_controller.vim @@ -31,7 +31,11 @@ function! s:MenuController.showMenu() let l:done = 0 while !l:done - redraw! + if has('nvim') + mode + else + redraw! + endif call self._echoPrompt() let l:key = nr2char(getchar()) @@ -64,7 +68,7 @@ function! s:MenuController._echoPrompt() echo "Menu: [" . join(shortcuts, ",") . "] (" . navHelp . " or shortcut): " else - echo "NERDTree Menu. " . navHelp . " . or the shortcuts indicated" + echo "NERDTree Menu. " . navHelp . ", or the shortcuts indicated" echo "=========================================================" for i in range(0, len(self.menuItems)-1) diff --git a/sources_non_forked/nerdtree/lib/nerdtree/nerdtree.vim b/sources_non_forked/nerdtree/lib/nerdtree/nerdtree.vim index c1ce5ed0..705d4f9b 100644 --- a/sources_non_forked/nerdtree/lib/nerdtree/nerdtree.vim +++ b/sources_non_forked/nerdtree/lib/nerdtree/nerdtree.vim @@ -44,19 +44,19 @@ function! s:NERDTree.Close() let l:useWinId = exists('*win_getid') && exists('*win_gotoid') if winnr() == s:NERDTree.GetWinNum() - call nerdtree#exec("wincmd p") + call nerdtree#exec("wincmd p", 1) let l:activeBufOrWin = l:useWinId ? win_getid() : bufnr("") - call nerdtree#exec("wincmd p") + call nerdtree#exec("wincmd p", 1) else let l:activeBufOrWin = l:useWinId ? win_getid() : bufnr("") endif - call nerdtree#exec(s:NERDTree.GetWinNum() . " wincmd w") - close + call nerdtree#exec(s:NERDTree.GetWinNum() . " wincmd w", 1) + call nerdtree#exec("close", 1) if l:useWinId - call nerdtree#exec("call win_gotoid(" . l:activeBufOrWin . ")") + call nerdtree#exec("call win_gotoid(" . l:activeBufOrWin . ")", 0) else - call nerdtree#exec(bufwinnr(l:activeBufOrWin) . " wincmd w") + call nerdtree#exec(bufwinnr(l:activeBufOrWin) . " wincmd w", 0) endif else close @@ -98,7 +98,7 @@ endfunction "Places the cursor in the nerd tree window function! s:NERDTree.CursorToTreeWin() call g:NERDTree.MustBeOpen() - call nerdtree#exec(g:NERDTree.GetWinNum() . "wincmd w") + call nerdtree#exec(g:NERDTree.GetWinNum() . "wincmd w", 1) endfunction " Function: s:NERDTree.ExistsForBuffer() {{{1 @@ -153,7 +153,7 @@ endfunction "FUNCTION: s:NERDTree.IsOpen() {{{1 function! s:NERDTree.IsOpen() - return s:NERDTree.GetWinNum() != -1 + return s:NERDTree.GetWinNum() != -1 || bufname('%') =~# '^' . g:NERDTreeCreator.BufNamePrefix() . '\d\+$' endfunction "FUNCTION: s:NERDTree.isTabTree() {{{1 diff --git a/sources_non_forked/nerdtree/lib/nerdtree/opener.vim b/sources_non_forked/nerdtree/lib/nerdtree/opener.vim index f4bd6e06..5953eea2 100644 --- a/sources_non_forked/nerdtree/lib/nerdtree/opener.vim +++ b/sources_non_forked/nerdtree/lib/nerdtree/opener.vim @@ -107,10 +107,10 @@ function! s:Opener._isWindowUsable(winnumber) endif let oldwinnr = winnr() - call nerdtree#exec(a:winnumber . "wincmd p") + call nerdtree#exec(a:winnumber . "wincmd p", 1) let specialWindow = getbufvar("%", '&buftype') != '' || getwinvar('%', '&previewwindow') let modified = &modified - call nerdtree#exec(oldwinnr . "wincmd p") + call nerdtree#exec(oldwinnr . "wincmd p", 1) "if its a special window e.g. quickfix or another explorer plugin then we "have to split @@ -172,7 +172,7 @@ function! s:Opener._newSplit() let below=0 " Attempt to go to adjacent window - call nerdtree#exec(back) + call nerdtree#exec(back, 1) let onlyOneWin = (winnr("$") ==# 1) @@ -201,9 +201,9 @@ function! s:Opener._newSplit() "resize the tree window if no other window was open before if onlyOneWin let size = exists("b:NERDTreeOldWindowSize") ? b:NERDTreeOldWindowSize : g:NERDTreeWinSize - call nerdtree#exec(there) + call nerdtree#exec(there, 1) exec("silent ". splitMode ." resize ". size) - call nerdtree#exec('wincmd p') + call nerdtree#exec('wincmd p', 0) endif " Restore splitmode settings @@ -219,8 +219,8 @@ function! s:Opener._newVSplit() let l:winwidth = g:NERDTreeWinSize endif - call nerdtree#exec('wincmd p') - vnew + call nerdtree#exec('wincmd p', 1) + call nerdtree#exec('vnew', 1) let l:currentWindowNumber = winnr() @@ -228,7 +228,7 @@ function! s:Opener._newVSplit() call g:NERDTree.CursorToTreeWin() execute 'silent vertical resize ' . l:winwidth - call nerdtree#exec(l:currentWindowNumber . 'wincmd w') + call nerdtree#exec(l:currentWindowNumber . 'wincmd w', 0) endfunction " FUNCTION: Opener.open(target) {{{1 @@ -290,9 +290,9 @@ function! s:Opener._previousWindow() else try if !self._isWindowUsable(winnr("#")) - call nerdtree#exec(self._firstUsableWindow() . "wincmd w") + call nerdtree#exec(self._firstUsableWindow() . "wincmd w", 1) else - call nerdtree#exec('wincmd p') + call nerdtree#exec('wincmd p', 1) endif catch /^Vim\%((\a\+)\)\=:E37/ call g:NERDTree.CursorToTreeWin() @@ -305,8 +305,8 @@ endfunction " FUNCTION: Opener._restoreCursorPos() {{{1 function! s:Opener._restoreCursorPos() - call nerdtree#exec(self._tabnr . 'tabnext') - call nerdtree#exec(bufwinnr(self._bufnr) . 'wincmd w') + call nerdtree#exec(self._tabnr . 'tabnext', 1) + call nerdtree#exec(bufwinnr(self._bufnr) . 'wincmd w', 1) endfunction " FUNCTION: Opener._reuseWindow() {{{1 @@ -321,7 +321,7 @@ function! s:Opener._reuseWindow() "check the current tab for the window let winnr = bufwinnr('^' . self._path.str() . '$') if winnr != -1 - call nerdtree#exec(winnr . "wincmd w") + call nerdtree#exec(winnr . "wincmd w", 0) call self._checkToCloseTree(0) return 1 endif @@ -334,9 +334,9 @@ function! s:Opener._reuseWindow() let tabnr = self._path.tabnr() if tabnr call self._checkToCloseTree(1) - call nerdtree#exec(tabnr . 'tabnext') + call nerdtree#exec(tabnr . 'tabnext', 1) let winnr = bufwinnr('^' . self._path.str() . '$') - call nerdtree#exec(winnr . "wincmd w") + call nerdtree#exec(winnr . "wincmd w", 0) return 1 endif diff --git a/sources_non_forked/nerdtree/lib/nerdtree/path.vim b/sources_non_forked/nerdtree/lib/nerdtree/path.vim index c3af1952..d00bb898 100644 --- a/sources_non_forked/nerdtree/lib/nerdtree/path.vim +++ b/sources_non_forked/nerdtree/lib/nerdtree/path.vim @@ -380,7 +380,8 @@ endfunction function! s:Path.getSortOrderIndex() let i = 0 while i < len(g:NERDTreeSortOrder) - if self.getLastPathComponent(1) =~# g:NERDTreeSortOrder[i] + if g:NERDTreeSortOrder[i] !~? '\[\[-\?\(timestamp\|size\|extension\)\]\]' && + \ self.getLastPathComponent(1) =~# g:NERDTreeSortOrder[i] return i endif let i = i + 1 @@ -407,15 +408,26 @@ endfunction " FUNCTION: Path.getSortKey() {{{1 " returns a key used in compare function for sorting function! s:Path.getSortKey() - let l:ascending = index(g:NERDTreeSortOrder,'[[timestamp]]') - let l:descending = index(g:NERDTreeSortOrder,'[[-timestamp]]') - if !exists("self._sortKey") || g:NERDTreeSortOrder !=# g:NERDTreeOldSortOrder || l:ascending >= 0 || l:descending >= 0 - let self._sortKey = [self.getSortOrderIndex()] + if !exists("self._sortKey") || g:NERDTreeSortOrder !=# g:NERDTreeOldSortOrder + " Look for file metadata tags: [[timestamp]], [[extension]], [[size]] + let metadata = [] + for tag in g:NERDTreeSortOrder + if tag =~? '\[\[-\?timestamp\]\]' + let metadata += [self.isDirectory ? 0 : getftime(self.str()) * (tag =~ '-' ? -1 : 1)] + elseif tag =~? '\[\[-\?size\]\]' + let metadata += [self.isDirectory ? 0 : getfsize(self.str()) * (tag =~ '-' ? -1 : 1)] + elseif tag =~? '\[\[extension\]\]' + let extension = matchstr(self.getLastPathComponent(0), '[^.]\+\.\zs[^.]\+$') + let metadata += [self.isDirectory ? '' : (extension == '' ? nr2char(str2nr('0x10ffff',16)) : extension)] + endif + endfor - if l:descending >= 0 - call insert(self._sortKey, -getftime(self.str()), l:descending == 0 ? 0 : len(self._sortKey)) - elseif l:ascending >= 0 - call insert(self._sortKey, getftime(self.str()), l:ascending == 0 ? 0 : len(self._sortKey)) + if g:NERDTreeSortOrder[0] =~ '\[\[.*\]\]' + " Apply tags' sorting first if specified first. + let self._sortKey = metadata + [self.getSortOrderIndex()] + else + " Otherwise, do regex grouping first. + let self._sortKey = [self.getSortOrderIndex()] + metadata endif let path = self.getLastPathComponent(1) 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 a834e7c1..aa9dea6a 100644 --- a/sources_non_forked/nerdtree/lib/nerdtree/tree_dir_node.vim +++ b/sources_non_forked/nerdtree/lib/nerdtree/tree_dir_node.vim @@ -620,6 +620,11 @@ function! s:TreeDirNode.reveal(path, ...) if self.path.equals(a:path.getParent()) let n = self.findNode(a:path) + " We may be looking for a newly-saved file that isn't in the tree yet. + if n == {} + call self.refresh() + let n = self.findNode(a:path) + endif if has_key(opts, "open") call n.open() endif diff --git a/sources_non_forked/nerdtree/lib/nerdtree/ui.vim b/sources_non_forked/nerdtree/lib/nerdtree/ui.vim index 6ff9878e..d384071d 100644 --- a/sources_non_forked/nerdtree/lib/nerdtree/ui.vim +++ b/sources_non_forked/nerdtree/lib/nerdtree/ui.vim @@ -6,7 +6,7 @@ let s:UI = {} let g:NERDTreeUI = s:UI -" FUNCTION: s:UI.centerView() {{{2 +" FUNCTION: s:UI.centerView() {{{1 " centers the nerd tree window around the cursor (provided the nerd tree " options permit) function! s:UI.centerView() @@ -28,7 +28,6 @@ function! s:UI._dumpHelp() let help .= "\" ============================\n" let help .= "\" File node mappings~\n" let help .= "\" ". (g:NERDTreeMouseMode ==# 3 ? "single" : "double") ."-click,\n" - let help .= "\" ,\n" if self.nerdtree.isTabTree() let help .= "\" ". g:NERDTreeMapActivateNode .": open in prev window\n" else @@ -44,6 +43,7 @@ function! s:UI._dumpHelp() let help .= "\" ". g:NERDTreeMapPreviewSplit .": preview split\n" let help .= "\" ". g:NERDTreeMapOpenVSplit .": open vsplit\n" let help .= "\" ". g:NERDTreeMapPreviewVSplit .": preview vsplit\n" + let help .= "\" ". g:NERDTreeMapCustomOpen .": custom open\n" let help .= "\"\n\" ----------------------------\n" let help .= "\" Directory node mappings~\n" @@ -52,6 +52,7 @@ function! s:UI._dumpHelp() let help .= "\" ". g:NERDTreeMapOpenRecursively .": recursively open node\n" let help .= "\" ". g:NERDTreeMapOpenInTab.": open in new tab\n" let help .= "\" ". g:NERDTreeMapOpenInTabSilent .": open in new tab silently\n" + let help .= "\" ". g:NERDTreeMapCustomOpen .": custom open\n" let help .= "\" ". g:NERDTreeMapCloseDir .": close parent of node\n" let help .= "\" ". g:NERDTreeMapCloseChildren .": close all child nodes of\n" let help .= "\" current node recursively\n" @@ -66,6 +67,7 @@ function! s:UI._dumpHelp() let help .= "\" ". g:NERDTreeMapPreview .": find dir in tree\n" let help .= "\" ". g:NERDTreeMapOpenInTab.": open in new tab\n" let help .= "\" ". g:NERDTreeMapOpenInTabSilent .": open in new tab silently\n" + let help .= "\" ". g:NERDTreeMapCustomOpen .": custom open\n" let help .= "\" ". g:NERDTreeMapDeleteBookmark .": delete bookmark\n" let help .= "\"\n\" ----------------------------\n" @@ -252,7 +254,7 @@ endfunction " gets the line number of the root node function! s:UI.getRootLineNum() let rootLine = 1 - while getline(rootLine) !~# '^\(/\|<\)' + while rootLine <= line('$') && getline(rootLine) !~# '^\(/\|<\)' let rootLine = rootLine + 1 endwhile return rootLine @@ -338,7 +340,7 @@ function! s:UI.restoreScreenState() if !has_key(self, '_screenState') return endif - exec("silent vertical resize " . self._screenState['oldWindowSize']) + call nerdtree#exec("silent vertical resize " . self._screenState['oldWindowSize'], 1) let old_scrolloff=&scrolloff let &scrolloff=0 @@ -358,7 +360,7 @@ function! s:UI.saveScreenState() let self._screenState['oldPos'] = getpos(".") let self._screenState['oldTopLine'] = line("w0") let self._screenState['oldWindowSize']= winwidth("") - call nerdtree#exec(win . "wincmd w") + call nerdtree#exec(win . "wincmd w", 1) endfunction " FUNCTION: s:UI.setShowHidden(val) {{{1 @@ -504,10 +506,10 @@ endfunction function! s:UI.toggleZoom() if exists("b:NERDTreeZoomed") && b:NERDTreeZoomed let size = exists("b:NERDTreeOldWindowSize") ? b:NERDTreeOldWindowSize : g:NERDTreeWinSize - exec "silent vertical resize ". size + call nerdtree#exec("silent vertical resize ". size, 1) let b:NERDTreeZoomed = 0 else - exec "vertical resize ". get(g:, 'NERDTreeWinSizeMax', '') + call nerdtree#exec("vertical resize ". get(g:, 'NERDTreeWinSizeMax', ''), 1) let b:NERDTreeZoomed = 1 endif endfunction diff --git a/sources_non_forked/nerdtree/nerdtree_plugin/fs_menu.vim b/sources_non_forked/nerdtree/nerdtree_plugin/fs_menu.vim index 3eef5176..0a5de8a4 100644 --- a/sources_non_forked/nerdtree/nerdtree_plugin/fs_menu.vim +++ b/sources_non_forked/nerdtree/nerdtree_plugin/fs_menu.vim @@ -37,6 +37,7 @@ endif if g:NERDTreePath.CopyingSupported() call NERDTreeAddMenuItem({'text': '(c)opy the current node', 'shortcut': 'c', 'callback': 'NERDTreeCopyNode'}) endif +call NERDTreeAddMenuItem({'text': (has("clipboard")?'copy (p)ath to clipboard':'print (p)ath to screen'), 'shortcut': 'p', 'callback': 'NERDTreeCopyPath'}) if has("unix") || has("osx") call NERDTreeAddMenuItem({'text': '(l)ist the current node', 'shortcut': 'l', 'callback': 'NERDTreeListNode'}) @@ -113,14 +114,14 @@ function! s:promptToDelBuffer(bufnum, msg) let l:listedBufferCount = 0 endif if l:listedBufferCount > 1 - exec "tabdo windo if winbufnr(0) == " . a:bufnum . " | exec ':bnext! ' | endif" + call nerdtree#exec("tabdo windo if winbufnr(0) == " . a:bufnum . " | exec ':bnext! ' | endif", 1) else - exec "tabdo windo if winbufnr(0) == " . a:bufnum . " | exec ':enew! ' | endif" + call nerdtree#exec("tabdo windo if winbufnr(0) == " . a:bufnum . " | exec ':enew! ' | endif", 1) endif - exec "tabnext " . s:originalTabNumber - exec s:originalWindowNumber . "wincmd w" + call nerdtree#exec("tabnext " . s:originalTabNumber, 1) + call nerdtree#exec(s:originalWindowNumber . "wincmd w", 1) " 3. We don't need a previous buffer anymore - exec "bwipeout! " . a:bufnum + call nerdtree#exec("bwipeout! " . a:bufnum, 0) endif endfunction @@ -140,17 +141,17 @@ function! s:renameBuffer(bufNum, newNodeName, isDirectory) let editStr = g:NERDTreePath.New(a:newNodeName).str({'format': 'Edit'}) endif " 1. ensure that a new buffer is loaded - exec "badd " . quotedFileName + call nerdtree#exec("badd " . quotedFileName, 1) " 2. ensure that all windows which display the just deleted filename " display a buffer for a new filename. let s:originalTabNumber = tabpagenr() let s:originalWindowNumber = winnr() - exec "tabdo windo if winbufnr(0) == " . a:bufNum . " | exec ':e! " . editStr . "' | endif" - exec "tabnext " . s:originalTabNumber - exec s:originalWindowNumber . "wincmd w" + call nerdtree#exec("tabdo windo if winbufnr(0) == " . a:bufNum . " | exec ':e! " . editStr . "' | endif", 1) + call nerdtree#exec("tabnext " . s:originalTabNumber, 1) + call nerdtree#exec(s:originalWindowNumber . "wincmd w", 1) " 3. We don't need a previous buffer anymore try - exec "confirm bwipeout " . a:bufNum + call nerdtree#exec("confirm bwipeout " . a:bufNum, 0) catch " This happens when answering Cancel if confirmation is needed. Do nothing. endtry @@ -364,6 +365,17 @@ function! NERDTreeCopyNode() redraw! endfunction +" FUNCTION: NERDTreeCopyPath() {{{1 +function! NERDTreeCopyPath() + let l:nodePath = g:NERDTreeFileNode.GetSelected().path.str() + if has("clipboard") + let @* = l:nodePath + call nerdtree#echo("The path [" . l:nodePath . "] was copied to your clipboard.") + else + call nerdtree#echo("The full path is: " . l:nodePath) + endif +endfunction + " FUNCTION: NERDTreeQuickLook() {{{1 function! NERDTreeQuickLook() let treenode = g:NERDTreeFileNode.GetSelected() diff --git a/sources_non_forked/nerdtree/plugin/NERD_tree.vim b/sources_non_forked/nerdtree/plugin/NERD_tree.vim index 595e780b..a8e26d4e 100644 --- a/sources_non_forked/nerdtree/plugin/NERD_tree.vim +++ b/sources_non_forked/nerdtree/plugin/NERD_tree.vim @@ -121,6 +121,7 @@ endif "SECTION: Init variable calls for key mappings {{{2 +call s:initVariable("g:NERDTreeMapCustomOpen", "") call s:initVariable("g:NERDTreeMapActivateNode", "o") call s:initVariable("g:NERDTreeMapChangeRoot", "C") call s:initVariable("g:NERDTreeMapChdir", "cd") diff --git a/sources_non_forked/nginx.vim/README.md b/sources_non_forked/nginx.vim/README.md index 856dff23..58eceefa 100644 --- a/sources_non_forked/nginx.vim/README.md +++ b/sources_non_forked/nginx.vim/README.md @@ -1,9 +1,12 @@ # nginx.vim ## Description + [Vim](http://www.vim.org/) plugin for [Nginx](http://www.nginx.org) + ## Features + The plugin is based on the recent vim-plugin distributed with `nginx-1.12.0` and additionally features the following syntax improvements: - Highlight IPv4 and IPv6 addresses @@ -24,6 +27,7 @@ Furthermore: ## Screenshots + A `server` block with highlighting of insecure `ssl_protocol` options: ![nginx server block with SSL configuration](https://chr4.org/images/nginx_ssl.png) @@ -37,46 +41,18 @@ Embedded LUA syntax highlighting: ![Embedded LUA syntax highlighting](https://chr4.org/images/nginx_lua.png) -## Snippets -The plugin comes with useful snippets which can be accessed using e.g. [vim-snipmate](https://github.com/garbas/vim-snipmate). - -Select a decent cipher for your requirements (all of them can provide [SSLLabs A+ ratings](https://www.ssllabs.com/ssltest/analyze.html)) - -- `ciphers-paranoid`: Even-more-secure ciphers (elliptic curves, no GCM), not compatible with IE < 11, OpenSSL-0.9.8, Safari < 7, Android != 4.4 -- **`ciphers-modern`: High-security ciphers (elliptic curves), not compatible with IE < 11, OpenSSL-0.9.8, Safari < 7, Android < 4.4 (recommended)** -- `ciphers-compat`: Medium-security ciphers with good compatibility (No IE on WinXP) but TLSv1 and SHA required -- `ciphers-old`: Low-security ciphers (using weak DES and SHA ciphers, TLSv1), but compatible with everything but IE6 and Java6 -- `ssl-options`: Bootstrap secure SSL options - -Example: -```nginx -# High-security ciphers (elliptic curves), less compatibility -# No IE < 10, OpenSSL-0.9.8, Safari < 7, Android < 4.4 -ssl_protocols TLSv1.1 TLSv1.2; -ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256'; -``` - -Or add a robots.txt file with `robots.txt`: -```nginx -# Tell bots to not index this site -location /robots.txt { - default_type text/plain; - return 200 'User-agent: *\nDisallow: /\n'; -} -``` - -It also has auto-completion for location and server blocks with `location` resp. `server`, and [many more](https://github.com/chr4/nginx.vim/blob/master/snippets/nginx.snippets)! - -- Add useful [snippets](https://github.com/chr4/nginx.vim/blob/master/snippets/nginx.snippets) - ## References + - Based on the original `nginx-1.12.0/contrib/vim` - IPv4 and IPv6 address highlighting, based on expressions found in [this forum post](http://vim.1045645.n5.nabble.com/IPv6-support-for-quot-dns-quot-zonefile-syntax-highlighting-td1197292.html) - [Blog post](https://chr4.org/blog/2017/04/14/better-syntax-highlighting-and-snippets-for-nginx-in-vim/) introducing this plugin including some more examples +For help with secure cipher selection, visit [Mozillas SSL Configuration Generator](https://ssl-config.mozilla.org/) + ## Installation ### Pathogen + ```bash git clone https://github.com/chr4/nginx.vim ~/.vim/bundle/nginx.vim ``` diff --git a/sources_non_forked/nginx.vim/snippets/nginx.snippets b/sources_non_forked/nginx.vim/snippets/nginx.snippets deleted file mode 100644 index 68b1118a..00000000 --- a/sources_non_forked/nginx.vim/snippets/nginx.snippets +++ /dev/null @@ -1,166 +0,0 @@ -# vim: ft=nginx -snippet l80 - listen [::]:80 ipv6only=off; - $0 - -# Listen statements when using multiple http server blocks -snippet l80-multi - listen [::]:80 default_server; - listen 80 default_server; - $0 - -snippet l443 - listen [::]:443 ipv6only=off ssl http2 default_server; - $0 - -# Listen statements when using multiple ssl server blocks -snippet l443-multi - listen [::]:443 ssl http2 default_server; - listen 443 ssl http2 default_server; - $0 - -# Cipher suites are taken and adapted from Mozilla's recommendations -# https://wiki.mozilla.org/Security/Server_Side_TLS -# -# Paranoid mode -snippet ciphers-paranoid - # Paranoid ciphers, 256bit minimum, prefer ChaCha20/ Poly1305, bad compatibility - # No Android 5+6 (4.4 works), Chrome < 51, Firefox < 49, IE < 11, Java 6-8, GoogleBot - ssl_protocols TLSv1.2; - ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384'; - $0 - -# Mozilla modern -snippet ciphers-modern - # High-security ciphers (elliptic curves), less compatibility - # No IE < 10, OpenSSL-0.9.8, Safari < 7, Android < 4.4 - ssl_protocols TLSv1.1 TLSv1.2; - ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256'; - $0 - -# Mozilla intermediate (Removed DES for more security) -snippet ciphers-compat - # Medium-security ciphers with good compatibility (Weak: SHA) - # No IE on WinXP - ssl_protocols TLSv1 TLSv1.1 TLSv1.2; - ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:!DSS'; - $0 - -# Mozilla old (Removed DSS, HIGH, SEED for more security) -snippet ciphers-low - # Low-security ciphers (Weak: DES, SHA) - # No IE6, Java6 - ssl_protocols TLSv1 TLSv1.1 TLSv1.2; - ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-RSA-DES-CBC3-SHA:ECDHE-ECDSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:DES-CBC3-SHA:!SEED:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!RSAPSK:!aDH:!aECDH:!KRB5-DES-CBC3-SHA:!SRP:!DSS'; - $0 - -snippet ssl-options - # SSL certificate - ssl_certificate /etc/nginx/certs/${4:www.example.com}.crt; - ssl_certificate_key /etc/nginx/certs/${5:www.example.com}.key; - # ssl_dhparam /etc/nginx/certs/dhparam.pem; - - ssl_prefer_server_ciphers on; - ssl_stapling off; - ssl_stapling_verify off; - ssl_session_cache 'shared:SSL:10m'; - ssl_session_tickets off; - - # Enable HSTS (1 year) and some security options - add_header Strict-Transport-Security 'max-age=31536000 includeSubDomains; preload;'; - $0 - -snippet security-headers - add_header X-Frame-Options 'DENY'; - add_header X-Content-Type-Options 'nosniff'; - add_header X-Frame-Options 'SAMEORIGIN'; - add_header X-XSS-Protection '1; mode=block'; - add_header X-Robots-Tag 'none'; - add_header X-Download-Options 'noopen'; - add_header X-Permitted-Cross-Domain-Policies 'none'; - $0 - -snippet robots.txt - # Tell bots to not index this site - location /robots.txt { - default_type text/plain; - return 200 'User-agent: *\nDisallow: /\n'; - } - $0 - -snippet basic-auth - auth_basic 'Restricted'; - auth_basic_user_file ${1:/etc/nginx/htpasswd}; - $0 - -snippet proxy_pass - proxy_pass_header Date; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_pass http://${1:backend}; - $0 - -snippet php-fpm - location ~ \.php$ { - include fastcgi_params; - fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_index index.php; - fastcgi_intercept_errors on; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - fastcgi_pass ${1:127.0.0.1:9000}; - } - $0 - -snippet php-uwsgi - location ~ \.php$ { - include uwsgi_params; - uwsgi_max_temp_file_size 4096m; - uwsgi_modifier1 14; - uwsgi_read_timeout 900; - uwsgi_send_timeout 900; - uwsgi_pass ${1:unix:///run/uwsgi/php.sock}; - } - $0 - -snippet redirect-ssl - location / { - return 301 https://$http_host$request_uri; - } - $0 - -snippet redirect-other - # Redirect other requested hosts - if ($host != '${1:DOMAIN}') { - return 301 https://${2:DOMAIN}$request_uri; - } - $0 - -snippet letsencrypt - listen [::]:80 ipv6only=off; - - # Serve well-known path for letsencrypt - location /.well-known/acme-challenge { - root /etc/nginx/certs/acme; - default_type text/plain; - } - - location / { - return 301 https://$http_host$request_uri; - } - $0 - -snippet cut-trailing-slash - rewrite ^/(.*)/$ $scheme://$http_host:$server_port/$1 permanent; - $0 - -snippet location - location ${1:/} { - ${0:${VISUAL}} - } - -snippet server - server { - ${0:${VISUAL}} - } diff --git a/sources_non_forked/vim-bundle-mako/indent/mako.vim b/sources_non_forked/vim-bundle-mako/indent/mako.vim index 4433cc4a..f1f9482a 100644 --- a/sources_non_forked/vim-bundle-mako/indent/mako.vim +++ b/sources_non_forked/vim-bundle-mako/indent/mako.vim @@ -170,66 +170,101 @@ endfun " [-- --] call HtmlIndentPush('a') call HtmlIndentPush('abbr') -call HtmlIndentPush('acronym') call HtmlIndentPush('address') +call HtmlIndentPush('applet') +call HtmlIndentPush('article') +call HtmlIndentPush('aside') +call HtmlIndentPush('audio') call HtmlIndentPush('b') +call HtmlIndentPush('bdi') call HtmlIndentPush('bdo') -call HtmlIndentPush('big') call HtmlIndentPush('blockquote') call HtmlIndentPush('button') +call HtmlIndentPush('canvas') call HtmlIndentPush('caption') -call HtmlIndentPush('center') call HtmlIndentPush('cite') call HtmlIndentPush('code') call HtmlIndentPush('colgroup') +call HtmlIndentPush('content') +call HtmlIndentPush('data') +call HtmlIndentPush('datalist') call HtmlIndentPush('del') +call HtmlIndentPush('details') call HtmlIndentPush('dfn') +call HtmlIndentPush('dialog') call HtmlIndentPush('dir') call HtmlIndentPush('div') call HtmlIndentPush('dl') +call HtmlIndentPush('element') call HtmlIndentPush('em') call HtmlIndentPush('fieldset') -call HtmlIndentPush('font') +call HtmlIndentPush('figcaption') +call HtmlIndentPush('figure') +call HtmlIndentPush('footer') call HtmlIndentPush('form') -call HtmlIndentPush('frameset') call HtmlIndentPush('h1') call HtmlIndentPush('h2') call HtmlIndentPush('h3') call HtmlIndentPush('h4') call HtmlIndentPush('h5') call HtmlIndentPush('h6') +call HtmlIndentPush('header') +call HtmlIndentPush('hgroup') call HtmlIndentPush('i') call HtmlIndentPush('iframe') call HtmlIndentPush('ins') call HtmlIndentPush('kbd') call HtmlIndentPush('label') call HtmlIndentPush('legend') +call HtmlIndentPush('li') +call HtmlIndentPush('main') call HtmlIndentPush('map') +call HtmlIndentPush('mark') +call HtmlIndentPush('MediaStream') call HtmlIndentPush('menu') -call HtmlIndentPush('noframes') +call HtmlIndentPush('menuitem') +call HtmlIndentPush('meter') +call HtmlIndentPush('nav') +call HtmlIndentPush('noembed') call HtmlIndentPush('noscript') call HtmlIndentPush('object') call HtmlIndentPush('ol') call HtmlIndentPush('optgroup') +call HtmlIndentPush('option') +call HtmlIndentPush('output') +call HtmlIndentPush('picture') call HtmlIndentPush('pre') +call HtmlIndentPush('progress') call HtmlIndentPush('q') +call HtmlIndentPush('rb') +call HtmlIndentPush('rp') +call HtmlIndentPush('rt') +call HtmlIndentPush('rtc') +call HtmlIndentPush('ruby') call HtmlIndentPush('s') call HtmlIndentPush('samp') call HtmlIndentPush('script') +call HtmlIndentPush('section') call HtmlIndentPush('select') +call HtmlIndentPush('shadow') +call HtmlIndentPush('slot') call HtmlIndentPush('small') call HtmlIndentPush('span') call HtmlIndentPush('strong') call HtmlIndentPush('style') call HtmlIndentPush('sub') +call HtmlIndentPush('summary') call HtmlIndentPush('sup') call HtmlIndentPush('table') +call HtmlIndentPush('template') call HtmlIndentPush('textarea') +call HtmlIndentPush('time') call HtmlIndentPush('title') call HtmlIndentPush('tt') call HtmlIndentPush('u') call HtmlIndentPush('ul') call HtmlIndentPush('var') +call HtmlIndentPush('video') " For some reason the default HTML indentation script doesn't consider these " elements to be worthy of indentation. @@ -256,6 +291,44 @@ if !exists('g:html_indent_strict_table') call HtmlIndentPush('thead') endif +" [-- --] +call HtmlIndentPush('abbr') +call HtmlIndentPush('acronym') +call HtmlIndentPush('applet') +call HtmlIndentPush('audio') +call HtmlIndentPush('basefont') +call HtmlIndentPush('bgsound') +call HtmlIndentPush('big') +call HtmlIndentPush('blink') +call HtmlIndentPush('center') +call HtmlIndentPush('command') +call HtmlIndentPush('content') +call HtmlIndentPush('dir') +call HtmlIndentPush('element') +call HtmlIndentPush('embed') +call HtmlIndentPush('font') +call HtmlIndentPush('frame') +call HtmlIndentPush('frameset') +call HtmlIndentPush('image') +call HtmlIndentPush('img') +call HtmlIndentPush('isindex') +call HtmlIndentPush('keygen') +call HtmlIndentPush('listing') +call HtmlIndentPush('marquee') +call HtmlIndentPush('menuitem') +call HtmlIndentPush('multicol') +call HtmlIndentPush('nextid') +call HtmlIndentPush('nobr') +call HtmlIndentPush('noembed') +call HtmlIndentPush('noframes') +call HtmlIndentPush('object') +call HtmlIndentPush('plaintext') +call HtmlIndentPush('shadow') +call HtmlIndentPush('spacer') +call HtmlIndentPush('strike') +call HtmlIndentPush('tt') +call HtmlIndentPush('xmp') + " [-- --] call MakoIndentPush('%def') call MakoIndentPush('%block') diff --git a/sources_non_forked/vim-fugitive/autoload/fugitive.vim b/sources_non_forked/vim-fugitive/autoload/fugitive.vim index 8521f551..b012f20d 100644 --- a/sources_non_forked/vim-fugitive/autoload/fugitive.vim +++ b/sources_non_forked/vim-fugitive/autoload/fugitive.vim @@ -8,6 +8,8 @@ let g:autoloaded_fugitive = 1 if !exists('g:fugitive_git_executable') let g:fugitive_git_executable = 'git' +elseif g:fugitive_git_executable =~# '^\w\+=' + let g:fugitive_git_executable = 'env ' . g:fugitive_git_executable endif " Section: Utility @@ -44,7 +46,9 @@ function! s:winshell() abort endfunction function! s:shellesc(arg) abort - if a:arg =~ '^[A-Za-z0-9_/.-]\+$' + if type(a:arg) == type([]) + return join(map(copy(a:arg), 's:shellesc(v:val)')) + elseif a:arg =~ '^[A-Za-z0-9_/:.-]\+$' return a:arg elseif s:winshell() return '"'.s:gsub(s:gsub(a:arg, '"', '""'), '\%', '"%"').'"' @@ -55,7 +59,9 @@ endfunction let s:fnameescape = " \t\n*?[{`$\\%#'\"|!<" function! s:fnameescape(file) abort - if exists('*fnameescape') + if type(a:file) == type([]) + return join(map(copy(a:file), 's:fnameescape(v:val)')) + elseif exists('*fnameescape') return fnameescape(a:file) else return escape(a:file, s:fnameescape) @@ -63,15 +69,23 @@ function! s:fnameescape(file) abort endfunction function! s:throw(string) abort - let v:errmsg = 'fugitive: '.a:string - throw v:errmsg + throw 'fugitive: '.a:string endfunction -function! s:warn(str) abort - echohl WarningMsg - echomsg a:str - echohl None - let v:warningmsg = a:str +function! s:DirCheck(...) abort + if empty(a:0 ? s:Dir(a:1) : s:Dir()) + return 'return ' . string('echoerr "fugitive: not a Git repository"') + endif + return '' +endfunction + +function! s:Mods(mods, ...) abort + let mods = substitute(a:mods, '\C', '', '') + let mods = mods =~# '\S$' ? mods . ' ' : mods + if a:0 && mods !~# '\<\%(aboveleft\|belowright\|leftabove\|rightbelow\|topleft\|botright\|tab\)\>' + let mods = a:1 . ' ' . mods + endif + return substitute(mods, '\s\+', ' ', 'g') endfunction function! s:Slash(path) abort @@ -82,27 +96,19 @@ function! s:Slash(path) abort endif endfunction -function! s:PlatformSlash(path) abort - if exists('+shellslash') && !&shellslash - return tr(a:path, '/', '\') - else - return a:path - endif -endfunction - function! s:Resolve(path) abort let path = resolve(a:path) if has('win32') - let path = s:PlatformSlash(fnamemodify(fnamemodify(path, ':h'), ':p') . fnamemodify(path, ':t')) + let path = FugitiveVimPath(fnamemodify(fnamemodify(path, ':h'), ':p') . fnamemodify(path, ':t')) endif return path endfunction function! s:cpath(path, ...) abort if exists('+fileignorecase') && &fileignorecase - let path = s:PlatformSlash(tolower(a:path)) + let path = FugitiveVimPath(tolower(a:path)) else - let path = s:PlatformSlash(a:path) + let path = FugitiveVimPath(a:path) endif return a:0 ? path ==# s:cpath(a:1) : path endfunction @@ -129,59 +135,119 @@ function! s:executable(binary) abort return s:executables[a:binary] endfunction -function! s:map(mode, lhs, rhs, ...) abort - let flags = (a:0 ? a:1 : '') . (a:rhs =~# '' ? '' : '${2} diff --git a/sources_non_forked/snipmate-snippets/html/script/inline_script.snippet b/sources_non_forked/snipmate-snippets/html/script/inline_script.snippet deleted file mode 100644 index 35e078b3..00000000 --- a/sources_non_forked/snipmate-snippets/html/script/inline_script.snippet +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/sources_non_forked/snipmate-snippets/html/select.snippet b/sources_non_forked/snipmate-snippets/html/select.snippet deleted file mode 100644 index 252e3f77..00000000 --- a/sources_non_forked/snipmate-snippets/html/select.snippet +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/sources_non_forked/snipmate-snippets/html/skel/basic.snippet b/sources_non_forked/snipmate-snippets/html/skel/basic.snippet deleted file mode 100644 index 61ec2444..00000000 --- a/sources_non_forked/snipmate-snippets/html/skel/basic.snippet +++ /dev/null @@ -1,13 +0,0 @@ - - - - - ${1:Page Title} - - - - - ${2} - - diff --git a/sources_non_forked/snipmate-snippets/html/skel/basic_with_meta.snippet b/sources_non_forked/snipmate-snippets/html/skel/basic_with_meta.snippet deleted file mode 100644 index b6de9f8d..00000000 --- a/sources_non_forked/snipmate-snippets/html/skel/basic_with_meta.snippet +++ /dev/null @@ -1,15 +0,0 @@ - - - - - ${1:Page Title} - - - - - - - ${2} - - diff --git a/sources_non_forked/snipmate-snippets/html/style.snippet b/sources_non_forked/snipmate-snippets/html/style.snippet deleted file mode 100644 index 26ae0fe9..00000000 --- a/sources_non_forked/snipmate-snippets/html/style.snippet +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/sources_non_forked/snipmate-snippets/html/t.snippet b/sources_non_forked/snipmate-snippets/html/t.snippet deleted file mode 100644 index ef504276..00000000 --- a/sources_non_forked/snipmate-snippets/html/t.snippet +++ /dev/null @@ -1,3 +0,0 @@ -<${1:div}${2}> - ${3} -${4} diff --git a/sources_non_forked/snipmate-snippets/html/table/basic.snippet b/sources_non_forked/snipmate-snippets/html/table/basic.snippet deleted file mode 100644 index 2100d13d..00000000 --- a/sources_non_forked/snipmate-snippets/html/table/basic.snippet +++ /dev/null @@ -1,3 +0,0 @@ - - ${2} -
diff --git a/sources_non_forked/snipmate-snippets/html/table/hardcore.snippet b/sources_non_forked/snipmate-snippets/html/table/hardcore.snippet deleted file mode 100644 index 35fa01ae..00000000 --- a/sources_non_forked/snipmate-snippets/html/table/hardcore.snippet +++ /dev/null @@ -1,9 +0,0 @@ -+>> - - <++> - - - - - - diff --git a/sources_non_forked/snipmate-snippets/html/textarea.snippet b/sources_non_forked/snipmate-snippets/html/textarea.snippet deleted file mode 100644 index 0b3fb84b..00000000 --- a/sources_non_forked/snipmate-snippets/html/textarea.snippet +++ /dev/null @@ -1 +0,0 @@ - diff --git a/sources_non_forked/snipmate-snippets/java/class/basic+constructor+main.snippet b/sources_non_forked/snipmate-snippets/java/class/basic+constructor+main.snippet deleted file mode 100644 index 3bd770e2..00000000 --- a/sources_non_forked/snipmate-snippets/java/class/basic+constructor+main.snippet +++ /dev/null @@ -1,17 +0,0 @@ -/** - * class $2 - * @author ${4:`g:snips_author`} - */ -${1:public} class ${2:`Snippet_JavaClassNameFromFilename()`}${3} { - - /** - * Constructor for $2 - */ - public $2(${4}) { - ${5} - } - - public static void main(String args[]) { - } - -} diff --git a/sources_non_forked/snipmate-snippets/java/class/basic+constructor.snippet b/sources_non_forked/snipmate-snippets/java/class/basic+constructor.snippet deleted file mode 100644 index 05eabefa..00000000 --- a/sources_non_forked/snipmate-snippets/java/class/basic+constructor.snippet +++ /dev/null @@ -1,14 +0,0 @@ -/** - * class $2 - * @author ${4:`g:snips_author`} - */ -${1:public} class ${2:`Snippet_JavaClassNameFromFilename()`}${3} { - - /** - * Constructor for $2 - */ - public $2(${5}){ - ${6} - } - -} diff --git a/sources_non_forked/snipmate-snippets/java/class/basic.snippet b/sources_non_forked/snipmate-snippets/java/class/basic.snippet deleted file mode 100644 index 05eabefa..00000000 --- a/sources_non_forked/snipmate-snippets/java/class/basic.snippet +++ /dev/null @@ -1,14 +0,0 @@ -/** - * class $2 - * @author ${4:`g:snips_author`} - */ -${1:public} class ${2:`Snippet_JavaClassNameFromFilename()`}${3} { - - /** - * Constructor for $2 - */ - public $2(${5}){ - ${6} - } - -} diff --git a/sources_non_forked/snipmate-snippets/java/for.snippet b/sources_non_forked/snipmate-snippets/java/for.snippet deleted file mode 100644 index 70a41086..00000000 --- a/sources_non_forked/snipmate-snippets/java/for.snippet +++ /dev/null @@ -1,3 +0,0 @@ -for(${1:int i=0}; ${2:condition}; ${3:i++}){ - ${4} -} diff --git a/sources_non_forked/snipmate-snippets/java/gs.snippet b/sources_non_forked/snipmate-snippets/java/gs.snippet deleted file mode 100644 index 954a9a09..00000000 --- a/sources_non_forked/snipmate-snippets/java/gs.snippet +++ /dev/null @@ -1,9 +0,0 @@ -//getter for $3 -public ${2:variable_type} get${1:VariableName}() { - return ${3:variableName}; -} - -//setter for $3 -public void set$1($2 $3) { - this.$3 = $3; -}${4} diff --git a/sources_non_forked/snipmate-snippets/java/if.snippet b/sources_non_forked/snipmate-snippets/java/if.snippet deleted file mode 100644 index b9d1c5c3..00000000 --- a/sources_non_forked/snipmate-snippets/java/if.snippet +++ /dev/null @@ -1,3 +0,0 @@ -if(${1}){ - ${2} -} diff --git a/sources_non_forked/snipmate-snippets/java/ife.snippet b/sources_non_forked/snipmate-snippets/java/ife.snippet deleted file mode 100644 index a7e43d09..00000000 --- a/sources_non_forked/snipmate-snippets/java/ife.snippet +++ /dev/null @@ -1,4 +0,0 @@ -if(${1}){ - ${2} -}else{ -} diff --git a/sources_non_forked/snipmate-snippets/java/log.snippet b/sources_non_forked/snipmate-snippets/java/log.snippet deleted file mode 100644 index abb7c7d6..00000000 --- a/sources_non_forked/snipmate-snippets/java/log.snippet +++ /dev/null @@ -1 +0,0 @@ -System.${1:out}.println(${2}); diff --git a/sources_non_forked/snipmate-snippets/java/m.snippet b/sources_non_forked/snipmate-snippets/java/m.snippet deleted file mode 100644 index 67bf3fb0..00000000 --- a/sources_non_forked/snipmate-snippets/java/m.snippet +++ /dev/null @@ -1,8 +0,0 @@ -/** - * ${7:Method Description} - * ${5} - * @return ${6} - */ -${1:public} ${2:void} ${3:methodName}(${4}) { - ${8} -} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/add.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/add.snippet deleted file mode 100644 index 3bf9756d..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/add.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.add('${2:selector expression}')${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/addClass.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/addClass.snippet deleted file mode 100644 index 68007744..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/addClass.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.addClass('${2:class name}')${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/after.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/after.snippet deleted file mode 100644 index 34d1956d..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/after.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.after('${2:Some text and bold!}')${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/ajax.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/ajax.snippet deleted file mode 100644 index 5453a257..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/ajax.snippet +++ /dev/null @@ -1,18 +0,0 @@ -$.ajax({ - url: "${1:mydomain.com/url}", - type: "${2:POST}", - dataType: "${3:xml/html/script/json}", - data: $.param( $("${4:Element or Expression}") ), - - complete: function() { - ${5://called when complete} - }, - - success: function() { - ${6://called when successful} - }, - - error: function() { - ${7://called when there is an error} - }, -}); diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/ajaxerror.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/ajaxerror.snippet deleted file mode 100644 index 0f8ccdaf..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/ajaxerror.snippet +++ /dev/null @@ -1,4 +0,0 @@ -.ajaxError(function(${1:request, settings}) { - ${2://stuff to do when an AJAX call returns an error}; -}); -${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/ajaxget.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/ajaxget.snippet deleted file mode 100644 index 1489859a..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/ajaxget.snippet +++ /dev/null @@ -1,3 +0,0 @@ -$.get('${1:/test/ajax-test.xml}', function(xml){ - ${2:alert( ("title",xml).text() ) //optional stuff to do after get;} -}); diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/ajaxgetif.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/ajaxgetif.snippet deleted file mode 100644 index 0f4d1ef0..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/ajaxgetif.snippet +++ /dev/null @@ -1,3 +0,0 @@ -$.getIfModified('${1:/test/test.cgi}', function(data){ - ${2:alert( "Data loaded: " + data ) //optional stuff to do after get;} -}); diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/ajaxpost.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/ajaxpost.snippet deleted file mode 100644 index f62bf102..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/ajaxpost.snippet +++ /dev/null @@ -1,5 +0,0 @@ -$.post('<+/path/to/file.cgi+>',{ - <+<+param1+>: "<+value1+>", <+param2+>: "<+value2+>"+>}, - function(){ - <+//stuff to do after event occurs;+> -}); diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/ajaxsend.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/ajaxsend.snippet deleted file mode 100644 index 4b74cd98..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/ajaxsend.snippet +++ /dev/null @@ -1,4 +0,0 @@ -.ajaxSend(function(${1:request, settings}) { - ${2://stuff to do when an AJAX call returns an error}; -}); -${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/ajaxsetup.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/ajaxsetup.snippet deleted file mode 100644 index c5b4ad02..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/ajaxsetup.snippet +++ /dev/null @@ -1,18 +0,0 @@ -$.ajaxSetup({ - url: "${1:mydomain.com/url}", - type: "${2:POST}", - dataType: "${3:xml/html/script/json}", - data: $.param( $("${4:Element or Expression}") ), - - complete: function() { - ${5://called when complete} - }, - - success: function() { - ${6://called when successful} - }, - - error: function() { - ${7://called when there is an error} - }, -}); diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/ajaxstart.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/ajaxstart.snippet deleted file mode 100644 index 3caafd58..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/ajaxstart.snippet +++ /dev/null @@ -1,4 +0,0 @@ -$.ajaxStart(function() { - ${1://stuff to do when an AJAX call is started and no other AJAX calls are in progress}; -}); -${2} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/ajaxstop.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/ajaxstop.snippet deleted file mode 100644 index 6088a9f5..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/ajaxstop.snippet +++ /dev/null @@ -1,4 +0,0 @@ -$.ajaxStop(function() { - ${1://stuff to do when an AJAX call is started and no other AJAX calls are in progress}; -}); -${2} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/ajaxsuccess.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/ajaxsuccess.snippet deleted file mode 100644 index ba2247dc..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/ajaxsuccess.snippet +++ /dev/null @@ -1,4 +0,0 @@ -$.ajaxSuccess(function() { - ${1://stuff to do when an AJAX call is started and no other AJAX calls are in progress}; -}); -${2} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/animate.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/animate.snippet deleted file mode 100644 index 19135327..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/animate.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.animate({${2:param1: value1, param2: value2}}, ${3:speed})${4} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/append.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/append.snippet deleted file mode 100644 index bc4ff4d3..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/append.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.append('${2:Some text and bold!}')${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/appendTo.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/appendTo.snippet deleted file mode 100644 index 97883710..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/appendTo.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.appendTo('${2:selector expression}')${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/attr.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/attr.snippet deleted file mode 100644 index fb7e2f42..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/attr.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.attr('${2:attribute}', '${3:value}')${4} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/attrm.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/attrm.snippet deleted file mode 100644 index 15685512..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/attrm.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.attr({'${2:attr1}': '${3:value1}', '${4:attr2}': '${5:value2}'})${6} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/before.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/before.snippet deleted file mode 100644 index e12c4aed..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/before.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.before('${2:Some text and bold!}')${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/bind.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/bind.snippet deleted file mode 100644 index dda284d9..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/bind.snippet +++ /dev/null @@ -1,3 +0,0 @@ -${1:obj}.bind('${2:event name}', function(${3:event}) { - ${4:// Act on the event} -}); diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/blur.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/blur.snippet deleted file mode 100644 index 674623db..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/blur.snippet +++ /dev/null @@ -1,3 +0,0 @@ -${1:obj}.blur(function() { - ${2:// Act on the event} -}); diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/change.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/change.snippet deleted file mode 100644 index 184f8a99..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/change.snippet +++ /dev/null @@ -1,3 +0,0 @@ -${1:obj}.change(function() { - ${2:// Act on the event} -}); diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/children.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/children.snippet deleted file mode 100644 index 2db688b1..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/children.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.children('${2:selector expression}')${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/click.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/click.snippet deleted file mode 100644 index d17a047e..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/click.snippet +++ /dev/null @@ -1,3 +0,0 @@ -${1:obj}.click(function() { - ${2:// Act on the event} -}); diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/clone.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/clone.snippet deleted file mode 100644 index 83b0b421..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/clone.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.clone()${2} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/contains.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/contains.snippet deleted file mode 100644 index 2a073948..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/contains.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.contains('${2:text to find}')${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/css.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/css.snippet deleted file mode 100644 index 408199eb..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/css.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.css('${2:attribute}', '${3:value}')${4} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/cssm.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/cssm.snippet deleted file mode 100644 index 7eebe1e4..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/cssm.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.css({${2:attribute1}: '${3:value1}', ${4:attribute2}: '${5:value2}'})${6} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/dblclick.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/dblclick.snippet deleted file mode 100644 index 4b2d6b2a..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/dblclick.snippet +++ /dev/null @@ -1,3 +0,0 @@ -${1:obj}.dblclick(function() { - ${2:// Act on the event} -}); diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/each.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/each.snippet deleted file mode 100644 index 05beed2e..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/each.snippet +++ /dev/null @@ -1,3 +0,0 @@ -${1:obj}.each(function(index) { - ${2:this.innerHTML = this + " is the element, " + index + " is the position";} -}); diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/el.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/el.snippet deleted file mode 100644 index d2065238..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/el.snippet +++ /dev/null @@ -1 +0,0 @@ -$('${1}')${2:} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/eltrim.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/eltrim.snippet deleted file mode 100644 index 9cc0d692..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/eltrim.snippet +++ /dev/null @@ -1 +0,0 @@ -$.trim('${1:string}')${2} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/end.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/end.snippet deleted file mode 100644 index 293102c4..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/end.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.end()${2} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/error.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/error.snippet deleted file mode 100644 index 23b0e650..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/error.snippet +++ /dev/null @@ -1,3 +0,0 @@ -${1:obj}.error(function() { - ${2:// Act on the event} -}); diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/fadein.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/fadein.snippet deleted file mode 100644 index 549d8464..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/fadein.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.fadeIn('${2:slow/400/fast}')${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/fadeinc.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/fadeinc.snippet deleted file mode 100644 index 9090853e..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/fadeinc.snippet +++ /dev/null @@ -1,3 +0,0 @@ -${1:obj}.fadeIn('slow/400/fast', function() { - ${2://Stuff to do *after* the animation takes place}; -}); diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/fadeout.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/fadeout.snippet deleted file mode 100644 index 24d6c763..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/fadeout.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.fadeOut('${2:slow/400/fast}')${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/fadeoutc.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/fadeoutc.snippet deleted file mode 100644 index 76d54571..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/fadeoutc.snippet +++ /dev/null @@ -1,3 +0,0 @@ -${1:obj}.fadeOut('slow/400/fast', function() { - ${2://Stuff to do *after* the animation takes place}; -}); diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/fadeto.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/fadeto.snippet deleted file mode 100644 index b0e584aa..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/fadeto.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.fadeTo('${2:slow/400/fast}', ${3:0.5})${4} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/fadetoc.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/fadetoc.snippet deleted file mode 100644 index 17243b4c..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/fadetoc.snippet +++ /dev/null @@ -1,3 +0,0 @@ -${1:obj}.fadeTo('slow/400/fast', ${2:0.5}, function() { - ${3://Stuff to do *after* the animation takes place}; -}); diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/filter.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/filter.snippet deleted file mode 100644 index d33fdf2b..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/filter.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.filter('${2:selector expression}')${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/find.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/find.snippet deleted file mode 100644 index 1791e912..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/find.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.find('${2:selector expression}')${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/focus.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/focus.snippet deleted file mode 100644 index 3b1b5719..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/focus.snippet +++ /dev/null @@ -1,3 +0,0 @@ -${1:obj}.focus(function() { - ${2:// Act on the event} -}); diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/get.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/get.snippet deleted file mode 100644 index 4374c183..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/get.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.get(${2:element index})${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/getjson.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/getjson.snippet deleted file mode 100644 index 518d676d..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/getjson.snippet +++ /dev/null @@ -1,5 +0,0 @@ -$.getJSON('<+/path/to/file.cgi+>',{ - <+<+param1+>: "<+value1+>", <+param2+>: "<+value2+>"+>}, - function(json){ - <+//stuff to do after event occurs;+> -}); diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/getscript.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/getscript.snippet deleted file mode 100644 index 0b62d90b..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/getscript.snippet +++ /dev/null @@ -1,3 +0,0 @@ -$.getScript('${1:somescript.js}', function(){ - ${2://optional stuff to do after getScript;} -}); diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/height.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/height.snippet deleted file mode 100644 index 1515d5c6..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/height.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.height(${2:integer})${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/hide.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/hide.snippet deleted file mode 100644 index c8071cbc..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/hide.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.hide('${2:slow/400/fast}')${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/hidec.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/hidec.snippet deleted file mode 100644 index 62f2280a..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/hidec.snippet +++ /dev/null @@ -1,3 +0,0 @@ -${1:obj}.hide('${2:slow/400/fast}', function() { - ${3://Stuff to do *after* the animation takes place} -}); diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/hover.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/hover.snippet deleted file mode 100644 index d8468c1a..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/hover.snippet +++ /dev/null @@ -1,5 +0,0 @@ -${1:obj}.hover(function() { - ${2:// Stuff to do when the mouse enters the element;} -}, function() { - ${3:// Stuff to do when the mouse leaves the element;} -});${4} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/html.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/html.snippet deleted file mode 100644 index 0c5a25e1..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/html.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.html('${2:Some text and bold!}')${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/insertAfter.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/insertAfter.snippet deleted file mode 100644 index 66c389eb..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/insertAfter.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.insertAfter('${2:selector expression}')${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/insertBefore.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/insertBefore.snippet deleted file mode 100644 index e7090d4d..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/insertBefore.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.insertBefore('${2:selector expression}')${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/is.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/is.snippet deleted file mode 100644 index 28eefb02..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/is.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.is('${2:selector expression}')${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/load.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/load.snippet deleted file mode 100644 index 1f09fbc9..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/load.snippet +++ /dev/null @@ -1,3 +0,0 @@ -${1:obj}.load(function() { - ${2:// Act on the event} -}); diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/loadf.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/loadf.snippet deleted file mode 100644 index 2e7d9c8b..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/loadf.snippet +++ /dev/null @@ -1,3 +0,0 @@ -<+obj+>.load('<+/path/to/file.htm+>', { <+<+param1+>: "<+value1+>", <+param2+>: "<+value2+>"+> }, function() { - <+// Stuff to do after the page is loaded+> -}); \ No newline at end of file diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/loadif.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/loadif.snippet deleted file mode 100644 index fe45d05a..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/loadif.snippet +++ /dev/null @@ -1,3 +0,0 @@ -<+obj+>.loadIfModified('<+/path/to/file.htm+>', { <+<+param1+>: "<+value1+>", <+param2+>: "<+value2+>"+> }, function() { - <+// Stuff to do after the page is loaded+> -}); \ No newline at end of file diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/mdown.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/mdown.snippet deleted file mode 100644 index 3be70e1b..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/mdown.snippet +++ /dev/null @@ -1,3 +0,0 @@ -${1:obj}.mousedown(function() { - ${2:// Act on the event} -}); diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/mmove.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/mmove.snippet deleted file mode 100644 index eb7ac052..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/mmove.snippet +++ /dev/null @@ -1,3 +0,0 @@ -${1:obj}.mousemove(function() { - ${2:// Act on the event} -}); diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/mout.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/mout.snippet deleted file mode 100644 index f2142756..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/mout.snippet +++ /dev/null @@ -1,3 +0,0 @@ -${1:obj}.mouseout(function() { - ${2:// Act on the event} -}); diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/mover.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/mover.snippet deleted file mode 100644 index f1eb19cc..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/mover.snippet +++ /dev/null @@ -1,3 +0,0 @@ -${1:obj}.mouseover(function() { - ${2:// Act on the event} -}); diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/mup.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/mup.snippet deleted file mode 100644 index 04fb36a3..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/mup.snippet +++ /dev/null @@ -1,3 +0,0 @@ -${1:obj}.mouseup(function() { - ${2:// Act on the event} -}); diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/next.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/next.snippet deleted file mode 100644 index b6a65281..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/next.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.next('${2:selector expression}')${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/not.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/not.snippet deleted file mode 100644 index c6a217f6..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/not.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.not('${2:selector expression}')${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/one.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/one.snippet deleted file mode 100644 index cacdbfb5..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/one.snippet +++ /dev/null @@ -1,3 +0,0 @@ -${1:obj}.one('${2:event name}', function(${3:event}) { - ${4:// Act on the event once} -}); diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/parent.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/parent.snippet deleted file mode 100644 index 0490f05a..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/parent.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.parent('${2:selector expression}')${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/parents.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/parents.snippet deleted file mode 100644 index fb0bd131..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/parents.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.parents('${2:selector expression}')${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/prepend.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/prepend.snippet deleted file mode 100644 index bc41d48f..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/prepend.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.prepend('${2:Some text and bold!}')${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/prependto.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/prependto.snippet deleted file mode 100644 index e4406957..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/prependto.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.prependTo('${2:selector expression}')${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/prev.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/prev.snippet deleted file mode 100644 index b7aba645..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/prev.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.prev('${2:selector expression}')${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/ready.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/ready.snippet deleted file mode 100644 index d0005318..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/ready.snippet +++ /dev/null @@ -1,3 +0,0 @@ -$(document).ready(function() { - ${1:// Stuff to do as soon as the DOM is ready;} -}); diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/remove.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/remove.snippet deleted file mode 100644 index 4c976a17..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/remove.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.remove()${2} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/removeattr.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/removeattr.snippet deleted file mode 100644 index 267d584a..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/removeattr.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.removeAttr('${2:attribute name}')${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/removeclass.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/removeclass.snippet deleted file mode 100644 index f5538030..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/removeclass.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.removeClass('${2:class name}')${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/reset.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/reset.snippet deleted file mode 100644 index 777af958..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/reset.snippet +++ /dev/null @@ -1,3 +0,0 @@ -${1:obj}.reset(function() { - ${2:// Act on the event} -}); diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/resize.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/resize.snippet deleted file mode 100644 index b46ac0a0..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/resize.snippet +++ /dev/null @@ -1,3 +0,0 @@ -${1:obj}.resize(function() { - ${2:// Act on the event} -}); diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/scroll.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/scroll.snippet deleted file mode 100644 index 7a512442..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/scroll.snippet +++ /dev/null @@ -1,3 +0,0 @@ -${1:obj}.scroll(function() { - ${2:// Act on the event} -}); diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/sdown.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/sdown.snippet deleted file mode 100644 index b39840e9..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/sdown.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.slideDown('${2:slow/400/fast}')${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/sdownc.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/sdownc.snippet deleted file mode 100644 index 3404b783..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/sdownc.snippet +++ /dev/null @@ -1,3 +0,0 @@ -${1:obj}.slideDown('${2:slow/400/fast}', function() { - ${3://Stuff to do *after* the animation takes place}; -}); diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/sdupc.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/sdupc.snippet deleted file mode 100644 index 873c6657..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/sdupc.snippet +++ /dev/null @@ -1,3 +0,0 @@ -${1:obj}.slideUp('${2:slow/400/fast}', function() { - ${3://Stuff to do *after* the animation takes place}; -}); diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/select.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/select.snippet deleted file mode 100644 index 986437ed..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/select.snippet +++ /dev/null @@ -1,3 +0,0 @@ -${1:obj}.select(function() { - ${2:// Act on the event} -}); diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/show.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/show.snippet deleted file mode 100644 index 31819b1e..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/show.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.show('${2:slow/400/fast}')${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/showc.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/showc.snippet deleted file mode 100644 index 6dc5bacc..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/showc.snippet +++ /dev/null @@ -1,3 +0,0 @@ -${1:obj}.show('${2:slow/400/fast}', function() { - ${3://Stuff to do *after* the animation takes place} -}); diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/sib.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/sib.snippet deleted file mode 100644 index 014f1f79..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/sib.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.siblings('${2:selector expression}')${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/size.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/size.snippet deleted file mode 100644 index 1ba15439..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/size.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.size()${2} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/stoggle.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/stoggle.snippet deleted file mode 100644 index daba37d2..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/stoggle.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.slideToggle('${2:slow/400/fast}')${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/submit.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/submit.snippet deleted file mode 100644 index ae98d83e..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/submit.snippet +++ /dev/null @@ -1,3 +0,0 @@ -${1:obj}.submit(function() { - ${2:// Act on the event once} -}); diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/sup.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/sup.snippet deleted file mode 100644 index d844a68e..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/sup.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.slideUp('${2:slow/400/fast}')${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/text.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/text.snippet deleted file mode 100644 index 5f667c07..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/text.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.text(${2:'some text'})${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/this.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/this.snippet deleted file mode 100644 index b3cee8d3..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/this.snippet +++ /dev/null @@ -1 +0,0 @@ -$(this)${1} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/tog.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/tog.snippet deleted file mode 100644 index 54f5f17a..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/tog.snippet +++ /dev/null @@ -1,6 +0,0 @@ -${1:obj}.toggle(function() { - ${2:// Stuff to do every *odd* time the element is clicked;} -}, function() { - ${3:// Stuff to do every *even* time the element is clicked;} -}); -${4} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/togclass.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/togclass.snippet deleted file mode 100644 index 023a4b7d..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/togclass.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.toggleClass('${2:class name}')${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/togsh.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/togsh.snippet deleted file mode 100644 index 265a62d0..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/togsh.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.toggle('${2:slow/400/fast}')${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/trig.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/trig.snippet deleted file mode 100644 index f7105e08..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/trig.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.trigger('${2:event name}')${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/unbind.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/unbind.snippet deleted file mode 100644 index 0fe423d5..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/unbind.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.unbind('${2:event name}')${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/val.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/val.snippet deleted file mode 100644 index cafe0b0b..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/val.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.val('${2:text}')${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/width.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/width.snippet deleted file mode 100644 index 415631c6..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/width.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.width(${2:integer})${3} diff --git a/sources_non_forked/snipmate-snippets/javascript-jquery/wrap.snippet b/sources_non_forked/snipmate-snippets/javascript-jquery/wrap.snippet deleted file mode 100644 index 55df53ff..00000000 --- a/sources_non_forked/snipmate-snippets/javascript-jquery/wrap.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:obj}.wrap('${2:<div class="extra-wrapper"></div>}')${3} diff --git a/sources_non_forked/snipmate-snippets/javascript/anon.snippet b/sources_non_forked/snipmate-snippets/javascript/anon.snippet deleted file mode 100644 index d486c430..00000000 --- a/sources_non_forked/snipmate-snippets/javascript/anon.snippet +++ /dev/null @@ -1 +0,0 @@ -function(${1}) { ${2} }; diff --git a/sources_non_forked/snipmate-snippets/javascript/for.snippet b/sources_non_forked/snipmate-snippets/javascript/for.snippet deleted file mode 100644 index 3933153f..00000000 --- a/sources_non_forked/snipmate-snippets/javascript/for.snippet +++ /dev/null @@ -1,3 +0,0 @@ -for (var <+i+>=0; <+i+> < <+<+Things+>.length+>; <+i+>++) { -<+<+Things+>[<+i+>]+> -}; diff --git a/sources_non_forked/snipmate-snippets/javascript/fun.snippet b/sources_non_forked/snipmate-snippets/javascript/fun.snippet deleted file mode 100644 index 064b9593..00000000 --- a/sources_non_forked/snipmate-snippets/javascript/fun.snippet +++ /dev/null @@ -1,3 +0,0 @@ -function ${1:function_name} (${2:argument}) { - ${3:// body} -} diff --git a/sources_non_forked/snipmate-snippets/javascript/if.snippet b/sources_non_forked/snipmate-snippets/javascript/if.snippet deleted file mode 100644 index 931b9f17..00000000 --- a/sources_non_forked/snipmate-snippets/javascript/if.snippet +++ /dev/null @@ -1 +0,0 @@ -if (${1:true}) { ${2} }; diff --git a/sources_non_forked/snipmate-snippets/javascript/ife.snippet b/sources_non_forked/snipmate-snippets/javascript/ife.snippet deleted file mode 100644 index 6b172d07..00000000 --- a/sources_non_forked/snipmate-snippets/javascript/ife.snippet +++ /dev/null @@ -1,4 +0,0 @@ -if (${1:true}) { - ${2} -} else { -}; diff --git a/sources_non_forked/snipmate-snippets/javascript/log.snippet b/sources_non_forked/snipmate-snippets/javascript/log.snippet deleted file mode 100644 index b4cf84fe..00000000 --- a/sources_non_forked/snipmate-snippets/javascript/log.snippet +++ /dev/null @@ -1 +0,0 @@ -console.log(${1}); diff --git a/sources_non_forked/snipmate-snippets/javascript/met.snippet b/sources_non_forked/snipmate-snippets/javascript/met.snippet deleted file mode 100644 index 1c30d617..00000000 --- a/sources_non_forked/snipmate-snippets/javascript/met.snippet +++ /dev/null @@ -1,3 +0,0 @@ -${1:method_name}: function(${2:attribute}){ - ${3} -}${4:, } diff --git a/sources_non_forked/snipmate-snippets/javascript/proto.snippet b/sources_non_forked/snipmate-snippets/javascript/proto.snippet deleted file mode 100644 index 37cd6d49..00000000 --- a/sources_non_forked/snipmate-snippets/javascript/proto.snippet +++ /dev/null @@ -1,3 +0,0 @@ -${1:class_name}.prototype.${2:method_name} = function(${3:first_argument}) { - ${4:// body} -}; diff --git a/sources_non_forked/snipmate-snippets/javascript/timeout.snippet b/sources_non_forked/snipmate-snippets/javascript/timeout.snippet deleted file mode 100644 index 6ea2842c..00000000 --- a/sources_non_forked/snipmate-snippets/javascript/timeout.snippet +++ /dev/null @@ -1 +0,0 @@ -setTimeout(function() { ${1} }, ${2:10}); diff --git a/sources_non_forked/snipmate-snippets/objc/I.snippet b/sources_non_forked/snipmate-snippets/objc/I.snippet deleted file mode 100644 index 0032f65f..00000000 --- a/sources_non_forked/snipmate-snippets/objc/I.snippet +++ /dev/null @@ -1,6 +0,0 @@ -+ (void) initialize -{ - [[NSUserDefaults standardUserDefaults] registerDefaults:[NSDictionary dictionaryWIthObjectsAndKeys: - ${1}@"value", @"key", - nil]]; -} diff --git a/sources_non_forked/snipmate-snippets/objc/Imp.snippet b/sources_non_forked/snipmate-snippets/objc/Imp.snippet deleted file mode 100644 index 91724d3f..00000000 --- a/sources_non_forked/snipmate-snippets/objc/Imp.snippet +++ /dev/null @@ -1 +0,0 @@ -#import "${1:`Filename()`.h}"${2} diff --git a/sources_non_forked/snipmate-snippets/objc/alloc.snippet b/sources_non_forked/snipmate-snippets/objc/alloc.snippet deleted file mode 100644 index e4d15993..00000000 --- a/sources_non_forked/snipmate-snippets/objc/alloc.snippet +++ /dev/null @@ -1 +0,0 @@ -[[${1:foo} alloc] init]${2};${3} diff --git a/sources_non_forked/snipmate-snippets/objc/array.snippet b/sources_non_forked/snipmate-snippets/objc/array.snippet deleted file mode 100644 index 45d3ef01..00000000 --- a/sources_non_forked/snipmate-snippets/objc/array.snippet +++ /dev/null @@ -1 +0,0 @@ -NSMutableArray *${1:array} = [NSMutable array];${2} diff --git a/sources_non_forked/snipmate-snippets/objc/bez.snippet b/sources_non_forked/snipmate-snippets/objc/bez.snippet deleted file mode 100644 index 493aff69..00000000 --- a/sources_non_forked/snipmate-snippets/objc/bez.snippet +++ /dev/null @@ -1 +0,0 @@ -NSBezierPath *${1:path} = [NSBezierPath bezierPath];${2} diff --git a/sources_non_forked/snipmate-snippets/objc/cat.snippet b/sources_non_forked/snipmate-snippets/objc/cat.snippet deleted file mode 100644 index fd57aae3..00000000 --- a/sources_non_forked/snipmate-snippets/objc/cat.snippet +++ /dev/null @@ -1,6 +0,0 @@ -@interface ${1:NSObject} (${2:Category}) -@end - -@implementation $1 ($2) -${3} -@end diff --git a/sources_non_forked/snipmate-snippets/objc/cati.snippet b/sources_non_forked/snipmate-snippets/objc/cati.snippet deleted file mode 100644 index d2852600..00000000 --- a/sources_non_forked/snipmate-snippets/objc/cati.snippet +++ /dev/null @@ -1,3 +0,0 @@ -@interface ${1:NSObject} (${2:Category}) -${3} -@end diff --git a/sources_non_forked/snipmate-snippets/objc/cli.snippet b/sources_non_forked/snipmate-snippets/objc/cli.snippet deleted file mode 100644 index fa896224..00000000 --- a/sources_non_forked/snipmate-snippets/objc/cli.snippet +++ /dev/null @@ -1,5 +0,0 @@ -@interface ${1:ClassName} : ${2:NSObject} -{${3} -} -${4} -@end diff --git a/sources_non_forked/snipmate-snippets/objc/dict.snippet b/sources_non_forked/snipmate-snippets/objc/dict.snippet deleted file mode 100644 index 8b2d7e90..00000000 --- a/sources_non_forked/snipmate-snippets/objc/dict.snippet +++ /dev/null @@ -1 +0,0 @@ -NSMutableDictionary *${1:dict} = [NSMutableDictionary dictionary];${2} diff --git a/sources_non_forked/snipmate-snippets/objc/forarray.snippet b/sources_non_forked/snipmate-snippets/objc/forarray.snippet deleted file mode 100644 index d32215d0..00000000 --- a/sources_non_forked/snipmate-snippets/objc/forarray.snippet +++ /dev/null @@ -1,7 +0,0 @@ -unsigned int ${1:object}Count = [${2:array} count]; - -for (unsigned int index = 0; index < $1Count; index++) -{ - ${3:id} $1 = [$2 $1AtIndex:index]; - ${4} -} diff --git a/sources_non_forked/snipmate-snippets/objc/log.snippet b/sources_non_forked/snipmate-snippets/objc/log.snippet deleted file mode 100644 index 69f9c067..00000000 --- a/sources_non_forked/snipmate-snippets/objc/log.snippet +++ /dev/null @@ -1 +0,0 @@ -NSLog(@"${1}"${2});${3} diff --git a/sources_non_forked/snipmate-snippets/objc/m/class method.snippet b/sources_non_forked/snipmate-snippets/objc/m/class method.snippet deleted file mode 100644 index 191ee160..00000000 --- a/sources_non_forked/snipmate-snippets/objc/m/class method.snippet +++ /dev/null @@ -1,4 +0,0 @@ -+ (${1:id}) ${2:method} -{${3} - return nil; -} diff --git a/sources_non_forked/snipmate-snippets/objc/m/method.snippet b/sources_non_forked/snipmate-snippets/objc/m/method.snippet deleted file mode 100644 index 9f7390e2..00000000 --- a/sources_non_forked/snipmate-snippets/objc/m/method.snippet +++ /dev/null @@ -1,4 +0,0 @@ -- (${1:id}) ${2:method} -{${3} - ${4:return nil;} -} diff --git a/sources_non_forked/snipmate-snippets/objc/objacc.snippet b/sources_non_forked/snipmate-snippets/objc/objacc.snippet deleted file mode 100644 index 840ebfd0..00000000 --- a/sources_non_forked/snipmate-snippets/objc/objacc.snippet +++ /dev/null @@ -1,11 +0,0 @@ -- (${1:id})${2:thing} -{ - return $2; -} - -- (void) set$2:($1) -{ - $1 old$2 = $2; - $2 = [aValue retain]; - [old$2 release]; -} diff --git a/sources_non_forked/snipmate-snippets/objc/objc.snippet b/sources_non_forked/snipmate-snippets/objc/objc.snippet deleted file mode 100644 index d6671487..00000000 --- a/sources_non_forked/snipmate-snippets/objc/objc.snippet +++ /dev/null @@ -1,14 +0,0 @@ -@interface ${1:`Filename('', 'object')`} : ${2:NSObject} -{ -} -@end - -@implementation $1 -- (id) init -{ - if (self = [super init]) - {${3} - } - return self -} -@end diff --git a/sources_non_forked/snipmate-snippets/objc/prop.snippet b/sources_non_forked/snipmate-snippets/objc/prop.snippet deleted file mode 100644 index d77495a6..00000000 --- a/sources_non_forked/snipmate-snippets/objc/prop.snippet +++ /dev/null @@ -1 +0,0 @@ -@property (${1:retain}) ${2:NSSomeClass} *${3:$2};${4} diff --git a/sources_non_forked/snipmate-snippets/objc/rel.snippet b/sources_non_forked/snipmate-snippets/objc/rel.snippet deleted file mode 100644 index 5dea04dd..00000000 --- a/sources_non_forked/snipmate-snippets/objc/rel.snippet +++ /dev/null @@ -1 +0,0 @@ -[${1:foo} release];${2} diff --git a/sources_non_forked/snipmate-snippets/objc/ret.snippet b/sources_non_forked/snipmate-snippets/objc/ret.snippet deleted file mode 100644 index ee8eba46..00000000 --- a/sources_non_forked/snipmate-snippets/objc/ret.snippet +++ /dev/null @@ -1 +0,0 @@ -[${1:foo} retain];${2} diff --git a/sources_non_forked/snipmate-snippets/objc/sel.snippet b/sources_non_forked/snipmate-snippets/objc/sel.snippet deleted file mode 100644 index 4d4996d1..00000000 --- a/sources_non_forked/snipmate-snippets/objc/sel.snippet +++ /dev/null @@ -1 +0,0 @@ -@selector(${1:method}:)${2} diff --git a/sources_non_forked/snipmate-snippets/objc/sm.snippet b/sources_non_forked/snipmate-snippets/objc/sm.snippet deleted file mode 100644 index af139a90..00000000 --- a/sources_non_forked/snipmate-snippets/objc/sm.snippet +++ /dev/null @@ -1,5 +0,0 @@ -- (${1:id}) ${2:method}:(${3:id})${4:anArgument} -{ - $1 res = [super $2:$4];${5} - return res; -} diff --git a/sources_non_forked/snipmate-snippets/objc/syn.snippet b/sources_non_forked/snipmate-snippets/objc/syn.snippet deleted file mode 100644 index eef7581c..00000000 --- a/sources_non_forked/snipmate-snippets/objc/syn.snippet +++ /dev/null @@ -1 +0,0 @@ -@synthesize ${1:NSSomeClass};${2} diff --git a/sources_non_forked/snipmate-snippets/php/array.snippet b/sources_non_forked/snipmate-snippets/php/array.snippet deleted file mode 100644 index 922542e0..00000000 --- a/sources_non_forked/snipmate-snippets/php/array.snippet +++ /dev/null @@ -1 +0,0 @@ -$${1:arrayName} = array('${2}' => ${3});${4} diff --git a/sources_non_forked/snipmate-snippets/php/case.snippet b/sources_non_forked/snipmate-snippets/php/case.snippet deleted file mode 100644 index 8f9e4daf..00000000 --- a/sources_non_forked/snipmate-snippets/php/case.snippet +++ /dev/null @@ -1,3 +0,0 @@ -case '${1:value}': - ${2:// code...} - break;${3} diff --git a/sources_non_forked/snipmate-snippets/php/class.snippet b/sources_non_forked/snipmate-snippets/php/class.snippet deleted file mode 100644 index 4929a955..00000000 --- a/sources_non_forked/snipmate-snippets/php/class.snippet +++ /dev/null @@ -1,11 +0,0 @@ -/** - * ${1} - */ -class ${2:ClassName} -{ - ${3} - function ${4:__construct}(${5:argument}) - { - ${6:// code...} - } -} diff --git a/sources_non_forked/snipmate-snippets/php/classe.snippet b/sources_non_forked/snipmate-snippets/php/classe.snippet deleted file mode 100644 index 2f2b0bc3..00000000 --- a/sources_non_forked/snipmate-snippets/php/classe.snippet +++ /dev/null @@ -1,12 +0,0 @@ -/** - * ${1} - */ -class ${2:ClassName} extends ${3:AnotherClass} -{ - ${4} - function ${5:__construct}(${6:argument}) - { - ${7:// code...} - } -} - diff --git a/sources_non_forked/snipmate-snippets/php/def.snippet b/sources_non_forked/snipmate-snippets/php/def.snippet deleted file mode 100644 index df0f5ebd..00000000 --- a/sources_non_forked/snipmate-snippets/php/def.snippet +++ /dev/null @@ -1 +0,0 @@ -define('${1}'${2});${3} diff --git a/sources_non_forked/snipmate-snippets/php/defd.snippet b/sources_non_forked/snipmate-snippets/php/defd.snippet deleted file mode 100644 index 6758cdad..00000000 --- a/sources_non_forked/snipmate-snippets/php/defd.snippet +++ /dev/null @@ -1 +0,0 @@ -${1}defined('${2}')${3} diff --git a/sources_non_forked/snipmate-snippets/php/do.snippet b/sources_non_forked/snipmate-snippets/php/do.snippet deleted file mode 100644 index e7dd5b06..00000000 --- a/sources_non_forked/snipmate-snippets/php/do.snippet +++ /dev/null @@ -1,3 +0,0 @@ -do { - ${2:// code... } -} while (${1:/* condition */});" diff --git a/sources_non_forked/snipmate-snippets/php/doc_cp.snippet b/sources_non_forked/snipmate-snippets/php/doc_cp.snippet deleted file mode 100644 index d6d1b3fc..00000000 --- a/sources_non_forked/snipmate-snippets/php/doc_cp.snippet +++ /dev/null @@ -1,6 +0,0 @@ -/** - * ${1:undocumented class} - * - * @package ${2:default} - * @author ${3:`g:snips_author`} - **/${4} diff --git a/sources_non_forked/snipmate-snippets/php/doc_f.snippet b/sources_non_forked/snipmate-snippets/php/doc_f.snippet deleted file mode 100644 index a9adbb07..00000000 --- a/sources_non_forked/snipmate-snippets/php/doc_f.snippet +++ /dev/null @@ -1,8 +0,0 @@ -/** - * $2 - * @return ${4:void} - * @author ${5:`g:snips_author`} - **/ -${1:public }function ${2:someFunc}(${3}) -{${6} -} diff --git a/sources_non_forked/snipmate-snippets/php/doc_h.snippet b/sources_non_forked/snipmate-snippets/php/doc_h.snippet deleted file mode 100644 index a0c12e01..00000000 --- a/sources_non_forked/snipmate-snippets/php/doc_h.snippet +++ /dev/null @@ -1,10 +0,0 @@ -/** - * ${1} - * - * @author ${2:`g:snips_author`} - * @version ${3:$Id$} - * @copyright ${4:$2}, `strftime('%d %B, %Y')` - * @package ${5:default} - **/ -/** - * Define DocBlock *// diff --git a/sources_non_forked/snipmate-snippets/php/doc_i.snippet b/sources_non_forked/snipmate-snippets/php/doc_i.snippet deleted file mode 100644 index e62eab72..00000000 --- a/sources_non_forked/snipmate-snippets/php/doc_i.snippet +++ /dev/null @@ -1,8 +0,0 @@ -/** - * $1 - * @package ${2:default} - * @author ${3:`g:snips_author`} - **/ -interface ${1:someClass} -{${4} -} // END interface $1" diff --git a/sources_non_forked/snipmate-snippets/php/ec.snippet b/sources_non_forked/snipmate-snippets/php/ec.snippet deleted file mode 100644 index 489d759b..00000000 --- a/sources_non_forked/snipmate-snippets/php/ec.snippet +++ /dev/null @@ -1 +0,0 @@ -echo "${1:string}"${2}; diff --git a/sources_non_forked/snipmate-snippets/php/else.snippet b/sources_non_forked/snipmate-snippets/php/else.snippet deleted file mode 100644 index b910e982..00000000 --- a/sources_non_forked/snipmate-snippets/php/else.snippet +++ /dev/null @@ -1,3 +0,0 @@ -else { - ${1:// code...} -} diff --git a/sources_non_forked/snipmate-snippets/php/elseif.snippet b/sources_non_forked/snipmate-snippets/php/elseif.snippet deleted file mode 100644 index a57dec80..00000000 --- a/sources_non_forked/snipmate-snippets/php/elseif.snippet +++ /dev/null @@ -1,3 +0,0 @@ -elseif (${1:/* condition */}) { - ${2:// code...} -} diff --git a/sources_non_forked/snipmate-snippets/php/for.snippet b/sources_non_forked/snipmate-snippets/php/for.snippet deleted file mode 100644 index e9bc52aa..00000000 --- a/sources_non_forked/snipmate-snippets/php/for.snippet +++ /dev/null @@ -1,3 +0,0 @@ -for ($${2:i} = 0; $$2 < ${1:count}; $$2${3:++}) { - ${4:// code...} -} diff --git a/sources_non_forked/snipmate-snippets/php/foreach.snippet b/sources_non_forked/snipmate-snippets/php/foreach.snippet deleted file mode 100644 index 5fe47e5b..00000000 --- a/sources_non_forked/snipmate-snippets/php/foreach.snippet +++ /dev/null @@ -1,3 +0,0 @@ -foreach ($${1:variable} as $${2:key}){ - ${3:// code...} -} diff --git a/sources_non_forked/snipmate-snippets/php/foreachk.snippet b/sources_non_forked/snipmate-snippets/php/foreachk.snippet deleted file mode 100644 index f78d57ae..00000000 --- a/sources_non_forked/snipmate-snippets/php/foreachk.snippet +++ /dev/null @@ -1,3 +0,0 @@ -foreach ($${1:variable} as $${2:key} => $${3:value}){ - ${4:// code...} -} diff --git a/sources_non_forked/snipmate-snippets/php/fun.snippet b/sources_non_forked/snipmate-snippets/php/fun.snippet deleted file mode 100644 index 0f5d3534..00000000 --- a/sources_non_forked/snipmate-snippets/php/fun.snippet +++ /dev/null @@ -1,4 +0,0 @@ -${1:public }function ${2:FunctionName}(${3}) -{ - ${4:// code...} -} diff --git a/sources_non_forked/snipmate-snippets/php/get.snippet b/sources_non_forked/snipmate-snippets/php/get.snippet deleted file mode 100644 index af32e0a5..00000000 --- a/sources_non_forked/snipmate-snippets/php/get.snippet +++ /dev/null @@ -1 +0,0 @@ -$_GET['${1}']${2} diff --git a/sources_non_forked/snipmate-snippets/php/globals.snippet b/sources_non_forked/snipmate-snippets/php/globals.snippet deleted file mode 100644 index 6f5b04f3..00000000 --- a/sources_non_forked/snipmate-snippets/php/globals.snippet +++ /dev/null @@ -1 +0,0 @@ -$GLOBALS['${1:variable}']${2: = }${3:something}${4:;}${5} diff --git a/sources_non_forked/snipmate-snippets/php/if.snippet b/sources_non_forked/snipmate-snippets/php/if.snippet deleted file mode 100644 index 69ac0bd6..00000000 --- a/sources_non_forked/snipmate-snippets/php/if.snippet +++ /dev/null @@ -1,3 +0,0 @@ -if (${1:/* condition */}) { - ${2:// code...} -} diff --git a/sources_non_forked/snipmate-snippets/php/ife.snippet b/sources_non_forked/snipmate-snippets/php/ife.snippet deleted file mode 100644 index b8621c1b..00000000 --- a/sources_non_forked/snipmate-snippets/php/ife.snippet +++ /dev/null @@ -1,4 +0,0 @@ -if (${1:/* condition */}) { - ${2:// code...} -} else { -} diff --git a/sources_non_forked/snipmate-snippets/php/inc.snippet b/sources_non_forked/snipmate-snippets/php/inc.snippet deleted file mode 100644 index 8df3966c..00000000 --- a/sources_non_forked/snipmate-snippets/php/inc.snippet +++ /dev/null @@ -1 +0,0 @@ -include '${1:file}';${2} diff --git a/sources_non_forked/snipmate-snippets/php/inc1.snippet b/sources_non_forked/snipmate-snippets/php/inc1.snippet deleted file mode 100644 index ba262818..00000000 --- a/sources_non_forked/snipmate-snippets/php/inc1.snippet +++ /dev/null @@ -1 +0,0 @@ -include_once '${1:file}';${2} diff --git a/sources_non_forked/snipmate-snippets/php/log.snippet b/sources_non_forked/snipmate-snippets/php/log.snippet deleted file mode 100644 index 2b8dcc4b..00000000 --- a/sources_non_forked/snipmate-snippets/php/log.snippet +++ /dev/null @@ -1 +0,0 @@ -error_log(var_export(${1}, true));${2} diff --git a/sources_non_forked/snipmate-snippets/php/php.snippet b/sources_non_forked/snipmate-snippets/php/php.snippet deleted file mode 100644 index ed2ed1ce..00000000 --- a/sources_non_forked/snipmate-snippets/php/php.snippet +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/sources_non_forked/snipmate-snippets/php/post.snippet b/sources_non_forked/snipmate-snippets/php/post.snippet deleted file mode 100644 index 2de7aa5f..00000000 --- a/sources_non_forked/snipmate-snippets/php/post.snippet +++ /dev/null @@ -1 +0,0 @@ -$_POST['${1}']${2} diff --git a/sources_non_forked/snipmate-snippets/php/req.snippet b/sources_non_forked/snipmate-snippets/php/req.snippet deleted file mode 100644 index c03ea36f..00000000 --- a/sources_non_forked/snipmate-snippets/php/req.snippet +++ /dev/null @@ -1 +0,0 @@ -require '${1:file}';${2} diff --git a/sources_non_forked/snipmate-snippets/php/req1.snippet b/sources_non_forked/snipmate-snippets/php/req1.snippet deleted file mode 100644 index e909c3bc..00000000 --- a/sources_non_forked/snipmate-snippets/php/req1.snippet +++ /dev/null @@ -1 +0,0 @@ -require_once '${1:file}';${2} diff --git a/sources_non_forked/snipmate-snippets/php/request.snippet b/sources_non_forked/snipmate-snippets/php/request.snippet deleted file mode 100644 index 9a839b1b..00000000 --- a/sources_non_forked/snipmate-snippets/php/request.snippet +++ /dev/null @@ -1 +0,0 @@ -$_REQUEST['${1}']${2} diff --git a/sources_non_forked/snipmate-snippets/php/session.snippet b/sources_non_forked/snipmate-snippets/php/session.snippet deleted file mode 100644 index 5e3e11b9..00000000 --- a/sources_non_forked/snipmate-snippets/php/session.snippet +++ /dev/null @@ -1 +0,0 @@ -$_SESSION['${1}']${2} diff --git a/sources_non_forked/snipmate-snippets/php/switch.snippet b/sources_non_forked/snipmate-snippets/php/switch.snippet deleted file mode 100644 index 7fc47c63..00000000 --- a/sources_non_forked/snipmate-snippets/php/switch.snippet +++ /dev/null @@ -1,9 +0,0 @@ -switch ($${1:variable}) { - case '${2:value}': - ${3:// code...} - break; - ${5} - default: - ${4:// code...} - break; -} diff --git a/sources_non_forked/snipmate-snippets/php/t.snippet b/sources_non_forked/snipmate-snippets/php/t.snippet deleted file mode 100644 index e8deae52..00000000 --- a/sources_non_forked/snipmate-snippets/php/t.snippet +++ /dev/null @@ -1 +0,0 @@ -$${1:retVal} = (${2:condition}) ? ${3:a} : ${4:b};${5} diff --git a/sources_non_forked/snipmate-snippets/php/try.snippet b/sources_non_forked/snipmate-snippets/php/try.snippet deleted file mode 100644 index 66a7f651..00000000 --- a/sources_non_forked/snipmate-snippets/php/try.snippet +++ /dev/null @@ -1,6 +0,0 @@ -try { - ${1:// code...} -} catch (${2:Exception} $e) { - ${3:// code...} -} - diff --git a/sources_non_forked/snipmate-snippets/php/var.snippet b/sources_non_forked/snipmate-snippets/php/var.snippet deleted file mode 100644 index 1f8cd08e..00000000 --- a/sources_non_forked/snipmate-snippets/php/var.snippet +++ /dev/null @@ -1 +0,0 @@ -var_export(${1});${2} diff --git a/sources_non_forked/snipmate-snippets/php/wh.snippet b/sources_non_forked/snipmate-snippets/php/wh.snippet deleted file mode 100644 index 36ae0ffc..00000000 --- a/sources_non_forked/snipmate-snippets/php/wh.snippet +++ /dev/null @@ -1,3 +0,0 @@ -while (${1:/* condition */}) { - ${2:// code...} -} diff --git a/sources_non_forked/snipmate-snippets/po/msg.snippet b/sources_non_forked/snipmate-snippets/po/msg.snippet deleted file mode 100644 index 2ad6638a..00000000 --- a/sources_non_forked/snipmate-snippets/po/msg.snippet +++ /dev/null @@ -1,2 +0,0 @@ -msgid "${1}" -msgstr "${2}"${3} diff --git a/sources_non_forked/snipmate-snippets/python/class.snippet b/sources_non_forked/snipmate-snippets/python/class.snippet deleted file mode 100644 index d9e2b8e8..00000000 --- a/sources_non_forked/snipmate-snippets/python/class.snippet +++ /dev/null @@ -1,2 +0,0 @@ -class ${1:``Snippet_PythonClassNameFromFilename()``}(${2:data}): -${3} diff --git a/sources_non_forked/snipmate-snippets/python/def.snippet b/sources_non_forked/snipmate-snippets/python/def.snippet deleted file mode 100644 index c7cc9d38..00000000 --- a/sources_non_forked/snipmate-snippets/python/def.snippet +++ /dev/null @@ -1,2 +0,0 @@ -def ${1:name}(${2:data}): -${3} diff --git a/sources_non_forked/snipmate-snippets/python/for.snippet b/sources_non_forked/snipmate-snippets/python/for.snippet deleted file mode 100644 index fb69c05f..00000000 --- a/sources_non_forked/snipmate-snippets/python/for.snippet +++ /dev/null @@ -1,3 +0,0 @@ -for ${1:var} in ${2:type}: -${3:pass} -${4} diff --git a/sources_non_forked/snipmate-snippets/python/from.snippet b/sources_non_forked/snipmate-snippets/python/from.snippet deleted file mode 100644 index 98d0d825..00000000 --- a/sources_non_forked/snipmate-snippets/python/from.snippet +++ /dev/null @@ -1,2 +0,0 @@ -from ${1:module} import ${2:name} -${3} diff --git a/sources_non_forked/snipmate-snippets/python/get.snippet b/sources_non_forked/snipmate-snippets/python/get.snippet deleted file mode 100644 index bc0bf63d..00000000 --- a/sources_non_forked/snipmate-snippets/python/get.snippet +++ /dev/null @@ -1,3 +0,0 @@ -def get_${1:name}(self): -return self._$1 -${2} diff --git a/sources_non_forked/snipmate-snippets/python/ifmain.snippet b/sources_non_forked/snipmate-snippets/python/ifmain.snippet deleted file mode 100644 index f6e7a262..00000000 --- a/sources_non_forked/snipmate-snippets/python/ifmain.snippet +++ /dev/null @@ -1,2 +0,0 @@ -if __name__ == '__main__': -${1} diff --git a/sources_non_forked/snipmate-snippets/python/import.snippet b/sources_non_forked/snipmate-snippets/python/import.snippet deleted file mode 100644 index 58c9acdc..00000000 --- a/sources_non_forked/snipmate-snippets/python/import.snippet +++ /dev/null @@ -1,2 +0,0 @@ -import ${1:module} -${2} diff --git a/sources_non_forked/snipmate-snippets/python/init.snippet b/sources_non_forked/snipmate-snippets/python/init.snippet deleted file mode 100644 index c1a4f0fa..00000000 --- a/sources_non_forked/snipmate-snippets/python/init.snippet +++ /dev/null @@ -1,2 +0,0 @@ -def __init__(self, ${1:args}): -${2} diff --git a/sources_non_forked/snipmate-snippets/python/set.snippet b/sources_non_forked/snipmate-snippets/python/set.snippet deleted file mode 100644 index 6ab0b5aa..00000000 --- a/sources_non_forked/snipmate-snippets/python/set.snippet +++ /dev/null @@ -1 +0,0 @@ -def set_${1:name}(self, ${2:value}): diff --git a/sources_non_forked/snipmate-snippets/python/try.snippet b/sources_non_forked/snipmate-snippets/python/try.snippet deleted file mode 100644 index fd5f6e59..00000000 --- a/sources_non_forked/snipmate-snippets/python/try.snippet +++ /dev/null @@ -1,4 +0,0 @@ -try: -${1} -except ${2:Exception} -${3} diff --git a/sources_non_forked/snipmate-snippets/ruby-factorygirl/fac.snippet b/sources_non_forked/snipmate-snippets/ruby-factorygirl/fac.snippet deleted file mode 100644 index 05cc3e8e..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-factorygirl/fac.snippet +++ /dev/null @@ -1 +0,0 @@ -Factory(:${1}, ${2})${3} diff --git a/sources_non_forked/snipmate-snippets/ruby-factorygirl/facb.snippet b/sources_non_forked/snipmate-snippets/ruby-factorygirl/facb.snippet deleted file mode 100644 index 299c0335..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-factorygirl/facb.snippet +++ /dev/null @@ -1 +0,0 @@ -Factory.build(:${1}, ${2})${3} diff --git a/sources_non_forked/snipmate-snippets/ruby-factorygirl/facd.snippet b/sources_non_forked/snipmate-snippets/ruby-factorygirl/facd.snippet deleted file mode 100644 index 41d1503c..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-factorygirl/facd.snippet +++ /dev/null @@ -1,4 +0,0 @@ -Factory.define(:${1:model}) do |${2:f}| - ${3} -end -${4} diff --git a/sources_non_forked/snipmate-snippets/ruby-factorygirl/facn.snippet b/sources_non_forked/snipmate-snippets/ruby-factorygirl/facn.snippet deleted file mode 100644 index 7232308c..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-factorygirl/facn.snippet +++ /dev/null @@ -1 +0,0 @@ -Factory.next(:${1:sequence-name})${2} diff --git a/sources_non_forked/snipmate-snippets/ruby-factorygirl/facs.snippet b/sources_non_forked/snipmate-snippets/ruby-factorygirl/facs.snippet deleted file mode 100644 index 13fd5b9d..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-factorygirl/facs.snippet +++ /dev/null @@ -1,4 +0,0 @@ -Factory.sequence :${1:sequence-name} do |${2:m}| - ${3} -end -${4} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/art.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/art.snippet deleted file mode 100644 index a5a7d34e..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/art.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_redirected_to ${1::action => "${2:index}"} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/artnp.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/artnp.snippet deleted file mode 100644 index 2c9bfef0..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/artnp.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_redirected_to <+<+parent+>_<+child+>_path(<+@<+parent+>+>, <+@<+child+>+>)+> diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/artnpp.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/artnpp.snippet deleted file mode 100644 index becd79b5..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/artnpp.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_redirected_to <+<+parent+>_<+child+>_path(<+@<+parent+>+>)+> diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/artp.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/artp.snippet deleted file mode 100644 index 55b9204a..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/artp.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_redirected_to <+<+model+>_path(<+@<+model+>+>)+> diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/artpp.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/artpp.snippet deleted file mode 100644 index 1d1d203d..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/artpp.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_redirected_to <+<+model+>s_path+> diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/asd.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/asd.snippet deleted file mode 100644 index 35ab7301..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/asd.snippet +++ /dev/null @@ -1,3 +0,0 @@ -assert_difference "${1:Model}.${2:count}", $1 do - ${3} -end diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/asnd.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/asnd.snippet deleted file mode 100644 index c5124e04..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/asnd.snippet +++ /dev/null @@ -1,3 +0,0 @@ -assert_no_difference "${1:Model}.${2:count}" do - ${3} -end diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/asre.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/asre.snippet deleted file mode 100644 index d0ac6b26..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/asre.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_response :${1:success}, @response.body${2} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/asrj.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/asrj.snippet deleted file mode 100644 index 6ee13f2d..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/asrj.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_rjs :<+replace+>, <+"<+dom id+>"+> diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/ass.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/ass.snippet deleted file mode 100644 index 4cc696f6..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/ass.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_select '<+path+>'<+, :<+text+> => <+'<+inner_html+>'+>+> <+do<++>+> diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/bf.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/bf.snippet deleted file mode 100644 index ad25cc90..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/bf.snippet +++ /dev/null @@ -1 +0,0 @@ -before_filter :${1:method} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/bt.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/bt.snippet deleted file mode 100644 index b28e1e62..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/bt.snippet +++ /dev/null @@ -1 +0,0 @@ -belongs_to :${1:association} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/crw.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/crw.snippet deleted file mode 100644 index 3b1ab619..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/crw.snippet +++ /dev/null @@ -1 +0,0 @@ -cattr_accessor :${1:attr_names} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/defcreate.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/defcreate.snippet deleted file mode 100644 index e878d3a6..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/defcreate.snippet +++ /dev/null @@ -1,14 +0,0 @@ -def create - @${1:model_class_name} = ${2:ModelClassName}.new(params[:$1]) - - respond_to do |wants| - if @$1.save - flash[:notice] = '$2 was successfully created.' - wants.html { redirect_to(@$1) } - wants.xml { render :xml => @$1, :status => :created, :location => @$1 } - else - wants.html { render :action => "new" } - wants.xml { render :xml => @$1.errors, :status => :unprocessable_entity } - end - end -end${3} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/defdestroy.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/defdestroy.snippet deleted file mode 100644 index 9c340808..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/defdestroy.snippet +++ /dev/null @@ -1,9 +0,0 @@ -def destroy - @${1:model_class_name} = ${2:ModelClassName}.find(params[:id]) - @$1.destroy - - respond_to do |wants| - wants.html { redirect_to($1s_url) } - wants.xml { head :ok } - end -end${3} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/defedit.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/defedit.snippet deleted file mode 100644 index 0e80dcb8..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/defedit.snippet +++ /dev/null @@ -1,3 +0,0 @@ -def edit - @${1:model_class_name} = ${2:ModelClassName}.find(params[:id]) -end diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/defindex.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/defindex.snippet deleted file mode 100644 index aa776f9a..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/defindex.snippet +++ /dev/null @@ -1,8 +0,0 @@ -def index - @${1:model_class_name} = ${2:ModelClassName}.all - - respond_to do |wants| - wants.html # index.html.erb - wants.xml { render :xml => @$1s } - end -end${3} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/defnew.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/defnew.snippet deleted file mode 100644 index 0a4762b9..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/defnew.snippet +++ /dev/null @@ -1,8 +0,0 @@ -def new - @${1:model_class_name} = ${2:ModelClassName}.new - - respond_to do |wants| - wants.html # new.html.erb - wants.xml { render :xml => @$1 } - end -end${3} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/defshow.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/defshow.snippet deleted file mode 100644 index ba745d52..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/defshow.snippet +++ /dev/null @@ -1,8 +0,0 @@ -def show - @${1:model_class_name} = ${2:ModelClassName}.find(params[:id]) - - respond_to do |wants| - wants.html # show.html.erb - wants.xml { render :xml => @$1 } - end -end${3} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/defupdate.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/defupdate.snippet deleted file mode 100644 index 0556895c..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/defupdate.snippet +++ /dev/null @@ -1,14 +0,0 @@ -def update - @${1:model_class_name} = ${2:ModelClassName}.find(params[:id]) - - respond_to do |wants| - if @$1.update_attributes(params[:$1]) - flash[:notice] = '$2 was successfully updated.' - wants.html { redirect_to(@$1) } - wants.xml { head :ok } - else - wants.html { render :action => "edit" } - wants.xml { render :xml => @$1.errors, :status => :unprocessable_entity } - end - end -end${3} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/fina.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/fina.snippet deleted file mode 100644 index af5ec413..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/fina.snippet +++ /dev/null @@ -1 +0,0 @@ -find(:all<+, :conditions => ['<+<+field+> = ?+>', <+true+>]+>) diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/finf.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/finf.snippet deleted file mode 100644 index 24ba2da3..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/finf.snippet +++ /dev/null @@ -1 +0,0 @@ -find(:first<+, :conditions => ['<+<+field+> = ?+>', <+true+>]+>) diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/fini.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/fini.snippet deleted file mode 100644 index 96d68a5f..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/fini.snippet +++ /dev/null @@ -1 +0,0 @@ -find(<+id+>) diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/finl.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/finl.snippet deleted file mode 100644 index 7ee6efec..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/finl.snippet +++ /dev/null @@ -1 +0,0 @@ -find(:last<+, :conditions => ['<+<+field+> = ?+>', <+true+>]+>) diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/flash.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/flash.snippet deleted file mode 100644 index 2a069307..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/flash.snippet +++ /dev/null @@ -1 +0,0 @@ -flash[:${1:notice}] = "${2}" diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/habtm.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/habtm.snippet deleted file mode 100644 index 1b27396a..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/habtm.snippet +++ /dev/null @@ -1 +0,0 @@ -has_and_belongs_to_many :${1:object}, :join_table => "${2:table_name}", :foreign_key => "${3}_id"${4} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/hm.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/hm.snippet deleted file mode 100644 index 9204df56..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/hm.snippet +++ /dev/null @@ -1 +0,0 @@ -has_many :${1:object} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/hmd.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/hmd.snippet deleted file mode 100644 index 6aadd73b..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/hmd.snippet +++ /dev/null @@ -1 +0,0 @@ -has_many :<+object+>s<+, :class_name => "<+object+>", :foreign_key => "<+reference+>_id"+>, :dependent => :destroy<++> diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/hmt.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/hmt.snippet deleted file mode 100644 index 4128e037..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/hmt.snippet +++ /dev/null @@ -1 +0,0 @@ -has_many :${1:object}, :through => :${2:object} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/ho.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/ho.snippet deleted file mode 100644 index 77e14e7a..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/ho.snippet +++ /dev/null @@ -1 +0,0 @@ -has_one :${1:object} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/i18.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/i18.snippet deleted file mode 100644 index 2a30fae0..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/i18.snippet +++ /dev/null @@ -1 +0,0 @@ -I18n.t('${1:type.key}')${2} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/ist.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/ist.snippet deleted file mode 100644 index d97d4829..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/ist.snippet +++ /dev/null @@ -1 +0,0 @@ -<%= image_submit_tag("<+agree.png+>"<+<+, :id => "<+id+>"+><+, :name => "<+name+>"+><+, :class => "<+class+>"+><+, :disabled => <+false+>+>+>) %> diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/log.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/log.snippet deleted file mode 100644 index 53360dd5..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/log.snippet +++ /dev/null @@ -1 +0,0 @@ -RAILS_DEFAULT_LOGGER.${1:debug} ${2} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/logd.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/logd.snippet deleted file mode 100644 index 36236a31..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/logd.snippet +++ /dev/null @@ -1 +0,0 @@ -logger.debug { "${1:message}" }${2} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/loge.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/loge.snippet deleted file mode 100644 index 4417ad2e..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/loge.snippet +++ /dev/null @@ -1 +0,0 @@ -logger.error { "${1:message}" }${2} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/logf.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/logf.snippet deleted file mode 100644 index 1bd419c8..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/logf.snippet +++ /dev/null @@ -1 +0,0 @@ -logger.fatal { "${1:message}" }${2} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/logi.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/logi.snippet deleted file mode 100644 index bf508dc1..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/logi.snippet +++ /dev/null @@ -1 +0,0 @@ -logger.info { "${1:message}" }${2} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/logw.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/logw.snippet deleted file mode 100644 index 447f6886..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/logw.snippet +++ /dev/null @@ -1 +0,0 @@ -logger.warn { "${1:message}" }${2} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/mac.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/mac.snippet deleted file mode 100644 index 548d4af0..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/mac.snippet +++ /dev/null @@ -1 +0,0 @@ -add_column :${1:table}, :${2:column}, :${3:type} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/mapc.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/mapc.snippet deleted file mode 100644 index b14ec4ca..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/mapc.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:map}.${2:connect} '${3:controller/:action/:id}' diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/mapca.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/mapca.snippet deleted file mode 100644 index 9292ffe9..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/mapca.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:map}.catch_all "*${2:anything}", :controller => "${3:default}", :action => "${4:error}"${5} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/mapr.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/mapr.snippet deleted file mode 100644 index 424805b7..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/mapr.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:map}.resource :${2:resource} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/maprs.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/maprs.snippet deleted file mode 100644 index a18c4df3..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/maprs.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:map}.resources :${2:resource} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/mapwo.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/mapwo.snippet deleted file mode 100644 index b3cf7911..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/mapwo.snippet +++ /dev/null @@ -1,3 +0,0 @@ -${1:map}.with_options :${2:controller} => '${3:thing}' do |$3| - ${4} -end diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/mbs.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/mbs.snippet deleted file mode 100644 index a3b34bb3..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/mbs.snippet +++ /dev/null @@ -1 +0,0 @@ -before_save :${1:method} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/mcc.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/mcc.snippet deleted file mode 100644 index 74dc7af0..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/mcc.snippet +++ /dev/null @@ -1 +0,0 @@ -change_column :${1:table}, :${2:column}, :${3:type} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/mccc.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/mccc.snippet deleted file mode 100644 index 2915a37f..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/mccc.snippet +++ /dev/null @@ -1 +0,0 @@ -t.column :${1:title}, :${2:string} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/mcht.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/mcht.snippet deleted file mode 100644 index a71b4731..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/mcht.snippet +++ /dev/null @@ -1,3 +0,0 @@ -change_table :${1:table_name} do |t| - ${2} -end diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/mcol.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/mcol.snippet deleted file mode 100644 index 8a5bd1ff..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/mcol.snippet +++ /dev/null @@ -1 +0,0 @@ -remove_column :${1:table}, :${2:column} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/mct.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/mct.snippet deleted file mode 100644 index 8dbe1eab..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/mct.snippet +++ /dev/null @@ -1,3 +0,0 @@ -create_table :${1:table_name} do |t| - t.column :${2:name}, :${3:type} -end diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/migration.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/migration.snippet deleted file mode 100644 index 9f54e0b9..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/migration.snippet +++ /dev/null @@ -1,8 +0,0 @@ -class ${1:`Snippet_MigrationNameFromFilename()`} < ActiveRecord::Migration - def self.up - ${2} - end - - def self.down - end -end diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/mp.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/mp.snippet deleted file mode 100644 index 1264a595..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/mp.snippet +++ /dev/null @@ -1 +0,0 @@ -map(&:${1:id}) diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/mrc.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/mrc.snippet deleted file mode 100644 index aaeba258..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/mrc.snippet +++ /dev/null @@ -1 +0,0 @@ -remove_column :${1:column} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/mrmc.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/mrmc.snippet deleted file mode 100644 index 8a5bd1ff..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/mrmc.snippet +++ /dev/null @@ -1 +0,0 @@ -remove_column :${1:table}, :${2:column} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/mrnc.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/mrnc.snippet deleted file mode 100644 index 6e167210..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/mrnc.snippet +++ /dev/null @@ -1 +0,0 @@ -rename_column :${1:table}, :${2:old}, :${3:new} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/mrw.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/mrw.snippet deleted file mode 100644 index 9ef0f8fe..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/mrw.snippet +++ /dev/null @@ -1 +0,0 @@ -mattr_accessor :${1:attr_names} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/nc.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/nc.snippet deleted file mode 100644 index cfc42ca4..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/nc.snippet +++ /dev/null @@ -1 +0,0 @@ -named_scope :<+name+><+, :joins => :<+table+>+>, :conditions => <+['<+<+field+> = ?+>', <+true+>]+> diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/ncl.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/ncl.snippet deleted file mode 100644 index c420ef2f..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/ncl.snippet +++ /dev/null @@ -1 +0,0 @@ -named_scope :<+name+>, lambda { |<+param+>| { :conditions => <+['<+<+field+> = ?+>', <+param+>]+> } } diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/pa.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/pa.snippet deleted file mode 100644 index 14fa54fb..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/pa.snippet +++ /dev/null @@ -1 +0,0 @@ -params[:${1:id}]${2} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/ra.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/ra.snippet deleted file mode 100644 index 56a9bbf6..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/ra.snippet +++ /dev/null @@ -1 +0,0 @@ -render :action => "${1:action}" diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/ral.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/ral.snippet deleted file mode 100644 index 0a0b202d..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/ral.snippet +++ /dev/null @@ -1 +0,0 @@ -render :action => "${1:action}", :layout => "${2:layoutname}" diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/rest.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/rest.snippet deleted file mode 100644 index 7938f9d6..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/rest.snippet +++ /dev/null @@ -1,3 +0,0 @@ -respond_to do |wants| - wants.${1:html} <+{ <++> }+> -end diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/rf.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/rf.snippet deleted file mode 100644 index 76fcdb1d..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/rf.snippet +++ /dev/null @@ -1 +0,0 @@ -render :file => "${1:filepath}" diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/rfu.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/rfu.snippet deleted file mode 100644 index c0bb72bf..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/rfu.snippet +++ /dev/null @@ -1 +0,0 @@ -render :file => "${1:filepath}", :use_full_path => ${2:false} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/ri.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/ri.snippet deleted file mode 100644 index 17a04048..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/ri.snippet +++ /dev/null @@ -1 +0,0 @@ -render :inline => "<+<%= 'hello' %>+>" diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/ril.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/ril.snippet deleted file mode 100644 index b1801aa4..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/ril.snippet +++ /dev/null @@ -1 +0,0 @@ -render :inline => "${1:<%= 'hello' %>}", :locals => { ${2::name} => "${3:value}"${4} } diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/rit.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/rit.snippet deleted file mode 100644 index b3cd8343..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/rit.snippet +++ /dev/null @@ -1 +0,0 @@ -render :inline => "${1:<%= 'hello' %>}", :type => ${2::rxml} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/rjson.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/rjson.snippet deleted file mode 100644 index fece1fcc..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/rjson.snippet +++ /dev/null @@ -1 +0,0 @@ -render :json => ${1:text to render} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/rl.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/rl.snippet deleted file mode 100644 index 53e8340a..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/rl.snippet +++ /dev/null @@ -1 +0,0 @@ -render :layout => "${1:layoutname}" diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/rn.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/rn.snippet deleted file mode 100644 index 6c6b0fec..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/rn.snippet +++ /dev/null @@ -1 +0,0 @@ -render :nothing => ${1:true} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/rns.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/rns.snippet deleted file mode 100644 index d1a581f8..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/rns.snippet +++ /dev/null @@ -1 +0,0 @@ -render :nothing => ${1:true}, :status => ${2:401} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/rp.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/rp.snippet deleted file mode 100644 index 0c5daa25..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/rp.snippet +++ /dev/null @@ -1 +0,0 @@ -render :partial => "${1:item}" diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/rpc.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/rpc.snippet deleted file mode 100644 index 570644b5..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/rpc.snippet +++ /dev/null @@ -1 +0,0 @@ -render :partial => "<+item+>", :collection => <+@<+item+>s+> diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/rpl.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/rpl.snippet deleted file mode 100644 index 6981fbc3..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/rpl.snippet +++ /dev/null @@ -1 +0,0 @@ -render :partial => "<+item+>", :locals => { :<+item+> => <+@<+item+>+><++> } diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/rpo.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/rpo.snippet deleted file mode 100644 index bab9da96..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/rpo.snippet +++ /dev/null @@ -1 +0,0 @@ -render :partial => "<+item+>", :object => <+@<+item+>+> diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/rps.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/rps.snippet deleted file mode 100644 index aef4c494..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/rps.snippet +++ /dev/null @@ -1 +0,0 @@ -render :partial => "${1:item}", :status => ${2:500} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/rt.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/rt.snippet deleted file mode 100644 index c464879c..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/rt.snippet +++ /dev/null @@ -1 +0,0 @@ -render :text => "${1:text to render}" diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/rtl.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/rtl.snippet deleted file mode 100644 index fc78bf14..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/rtl.snippet +++ /dev/null @@ -1 +0,0 @@ -render :text => "${1:text to render}", :layout => "${2:layoutname}" diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/rtlt.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/rtlt.snippet deleted file mode 100644 index 69618be0..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/rtlt.snippet +++ /dev/null @@ -1 +0,0 @@ -render :text => "${1:text to render}", :layout => ${2:true} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/rts.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/rts.snippet deleted file mode 100644 index 04fe409d..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/rts.snippet +++ /dev/null @@ -1 +0,0 @@ -render :text => "${1:text to render}", :status => ${2:401} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/ru.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/ru.snippet deleted file mode 100644 index 3a2d1ed0..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/ru.snippet +++ /dev/null @@ -1,3 +0,0 @@ -render :update do |${1:page}| - $1.${2} -end diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/rxml.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/rxml.snippet deleted file mode 100644 index e4e721a0..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/rxml.snippet +++ /dev/null @@ -1 +0,0 @@ -render :xml => ${1:text to render} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/sha1.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/sha1.snippet deleted file mode 100644 index 19847471..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/sha1.snippet +++ /dev/null @@ -1 +0,0 @@ -Digest::SHA1.hexdigest(${1:string}) diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/sweeper.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/sweeper.snippet deleted file mode 100644 index 659aeb0d..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/sweeper.snippet +++ /dev/null @@ -1,15 +0,0 @@ -class ${1:ModelClassName}Sweeper < ActionController::Caching::Sweeper - observe $1 - - def after_save(${2:model_class_name}) - expire_cache($2) - end - - def after_destroy($2) - expire_cache($2) - end - - def expire_cache($2) - expire_page - end -end diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/tcb.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/tcb.snippet deleted file mode 100644 index 021740df..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/tcb.snippet +++ /dev/null @@ -1,2 +0,0 @@ -t.boolean :${1:title} -${2} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/tcbi.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/tcbi.snippet deleted file mode 100644 index 3e6d3c9c..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/tcbi.snippet +++ /dev/null @@ -1,2 +0,0 @@ -t.binary :<+title+><+, :limit => <+2+>.megabytes+> -<++> diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/tcd.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/tcd.snippet deleted file mode 100644 index 0932f2c1..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/tcd.snippet +++ /dev/null @@ -1,2 +0,0 @@ -t.decimal :<+title+><+<+, :precision => <+10+>+><+, :scale => <+2+>+>+> -<++> diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/tcda.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/tcda.snippet deleted file mode 100644 index b716e8b0..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/tcda.snippet +++ /dev/null @@ -1,2 +0,0 @@ -t.date :${1:title} -${2} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/tcdt.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/tcdt.snippet deleted file mode 100644 index d060532e..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/tcdt.snippet +++ /dev/null @@ -1,2 +0,0 @@ -t.datetime :${1:title} -${2} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/tcf.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/tcf.snippet deleted file mode 100644 index f09f7904..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/tcf.snippet +++ /dev/null @@ -1,2 +0,0 @@ -t.float :${1:title} -${2} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/tch.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/tch.snippet deleted file mode 100644 index bcce7271..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/tch.snippet +++ /dev/null @@ -1,2 +0,0 @@ -t.change :<+name+><+, :<+string+><+, :<+limit+> => <+80+>+>+> -<++> diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/tci.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/tci.snippet deleted file mode 100644 index 7cb011ca..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/tci.snippet +++ /dev/null @@ -1,2 +0,0 @@ -t.integer :${1:title} -${2} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/tcl.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/tcl.snippet deleted file mode 100644 index ffa359f5..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/tcl.snippet +++ /dev/null @@ -1,2 +0,0 @@ -t.integer :lock_version, :null => false, :default => 0 -${1} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/tcr.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/tcr.snippet deleted file mode 100644 index 2b421dd7..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/tcr.snippet +++ /dev/null @@ -1,2 +0,0 @@ -t.references :<+taggable+><+, :polymorphic => <+{ :default => '<+Photo+>' }+>+> -<++> diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/tcs.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/tcs.snippet deleted file mode 100644 index a7b8473b..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/tcs.snippet +++ /dev/null @@ -1,2 +0,0 @@ -t.string :${1:title} -${2} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/tct.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/tct.snippet deleted file mode 100644 index f28518f4..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/tct.snippet +++ /dev/null @@ -1,2 +0,0 @@ -t.text :${1:title} -${2} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/tcti.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/tcti.snippet deleted file mode 100644 index 0006c819..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/tcti.snippet +++ /dev/null @@ -1,2 +0,0 @@ -t.time :${1:title} -${2} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/tcts.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/tcts.snippet deleted file mode 100644 index e46e844c..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/tcts.snippet +++ /dev/null @@ -1,2 +0,0 @@ -t.timestamp :${1:title} -${2} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/tctss.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/tctss.snippet deleted file mode 100644 index f009ee62..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/tctss.snippet +++ /dev/null @@ -1,2 +0,0 @@ -t.timestamps -${1} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/trc.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/trc.snippet deleted file mode 100644 index 2d6250ab..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/trc.snippet +++ /dev/null @@ -1 +0,0 @@ -t.remove :${1:column} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/tre.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/tre.snippet deleted file mode 100644 index 8f70788c..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/tre.snippet +++ /dev/null @@ -1,2 +0,0 @@ -t.rename :<+old_column_name+>, :<+new_column_name+> -<++> diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/tref.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/tref.snippet deleted file mode 100644 index 12867868..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/tref.snippet +++ /dev/null @@ -1 +0,0 @@ -t.references :${1:model} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/va.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/va.snippet deleted file mode 100644 index 064bb7b2..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/va.snippet +++ /dev/null @@ -1 +0,0 @@ -validates_associated :${1:attribute} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/vao.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/vao.snippet deleted file mode 100644 index 4c6c98b6..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/vao.snippet +++ /dev/null @@ -1 +0,0 @@ -validates_acceptance_of :${1:terms} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/vc.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/vc.snippet deleted file mode 100644 index 0aa1a75d..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/vc.snippet +++ /dev/null @@ -1 +0,0 @@ -validates_confirmation_of :${1:attribute} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/ve.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/ve.snippet deleted file mode 100644 index b6a4c4d5..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/ve.snippet +++ /dev/null @@ -1 +0,0 @@ -validates_exclusion_of :${1:attribute}, :in => ${2:%w( mov avi )} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/vf.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/vf.snippet deleted file mode 100644 index adc142c7..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/vf.snippet +++ /dev/null @@ -1 +0,0 @@ -validates_format_of :${1:attribute}, :with => /${2:regex}/ diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/vi.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/vi.snippet deleted file mode 100644 index 8ba16d2e..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/vi.snippet +++ /dev/null @@ -1 +0,0 @@ -validates_inclusion_of :${1:attribute}, :in => %w(${2: mov avi }) diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/vl.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/vl.snippet deleted file mode 100644 index 71d802bd..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/vl.snippet +++ /dev/null @@ -1 +0,0 @@ -validates_length_of :${1:attribute}, :within => ${2:3}..${3:20} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/vn.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/vn.snippet deleted file mode 100644 index 34bfaa72..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/vn.snippet +++ /dev/null @@ -1 +0,0 @@ -validates_numericality_of :${1:attribute} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/vpo.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/vpo.snippet deleted file mode 100644 index c8fdff9c..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/vpo.snippet +++ /dev/null @@ -1 +0,0 @@ -validates_presence_of :${1:attribute} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/vu.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/vu.snippet deleted file mode 100644 index 0c06e655..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/vu.snippet +++ /dev/null @@ -1 +0,0 @@ -validates_uniqueness_of :${1:attribute} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/wants.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/wants.snippet deleted file mode 100644 index 909c8d59..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/wants.snippet +++ /dev/null @@ -1 +0,0 @@ -wants.<+js|xml|html+> <+{ <++> }+> diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/xdelete.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/xdelete.snippet deleted file mode 100644 index 41184e9e..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/xdelete.snippet +++ /dev/null @@ -1 +0,0 @@ -xhr :delete, :${1:destroy}, :id => ${2:1}${3} diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/xget.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/xget.snippet deleted file mode 100644 index 1ae7834e..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/xget.snippet +++ /dev/null @@ -1 +0,0 @@ -xhr :get, :<+show+><+, :id => <+1+>+><++> diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/xpost.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/xpost.snippet deleted file mode 100644 index 3681a95f..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/xpost.snippet +++ /dev/null @@ -1 +0,0 @@ -xhr :post, :${1:create}, :${2:object} => { ${3} } diff --git a/sources_non_forked/snipmate-snippets/ruby-rails/xput.snippet b/sources_non_forked/snipmate-snippets/ruby-rails/xput.snippet deleted file mode 100644 index f046f2ea..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rails/xput.snippet +++ /dev/null @@ -1 +0,0 @@ -xhr :put, :${1:update}, :id => ${2:1}, :${3:object} => { ${4} }${5} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/aft.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/aft.snippet deleted file mode 100644 index 528f1b30..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/aft.snippet +++ /dev/null @@ -1,3 +0,0 @@ -after(${1::each}) do - ${2} -end diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/annot.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/annot.snippet deleted file mode 100644 index 7199170c..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/annot.snippet +++ /dev/null @@ -1 +0,0 @@ -any_number_of_times diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/anr.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/anr.snippet deleted file mode 100644 index 573addd5..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/anr.snippet +++ /dev/null @@ -1 +0,0 @@ -and_return(${1:value}) diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/anra.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/anra.snippet deleted file mode 100644 index ab03deb4..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/anra.snippet +++ /dev/null @@ -1 +0,0 @@ -and_raise(${1:exception}) diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/anrb.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/anrb.snippet deleted file mode 100644 index e313a512..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/anrb.snippet +++ /dev/null @@ -1 +0,0 @@ -and_return { ${1} } diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/ant.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/ant.snippet deleted file mode 100644 index d230e92c..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/ant.snippet +++ /dev/null @@ -1 +0,0 @@ -and_throw(${1:sym}) diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/any.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/any.snippet deleted file mode 100644 index 34c08d69..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/any.snippet +++ /dev/null @@ -1 +0,0 @@ -and_yield(${1:values}) diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/atl.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/atl.snippet deleted file mode 100644 index b95128bb..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/atl.snippet +++ /dev/null @@ -1 +0,0 @@ -at_least(${1:n}).times diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/atm.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/atm.snippet deleted file mode 100644 index fa5c6060..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/atm.snippet +++ /dev/null @@ -1 +0,0 @@ -at_most(${1:n}).times diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/bef.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/bef.snippet deleted file mode 100644 index f96608c5..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/bef.snippet +++ /dev/null @@ -1,3 +0,0 @@ -before(${1::each}) do - ${2} -end diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/conn.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/conn.snippet deleted file mode 100644 index 4bd9d239..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/conn.snippet +++ /dev/null @@ -1 +0,0 @@ -controller_name :${1:controller} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/des.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/des.snippet deleted file mode 100644 index 44c75845..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/des.snippet +++ /dev/null @@ -1,3 +0,0 @@ -describe "${1:subject}" do - ${2} -end diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/desc.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/desc.snippet deleted file mode 100644 index 6311aa1d..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/desc.snippet +++ /dev/null @@ -1,5 +0,0 @@ -require 'spec_helper' - -describe ${1:`Snippet_RubyClassNameFromFilename()`} do - ${2} -end diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/desrc.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/desrc.snippet deleted file mode 100644 index a9c8ac2b..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/desrc.snippet +++ /dev/null @@ -1,3 +0,0 @@ -describe ${1:controller}, "${2:GET|POST|PUT|DELETE} ${3:/some/path}${4}" do - ${5} -end diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/dest.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/dest.snippet deleted file mode 100644 index b3b3e01a..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/dest.snippet +++ /dev/null @@ -1,3 +0,0 @@ -describe ${1:Type} do - ${2} -end diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/dests.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/dests.snippet deleted file mode 100644 index 89e9372c..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/dests.snippet +++ /dev/null @@ -1,3 +0,0 @@ -describe ${1:Type}, "${2:description}" do - ${3} -end diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/ex.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/ex.snippet deleted file mode 100644 index 2e5a4a01..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/ex.snippet +++ /dev/null @@ -1 +0,0 @@ -exactly(${1:n}).times diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/isbl.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/isbl.snippet deleted file mode 100644 index 728223f0..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/isbl.snippet +++ /dev/null @@ -1 +0,0 @@ -it_should_behave_like '${1:do something}' diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/it.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/it.snippet deleted file mode 100644 index 8af38db4..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/it.snippet +++ /dev/null @@ -1,3 +0,0 @@ -it "${1}" do - ${2} -end diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/its.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/its.snippet deleted file mode 100644 index 963f4041..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/its.snippet +++ /dev/null @@ -1 +0,0 @@ -it "should ${1:do something}" do${2} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/mat.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/mat.snippet deleted file mode 100644 index 2f047710..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/mat.snippet +++ /dev/null @@ -1,24 +0,0 @@ -class ${1:ReverseTo} - def initialize(${2:param}) - @$2 = $2 - end - - def matches?(actual) - @actual = actual - # Satisfy expectation here. Return false or raise an error if it's not met. - ${3:@actual.reverse.should == @$2} - true - end - - def failure_message - "expected #{@actual.inspect} to ${4} #{@$2.inspect}, but it didn't" - end - - def negative_failure_message - "expected #{@actual.inspect} not to ${5} #{@$2.inspect}, but it did" - end -end - -def ${6:reverse_to}(${7:expected}) - ${8}.new($7) -end diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/mm.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/mm.snippet deleted file mode 100644 index b10aa1d5..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/mm.snippet +++ /dev/null @@ -1 +0,0 @@ -mock_model(${1:model})${2} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/moc.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/moc.snippet deleted file mode 100644 index 4ff954f1..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/moc.snippet +++ /dev/null @@ -1,2 +0,0 @@ -${1:var} = mock("${2:mock_name}"${3:, :null_object => true}) -${4} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/mocw.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/mocw.snippet deleted file mode 100644 index 09f93e07..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/mocw.snippet +++ /dev/null @@ -1,3 +0,0 @@ -Spec::Runner.configure do |config| - config.mock_with :${1:mocha|flexmock|rr} -end diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/on.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/on.snippet deleted file mode 100644 index b2d1a776..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/on.snippet +++ /dev/null @@ -1 +0,0 @@ -once diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/resh.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/resh.snippet deleted file mode 100644 index 91cd5b06..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/resh.snippet +++ /dev/null @@ -1 +0,0 @@ -require File.dirname(__FILE__) + '/../spec_helper' diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/sef.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/sef.snippet deleted file mode 100644 index 89d34116..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/sef.snippet +++ /dev/null @@ -1,3 +0,0 @@ -shared_examples_for "${1:do something}" do - ${2} -end diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/sh.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/sh.snippet deleted file mode 100644 index 67530e9d..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/sh.snippet +++ /dev/null @@ -1,2 +0,0 @@ -${1:target}.should == ${2:value} -${3} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/shb.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/shb.snippet deleted file mode 100644 index b909d9c0..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/shb.snippet +++ /dev/null @@ -1,2 +0,0 @@ -${1:target}.should be(${2:result}) -${3} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/shbc.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/shbc.snippet deleted file mode 100644 index 9080a3c2..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/shbc.snippet +++ /dev/null @@ -1,2 +0,0 @@ -${1:target}.should be_close(${2:result}, ${3:tolerance}) -${4} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/shbio.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/shbio.snippet deleted file mode 100644 index 98a73893..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/shbio.snippet +++ /dev/null @@ -1,2 +0,0 @@ -${1:target}.should be_instance_of(${2:class}) -${3} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/shbko.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/shbko.snippet deleted file mode 100644 index 74bf8520..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/shbko.snippet +++ /dev/null @@ -1,2 +0,0 @@ -${1:target}.should be_a_kind_of(${2:class}) -${3} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/shbr.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/shbr.snippet deleted file mode 100644 index 887ef800..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/shbr.snippet +++ /dev/null @@ -1,2 +0,0 @@ -response.should be_redirect -${1} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/shbs.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/shbs.snippet deleted file mode 100644 index 602074b5..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/shbs.snippet +++ /dev/null @@ -1,2 +0,0 @@ -response.should be_success -${1} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/shc.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/shc.snippet deleted file mode 100644 index 16206fa1..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/shc.snippet +++ /dev/null @@ -1,3 +0,0 @@ -lambda do - ${1} -end.should change(${2:target}, :${3:method}).from(${4:old_value}).to(${5:new_value}).by(${6:change}) diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/shdm.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/shdm.snippet deleted file mode 100644 index e82d82e7..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/shdm.snippet +++ /dev/null @@ -1,2 +0,0 @@ -${1:target}.should match(/${2:regexp}/) -${3} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/she.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/she.snippet deleted file mode 100644 index f896a26e..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/she.snippet +++ /dev/null @@ -1,2 +0,0 @@ -${1:target}.should eql(${2:value}) -${3} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/sheq.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/sheq.snippet deleted file mode 100644 index e3c389e6..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/sheq.snippet +++ /dev/null @@ -1,2 +0,0 @@ -${1:target}.should equal(${2:value}) -${3} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/shh.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/shh.snippet deleted file mode 100644 index 93189cb8..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/shh.snippet +++ /dev/null @@ -1,2 +0,0 @@ -${1:target}.should have(${2:num}).${3:things} -${4} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/shhal.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/shhal.snippet deleted file mode 100644 index dabe237a..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/shhal.snippet +++ /dev/null @@ -1,2 +0,0 @@ -${1:target}.should have_at_least(${2:num}).${3:things} -${4} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/shham.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/shham.snippet deleted file mode 100644 index 7072add1..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/shham.snippet +++ /dev/null @@ -1,2 +0,0 @@ -${1:target}.should have_at_most(${2:num}).${3:things} -${4} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/shhr.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/shhr.snippet deleted file mode 100644 index b8a8997f..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/shhr.snippet +++ /dev/null @@ -1,2 +0,0 @@ -${1:target}.should have(${2:n}).records -${3} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/shn.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/shn.snippet deleted file mode 100644 index b19cbb67..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/shn.snippet +++ /dev/null @@ -1,2 +0,0 @@ -${1:target}.should_not == ${2:value} -${3} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/shnb.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/shnb.snippet deleted file mode 100644 index a34d62e5..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/shnb.snippet +++ /dev/null @@ -1,2 +0,0 @@ -${1:target}.should_not be(${2:result}) -${3} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/shnbc.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/shnbc.snippet deleted file mode 100644 index 55ac6d3a..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/shnbc.snippet +++ /dev/null @@ -1,2 +0,0 @@ -${1:target}.should_not be_close(${2:result}, ${3:tolerance}) -${4} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/shnbio.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/shnbio.snippet deleted file mode 100644 index b6f15267..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/shnbio.snippet +++ /dev/null @@ -1,2 +0,0 @@ -${1:target}.should_not be_instance_of(${2:klass}) -${3} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/shnbko.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/shnbko.snippet deleted file mode 100644 index 0b0cfc7f..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/shnbko.snippet +++ /dev/null @@ -1,2 +0,0 @@ -${1:target}.should_not be_a_kind_of(${2:klass}) -${3} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/shnbr.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/shnbr.snippet deleted file mode 100644 index 25519b08..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/shnbr.snippet +++ /dev/null @@ -1,2 +0,0 @@ -response.should_not be_redirect -${1} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/shnbs.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/shnbs.snippet deleted file mode 100644 index 7d35ab20..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/shnbs.snippet +++ /dev/null @@ -1,2 +0,0 @@ -response.should_not be_success -${1} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/shnc.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/shnc.snippet deleted file mode 100644 index 7baead27..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/shnc.snippet +++ /dev/null @@ -1,3 +0,0 @@ -lambda do - ${1} -end.should_not change(${2:target}, :${3:method}) diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/shne.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/shne.snippet deleted file mode 100644 index 68a7451c..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/shne.snippet +++ /dev/null @@ -1,2 +0,0 @@ -${1:target}.should_not eql(${2:value}) -${3} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/shneq.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/shneq.snippet deleted file mode 100644 index da4f59b9..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/shneq.snippet +++ /dev/null @@ -1,2 +0,0 @@ - ${1:target}.should_not equal(${2:value}) - ${3} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/shnm.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/shnm.snippet deleted file mode 100644 index ee7b6043..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/shnm.snippet +++ /dev/null @@ -1,2 +0,0 @@ -${1:target}.should_not match(/${2:regexp}/) -${3} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/shnp.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/shnp.snippet deleted file mode 100644 index 9f1298b7..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/shnp.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:target}.should_not be_${2:predicate} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/shnr.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/shnr.snippet deleted file mode 100644 index 98c0fc08..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/shnr.snippet +++ /dev/null @@ -1,2 +0,0 @@ -${1:mock}.should_not_receive(:${2:message})${3} -${4} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/shnre.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/shnre.snippet deleted file mode 100644 index fbf9604e..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/shnre.snippet +++ /dev/null @@ -1,2 +0,0 @@ -${1:target}.should_not raise_error(${2:error}) -${3} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/shnredt.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/shnredt.snippet deleted file mode 100644 index 2afb69cc..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/shnredt.snippet +++ /dev/null @@ -1,2 +0,0 @@ -response.should_not redirect_to(${1:url}) -${2} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/shnrt.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/shnrt.snippet deleted file mode 100644 index c2c5f2cb..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/shnrt.snippet +++ /dev/null @@ -1,2 +0,0 @@ -${1:target}.should_not respond_to(:${2:sym}) -${3} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/shns.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/shns.snippet deleted file mode 100644 index b73a71c8..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/shns.snippet +++ /dev/null @@ -1,2 +0,0 @@ -${1:target}.should_not satisfy { |${2:obj}| ${3} } -${4} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/shnt.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/shnt.snippet deleted file mode 100644 index 0353376b..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/shnt.snippet +++ /dev/null @@ -1,2 +0,0 @@ -lambda { ${1} }.should_not throw_symbol(:${2:symbol}) -${3} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/shp.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/shp.snippet deleted file mode 100644 index 9267b612..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/shp.snippet +++ /dev/null @@ -1 +0,0 @@ -${1:target}.should be_${2:predicate} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/shr.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/shr.snippet deleted file mode 100644 index 4effa2c1..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/shr.snippet +++ /dev/null @@ -1,2 +0,0 @@ -${1:mock}.should_receive(:${2:message})${3} -${4} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/shre.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/shre.snippet deleted file mode 100644 index 420bbe80..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/shre.snippet +++ /dev/null @@ -1,2 +0,0 @@ -${1:target}.should raise_error(${2:error}) -${3} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/shredt.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/shredt.snippet deleted file mode 100644 index 979c1d6e..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/shredt.snippet +++ /dev/null @@ -1,2 +0,0 @@ -response.should redirect_to(${1:url}) -${2} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/shrt.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/shrt.snippet deleted file mode 100644 index a796ebd2..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/shrt.snippet +++ /dev/null @@ -1,2 +0,0 @@ -${1:target}.should respond_to(:${2:sym}) -${3} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/shs.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/shs.snippet deleted file mode 100644 index 08eb9419..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/shs.snippet +++ /dev/null @@ -1,2 +0,0 @@ -${1:target}.should satisfy { |${2:obj}| ${3} } -${4} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/sht.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/sht.snippet deleted file mode 100644 index 86f55fa3..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/sht.snippet +++ /dev/null @@ -1,2 +0,0 @@ -${1:target}.should throw_symble(:${2:symbol}) -${3} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/shtemp.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/shtemp.snippet deleted file mode 100644 index 9b08c10e..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/shtemp.snippet +++ /dev/null @@ -1,2 +0,0 @@ -response.should render_template(:${1:template}) -${2} diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/tw.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/tw.snippet deleted file mode 100644 index 6ebb6d4a..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/tw.snippet +++ /dev/null @@ -1 +0,0 @@ -twice diff --git a/sources_non_forked/snipmate-snippets/ruby-rspec/wia.snippet b/sources_non_forked/snipmate-snippets/ruby-rspec/wia.snippet deleted file mode 100644 index 21eda197..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-rspec/wia.snippet +++ /dev/null @@ -1,2 +0,0 @@ -with(${1:args}) -${2} diff --git a/sources_non_forked/snipmate-snippets/ruby-shoulda/context.snippet b/sources_non_forked/snipmate-snippets/ruby-shoulda/context.snippet deleted file mode 100644 index 0e5a7fd2..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-shoulda/context.snippet +++ /dev/null @@ -1,5 +0,0 @@ -context "${1:context}" do - - ${2} - -end diff --git a/sources_non_forked/snipmate-snippets/ruby-shoulda/samao.snippet b/sources_non_forked/snipmate-snippets/ruby-shoulda/samao.snippet deleted file mode 100644 index cfd4e59f..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-shoulda/samao.snippet +++ /dev/null @@ -1 +0,0 @@ -should_allow_mass_assignment_of :${1:field} diff --git a/sources_non_forked/snipmate-snippets/ruby-shoulda/savf.snippet b/sources_non_forked/snipmate-snippets/ruby-shoulda/savf.snippet deleted file mode 100644 index 39cfd6f1..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-shoulda/savf.snippet +++ /dev/null @@ -1 +0,0 @@ -should_allow_values_for :${1:field}, "${2:value}" diff --git a/sources_non_forked/snipmate-snippets/ruby-shoulda/sbt.snippet b/sources_non_forked/snipmate-snippets/ruby-shoulda/sbt.snippet deleted file mode 100644 index 90d25c84..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-shoulda/sbt.snippet +++ /dev/null @@ -1 +0,0 @@ -should_belong_to :${1:association} diff --git a/sources_non_forked/snipmate-snippets/ruby-shoulda/selal.snippet b/sources_non_forked/snipmate-snippets/ruby-shoulda/selal.snippet deleted file mode 100644 index 2fc48b4a..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-shoulda/selal.snippet +++ /dev/null @@ -1 +0,0 @@ -should_ensure_length_at_least :${1:field}, ${2:min_length} diff --git a/sources_non_forked/snipmate-snippets/ruby-shoulda/seli.snippet b/sources_non_forked/snipmate-snippets/ruby-shoulda/seli.snippet deleted file mode 100644 index 8bc2bf87..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-shoulda/seli.snippet +++ /dev/null @@ -1 +0,0 @@ -should_ensure_length_is :${1:field}, ${2:length} diff --git a/sources_non_forked/snipmate-snippets/ruby-shoulda/selir.snippet b/sources_non_forked/snipmate-snippets/ruby-shoulda/selir.snippet deleted file mode 100644 index 1f0bdc98..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-shoulda/selir.snippet +++ /dev/null @@ -1 +0,0 @@ -should_ensure_length_in_range :${1:field}, ${2:start}..${3:end} diff --git a/sources_non_forked/snipmate-snippets/ruby-shoulda/setup.snippet b/sources_non_forked/snipmate-snippets/ruby-shoulda/setup.snippet deleted file mode 100644 index 68b895c1..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-shoulda/setup.snippet +++ /dev/null @@ -1,3 +0,0 @@ -setup do - ${1} -end diff --git a/sources_non_forked/snipmate-snippets/ruby-shoulda/sevir.snippet b/sources_non_forked/snipmate-snippets/ruby-shoulda/sevir.snippet deleted file mode 100644 index 195f7484..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-shoulda/sevir.snippet +++ /dev/null @@ -1 +0,0 @@ -should_ensure_value_in_range :${1:field}, ${2:start}..${3:end} diff --git a/sources_non_forked/snipmate-snippets/ruby-shoulda/shabtm.snippet b/sources_non_forked/snipmate-snippets/ruby-shoulda/shabtm.snippet deleted file mode 100644 index 03c70e24..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-shoulda/shabtm.snippet +++ /dev/null @@ -1 +0,0 @@ -should_have_and_belong_to_many :${1:association} diff --git a/sources_non_forked/snipmate-snippets/ruby-shoulda/shcm.snippet b/sources_non_forked/snipmate-snippets/ruby-shoulda/shcm.snippet deleted file mode 100644 index 6948aea9..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-shoulda/shcm.snippet +++ /dev/null @@ -1 +0,0 @@ -should_have_class_methods :${1:method} diff --git a/sources_non_forked/snipmate-snippets/ruby-shoulda/shdc.snippet b/sources_non_forked/snipmate-snippets/ruby-shoulda/shdc.snippet deleted file mode 100644 index d841d650..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-shoulda/shdc.snippet +++ /dev/null @@ -1 +0,0 @@ -should_have_db_columns :${1:field} diff --git a/sources_non_forked/snipmate-snippets/ruby-shoulda/shi.snippet b/sources_non_forked/snipmate-snippets/ruby-shoulda/shi.snippet deleted file mode 100644 index d6d2b389..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-shoulda/shi.snippet +++ /dev/null @@ -1 +0,0 @@ -should_have_indices :${1:field} diff --git a/sources_non_forked/snipmate-snippets/ruby-shoulda/shim.snippet b/sources_non_forked/snipmate-snippets/ruby-shoulda/shim.snippet deleted file mode 100644 index 1f442528..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-shoulda/shim.snippet +++ /dev/null @@ -1 +0,0 @@ -should_have_instance_methods :${1:method} diff --git a/sources_non_forked/snipmate-snippets/ruby-shoulda/shm.snippet b/sources_non_forked/snipmate-snippets/ruby-shoulda/shm.snippet deleted file mode 100644 index 8c98c17e..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-shoulda/shm.snippet +++ /dev/null @@ -1 +0,0 @@ -should_have_many :${1:association} diff --git a/sources_non_forked/snipmate-snippets/ruby-shoulda/sho.snippet b/sources_non_forked/snipmate-snippets/ruby-shoulda/sho.snippet deleted file mode 100644 index a652b4f5..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-shoulda/sho.snippet +++ /dev/null @@ -1 +0,0 @@ -should_have_one :${1:association} diff --git a/sources_non_forked/snipmate-snippets/ruby-shoulda/shroa.snippet b/sources_non_forked/snipmate-snippets/ruby-shoulda/shroa.snippet deleted file mode 100644 index 022015df..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-shoulda/shroa.snippet +++ /dev/null @@ -1 +0,0 @@ -should_have_read_only_attributes :${1:field} diff --git a/sources_non_forked/snipmate-snippets/ruby-shoulda/snamao.snippet b/sources_non_forked/snipmate-snippets/ruby-shoulda/snamao.snippet deleted file mode 100644 index 236190b5..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-shoulda/snamao.snippet +++ /dev/null @@ -1 +0,0 @@ -should_not_allow_mass_assignment_of :${1:field} diff --git a/sources_non_forked/snipmate-snippets/ruby-shoulda/snavf.snippet b/sources_non_forked/snipmate-snippets/ruby-shoulda/snavf.snippet deleted file mode 100644 index 029c5bab..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-shoulda/snavf.snippet +++ /dev/null @@ -1 +0,0 @@ -should_not_allow_values_for :${1:field}, "${2:value}" diff --git a/sources_non_forked/snipmate-snippets/ruby-shoulda/svao.snippet b/sources_non_forked/snipmate-snippets/ruby-shoulda/svao.snippet deleted file mode 100644 index 8eccb887..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-shoulda/svao.snippet +++ /dev/null @@ -1 +0,0 @@ -should_validate_acceptance_of :${1:field} diff --git a/sources_non_forked/snipmate-snippets/ruby-shoulda/svno.snippet b/sources_non_forked/snipmate-snippets/ruby-shoulda/svno.snippet deleted file mode 100644 index a90c1cab..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-shoulda/svno.snippet +++ /dev/null @@ -1 +0,0 @@ -should_validate_numericality_of :${1:field} diff --git a/sources_non_forked/snipmate-snippets/ruby-shoulda/svpo.snippet b/sources_non_forked/snipmate-snippets/ruby-shoulda/svpo.snippet deleted file mode 100644 index 13598f86..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-shoulda/svpo.snippet +++ /dev/null @@ -1 +0,0 @@ -should_validate_presence_of :${1:field} diff --git a/sources_non_forked/snipmate-snippets/ruby-shoulda/svuo.snippet b/sources_non_forked/snipmate-snippets/ruby-shoulda/svuo.snippet deleted file mode 100644 index 6e26912d..00000000 --- a/sources_non_forked/snipmate-snippets/ruby-shoulda/svuo.snippet +++ /dev/null @@ -1 +0,0 @@ -should_validate_uniqueness_of :${1:field}, :scoped_to => ${2:arrayofnames} diff --git a/sources_non_forked/snipmate-snippets/ruby/Md.snippet b/sources_non_forked/snipmate-snippets/ruby/Md.snippet deleted file mode 100644 index 1c2c9f10..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/Md.snippet +++ /dev/null @@ -1 +0,0 @@ -File.open(${1:dump_path}, "wb") { |${2:file}| Marshal.dump(${3:obj}, ${4:$2}) } diff --git a/sources_non_forked/snipmate-snippets/ruby/Ml.snippet b/sources_non_forked/snipmate-snippets/ruby/Ml.snippet deleted file mode 100644 index 33c3200c..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/Ml.snippet +++ /dev/null @@ -1 +0,0 @@ -File.open(${1:dump_path}, "rb") { |${2:file}| Marshal.load(${3:$2}) } diff --git a/sources_non_forked/snipmate-snippets/ruby/Pn.snippet b/sources_non_forked/snipmate-snippets/ruby/Pn.snippet deleted file mode 100644 index e2136913..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/Pn.snippet +++ /dev/null @@ -1 +0,0 @@ -PStore.new(${1}) diff --git a/sources_non_forked/snipmate-snippets/ruby/Yd.snippet b/sources_non_forked/snipmate-snippets/ruby/Yd.snippet deleted file mode 100644 index e667a081..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/Yd.snippet +++ /dev/null @@ -1 +0,0 @@ -File.open(${1:path_to_yml}, "w") { |${2:file}| YAML.dump(${3:obj}, ${4:$2}) } diff --git a/sources_non_forked/snipmate-snippets/ruby/Yl.snippet b/sources_non_forked/snipmate-snippets/ruby/Yl.snippet deleted file mode 100644 index b37d1bb5..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/Yl.snippet +++ /dev/null @@ -1 +0,0 @@ -File.open(${1:path_to_yml}) { |${2:file}| YAML.load(${3:$2}) } diff --git a/sources_non_forked/snipmate-snippets/ruby/am.snippet b/sources_non_forked/snipmate-snippets/ruby/am.snippet deleted file mode 100644 index 91209b9b..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/am.snippet +++ /dev/null @@ -1 +0,0 @@ -alias_method :${1:new_name}, :${2:old_name} diff --git a/sources_non_forked/snipmate-snippets/ruby/as.snippet b/sources_non_forked/snipmate-snippets/ruby/as.snippet deleted file mode 100644 index a8c7f5cb..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/as.snippet +++ /dev/null @@ -1 +0,0 @@ -assert ${1:test}, "${2:failure_message}" diff --git a/sources_non_forked/snipmate-snippets/ruby/asam.snippet b/sources_non_forked/snipmate-snippets/ruby/asam.snippet deleted file mode 100644 index 3c95b31c..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/asam.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_alias_method ${1:object}, ${2:alias_name}, ${3:original_name} diff --git a/sources_non_forked/snipmate-snippets/ruby/asb.snippet b/sources_non_forked/snipmate-snippets/ruby/asb.snippet deleted file mode 100644 index ab1eff71..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/asb.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_boolean ${1:actual} diff --git a/sources_non_forked/snipmate-snippets/ruby/asc.snippet b/sources_non_forked/snipmate-snippets/ruby/asc.snippet deleted file mode 100644 index c6badc3e..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/asc.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_compare ${1:expected}, ${2:operator}, ${3:actual} diff --git a/sources_non_forked/snipmate-snippets/ruby/ascd.snippet b/sources_non_forked/snipmate-snippets/ruby/ascd.snippet deleted file mode 100644 index bc77908f..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/ascd.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_const_defined ${1:object}, ${2:constant_name} diff --git a/sources_non_forked/snipmate-snippets/ruby/ase.snippet b/sources_non_forked/snipmate-snippets/ruby/ase.snippet deleted file mode 100644 index 5f650990..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/ase.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_equal ${1:expected}, ${2:actual} diff --git a/sources_non_forked/snipmate-snippets/ruby/asem.snippet b/sources_non_forked/snipmate-snippets/ruby/asem.snippet deleted file mode 100644 index 46428325..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/asem.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_empty ${1:object} diff --git a/sources_non_forked/snipmate-snippets/ruby/asf.snippet b/sources_non_forked/snipmate-snippets/ruby/asf.snippet deleted file mode 100644 index 27ff6da5..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/asf.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_false ${1:actual} diff --git a/sources_non_forked/snipmate-snippets/ruby/asfa.snippet b/sources_non_forked/snipmate-snippets/ruby/asfa.snippet deleted file mode 100644 index f45fa53f..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/asfa.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_fail_assertion { ${1:block} } diff --git a/sources_non_forked/snipmate-snippets/ruby/asi.snippet b/sources_non_forked/snipmate-snippets/ruby/asi.snippet deleted file mode 100644 index dedf94d2..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/asi.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_include ${1:collection}, ${2:object} diff --git a/sources_non_forked/snipmate-snippets/ruby/asid.snippet b/sources_non_forked/snipmate-snippets/ruby/asid.snippet deleted file mode 100644 index 683fb06c..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/asid.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_in_delta ${1:expected_float}, ${2:actual_float}, ${3:delta_float} diff --git a/sources_non_forked/snipmate-snippets/ruby/asie.snippet b/sources_non_forked/snipmate-snippets/ruby/asie.snippet deleted file mode 100644 index f13d0a36..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/asie.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_in_epsilon ${1:expected_float}, ${2:actual_float} diff --git a/sources_non_forked/snipmate-snippets/ruby/asio.snippet b/sources_non_forked/snipmate-snippets/ruby/asio.snippet deleted file mode 100644 index 56f0ab7e..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/asio.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_instance_of ${1:ExpectedClass}, ${2:actual_instance} diff --git a/sources_non_forked/snipmate-snippets/ruby/asko.snippet b/sources_non_forked/snipmate-snippets/ruby/asko.snippet deleted file mode 100644 index 555bf138..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/asko.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_kind_of ${1:ExpectedKind}, ${2:actual_instance} diff --git a/sources_non_forked/snipmate-snippets/ruby/asm.snippet b/sources_non_forked/snipmate-snippets/ruby/asm.snippet deleted file mode 100644 index 9860b4cf..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/asm.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_match /${1:expected_pattern}/, ${2:actual_string} diff --git a/sources_non_forked/snipmate-snippets/ruby/asn.snippet b/sources_non_forked/snipmate-snippets/ruby/asn.snippet deleted file mode 100644 index 36a2898e..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/asn.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_nil ${1:instance} diff --git a/sources_non_forked/snipmate-snippets/ruby/asncd.snippet b/sources_non_forked/snipmate-snippets/ruby/asncd.snippet deleted file mode 100644 index b4dcd735..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/asncd.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_not_const_defined ${1:object}, ${2:constant_name} diff --git a/sources_non_forked/snipmate-snippets/ruby/asne.snippet b/sources_non_forked/snipmate-snippets/ruby/asne.snippet deleted file mode 100644 index 91db286a..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/asne.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_not_equal ${1:unexpected}, ${2:actual} diff --git a/sources_non_forked/snipmate-snippets/ruby/asnem.snippet b/sources_non_forked/snipmate-snippets/ruby/asnem.snippet deleted file mode 100644 index 43d07728..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/asnem.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_not_empty ${1:object} diff --git a/sources_non_forked/snipmate-snippets/ruby/asni.snippet b/sources_non_forked/snipmate-snippets/ruby/asni.snippet deleted file mode 100644 index d450d9ea..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/asni.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_not_include ${1:collection}, ${2:object} diff --git a/sources_non_forked/snipmate-snippets/ruby/asnid.snippet b/sources_non_forked/snipmate-snippets/ruby/asnid.snippet deleted file mode 100644 index 23e039ad..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/asnid.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_not_in_delta ${1:expected_float}, ${2:actual_float} diff --git a/sources_non_forked/snipmate-snippets/ruby/asnie.snippet b/sources_non_forked/snipmate-snippets/ruby/asnie.snippet deleted file mode 100644 index 25eb7515..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/asnie.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_not_in_epsilon ${1:expected_float}, ${2:actual_float} diff --git a/sources_non_forked/snipmate-snippets/ruby/asnm.snippet b/sources_non_forked/snipmate-snippets/ruby/asnm.snippet deleted file mode 100644 index 95dbf247..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/asnm.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_no_match /${1:unexpected_pattern}/, ${2:actual_string} diff --git a/sources_non_forked/snipmate-snippets/ruby/asnn.snippet b/sources_non_forked/snipmate-snippets/ruby/asnn.snippet deleted file mode 100644 index 9227bc8a..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/asnn.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_not_nil ${1:instance} diff --git a/sources_non_forked/snipmate-snippets/ruby/asnp.snippet b/sources_non_forked/snipmate-snippets/ruby/asnp.snippet deleted file mode 100644 index a540f84d..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/asnp.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_not_predicate ${1:object}, ${2:predicate} diff --git a/sources_non_forked/snipmate-snippets/ruby/asnr.snippet b/sources_non_forked/snipmate-snippets/ruby/asnr.snippet deleted file mode 100644 index fc9a8204..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/asnr.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_nothing_raised { ${1:block} } diff --git a/sources_non_forked/snipmate-snippets/ruby/asnrt.snippet b/sources_non_forked/snipmate-snippets/ruby/asnrt.snippet deleted file mode 100644 index fb063d28..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/asnrt.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_not_respond_to ${1:object}, ${2:method} diff --git a/sources_non_forked/snipmate-snippets/ruby/asns.snippet b/sources_non_forked/snipmate-snippets/ruby/asns.snippet deleted file mode 100644 index 509e467a..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/asns.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_not_same ${1:unexpected}, ${2:actual} diff --git a/sources_non_forked/snipmate-snippets/ruby/asnse.snippet b/sources_non_forked/snipmate-snippets/ruby/asnse.snippet deleted file mode 100644 index befde129..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/asnse.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_not_send ${1:send_array} diff --git a/sources_non_forked/snipmate-snippets/ruby/asnt.snippet b/sources_non_forked/snipmate-snippets/ruby/asnt.snippet deleted file mode 100644 index cb633c22..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/asnt.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_nothing_thrown { ${1} } diff --git a/sources_non_forked/snipmate-snippets/ruby/aso.snippet b/sources_non_forked/snipmate-snippets/ruby/aso.snippet deleted file mode 100644 index 5b7faf64..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/aso.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_operator ${1:left}, :${2:operator}, ${3:right} diff --git a/sources_non_forked/snipmate-snippets/ruby/asp.snippet b/sources_non_forked/snipmate-snippets/ruby/asp.snippet deleted file mode 100644 index c23fd3f6..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/asp.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_predicate ${1:object}, ${2:predicate} diff --git a/sources_non_forked/snipmate-snippets/ruby/aspe.snippet b/sources_non_forked/snipmate-snippets/ruby/aspe.snippet deleted file mode 100644 index 3a3eed4f..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/aspe.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_path_exist ${1:path} diff --git a/sources_non_forked/snipmate-snippets/ruby/aspne.snippet b/sources_non_forked/snipmate-snippets/ruby/aspne.snippet deleted file mode 100644 index f7a8873a..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/aspne.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_path_not_exist ${1:path} diff --git a/sources_non_forked/snipmate-snippets/ruby/asr.snippet b/sources_non_forked/snipmate-snippets/ruby/asr.snippet deleted file mode 100644 index 834038d5..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/asr.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_raise(${1:Exception}) { ${2} } diff --git a/sources_non_forked/snipmate-snippets/ruby/asrko.snippet b/sources_non_forked/snipmate-snippets/ruby/asrko.snippet deleted file mode 100644 index f82820ed..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/asrko.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_raise_kind_of(${1:kinds...}) { ${2:block} } diff --git a/sources_non_forked/snipmate-snippets/ruby/asrm.snippet b/sources_non_forked/snipmate-snippets/ruby/asrm.snippet deleted file mode 100644 index f62f208b..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/asrm.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_raise_message ${1:expected_message} diff --git a/sources_non_forked/snipmate-snippets/ruby/asrt.snippet b/sources_non_forked/snipmate-snippets/ruby/asrt.snippet deleted file mode 100644 index ca8e84b7..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/asrt.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_respond_to ${1:object}, :${2:method} diff --git a/sources_non_forked/snipmate-snippets/ruby/asse.snippet b/sources_non_forked/snipmate-snippets/ruby/asse.snippet deleted file mode 100644 index 4fb9ef9a..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/asse.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_send ${1:send_array} diff --git a/sources_non_forked/snipmate-snippets/ruby/ast.snippet b/sources_non_forked/snipmate-snippets/ruby/ast.snippet deleted file mode 100644 index 8962cfb7..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/ast.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_throws(:${1:expected}) { ${2} } diff --git a/sources_non_forked/snipmate-snippets/ruby/astr.snippet b/sources_non_forked/snipmate-snippets/ruby/astr.snippet deleted file mode 100644 index b9d14f6e..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/astr.snippet +++ /dev/null @@ -1 +0,0 @@ -assert_true ${1:actual} diff --git a/sources_non_forked/snipmate-snippets/ruby/bm.snippet b/sources_non_forked/snipmate-snippets/ruby/bm.snippet deleted file mode 100644 index 681c5621..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/bm.snippet +++ /dev/null @@ -1,4 +0,0 @@ -TESTS = ${1:10_000} -Benchmark.bmbm do |results| - ${2} -end diff --git a/sources_non_forked/snipmate-snippets/ruby/case.snippet b/sources_non_forked/snipmate-snippets/ruby/case.snippet deleted file mode 100644 index 085a45db..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/case.snippet +++ /dev/null @@ -1,5 +0,0 @@ -case ${1} -when ${2} -else - ${3} -end diff --git a/sources_non_forked/snipmate-snippets/ruby/class.snippet b/sources_non_forked/snipmate-snippets/ruby/class.snippet deleted file mode 100644 index cb396704..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/class.snippet +++ /dev/null @@ -1,3 +0,0 @@ -class ${1:`Snippet_RubyClassNameFromFilename()`}${2} - ${3} -end diff --git a/sources_non_forked/snipmate-snippets/ruby/classe.snippet b/sources_non_forked/snipmate-snippets/ruby/classe.snippet deleted file mode 100644 index f683c688..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/classe.snippet +++ /dev/null @@ -1 +0,0 @@ -class ${1:ErrorClassName} < ${2:StandardError}; end${3} diff --git a/sources_non_forked/snipmate-snippets/ruby/def.snippet b/sources_non_forked/snipmate-snippets/ruby/def.snippet deleted file mode 100644 index ad9bc8cf..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/def.snippet +++ /dev/null @@ -1,3 +0,0 @@ -def ${1:name} - ${2} -end diff --git a/sources_non_forked/snipmate-snippets/ruby/defi.snippet b/sources_non_forked/snipmate-snippets/ruby/defi.snippet deleted file mode 100644 index 12c354c8..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/defi.snippet +++ /dev/null @@ -1,3 +0,0 @@ -def initialize${1} - ${2} -end diff --git a/sources_non_forked/snipmate-snippets/ruby/defmm.snippet b/sources_non_forked/snipmate-snippets/ruby/defmm.snippet deleted file mode 100644 index e3b263a8..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/defmm.snippet +++ /dev/null @@ -1,3 +0,0 @@ -def method_missing(meth, *args, &blk) - ${1} -end diff --git a/sources_non_forked/snipmate-snippets/ruby/defs.snippet b/sources_non_forked/snipmate-snippets/ruby/defs.snippet deleted file mode 100644 index 837733f2..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/defs.snippet +++ /dev/null @@ -1,3 +0,0 @@ -def self.${1:class_method_name} - ${2} -end diff --git a/sources_non_forked/snipmate-snippets/ruby/deft.snippet b/sources_non_forked/snipmate-snippets/ruby/deft.snippet deleted file mode 100644 index 9c2adbff..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/deft.snippet +++ /dev/null @@ -1,3 +0,0 @@ -def test_${1:case_name} - ${2} -end diff --git a/sources_non_forked/snipmate-snippets/ruby/detect.snippet b/sources_non_forked/snipmate-snippets/ruby/detect.snippet deleted file mode 100644 index 5fc24aaa..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/detect.snippet +++ /dev/null @@ -1 +0,0 @@ -detect { |${1:element}| ${2:body} } diff --git a/sources_non_forked/snipmate-snippets/ruby/detecto.snippet b/sources_non_forked/snipmate-snippets/ruby/detecto.snippet deleted file mode 100644 index 904b2a67..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/detecto.snippet +++ /dev/null @@ -1,3 +0,0 @@ -detect do |${1:element}| - ${2:body} -end diff --git a/sources_non_forked/snipmate-snippets/ruby/dglob.snippet b/sources_non_forked/snipmate-snippets/ruby/dglob.snippet deleted file mode 100644 index ca326ade..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/dglob.snippet +++ /dev/null @@ -1 +0,0 @@ -Dir.glob(${1:"<+dir}"+>) { |${2:file}| ${3} } diff --git a/sources_non_forked/snipmate-snippets/ruby/do.snippet b/sources_non_forked/snipmate-snippets/ruby/do.snippet deleted file mode 100644 index 596c11a9..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/do.snippet +++ /dev/null @@ -1,3 +0,0 @@ -do - ${1} -end diff --git a/sources_non_forked/snipmate-snippets/ruby/dop.snippet b/sources_non_forked/snipmate-snippets/ruby/dop.snippet deleted file mode 100644 index 9bf1898a..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/dop.snippet +++ /dev/null @@ -1,3 +0,0 @@ -do |${1:param}| - ${2} -end diff --git a/sources_non_forked/snipmate-snippets/ruby/ea.snippet b/sources_non_forked/snipmate-snippets/ruby/ea.snippet deleted file mode 100644 index 5f7edec0..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/ea.snippet +++ /dev/null @@ -1 +0,0 @@ -each { |${1:element}| ${2:body} } diff --git a/sources_non_forked/snipmate-snippets/ruby/each.snippet b/sources_non_forked/snipmate-snippets/ruby/each.snippet deleted file mode 100644 index 5f7edec0..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/each.snippet +++ /dev/null @@ -1 +0,0 @@ -each { |${1:element}| ${2:body} } diff --git a/sources_non_forked/snipmate-snippets/ruby/each_with_index.snippet b/sources_non_forked/snipmate-snippets/ruby/each_with_index.snippet deleted file mode 100644 index f4d3ef11..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/each_with_index.snippet +++ /dev/null @@ -1 +0,0 @@ -each_with_index { |${1:element},${2:i}| ${3:} } diff --git a/sources_non_forked/snipmate-snippets/ruby/each_with_indexo.snippet b/sources_non_forked/snipmate-snippets/ruby/each_with_indexo.snippet deleted file mode 100644 index e4fb7080..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/each_with_indexo.snippet +++ /dev/null @@ -1,4 +0,0 @@ -each_with_index do |${1:element},${2:i}| - ${3:body} -end - diff --git a/sources_non_forked/snipmate-snippets/ruby/eacho.snippet b/sources_non_forked/snipmate-snippets/ruby/eacho.snippet deleted file mode 100644 index 7c133426..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/eacho.snippet +++ /dev/null @@ -1,3 +0,0 @@ -each do |${1:element}| - ${2:body} -end diff --git a/sources_non_forked/snipmate-snippets/ruby/eado.snippet b/sources_non_forked/snipmate-snippets/ruby/eado.snippet deleted file mode 100644 index 7c133426..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/eado.snippet +++ /dev/null @@ -1,3 +0,0 @@ -each do |${1:element}| - ${2:body} -end diff --git a/sources_non_forked/snipmate-snippets/ruby/eawi.snippet b/sources_non_forked/snipmate-snippets/ruby/eawi.snippet deleted file mode 100644 index f4d3ef11..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/eawi.snippet +++ /dev/null @@ -1 +0,0 @@ -each_with_index { |${1:element},${2:i}| ${3:} } diff --git a/sources_non_forked/snipmate-snippets/ruby/eawido.snippet b/sources_non_forked/snipmate-snippets/ruby/eawido.snippet deleted file mode 100644 index e4fb7080..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/eawido.snippet +++ /dev/null @@ -1,4 +0,0 @@ -each_with_index do |${1:element},${2:i}| - ${3:body} -end - diff --git a/sources_non_forked/snipmate-snippets/ruby/elsif.snippet b/sources_non_forked/snipmate-snippets/ruby/elsif.snippet deleted file mode 100644 index 84d8134e..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/elsif.snippet +++ /dev/null @@ -1,2 +0,0 @@ -elsif ${1:condition} - ${2} diff --git a/sources_non_forked/snipmate-snippets/ruby/fileeach.snippet b/sources_non_forked/snipmate-snippets/ruby/fileeach.snippet deleted file mode 100644 index 5076ef1a..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/fileeach.snippet +++ /dev/null @@ -1 +0,0 @@ -File.foreach(${1:"<+path}"+>) { |${2:line}| ${3} } diff --git a/sources_non_forked/snipmate-snippets/ruby/fopen.snippet b/sources_non_forked/snipmate-snippets/ruby/fopen.snippet deleted file mode 100644 index b630bfeb..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/fopen.snippet +++ /dev/null @@ -1 +0,0 @@ -File.open(${1:path}, "${2:rwab}") { |${3:file}| ${4} } diff --git a/sources_non_forked/snipmate-snippets/ruby/fread.snippet b/sources_non_forked/snipmate-snippets/ruby/fread.snippet deleted file mode 100644 index d9e6074c..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/fread.snippet +++ /dev/null @@ -1 +0,0 @@ -File.read(${1}) diff --git a/sources_non_forked/snipmate-snippets/ruby/http_get.snippet b/sources_non_forked/snipmate-snippets/ruby/http_get.snippet deleted file mode 100644 index cba6d589..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/http_get.snippet +++ /dev/null @@ -1,2 +0,0 @@ -require 'net/http' -res = Net::HTTP.get URI.parse('${1:url}') diff --git a/sources_non_forked/snipmate-snippets/ruby/http_post.snippet b/sources_non_forked/snipmate-snippets/ruby/http_post.snippet deleted file mode 100644 index 3b2036ad..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/http_post.snippet +++ /dev/null @@ -1,2 +0,0 @@ -require 'net/http' -res = Net::HTTP.post_form URI.parse('${1:url}')${2:, params} diff --git a/sources_non_forked/snipmate-snippets/ruby/if.snippet b/sources_non_forked/snipmate-snippets/ruby/if.snippet deleted file mode 100644 index b2d1e39e..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/if.snippet +++ /dev/null @@ -1,3 +0,0 @@ -if ${1:condition} - ${2} -end diff --git a/sources_non_forked/snipmate-snippets/ruby/ife.snippet b/sources_non_forked/snipmate-snippets/ruby/ife.snippet deleted file mode 100644 index 2a7468df..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/ife.snippet +++ /dev/null @@ -1,4 +0,0 @@ -if ${1:condition} - ${2} -else -end diff --git a/sources_non_forked/snipmate-snippets/ruby/inj.snippet b/sources_non_forked/snipmate-snippets/ruby/inj.snippet deleted file mode 100644 index 90dea0d8..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/inj.snippet +++ /dev/null @@ -1 +0,0 @@ -inject(${1:init}) { |${2:total}, ${3:next}| ${4:body} } diff --git a/sources_non_forked/snipmate-snippets/ruby/injdo.snippet b/sources_non_forked/snipmate-snippets/ruby/injdo.snippet deleted file mode 100644 index d3235e90..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/injdo.snippet +++ /dev/null @@ -1,3 +0,0 @@ -inject(${1:init}) do |${2:total}, ${3:next}| - ${4:body} -end diff --git a/sources_non_forked/snipmate-snippets/ruby/inject.snippet b/sources_non_forked/snipmate-snippets/ruby/inject.snippet deleted file mode 100644 index 78ad721d..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/inject.snippet +++ /dev/null @@ -1 +0,0 @@ -inject { |${1:total},${2:next}| ${3:body} } diff --git a/sources_non_forked/snipmate-snippets/ruby/injecto.snippet b/sources_non_forked/snipmate-snippets/ruby/injecto.snippet deleted file mode 100644 index 1631033d..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/injecto.snippet +++ /dev/null @@ -1,3 +0,0 @@ -inject do |${1:total},${2:next}| - ${3:body} -end diff --git a/sources_non_forked/snipmate-snippets/ruby/ip.snippet b/sources_non_forked/snipmate-snippets/ruby/ip.snippet deleted file mode 100644 index 91769768..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/ip.snippet +++ /dev/null @@ -1 +0,0 @@ -ip_addr = request.env['REMOTE_ADDR'] diff --git a/sources_non_forked/snipmate-snippets/ruby/map.snippet b/sources_non_forked/snipmate-snippets/ruby/map.snippet deleted file mode 100644 index b3e7719f..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/map.snippet +++ /dev/null @@ -1 +0,0 @@ -map { |${1:element}| ${2:body} } diff --git a/sources_non_forked/snipmate-snippets/ruby/mapdo.snippet b/sources_non_forked/snipmate-snippets/ruby/mapdo.snippet deleted file mode 100644 index 316e7c7c..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/mapdo.snippet +++ /dev/null @@ -1,3 +0,0 @@ -map do |${1:element}| - ${2:body} -end diff --git a/sources_non_forked/snipmate-snippets/ruby/mapo.snippet b/sources_non_forked/snipmate-snippets/ruby/mapo.snippet deleted file mode 100644 index 316e7c7c..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/mapo.snippet +++ /dev/null @@ -1,3 +0,0 @@ -map do |${1:element}| - ${2:body} -end diff --git a/sources_non_forked/snipmate-snippets/ruby/mod.snippet b/sources_non_forked/snipmate-snippets/ruby/mod.snippet deleted file mode 100644 index 457fd615..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/mod.snippet +++ /dev/null @@ -1,3 +0,0 @@ -module ${1:`Snippet_RubyClassNameFromFilename()`} - ${2} -end diff --git a/sources_non_forked/snipmate-snippets/ruby/module.snippet b/sources_non_forked/snipmate-snippets/ruby/module.snippet deleted file mode 100644 index 78e025a1..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/module.snippet +++ /dev/null @@ -1,14 +0,0 @@ -module ${1:`Snippet_RubyClassNameFromFilename()`} - module ClassMethods - ${2} - end - - module InstanceMethods - - end - - def self.included(receiver) - receiver.extend ClassMethods - receiver.send :include, InstanceMethods - end -end diff --git a/sources_non_forked/snipmate-snippets/ruby/nam.snippet b/sources_non_forked/snipmate-snippets/ruby/nam.snippet deleted file mode 100644 index 19b90a76..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/nam.snippet +++ /dev/null @@ -1,3 +0,0 @@ -namespace :${1:namespace} do - ${2} -end diff --git a/sources_non_forked/snipmate-snippets/ruby/ope.snippet b/sources_non_forked/snipmate-snippets/ruby/ope.snippet deleted file mode 100644 index cfe92471..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/ope.snippet +++ /dev/null @@ -1 +0,0 @@ -open(${1:path}, "${2:rwab}") { |${3:io}| ${4} } diff --git a/sources_non_forked/snipmate-snippets/ruby/pathhere.snippet b/sources_non_forked/snipmate-snippets/ruby/pathhere.snippet deleted file mode 100644 index f4ed9440..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/pathhere.snippet +++ /dev/null @@ -1 +0,0 @@ -File.join(File.dirname(__FILE__), *%w[${1:rel_path_here}]) diff --git a/sources_non_forked/snipmate-snippets/ruby/r.snippet b/sources_non_forked/snipmate-snippets/ruby/r.snippet deleted file mode 100644 index f232fc94..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/r.snippet +++ /dev/null @@ -1 +0,0 @@ -attr_reader :${1:attr_names} diff --git a/sources_non_forked/snipmate-snippets/ruby/reject.snippet b/sources_non_forked/snipmate-snippets/ruby/reject.snippet deleted file mode 100644 index 07d2787f..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/reject.snippet +++ /dev/null @@ -1 +0,0 @@ -reject { |${1:element}| ${2:body} } diff --git a/sources_non_forked/snipmate-snippets/ruby/rejecto.snippet b/sources_non_forked/snipmate-snippets/ruby/rejecto.snippet deleted file mode 100644 index e906bd7e..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/rejecto.snippet +++ /dev/null @@ -1,3 +0,0 @@ -reject do |${1:element}| - ${2:body} -end diff --git a/sources_non_forked/snipmate-snippets/ruby/rep.snippet b/sources_non_forked/snipmate-snippets/ruby/rep.snippet deleted file mode 100644 index 04b77b0d..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/rep.snippet +++ /dev/null @@ -1 +0,0 @@ -results.report("${1:name}:") { TESTS.times { ${2} } } diff --git a/sources_non_forked/snipmate-snippets/ruby/rw.snippet b/sources_non_forked/snipmate-snippets/ruby/rw.snippet deleted file mode 100644 index 1862da33..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/rw.snippet +++ /dev/null @@ -1 +0,0 @@ -attr_accessor :${1:attr_names} diff --git a/sources_non_forked/snipmate-snippets/ruby/select.snippet b/sources_non_forked/snipmate-snippets/ruby/select.snippet deleted file mode 100644 index 8ab228cc..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/select.snippet +++ /dev/null @@ -1 +0,0 @@ -select { |${1:element}| ${2:body} } diff --git a/sources_non_forked/snipmate-snippets/ruby/selecto.snippet b/sources_non_forked/snipmate-snippets/ruby/selecto.snippet deleted file mode 100644 index a22a6505..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/selecto.snippet +++ /dev/null @@ -1,3 +0,0 @@ -select do |${1:element}| - ${2:body} -end diff --git a/sources_non_forked/snipmate-snippets/ruby/sinc.snippet b/sources_non_forked/snipmate-snippets/ruby/sinc.snippet deleted file mode 100644 index 20e2c4c9..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/sinc.snippet +++ /dev/null @@ -1 +0,0 @@ -class << self; self end diff --git a/sources_non_forked/snipmate-snippets/ruby/sort.snippet b/sources_non_forked/snipmate-snippets/ruby/sort.snippet deleted file mode 100644 index 08a67c1a..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/sort.snippet +++ /dev/null @@ -1 +0,0 @@ -sort { |${1:x},${2:y}| ${3:body} } diff --git a/sources_non_forked/snipmate-snippets/ruby/sorto.snippet b/sources_non_forked/snipmate-snippets/ruby/sorto.snippet deleted file mode 100644 index 76c38e40..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/sorto.snippet +++ /dev/null @@ -1,3 +0,0 @@ -sort do |${1:x},${2:y}| - ${3:body} -end diff --git a/sources_non_forked/snipmate-snippets/ruby/tas.snippet b/sources_non_forked/snipmate-snippets/ruby/tas.snippet deleted file mode 100644 index d949a6b5..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/tas.snippet +++ /dev/null @@ -1,4 +0,0 @@ -desc "${1:Task description}" -task :${2:task_name}${3: => [:dependent, :tasks]} do - ${4} -end diff --git a/sources_non_forked/snipmate-snippets/ruby/task.snippet b/sources_non_forked/snipmate-snippets/ruby/task.snippet deleted file mode 100644 index d949a6b5..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/task.snippet +++ /dev/null @@ -1,4 +0,0 @@ -desc "${1:Task description}" -task :${2:task_name}${3: => [:dependent, :tasks]} do - ${4} -end diff --git a/sources_non_forked/snipmate-snippets/ruby/tc.snippet b/sources_non_forked/snipmate-snippets/ruby/tc.snippet deleted file mode 100644 index 3e28f61a..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/tc.snippet +++ /dev/null @@ -1,9 +0,0 @@ -require "test/unit" - -require "${1:library_file_name}" - -class Test${2:`Snippet_RubyClassNameFromFilename()`} < Test::Unit::TestCase - def test_${3:case_name} - ${4} - end -end diff --git a/sources_non_forked/snipmate-snippets/ruby/unless.snippet b/sources_non_forked/snipmate-snippets/ruby/unless.snippet deleted file mode 100644 index 3495d2ba..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/unless.snippet +++ /dev/null @@ -1,3 +0,0 @@ -unless ${1:condition} - ${2} -end diff --git a/sources_non_forked/snipmate-snippets/ruby/unlesse.snippet b/sources_non_forked/snipmate-snippets/ruby/unlesse.snippet deleted file mode 100644 index d190b45e..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/unlesse.snippet +++ /dev/null @@ -1,4 +0,0 @@ -unless ${1:condition} - ${2} -else -end diff --git a/sources_non_forked/snipmate-snippets/ruby/w.snippet b/sources_non_forked/snipmate-snippets/ruby/w.snippet deleted file mode 100644 index 0650e955..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/w.snippet +++ /dev/null @@ -1 +0,0 @@ -attr_writer :${1:attr_names} diff --git a/sources_non_forked/snipmate-snippets/ruby/while.snippet b/sources_non_forked/snipmate-snippets/ruby/while.snippet deleted file mode 100644 index 6e878fa3..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/while.snippet +++ /dev/null @@ -1,3 +0,0 @@ -while ${1:condition} - ${2} -end diff --git a/sources_non_forked/snipmate-snippets/ruby/xmlr.snippet b/sources_non_forked/snipmate-snippets/ruby/xmlr.snippet deleted file mode 100644 index eeb35802..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/xmlr.snippet +++ /dev/null @@ -1 +0,0 @@ -REXML::Document.new(File.read(${1:path})) diff --git a/sources_non_forked/snipmate-snippets/ruby/xpa.snippet b/sources_non_forked/snipmate-snippets/ruby/xpa.snippet deleted file mode 100644 index 5bff9508..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/xpa.snippet +++ /dev/null @@ -1,3 +0,0 @@ -elements.each(${1}) do |${2:node}| - ${3} -end diff --git a/sources_non_forked/snipmate-snippets/ruby/zip.snippet b/sources_non_forked/snipmate-snippets/ruby/zip.snippet deleted file mode 100644 index b2c831ab..00000000 --- a/sources_non_forked/snipmate-snippets/ruby/zip.snippet +++ /dev/null @@ -1 +0,0 @@ -zip(${1:enums}) { |${2:row}| ${3} } diff --git a/sources_non_forked/snipmate-snippets/sinatra/get.snippet b/sources_non_forked/snipmate-snippets/sinatra/get.snippet deleted file mode 100644 index 08f3fd5a..00000000 --- a/sources_non_forked/snipmate-snippets/sinatra/get.snippet +++ /dev/null @@ -1,3 +0,0 @@ -get '${1:/}' do - ${2} -end diff --git a/sources_non_forked/snipmate-snippets/sshconfig/host.snippet b/sources_non_forked/snipmate-snippets/sshconfig/host.snippet deleted file mode 100644 index 5992a2d0..00000000 --- a/sources_non_forked/snipmate-snippets/sshconfig/host.snippet +++ /dev/null @@ -1,3 +0,0 @@ -Host ${1:name} - Hostname ${2:example.com} - User ${3:username} diff --git a/sources_non_forked/snipmate-snippets/support_functions.vim b/sources_non_forked/snipmate-snippets/support_functions.vim deleted file mode 100644 index a09e81da..00000000 --- a/sources_non_forked/snipmate-snippets/support_functions.vim +++ /dev/null @@ -1,115 +0,0 @@ -"ruby {{{1 -function! Snippet_RubyClassNameFromFilename(...) - let name = expand("%:t:r") - if len(name) == 0 - if a:0 == 0 - let name = 'MyClass' - else - let name = a:1 - endif - endif - return Snippet_Camelcase(substitute(name, '_spec$', '', '')) -endfunction - -function! Snippet_MigrationNameFromFilename(...) - let name = substitute(expand("%:t:r"), '^.\{-}_', '', '') - if len(name) == 0 - if a:0 == 0 - let name = 'MyClass' - else - let name = a:1 - endif - endif - return Snippet_Camelcase(name) -endfunction - - -"python {{{1 -function! Snippet_PythonClassNameFromFilename(...) - let name = expand("%:t:r") - if len(name) == 0 - if a:0 == 0 - let name = 'MyClass' - else - let name = a:1 - endif - endif - return Snippet_Camelcase(name) -endfunction - -"php {{{1 -function! Snippet_PHPClassNameFromFilename(...) - let name = expand("%:t:r:r") - if len(name) == 0 - if a:0 == 0 - let name = 'MyClass' - else - let name = a:1 - endif - endif - return name -endfunction - -"java {{{1 -function! Snippet_JavaClassNameFromFilename(...) - let name = expand("%:t:r") - if len(name) == 0 - if a:0 == 0 - let name = 'MyClass' - else - let name = a:1 - endif - endif - return name -endfunction - -function! Snippet_JavaInstanceVarType(name) - let oldview = winsaveview() - if searchdecl(a:name) == 0 - normal! B - let old_reg = @" - normal! yaW - let type = @" - let @" = old_reg - call winrestview(oldview) - let type = substitute(type, '\s\+$', '', '') - - "searchdecl treats 'return foo;' as a declaration of foo - if type != 'return' - return type - endif - endif - return "<+type+>" -endfunction - - -"global {{{1 -function! s:start_comment() - return substitute(&commentstring, '^\([^ ]*\)\s*%s\(.*\)$', '\1', '') -endfunction - -function! s:end_comment() - return substitute(&commentstring, '^.*%s\(.*\)$', '\1', '') -endfunction - -function! Snippet_Modeline() - return s:start_comment() . " vim: set ${1:settings}:" . s:end_comment() -endfunction - -function! Snippet_Camelcase(s) - "upcase the first letter - let toReturn = substitute(a:s, '^\(.\)', '\=toupper(submatch(1))', '') - "turn all '_x' into 'X' - return substitute(toReturn, '_\(.\)', '\=toupper(submatch(1))', 'g') -endfunction - -function! Snippet_Underscore(s) - "down the first letter - let toReturn = substitute(a:s, '^\(.\)', '\=tolower(submatch(1))', '') - "turn all 'X' into '_x' - return substitute(toReturn, '\([A-Z]\)', '\=tolower("_".submatch(1))', 'g') -endfunction - - -" modeline {{{1 -" vim: set fdm=marker: diff --git a/sources_non_forked/snipmate-snippets/vim/au.snippet b/sources_non_forked/snipmate-snippets/vim/au.snippet deleted file mode 100644 index d59720a5..00000000 --- a/sources_non_forked/snipmate-snippets/vim/au.snippet +++ /dev/null @@ -1 +0,0 @@ -autocmd ${1:events} ${2:pattern} ${3:command} diff --git a/sources_non_forked/snipmate-snippets/vim/com.snippet b/sources_non_forked/snipmate-snippets/vim/com.snippet deleted file mode 100644 index b8eeb5b4..00000000 --- a/sources_non_forked/snipmate-snippets/vim/com.snippet +++ /dev/null @@ -1 +0,0 @@ -command! -nargs=${1:number_of_args} ${2:other_params} ${2:name} ${2:command} diff --git a/sources_non_forked/snipmate-snippets/vim/func.snippet b/sources_non_forked/snipmate-snippets/vim/func.snippet deleted file mode 100644 index 8591a835..00000000 --- a/sources_non_forked/snipmate-snippets/vim/func.snippet +++ /dev/null @@ -1,8 +0,0 @@ -"Function: $1 -"Desc: ${3:description} -" -"Arguments: -"${4} -function! ${1:name}(${2}) - ${5} -endfunction diff --git a/sources_non_forked/snipmate-snippets/vim/if.snippet b/sources_non_forked/snipmate-snippets/vim/if.snippet deleted file mode 100644 index 336e7a00..00000000 --- a/sources_non_forked/snipmate-snippets/vim/if.snippet +++ /dev/null @@ -1,3 +0,0 @@ -if ${1} - ${2} -endif diff --git a/sources_non_forked/snipmate-snippets/vim/ife.snippet b/sources_non_forked/snipmate-snippets/vim/ife.snippet deleted file mode 100644 index c5d16939..00000000 --- a/sources_non_forked/snipmate-snippets/vim/ife.snippet +++ /dev/null @@ -1,4 +0,0 @@ -if ${1} - ${2} -else -endif diff --git a/sources_non_forked/snipmate-snippets/vim/log.snippet b/sources_non_forked/snipmate-snippets/vim/log.snippet deleted file mode 100644 index 5a867549..00000000 --- a/sources_non_forked/snipmate-snippets/vim/log.snippet +++ /dev/null @@ -1 +0,0 @@ -echomsg ${1} diff --git a/sources_non_forked/snipmate-snippets/vim/try.snippet b/sources_non_forked/snipmate-snippets/vim/try.snippet deleted file mode 100644 index cd4c0e72..00000000 --- a/sources_non_forked/snipmate-snippets/vim/try.snippet +++ /dev/null @@ -1,4 +0,0 @@ -try - ${2} -catch /${1}/ -endtry diff --git a/sources_non_forked/snipmate-snippets/xslt/call.snippet b/sources_non_forked/snipmate-snippets/xslt/call.snippet deleted file mode 100644 index 2fe4f9d1..00000000 --- a/sources_non_forked/snipmate-snippets/xslt/call.snippet +++ /dev/null @@ -1,3 +0,0 @@ - - ${2} - diff --git a/sources_non_forked/snipmate-snippets/xslt/choose.snippet b/sources_non_forked/snipmate-snippets/xslt/choose.snippet deleted file mode 100644 index 1a877543..00000000 --- a/sources_non_forked/snipmate-snippets/xslt/choose.snippet +++ /dev/null @@ -1,7 +0,0 @@ - - - ${2} - - - - diff --git a/sources_non_forked/snipmate-snippets/xslt/mat.snippet b/sources_non_forked/snipmate-snippets/xslt/mat.snippet deleted file mode 100644 index a566e0ec..00000000 --- a/sources_non_forked/snipmate-snippets/xslt/mat.snippet +++ /dev/null @@ -1,3 +0,0 @@ - - ${2} - diff --git a/sources_non_forked/snipmate-snippets/xslt/out.snippet b/sources_non_forked/snipmate-snippets/xslt/out.snippet deleted file mode 100644 index 88e70c21..00000000 --- a/sources_non_forked/snipmate-snippets/xslt/out.snippet +++ /dev/null @@ -1 +0,0 @@ - diff --git a/sources_non_forked/snipmate-snippets/xslt/param.snippet b/sources_non_forked/snipmate-snippets/xslt/param.snippet deleted file mode 100644 index f4f9a504..00000000 --- a/sources_non_forked/snipmate-snippets/xslt/param.snippet +++ /dev/null @@ -1 +0,0 @@ - diff --git a/sources_non_forked/snipmate-snippets/xslt/sty.snippet b/sources_non_forked/snipmate-snippets/xslt/sty.snippet deleted file mode 100644 index f6751c74..00000000 --- a/sources_non_forked/snipmate-snippets/xslt/sty.snippet +++ /dev/null @@ -1,3 +0,0 @@ - - ${1} - diff --git a/sources_non_forked/snipmate-snippets/xslt/tem.snippet b/sources_non_forked/snipmate-snippets/xslt/tem.snippet deleted file mode 100644 index bcd86d6d..00000000 --- a/sources_non_forked/snipmate-snippets/xslt/tem.snippet +++ /dev/null @@ -1,3 +0,0 @@ - - ${2} - diff --git a/sources_non_forked/snipmate-snippets/xslt/value.snippet b/sources_non_forked/snipmate-snippets/xslt/value.snippet deleted file mode 100644 index 9128cc6d..00000000 --- a/sources_non_forked/snipmate-snippets/xslt/value.snippet +++ /dev/null @@ -1 +0,0 @@ - diff --git a/sources_non_forked/snipmate-snippets/xslt/var.snippet b/sources_non_forked/snipmate-snippets/xslt/var.snippet deleted file mode 100644 index d21b77c8..00000000 --- a/sources_non_forked/snipmate-snippets/xslt/var.snippet +++ /dev/null @@ -1,3 +0,0 @@ - - ${2} - diff --git a/sources_non_forked/snipmate-snippets/xslt/wparam.snippet b/sources_non_forked/snipmate-snippets/xslt/wparam.snippet deleted file mode 100644 index 2284b71c..00000000 --- a/sources_non_forked/snipmate-snippets/xslt/wparam.snippet +++ /dev/null @@ -1 +0,0 @@ - diff --git a/sources_non_forked/snipmate-snippets/xslt/xdec.snippet b/sources_non_forked/snipmate-snippets/xslt/xdec.snippet deleted file mode 100644 index f1e44209..00000000 --- a/sources_non_forked/snipmate-snippets/xslt/xdec.snippet +++ /dev/null @@ -1,2 +0,0 @@ - - ${2} diff --git a/sources_non_forked/snipmate-snippets/zend/assert.snippet b/sources_non_forked/snipmate-snippets/zend/assert.snippet deleted file mode 100644 index ca928f25..00000000 --- a/sources_non_forked/snipmate-snippets/zend/assert.snippet +++ /dev/null @@ -1 +0,0 @@ -$this->assertTrue(${1:somevar}, '${2:sometext}'); diff --git a/sources_non_forked/snipmate-snippets/zend/boolcol.snippet b/sources_non_forked/snipmate-snippets/zend/boolcol.snippet deleted file mode 100644 index 715fe19c..00000000 --- a/sources_non_forked/snipmate-snippets/zend/boolcol.snippet +++ /dev/null @@ -1 +0,0 @@ -$this->hasColumn('${1:active}', '${2:boolean}', ${3:1}, array('default' => '${4:1}','notnull' => true)); diff --git a/sources_non_forked/snipmate-snippets/zend/clac.snippet b/sources_non_forked/snipmate-snippets/zend/clac.snippet deleted file mode 100644 index 80972a11..00000000 --- a/sources_non_forked/snipmate-snippets/zend/clac.snippet +++ /dev/null @@ -1,20 +0,0 @@ -_flashMessenger->addMessage("${1}", '${2:error}'); diff --git a/sources_non_forked/snipmate-snippets/zend/getconf.snippet b/sources_non_forked/snipmate-snippets/zend/getconf.snippet deleted file mode 100644 index 10f2b202..00000000 --- a/sources_non_forked/snipmate-snippets/zend/getconf.snippet +++ /dev/null @@ -1 +0,0 @@ -$${1:conf} = Zend_Registry::get('${2:config}')->${3:general}; diff --git a/sources_non_forked/snipmate-snippets/zend/input.snippet b/sources_non_forked/snipmate-snippets/zend/input.snippet deleted file mode 100644 index 3c4ed27e..00000000 --- a/sources_non_forked/snipmate-snippets/zend/input.snippet +++ /dev/null @@ -1,4 +0,0 @@ -formInput(array( 'type' => '${1:hidden}', - 'name' => '${2}', - 'value' => ${3:}, - 'id' => '${4:}' )); ?> diff --git a/sources_non_forked/snipmate-snippets/zend/inputarr.snippet b/sources_non_forked/snipmate-snippets/zend/inputarr.snippet deleted file mode 100644 index 8e97bee5..00000000 --- a/sources_non_forked/snipmate-snippets/zend/inputarr.snippet +++ /dev/null @@ -1,6 +0,0 @@ -formInput(array( 'type' => '${1:dropdown}', - 'name' => '${2}', - 'label' => '${3:}', - 'errors' => ${4:}, - 'value' => ${5:}, - 'valueList' => ${6:} )); ?> diff --git a/sources_non_forked/snipmate-snippets/zend/intcol.snippet b/sources_non_forked/snipmate-snippets/zend/intcol.snippet deleted file mode 100644 index caacaa61..00000000 --- a/sources_non_forked/snipmate-snippets/zend/intcol.snippet +++ /dev/null @@ -1 +0,0 @@ -$this->hasColumn('${1:id}', '${2:integer}', ${3:11}, array(${4:'notnull' => true)}); diff --git a/sources_non_forked/snipmate-snippets/zend/lib.snippet b/sources_non_forked/snipmate-snippets/zend/lib.snippet deleted file mode 100644 index 683e22ef..00000000 --- a/sources_non_forked/snipmate-snippets/zend/lib.snippet +++ /dev/null @@ -1,5 +0,0 @@ -hasColumn('id', 'integer', 4, array('notnull' => true, - 'primary' => true, - 'autoincrement' => true)); - ${3} - } - -} diff --git a/sources_non_forked/snipmate-snippets/zend/navi.snippet b/sources_non_forked/snipmate-snippets/zend/navi.snippet deleted file mode 100644 index 2724ff9f..00000000 --- a/sources_non_forked/snipmate-snippets/zend/navi.snippet +++ /dev/null @@ -1 +0,0 @@ -$this->view->navigationActive = array('topnavi' => '${1:home}','subnavi' => '${2:index}'); diff --git a/sources_non_forked/snipmate-snippets/zend/route.snippet b/sources_non_forked/snipmate-snippets/zend/route.snippet deleted file mode 100644 index cdf834b2..00000000 --- a/sources_non_forked/snipmate-snippets/zend/route.snippet +++ /dev/null @@ -1 +0,0 @@ -$this->_redirector->gotoRoute(array('controller' => '${1}', 'action' => '${2:index}', 'id' => '${3:}'), '${4:admin_action}'); diff --git a/sources_non_forked/snipmate-snippets/zend/rp.snippet b/sources_non_forked/snipmate-snippets/zend/rp.snippet deleted file mode 100644 index b5dcd1ff..00000000 --- a/sources_non_forked/snipmate-snippets/zend/rp.snippet +++ /dev/null @@ -1,2 +0,0 @@ -partial('${1:somefile}.phtml', - array(${2}))?> diff --git a/sources_non_forked/snipmate-snippets/zend/strcol.snippet b/sources_non_forked/snipmate-snippets/zend/strcol.snippet deleted file mode 100644 index 98d3cf34..00000000 --- a/sources_non_forked/snipmate-snippets/zend/strcol.snippet +++ /dev/null @@ -1 +0,0 @@ -$this->hasColumn('${1:title}', '${2:string}', ${3:255}, array(${4:'notnull' => true})); diff --git a/update_plugins.py b/update_plugins.py index a2799f6f..cbb08b7d 100644 --- a/update_plugins.py +++ b/update_plugins.py @@ -25,7 +25,6 @@ mayansmoke https://github.com/vim-scripts/mayansmoke nerdtree https://github.com/scrooloose/nerdtree nginx.vim https://github.com/chr4/nginx.vim open_file_under_cursor.vim https://github.com/amix/open_file_under_cursor.vim -snipmate-snippets https://github.com/scrooloose/snipmate-snippets tlib https://github.com/vim-scripts/tlib vim-addon-mw-utils https://github.com/MarcWeber/vim-addon-mw-utils vim-bundle-mako https://github.com/sophacles/vim-bundle-mako From 9c54d954f6f346f476869e69936fdb92193e7b0c Mon Sep 17 00:00:00 2001 From: amix Date: Sat, 30 Nov 2019 13:06:56 +0100 Subject: [PATCH 29/40] Updated plugins --- .../ale/autoload/ale/handlers/eslint.vim | 13 ++++-- sources_non_forked/nerdtree/CHANGELOG.md | 3 +- sources_non_forked/nerdtree/doc/NERDTree.txt | 8 ++++ .../nerdtree/nerdtree_plugin/vcs.vim | 9 ++++ .../rust.vim/autoload/cargo.vim | 12 ++++- sources_non_forked/rust.vim/autoload/rust.vim | 14 ++++-- sources_non_forked/rust.vim/doc/rust.txt | 11 ++++- sources_non_forked/rust.vim/ftplugin/rust.vim | 3 +- sources_non_forked/rust.vim/indent/rust.vim | 7 ++- sources_non_forked/rust.vim/syntax/rust.vim | 1 + sources_non_forked/rust.vim/test/indent.vader | 45 ++++++++++++++++++ .../vim-commentary/plugin/commentary.vim | 2 +- .../vim-fugitive/autoload/fugitive.vim | 28 ++++++----- .../vim-fugitive/plugin/fugitive.vim | 2 + sources_non_forked/vim-gitgutter/README.mkd | 32 +++++++++++-- .../vim-gitgutter/autoload/gitgutter.vim | 6 ++- .../vim-gitgutter/doc/gitgutter.txt | 13 +++++- .../vim-gitgutter/plugin/gitgutter.vim | 1 + .../vim-snippets/UltiSnips/rails.snippets | 8 ++-- .../vim-snippets/snippets/fortran.snippets | 46 +++++++++---------- .../vim-surround/plugin/surround.vim | 2 +- 21 files changed, 201 insertions(+), 65 deletions(-) diff --git a/sources_non_forked/ale/autoload/ale/handlers/eslint.vim b/sources_non_forked/ale/autoload/ale/handlers/eslint.vim index 4d533ff2..7ef63785 100644 --- a/sources_non_forked/ale/autoload/ale/handlers/eslint.vim +++ b/sources_non_forked/ale/autoload/ale/handlers/eslint.vim @@ -84,11 +84,14 @@ function! s:CheckForBadConfig(buffer, lines) abort endfunction function! s:parseJSON(buffer, lines) abort - try - let l:parsed = json_decode(a:lines[-1]) - catch - return [] - endtry + let l:parsed = [] + + for l:line in a:lines + try + let l:parsed = extend(l:parsed, json_decode(l:line)) + catch + endtry + endfor if type(l:parsed) != v:t_list || empty(l:parsed) return [] diff --git a/sources_non_forked/nerdtree/CHANGELOG.md b/sources_non_forked/nerdtree/CHANGELOG.md index ac12c9f0..fe5d51aa 100644 --- a/sources_non_forked/nerdtree/CHANGELOG.md +++ b/sources_non_forked/nerdtree/CHANGELOG.md @@ -7,7 +7,8 @@ in an unordered list. The format is: - **.PATCH**: Pull Request Title (PR Author) [PR Number](Link to PR) --> - +#### 6.3 +- **.0**: Add new command that behaves like NERDTreeToggle but defaults to the root of a VCS repository. (willfindlay) [#1060](https://github.com/scrooloose/nerdtree/pull/1060) #### 6.2 - **.1**: Menu option, 'copy path to clipboard' is aware of VIM clipboard option (jhzn) [#1056](https://github.com/scrooloose/nerdtree/pull/1056) - **.0**: Support tab-specific CWDs (PhilRunninger) [#1032](https://github.com/scrooloose/nerdtree/pull/1032) diff --git a/sources_non_forked/nerdtree/doc/NERDTree.txt b/sources_non_forked/nerdtree/doc/NERDTree.txt index 32b0b5d1..e88a6802 100644 --- a/sources_non_forked/nerdtree/doc/NERDTree.txt +++ b/sources_non_forked/nerdtree/doc/NERDTree.txt @@ -125,6 +125,14 @@ The following features and functionality are provided by the NERDTree: again. If no NERDTree exists for this tab then this command acts the same as the |:NERDTree| command. +:NERDTreeToggleVCS [ | ] *:NERDTreeToggleVCS* + Like |:NERDTreeToggle|, but searches up the directory tree to find the top of + the version control system repository, and roots the NERDTree there. It + works with Git, Subversion, Mercurial, Bazaar, and Darcs repositories. A + couple of examples: > + :NERDTreeToggleVCS /home/marty/nerdtree/doc (opens /home/marty/nerdtree) + :NERDTreeToggleVCS (opens root of repository containing CWD) + :NERDTreeFocus *:NERDTreeFocus* Opens (or reopens) the NERDTree if it is not currently visible; otherwise, the cursor is moved to the already-open NERDTree. diff --git a/sources_non_forked/nerdtree/nerdtree_plugin/vcs.vim b/sources_non_forked/nerdtree/nerdtree_plugin/vcs.vim index c30579ae..d9901b83 100644 --- a/sources_non_forked/nerdtree/nerdtree_plugin/vcs.vim +++ b/sources_non_forked/nerdtree/nerdtree_plugin/vcs.vim @@ -11,6 +11,7 @@ " " ============================================================================ command! -n=? -complete=dir -bar NERDTreeVCS :call CreateTabTreeVCS('') +command! -n=? -complete=dir -bar NERDTreeToggleVCS :call ToggleTabTreeVCS('') " FUNCTION: s:CreateTabTreeVCS(a:name) {{{1 function! s:CreateTabTreeVCS(name) @@ -19,6 +20,14 @@ function! s:CreateTabTreeVCS(name) call g:NERDTreeCreator.createTabTree(empty(l:path) ? "" : l:path._str()) endfunction +" FUNCTION: s:ToggleTabTreeVCS(a:name) {{{1 +" Behaves the same as ToggleTabTree except roots directory at VCS root +function! s:ToggleTabTreeVCS(name) + let l:path = g:NERDTreeCreator._pathForString(a:name) + let l:path = s:FindParentVCSRoot(l:path) + call g:NERDTreeCreator.toggleTabTree(empty(l:path) ? "" : l:path._str()) +endfunction + " FUNCTION: s:FindParentVCSRoot(a:path) {{{1 " Finds the root version control system folder of the given path. If a:path is " not part of a repository, return the original path. diff --git a/sources_non_forked/rust.vim/autoload/cargo.vim b/sources_non_forked/rust.vim/autoload/cargo.vim index b5d40e2f..01ab2ccc 100644 --- a/sources_non_forked/rust.vim/autoload/cargo.vim +++ b/sources_non_forked/rust.vim/autoload/cargo.vim @@ -3,7 +3,17 @@ function! cargo#Load() endfunction function! cargo#cmd(args) - execute "! cargo" a:args + " Trim trailing spaces. This is necessary since :terminal command parses + " trailing spaces as an empty argument. + let args = substitute(a:args, '\s\+$', '', '') + if has('terminal') + let cmd = 'terminal' + elseif has('nvim') + let cmd = 'noautocmd new | terminal' + else + let cmd = '!' + endif + execute cmd 'cargo' args endfunction function! s:nearest_cargo(...) abort diff --git a/sources_non_forked/rust.vim/autoload/rust.vim b/sources_non_forked/rust.vim/autoload/rust.vim index 080fa986..e0008ba5 100644 --- a/sources_non_forked/rust.vim/autoload/rust.vim +++ b/sources_non_forked/rust.vim/autoload/rust.vim @@ -1,4 +1,3 @@ -" Author: Kevin Ballard " Description: Helper functions for Rust commands/mappings " Last Modified: May 27, 2014 " For bugs, patches and license go to https://github.com/rust-lang/rust.vim @@ -508,16 +507,23 @@ function! s:SearchTestFunctionNameUnderCursor() abort return matchstr(getline(test_func_line), '\m\C^\s*fn\s\+\zs\h\w*') endfunction -function! rust#Test(all, options) abort +function! rust#Test(mods, winsize, all, options) abort let manifest = findfile('Cargo.toml', expand('%:p:h') . ';') if manifest ==# '' return rust#Run(1, '--test ' . a:options) endif + " defaults to 0, but we prefer an empty string + let winsize = a:winsize ? a:winsize : '' + if has('terminal') - let cmd = 'terminal ' + if has('patch-8.0.910') + let cmd = printf('%s noautocmd %snew | terminal ++curwin ', a:mods, winsize) + else + let cmd = printf('%s terminal ', a:mods) + endif elseif has('nvim') - let cmd = 'noautocmd new | terminal ' + let cmd = printf('%s noautocmd %snew | terminal ', a:mods, winsize) else let cmd = '!' let manifest = shellescape(manifest) diff --git a/sources_non_forked/rust.vim/doc/rust.txt b/sources_non_forked/rust.vim/doc/rust.txt index 2111e5ad..9ab018ed 100644 --- a/sources_non_forked/rust.vim/doc/rust.txt +++ b/sources_non_forked/rust.vim/doc/rust.txt @@ -426,12 +426,15 @@ functionality from other plugins. Running test(s) --------------- -:RustTest[!] [options] *:RustTest* +:[N]RustTest[!] [options] *:RustTest* Runs a test under the cursor when the current buffer is in a cargo project with "cargo test" command. If the command did not find any test function under the cursor, it stops with an error message. + When N is given, adjust the size of the new window to N lines + or columns. + When ! is given, runs all tests regardless of current cursor position. @@ -444,7 +447,11 @@ Running test(s) is no way to run specific test function with rustc. [options] is passed to "rustc" command arguments in the case. - + Takes optional modifiers (see ||): > + :tab RustTest + :belowright 16RustTest + :leftabove vert 80RustTest +< rust.vim Debugging ------------------ diff --git a/sources_non_forked/rust.vim/ftplugin/rust.vim b/sources_non_forked/rust.vim/ftplugin/rust.vim index d851a7a6..ac1b438a 100644 --- a/sources_non_forked/rust.vim/ftplugin/rust.vim +++ b/sources_non_forked/rust.vim/ftplugin/rust.vim @@ -1,7 +1,6 @@ " Language: Rust " Description: Vim ftplugin for Rust " Maintainer: Chris Morgan -" Maintainer: Kevin Ballard " Last Change: June 08, 2016 " For bugs, patches and license go to https://github.com/rust-lang/rust.vim @@ -137,7 +136,7 @@ command! -bar RustInfoToClipboard call rust#debugging#InfoToClipboard() command! -bar -nargs=1 RustInfoToFile call rust#debugging#InfoToFile() " See |:RustTest| for docs -command! -buffer -nargs=* -bang RustTest call rust#Test(0, ) +command! -buffer -nargs=* -count -bang RustTest call rust#Test(, , 0, ) if !exists("b:rust_last_rustc_args") || !exists("b:rust_last_args") let b:rust_last_rustc_args = [] diff --git a/sources_non_forked/rust.vim/indent/rust.vim b/sources_non_forked/rust.vim/indent/rust.vim index 78544989..6edce73f 100644 --- a/sources_non_forked/rust.vim/indent/rust.vim +++ b/sources_non_forked/rust.vim/indent/rust.vim @@ -191,7 +191,12 @@ function GetRustIndent(lnum) " A line that ends with '.;' is probably an end of a long list " of method operations. if prevline =~# '\V\^\s\*.' && l:last_prevline_character ==# ';' - return indent(prevlinenum) - s:shiftwidth() + call cursor(a:lnum - 1, 1) + let l:scope_start = searchpair('{\|(', '', '}\|)', 'nbW', + \ 's:is_string_comment(line("."), col("."))') + if l:scope_start != 0 && l:scope_start < a:lnum + return indent(l:scope_start) + 4 + endif endif if l:last_prevline_character ==# "," diff --git a/sources_non_forked/rust.vim/syntax/rust.vim b/sources_non_forked/rust.vim/syntax/rust.vim index 97d3c1cf..423e8fba 100644 --- a/sources_non_forked/rust.vim/syntax/rust.vim +++ b/sources_non_forked/rust.vim/syntax/rust.vim @@ -53,6 +53,7 @@ syn keyword rustKeyword mod trait nextgroup=rustIdentifier skipwhite skipe syn keyword rustStorage move mut ref static const syn match rustDefault /\/ syn keyword rustAwait await +syn match rustKeyword /\!\@!/ display syn keyword rustPubScopeCrate crate contained syn match rustPubScopeDelim /[()]/ contained diff --git a/sources_non_forked/rust.vim/test/indent.vader b/sources_non_forked/rust.vim/test/indent.vader index 1e50a589..91f65806 100644 --- a/sources_non_forked/rust.vim/test/indent.vader +++ b/sources_non_forked/rust.vim/test/indent.vader @@ -225,6 +225,51 @@ Expect rust (issue #5): } } +############################################ +# Issue #366 + +Given rust: + fn f() { + g(|_| { + h(); + }) + .unwrap(); + h(); + } + +Do: + vip= + +Expect rust (issue #366): + fn f() { + g(|_| { + h(); + }) + .unwrap(); + h(); + } + +Given rust: + fn f() { + let a = g(|_| { + h(); + }) + .unwrap(); + h(); + } + +Do: + vip= + +Expect rust (issue #366, variation #2): + fn f() { + let a = g(|_| { + h(); + }) + .unwrap(); + h(); + } + ############################################ Given rust: diff --git a/sources_non_forked/vim-commentary/plugin/commentary.vim b/sources_non_forked/vim-commentary/plugin/commentary.vim index 2b0d1ec0..17c285b7 100644 --- a/sources_non_forked/vim-commentary/plugin/commentary.vim +++ b/sources_non_forked/vim-commentary/plugin/commentary.vim @@ -54,7 +54,7 @@ function! s:go(...) abort let line = getline(lnum) if strlen(r) > 2 && l.r !~# '\\' let line = substitute(line, - \'\M'.r[0:-2].'\zs\d\*\ze'.r[-1:-1].'\|'.l[0].'\zs\d\*\ze'.l[1:-1], + \'\M' . substitute(l, '\ze\S\s*$', '\\zs\\d\\*\\ze', '') . '\|' . substitute(r, '\S\zs', '\\zs\\d\\*\\ze', ''), \'\=substitute(submatch(0)+1-uncomment,"^0$\\|^-\\d*$","","")','g') endif if uncomment diff --git a/sources_non_forked/vim-fugitive/autoload/fugitive.vim b/sources_non_forked/vim-fugitive/autoload/fugitive.vim index 3e501d81..8f25832c 100644 --- a/sources_non_forked/vim-fugitive/autoload/fugitive.vim +++ b/sources_non_forked/vim-fugitive/autoload/fugitive.vim @@ -1400,10 +1400,11 @@ call s:add_methods('buffer', ['repo', 'type']) function! s:FilterEscape(items, ...) abort let items = copy(a:items) + call map(items, 's:fnameescape(v:val)') if a:0 && type(a:1) == type('') call filter(items, 'strpart(v:val, 0, strlen(a:1)) ==# a:1') endif - return map(items, 's:fnameescape(v:val)') + return items endfunction function! s:GlobComplete(lead, pattern) abort @@ -1469,16 +1470,15 @@ function! fugitive#CompleteObject(base, ...) abort let results = [] if a:base =~# '^refs/' let results += map(s:GlobComplete(fugitive#CommonDir(dir) . '/', a:base . '*'), 's:Slash(v:val)') + call map(results, 's:fnameescape(v:val)') elseif a:base !~# '^\.\=/\|^:(' let heads = s:CompleteHeads(dir) if filereadable(fugitive#Find('.git/refs/stash', dir)) let heads += ["stash"] let heads += sort(s:LinesError(["stash","list","--pretty=format:%gd"], dir)[0]) endif - call filter(heads,'v:val[ 0 : strlen(a:base)-1 ] ==# a:base') - let results += heads + let results += s:FilterEscape(heads, a:base) endif - call map(results, 's:fnameescape(v:val)') if !empty(tree) let results += a:0 == 1 ? fugitive#CompletePath(a:base, dir) : fugitive#CompletePath(a:base) endif @@ -1724,6 +1724,10 @@ function! fugitive#BufReadStatus() abort endwhile endif + if empty(s:Tree()) + let [unstaged, untracked] = [[], []] + endif + for dict in staged let b:fugitive_files['Staged'][dict.filename] = dict endfor @@ -1820,6 +1824,9 @@ function! fugitive#BufReadStatus() abort if push !=# pull call s:AddHeader('Push', push) endif + if empty(s:Tree()) + call s:AddHeader('Bare', 'yes') + endif call s:AddSection('Rebasing ' . rebasing_head, rebasing) call s:AddSection('Untracked', untracked) call s:AddSection('Unstaged', unstaged) @@ -4518,14 +4525,11 @@ endfunction function! s:diffoff_all(dir) abort let curwin = winnr() for nr in range(1,winnr('$')) - if getwinvar(nr,'&diff') + if getwinvar(nr, '&diff') && !empty(getwinvar(nr, 'fugitive_diff_restore')) if nr != winnr() execute nr.'wincmd w' - let restorewinnr = 1 - endif - if s:Dir() ==# a:dir - call s:diffoff() endif + call s:diffoff() endif endfor execute curwin.'wincmd w' @@ -4626,6 +4630,8 @@ function! fugitive#Diffsplit(autodir, keepfocus, mods, arg, args) abort elseif arg =~# '^:\d$' exe s:DirCheck() let file = s:Relative(arg . ':') + elseif arg =~# '^[~^]\d*$' + return 'echoerr ' . string('fugitive: change ' . arg . ' to !' . arg . ' to diff against ancestor') else try let file = arg =~# '^:/.' ? fugitive#RevParse(arg) . s:Relative(':') : s:Expand(arg) @@ -5130,12 +5136,10 @@ function! s:BlameJump(suffix, ...) abort let winnr = bufwinnr(blame_bufnr) if winnr > 0 exe winnr.'wincmd w' + exe bufnr.'bdelete' endif execute 'Gedit' s:fnameescape(commit . suffix . ':' . path) execute lnum - if winnr > 0 - exe bufnr.'bdelete' - endif endif if exists(':Gblame') let my_bufnr = bufnr('') diff --git a/sources_non_forked/vim-fugitive/plugin/fugitive.vim b/sources_non_forked/vim-fugitive/plugin/fugitive.vim index be3b99bb..99b78f12 100644 --- a/sources_non_forked/vim-fugitive/plugin/fugitive.vim +++ b/sources_non_forked/vim-fugitive/plugin/fugitive.vim @@ -181,6 +181,8 @@ function! FugitiveExtractGitDir(path) abort let path = s:Slash(a:path) if path =~# '^fugitive:' return matchstr(path, '\C^fugitive:\%(//\)\=\zs.\{-\}\ze\%(//\|::\|$\)') + elseif empty(path) + return '' elseif isdirectory(path) let path = fnamemodify(path, ':p:s?/$??') else diff --git a/sources_non_forked/vim-gitgutter/README.mkd b/sources_non_forked/vim-gitgutter/README.mkd index 370d1f75..8cb86df9 100644 --- a/sources_non_forked/vim-gitgutter/README.mkd +++ b/sources_non_forked/vim-gitgutter/README.mkd @@ -18,7 +18,7 @@ Features: * Diffs against index (default) or any commit. * Allows folding all unchanged text. * Provides fold text showing whether folded lines have been changed. -* Can load all hunk locations into quickfix list. +* Can load all hunk locations into quickfix list or the current window's location list. * Handles line endings correctly, even with repos that do CRLF conversion. * Optional line highlighting. * Optional line number highlighting. (Only available in Neovim 0.3.2 or higher) @@ -147,7 +147,7 @@ nmap ]h (GitGutterNextHunk) nmap [h (GitGutterPrevHunk) ``` -You can load all your hunks into the quickfix list with `:GitGutterQuickFix`. Note this ignores any unsaved changes in your buffers. +You can load all your hunks into the quickfix list with `:GitGutterQuickFix`. Note this ignores any unsaved changes in your buffers. If the option `g:gitgutter_use_location_list` is set, this command will load hunks into the current window's location list instead. You can stage or undo an individual hunk when your cursor is in it: @@ -254,6 +254,7 @@ You can customise: * Whether to clobber or preserve non-gitgutter signs * The priority of gitgutter's signs. * Whether to use a floating/popup window for hunk previews +* Whether to populate the quickfix list or a location list with all hunks Please note that vim-gitgutter won't override any colours or highlights you've set in your colorscheme. @@ -452,7 +453,12 @@ let g:gitgutter_async = 0 #### To use floating/popup windows for hunk previews -Add `let g:gitgutter_preview_win_floating = 1` to your vimrc. Note that on Vim this prevents you staging (partial) hunks via the preview window. +Add `let g:gitgutter_preview_win_floating = 1` to your `~/.vimrc`. Note that on Vim this prevents you staging (partial) hunks via the preview window. + + +#### To load all hunks into the current window's location list instead of the quickfix list + +Add `let g:gitgutter_use_location_list = 1` to your `~/.vimrc`. ### Extensions @@ -513,9 +519,25 @@ Let's say, for example, you want to remove trailing whitespace from all changed ``` +#### Cycle through hunks in current buffer + +This is like `:GitGutterNextHunk` but when it gets to the last hunk in the buffer it cycles around to the first. + +```viml +function! GitGutterNextHunkCycle() + let line = line('.') + silent! GitGutterNextHunk + if line('.') == line + 1 + GitGutterNextHunk + endif +endfunction +``` + + #### Cycle through hunks in all buffers -You can use `:GitGutterQuickFix` to load all hunks into the quickfix list. +You can use `:GitGutterQuickFix` to load all hunks into the quickfix list or the current window's location list. Alternatively, given that`]c` and `[c` jump from one hunk to the next in the current buffer, you can use this code to jump to the next hunk no matter which buffer it's in. @@ -534,7 +556,7 @@ function! NextHunkAllBuffers() return endif if !empty(GitGutterGetHunks()) - normal! 1G + 1 GitGutterNextHunk return endif diff --git a/sources_non_forked/vim-gitgutter/autoload/gitgutter.vim b/sources_non_forked/vim-gitgutter/autoload/gitgutter.vim index 84c89af4..582ea4b0 100644 --- a/sources_non_forked/vim-gitgutter/autoload/gitgutter.vim +++ b/sources_non_forked/vim-gitgutter/autoload/gitgutter.vim @@ -207,5 +207,9 @@ function! gitgutter#quickfix() let lnum = 0 endif endfor - call setqflist(locations) + if !g:gitgutter_use_location_list + call setqflist(locations) + else + call setloclist(0, locations) + endif endfunction diff --git a/sources_non_forked/vim-gitgutter/doc/gitgutter.txt b/sources_non_forked/vim-gitgutter/doc/gitgutter.txt index 2dc01f9c..23805145 100644 --- a/sources_non_forked/vim-gitgutter/doc/gitgutter.txt +++ b/sources_non_forked/vim-gitgutter/doc/gitgutter.txt @@ -140,7 +140,9 @@ Commands for jumping between hunks:~ *gitgutter-:GitGutterQuickFix* :GitGutterQuickFix Load all hunks into the |quickfix| list. Note this - ignores any unsaved changes in your buffers. + ignores any unsaved changes in your buffers. The + |g:gitgutter_use_location_list| option can be set to + populate the location list of the current window instead Commands for operating on a hunk:~ @@ -294,6 +296,7 @@ General:~ |g:gitgutter_map_keys| |g:gitgutter_async| |g:gitgutter_log| + |g:gitgutter_use_location_list| *g:gitgutter_preview_win_location* @@ -473,7 +476,7 @@ Controls whether or not the plugin is on at startup. *g:gitgutter_map_keys* Default: 1 -Controls whether or not the plugin provides mappings. See |gitgutter-mapppings|. +Controls whether or not the plugin provides mappings. See |gitgutter-mappings|. *g:gitgutter_async* Default: 1 @@ -487,6 +490,12 @@ Default: 0 When switched on, the plugin logs to gitgutter.log in the directory where it is installed. Additionally it logs channel activity to channel.log. + *g:gitgutter_use_location_list* +Default: 0 + +When switched on, the :GitGutterQuickFix command populates the location list +of the current window instead of the global quickfix list. + =============================================================================== HIGHLIGHTS *gitgutter-highlights* diff --git a/sources_non_forked/vim-gitgutter/plugin/gitgutter.vim b/sources_non_forked/vim-gitgutter/plugin/gitgutter.vim index c7073d0a..99e0bd28 100644 --- a/sources_non_forked/vim-gitgutter/plugin/gitgutter.vim +++ b/sources_non_forked/vim-gitgutter/plugin/gitgutter.vim @@ -61,6 +61,7 @@ call s:set('g:gitgutter_map_keys', 1) call s:set('g:gitgutter_terminal_reports_focus', 1) call s:set('g:gitgutter_async', 1) call s:set('g:gitgutter_log', 0) +call s:set('g:gitgutter_use_location_list', 0) call s:set('g:gitgutter_git_executable', 'git') if !executable(g:gitgutter_git_executable) diff --git a/sources_non_forked/vim-snippets/UltiSnips/rails.snippets b/sources_non_forked/vim-snippets/UltiSnips/rails.snippets index ffd76613..22b71901 100644 --- a/sources_non_forked/vim-snippets/UltiSnips/rails.snippets +++ b/sources_non_forked/vim-snippets/UltiSnips/rails.snippets @@ -69,7 +69,7 @@ endsnippet # FIXME: handling literal bracket pair inside of nested tab groups? snippet tcr "Create references column" -t.references :${1:taggable}${2:, polymorphic ${3:{ :default: '${4:Photo}' \}}} +t.references :${1:taggable}${2:, polymorphic: ${3:{ default: '${4:Photo}' }}} $0 endsnippet @@ -597,7 +597,7 @@ endsnippet snippet rest "respond_to" respond_to do |wants| - wants.${1:html}${2: { $0 \}} + wants.${1:html}${2: { $0 }} end endsnippet @@ -655,7 +655,7 @@ t.$0 endsnippet snippet t. "t.references (tcr)" -t.references :${1:taggable}${2:, polymorphic ${3:{ :default: '${4:Photo}' \}}} +t.references :${1:taggable}${2:, polymorphic: ${3:{ default: '${4:Photo}' }}} t.$0 endsnippet @@ -780,7 +780,7 @@ verify only: [:$1], session: :user, params: :id, redirect_to {:action: '${2:inde endsnippet snippet wants "wants_format" -wants.${1:js|json|html}${2: { $0 \}} +wants.${1:js|json|html}${2: { $0 }} endsnippet snippet xdelete "xhr delete" diff --git a/sources_non_forked/vim-snippets/snippets/fortran.snippets b/sources_non_forked/vim-snippets/snippets/fortran.snippets index e04d4fda..8cb6f9a7 100644 --- a/sources_non_forked/vim-snippets/snippets/fortran.snippets +++ b/sources_non_forked/vim-snippets/snippets/fortran.snippets @@ -1,13 +1,13 @@ snippet impl implicit none - $0 + ${0} snippet prog program ${1:main} - $0 + ${0} end program $1 snippet mod module ${1:modulename} - $0 + ${0} end module $1 snippet proc procedure ${1:name} @@ -25,7 +25,7 @@ snippet doc ! Github: `g:snips_github` ! Description: $1 ! """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" - $0 + ${0} snippet dox !> @brief ${1} !! @@ -37,45 +37,45 @@ snippet doxp # Variables definitions # Boolean snippet bool - logical :: $0 + logical :: ${0} # Integer snippet int - integer :: $0 + integer :: ${0} snippet real - real :: $0 + real :: ${0} # Double Precision snippet double - double precision :: $0 + double precision :: ${0} # Char snippet str character(len=${1:*}) :: ${0:} # Types snippet type type(${1:name}) - $0 + ${0} end type snippet const - ${1:type}, parameter :: $2 = $0 + ${1:type}, parameter :: $2 = ${0} snippet arr - ${1:type}, ${2:allocatable, }dimension(${3::}) :: $0 + ${1:type}, ${2:allocatable, }dimension(${3::}) :: ${0} snippet intent - ${1:type}, intent(inout) :: $0 + ${1:type}, intent(inout) :: ${0} # Array snippet / - (/ $1 /) ${2:,&} $0 + (/ $1 /) ${2:,&} ${0} snippet if if (${1:condition}) then - $0 + ${0} end if snippet case select case (${1:expr}) case ($2) case default $3 - end select $0 + end select ${0} snippet do do ${1:i} = ${2:start}, ${3:end}, ${4:incr} - $0 + ${0} end do snippet dow do while (${1:condition}) @@ -83,21 +83,21 @@ snippet dow end do snippet sub subroutine ${1:name}($2) - $0 + ${0} end subroutine $1 snippet func function ${1:name}($2) result($3) - $0 + ${0} end function $1 snippet pr - write(*,*) $0 + write(*,*) ${0} snippet dpr write(*,*) '$1 = ', $1 snippet read - read(unit = ${1:fp}, file = ${2:filename}, iostat = ${3:ierr}) $0 + read(unit = ${1:fp}, file = ${2:filename}, iostat = ${3:ierr}) ${0} snippet write - write(unit = ${1:fp}, file = ${2:filename}, iostat = ${3:ierr}) $0 + write(unit = ${1:fp}, file = ${2:filename}, iostat = ${3:ierr}) ${0} snippet open - open(unit = ${1:fp}, file = ${2:filename}, status = ${3:unknown}, iostat = ${4:ierr}) $0 + open(unit = ${1:fp}, file = ${2:filename}, status = ${3:unknown}, iostat = ${4:ierr}) ${0} snippet close - close(unit = ${1:fp}) $0 + close(unit = ${1:fp}) ${0} diff --git a/sources_non_forked/vim-surround/plugin/surround.vim b/sources_non_forked/vim-surround/plugin/surround.vim index 59092601..303bd2b3 100644 --- a/sources_non_forked/vim-surround/plugin/surround.vim +++ b/sources_non_forked/vim-surround/plugin/surround.vim @@ -447,7 +447,7 @@ function! s:dosurround(...) " {{{1 let keeper = substitute(keeper,'^\s\+','','') let keeper = substitute(keeper,'\s\+$','','') endif - if col("']") == col("$") && col('.') + 1 == col('$') + if col("']") == col("$") && virtcol('.') + 1 == virtcol('$') if oldhead =~# '^\s*$' && a:0 < 2 let keeper = substitute(keeper,'\%^\n'.oldhead.'\(\s*.\{-\}\)\n\s*\%$','\1','') endif From e4b4276499cea147e6fc1e2be0b96f0c85e22255 Mon Sep 17 00:00:00 2001 From: amix Date: Sat, 30 Nov 2019 18:47:48 +0100 Subject: [PATCH 30/40] Disable folding for Markdown It's not super useful. Ref: https://github.com/amix/vimrc/issues/445 --- vimrcs/filetypes.vim | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vimrcs/filetypes.vim b/vimrcs/filetypes.vim index a4e17cbd..522bafd6 100644 --- a/vimrcs/filetypes.vim +++ b/vimrcs/filetypes.vim @@ -72,3 +72,9 @@ endif " => Twig section """""""""""""""""""""""""""""" autocmd BufRead *.twig set syntax=html filetype=html + + +"""""""""""""""""""""""""""""" +" => Markdown +"""""""""""""""""""""""""""""" +let vim_markdown_folding_disabled = 1 From 5d11b237a39186e51a876389f4658ae04414c4d1 Mon Sep 17 00:00:00 2001 From: amix Date: Sat, 30 Nov 2019 18:51:57 +0100 Subject: [PATCH 31/40] Fix https://github.com/amix/vimrc/issues/453 --- update_plugins.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update_plugins.py b/update_plugins.py index cbb08b7d..c4ee70a8 100644 --- a/update_plugins.py +++ b/update_plugins.py @@ -32,7 +32,7 @@ vim-coffee-script https://github.com/kchmck/vim-coffee-script vim-colors-solarized https://github.com/altercation/vim-colors-solarized vim-indent-object https://github.com/michaeljsmith/vim-indent-object vim-less https://github.com/groenewege/vim-less -vim-markdown https://github.com/tpope/vim-markdown +vim-markdown https://github.com/plasticboy/vim-markdown vim-pyte https://github.com/therubymug/vim-pyte vim-snipmate https://github.com/garbas/vim-snipmate vim-snippets https://github.com/honza/vim-snippets From 010fe6869f1cbbf13719b7eb83c5dfcd16dca63b Mon Sep 17 00:00:00 2001 From: amix Date: Sat, 30 Nov 2019 21:00:26 +0100 Subject: [PATCH 32/40] Fixed the path of vim-markdown in the readme file --- README.md | 2 +- update_plugins.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 4f8ef721..a745031f 100644 --- a/README.md +++ b/README.md @@ -122,7 +122,7 @@ I recommend reading the docs of these plugins to understand them better. Each pl * [vim-coffee-script](https://github.com/kchmck/vim-coffee-script) * [vim-less](https://github.com/groenewege/vim-less) * [vim-bundle-mako](https://github.com/sophacles/vim-bundle-mako) -* [vim-markdown](https://github.com/tpope/vim-markdown) +* [vim-markdown](https://github.com/plasticboy/vim-markdown) * [nginx.vim](https://github.com/vim-scripts/nginx.vim): Highlights configuration files for nginx * [rust.vim](https://github.com/rust-lang/rust.vim) * [vim-ruby](https://github.com/vim-ruby/vim-ruby) diff --git a/update_plugins.py b/update_plugins.py index c4ee70a8..5e14e899 100644 --- a/update_plugins.py +++ b/update_plugins.py @@ -32,7 +32,6 @@ vim-coffee-script https://github.com/kchmck/vim-coffee-script vim-colors-solarized https://github.com/altercation/vim-colors-solarized vim-indent-object https://github.com/michaeljsmith/vim-indent-object vim-less https://github.com/groenewege/vim-less -vim-markdown https://github.com/plasticboy/vim-markdown vim-pyte https://github.com/therubymug/vim-pyte vim-snipmate https://github.com/garbas/vim-snipmate vim-snippets https://github.com/honza/vim-snippets From cf9b500ebc9bb74666bdcf622d3f1955167f2ae0 Mon Sep 17 00:00:00 2001 From: amix Date: Sun, 1 Dec 2019 20:18:45 +0100 Subject: [PATCH 33/40] Updated plugins --- .../vim-fugitive/autoload/fugitive.vim | 12 +++--------- .../vim-snippets/UltiSnips/ruby.snippets | 4 ++-- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/sources_non_forked/vim-fugitive/autoload/fugitive.vim b/sources_non_forked/vim-fugitive/autoload/fugitive.vim index 8f25832c..1cf4e639 100644 --- a/sources_non_forked/vim-fugitive/autoload/fugitive.vim +++ b/sources_non_forked/vim-fugitive/autoload/fugitive.vim @@ -2429,12 +2429,6 @@ function! s:ExpireStatus(bufnr) abort return '' endfunction -function! FugitiveReloadCheck() abort - let t = b:fugitive_reltime - return [t, reltimestr(reltime(s:last_time, t)), - \ reltimestr(reltime(get(s:last_times, s:cpath(s:Dir()), t), t))] -endfunction - function! s:ReloadWinStatus(...) abort if get(b:, 'fugitive_type', '') !=# 'index' || &modified return @@ -2913,9 +2907,9 @@ function! s:PatchSearchExpr(reverse) abort let pattern = '^[+-]\s*' . escape(substitute(strpart(line, 1), '^\s*\|\s*$', '', ''), '^$.*[]~\') . '\s*$' endif if a:reverse - return '?' . escape(pattern, '/') . "\" + return '?' . escape(pattern, '/?') . "\" else - return '/' . escape(pattern, '/?') . "\" + return '/' . escape(pattern, '/') . "\" endif endif return a:reverse ? '#' : '*' @@ -4821,7 +4815,7 @@ function! s:BlameCommitFileLnum(...) abort let commit = get(s:LinesError('rev-list', '--ancestry-path', '--reverse', commit . '..' . state.blame_reverse_end)[0], 0, '') endif let lnum = +matchstr(line, ' \zs\d\+\ze \%((\| *\d\+)\)') - let path = matchstr(line, '^\^\=[?*]*\x* \+\%(\d\+ \+\d\+ \+\)\=\zs.\{-\}\ze\s\+\%(\%( \d\+ \)\@ def initialize ... end end" -class ${1:class_name} +class ${1:`!p snip.rv = snip.basename.title().replace('_', '')`} def initialize(${2:*args}) $0 end @@ -315,7 +315,7 @@ end endsnippet snippet module "module" -module ${1:module_name} +module ${1:`!p snip.rv = snip.basename.title().replace('_', '')`} $0 end endsnippet From 18d96984a028e805215c8a2a6418019efc34c5b7 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Sun, 1 Dec 2019 11:19:19 -0800 Subject: [PATCH 34/40] Adding update plugins to update section of readme. (#549) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a745031f..657b8b6e 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,7 @@ Just do a git rebase! cd ~/.vim_runtime git pull --rebase + python3 update_plugins.py ## Some screenshots From 901655ef044990ba81cc972bcf63c171e511bafe Mon Sep 17 00:00:00 2001 From: amix Date: Sun, 1 Dec 2019 20:19:59 +0100 Subject: [PATCH 35/40] Removed the Python 3 refernce, should just be the default Python --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 657b8b6e..b7b09cb8 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ Just do a git rebase! cd ~/.vim_runtime git pull --rebase - python3 update_plugins.py + python update_plugins.py ## Some screenshots From cb578907012a83789cce83f0e38f03a3716d69e8 Mon Sep 17 00:00:00 2001 From: amix Date: Thu, 12 Dec 2019 23:01:41 +0100 Subject: [PATCH 36/40] Updated plugins --- .../vim-fugitive/autoload/fugitive.vim | 23 +++++++++++++------ .../vim-fugitive/plugin/fugitive.vim | 19 ++++++++++++++- .../vim-gitgutter/plugin/gitgutter.vim | 2 +- sources_non_forked/vim-ruby/indent/ruby.vim | 1 + .../spec/indent/continuations_spec.rb | 9 ++++++++ .../snippets/systemverilog.snippets | 2 +- .../vim-snippets/snippets/verilog.snippets | 20 ++++++++++++++++ 7 files changed, 66 insertions(+), 10 deletions(-) diff --git a/sources_non_forked/vim-fugitive/autoload/fugitive.vim b/sources_non_forked/vim-fugitive/autoload/fugitive.vim index 1cf4e639..f29aeac8 100644 --- a/sources_non_forked/vim-fugitive/autoload/fugitive.vim +++ b/sources_non_forked/vim-fugitive/autoload/fugitive.vim @@ -3489,7 +3489,7 @@ function! s:FinishCommit() abort call setbufvar(buf, 'fugitive_commit_arguments', []) if getbufvar(buf, 'fugitive_commit_rebase') call setbufvar(buf, 'fugitive_commit_rebase', 0) - let s:rebase_continue = s:Dir(buf) + let s:rebase_continue = [s:Dir(buf), 0] endif return s:CommitSubcommand(-1, -1, 0, 0, '', args, s:Dir(buf)) endif @@ -3696,11 +3696,11 @@ function! s:MergeRebase(cmd, bang, mods, args, ...) abort call fugitive#ReloadStatus(dir, 1) if empty(filter(getqflist(),'v:val.valid && v:val.type !=# "I"')) if a:cmd =~# '^rebase' && - \ filereadable(fugitive#Find('.git/rebase-merge/amend', dir)) && \ filereadable(fugitive#Find('.git/rebase-merge/done', dir)) && - \ get(readfile(fugitive#Find('.git/rebase-merge/done', dir)), -1, '') =~# '^[^e]' + \ get(readfile(fugitive#Find('.git/rebase-merge/done', dir)), -1, '') =~# '^[^bep]' cclose - return 'exe ' . string(mods . 'Gcommit --amend -n -F ' . s:fnameescape(fugitive#Find('.git/rebase-merge/message', dir)) . ' -e') . '|let b:fugitive_commit_rebase = 1' + let amend = filereadable(fugitive#Find('.git/rebase-merge/amend', dir)) ? '--amend ' : '' + return 'exe ' . string(mods . 'Gcommit ' . amend . '-n -F ' . s:fnameescape(fugitive#Find('.git/rebase-merge/message', dir)) . ' -e') . '|let b:fugitive_commit_rebase = 1' elseif !had_merge_msg && filereadable(fugitive#Find('.git/MERGE_MSG', dir)) cclose return mods . 'Gcommit --no-status -n -t '.s:fnameescape(fugitive#Find('.git/MERGE_MSG', dir)) @@ -3758,18 +3758,27 @@ function! s:PullSubcommand(line1, line2, range, bang, mods, args) abort return s:MergeRebase('pull', a:bang, a:mods, a:args) endfunction +function! s:RebaseContinue(arg, ...) abort + let [dir, edit_todo] = a:arg + exe s:MergeRebase('rebase', 0, '', [edit_todo && getfsize(fugitive#Find('.git/rebase-merge/git-rebase-todo', dir)) <= 0 ? '--abort' : '--continue'], dir) +endfunction + augroup fugitive_merge autocmd! autocmd VimLeavePre,BufDelete git-rebase-todo \ if getbufvar(+expand(''), '&bufhidden') ==# 'wipe' | \ call s:RebaseClean(expand('')) | \ if getfsize(FugitiveFind('.git/rebase-merge/done', +expand(''))) == 0 | - \ let s:rebase_continue = FugitiveGitDir(+expand('')) | + \ let s:rebase_continue = [FugitiveGitDir(+expand('')), 1] | \ endif | \ endif autocmd BufEnter * nested \ if exists('s:rebase_continue') | - \ exe s:MergeRebase('rebase', 0, '', [getfsize(fugitive#Find('.git/rebase-merge/git-rebase-todo', s:rebase_continue)) > 0 ? '--continue' : '--abort'], remove(s:, 'rebase_continue')) | + \ if has('timers') | + \ call timer_start(0, function('s:RebaseContinue', [remove(s:, 'rebase_continue')])) | + \ else | + \ call s:RebaseContinue(remove(s:, 'rebase_continue')) | + \ endif | \ endif augroup END @@ -4393,7 +4402,7 @@ endfunction function! s:AskPassArgs(dir) abort if (len($DISPLAY) || len($TERM_PROGRAM) || has('gui_running')) && fugitive#GitVersion(1, 8) && - \ empty($GIT_ASKPASS) && empty($SSH_ASKPASS) && empty(fugitive#Config('core.askPass', a:dir)) + \ empty($GIT_ASKPASS) && empty($SSH_ASKPASS) && empty(get(fugitive#Config(a:dir), 'core.askpass', [])) if s:executable(s:ExecPath() . '/git-gui--askpass') return ['-c', 'core.askPass=' . s:ExecPath() . '/git-gui--askpass'] elseif s:executable('ssh-askpass') diff --git a/sources_non_forked/vim-fugitive/plugin/fugitive.vim b/sources_non_forked/vim-fugitive/plugin/fugitive.vim index 99b78f12..fbdb0e9e 100644 --- a/sources_non_forked/vim-fugitive/plugin/fugitive.vim +++ b/sources_non_forked/vim-fugitive/plugin/fugitive.vim @@ -177,6 +177,23 @@ function! s:Tree(path) abort endif endfunction +function! s:CeilingDirectories() abort + if !exists('s:ceiling_directories') + let s:ceiling_directories = [] + let resolve = 1 + for dir in split($GIT_CEILING_DIRECTORIES, has('win32') ? ';' : ':', 1) + if empty(dir) + let resolve = 0 + elseif resolve + call add(s:ceiling_directories, resolve(dir)) + else + call add(s:ceiling_directories, dir) + endif + endfor + endif + return s:ceiling_directories + get(g:, 'ceiling_directories', []) +endfunction + function! FugitiveExtractGitDir(path) abort let path = s:Slash(a:path) if path =~# '^fugitive:' @@ -203,7 +220,7 @@ function! FugitiveExtractGitDir(path) abort if root =~# '\v^//%([^/]+/?)?$' break endif - if index(split($GIT_CEILING_DIRECTORIES, ':'), root) >= 0 + if index(s:CeilingDirectories(), root) >= 0 break endif if root ==# $GIT_WORK_TREE && FugitiveIsGitDir(env_git_dir) diff --git a/sources_non_forked/vim-gitgutter/plugin/gitgutter.vim b/sources_non_forked/vim-gitgutter/plugin/gitgutter.vim index 99e0bd28..1e3cf23f 100644 --- a/sources_non_forked/vim-gitgutter/plugin/gitgutter.vim +++ b/sources_non_forked/vim-gitgutter/plugin/gitgutter.vim @@ -244,7 +244,7 @@ augroup gitgutter autocmd ShellCmdPost * call gitgutter#all(1) autocmd BufLeave term://* call gitgutter#all(1) - autocmd BufWritePost fugitive://*//0/* call gitgutter#all(1) + autocmd User FugitiveChanged call gitgutter#all(1) autocmd BufFilePre * GitGutterBufferDisable autocmd BufFilePost * GitGutterBufferEnable diff --git a/sources_non_forked/vim-ruby/indent/ruby.vim b/sources_non_forked/vim-ruby/indent/ruby.vim index 20f52b9e..bfc32e5a 100644 --- a/sources_non_forked/vim-ruby/indent/ruby.vim +++ b/sources_non_forked/vim-ruby/indent/ruby.vim @@ -64,6 +64,7 @@ let s:syng_strcom = s:syng_stringdoc + [ \ 'PercentStringDelimiter', \ 'PercentSymbolDelimiter', \ 'Regexp', + \ 'RegexpCharClass', \ 'RegexpDelimiter', \ 'RegexpEscape', \ 'StringDelimiter', diff --git a/sources_non_forked/vim-ruby/spec/indent/continuations_spec.rb b/sources_non_forked/vim-ruby/spec/indent/continuations_spec.rb index 22829d2f..727da7d3 100644 --- a/sources_non_forked/vim-ruby/spec/indent/continuations_spec.rb +++ b/sources_non_forked/vim-ruby/spec/indent/continuations_spec.rb @@ -314,4 +314,13 @@ describe "Indenting" do end EOF end + + specify "wrong continuation within regex character class" do + # See https://github.com/vim-ruby/vim-ruby/issues/405 for details + + assert_correct_indenting <<~EOF + extname = file.extname(url).split(/[?#]/).first + target_file = tempfile.new() + EOF + end end diff --git a/sources_non_forked/vim-snippets/snippets/systemverilog.snippets b/sources_non_forked/vim-snippets/snippets/systemverilog.snippets index 70a9d2d3..f510750d 100644 --- a/sources_non_forked/vim-snippets/snippets/systemverilog.snippets +++ b/sources_non_forked/vim-snippets/snippets/systemverilog.snippets @@ -1,7 +1,7 @@ extends verilog # Foreach Loop -snippet fe +snippet forea foreach (${1}) begin ${0} end diff --git a/sources_non_forked/vim-snippets/snippets/verilog.snippets b/sources_non_forked/vim-snippets/snippets/verilog.snippets index 5cd80f39..df5eeb81 100644 --- a/sources_non_forked/vim-snippets/snippets/verilog.snippets +++ b/sources_non_forked/vim-snippets/snippets/verilog.snippets @@ -61,3 +61,23 @@ snippet mod module ${1:module_name} (${2}); ${0} endmodule +# For +snippet for + for (int ${2:i} = 0; $2 < ${1:count}; $2${3:++}) begin + ${4} + end +# Forever +snippet forev + forever begin + ${0} + end +# Function +snippet fun + function ${1:void} ${2:name}(${3}); + ${0} + endfunction: $2 +# Task +snippet task + task ${1:name}(${2}); + ${0} + endtask: $1 From b56966e13c90f810c42e93149298198cfebdc5c4 Mon Sep 17 00:00:00 2001 From: amix Date: Mon, 30 Dec 2019 14:28:38 +0100 Subject: [PATCH 37/40] Updated plugins --- sources_non_forked/lightline.vim/.travis.yml | 3 +- sources_non_forked/lightline.vim/README.md | 43 +++++++++- .../lightline.vim/doc/lightline.txt | 78 +++++++++---------- sources_non_forked/nerdtree/CHANGELOG.md | 3 + sources_non_forked/nerdtree/doc/NERDTree.txt | 4 + .../nerdtree/lib/nerdtree/key_map.vim | 2 +- .../nerdtree/lib/nerdtree/menu_item.vim | 8 +- .../nerdtree/lib/nerdtree/notifier.vim | 5 +- .../nerdtree/lib/nerdtree/path.vim | 5 +- sources_non_forked/rust.vim/doc/rust.txt | 15 ++-- sources_non_forked/typescript-vim/README.md | 7 +- .../typescript-vim/syntax/typescript.vim | 14 ++-- .../vim-fugitive/autoload/fugitive.vim | 4 +- .../vim-fugitive/plugin/fugitive.vim | 3 + .../vim-snippets/UltiSnips/puppet.snippets | 3 +- .../vim-snippets/UltiSnips/sh.snippets | 32 ++++---- 16 files changed, 145 insertions(+), 84 deletions(-) diff --git a/sources_non_forked/lightline.vim/.travis.yml b/sources_non_forked/lightline.vim/.travis.yml index 9c8184a2..e7e41c51 100644 --- a/sources_non_forked/lightline.vim/.travis.yml +++ b/sources_non_forked/lightline.vim/.travis.yml @@ -16,8 +16,7 @@ cache: - $HOME/vim-$VIM_VERSION env: - - VIM_VERSION=8.1.1775 - - VIM_VERSION=8.1.1700 + - VIM_VERSION=8.2.0000 - VIM_VERSION=8.1.0000 - VIM_VERSION=8.0.0000 - VIM_VERSION=7.4 diff --git a/sources_non_forked/lightline.vim/README.md b/sources_non_forked/lightline.vim/README.md index d47c02eb..f4061bd5 100644 --- a/sources_non_forked/lightline.vim/README.md +++ b/sources_non_forked/lightline.vim/README.md @@ -87,6 +87,13 @@ For screenshots of all available colorshemes, see [this file](colorscheme.md). 2. Install with `:PlugInstall`. +### [dein.vim](https://github.com/Shougo/dein.vim) +1. Add the following configuration to your `.vimrc`. + + call dein#add('itchyny/lightline.vim') + +2. Install with `:call dein#install()` + ## Introduction After installing this plugin, you restart the editor and will get a cool statusline. ![lightline.vim - tutorial](https://raw.githubusercontent.com/wiki/itchyny/lightline.vim/image/tutorial/1.png) @@ -323,7 +330,7 @@ let g:lightline = { \ } function! LightlineMode() - return expand('%:t') ==# '__Tagbar__' ? 'Tagbar': + return expand('%:t') =~# '^__Tagbar__' ? 'Tagbar': \ expand('%:t') ==# 'ControlP' ? 'CtrlP' : \ &filetype ==# 'unite' ? 'Unite' : \ &filetype ==# 'vimfiler' ? 'VimFiler' : @@ -377,6 +384,40 @@ endfunction You can control the visibility and contents by writing simple functions. Now you notice how much function component is important for the configurability of lightline.vim. +### more tips +#### Mode names are too long. Can I use shorter mode names? +Yes, configure `g:lightline.mode_map`. +```vim +let g:lightline = { + \ 'mode_map': { + \ 'n' : 'N', + \ 'i' : 'I', + \ 'R' : 'R', + \ 'v' : 'V', + \ 'V' : 'VL', + \ "\": 'VB', + \ 'c' : 'C', + \ 's' : 'S', + \ 'S' : 'SL', + \ "\": 'SB', + \ 't': 'T', + \ }, + \ } +``` + +#### How can I truncate the components from the right in narrow windows? +Please include `%<` to one of the right components. +```vim +let g:lightline = { + \ 'component': { + \ 'lineinfo': '%3l:%-2v%<', + \ }, + \ } +``` + +#### Where can I find the default components? +See `:h g:lightline.component`. + ## Note for developers of other plugins Appearance consistency matters. diff --git a/sources_non_forked/lightline.vim/doc/lightline.txt b/sources_non_forked/lightline.vim/doc/lightline.txt index cf64523b..5bb51eee 100644 --- a/sources_non_forked/lightline.vim/doc/lightline.txt +++ b/sources_non_forked/lightline.vim/doc/lightline.txt @@ -4,7 +4,7 @@ Version: 0.1 Author: itchyny (https://github.com/itchyny) License: MIT License Repository: https://github.com/itchyny/lightline.vim -Last Change: 2019/08/14 10:46:55. +Last Change: 2019/12/27 18:23:29. CONTENTS *lightline-contents* @@ -674,11 +674,11 @@ In order to define your own component: \ } \ } function! LightlineFilename() - return ('' != LightlineReadonly() ? LightlineReadonly() . ' ' : '') . - \ (&ft == 'vimfiler' ? vimfiler#get_status_string() : - \ &ft == 'unite' ? unite#get_status_string() : - \ '' != expand('%:t') ? expand('%:t') : '[No Name]') . - \ ('' != LightlineModified() ? ' ' . LightlineModified() : '') + return (LightlineReadonly() !=# '' ? LightlineReadonly() . ' ' : '') . + \ (&ft ==# 'vimfiler' ? vimfiler#get_status_string() : + \ &ft ==# 'unite' ? unite#get_status_string() : + \ expand('%:t') !=# '' ? expand('%:t') : '[No Name]') . + \ (LightlineModified() !=# '' ? ' ' . LightlineModified() : '') endfunction function! LightlineReadonly() return &ft !~? 'help' && &readonly ? 'RO' : '' @@ -728,18 +728,18 @@ A nice example for non-patched font users. \ } \ } function! LightlineModified() - return &ft =~ 'help\|vimfiler' ? '' : &modified ? '+' : &modifiable ? '' : '-' + return &ft =~# 'help\|vimfiler' ? '' : &modified ? '+' : &modifiable ? '' : '-' endfunction function! LightlineReadonly() return &ft !~? 'help\|vimfiler' && &readonly ? 'RO' : '' endfunction function! LightlineFilename() - return ('' != LightlineReadonly() ? LightlineReadonly() . ' ' : '') . - \ (&ft == 'vimfiler' ? vimfiler#get_status_string() : - \ &ft == 'unite' ? unite#get_status_string() : - \ &ft == 'vimshell' ? vimshell#get_status_string() : - \ '' != expand('%:t') ? expand('%:t') : '[No Name]') . - \ ('' != LightlineModified() ? ' ' . LightlineModified() : '') + return (LightlineReadonly() !=# '' ? LightlineReadonly() . ' ' : '') . + \ (&ft ==# 'vimfiler' ? vimfiler#get_status_string() : + \ &ft ==# 'unite' ? unite#get_status_string() : + \ &ft ==# 'vimshell' ? vimshell#get_status_string() : + \ expand('%:t') !=# '' ? expand('%:t') : '[No Name]') . + \ (LightlineModified() !=# '' ? ' ' . LightlineModified() : '') endfunction function! LightlineFugitive() if &ft !~? 'vimfiler' && exists('*fugitive#head') @@ -763,18 +763,18 @@ A nice example for |vim-powerline| font users: \ 'subseparator': { 'left': 'â®', 'right': '⮃' } \ } function! LightlineModified() - return &ft =~ 'help\|vimfiler' ? '' : &modified ? '+' : &modifiable ? '' : '-' + return &ft =~# 'help\|vimfiler' ? '' : &modified ? '+' : &modifiable ? '' : '-' endfunction function! LightlineReadonly() return &ft !~? 'help\|vimfiler' && &readonly ? 'â­¤' : '' endfunction function! LightlineFilename() - return ('' != LightlineReadonly() ? LightlineReadonly() . ' ' : '') . - \ (&ft == 'vimfiler' ? vimfiler#get_status_string() : - \ &ft == 'unite' ? unite#get_status_string() : - \ &ft == 'vimshell' ? vimshell#get_status_string() : - \ '' != expand('%:t') ? expand('%:t') : '[No Name]') . - \ ('' != LightlineModified() ? ' ' . LightlineModified() : '') + return (LightlineReadonly() !=# '' ? LightlineReadonly() . ' ' : '') . + \ (&ft ==# 'vimfiler' ? vimfiler#get_status_string() : + \ &ft ==# 'unite' ? unite#get_status_string() : + \ &ft ==# 'vimshell' ? vimshell#get_status_string() : + \ expand('%:t') !=# '' ? expand('%:t') : '[No Name]') . + \ (LightlineModified() !=# '' ? ' ' . LightlineModified() : '') endfunction function! LightlineFugitive() if &ft !~? 'vimfiler' && exists('*fugitive#head') @@ -815,7 +815,7 @@ For users who uses lots of plugins: \ } function! LightlineModified() - return &ft =~ 'help' ? '' : &modified ? '+' : &modifiable ? '' : '-' + return &ft ==# 'help' ? '' : &modified ? '+' : &modifiable ? '' : '-' endfunction function! LightlineReadonly() @@ -824,15 +824,14 @@ For users who uses lots of plugins: function! LightlineFilename() let fname = expand('%:t') - return fname == 'ControlP' && has_key(g:lightline, 'ctrlp_item') ? g:lightline.ctrlp_item : - \ fname == '__Tagbar__' ? g:lightline.fname : - \ fname =~ '__Gundo\|NERD_tree' ? '' : - \ &ft == 'vimfiler' ? vimfiler#get_status_string() : - \ &ft == 'unite' ? unite#get_status_string() : - \ &ft == 'vimshell' ? vimshell#get_status_string() : - \ ('' != LightlineReadonly() ? LightlineReadonly() . ' ' : '') . - \ ('' != fname ? fname : '[No Name]') . - \ ('' != LightlineModified() ? ' ' . LightlineModified() : '') + return fname ==# 'ControlP' && has_key(g:lightline, 'ctrlp_item') ? g:lightline.ctrlp_item : + \ fname =~# '^__Tagbar__\|__Gundo\|NERD_tree' ? '' : + \ &ft ==# 'vimfiler' ? vimfiler#get_status_string() : + \ &ft ==# 'unite' ? unite#get_status_string() : + \ &ft ==# 'vimshell' ? vimshell#get_status_string() : + \ (LightlineReadonly() !=# '' ? LightlineReadonly() . ' ' : '') . + \ (fname !=# '' ? fname : '[No Name]') . + \ (LightlineModified() !=# '' ? ' ' . LightlineModified() : '') endfunction function! LightlineFugitive() @@ -861,19 +860,19 @@ For users who uses lots of plugins: function! LightlineMode() let fname = expand('%:t') - return fname == '__Tagbar__' ? 'Tagbar' : - \ fname == 'ControlP' ? 'CtrlP' : - \ fname == '__Gundo__' ? 'Gundo' : - \ fname == '__Gundo_Preview__' ? 'Gundo Preview' : - \ fname =~ 'NERD_tree' ? 'NERDTree' : - \ &ft == 'unite' ? 'Unite' : - \ &ft == 'vimfiler' ? 'VimFiler' : - \ &ft == 'vimshell' ? 'VimShell' : + return fname =~# '^__Tagbar__' ? 'Tagbar' : + \ fname ==# 'ControlP' ? 'CtrlP' : + \ fname ==# '__Gundo__' ? 'Gundo' : + \ fname ==# '__Gundo_Preview__' ? 'Gundo Preview' : + \ fname =~# 'NERD_tree' ? 'NERDTree' : + \ &ft ==# 'unite' ? 'Unite' : + \ &ft ==# 'vimfiler' ? 'VimFiler' : + \ &ft ==# 'vimshell' ? 'VimShell' : \ winwidth(0) > 60 ? lightline#mode() : '' endfunction function! CtrlPMark() - if expand('%:t') =~ 'ControlP' && has_key(g:lightline, 'ctrlp_item') + if expand('%:t') ==# 'ControlP' && has_key(g:lightline, 'ctrlp_item') call lightline#link('iR'[g:lightline.ctrlp_regex]) return lightline#concatenate([g:lightline.ctrlp_prev, g:lightline.ctrlp_item \ , g:lightline.ctrlp_next], 0) @@ -902,7 +901,6 @@ For users who uses lots of plugins: let g:tagbar_status_func = 'TagbarStatusFunc' function! TagbarStatusFunc(current, sort, fname, ...) abort - let g:lightline.fname = a:fname return lightline#statusline(0) endfunction diff --git a/sources_non_forked/nerdtree/CHANGELOG.md b/sources_non_forked/nerdtree/CHANGELOG.md index fe5d51aa..cec006c9 100644 --- a/sources_non_forked/nerdtree/CHANGELOG.md +++ b/sources_non_forked/nerdtree/CHANGELOG.md @@ -7,6 +7,9 @@ in an unordered list. The format is: - **.PATCH**: Pull Request Title (PR Author) [PR Number](Link to PR) --> +#### 6.4 +- **.1**: Ensure backward compatibility. v:t_func is not available before Vim 8.0 (Phil Runninger) +- **.0**: Allow use of function references as callbacks (HiPhish) [#1067](https://github.com/scrooloose/nerdtree/pull/1067) #### 6.3 - **.0**: Add new command that behaves like NERDTreeToggle but defaults to the root of a VCS repository. (willfindlay) [#1060](https://github.com/scrooloose/nerdtree/pull/1060) #### 6.2 diff --git a/sources_non_forked/nerdtree/doc/NERDTree.txt b/sources_non_forked/nerdtree/doc/NERDTree.txt index e88a6802..be0011d2 100644 --- a/sources_non_forked/nerdtree/doc/NERDTree.txt +++ b/sources_non_forked/nerdtree/doc/NERDTree.txt @@ -1315,6 +1315,10 @@ following code conventions are used: See this blog post for more details: http://got-ravings.blogspot.com/2008/09/vim-pr0n-prototype-based-objects.html +A number of API functions take a callback argument to call. The callback can +be either a string with the name of a function to call, or a |Funcref| object +which will be called directly. + ------------------------------------------------------------------------------ 4.1. Key map API *NERDTreeKeymapAPI* diff --git a/sources_non_forked/nerdtree/lib/nerdtree/key_map.vim b/sources_non_forked/nerdtree/lib/nerdtree/key_map.vim index 584da1f1..6714ee41 100644 --- a/sources_non_forked/nerdtree/lib/nerdtree/key_map.vim +++ b/sources_non_forked/nerdtree/lib/nerdtree/key_map.vim @@ -66,7 +66,7 @@ endfunction "FUNCTION: KeyMap.invoke() {{{1 "Call the KeyMaps callback function function! s:KeyMap.invoke(...) - let Callback = function(self.callback) + let Callback = type(self.callback) == type(function("tr")) ? self.callback : function(self.callback) if a:0 call Callback(a:1) else diff --git a/sources_non_forked/nerdtree/lib/nerdtree/menu_item.vim b/sources_non_forked/nerdtree/lib/nerdtree/menu_item.vim index 92c1bbbf..8a74bb1a 100644 --- a/sources_non_forked/nerdtree/lib/nerdtree/menu_item.vim +++ b/sources_non_forked/nerdtree/lib/nerdtree/menu_item.vim @@ -79,7 +79,7 @@ endfunction "specified function! s:MenuItem.enabled() if self.isActiveCallback != -1 - return {self.isActiveCallback}() + return type(self.isActiveCallback) == type(function("tr")) ? self.isActiveCallback() : {self.isActiveCallback}() endif return 1 endfunction @@ -94,7 +94,11 @@ function! s:MenuItem.execute() call mc.showMenu() else if self.callback != -1 - call {self.callback}() + if type(self.callback) == type(function("tr")) + call self.callback() + else + call {self.callback}() + endif endif endif endfunction diff --git a/sources_non_forked/nerdtree/lib/nerdtree/notifier.vim b/sources_non_forked/nerdtree/lib/nerdtree/notifier.vim index d24fc8f8..dfd48b33 100644 --- a/sources_non_forked/nerdtree/lib/nerdtree/notifier.vim +++ b/sources_non_forked/nerdtree/lib/nerdtree/notifier.vim @@ -14,8 +14,9 @@ endfunction 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) + for Listener in s:Notifier.GetListenersForEvent(a:event) + let Callback = type(Listener) == type(function("tr")) ? Listener : function(Listener) + call Callback(event) endfor endfunction diff --git a/sources_non_forked/nerdtree/lib/nerdtree/path.vim b/sources_non_forked/nerdtree/lib/nerdtree/path.vim index ccb94238..4ececf9e 100644 --- a/sources_non_forked/nerdtree/lib/nerdtree/path.vim +++ b/sources_non_forked/nerdtree/lib/nerdtree/path.vim @@ -500,8 +500,9 @@ function! s:Path.ignore(nerdtree) endif endfor - for callback in g:NERDTree.PathFilters() - if {callback}({'path': self, 'nerdtree': a:nerdtree}) + for Callback in g:NERDTree.PathFilters() + let Callback = type(Callback) == type(function("tr")) ? Callback : function(Callback) + if Callback({'path': self, 'nerdtree': a:nerdtree}) return 1 endif endfor diff --git a/sources_non_forked/rust.vim/doc/rust.txt b/sources_non_forked/rust.vim/doc/rust.txt index 9ab018ed..c3efb461 100644 --- a/sources_non_forked/rust.vim/doc/rust.txt +++ b/sources_non_forked/rust.vim/doc/rust.txt @@ -128,15 +128,14 @@ g:rustfmt_autosave~ *g:rustfmt_autosave_if_config_present* g:rustfmt_autosave_if_config_present~ - Set this option to 1 to to have *b:rustfmt_autosave* be set automatically - if a `rustfmt.toml` file is present in any parent directly leading to + Set this option to 1 to have *b:rustfmt_autosave* be set automatically + if a `rustfmt.toml` file is present in any parent directly leading to the file being edited. If not set, default to 0: > - let g:rustfmt_autosave_if_config_present = 0 < This is useful to have `rustfmt` only execute on save, on projects that have `rustfmt.toml` configuration. - + There is also a buffer-local b:rustfmt_autosave_if_config_present that can be set for the same purpose, which can overrides the global setting. @@ -161,6 +160,7 @@ g:rustfmt_emit_files~ provided) instead of '--write-mode=overwrite'. > let g:rustfmt_emit_files = 0 + *g:rust_playpen_url* g:rust_playpen_url~ Set this option to override the url for the playpen to use: > @@ -192,9 +192,9 @@ Integration with Syntastic *rust-syntastic* -------------------------- This plugin automatically integrates with the Syntastic checker. There are two -checkers provided: 'rustc', and 'cargo'. The later invokes 'Cargo' in order to +checkers provided: 'rustc', and 'cargo'. The latter invokes 'Cargo' in order to build code, and the former delivers a single edited '.rs' file as a compilation -target directly to the Rust compiler, `rustc`. +target directly to the Rust compiler, `rustc`. Because Cargo is almost exclusively being used for building Rust code these days, 'cargo' is the default checker. > @@ -354,7 +354,8 @@ Playpen integration |g:rust_clip_command| is the command to run to copy the playpen url to the clipboard of your system. -Evaulation of a single Rust file + +Evaluation of a single Rust file -------------------------------- NOTE: These commands are useful only when working with standalone Rust files, diff --git a/sources_non_forked/typescript-vim/README.md b/sources_non_forked/typescript-vim/README.md index fdce308d..c4873812 100644 --- a/sources_non_forked/typescript-vim/README.md +++ b/sources_non_forked/typescript-vim/README.md @@ -11,11 +11,16 @@ and other features for TypeScript editing. Install ------- -From Vim 8 onward, the plugin can be installed as simply as: +From Vim 8 onward, the plugin can be installed as simply as (Unix/Mac): ``` git clone https://github.com/leafgarland/typescript-vim.git ~/.vim/pack/typescript/start/typescript-vim ``` +On Windows/Powershell, use the following: +``` +git clone https://github.com/leafgarland/typescript-vim.git $home/vimfiles/pack/typescript/start/typescript-vim +``` + For older versions of Vim, the simplest way to install is via a Vim add-in manager such as [Plug](https://github.com/junegunn/vim-plug), [Vundle](https://github.com/gmarik/vundle) or diff --git a/sources_non_forked/typescript-vim/syntax/typescript.vim b/sources_non_forked/typescript-vim/syntax/typescript.vim index 09f2ef68..705016d1 100644 --- a/sources_non_forked/typescript-vim/syntax/typescript.vim +++ b/sources_non_forked/typescript-vim/syntax/typescript.vim @@ -87,22 +87,22 @@ syntax keyword typescriptPrototype contained prototype """""""""""""""""""""""" if get(g:, 'typescript_ignore_browserwords', 0) syntax keyword typescriptBrowserObjects window navigator screen history location - + syntax keyword typescriptDOMObjects document event HTMLElement Anchor Area Base Body Button Form Frame Frameset Image Link Meta Option Select Style Table TableCell TableRow Textarea syntax keyword typescriptDOMMethods contained createTextNode createElement insertBefore replaceChild removeChild appendChild hasChildNodes cloneNode normalize isSupported hasAttributes getAttribute setAttribute removeAttribute getAttributeNode setAttributeNode removeAttributeNode getElementsByTagName hasAttribute getElementById adoptNode close compareDocumentPosition createAttribute createCDATASection createComment createDocumentFragment createElementNS createEvent createExpression createNSResolver createProcessingInstruction createRange createTreeWalker elementFromPoint evaluate getBoxObjectFor getElementsByClassName getSelection getUserData hasFocus importNode syntax keyword typescriptDOMProperties contained nodeName nodeValue nodeType parentNode childNodes firstChild lastChild previousSibling nextSibling attributes ownerDocument namespaceURI prefix localName tagName - + syntax keyword typescriptAjaxObjects XMLHttpRequest syntax keyword typescriptAjaxProperties contained readyState responseText responseXML statusText syntax keyword typescriptAjaxMethods contained onreadystatechange abort getAllResponseHeaders getResponseHeader open send setRequestHeader - + syntax keyword typescriptPropietaryObjects ActiveXObject syntax keyword typescriptPropietaryMethods contained attachEvent detachEvent cancelBubble returnValue - + syntax keyword typescriptHtmlElemProperties contained className clientHeight clientLeft clientTop clientWidth dir href id innerHTML lang length offsetHeight offsetLeft offsetParent offsetTop offsetWidth scrollHeight scrollLeft scrollTop scrollWidth style tabIndex target title - + syntax keyword typescriptEventListenerKeywords contained blur click focus mouseover mouseout load item - + syntax keyword typescriptEventListenerMethods contained scrollIntoView addEventListener dispatchEvent removeEventListener preventDefault stopPropagation endif " }}} @@ -267,7 +267,7 @@ if version >= 508 || !exists("did_typescript_syn_inits") HiLink typescriptStorageClass StorageClass HiLink typescriptRepeat Repeat HiLink typescriptStatement Statement - HiLink typescriptFuncKeyword Function + HiLink typescriptFuncKeyword Keyword HiLink typescriptMessage Keyword HiLink typescriptDeprecated Exception HiLink typescriptError Error diff --git a/sources_non_forked/vim-fugitive/autoload/fugitive.vim b/sources_non_forked/vim-fugitive/autoload/fugitive.vim index f29aeac8..302d074b 100644 --- a/sources_non_forked/vim-fugitive/autoload/fugitive.vim +++ b/sources_non_forked/vim-fugitive/autoload/fugitive.vim @@ -934,7 +934,7 @@ function! fugitive#Find(object, ...) abort let commit = matchstr(s:ChompDefault('', [dir, 'merge-base'] + commits + ['--']), '\<[0-9a-f]\{40,\}\>') endif if commit !~# '^[0-9a-f]\{40,\}$' - let commit = matchstr(s:ChompDefault('', [dir, 'rev-parse', '--verify', commit, '--']), '\<[0-9a-f]\{40,\}\>') + let commit = matchstr(s:ChompDefault('', [dir, 'rev-parse', '--verify', commit . (len(file) ? '^{}' : ''), '--']), '\<[0-9a-f]\{40,\}\>') endif if len(commit) let f = 'fugitive://' . dir . '//' . commit . file @@ -1559,7 +1559,7 @@ function! s:ReplaceCmd(cmd) abort endtry call delete(temp) if s:cpath(fnamemodify(bufname('$'), ':p'), temp) - silent execute 'bwipeout '.bufnr('$') + silent! execute 'bwipeout '.bufnr('$') endif endtry endfunction diff --git a/sources_non_forked/vim-fugitive/plugin/fugitive.vim b/sources_non_forked/vim-fugitive/plugin/fugitive.vim index fbdb0e9e..e98f437d 100644 --- a/sources_non_forked/vim-fugitive/plugin/fugitive.vim +++ b/sources_non_forked/vim-fugitive/plugin/fugitive.vim @@ -304,6 +304,9 @@ function! s:ProjectionistDetect() abort endif endfunction +if v:version + has('patch061') < 703 + runtime! autoload/fugitive.vim +endif let g:io_fugitive = { \ 'simplify': function('fugitive#simplify'), \ 'resolve': function('fugitive#resolve'), diff --git a/sources_non_forked/vim-snippets/UltiSnips/puppet.snippets b/sources_non_forked/vim-snippets/UltiSnips/puppet.snippets index 7b39094c..eacc8fc8 100644 --- a/sources_non_forked/vim-snippets/UltiSnips/puppet.snippets +++ b/sources_non_forked/vim-snippets/UltiSnips/puppet.snippets @@ -67,7 +67,8 @@ endsnippet snippet exec "Exec resource type" b exec { '${1:command}': - refreshonly => true, + command => "${2:$1}", + user => "${3:root}", } endsnippet diff --git a/sources_non_forked/vim-snippets/UltiSnips/sh.snippets b/sources_non_forked/vim-snippets/UltiSnips/sh.snippets index 9bacc725..37bf0c4f 100644 --- a/sources_non_forked/vim-snippets/UltiSnips/sh.snippets +++ b/sources_non_forked/vim-snippets/UltiSnips/sh.snippets @@ -29,14 +29,14 @@ snippet #! "#!/usr/bin/env (!env)" b `!p snip.rv = '#!/usr/bin/env ' + getShell() + "\n" ` endsnippet -snippet sbash "safe bash options" +snippet sbash "safe bash options" b #!/usr/bin/env bash set -euo pipefail IFS=$'\n\t' `!p snip.rv ='\n\n' ` endsnippet -snippet temp "Tempfile" +snippet temp "Tempfile" b ${1:TMPFILE}="$(mktemp -t ${3:--suffix=${4:.SUFFIX}} ${2:`!p snip.rv = re.sub(r'[^a-zA-Z]', '_', snip.fn) or "untitled" `}.XXXXXX)" @@ -44,27 +44,27 @@ ${5:${6/(.+)/trap "/}${6:rm -f '$${1/.*\s//}'}${6/(.+)/" 0 # EXIT\ endsnippet -snippet case "case .. esac (case)" +snippet /case|sw(itch)?/ "case .. esac (case)" rb case ${1:word} in ${2:pattern} ) - $0;; + ${0:${VISUAL}};; esac endsnippet -snippet elif "elif .. (elif)" +snippet elif "elif .. (elif)" b elif ${2:[[ ${1:condition} ]]}; then - ${0:#statements} + ${0:${VISUAL}} endsnippet -snippet for "for ... done (for)" +snippet for "for ... done (for)" b for (( i = 0; i < ${1:10}; i++ )); do - ${0:#statements} + ${0:${VISUAL}} done endsnippet -snippet forin "for ... in ... done (forin)" +snippet forin "for ... in ... done (forin)" b for ${1:i}${2/.+/ in /}${2:words}; do - ${0:#statements} + ${0:${VISUAL}} done endsnippet @@ -74,21 +74,21 @@ snippet here "here document (here)" ${1/['"`](.+)['"`]/$1/} endsnippet -snippet if "if ... then (if)" +snippet if "if ... then (if)" b if ${2:[[ ${1:condition} ]]}; then - ${0:#statements} + ${0:${VISUAL}} fi endsnippet -snippet until "until ... (done)" +snippet until "until ... (done)" b until ${2:[[ ${1:condition} ]]}; do - ${0:#statements} + ${0:${VISUAL}} done endsnippet -snippet while "while ... (done)" +snippet /wh(ile)?/ "while ... (done)" rb while ${2:[[ ${1:condition} ]]}; do - ${0:#statements} + ${0:${VISUAL}} done endsnippet From 46195e4ca4d732b9e0c0cac1602f19fe1f5e9ea4 Mon Sep 17 00:00:00 2001 From: Amir Date: Tue, 7 Jan 2020 13:45:07 +0100 Subject: [PATCH 38/40] Updated plugins --- .../ale/ale_linters/graphql/eslint.vim | 2 +- .../ale/ale_linters/python/mypy.vim | 23 +- .../ale/autoload/ale/completion.vim | 7 +- .../ale/autoload/ale/handlers/eslint.vim | 13 +- sources_non_forked/ale/autoload/ale/hover.vim | 10 + sources_non_forked/ale/doc/ale-python.txt | 30 +- sources_non_forked/ale/doc/ale.txt | 22 +- sources_non_forked/ale/plugin/ale.vim | 3 + .../rplugin/python3/deoplete/sources/ale.py | 22 +- .../nerdtree/.github/workflows/vint.yml | 15 + sources_non_forked/nerdtree/.vintrc.yaml | 5 + sources_non_forked/nerdtree/CHANGELOG.md | 266 ++++++------- sources_non_forked/nerdtree/README.markdown | 18 +- sources_non_forked/nerdtree/_config.yml | 1 + .../nerdtree/autoload/nerdtree.vim | 76 ++-- .../nerdtree/autoload/nerdtree/ui_glue.vim | 260 ++++++------ sources_non_forked/nerdtree/doc/NERDTree.txt | 8 +- .../nerdtree/lib/nerdtree/bookmark.vim | 44 +-- .../nerdtree/lib/nerdtree/creator.vim | 42 +- .../nerdtree/lib/nerdtree/flag_set.vim | 4 +- .../nerdtree/lib/nerdtree/key_map.vim | 24 +- .../nerdtree/lib/nerdtree/menu_controller.vim | 42 +- .../nerdtree/lib/nerdtree/menu_item.vim | 10 +- .../nerdtree/lib/nerdtree/nerdtree.vim | 42 +- .../nerdtree/lib/nerdtree/notifier.vim | 4 +- .../nerdtree/lib/nerdtree/opener.vim | 70 ++-- .../nerdtree/lib/nerdtree/path.vim | 86 ++-- .../nerdtree/lib/nerdtree/tree_dir_node.vim | 90 ++--- .../nerdtree/lib/nerdtree/tree_file_node.vim | 14 +- .../nerdtree/lib/nerdtree/ui.vim | 178 ++++----- .../nerdtree_plugin/exec_menuitem.vim | 6 +- .../nerdtree/nerdtree_plugin/fs_menu.vim | 148 +++---- .../nerdtree/nerdtree_plugin/vcs.vim | 8 +- .../nerdtree/plugin/NERD_tree.vim | 188 ++++----- .../nerdtree/syntax/nerdtree.vim | 6 +- .../vim-fugitive/autoload/fugitive.vim | 369 ++++++++++++++++-- .../vim-fugitive/doc/fugitive.txt | 16 +- sources_non_forked/vim-gitgutter/README.mkd | 8 +- .../vim-gitgutter/doc/gitgutter.txt | 5 +- .../vim-snippets/UltiSnips/octave.snippets | 2 + .../vim-snippets/snippets/octave.snippets | 2 + .../vim-snippets/snippets/pandoc.snippets | 2 + 42 files changed, 1299 insertions(+), 892 deletions(-) create mode 100644 sources_non_forked/nerdtree/.github/workflows/vint.yml create mode 100644 sources_non_forked/nerdtree/.vintrc.yaml create mode 100644 sources_non_forked/nerdtree/_config.yml create mode 100644 sources_non_forked/vim-snippets/UltiSnips/octave.snippets create mode 100644 sources_non_forked/vim-snippets/snippets/octave.snippets create mode 100644 sources_non_forked/vim-snippets/snippets/pandoc.snippets diff --git a/sources_non_forked/ale/ale_linters/graphql/eslint.vim b/sources_non_forked/ale/ale_linters/graphql/eslint.vim index 654b8c17..aed1a371 100644 --- a/sources_non_forked/ale/ale_linters/graphql/eslint.vim +++ b/sources_non_forked/ale/ale_linters/graphql/eslint.vim @@ -5,5 +5,5 @@ call ale#linter#Define('graphql', { \ 'name': 'eslint', \ 'executable': function('ale#handlers#eslint#GetExecutable'), \ 'command': function('ale#handlers#eslint#GetCommand'), -\ 'callback': 'ale#handlers#eslint#Handle', +\ 'callback': 'ale#handlers#eslint#HandleJSON', \}) diff --git a/sources_non_forked/ale/ale_linters/python/mypy.vim b/sources_non_forked/ale/ale_linters/python/mypy.vim index dc4044e6..94dfae7d 100644 --- a/sources_non_forked/ale/ale_linters/python/mypy.vim +++ b/sources_non_forked/ale/ale_linters/python/mypy.vim @@ -3,6 +3,7 @@ call ale#Set('python_mypy_executable', 'mypy') call ale#Set('python_mypy_ignore_invalid_syntax', 0) +call ale#Set('python_mypy_show_notes', 1) call ale#Set('python_mypy_options', '') call ale#Set('python_mypy_use_global', get(g:, 'ale_use_global_executables', 0)) call ale#Set('python_mypy_auto_pipenv', 0) @@ -18,6 +19,15 @@ endfunction " The directory to change to before running mypy function! s:GetDir(buffer) abort + " If we find a directory with "mypy.ini" in it use that, + " else try and find the "python project" root, or failing + " that, run from the same folder as the current file + for l:path in ale#path#Upwards(expand('#' . a:buffer . ':p:h')) + if filereadable(l:path . '/mypy.ini') + return l:path + endif + endfor + let l:project_root = ale#python#FindProjectRoot(a:buffer) return !empty(l:project_root) @@ -51,7 +61,16 @@ function! ale_linters#python#mypy#Handle(buffer, lines) abort " Lines like these should be ignored below: " " file.py:4: note: (Stub files are from https://github.com/python/typeshed) - let l:pattern = '\v^([a-zA-Z]?:?[^:]+):(\d+):?(\d+)?: (error|warning): (.+)$' + + let l:types = 'error|warning' + + if ale#Var(a:buffer, 'python_mypy_show_notes') + let l:types = 'error|warning|note' + endif + + let l:pattern = '\v^([a-zA-Z]?:?[^:]+):(\d+):?(\d+)?: (' + \ . l:types + \ . '): (.+)$' let l:output = [] for l:match in ale#util#GetMatches(a:lines, l:pattern) @@ -65,7 +84,7 @@ function! ale_linters#python#mypy#Handle(buffer, lines) abort \ 'filename': ale#path#GetAbsPath(l:dir, l:match[1]), \ 'lnum': l:match[2] + 0, \ 'col': l:match[3] + 0, - \ 'type': l:match[4] is# 'error' ? 'E' : 'W', + \ 'type': l:match[4] is# 'error' ? 'E' : (l:match[4] is# 'note' ? 'I': 'W'), \ 'text': l:match[5], \}) endfor diff --git a/sources_non_forked/ale/autoload/ale/completion.vim b/sources_non_forked/ale/autoload/ale/completion.vim index da24e839..80684a30 100644 --- a/sources_non_forked/ale/autoload/ale/completion.vim +++ b/sources_non_forked/ale/autoload/ale/completion.vim @@ -261,6 +261,8 @@ function! s:ReplaceCompletionOptions() abort if &l:completeopt =~# 'preview' let &l:completeopt = 'menu,menuone,preview,noselect,noinsert' + elseif &l:completeopt =~# 'popup' + let &l:completeopt = 'menu,menuone,popup,noselect,noinsert' else let &l:completeopt = 'menu,menuone,noselect,noinsert' endif @@ -386,7 +388,6 @@ function! s:CompletionStillValid(request_id) abort \&& b:ale_completion_info.line == l:line \&& ( \ b:ale_completion_info.column == l:column - \ || b:ale_completion_info.source is# 'deoplete' \ || b:ale_completion_info.source is# 'ale-omnifunc' \ || b:ale_completion_info.source is# 'ale-callback' \) @@ -803,7 +804,9 @@ endfunction function! ale#completion#HandleUserData(completed_item) abort let l:source = get(get(b:, 'ale_completion_info', {}), 'source', '') - if l:source isnot# 'ale-automatic' && l:source isnot# 'ale-manual' && l:source isnot# 'ale-callback' + if l:source isnot# 'ale-automatic' + \&& l:source isnot# 'ale-manual' + \&& l:source isnot# 'ale-callback' return endif diff --git a/sources_non_forked/ale/autoload/ale/handlers/eslint.vim b/sources_non_forked/ale/autoload/ale/handlers/eslint.vim index 7ef63785..156b939f 100644 --- a/sources_non_forked/ale/autoload/ale/handlers/eslint.vim +++ b/sources_non_forked/ale/autoload/ale/handlers/eslint.vim @@ -42,7 +42,18 @@ function! ale#handlers#eslint#GetCommand(buffer) abort let l:options = ale#Var(a:buffer, 'javascript_eslint_options') - return ale#node#Executable(a:buffer, l:executable) + " ESLint 6 loads plugins/configs/parsers from the project root + " By default, the project root is simply the CWD of the running process. + " https://github.com/eslint/rfcs/blob/master/designs/2018-simplified-package-loading/README.md + " https://github.com/dense-analysis/ale/issues/2787 + " Identify project root from presence of node_modules dir. + " Note: If node_modules not present yet, can't load local deps anyway. + let l:modules_dir = ale#path#FindNearestDirectory(a:buffer, 'node_modules') + let l:project_dir = !empty(l:modules_dir) ? fnamemodify(l:modules_dir, ':h:h') : '' + let l:cd_command = !empty(l:project_dir) ? ale#path#CdString(l:project_dir) : '' + + return l:cd_command + \ . ale#node#Executable(a:buffer, l:executable) \ . (!empty(l:options) ? ' ' . l:options : '') \ . ' -f json --stdin --stdin-filename %s' endfunction diff --git a/sources_non_forked/ale/autoload/ale/hover.vim b/sources_non_forked/ale/autoload/ale/hover.vim index 2af35aa4..8fdd288c 100644 --- a/sources_non_forked/ale/autoload/ale/hover.vim +++ b/sources_non_forked/ale/autoload/ale/hover.vim @@ -42,6 +42,11 @@ function! ale#hover#HandleTSServerResponse(conn_id, response) abort \&& exists('*balloon_show') \&& ale#Var(l:options.buffer, 'set_balloons') call balloon_show(a:response.body.displayString) + elseif g:ale_hover_to_preview + call ale#preview#Show(split(a:response.body.displayString, "\n"), { + \ 'filetype': 'ale-preview.message', + \ 'stay_here': 1, + \}) else call ale#util#ShowMessage(a:response.body.displayString) endif @@ -98,6 +103,11 @@ function! ale#hover#HandleLSPResponse(conn_id, response) abort \&& exists('*balloon_show') \&& ale#Var(l:options.buffer, 'set_balloons') call balloon_show(l:str) + elseif g:ale_hover_to_preview + call ale#preview#Show(split(l:str, "\n"), { + \ 'filetype': 'ale-preview.message', + \ 'stay_here': 1, + \}) else call ale#util#ShowMessage(l:str) endif diff --git a/sources_non_forked/ale/doc/ale-python.txt b/sources_non_forked/ale/doc/ale-python.txt index 9d5846d2..93f1d668 100644 --- a/sources_non_forked/ale/doc/ale-python.txt +++ b/sources_non_forked/ale/doc/ale-python.txt @@ -145,8 +145,8 @@ g:ale_python_black_use_global *g:ale_python_black_use_global* See |ale-integrations-local-executables| -g:ale_python_black_auto_pipenv *g:ale_python_black_auto_pipenv* - *b:ale_python_black_auto_pipenv* +g:ale_python_black_auto_pipenv *g:ale_python_black_auto_pipenv* + *b:ale_python_black_auto_pipenv* Type: |Number| Default: `0` @@ -263,6 +263,15 @@ to check for errors while you type. `mypy` will be run from a detected project root, per |ale-python-root|. +g:ale_python_mypy_auto_pipenv *g:ale_python_mypy_auto_pipenv* + *b:ale_python_mypy_auto_pipenv* + Type: |Number| + Default: `0` + + Detect whether the file is inside a pipenv, and set the executable to `pipenv` + if true. This is overridden by a manually-set executable. + + g:ale_python_mypy_executable *g:ale_python_mypy_executable* *b:ale_python_mypy_executable* Type: |String| @@ -272,6 +281,7 @@ g:ale_python_mypy_executable *g:ale_python_mypy_executable* Set this to `'pipenv'` to invoke `'pipenv` `run` `mypy'`. + g:ale_python_mypy_ignore_invalid_syntax *g:ale_python_mypy_ignore_invalid_syntax* *b:ale_python_mypy_ignore_invalid_syntax* @@ -292,6 +302,14 @@ g:ale_python_mypy_options *g:ale_python_mypy_options* invocation. +g:ale_python_mypy_show_notes *g:ale_python_mypy_show_notes* + *b:ale_python_mypy_show_notes* + Type: |Number| + Default: `1` + + If enabled, notes on lines will be displayed as 'I' (info) messages. + + g:ale_python_mypy_use_global *g:ale_python_mypy_use_global* *b:ale_python_mypy_use_global* Type: |Number| @@ -300,14 +318,6 @@ g:ale_python_mypy_use_global *g:ale_python_mypy_use_global* See |ale-integrations-local-executables| -g:ale_python_mypy_auto_pipenv *g:ale_python_mypy_auto_pipenv* - *b:ale_python_mypy_auto_pipenv* - Type: |Number| - Default: `0` - - Detect whether the file is inside a pipenv, and set the executable to `pipenv` - if true. This is overridden by a manually-set executable. - =============================================================================== prospector *ale-python-prospector* diff --git a/sources_non_forked/ale/doc/ale.txt b/sources_non_forked/ale/doc/ale.txt index 847a9777..eafbc119 100644 --- a/sources_non_forked/ale/doc/ale.txt +++ b/sources_non_forked/ale/doc/ale.txt @@ -432,6 +432,11 @@ vimrc, and your issues should go away. > set completeopt=menu,menuone,preview,noselect,noinsert < + +Or alternatively, if you want to show documentation in popups: > + + set completeopt=menu,menuone,popup,noselect,noinsert +< *ale-symbols* ALE provides a set of basic completion symbols. If you want to replace those @@ -525,6 +530,9 @@ the mouse over a symbol in a buffer. Diagnostic information will take priority over hover information for balloons. If a line contains a problem, that problem will be displayed in a balloon instead of hover information. +Hover information can be displayed in the preview window instead by setting +|g:ale_hover_to_preview| to `1`. + For Vim 8.1+ terminals, mouse hovering is disabled by default. Enabling |balloonexpr| commands in terminals can cause scrolling issues in terminals, so ALE will not attempt to show balloons unless |g:ale_set_balloons| is set to @@ -1023,6 +1031,16 @@ g:ale_history_log_output *g:ale_history_log_output* if you want to save on some memory usage. +g:ale_hover_to_preview *g:ale_hover_to_preview* + *b:ale_hover_to_preview* + + Type: |Number| + Default: `0` + + If set to `1`, hover messages will be displayed in the preview window, + instead of in balloons or the message line. + + g:ale_keep_list_window_open *g:ale_keep_list_window_open* *b:ale_keep_list_window_open* Type: |Number| @@ -1337,7 +1355,7 @@ b:ale_loclist_msg_format *b:ale_loclist_msg_format* The strings for configuring `%severity%` are also used for this option. -g:ale_lsp_show_message_format *g:ale_lsp_show_message_format* +g:ale_lsp_show_message_format *g:ale_lsp_show_message_format* Type: |String| Default: `'%severity%:%linter%: %s'` @@ -1359,7 +1377,7 @@ g:ale_lsp_show_message_format *g:ale_lsp_show_message_ separately for each buffer like |g:ale_echo_msg_format| can. -g:ale_lsp_show_message_severity *g:ale_lsp_show_message_severity* +g:ale_lsp_show_message_severity *g:ale_lsp_show_message_severity* Type: |String| Default: `'error'` diff --git a/sources_non_forked/ale/plugin/ale.vim b/sources_non_forked/ale/plugin/ale.vim index 1912a9c0..8fea3bb4 100644 --- a/sources_non_forked/ale/plugin/ale.vim +++ b/sources_non_forked/ale/plugin/ale.vim @@ -125,6 +125,9 @@ let g:ale_close_preview_on_insert = get(g:, 'ale_close_preview_on_insert', 0) " This flag can be set to 0 to disable balloon support. let g:ale_set_balloons = get(g:, 'ale_set_balloons', has('balloon_eval') && has('gui_running')) +" Use preview window for hover messages. +let g:ale_hover_to_preview = get(g:, 'ale_hover_to_preview', 0) + " This flag can be set to 0 to disable warnings for trailing whitespace let g:ale_warn_about_trailing_whitespace = get(g:, 'ale_warn_about_trailing_whitespace', 1) " This flag can be set to 0 to disable warnings for trailing blank lines diff --git a/sources_non_forked/ale/rplugin/python3/deoplete/sources/ale.py b/sources_non_forked/ale/rplugin/python3/deoplete/sources/ale.py index 3955ed2d..ae1f4039 100644 --- a/sources_non_forked/ale/rplugin/python3/deoplete/sources/ale.py +++ b/sources_non_forked/ale/rplugin/python3/deoplete/sources/ale.py @@ -24,6 +24,7 @@ class Source(Base): self.rank = 1000 self.is_bytepos = True self.min_pattern_length = 1 + self.is_volatile = True # Do not forget to update s:trigger_character_map in completion.vim in # updating entries in this map. self.input_patterns = { @@ -44,21 +45,16 @@ class Source(Base): if not self.vim.call('ale#completion#CanProvideCompletions'): return None - if context.get('is_refresh'): - context['is_async'] = False + event = context.get('event') - if context['is_async']: - # Result is the same as for omnifunc, or None. + if event == 'Async': result = self.vim.call('ale#completion#GetCompletionResult') + return result or [] - if result is not None: - context['is_async'] = False - - return result - else: - context['is_async'] = True - - # Request some completion results. - self.vim.call('ale#completion#GetCompletions', 'deoplete') + if context.get('is_refresh'): + self.vim.command( + "call ale#completion#GetCompletions('ale-callback', " + \ + "{'callback': {completions -> deoplete#auto_complete() }})" + ) return [] diff --git a/sources_non_forked/nerdtree/.github/workflows/vint.yml b/sources_non_forked/nerdtree/.github/workflows/vint.yml new file mode 100644 index 00000000..36d72580 --- /dev/null +++ b/sources_non_forked/nerdtree/.github/workflows/vint.yml @@ -0,0 +1,15 @@ +name: Vint +on: [push, pull_request] +jobs: + vint: + strategy: + fail-fast: false + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@master + - name: Run vint with reviewdog + uses: reviewdog/action-vint@v1.0.1 + with: + github_token: ${{ secrets.github_token }} + reporter: github-pr-review diff --git a/sources_non_forked/nerdtree/.vintrc.yaml b/sources_non_forked/nerdtree/.vintrc.yaml new file mode 100644 index 00000000..c44b6aba --- /dev/null +++ b/sources_non_forked/nerdtree/.vintrc.yaml @@ -0,0 +1,5 @@ +cmdargs: + severity: style_problem + color: true + env: + neovim: false diff --git a/sources_non_forked/nerdtree/CHANGELOG.md b/sources_non_forked/nerdtree/CHANGELOG.md index cec006c9..c8989ef3 100644 --- a/sources_non_forked/nerdtree/CHANGELOG.md +++ b/sources_non_forked/nerdtree/CHANGELOG.md @@ -8,152 +8,154 @@ - **.PATCH**: Pull Request Title (PR Author) [PR Number](Link to PR) --> #### 6.4 +- **.3**: Fix regex that finds keyword for minimal menu. (PhilRunninger) [#1075](https://github.com/preservim/nerdtree/pull/1075) +- **.2**: Lint vimscript, fix errors and warnings, add CI job to review PRs (Caleb Maclennan) [#1071](https://github.com/preservim/nerdtree/pull/1071) - **.1**: Ensure backward compatibility. v:t_func is not available before Vim 8.0 (Phil Runninger) -- **.0**: Allow use of function references as callbacks (HiPhish) [#1067](https://github.com/scrooloose/nerdtree/pull/1067) +- **.0**: Allow use of function references as callbacks (HiPhish) [#1067](https://github.com/preservim/nerdtree/pull/1067) #### 6.3 -- **.0**: Add new command that behaves like NERDTreeToggle but defaults to the root of a VCS repository. (willfindlay) [#1060](https://github.com/scrooloose/nerdtree/pull/1060) +- **.0**: Add new command that behaves like NERDTreeToggle but defaults to the root of a VCS repository. (willfindlay) [#1060](https://github.com/preservim/nerdtree/pull/1060) #### 6.2 -- **.1**: Menu option, 'copy path to clipboard' is aware of VIM clipboard option (jhzn) [#1056](https://github.com/scrooloose/nerdtree/pull/1056) -- **.0**: Support tab-specific CWDs (PhilRunninger) [#1032](https://github.com/scrooloose/nerdtree/pull/1032) +- **.1**: Menu option, 'copy path to clipboard' is aware of VIM clipboard option (jhzn) [#1056](https://github.com/preservim/nerdtree/pull/1056) +- **.0**: Support tab-specific CWDs (PhilRunninger) [#1032](https://github.com/preservim/nerdtree/pull/1032) #### 6.1 -- **.4**: Add VIM built-in package management to read me file. (pesarkhobeee) [#1049](https://github.com/scrooloose/nerdtree/pull/1049) -- **.3**: Save/Set screen state also on WinLeave and WinEnter. (PhilRunninger) [#1048](https://github.com/scrooloose/nerdtree/pull/1048) -- **.2**: Wrap saveScreenState's statements in a try-catch block. (PhilRunninger) [#1047](https://github.com/scrooloose/nerdtree/pull/1047) -- **.1**: Catch errors when trying to read CHANGELOG.md. (PhilRunninger) [#1045](https://github.com/scrooloose/nerdtree/pull/1045) -- **.0**: If file path doesn't exist, :NERDTreeFind its parent directory instead. (PhilRunninger) [#1043](https://github.com/scrooloose/nerdtree/pull/1043) +- **.4**: Add VIM built-in package management to read me file. (pesarkhobeee) [#1049](https://github.com/preservim/nerdtree/pull/1049) +- **.3**: Save/Set screen state also on WinLeave and WinEnter. (PhilRunninger) [#1048](https://github.com/preservim/nerdtree/pull/1048) +- **.2**: Wrap saveScreenState's statements in a try-catch block. (PhilRunninger) [#1047](https://github.com/preservim/nerdtree/pull/1047) +- **.1**: Catch errors when trying to read CHANGELOG.md. (PhilRunninger) [#1045](https://github.com/preservim/nerdtree/pull/1045) +- **.0**: If file path doesn't exist, :NERDTreeFind its parent directory instead. (PhilRunninger) [#1043](https://github.com/preservim/nerdtree/pull/1043) #### 6.0 -- **.1**: Reintroduce necessary variable mistakenly removed. (PhilRunninger) [#1040](https://github.com/scrooloose/nerdtree/pull/1040) -- **.0**: Make the behavior of window splits consistent (dragonxlwang, PhilRunninger) [#1035](https://github.com/scrooloose/nerdtree/pull/1035) +- **.1**: Reintroduce necessary variable mistakenly removed. (PhilRunninger) [#1040](https://github.com/preservim/nerdtree/pull/1040) +- **.0**: Make the behavior of window splits consistent (dragonxlwang, PhilRunninger) [#1035](https://github.com/preservim/nerdtree/pull/1035) #### 5.3 -- **.3**: Fix (p)ath not displaying in the minimal menu (tuzz) [#1038](https://github.com/scrooloose/nerdtree/pull/1038) -- **.2**: Enable events when closing NerdTree window. (PhilRunninger) [#1037](https://github.com/scrooloose/nerdtree/pull/1037) -- **.1**: Fix the `e` key mapping to use netrw if desired (PhilRunninger) [#1031](https://github.com/scrooloose/nerdtree/pull/1031) -- **.0**: Add file extension and size to sorting capabilities (PhilRunninger) [#1029](https://github.com/scrooloose/nerdtree/pull/1029) +- **.3**: Fix (p)ath not displaying in the minimal menu (tuzz) [#1038](https://github.com/preservim/nerdtree/pull/1038) +- **.2**: Enable events when closing NerdTree window. (PhilRunninger) [#1037](https://github.com/preservim/nerdtree/pull/1037) +- **.1**: Fix the `e` key mapping to use netrw if desired (PhilRunninger) [#1031](https://github.com/preservim/nerdtree/pull/1031) +- **.0**: Add file extension and size to sorting capabilities (PhilRunninger) [#1029](https://github.com/preservim/nerdtree/pull/1029) #### 5.2 -- **.9**: Suppress events for intermediate window/tab/buffer changes (PhilRunninger) [#1026](https://github.com/scrooloose/nerdtree/pull/1026) -- **.8**: Revert [#1019](https://github.com/scrooloose/nerdtree/pull/1019) to fix nvim artifacts and flickering. (PhilRunninger) [#1021](https://github.com/scrooloose/nerdtree/pull/1021) -- **.7**: Use :mode only in neovim. MacVim still needs to use :redraw! (PhilRunninger) [#1019](https://github.com/scrooloose/nerdtree/pull/1019) -- **.6**: In CHANGELOG.md and PR template, make reference to PR a true HTML link. (PhilRunninger) [#1017](https://github.com/scrooloose/nerdtree/pull/1017) -- **.5**: Use `:mode` instead of `:redraw!` when updating menu. (PhilRunninger) [#1016](https://github.com/scrooloose/nerdtree/pull/1016) -- **.4**: When searching for root line num, stop at end of file. (PhilRunninger) [#1015](https://github.com/scrooloose/nerdtree/pull/1015) -- **.3**: Fix `` key map on the bookmark (lkebin) [#1014](https://github.com/scrooloose/nerdtree/pull/1014) -- **.2**: Make Enter work on the `.. ( up a dir )` line (PhilRunninger) [#1013](https://github.com/scrooloose/nerdtree/pull/1013) +- **.9**: Suppress events for intermediate window/tab/buffer changes (PhilRunninger) [#1026](https://github.com/preservim/nerdtree/pull/1026) +- **.8**: Revert [#1019](https://github.com/preservim/nerdtree/pull/1019) to fix nvim artifacts and flickering. (PhilRunninger) [#1021](https://github.com/preservim/nerdtree/pull/1021) +- **.7**: Use :mode only in neovim. MacVim still needs to use :redraw! (PhilRunninger) [#1019](https://github.com/preservim/nerdtree/pull/1019) +- **.6**: In CHANGELOG.md and PR template, make reference to PR a true HTML link. (PhilRunninger) [#1017](https://github.com/preservim/nerdtree/pull/1017) +- **.5**: Use `:mode` instead of `:redraw!` when updating menu. (PhilRunninger) [#1016](https://github.com/preservim/nerdtree/pull/1016) +- **.4**: When searching for root line num, stop at end of file. (PhilRunninger) [#1015](https://github.com/preservim/nerdtree/pull/1015) +- **.3**: Fix `` key map on the bookmark (lkebin) [#1014](https://github.com/preservim/nerdtree/pull/1014) +- **.2**: Make Enter work on the `.. ( up a dir )` line (PhilRunninger) [#1013](https://github.com/preservim/nerdtree/pull/1013) - **.1**: Fix nerdtree#version() on Windows. (PhilRunninger) -- **.0**: Expand functionality of `` mapping. (PhilRunninger) [#1011](https://github.com/scrooloose/nerdtree/pull/1011) +- **.0**: Expand functionality of `` mapping. (PhilRunninger) [#1011](https://github.com/preservim/nerdtree/pull/1011) #### 5.1 -- **.3**: Remove @mentions from PR template and change log. They weren't working. (PhilRunninger) [#1009](https://github.com/scrooloose/nerdtree/pull/1009) -- **.2**: Fix NERDTree opening with the wrong size. (PhilRunninger) [#1008](https://github.com/scrooloose/nerdtree/pull/1008) -- **.1**: Update Changelog and create PR Template (PhilRunninger) [#1007](https://github.com/scrooloose/nerdtree/pull/1007) +- **.3**: Remove @mentions from PR template and change log. They weren't working. (PhilRunninger) [#1009](https://github.com/preservim/nerdtree/pull/1009) +- **.2**: Fix NERDTree opening with the wrong size. (PhilRunninger) [#1008](https://github.com/preservim/nerdtree/pull/1008) +- **.1**: Update Changelog and create PR Template (PhilRunninger) [#1007](https://github.com/preservim/nerdtree/pull/1007) - **.0**: Too many changes for one patch... - - Refresh a dir_node if the file wasn't found in it, and look once more. (PhilRunninger) [#1005](https://github.com/scrooloose/nerdtree/pull/1005) - - Add a "copy path to clipboard" menu option (PhilRunninger) [#1002](https://github.com/scrooloose/nerdtree/pull/1002) - - Enable root refresh on "vim ." a different way than [#999](https://github.com/scrooloose/nerdtree/pull/999). (PhilRunninger) [#1001](https://github.com/scrooloose/nerdtree/pull/1001) - - Fix refreshroot (PhilRunninger) [#999](https://github.com/scrooloose/nerdtree/pull/999) - - Change version check to look for 703 not 730 (vhalis) [#994](https://github.com/scrooloose/nerdtree/pull/994) - - Change minimum vim (PhilRunninger) [#991](https://github.com/scrooloose/nerdtree/pull/991) - - Allow multi-character DirArrows (PhilRunninger) [#985](https://github.com/scrooloose/nerdtree/pull/985) - - Remove redraw! while still clearing last message empty string. (PhilRunninger) [#979](https://github.com/scrooloose/nerdtree/pull/979) - - fix `_initChildren` function value set to numChildrenCached error (terryding77) [#969](https://github.com/scrooloose/nerdtree/pull/969) - - On Windows, do a case-insensitive comparison of paths. (PhilRunninger) [#967](https://github.com/scrooloose/nerdtree/pull/967) - - Remove the **Please wait... DONE** messages. (PhilRunninger) [#966](https://github.com/scrooloose/nerdtree/pull/966) - - Smarter delimiter default (PhilRunninger) [#963](https://github.com/scrooloose/nerdtree/pull/963) - - Update directory .vimdc readme example (spencerdcarlson) [#961](https://github.com/scrooloose/nerdtree/pull/961) - - Preview bookmarks (PhilRunninger) [#956](https://github.com/scrooloose/nerdtree/pull/956) - - Add new value to NERDTreeQuitOnOpen to close bookmark table (PhilRunninger) [#955](https://github.com/scrooloose/nerdtree/pull/955) - - Add an :EditBookmarks command to edit the bookmarks file (PhilRunninger) [#954](https://github.com/scrooloose/nerdtree/pull/954) - - Before copying, turn off &shellslash. Restore after copy is finished. (PhilRunninger) [#952](https://github.com/scrooloose/nerdtree/pull/952) - - Set a maximum window size when zooming. (PhilRunninger) [#950](https://github.com/scrooloose/nerdtree/pull/950) - - Confirm the wipeout of a unsaved buffer whose file has been renamed. (PhilRunninger) [#949](https://github.com/scrooloose/nerdtree/pull/949) - - Escape a backslash so it can be used in a key mapping. (PhilRunninger) [#948](https://github.com/scrooloose/nerdtree/pull/948) - - Add a NERDTreeMinimalMenu feature (tuzz) [#938](https://github.com/scrooloose/nerdtree/pull/938) - - fixed root path error for windows (zcodes) [#935](https://github.com/scrooloose/nerdtree/pull/935) - - Restore getDirChildren for use in nerdtree-project-plugin. (PhilRunninger) [#929](https://github.com/scrooloose/nerdtree/pull/929) - - Document NERDTreeNodeDelimiter [#912](https://github.com/scrooloose/nerdtree/pull/912) (PhilRunninger) [#926](https://github.com/scrooloose/nerdtree/pull/926) - - Allow modification of menu keybindings (Leandros) [#923](https://github.com/scrooloose/nerdtree/pull/923) - - Add two more disqualifications for isCascadable(). (PhilRunninger) [#914](https://github.com/scrooloose/nerdtree/pull/914) - - Allow highlighting more than one flag. (kristijanhusak) [#908](https://github.com/scrooloose/nerdtree/pull/908) - - Support sorting files and directories by modification time. (PhilRunninger) [#901](https://github.com/scrooloose/nerdtree/pull/901) - - Parse . and .. from path string with trailing slash. (PhilRunninger) [#899](https://github.com/scrooloose/nerdtree/pull/899) - - Force sort to recalculate the cached sortKey. (PhilRunninger) [#898](https://github.com/scrooloose/nerdtree/pull/898) - - Add NERDTreeRefreshRoot command (wgfm) [#897](https://github.com/scrooloose/nerdtree/pull/897) - - Call Resolve on the file's path when calling :NERDTreeFind. (PhilRunninger) [#896](https://github.com/scrooloose/nerdtree/pull/896) - - Catch all errors, not just NERDTree errors. (PhilRunninger) [#894](https://github.com/scrooloose/nerdtree/pull/894) - - Fix typo in help file (lvoisin) [#892](https://github.com/scrooloose/nerdtree/pull/892) - - Make NERDTreeCreator set the `'nolist'` option (lifecrisis) [#889](https://github.com/scrooloose/nerdtree/pull/889) - - Refresh buffers after `m`, `m` operation on a folder (PhilRunninger) [#888](https://github.com/scrooloose/nerdtree/pull/888) - - Use a better arg for FINDSTR when using the m,l command in Windows. (PhilRunninger) [#887](https://github.com/scrooloose/nerdtree/pull/887) - - Fix the / motions, which currently fail with cascades (lifecrisis) [#886](https://github.com/scrooloose/nerdtree/pull/886) - - Function "s:UI.getLineNum()" doesn't always work on cascades. (lifecrisis) [#882](https://github.com/scrooloose/nerdtree/pull/882) - - NERDTreeCWD: reset CWD if changed by NERDTreeFocus (PhilRunninger) [#878](https://github.com/scrooloose/nerdtree/pull/878) - - Use tabnext instead of gt to allow users to remap gt. (PhilRunninger) [#877](https://github.com/scrooloose/nerdtree/pull/877) - - Do a case sensitive comparison of new/existing buffers. (PhilRunninger) [#875](https://github.com/scrooloose/nerdtree/pull/875) - - Fix opening sub-directories that have commas in their name. (PhilRunninger) [#873](https://github.com/scrooloose/nerdtree/pull/873) - - Add new command to open NERDTree in the root of a VCS repository. (PhilRunninger) [#872](https://github.com/scrooloose/nerdtree/pull/872) - - Make sure the path to the bookmarks file exists before writing it. (PhilRunninger) [#871](https://github.com/scrooloose/nerdtree/pull/871) - - Unzoom NERDTree when opening a file (PhilRunninger) [#870](https://github.com/scrooloose/nerdtree/pull/870) - - Support unusual characters in file and directory names (PhilRunninger) [#868](https://github.com/scrooloose/nerdtree/pull/868) - - Reword renamed-buffer prompt to be more clear (aflock) [#867](https://github.com/scrooloose/nerdtree/pull/867) - - Default to placing cursor on root when closing bookmark table (lifecrisis) [#866](https://github.com/scrooloose/nerdtree/pull/866) - - Fix issues with sorting of nodes (PhilRunninger) [#856](https://github.com/scrooloose/nerdtree/pull/856) - - Better OSX detection (bubba-h57) [#853](https://github.com/scrooloose/nerdtree/pull/853) - - Bugfix - ensure keymaps dictionary exists before using it (mnussbaum) [#852](https://github.com/scrooloose/nerdtree/pull/852) - - Decrease startup-time by avoiding linear-time iteration over key mappings (mnussbaum) [#851](https://github.com/scrooloose/nerdtree/pull/851) - - Add code to sort mappings in quickhelp (lifecrisis) [#849](https://github.com/scrooloose/nerdtree/pull/849) - - Use ":clearjumps" in new NERDTree windows (lifecrisis) [#844](https://github.com/scrooloose/nerdtree/pull/844) - - Like m-c did before, create parent directories if needed on m-m. (PhilRunninger) [#840](https://github.com/scrooloose/nerdtree/pull/840) - - BUGFIX: Repair a problem with the `'u'` mapping. (lifecrisis) [#838](https://github.com/scrooloose/nerdtree/pull/838) - - Make the NERDTree buffer writable when rendering it. (PhilRunninger) [#837](https://github.com/scrooloose/nerdtree/pull/837) - - Code cleanup: Remove unsupported bookmark table mappings (lifecrisis) [#835](https://github.com/scrooloose/nerdtree/pull/835) - - Replace strcharpart() with substitute() for backward compatibility (bravestarr) [#834](https://github.com/scrooloose/nerdtree/pull/834) - - Fixed error `unknown function strcharpart` for older versions of Vim (hav4ik) [#833](https://github.com/scrooloose/nerdtree/pull/833) - - Clear output when NERDTree menu is aborted (lifecrisis) [#832](https://github.com/scrooloose/nerdtree/pull/832) - - Display a path with multi-byte characters correctly when it is truncated (bravestarr) [#830](https://github.com/scrooloose/nerdtree/pull/830) - - Support revealing file and executing file with xdg-open for Linux (ngnmhieu) [#824](https://github.com/scrooloose/nerdtree/pull/824) - - If node isn't open, count children on disk before deleting. (PhilRunninger) [#822](https://github.com/scrooloose/nerdtree/pull/822) - - Add new variable g:NERDTreeRemoveFileCmd (kutsan) [#816](https://github.com/scrooloose/nerdtree/pull/816) - - Use a better check for existence of the NERDTree buffer. (PhilRunninger) [#814](https://github.com/scrooloose/nerdtree/pull/814) - - Fix focussing previous buffer when closing NERDTree (mrubli) [#801](https://github.com/scrooloose/nerdtree/pull/801) - - Update the docs for "NERDTreeStatusline" (lifecrisis) [#796](https://github.com/scrooloose/nerdtree/pull/796) - - BUGFIX: Unstable behavior in the "getPath()" method (lifecrisis) [#795](https://github.com/scrooloose/nerdtree/pull/795) - - Revert the bugfix from pull request [#785](https://github.com/scrooloose/nerdtree/pull/785) (lifecrisis) [#794](https://github.com/scrooloose/nerdtree/pull/794) - - BUGFIX: Allow ":NERDTreeFind" to discover hidden files (lifecrisis) [#786](https://github.com/scrooloose/nerdtree/pull/786) - - BUGFIX: Allow ":NERDTreeFind" to reveal new files (lifecrisis) [#785](https://github.com/scrooloose/nerdtree/pull/785) - - Add modelines (lifecrisis) [#782](https://github.com/scrooloose/nerdtree/pull/782) - - Change the type of completion used by NERDTreeFind (lifecrisis) [#781](https://github.com/scrooloose/nerdtree/pull/781) - - change NERDTreeFind with args (zhenyangze) [#778](https://github.com/scrooloose/nerdtree/pull/778) - - Style Choice: Using confirm() when deleting a bookmark (lifecrisis) [#777](https://github.com/scrooloose/nerdtree/pull/777) - - remove useless substitute when `file =~# "/$"` (skyblueee) [#773](https://github.com/scrooloose/nerdtree/pull/773) - - remove useless removeLeadingSpaces in _stripMarkup (skyblueee) [#772](https://github.com/scrooloose/nerdtree/pull/772) - - Make the "o" mapping consistent with "x" (lifecrisis) [#769](https://github.com/scrooloose/nerdtree/pull/769) - - Fix a problem with the "x" handler (lifecrisis) [#768](https://github.com/scrooloose/nerdtree/pull/768) - - Clean up the handler for the "x" mapping (lifecrisis) [#767](https://github.com/scrooloose/nerdtree/pull/767) - - Revert change to tab opening method (lifecrisis) [#766](https://github.com/scrooloose/nerdtree/pull/766) - - BUGFIX: Add back support for "b:NERDTreeRoot" (lifecrisis) [#765](https://github.com/scrooloose/nerdtree/pull/765) - - Fix broken "t" and "T" mappings, tabs now open at end (lifecrisis) [#759](https://github.com/scrooloose/nerdtree/pull/759) - - Update doc with already existing mapping variables (asnr) [#699](https://github.com/scrooloose/nerdtree/pull/699) - - Fix the broken g:NERDTreeBookmarksSort setting (lifecrisis) [#696](https://github.com/scrooloose/nerdtree/pull/696) - - Correct NERDTreeIgnore pattern in doc (cntoplolicon) [#648](https://github.com/scrooloose/nerdtree/pull/648) - - Remove empty segments when splitting path (sooth-sayer) [#574](https://github.com/scrooloose/nerdtree/pull/574) - - Suppress autocmds less agressively (wincent) [#578](https://github.com/scrooloose/nerdtree/pull/578) [#691](https://github.com/scrooloose/nerdtree/pull/691) + - Refresh a dir_node if the file wasn't found in it, and look once more. (PhilRunninger) [#1005](https://github.com/preservim/nerdtree/pull/1005) + - Add a "copy path to clipboard" menu option (PhilRunninger) [#1002](https://github.com/preservim/nerdtree/pull/1002) + - Enable root refresh on "vim ." a different way than [#999](https://github.com/preservim/nerdtree/pull/999). (PhilRunninger) [#1001](https://github.com/preservim/nerdtree/pull/1001) + - Fix refreshroot (PhilRunninger) [#999](https://github.com/preservim/nerdtree/pull/999) + - Change version check to look for 703 not 730 (vhalis) [#994](https://github.com/preservim/nerdtree/pull/994) + - Change minimum vim (PhilRunninger) [#991](https://github.com/preservim/nerdtree/pull/991) + - Allow multi-character DirArrows (PhilRunninger) [#985](https://github.com/preservim/nerdtree/pull/985) + - Remove redraw! while still clearing last message empty string. (PhilRunninger) [#979](https://github.com/preservim/nerdtree/pull/979) + - fix `_initChildren` function value set to numChildrenCached error (terryding77) [#969](https://github.com/preservim/nerdtree/pull/969) + - On Windows, do a case-insensitive comparison of paths. (PhilRunninger) [#967](https://github.com/preservim/nerdtree/pull/967) + - Remove the **Please wait... DONE** messages. (PhilRunninger) [#966](https://github.com/preservim/nerdtree/pull/966) + - Smarter delimiter default (PhilRunninger) [#963](https://github.com/preservim/nerdtree/pull/963) + - Update directory .vimdc readme example (spencerdcarlson) [#961](https://github.com/preservim/nerdtree/pull/961) + - Preview bookmarks (PhilRunninger) [#956](https://github.com/preservim/nerdtree/pull/956) + - Add new value to NERDTreeQuitOnOpen to close bookmark table (PhilRunninger) [#955](https://github.com/preservim/nerdtree/pull/955) + - Add an :EditBookmarks command to edit the bookmarks file (PhilRunninger) [#954](https://github.com/preservim/nerdtree/pull/954) + - Before copying, turn off &shellslash. Restore after copy is finished. (PhilRunninger) [#952](https://github.com/preservim/nerdtree/pull/952) + - Set a maximum window size when zooming. (PhilRunninger) [#950](https://github.com/preservim/nerdtree/pull/950) + - Confirm the wipeout of a unsaved buffer whose file has been renamed. (PhilRunninger) [#949](https://github.com/preservim/nerdtree/pull/949) + - Escape a backslash so it can be used in a key mapping. (PhilRunninger) [#948](https://github.com/preservim/nerdtree/pull/948) + - Add a NERDTreeMinimalMenu feature (tuzz) [#938](https://github.com/preservim/nerdtree/pull/938) + - fixed root path error for windows (zcodes) [#935](https://github.com/preservim/nerdtree/pull/935) + - Restore getDirChildren for use in nerdtree-project-plugin. (PhilRunninger) [#929](https://github.com/preservim/nerdtree/pull/929) + - Document NERDTreeNodeDelimiter [#912](https://github.com/preservim/nerdtree/pull/912) (PhilRunninger) [#926](https://github.com/preservim/nerdtree/pull/926) + - Allow modification of menu keybindings (Leandros) [#923](https://github.com/preservim/nerdtree/pull/923) + - Add two more disqualifications for isCascadable(). (PhilRunninger) [#914](https://github.com/preservim/nerdtree/pull/914) + - Allow highlighting more than one flag. (kristijanhusak) [#908](https://github.com/preservim/nerdtree/pull/908) + - Support sorting files and directories by modification time. (PhilRunninger) [#901](https://github.com/preservim/nerdtree/pull/901) + - Parse . and .. from path string with trailing slash. (PhilRunninger) [#899](https://github.com/preservim/nerdtree/pull/899) + - Force sort to recalculate the cached sortKey. (PhilRunninger) [#898](https://github.com/preservim/nerdtree/pull/898) + - Add NERDTreeRefreshRoot command (wgfm) [#897](https://github.com/preservim/nerdtree/pull/897) + - Call Resolve on the file's path when calling :NERDTreeFind. (PhilRunninger) [#896](https://github.com/preservim/nerdtree/pull/896) + - Catch all errors, not just NERDTree errors. (PhilRunninger) [#894](https://github.com/preservim/nerdtree/pull/894) + - Fix typo in help file (lvoisin) [#892](https://github.com/preservim/nerdtree/pull/892) + - Make NERDTreeCreator set the `'nolist'` option (lifecrisis) [#889](https://github.com/preservim/nerdtree/pull/889) + - Refresh buffers after `m`, `m` operation on a folder (PhilRunninger) [#888](https://github.com/preservim/nerdtree/pull/888) + - Use a better arg for FINDSTR when using the m,l command in Windows. (PhilRunninger) [#887](https://github.com/preservim/nerdtree/pull/887) + - Fix the / motions, which currently fail with cascades (lifecrisis) [#886](https://github.com/preservim/nerdtree/pull/886) + - Function "s:UI.getLineNum()" doesn't always work on cascades. (lifecrisis) [#882](https://github.com/preservim/nerdtree/pull/882) + - NERDTreeCWD: reset CWD if changed by NERDTreeFocus (PhilRunninger) [#878](https://github.com/preservim/nerdtree/pull/878) + - Use tabnext instead of gt to allow users to remap gt. (PhilRunninger) [#877](https://github.com/preservim/nerdtree/pull/877) + - Do a case sensitive comparison of new/existing buffers. (PhilRunninger) [#875](https://github.com/preservim/nerdtree/pull/875) + - Fix opening sub-directories that have commas in their name. (PhilRunninger) [#873](https://github.com/preservim/nerdtree/pull/873) + - Add new command to open NERDTree in the root of a VCS repository. (PhilRunninger) [#872](https://github.com/preservim/nerdtree/pull/872) + - Make sure the path to the bookmarks file exists before writing it. (PhilRunninger) [#871](https://github.com/preservim/nerdtree/pull/871) + - Unzoom NERDTree when opening a file (PhilRunninger) [#870](https://github.com/preservim/nerdtree/pull/870) + - Support unusual characters in file and directory names (PhilRunninger) [#868](https://github.com/preservim/nerdtree/pull/868) + - Reword renamed-buffer prompt to be more clear (aflock) [#867](https://github.com/preservim/nerdtree/pull/867) + - Default to placing cursor on root when closing bookmark table (lifecrisis) [#866](https://github.com/preservim/nerdtree/pull/866) + - Fix issues with sorting of nodes (PhilRunninger) [#856](https://github.com/preservim/nerdtree/pull/856) + - Better OSX detection (bubba-h57) [#853](https://github.com/preservim/nerdtree/pull/853) + - Bugfix - ensure keymaps dictionary exists before using it (mnussbaum) [#852](https://github.com/preservim/nerdtree/pull/852) + - Decrease startup-time by avoiding linear-time iteration over key mappings (mnussbaum) [#851](https://github.com/preservim/nerdtree/pull/851) + - Add code to sort mappings in quickhelp (lifecrisis) [#849](https://github.com/preservim/nerdtree/pull/849) + - Use ":clearjumps" in new NERDTree windows (lifecrisis) [#844](https://github.com/preservim/nerdtree/pull/844) + - Like m-c did before, create parent directories if needed on m-m. (PhilRunninger) [#840](https://github.com/preservim/nerdtree/pull/840) + - BUGFIX: Repair a problem with the `'u'` mapping. (lifecrisis) [#838](https://github.com/preservim/nerdtree/pull/838) + - Make the NERDTree buffer writable when rendering it. (PhilRunninger) [#837](https://github.com/preservim/nerdtree/pull/837) + - Code cleanup: Remove unsupported bookmark table mappings (lifecrisis) [#835](https://github.com/preservim/nerdtree/pull/835) + - Replace strcharpart() with substitute() for backward compatibility (bravestarr) [#834](https://github.com/preservim/nerdtree/pull/834) + - Fixed error `unknown function strcharpart` for older versions of Vim (hav4ik) [#833](https://github.com/preservim/nerdtree/pull/833) + - Clear output when NERDTree menu is aborted (lifecrisis) [#832](https://github.com/preservim/nerdtree/pull/832) + - Display a path with multi-byte characters correctly when it is truncated (bravestarr) [#830](https://github.com/preservim/nerdtree/pull/830) + - Support revealing file and executing file with xdg-open for Linux (ngnmhieu) [#824](https://github.com/preservim/nerdtree/pull/824) + - If node isn't open, count children on disk before deleting. (PhilRunninger) [#822](https://github.com/preservim/nerdtree/pull/822) + - Add new variable g:NERDTreeRemoveFileCmd (kutsan) [#816](https://github.com/preservim/nerdtree/pull/816) + - Use a better check for existence of the NERDTree buffer. (PhilRunninger) [#814](https://github.com/preservim/nerdtree/pull/814) + - Fix focussing previous buffer when closing NERDTree (mrubli) [#801](https://github.com/preservim/nerdtree/pull/801) + - Update the docs for "NERDTreeStatusline" (lifecrisis) [#796](https://github.com/preservim/nerdtree/pull/796) + - BUGFIX: Unstable behavior in the "getPath()" method (lifecrisis) [#795](https://github.com/preservim/nerdtree/pull/795) + - Revert the bugfix from pull request [#785](https://github.com/preservim/nerdtree/pull/785) (lifecrisis) [#794](https://github.com/preservim/nerdtree/pull/794) + - BUGFIX: Allow ":NERDTreeFind" to discover hidden files (lifecrisis) [#786](https://github.com/preservim/nerdtree/pull/786) + - BUGFIX: Allow ":NERDTreeFind" to reveal new files (lifecrisis) [#785](https://github.com/preservim/nerdtree/pull/785) + - Add modelines (lifecrisis) [#782](https://github.com/preservim/nerdtree/pull/782) + - Change the type of completion used by NERDTreeFind (lifecrisis) [#781](https://github.com/preservim/nerdtree/pull/781) + - change NERDTreeFind with args (zhenyangze) [#778](https://github.com/preservim/nerdtree/pull/778) + - Style Choice: Using confirm() when deleting a bookmark (lifecrisis) [#777](https://github.com/preservim/nerdtree/pull/777) + - remove useless substitute when `file =~# "/$"` (skyblueee) [#773](https://github.com/preservim/nerdtree/pull/773) + - remove useless removeLeadingSpaces in _stripMarkup (skyblueee) [#772](https://github.com/preservim/nerdtree/pull/772) + - Make the "o" mapping consistent with "x" (lifecrisis) [#769](https://github.com/preservim/nerdtree/pull/769) + - Fix a problem with the "x" handler (lifecrisis) [#768](https://github.com/preservim/nerdtree/pull/768) + - Clean up the handler for the "x" mapping (lifecrisis) [#767](https://github.com/preservim/nerdtree/pull/767) + - Revert change to tab opening method (lifecrisis) [#766](https://github.com/preservim/nerdtree/pull/766) + - BUGFIX: Add back support for "b:NERDTreeRoot" (lifecrisis) [#765](https://github.com/preservim/nerdtree/pull/765) + - Fix broken "t" and "T" mappings, tabs now open at end (lifecrisis) [#759](https://github.com/preservim/nerdtree/pull/759) + - Update doc with already existing mapping variables (asnr) [#699](https://github.com/preservim/nerdtree/pull/699) + - Fix the broken g:NERDTreeBookmarksSort setting (lifecrisis) [#696](https://github.com/preservim/nerdtree/pull/696) + - Correct NERDTreeIgnore pattern in doc (cntoplolicon) [#648](https://github.com/preservim/nerdtree/pull/648) + - Remove empty segments when splitting path (sooth-sayer) [#574](https://github.com/preservim/nerdtree/pull/574) + - Suppress autocmds less agressively (wincent) [#578](https://github.com/preservim/nerdtree/pull/578) [#691](https://github.com/preservim/nerdtree/pull/691) - Add an Issues template to ask for more info initially. - - Fix markdown headers in readme (josephfrazier) [#676](https://github.com/scrooloose/nerdtree/pull/676) + - Fix markdown headers in readme (josephfrazier) [#676](https://github.com/preservim/nerdtree/pull/676) - Don't touch `@o` and `@h` registers when rendering - - Fix bug with files and directories with dollar signs (alegen) [#649](https://github.com/scrooloose/nerdtree/pull/649) - - Reuse/reopen existing window trees where possible [#244](https://github.com/scrooloose/nerdtree/pull/244) + - Fix bug with files and directories with dollar signs (alegen) [#649](https://github.com/preservim/nerdtree/pull/649) + - Reuse/reopen existing window trees where possible [#244](https://github.com/preservim/nerdtree/pull/244) - Remove NERDTree.previousBuf() - - Change color of arrow (Leeiio) [#630](https://github.com/scrooloose/nerdtree/pull/630) - - Improved a tip in README.markdown (ggicci) [#628](https://github.com/scrooloose/nerdtree/pull/628) - - Shorten delete confimration of empty directory to `y` (mikeperri) [#530](https://github.com/scrooloose/nerdtree/pull/530) - - Fix API call to open directory tree in window (devm33) [#533](https://github.com/scrooloose/nerdtree/pull/533) - - Change default arrows on non-Windows platforms (gwilk) [#546](https://github.com/scrooloose/nerdtree/pull/546) - - Update to README - combine cd and git clone (zwhitchcox) [#584](https://github.com/scrooloose/nerdtree/pull/584) - - Update to README - Tip: start NERDTree when vim starts (therealplato) [#593](https://github.com/scrooloose/nerdtree/pull/593) - - Escape filename when moving an open buffer (zacharyvoase) [#595](https://github.com/scrooloose/nerdtree/pull/595) - - Fixed incorrect :helptags command in README (curran) [#619](https://github.com/scrooloose/nerdtree/pull/619) - - Fixed incomplete escaping of folder arrows (adityanatraj) [#548](https://github.com/scrooloose/nerdtree/pull/548) - - Added NERDTreeCascadeSingleChildDir option (juanibiapina) [#558](https://github.com/scrooloose/nerdtree/pull/558) + - Change color of arrow (Leeiio) [#630](https://github.com/preservim/nerdtree/pull/630) + - Improved a tip in README.markdown (ggicci) [#628](https://github.com/preservim/nerdtree/pull/628) + - Shorten delete confimration of empty directory to `y` (mikeperri) [#530](https://github.com/preservim/nerdtree/pull/530) + - Fix API call to open directory tree in window (devm33) [#533](https://github.com/preservim/nerdtree/pull/533) + - Change default arrows on non-Windows platforms (gwilk) [#546](https://github.com/preservim/nerdtree/pull/546) + - Update to README - combine cd and git clone (zwhitchcox) [#584](https://github.com/preservim/nerdtree/pull/584) + - Update to README - Tip: start NERDTree when vim starts (therealplato) [#593](https://github.com/preservim/nerdtree/pull/593) + - Escape filename when moving an open buffer (zacharyvoase) [#595](https://github.com/preservim/nerdtree/pull/595) + - Fixed incorrect :helptags command in README (curran) [#619](https://github.com/preservim/nerdtree/pull/619) + - Fixed incomplete escaping of folder arrows (adityanatraj) [#548](https://github.com/preservim/nerdtree/pull/548) + - Added NERDTreeCascadeSingleChildDir option (juanibiapina) [#558](https://github.com/preservim/nerdtree/pull/558) - Replace strchars() with backward compatible workaround. - - Add support for copy command in Windows (SkylerLipthay) [#231](https://github.com/scrooloose/nerdtree/pull/231) + - Add support for copy command in Windows (SkylerLipthay) [#231](https://github.com/preservim/nerdtree/pull/231) - Fixed typo in README.markdown - :Helptags -> :helptags - Rename "primary" and "secondary" trees to "tab" and "window" trees. - Move a bunch of buffer level variables into the NERDTree and UI classes. diff --git a/sources_non_forked/nerdtree/README.markdown b/sources_non_forked/nerdtree/README.markdown index 9e539523..e7632420 100644 --- a/sources_non_forked/nerdtree/README.markdown +++ b/sources_non_forked/nerdtree/README.markdown @@ -1,4 +1,4 @@ -The NERDTree +The NERDTree [![Vint](https://github.com/preservim/nerdtree/workflows/Vint/badge.svg)](https://github.com/preservim/nerdtree/actions?workflow=Vint) ============= Introduction @@ -12,7 +12,7 @@ This plugin can also be extended with custom mappings using a special API. The details of this API and of other NERDTree features are described in the included documentation. -![NERDTree Screenshot](https://github.com/scrooloose/nerdtree/raw/master/screenshot.png) +![NERDTree Screenshot](https://github.com/preservim/nerdtree/raw/master/screenshot.png) Installation ------------ @@ -24,7 +24,7 @@ Below are just some of the methods for installing NERDTree. Do not follow all of If you are using VIM version 8 or higher you can use its built-in package management; see `:help packages` for more information. Just run these commands in your terminal: ```bash -git clone https://github.com/scrooloose/nerdtree.git ~/.vim/pack/vendor/start/nerdtree +git clone https://github.com/preservim/nerdtree.git ~/.vim/pack/vendor/start/nerdtree vim -u NONE -c "helptags ~/.vim/pack/vendor/start/nerdtree/doc" -c q ``` @@ -34,7 +34,7 @@ Otherwise, these are some of the several 3rd-party plugin managers you can choos In the terminal, ```bash -git clone https://github.com/scrooloose/nerdtree.git ~/.vim/bundle/nerdtree +git clone https://github.com/preservim/nerdtree.git ~/.vim/bundle/nerdtree ``` In your vimrc, ```vim @@ -48,23 +48,23 @@ Then reload vim, run `:helptags ~/.vim/bundle/nerdtree/doc/` or `:Helptags`. #### [Vundle.vim](https://github.com/VundleVim/Vundle.vim) ```vim call vundle#begin() -Plugin 'scrooloose/nerdtree' +Plugin 'preservim/nerdtree' call vundle#end() ``` #### [vim-plug](https://github.com/junegunn/vim-plug) ```vim call plug#begin() -Plug 'scrooloose/nerdtree' +Plug 'preservim/nerdtree' call plug#end() ``` #### [apt-vim](https://github.com/egalpin/apt-vim) ```bash -apt-vim install -y https://github.com/scrooloose/nerdtree.git +apt-vim install -y https://github.com/preservim/nerdtree.git ``` -F.A.Q. (here, and in the [Wiki](https://github.com/scrooloose/nerdtree/wiki)) +F.A.Q. (here, and in the [Wiki](https://github.com/preservim/nerdtree/wiki)) ------ #### Is there any support for `git` flags? @@ -133,7 +133,7 @@ autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isT --- #### Can I have different highlighting for different file extensions? -See here: https://github.com/scrooloose/nerdtree/issues/433#issuecomment-92590696 +See here: https://github.com/preservim/nerdtree/issues/433#issuecomment-92590696 --- #### How can I change default arrows? diff --git a/sources_non_forked/nerdtree/_config.yml b/sources_non_forked/nerdtree/_config.yml new file mode 100644 index 00000000..c4192631 --- /dev/null +++ b/sources_non_forked/nerdtree/_config.yml @@ -0,0 +1 @@ +theme: jekyll-theme-cayman \ No newline at end of file diff --git a/sources_non_forked/nerdtree/autoload/nerdtree.vim b/sources_non_forked/nerdtree/autoload/nerdtree.vim index 76c076e9..5c9af895 100644 --- a/sources_non_forked/nerdtree/autoload/nerdtree.vim +++ b/sources_non_forked/nerdtree/autoload/nerdtree.vim @@ -1,21 +1,21 @@ -if exists("g:loaded_nerdtree_autoload") +if exists('g:loaded_nerdtree_autoload') finish endif let g:loaded_nerdtree_autoload = 1 -let s:rootNERDTreePath = resolve(expand(":p:h:h")) +let s:rootNERDTreePath = resolve(expand(':p:h:h')) "FUNCTION: nerdtree#version(...) {{{1 " If any value is given as an argument, the entire line of text from the " change log is shown for the current version; otherwise, only the version " number is shown. -function! nerdtree#version(...) +function! nerdtree#version(...) abort let l:text = 'Unknown' try - let l:changelog = readfile(join([s:rootNERDTreePath, "CHANGELOG.md"], nerdtree#slash())) + let l:changelog = readfile(join([s:rootNERDTreePath, 'CHANGELOG.md'], nerdtree#slash())) let l:line = 0 while l:line <= len(l:changelog) - if l:changelog[l:line] =~ '\d\+\.\d\+' + if l:changelog[l:line] =~# '\d\+\.\d\+' let l:text = substitute(l:changelog[l:line], '.*\(\d\+.\d\+\).*', '\1', '') let l:text .= substitute(l:changelog[l:line+1], '^.\{-}\(\.\d\+\).\{-}:\(.*\)', a:0>0 ? '\1:\2' : '\1', '') break @@ -31,7 +31,7 @@ endfunction "============================================================ "FUNCTION: nerdtree#slash() {{{2 -function! nerdtree#slash() +function! nerdtree#slash() abort if nerdtree#runningWindows() if exists('+shellslash') && &shellslash @@ -46,8 +46,8 @@ endfunction "FUNCTION: nerdtree#and(x,y) {{{2 " Implements and() function for Vim <= 7.2 -function! nerdtree#and(x,y) - if exists("*and") +function! nerdtree#and(x,y) abort + if exists('*and') return and(a:x, a:y) else let l:x = a:x @@ -68,7 +68,7 @@ endfunction "FUNCTION: nerdtree#checkForBrowse(dir) {{{2 "inits a window tree in the current buffer if appropriate -function! nerdtree#checkForBrowse(dir) +function! nerdtree#checkForBrowse(dir) abort if !isdirectory(a:dir) return endif @@ -83,18 +83,18 @@ endfunction "FUNCTION: s:reuseWin(dir) {{{2 "finds a NERDTree buffer with root of dir, and opens it. function! s:reuseWin(dir) abort - let path = g:NERDTreePath.New(fnamemodify(a:dir, ":p")) + let path = g:NERDTreePath.New(fnamemodify(a:dir, ':p')) - for i in range(1, bufnr("$")) + for i in range(1, bufnr('$')) unlet! nt - let nt = getbufvar(i, "NERDTree") + let nt = getbufvar(i, 'NERDTree') if empty(nt) continue endif if nt.isWinTree() && nt.root.path.equals(path) - call nt.setPreviousBuf(bufnr("#")) - exec "buffer " . i + call nt.setPreviousBuf(bufnr('#')) + exec 'buffer ' . i return 1 endif endfor @@ -104,17 +104,17 @@ endfunction " FUNCTION: nerdtree#completeBookmarks(A,L,P) {{{2 " completion function for the bookmark commands -function! nerdtree#completeBookmarks(A,L,P) +function! nerdtree#completeBookmarks(A,L,P) abort return filter(g:NERDTreeBookmark.BookmarkNames(), 'v:val =~# "^' . a:A . '"') endfunction "FUNCTION: nerdtree#compareNodes(dir) {{{2 -function! nerdtree#compareNodes(n1, n2) +function! nerdtree#compareNodes(n1, n2) abort return a:n1.path.compareTo(a:n2.path) endfunction "FUNCTION: nerdtree#compareNodesBySortKey(n1, n2) {{{2 -function! nerdtree#compareNodesBySortKey(n1, n2) +function! nerdtree#compareNodesBySortKey(n1, n2) abort let sortKey1 = a:n1.path.getSortKey() let sortKey2 = a:n2.path.getSortKey() let i = 0 @@ -122,15 +122,15 @@ function! nerdtree#compareNodesBySortKey(n1, n2) " Compare chunks upto common length. " If chunks have different type, the one which has " integer type is the lesser. - if type(sortKey1[i]) == type(sortKey2[i]) + if type(sortKey1[i]) ==# type(sortKey2[i]) if sortKey1[i] <# sortKey2[i] return - 1 elseif sortKey1[i] ># sortKey2[i] return 1 endif - elseif type(sortKey1[i]) == v:t_number + elseif type(sortKey1[i]) ==# v:t_number return -1 - elseif type(sortKey2[i]) == v:t_number + elseif type(sortKey2[i]) ==# v:t_number return 1 endif let i = i + 1 @@ -150,7 +150,7 @@ endfunction " FUNCTION: nerdtree#deprecated(func, [msg]) {{{2 " Issue a deprecation warning for a:func. If a second arg is given, use this " as the deprecation message -function! nerdtree#deprecated(func, ...) +function! nerdtree#deprecated(func, ...) abort let msg = a:0 ? a:func . ' ' . a:1 : a:func . ' is deprecated' if !exists('s:deprecationWarnings') @@ -164,22 +164,22 @@ endfunction " FUNCTION: nerdtree#exec(cmd, ignoreAll) {{{2 " Same as :exec cmd but, if ignoreAll is TRUE, set eventignore=all for the duration -function! nerdtree#exec(cmd, ignoreAll) - let old_ei = &ei +function! nerdtree#exec(cmd, ignoreAll) abort + let old_ei = &eventignore if a:ignoreAll - set ei=all + set eventignore=all endif exec a:cmd - let &ei = old_ei + let &eventignore = old_ei endfunction " FUNCTION: nerdtree#has_opt(options, name) {{{2 -function! nerdtree#has_opt(options, name) - return has_key(a:options, a:name) && a:options[a:name] == 1 +function! nerdtree#has_opt(options, name) abort + return has_key(a:options, a:name) && a:options[a:name] ==# 1 endfunction " FUNCTION: nerdtree#loadClassFiles() {{{2 -function! nerdtree#loadClassFiles() +function! nerdtree#loadClassFiles() abort runtime lib/nerdtree/path.vim runtime lib/nerdtree/menu_controller.vim runtime lib/nerdtree/menu_item.vim @@ -197,7 +197,7 @@ function! nerdtree#loadClassFiles() endfunction " FUNCTION: nerdtree#postSourceActions() {{{2 -function! nerdtree#postSourceActions() +function! nerdtree#postSourceActions() abort call g:NERDTreeBookmark.CacheBookmarks(1) call nerdtree#ui_glue#createDefaultBindings() @@ -206,13 +206,13 @@ function! nerdtree#postSourceActions() endfunction "FUNCTION: nerdtree#runningWindows(dir) {{{2 -function! nerdtree#runningWindows() - return has("win16") || has("win32") || has("win64") +function! nerdtree#runningWindows() abort + return has('win16') || has('win32') || has('win64') endfunction "FUNCTION: nerdtree#runningCygwin(dir) {{{2 -function! nerdtree#runningCygwin() - return has("win32unix") +function! nerdtree#runningCygwin() abort + return has('win32unix') endfunction " SECTION: View Functions {{{1 @@ -223,16 +223,16 @@ endfunction " "Args: "msg: the message to echo -function! nerdtree#echo(msg) +function! nerdtree#echo(msg) abort redraw - echomsg empty(a:msg) ? "" : ("NERDTree: " . a:msg) + echomsg empty(a:msg) ? '' : ('NERDTree: ' . a:msg) endfunction "FUNCTION: nerdtree#echoError {{{2 "Wrapper for nerdtree#echo, sets the message type to errormsg for this message "Args: "msg: the message to echo -function! nerdtree#echoError(msg) +function! nerdtree#echoError(msg) abort echohl errormsg call nerdtree#echo(a:msg) echohl normal @@ -242,14 +242,14 @@ endfunction "Wrapper for nerdtree#echo, sets the message type to warningmsg for this message "Args: "msg: the message to echo -function! nerdtree#echoWarning(msg) +function! nerdtree#echoWarning(msg) abort echohl warningmsg call nerdtree#echo(a:msg) echohl normal endfunction "FUNCTION: nerdtree#renderView {{{2 -function! nerdtree#renderView() +function! nerdtree#renderView() abort call b:NERDTree.render() endfunction diff --git a/sources_non_forked/nerdtree/autoload/nerdtree/ui_glue.vim b/sources_non_forked/nerdtree/autoload/nerdtree/ui_glue.vim index 4ba5b05f..400e52dc 100644 --- a/sources_non_forked/nerdtree/autoload/nerdtree/ui_glue.vim +++ b/sources_non_forked/nerdtree/autoload/nerdtree/ui_glue.vim @@ -1,80 +1,80 @@ -if exists("g:loaded_nerdtree_ui_glue_autoload") +if exists('g:loaded_nerdtree_ui_glue_autoload') finish endif let g:loaded_nerdtree_ui_glue_autoload = 1 " FUNCTION: nerdtree#ui_glue#createDefaultBindings() {{{1 -function! nerdtree#ui_glue#createDefaultBindings() +function! nerdtree#ui_glue#createDefaultBindings() abort let s = '' . s:SID() . '_' call NERDTreeAddKeyMap({ 'key': '', 'scope': 'all', 'callback': s . 'handleMiddleMouse' }) - call NERDTreeAddKeyMap({ 'key': '', 'scope': "all", 'callback': s."handleLeftClick" }) - call NERDTreeAddKeyMap({ 'key': '<2-LeftMouse>', 'scope': "DirNode", 'callback': s."activateDirNode" }) - call NERDTreeAddKeyMap({ 'key': '<2-LeftMouse>', 'scope': "FileNode", 'callback': s."activateFileNode" }) - call NERDTreeAddKeyMap({ 'key': '<2-LeftMouse>', 'scope': "Bookmark", 'callback': s."activateBookmark" }) - call NERDTreeAddKeyMap({ 'key': '<2-LeftMouse>', 'scope': "all", 'callback': s."activateAll" }) + call NERDTreeAddKeyMap({ 'key': '', 'scope': 'all', 'callback': s.'handleLeftClick' }) + call NERDTreeAddKeyMap({ 'key': '<2-LeftMouse>', 'scope': 'DirNode', 'callback': s.'activateDirNode' }) + call NERDTreeAddKeyMap({ 'key': '<2-LeftMouse>', 'scope': 'FileNode', 'callback': s.'activateFileNode' }) + call NERDTreeAddKeyMap({ 'key': '<2-LeftMouse>', 'scope': 'Bookmark', 'callback': s.'activateBookmark' }) + call NERDTreeAddKeyMap({ 'key': '<2-LeftMouse>', 'scope': 'all', 'callback': s.'activateAll' }) - call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapCustomOpen, 'scope':'FileNode', 'callback': s."customOpenFile"}) - call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapCustomOpen, 'scope':'DirNode', 'callback': s."customOpenDir"}) - call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapCustomOpen, 'scope':'Bookmark', 'callback': s."customOpenBookmark"}) - call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapCustomOpen, 'scope':'all', 'callback': s."activateAll" }) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapCustomOpen, 'scope':'FileNode', 'callback': s.'customOpenFile'}) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapCustomOpen, 'scope':'DirNode', 'callback': s.'customOpenDir'}) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapCustomOpen, 'scope':'Bookmark', 'callback': s.'customOpenBookmark'}) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapCustomOpen, 'scope':'all', 'callback': s.'activateAll' }) - call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapActivateNode, 'scope': "DirNode", 'callback': s."activateDirNode" }) - call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapActivateNode, 'scope': "FileNode", 'callback': s."activateFileNode" }) - call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapActivateNode, 'scope': "Bookmark", 'callback': s."activateBookmark" }) - call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapPreview, 'scope': "Bookmark", 'callback': s."previewBookmark" }) - call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapActivateNode, 'scope': "all", 'callback': s."activateAll" }) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapActivateNode, 'scope': 'DirNode', 'callback': s.'activateDirNode' }) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapActivateNode, 'scope': 'FileNode', 'callback': s.'activateFileNode' }) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapActivateNode, 'scope': 'Bookmark', 'callback': s.'activateBookmark' }) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapPreview, 'scope': 'Bookmark', 'callback': s.'previewBookmark' }) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapActivateNode, 'scope': 'all', 'callback': s.'activateAll' }) - call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenSplit, 'scope': "Node", 'callback': s."openHSplit" }) - call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenVSplit, 'scope': "Node", 'callback': s."openVSplit" }) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenSplit, 'scope': 'Node', 'callback': s.'openHSplit' }) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenVSplit, 'scope': 'Node', 'callback': s.'openVSplit' }) - call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapPreview, 'scope': "Node", 'callback': s."previewNodeCurrent" }) - call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapPreviewVSplit, 'scope': "Node", 'callback': s."previewNodeVSplit" }) - call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapPreviewSplit, 'scope': "Node", 'callback': s."previewNodeHSplit" }) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapPreview, 'scope': 'Node', 'callback': s.'previewNodeCurrent' }) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapPreviewVSplit, 'scope': 'Node', 'callback': s.'previewNodeVSplit' }) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapPreviewSplit, 'scope': 'Node', 'callback': s.'previewNodeHSplit' }) - call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenRecursively, 'scope': "DirNode", 'callback': s."openNodeRecursively" }) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenRecursively, 'scope': 'DirNode', 'callback': s.'openNodeRecursively' }) call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapUpdir, 'scope': 'all', 'callback': s . 'upDirCurrentRootClosed' }) call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapUpdirKeepOpen, 'scope': 'all', 'callback': s . 'upDirCurrentRootOpen' }) call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapChangeRoot, 'scope': 'Node', 'callback': s . 'chRoot' }) - call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapChdir, 'scope': "Node", 'callback': s."chCwd" }) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapChdir, 'scope': 'Node', 'callback': s.'chCwd' }) - call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapQuit, 'scope': "all", 'callback': s."closeTreeWindow" }) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapQuit, 'scope': 'all', 'callback': s.'closeTreeWindow' }) - call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapCWD, 'scope': "all", 'callback': "nerdtree#ui_glue#chRootCwd" }) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapCWD, 'scope': 'all', 'callback': 'nerdtree#ui_glue#chRootCwd' }) - call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapRefreshRoot, 'scope': "all", 'callback': s."refreshRoot" }) - call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapRefresh, 'scope': "Node", 'callback': s."refreshCurrent" }) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapRefreshRoot, 'scope': 'all', 'callback': s.'refreshRoot' }) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapRefresh, 'scope': 'Node', 'callback': s.'refreshCurrent' }) - call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapHelp, 'scope': "all", 'callback': s."displayHelp" }) - call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapToggleZoom, 'scope': "all", 'callback': s."toggleZoom" }) - call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapToggleHidden, 'scope': "all", 'callback': s."toggleShowHidden" }) - call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapToggleFilters, 'scope': "all", 'callback': s."toggleIgnoreFilter" }) - call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapToggleFiles, 'scope': "all", 'callback': s."toggleShowFiles" }) - call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapToggleBookmarks, 'scope': "all", 'callback': s."toggleShowBookmarks" }) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapHelp, 'scope': 'all', 'callback': s.'displayHelp' }) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapToggleZoom, 'scope': 'all', 'callback': s.'toggleZoom' }) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapToggleHidden, 'scope': 'all', 'callback': s.'toggleShowHidden' }) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapToggleFilters, 'scope': 'all', 'callback': s.'toggleIgnoreFilter' }) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapToggleFiles, 'scope': 'all', 'callback': s.'toggleShowFiles' }) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapToggleBookmarks, 'scope': 'all', 'callback': s.'toggleShowBookmarks' }) - call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapCloseDir, 'scope': "Node", 'callback': s."closeCurrentDir" }) - call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapCloseChildren, 'scope': "DirNode", 'callback': s."closeChildren" }) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapCloseDir, 'scope': 'Node', 'callback': s.'closeCurrentDir' }) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapCloseChildren, 'scope': 'DirNode', 'callback': s.'closeChildren' }) - call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapMenu, 'scope': "Node", 'callback': s."showMenu" }) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapMenu, 'scope': 'Node', 'callback': s.'showMenu' }) - call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapJumpParent, 'scope': "Node", 'callback': s."jumpToParent" }) - call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapJumpFirstChild, 'scope': "Node", 'callback': s."jumpToFirstChild" }) - call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapJumpLastChild, 'scope': "Node", 'callback': s."jumpToLastChild" }) - call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapJumpRoot, 'scope': "all", 'callback': s."jumpToRoot" }) - call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapJumpNextSibling, 'scope': "Node", 'callback': s."jumpToNextSibling" }) - call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapJumpPrevSibling, 'scope': "Node", 'callback': s."jumpToPrevSibling" }) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapJumpParent, 'scope': 'Node', 'callback': s.'jumpToParent' }) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapJumpFirstChild, 'scope': 'Node', 'callback': s.'jumpToFirstChild' }) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapJumpLastChild, 'scope': 'Node', 'callback': s.'jumpToLastChild' }) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapJumpRoot, 'scope': 'all', 'callback': s.'jumpToRoot' }) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapJumpNextSibling, 'scope': 'Node', 'callback': s.'jumpToNextSibling' }) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapJumpPrevSibling, 'scope': 'Node', 'callback': s.'jumpToPrevSibling' }) call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenInTab, 'scope': 'Node', 'callback': s . 'openInNewTab' }) call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenInTabSilent, 'scope': 'Node', 'callback': s . 'openInNewTabSilent' }) call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenInTab, 'scope': 'Bookmark', 'callback': s . 'openInNewTab' }) call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenInTabSilent, 'scope': 'Bookmark', 'callback': s . 'openInNewTabSilent' }) - call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenExpl, 'scope': "DirNode", 'callback': s."openExplorer" }) - call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenExpl, 'scope': "FileNode", 'callback': s."openExplorer" }) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenExpl, 'scope': 'DirNode', 'callback': s.'openExplorer' }) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenExpl, 'scope': 'FileNode', 'callback': s.'openExplorer' }) - call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapDeleteBookmark, 'scope': "Bookmark", 'callback': s."deleteBookmark" }) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapDeleteBookmark, 'scope': 'Bookmark', 'callback': s.'deleteBookmark' }) endfunction @@ -82,20 +82,20 @@ endfunction "============================================================ "FUNCTION: s:customOpenFile() {{{1 -" Open file node with the "custom" key, initially . -function! s:customOpenFile(node) +" Open file node with the 'custom' key, initially . +function! s:customOpenFile(node) abort call a:node.activate(s:initCustomOpenArgs().file) endfunction "FUNCTION: s:customOpenDir() {{{1 -" Open directory node with the "custom" key, initially . -function! s:customOpenDir(node) +" Open directory node with the 'custom' key, initially . +function! s:customOpenDir(node) abort call s:activateDirNode(a:node, s:initCustomOpenArgs().dir) endfunction "FUNCTION: s:customOpenBookmark() {{{1 -" Open bookmark node with the "custom" key, initially . -function! s:customOpenBookmark(node) +" Open bookmark node with the 'custom' key, initially . +function! s:customOpenBookmark(node) abort if a:node.path.isDirectory call a:node.activate(b:NERDTree, s:initCustomOpenArgs().dir) else @@ -105,22 +105,22 @@ endfunction "FUNCTION: s:initCustomOpenArgs() {{{1 " Make sure NERDTreeCustomOpenArgs has needed keys -function! s:initCustomOpenArgs() +function! s:initCustomOpenArgs() abort let g:NERDTreeCustomOpenArgs = get(g:, 'NERDTreeCustomOpenArgs', {}) return extend(g:NERDTreeCustomOpenArgs, {'file':{'reuse': 'all', 'where': 'p'}, 'dir':{}}, 'keep') endfunction "FUNCTION: s:activateAll() {{{1 "handle the user activating the updir line -function! s:activateAll() - if getline(".") ==# g:NERDTreeUI.UpDirLine() +function! s:activateAll() abort + if getline('.') ==# g:NERDTreeUI.UpDirLine() return nerdtree#ui_glue#upDir(0) endif endfunction " FUNCTION: s:activateDirNode(directoryNode, options) {{{1 " Open a directory with optional options -function! s:activateDirNode(directoryNode, ...) +function! s:activateDirNode(directoryNode, ...) abort if a:directoryNode.isRoot() && a:directoryNode.isOpen call nerdtree#echo('cannot close tree root') @@ -132,21 +132,21 @@ endfunction "FUNCTION: s:activateFileNode() {{{1 "handle the user activating a tree node -function! s:activateFileNode(node) +function! s:activateFileNode(node) abort call a:node.activate({'reuse': 'all', 'where': 'p'}) endfunction "FUNCTION: s:activateBookmark(bookmark) {{{1 "handle the user activating a bookmark -function! s:activateBookmark(bm) +function! s:activateBookmark(bm) abort call a:bm.activate(b:NERDTree, !a:bm.path.isDirectory ? {'where': 'p'} : {}) endfunction " FUNCTION: nerdtree#ui_glue#bookmarkNode(name) {{{1 " Associate the current node with the given name -function! nerdtree#ui_glue#bookmarkNode(...) +function! nerdtree#ui_glue#bookmarkNode(...) abort let currentNode = g:NERDTreeFileNode.GetSelected() - if currentNode != {} + if currentNode !=# {} let name = a:1 if empty(name) let name = currentNode.path.getLastPathComponent(0) @@ -155,39 +155,39 @@ function! nerdtree#ui_glue#bookmarkNode(...) call currentNode.bookmark(name) call b:NERDTree.render() catch /^NERDTree.IllegalBookmarkNameError/ - call nerdtree#echo("bookmark names must not contain spaces") + call nerdtree#echo('bookmark names must not contain spaces') endtry else - call nerdtree#echo("select a node first") + call nerdtree#echo('select a node first') endif endfunction " FUNCTION: s:chCwd(node) {{{1 -function! s:chCwd(node) +function! s:chCwd(node) abort try call a:node.path.changeToDir() catch /^NERDTree.PathChangeError/ - call nerdtree#echoWarning("could not change cwd") + call nerdtree#echoWarning('could not change cwd') endtry endfunction " FUNCTION: s:chRoot(node) {{{1 " changes the current root to the selected one -function! s:chRoot(node) +function! s:chRoot(node) abort call b:NERDTree.changeRoot(a:node) endfunction " FUNCTION: s:nerdtree#ui_glue#chRootCwd() {{{1 " Change the NERDTree root to match the current working directory. -function! nerdtree#ui_glue#chRootCwd() +function! nerdtree#ui_glue#chRootCwd() abort NERDTreeCWD endfunction " FUNCTION: nnerdtree#ui_glue#clearBookmarks(bookmarks) {{{1 -function! nerdtree#ui_glue#clearBookmarks(bookmarks) +function! nerdtree#ui_glue#clearBookmarks(bookmarks) abort if a:bookmarks ==# '' let currentNode = g:NERDTreeFileNode.GetSelected() - if currentNode != {} + if currentNode !=# {} call currentNode.clearBookmarks() endif else @@ -202,7 +202,7 @@ endfunction " FUNCTION: s:closeChildren(node) {{{1 " closes all childnodes of the current node -function! s:closeChildren(node) +function! s:closeChildren(node) abort call a:node.closeChildren() call b:NERDTree.render() call a:node.putCursorHere(0, 0) @@ -210,7 +210,7 @@ endfunction " FUNCTION: s:closeCurrentDir(node) {{{1 " Close the parent directory of the current node. -function! s:closeCurrentDir(node) +function! s:closeCurrentDir(node) abort if a:node.isRoot() call nerdtree#echo('cannot close parent of tree root') @@ -235,30 +235,30 @@ endfunction " FUNCTION: s:closeTreeWindow() {{{1 " close the tree window -function! s:closeTreeWindow() - if b:NERDTree.isWinTree() && b:NERDTree.previousBuf() != -1 - exec "buffer " . b:NERDTree.previousBuf() +function! s:closeTreeWindow() abort + if b:NERDTree.isWinTree() && b:NERDTree.previousBuf() !=# -1 + exec 'buffer ' . b:NERDTree.previousBuf() else - if winnr("$") > 1 + if winnr('$') > 1 call g:NERDTree.Close() else - call nerdtree#echo("Cannot close last window") + call nerdtree#echo('Cannot close last window') endif endif endfunction " FUNCTION: s:deleteBookmark(bookmark) {{{1 " Prompt the user to confirm the deletion of the selected bookmark. -function! s:deleteBookmark(bookmark) - let l:message = "Delete the bookmark \"" . a:bookmark.name - \ . "\" from the bookmark list?" +function! s:deleteBookmark(bookmark) abort + let l:message = 'Delete the bookmark "' . a:bookmark.name + \ . '" from the bookmark list?' let l:choices = "&Yes\n&No" echo | redraw let l:selection = confirm(l:message, l:choices, 1, 'Warning') - if l:selection != 1 + if l:selection !=# 1 call nerdtree#echo('bookmark not deleted') return endif @@ -275,14 +275,14 @@ endfunction " FUNCTION: s:displayHelp() {{{1 " toggles the help display -function! s:displayHelp() +function! s:displayHelp() abort call b:NERDTree.ui.toggleHelp() call b:NERDTree.render() call b:NERDTree.ui.centerView() endfunction " FUNCTION: s:findAndRevealPath(pathStr) {{{1 -function! s:findAndRevealPath(pathStr) +function! s:findAndRevealPath(pathStr) abort let l:pathStr = !empty(a:pathStr) ? a:pathStr : expand('%:p') if !filereadable(l:pathStr) let l:pathStr = fnamemodify(l:pathStr, ':h') @@ -333,15 +333,15 @@ endfunction "FUNCTION: s:handleLeftClick() {{{1 "Checks if the click should open the current node -function! s:handleLeftClick() +function! s:handleLeftClick() abort let currentNode = g:NERDTreeFileNode.GetSelected() - if currentNode != {} + if currentNode !=# {} "the dir arrows are multibyte chars, and vim's string functions only "deal with single bytes - so split the line up with the hack below and "take the line substring manually - let line = split(getline(line(".")), '\zs') - let startToCur = "" + let line = split(getline(line('.')), '\zs') + let startToCur = '' for i in range(0,len(line)-1) let startToCur .= line[i] endfor @@ -368,7 +368,7 @@ function! s:handleLeftClick() endfunction " FUNCTION: s:handleMiddleMouse() {{{1 -function! s:handleMiddleMouse() +function! s:handleMiddleMouse() abort " A middle mouse click does not automatically position the cursor as one " would expect. Forcing the execution of a regular left mouse click here @@ -391,17 +391,17 @@ endfunction " FUNCTION: nerdtree#ui_glue#invokeKeyMap(key) {{{1 "this is needed since I cant figure out how to invoke dict functions from a "key map -function! nerdtree#ui_glue#invokeKeyMap(key) +function! nerdtree#ui_glue#invokeKeyMap(key) abort call g:NERDTreeKeyMap.Invoke(a:key) endfunction " FUNCTION: s:jumpToFirstChild(node) {{{1 -function! s:jumpToFirstChild(node) +function! s:jumpToFirstChild(node) abort call s:jumpToChild(a:node, 0) endfunction " FUNCTION: s:jumpToLastChild(node) {{{1 -function! s:jumpToLastChild(node) +function! s:jumpToLastChild(node) abort call s:jumpToChild(a:node, 1) endfunction @@ -411,7 +411,7 @@ endfunction " Args: " node: the node on which the cursor currently sits " last: 1 (true) if jumping to last child, 0 (false) if jumping to first -function! s:jumpToChild(node, last) +function! s:jumpToChild(node, last) abort let l:node = a:node.path.isDirectory ? a:node.getCascadeRoot() : a:node if l:node.isRoot() @@ -430,7 +430,7 @@ endfunction " FUNCTION: s:jumpToParent(node) {{{1 " Move the cursor to the parent of the specified node. For a cascade, move to " the parent of the cascade's first node. At the root node, do nothing. -function! s:jumpToParent(node) +function! s:jumpToParent(node) abort let l:node = a:node.path.isDirectory ? a:node.getCascadeRoot() : a:node if l:node.isRoot() @@ -448,18 +448,18 @@ endfunction " FUNCTION: s:jumpToRoot() {{{1 " moves the cursor to the root node -function! s:jumpToRoot() +function! s:jumpToRoot() abort call b:NERDTree.root.putCursorHere(1, 0) call b:NERDTree.ui.centerView() endfunction " FUNCTION: s:jumpToNextSibling(node) {{{1 -function! s:jumpToNextSibling(node) +function! s:jumpToNextSibling(node) abort call s:jumpToSibling(a:node, 1) endfunction " FUNCTION: s:jumpToPrevSibling(node) {{{1 -function! s:jumpToPrevSibling(node) +function! s:jumpToPrevSibling(node) abort call s:jumpToSibling(a:node, 0) endfunction @@ -469,7 +469,7 @@ endfunction " Args: " node: the node on which the cursor currently sits " forward: 0 to jump to previous sibling, 1 to jump to next sibling -function! s:jumpToSibling(node, forward) +function! s:jumpToSibling(node, forward) abort let l:node = a:node.path.isDirectory ? a:node.getCascadeRoot() : a:node let l:sibling = l:node.findSibling(a:forward) @@ -483,8 +483,8 @@ endfunction " FUNCTION: nerdtree#ui_glue#openBookmark(name) {{{1 " Open the Bookmark that has the specified name. This function provides the -" implementation for the ":OpenBookmark" command. -function! nerdtree#ui_glue#openBookmark(name) +" implementation for the :OpenBookmark command. +function! nerdtree#ui_glue#openBookmark(name) abort try let l:bookmark = g:NERDTreeBookmark.BookmarkFor(a:name) catch /^NERDTree.BookmarkNotFoundError/ @@ -499,42 +499,42 @@ function! nerdtree#ui_glue#openBookmark(name) endfunction " FUNCTION: s:openHSplit(target) {{{1 -function! s:openHSplit(target) +function! s:openHSplit(target) abort call a:target.activate({'where': 'h'}) endfunction " FUNCTION: s:openVSplit(target) {{{1 -function! s:openVSplit(target) +function! s:openVSplit(target) abort call a:target.activate({'where': 'v'}) endfunction " FUNCTION: s:openExplorer(node) {{{1 -function! s:openExplorer(node) +function! s:openExplorer(node) abort call a:node.openExplorer() endfunction " FUNCTION: s:openInNewTab(target) {{{1 -function! s:openInNewTab(target) +function! s:openInNewTab(target) abort let l:opener = g:NERDTreeOpener.New(a:target.path, {'where': 't'}) call l:opener.open(a:target) endfunction " FUNCTION: s:openInNewTabSilent(target) {{{1 -function! s:openInNewTabSilent(target) +function! s:openInNewTabSilent(target) abort let l:opener = g:NERDTreeOpener.New(a:target.path, {'where': 't', 'stay': 1}) call l:opener.open(a:target) endfunction " FUNCTION: s:openNodeRecursively(node) {{{1 -function! s:openNodeRecursively(node) - call nerdtree#echo("Recursively opening node. Please wait...") +function! s:openNodeRecursively(node) abort + call nerdtree#echo('Recursively opening node. Please wait...') call a:node.openRecursively() call b:NERDTree.render() - call nerdtree#echo("") + call nerdtree#echo('') endfunction " FUNCTION: s:previewBookmark(bookmark) {{{1 -function! s:previewBookmark(bookmark) +function! s:previewBookmark(bookmark) abort if a:bookmark.path.isDirectory execute 'NERDTreeFind '.a:bookmark.path.str() else @@ -543,65 +543,65 @@ function! s:previewBookmark(bookmark) endfunction "FUNCTION: s:previewNodeCurrent(node) {{{1 -function! s:previewNodeCurrent(node) +function! s:previewNodeCurrent(node) abort call a:node.open({'stay': 1, 'where': 'p', 'keepopen': 1}) endfunction "FUNCTION: s:previewNodeHSplit(node) {{{1 -function! s:previewNodeHSplit(node) +function! s:previewNodeHSplit(node) abort call a:node.open({'stay': 1, 'where': 'h', 'keepopen': 1}) endfunction "FUNCTION: s:previewNodeVSplit(node) {{{1 -function! s:previewNodeVSplit(node) +function! s:previewNodeVSplit(node) abort call a:node.open({'stay': 1, 'where': 'v', 'keepopen': 1}) endfunction " FUNCTION: nerdtree#ui_glue#revealBookmark(name) {{{1 " put the cursor on the node associate with the given name -function! nerdtree#ui_glue#revealBookmark(name) +function! nerdtree#ui_glue#revealBookmark(name) abort try 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") + call nerdtree#echo('Bookmark isnt cached under the current root') endtry endfunction " FUNCTION: s:refreshRoot() {{{1 " Reloads the current root. All nodes below this will be lost and the root dir " will be reloaded. -function! s:refreshRoot() +function! s:refreshRoot() abort if !g:NERDTree.IsOpen() return endif - call nerdtree#echo("Refreshing the root node. This could take a while...") + call nerdtree#echo('Refreshing the root node. This could take a while...') let l:curWin = winnr() - call nerdtree#exec(g:NERDTree.GetWinNum() . "wincmd w", 1) + call nerdtree#exec(g:NERDTree.GetWinNum() . 'wincmd w', 1) call b:NERDTree.root.refresh() call b:NERDTree.render() redraw - call nerdtree#exec(l:curWin . "wincmd w", 1) - call nerdtree#echo("") + call nerdtree#exec(l:curWin . 'wincmd w', 1) + call nerdtree#echo('') endfunction " FUNCTION: s:refreshCurrent(node) {{{1 " refreshes the root for the current node -function! s:refreshCurrent(node) +function! s:refreshCurrent(node) abort let node = a:node if !node.path.isDirectory let node = node.parent endif - call nerdtree#echo("Refreshing node. This could take a while...") + call nerdtree#echo('Refreshing node. This could take a while...') call node.refresh() call b:NERDTree.render() - call nerdtree#echo("") + call nerdtree#echo('') endfunction " FUNCTION: nerdtree#ui_glue#setupCommands() {{{1 -function! nerdtree#ui_glue#setupCommands() +function! nerdtree#ui_glue#setupCommands() abort 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() @@ -614,42 +614,42 @@ function! nerdtree#ui_glue#setupCommands() endfunction " Function: s:SID() {{{1 -function s:SID() - if !exists("s:sid") +function! s:SID() abort + if !exists('s:sid') let s:sid = matchstr(expand(''), '\zs\d\+\ze_SID$') endif return s:sid endfun " FUNCTION: s:showMenu(node) {{{1 -function! s:showMenu(node) +function! s:showMenu(node) abort let mc = g:NERDTreeMenuController.New(g:NERDTreeMenuItem.AllEnabled()) call mc.showMenu() endfunction " FUNCTION: s:toggleIgnoreFilter() {{{1 -function! s:toggleIgnoreFilter() +function! s:toggleIgnoreFilter() abort call b:NERDTree.ui.toggleIgnoreFilter() endfunction " FUNCTION: s:toggleShowBookmarks() {{{1 -function! s:toggleShowBookmarks() +function! s:toggleShowBookmarks() abort call b:NERDTree.ui.toggleShowBookmarks() endfunction " FUNCTION: s:toggleShowFiles() {{{1 -function! s:toggleShowFiles() +function! s:toggleShowFiles() abort call b:NERDTree.ui.toggleShowFiles() endfunction " FUNCTION: s:toggleShowHidden() {{{1 " toggles the display of hidden files -function! s:toggleShowHidden() +function! s:toggleShowHidden() abort call b:NERDTree.ui.toggleShowHidden() endfunction " FUNCTION: s:toggleZoom() {{{1 -function! s:toggleZoom() +function! s:toggleZoom() abort call b:NERDTree.ui.toggleZoom() endfunction @@ -659,7 +659,7 @@ endfunction " Args: " preserveState: if 1, the current root is left open when the new tree is " rendered; if 0, the current root node is closed -function! nerdtree#ui_glue#upDir(preserveState) +function! nerdtree#ui_glue#upDir(preserveState) abort try call b:NERDTree.root.cacheParent() @@ -683,12 +683,12 @@ function! nerdtree#ui_glue#upDir(preserveState) endfunction " FUNCTION: s:upDirCurrentRootOpen() {{{1 -function! s:upDirCurrentRootOpen() +function! s:upDirCurrentRootOpen() abort call nerdtree#ui_glue#upDir(1) endfunction " FUNCTION: s:upDirCurrentRootClosed() {{{1 -function! s:upDirCurrentRootClosed() +function! s:upDirCurrentRootClosed() abort call nerdtree#ui_glue#upDir(0) endfunction diff --git a/sources_non_forked/nerdtree/doc/NERDTree.txt b/sources_non_forked/nerdtree/doc/NERDTree.txt index be0011d2..857e6823 100644 --- a/sources_non_forked/nerdtree/doc/NERDTree.txt +++ b/sources_non_forked/nerdtree/doc/NERDTree.txt @@ -1238,7 +1238,7 @@ This character is used to separate the file or directory name from the rest of the characters in the line of text. It allows filenames to contain special characters that are otherwise used in the NERDTree, such as square brackets, braces, trailing asterisk, and leading space. For more details, see the -responsible pull request: https://github.com/scrooloose/nerdtree/pull/868. +responsible pull request: https://github.com/preservim/nerdtree/pull/868. The default value of this variable depends on the features compiled into your vim and the values of |NERDTreeDirArrowCollapsible| and @@ -1498,11 +1498,11 @@ in the fridge for later ;) Martyzilla recruited two other unwitting accomplices to become his minions in his quest to conquer the Vim plugin world. While he may still love to receive your emails, the best way to send suggestions, bug reports, and questions is -to submit an issue at http://github.com/scrooloose/nerdtree/issues. +to submit an issue at http://github.com/preservim/nerdtree/issues. The latest stable and development versions are on Github. - Stable: http://github.com/scrooloose/nerdtree (master branch) - Development: http://github.com/scrooloose/nerdtree/branches + Stable: http://github.com/preservim/nerdtree (master branch) + Development: http://github.com/preservim/nerdtree/branches Title Credit: * http://ascii.co.uk/art/tree diff --git a/sources_non_forked/nerdtree/lib/nerdtree/bookmark.vim b/sources_non_forked/nerdtree/lib/nerdtree/bookmark.vim index b206e7a4..248bb074 100644 --- a/sources_non_forked/nerdtree/lib/nerdtree/bookmark.vim +++ b/sources_non_forked/nerdtree/lib/nerdtree/bookmark.vim @@ -33,7 +33,7 @@ endfunction " Class method to get all bookmarks. Lazily initializes the bookmarks global " variable function! s:Bookmark.Bookmarks() - if !exists("g:NERDTreeBookmarks") + if !exists('g:NERDTreeBookmarks') let g:NERDTreeBookmarks = [] endif return g:NERDTreeBookmarks @@ -53,7 +53,7 @@ endfunction " FUNCTION: Bookmark.BookmarkFor(name) {{{1 " Class method that returns the Bookmark object having the specified name. -" Throws "NERDTree.BookmarkNotFoundError" if no Bookmark is found. +" Throws NERDTree.BookmarkNotFoundError if no Bookmark is found. function! s:Bookmark.BookmarkFor(name) let l:result = {} for l:bookmark in s:Bookmark.Bookmarks() @@ -93,7 +93,7 @@ function! s:Bookmark.CacheBookmarks(silent) for i in bookmarkStrings "ignore blank lines - if i != '' + if i !=# '' let name = substitute(i, '^\(.\{-}\) .*$', '\1', '') let path = substitute(i, '^.\{-} \(.*\)$', '\1', '') @@ -111,7 +111,7 @@ function! s:Bookmark.CacheBookmarks(silent) if invalidBookmarksFound call s:Bookmark.Write() if !a:silent - call nerdtree#echo(invalidBookmarksFound . " invalid bookmarks were read. See :help NERDTreeInvalidBookmarks for info.") + call nerdtree#echo(invalidBookmarksFound . ' invalid bookmarks were read. See :help NERDTreeInvalidBookmarks for info.') endif endif endif @@ -120,16 +120,16 @@ endfunction " FUNCTION: Bookmark.CompareBookmarksByName(firstBookmark, secondBookmark) {{{1 " Class method that indicates the relative position of two bookmarks when " placed in alphabetical order by name. Case-sensitivity is determined by an -" option. Supports the "s:Bookmark.SortBookmarksList()" method. +" option. Supports the s:Bookmark.SortBookmarksList() method. function! s:Bookmark.CompareBookmarksByName(firstBookmark, secondBookmark) let l:result = 0 - if g:NERDTreeBookmarksSort == 1 + if g:NERDTreeBookmarksSort ==# 1 if a:firstBookmark.name ? a:secondBookmark.name let l:result = 1 endif - elseif g:NERDTreeBookmarksSort == 2 + elseif g:NERDTreeBookmarksSort ==# 2 if a:firstBookmark.name <# a:secondBookmark.name let l:result = -1 elseif a:firstBookmark.name ># a:secondBookmark.name @@ -159,13 +159,13 @@ endfunction " FUNCTION: s:Edit() {{{1 " opens the NERDTreeBookmarks file for manual editing function! s:Bookmark.Edit() - call nerdtree#exec("wincmd w", 1) - call nerdtree#exec("edit ".g:NERDTreeBookmarksFile, 1) + call nerdtree#exec('wincmd w', 1) + call nerdtree#exec('edit '.g:NERDTreeBookmarksFile, 1) endfunction " FUNCTION: Bookmark.getNode(nerdtree, searchFromAbsoluteRoot) {{{1 " Returns the tree node object associated with this Bookmark. -" Throws "NERDTree.BookmarkedNodeNotFoundError" if the node is not found. +" Throws NERDTree.BookmarkedNodeNotFoundError if the node is not found. " " Args: " searchFromAbsoluteRoot: boolean flag, search from the highest cached node @@ -185,8 +185,8 @@ endfunction " FUNCTION: Bookmark.GetNodeForName(name, searchFromAbsoluteRoot, nerdtree) {{{1 " Class method that returns the tree node object for the Bookmark with the -" given name. Throws "NERDTree.BookmarkNotFoundError" if a Bookmark with the -" name does not exist. Throws "NERDTree.BookmarkedNodeNotFoundError" if a +" given name. Throws NERDTree.BookmarkNotFoundError if a Bookmark with the +" name does not exist. Throws NERDTree.BookmarkedNodeNotFoundError if a " tree node for the named Bookmark could not be found. function! s:Bookmark.GetNodeForName(name, searchFromAbsoluteRoot, nerdtree) let l:bookmark = s:Bookmark.BookmarkFor(a:name) @@ -196,9 +196,9 @@ endfunction " FUNCTION: Bookmark.GetSelected() {{{1 " returns the Bookmark the cursor is over, or {} function! s:Bookmark.GetSelected() - let line = getline(".") + let line = getline('.') let name = substitute(line, '^>\(.\{-}\) .\+$', '\1', '') - if name != line + if name !=# line try return s:Bookmark.BookmarkFor(name) catch /^NERDTree.BookmarkNotFoundError/ @@ -212,7 +212,7 @@ endfunction " Class method to get all invalid bookmark strings read from the bookmarks " file function! s:Bookmark.InvalidBookmarks() - if !exists("g:NERDTreeInvalidBookmarks") + if !exists('g:NERDTreeInvalidBookmarks') let g:NERDTreeInvalidBookmarks = [] endif return g:NERDTreeInvalidBookmarks @@ -222,8 +222,8 @@ endfunction function! s:Bookmark.mustExist() if !self.path.exists() call s:Bookmark.CacheBookmarks(1) - throw "NERDTree.BookmarkPointsToInvalidLocationError: the bookmark \"". - \ self.name ."\" points to a non existing location: \"". self.path.str() + throw 'NERDTree.BookmarkPointsToInvalidLocationError: the bookmark "'. + \ self.name .'" points to a non existing location: "'. self.path.str() endif endfunction @@ -231,7 +231,7 @@ endfunction " Create a new bookmark object with the given name and path object function! s:Bookmark.New(name, path) if a:name =~# ' ' - throw "NERDTree.IllegalBookmarkNameError: illegal name:" . a:name + throw 'NERDTree.IllegalBookmarkNameError: illegal name:' . a:name endif let newBookmark = copy(self) @@ -292,7 +292,7 @@ endfunction " Get the string that should be rendered in the view for this bookmark function! s:Bookmark.str() let pathStrMaxLen = winwidth(g:NERDTree.GetWinNum()) - 4 - strdisplaywidth(self.name) - if &nu + if &number let pathStrMaxLen = pathStrMaxLen - &numberwidth endif @@ -335,7 +335,7 @@ function! s:Bookmark.validate() return 1 else call s:Bookmark.CacheBookmarks(1) - call nerdtree#echo(self.name . "now points to an invalid location. See :help NERDTreeInvalidBookmarks for info.") + call nerdtree#echo(self.name . 'now points to an invalid location. See :help NERDTreeInvalidBookmarks for info.') return 0 endif endfunction @@ -349,7 +349,7 @@ function! s:Bookmark.Write() endfor "add a blank line before the invalid ones - call add(bookmarkStrings, "") + call add(bookmarkStrings, '') for j in s:Bookmark.InvalidBookmarks() call add(bookmarkStrings, j) @@ -358,7 +358,7 @@ function! s:Bookmark.Write() try call writefile(bookmarkStrings, g:NERDTreeBookmarksFile) catch - call nerdtree#echoError("Failed to write bookmarks file. Make sure g:NERDTreeBookmarksFile points to a valid location.") + call nerdtree#echoError('Failed to write bookmarks file. Make sure g:NERDTreeBookmarksFile points to a valid location.') endtry endfunction diff --git a/sources_non_forked/nerdtree/lib/nerdtree/creator.vim b/sources_non_forked/nerdtree/lib/nerdtree/creator.vim index efd3cc81..39e3f554 100644 --- a/sources_non_forked/nerdtree/lib/nerdtree/creator.vim +++ b/sources_non_forked/nerdtree/lib/nerdtree/creator.vim @@ -82,20 +82,20 @@ function! s:Creator.createWindowTree(dir) try let path = g:NERDTreePath.New(a:dir) catch /^NERDTree.InvalidArgumentsError/ - call nerdtree#echo("Invalid directory name:" . a:name) + call nerdtree#echo('Invalid directory name:' . a:dir) return endtry "we want the directory buffer to disappear when we do the :edit below setlocal bufhidden=wipe - let previousBuf = expand("#") + let previousBuf = expand('#') "we need a unique name for each window tree buffer to ensure they are "all independent - exec g:NERDTreeCreatePrefix . " edit " . self._nextBufferName() + exec g:NERDTreeCreatePrefix . ' edit ' . self._nextBufferName() - call self._createNERDTree(path, "window") + call self._createNERDTree(path, 'window') let b:NERDTree._previousBuf = bufnr(previousBuf) call self._setCommonBufOptions() @@ -109,7 +109,7 @@ function! s:Creator._createNERDTree(path, type) let b:NERDTree = g:NERDTree.New(a:path, a:type) " TODO: This assignment is kept for compatibility reasons. Many other - " plugins use "b:NERDTreeRoot" instead of "b:NERDTree.root". Remove this + " plugins use b:NERDTreeRoot instead of b:NERDTree.root. Remove this " assignment in the future. let b:NERDTreeRoot = b:NERDTree.root @@ -126,9 +126,9 @@ endfunction function! s:Creator.createMirror() "get the names off all the nerd tree buffers let treeBufNames = [] - for i in range(1, tabpagenr("$")) + for i in range(1, tabpagenr('$')) let nextName = self._tabpagevar(i, 'NERDTreeBufName') - if nextName != -1 && (!exists("t:NERDTreeBufName") || nextName != t:NERDTreeBufName) + if nextName != -1 && (!exists('t:NERDTreeBufName') || nextName != t:NERDTreeBufName) call add(treeBufNames, nextName) endif endfor @@ -140,7 +140,7 @@ function! s:Creator.createMirror() let i = 0 while i < len(treeBufNames) let bufName = treeBufNames[i] - let treeRoot = getbufvar(bufName, "NERDTree").root + let treeRoot = getbufvar(bufName, 'NERDTree').root let options[i+1 . '. ' . treeRoot.path.str() . ' (buf name: ' . bufName . ')'] = bufName let i = i + 1 endwhile @@ -148,7 +148,7 @@ function! s:Creator.createMirror() "work out which tree to mirror, if there is more than 1 then ask the user let bufferName = '' if len(keys(options)) > 1 - let choices = ["Choose a tree to mirror"] + let choices = ['Choose a tree to mirror'] let choices = extend(choices, sort(keys(options))) let choice = inputlist(choices) if choice < 1 || choice > len(options) || choice ==# '' @@ -159,7 +159,7 @@ function! s:Creator.createMirror() elseif len(keys(options)) ==# 1 let bufferName = values(options)[0] else - call nerdtree#echo("No trees to mirror") + call nerdtree#echo('No trees to mirror') return endif @@ -227,7 +227,7 @@ endfunction " FUNCTION: s:Creator._nextBufferNumber() {{{1 " the number to add to the nerd tree buffer name to make the buf name unique function! s:Creator._nextBufferNumber() - if !exists("s:Creator._NextBufNum") + if !exists('s:Creator._NextBufNum') let s:Creator._NextBufNum = 1 else let s:Creator._NextBufNum += 1 @@ -254,7 +254,7 @@ function! s:Creator._pathForString(str) try let path = g:NERDTreePath.New(dir) catch /^NERDTree.InvalidArgumentsError/ - call nerdtree#echo("No bookmark or directory found for: " . a:str) + call nerdtree#echo('No bookmark or directory found for: ' . a:str) return {} endtry endif @@ -274,7 +274,7 @@ function! s:Creator._removeTreeBufForTab() "nerdtree buf may be mirrored/displayed elsewhere if self._isBufHidden(buf) - exec "bwipeout " . buf + exec 'bwipeout ' . buf endif endif @@ -300,11 +300,11 @@ function! s:Creator._setCommonBufOptions() setlocal nowrap if g:NERDTreeShowLineNumbers - setlocal nu + setlocal number else - setlocal nonu + setlocal nonumber if v:version >= 703 - setlocal nornu + setlocal norelativenumber endif endif @@ -330,17 +330,17 @@ endfunction " FUNCTION: s:Creator._tabpagevar(tabnr, var) {{{1 function! s:Creator._tabpagevar(tabnr, var) let currentTab = tabpagenr() - let old_ei = &ei - set ei=all + let old_ei = &eventignore + set eventignore=all - exec "tabnext " . a:tabnr + exec 'tabnext ' . a:tabnr let v = -1 if exists('t:' . a:var) exec 'let v = t:' . a:var endif - exec "tabnext " . currentTab + exec 'tabnext ' . currentTab - let &ei = old_ei + let &eventignore = old_ei return v endfunction diff --git a/sources_non_forked/nerdtree/lib/nerdtree/flag_set.vim b/sources_non_forked/nerdtree/lib/nerdtree/flag_set.vim index bc6e8879..75528674 100644 --- a/sources_non_forked/nerdtree/lib/nerdtree/flag_set.vim +++ b/sources_non_forked/nerdtree/lib/nerdtree/flag_set.vim @@ -43,13 +43,13 @@ endfunction "FUNCTION: FlagSet.renderToString() {{{1 function! s:FlagSet.renderToString() - let flagstring = "" + let flagstring = '' for i in values(self._flags) let flagstring .= join(i) endfor if len(flagstring) == 0 - return "" + return '' endif return '[' . flagstring . ']' diff --git a/sources_non_forked/nerdtree/lib/nerdtree/key_map.vim b/sources_non_forked/nerdtree/lib/nerdtree/key_map.vim index 6714ee41..f3268c26 100644 --- a/sources_non_forked/nerdtree/lib/nerdtree/key_map.vim +++ b/sources_non_forked/nerdtree/lib/nerdtree/key_map.vim @@ -53,7 +53,7 @@ function! s:KeyMap.bind() endif let keymapInvokeString = escape(keymapInvokeString, '\') - let premap = self.key == "" ? " " : " " + let premap = self.key ==# '' ? ' ' : ' ' exec 'nnoremap '. self.key . premap . ':call nerdtree#ui_glue#invokeKeyMap("'. keymapInvokeString .'")' endfunction @@ -66,7 +66,7 @@ endfunction "FUNCTION: KeyMap.invoke() {{{1 "Call the KeyMaps callback function function! s:KeyMap.invoke(...) - let Callback = type(self.callback) == type(function("tr")) ? self.callback : function(self.callback) + let Callback = type(self.callback) ==# type(function('tr')) ? self.callback : function(self.callback) if a:0 call Callback(a:1) else @@ -78,11 +78,11 @@ endfunction "Find a keymapping for a:key and the current scope invoke it. " "Scope is determined as follows: -" * if the cursor is on a dir node then "DirNode" -" * if the cursor is on a file node then "FileNode" -" * if the cursor is on a bookmark then "Bookmark" +" * if the cursor is on a dir node then DirNode +" * if the cursor is on a file node then FileNode +" * if the cursor is on a bookmark then Bookmark " -"If a keymap has the scope of "all" then it will be called if no other keymap +"If a keymap has the scope of 'all' then it will be called if no other keymap "is found for a:key and the scope. function! s:KeyMap.Invoke(key) @@ -100,7 +100,7 @@ function! s:KeyMap.Invoke(key) "try file node if !node.path.isDirectory - let km = s:KeyMap.FindFor(a:key, "FileNode") + let km = s:KeyMap.FindFor(a:key, 'FileNode') if !empty(km) return km.invoke(node) endif @@ -108,14 +108,14 @@ function! s:KeyMap.Invoke(key) "try dir node if node.path.isDirectory - let km = s:KeyMap.FindFor(a:key, "DirNode") + let km = s:KeyMap.FindFor(a:key, 'DirNode') if !empty(km) return km.invoke(node) endif endif "try generic node - let km = s:KeyMap.FindFor(a:key, "Node") + let km = s:KeyMap.FindFor(a:key, 'Node') if !empty(km) return km.invoke(node) endif @@ -125,14 +125,14 @@ function! s:KeyMap.Invoke(key) "try bookmark let bm = g:NERDTreeBookmark.GetSelected() if !empty(bm) - let km = s:KeyMap.FindFor(a:key, "Bookmark") + let km = s:KeyMap.FindFor(a:key, 'Bookmark') if !empty(km) return km.invoke(bm) endif endif "try all - let km = s:KeyMap.FindFor(a:key, "all") + let km = s:KeyMap.FindFor(a:key, 'all') if !empty(km) return km.invoke() endif @@ -143,7 +143,7 @@ function! s:KeyMap.Create(options) let opts = extend({'scope': 'all', 'quickhelpText': ''}, copy(a:options)) "dont override other mappings unless the 'override' option is given - if get(opts, 'override', 0) == 0 && !empty(s:KeyMap.FindFor(opts['key'], opts['scope'])) + if get(opts, 'override', 0) ==# 0 && !empty(s:KeyMap.FindFor(opts['key'], opts['scope'])) return end diff --git a/sources_non_forked/nerdtree/lib/nerdtree/menu_controller.vim b/sources_non_forked/nerdtree/lib/nerdtree/menu_controller.vim index 874c09dc..952c67bd 100644 --- a/sources_non_forked/nerdtree/lib/nerdtree/menu_controller.vim +++ b/sources_non_forked/nerdtree/lib/nerdtree/menu_controller.vim @@ -44,13 +44,13 @@ function! s:MenuController.showMenu() finally call self._restoreOptions() - " Redraw when "Ctrl-C" or "Esc" is received. - if !l:done || self.selection == -1 + " Redraw when Ctrl-C or Esc is received. + if !l:done || self.selection ==# -1 redraw! endif endtry - if self.selection != -1 + if self.selection !=# -1 let l:m = self._current() call l:m.execute() endif @@ -58,25 +58,25 @@ endfunction "FUNCTION: MenuController._echoPrompt() {{{1 function! s:MenuController._echoPrompt() - let navHelp = "Use " . g:NERDTreeMenuDown . "/" . g:NERDTreeMenuUp . "/enter" + let navHelp = 'Use ' . g:NERDTreeMenuDown . '/' . g:NERDTreeMenuUp . '/enter' if self.isMinimal() let selection = self.menuItems[self.selection].text - let keyword = matchstr(selection, "\([^ ]*") + let keyword = matchstr(selection, '[^ ]*([^ ]*') let shortcuts = map(copy(self.menuItems), "v:val['shortcut']") - let shortcuts[self.selection] = " " . keyword . " " + let shortcuts[self.selection] = ' ' . keyword . ' ' - echo "Menu: [" . join(shortcuts, ",") . "] (" . navHelp . " or shortcut): " + echo 'Menu: [' . join(shortcuts, ',') . '] (' . navHelp . ' or shortcut): ' else - echo "NERDTree Menu. " . navHelp . ", or the shortcuts indicated" - echo "=========================================================" + echo 'NERDTree Menu. ' . navHelp . ', or the shortcuts indicated' + echo '=========================================================' for i in range(0, len(self.menuItems)-1) - if self.selection == i - echo "> " . self.menuItems[i].text + if self.selection ==# i + echo '> ' . self.menuItems[i].text else - echo " " . self.menuItems[i].text + echo ' ' . self.menuItems[i].text endif endfor endif @@ -92,20 +92,20 @@ endfunction "change the selection (if appropriate) and return 1 if the user has made "their choice, 0 otherwise function! s:MenuController._handleKeypress(key) - if a:key == g:NERDTreeMenuDown + if a:key ==# g:NERDTreeMenuDown call self._cursorDown() - elseif a:key == g:NERDTreeMenuUp + elseif a:key ==# g:NERDTreeMenuUp call self._cursorUp() - elseif a:key == nr2char(27) "escape + elseif a:key ==# nr2char(27) "escape let self.selection = -1 return 1 - elseif a:key == "\r" || a:key == "\n" "enter and ctrl-j + elseif a:key ==# "\r" || a:key ==# "\n" "enter and ctrl-j return 1 else let index = self._nextIndexFor(a:key) - if index != -1 + if index !=# -1 let self.selection = index - if len(self._allIndexesFor(a:key)) == 1 + if len(self._allIndexesFor(a:key)) ==# 1 return 1 endif endif @@ -120,7 +120,7 @@ function! s:MenuController._allIndexesFor(shortcut) let toReturn = [] for i in range(0, len(self.menuItems)-1) - if self.menuItems[i].shortcut == a:shortcut + if self.menuItems[i].shortcut ==# a:shortcut call add(toReturn, i) endif endfor @@ -133,13 +133,13 @@ endfunction "current cursor location and wraps around to the top again if need be function! s:MenuController._nextIndexFor(shortcut) for i in range(self.selection+1, len(self.menuItems)-1) - if self.menuItems[i].shortcut == a:shortcut + if self.menuItems[i].shortcut ==# a:shortcut return i endif endfor for i in range(0, self.selection) - if self.menuItems[i].shortcut == a:shortcut + if self.menuItems[i].shortcut ==# a:shortcut return i endif endfor diff --git a/sources_non_forked/nerdtree/lib/nerdtree/menu_item.vim b/sources_non_forked/nerdtree/lib/nerdtree/menu_item.vim index 8a74bb1a..7f259171 100644 --- a/sources_non_forked/nerdtree/lib/nerdtree/menu_item.vim +++ b/sources_non_forked/nerdtree/lib/nerdtree/menu_item.vim @@ -6,7 +6,7 @@ let g:NERDTreeMenuItem = s:MenuItem "FUNCTION: MenuItem.All() {{{1 "get all top level menu items function! s:MenuItem.All() - if !exists("s:menuItems") + if !exists('s:menuItems') let s:menuItems = [] endif return s:menuItems @@ -58,7 +58,7 @@ function! s:MenuItem.CreateSeparator(options) let standard_options = { 'text': '--------------------', \ 'shortcut': -1, \ 'callback': -1 } - let options = extend(a:options, standard_options, "force") + let options = extend(a:options, standard_options, 'force') return s:MenuItem.Create(options) endfunction @@ -67,7 +67,7 @@ endfunction "make a new submenu and add it to global list function! s:MenuItem.CreateSubmenu(options) let standard_options = { 'callback': -1 } - let options = extend(a:options, standard_options, "force") + let options = extend(a:options, standard_options, 'force') return s:MenuItem.Create(options) endfunction @@ -79,7 +79,7 @@ endfunction "specified function! s:MenuItem.enabled() if self.isActiveCallback != -1 - return type(self.isActiveCallback) == type(function("tr")) ? self.isActiveCallback() : {self.isActiveCallback}() + return type(self.isActiveCallback) == type(function('tr')) ? self.isActiveCallback() : {self.isActiveCallback}() endif return 1 endfunction @@ -94,7 +94,7 @@ function! s:MenuItem.execute() call mc.showMenu() else if self.callback != -1 - if type(self.callback) == type(function("tr")) + if type(self.callback) == type(function('tr')) call self.callback() else call {self.callback}() diff --git a/sources_non_forked/nerdtree/lib/nerdtree/nerdtree.vim b/sources_non_forked/nerdtree/lib/nerdtree/nerdtree.vim index 3e7ade8a..a48f6a86 100644 --- a/sources_non_forked/nerdtree/lib/nerdtree/nerdtree.vim +++ b/sources_non_forked/nerdtree/lib/nerdtree/nerdtree.vim @@ -37,26 +37,26 @@ function! s:NERDTree.Close() return endif - if winnr("$") != 1 + if winnr('$') !=# 1 " Use the window ID to identify the currently active window or fall " back on the buffer ID if win_getid/win_gotoid are not available, in " which case we'll focus an arbitrary window showing the buffer. let l:useWinId = exists('*win_getid') && exists('*win_gotoid') - if winnr() == s:NERDTree.GetWinNum() - call nerdtree#exec("wincmd p", 1) - let l:activeBufOrWin = l:useWinId ? win_getid() : bufnr("") - call nerdtree#exec("wincmd p", 1) + if winnr() ==# s:NERDTree.GetWinNum() + call nerdtree#exec('wincmd p', 1) + let l:activeBufOrWin = l:useWinId ? win_getid() : bufnr('') + call nerdtree#exec('wincmd p', 1) else - let l:activeBufOrWin = l:useWinId ? win_getid() : bufnr("") + let l:activeBufOrWin = l:useWinId ? win_getid() : bufnr('') endif - call nerdtree#exec(s:NERDTree.GetWinNum() . " wincmd w", 1) - call nerdtree#exec("close", 0) + call nerdtree#exec(s:NERDTree.GetWinNum() . ' wincmd w', 1) + call nerdtree#exec('close', 0) if l:useWinId - call nerdtree#exec("call win_gotoid(" . l:activeBufOrWin . ")", 0) + call nerdtree#exec('call win_gotoid(' . l:activeBufOrWin . ')', 0) else - call nerdtree#exec(bufwinnr(l:activeBufOrWin) . " wincmd w", 0) + call nerdtree#exec(bufwinnr(l:activeBufOrWin) . ' wincmd w', 0) endif else close @@ -75,7 +75,7 @@ endfunction "Places the cursor at the top of the bookmarks table function! s:NERDTree.CursorToBookmarkTable() if !b:NERDTree.ui.getShowBookmarks() - throw "NERDTree.IllegalOperationError: cant find bookmark table, bookmarks arent active" + throw 'NERDTree.IllegalOperationError: cant find bookmark table, bookmarks arent active' endif if g:NERDTreeMinimalUI @@ -88,7 +88,7 @@ function! s:NERDTree.CursorToBookmarkTable() while getline(line) !~# '^>-\+Bookmarks-\+$' let line = line + 1 if line >= rootNodeLine - throw "NERDTree.BookmarkTableNotFoundError: didnt find the bookmarks table" + throw 'NERDTree.BookmarkTableNotFoundError: didnt find the bookmarks table' endif endwhile call cursor(line, 2) @@ -98,19 +98,19 @@ endfunction "Places the cursor in the nerd tree window function! s:NERDTree.CursorToTreeWin() call g:NERDTree.MustBeOpen() - call nerdtree#exec(g:NERDTree.GetWinNum() . "wincmd w", 1) + call nerdtree#exec(g:NERDTree.GetWinNum() . 'wincmd w', 1) 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:NERDTree") + 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() - if !exists("t:NERDTreeBufName") + if !exists('t:NERDTreeBufName') return end @@ -133,7 +133,7 @@ function! s:NERDTree.ForCurrentTab() endif let bufnr = bufnr(t:NERDTreeBufName) - return getbufvar(bufnr, "NERDTree") + return getbufvar(bufnr, 'NERDTree') endfunction "FUNCTION: s:NERDTree.getRoot() {{{1 @@ -144,7 +144,7 @@ endfunction "FUNCTION: s:NERDTree.GetWinNum() {{{1 "gets the nerd tree window number for this tab function! s:NERDTree.GetWinNum() - if exists("t:NERDTreeBufName") + if exists('t:NERDTreeBufName') return bufwinnr(t:NERDTreeBufName) endif @@ -160,23 +160,23 @@ endfunction "FUNCTION: s:NERDTree.IsOpen() {{{1 function! s:NERDTree.IsOpen() - return s:NERDTree.GetWinNum() != -1 + return s:NERDTree.GetWinNum() !=# -1 endfunction "FUNCTION: s:NERDTree.isTabTree() {{{1 function! s:NERDTree.isTabTree() - return self._type == "tab" + return self._type ==# 'tab' endfunction "FUNCTION: s:NERDTree.isWinTree() {{{1 function! s:NERDTree.isWinTree() - return self._type == "window" + return self._type ==# 'window' endfunction "FUNCTION: s:NERDTree.MustBeOpen() {{{1 function! s:NERDTree.MustBeOpen() if !s:NERDTree.IsOpen() - throw "NERDTree.TreeNotOpen" + throw 'NERDTree.TreeNotOpen' endif endfunction diff --git a/sources_non_forked/nerdtree/lib/nerdtree/notifier.vim b/sources_non_forked/nerdtree/lib/nerdtree/notifier.vim index dfd48b33..fc3155d7 100644 --- a/sources_non_forked/nerdtree/lib/nerdtree/notifier.vim +++ b/sources_non_forked/nerdtree/lib/nerdtree/notifier.vim @@ -15,13 +15,13 @@ 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) - let Callback = type(Listener) == type(function("tr")) ? Listener : function(Listener) + let Callback = type(Listener) == type(function('tr')) ? Listener : function(Listener) call Callback(event) endfor endfunction function! s:Notifier.GetListenersMap() - if !exists("s:refreshListenersMap") + if !exists('s:refreshListenersMap') let s:refreshListenersMap = {} endif return s:refreshListenersMap diff --git a/sources_non_forked/nerdtree/lib/nerdtree/opener.vim b/sources_non_forked/nerdtree/lib/nerdtree/opener.vim index fa0c9884..d8dba34e 100644 --- a/sources_non_forked/nerdtree/lib/nerdtree/opener.vim +++ b/sources_non_forked/nerdtree/lib/nerdtree/opener.vim @@ -1,7 +1,7 @@ " ============================================================================ " CLASS: Opener " -" The Opener class defines an API for "opening" operations. +" The Opener class defines an API for 'opening' operations. " ============================================================================ @@ -45,7 +45,7 @@ function! s:Opener._checkToCloseTree(newtab) return endif - if (a:newtab && self._where == 't') || !a:newtab + if (a:newtab && self._where ==# 't') || !a:newtab call g:NERDTree.CloseIfQuitOnOpen() endif endfunction @@ -54,9 +54,9 @@ endfunction " find the window number of the first normal window function! s:Opener._firstUsableWindow() let i = 1 - while i <= winnr("$") + while i <= winnr('$') let bnum = winbufnr(i) - if bnum != -1 && getbufvar(bnum, '&buftype') ==# '' + if bnum !=# -1 && getbufvar(bnum, '&buftype') ==# '' \ && !getwinvar(i, '&previewwindow') \ && (!getbufvar(bnum, '&modified') || &hidden) return i @@ -70,23 +70,23 @@ endfunction " FUNCTION: Opener._gotoTargetWin() {{{1 function! s:Opener._gotoTargetWin() if b:NERDTree.isWinTree() - if self._where == 'v' + if self._where ==# 'v' call self._newVSplit() - elseif self._where == 'h' + elseif self._where ==# 'h' call self._newSplit() - elseif self._where == 't' + elseif self._where ==# 't' tabnew endif else call self._checkToCloseTree(1) - if self._where == 'v' + if self._where ==# 'v' call self._newVSplit() - elseif self._where == 'h' + elseif self._where ==# 'h' call self._newSplit() - elseif self._where == 't' + elseif self._where ==# 't' tabnew - elseif self._where == 'p' + elseif self._where ==# 'p' call self._previousWindow() endif @@ -102,15 +102,15 @@ endfunction " winnumber: the number of the window in question function! s:Opener._isWindowUsable(winnumber) "gotta split if theres only one window (i.e. the NERD tree) - if winnr("$") ==# 1 + if winnr('$') ==# 1 return 0 endif let oldwinnr = winnr() - call nerdtree#exec(a:winnumber . "wincmd p", 1) - let specialWindow = getbufvar("%", '&buftype') != '' || getwinvar('%', '&previewwindow') + call nerdtree#exec(a:winnumber . 'wincmd p', 1) + let specialWindow = getbufvar('%', '&buftype') !=# '' || getwinvar('%', '&previewwindow') let modified = &modified - call nerdtree#exec(oldwinnr . "wincmd p", 1) + call nerdtree#exec(oldwinnr . 'wincmd p', 1) "if its a special window e.g. quickfix or another explorer plugin then we "have to split @@ -131,9 +131,9 @@ endfunction " a:path: the path object that is to be opened " a:opts: a dictionary containing the following optional keys... " 'where': specifies whether the node should be opened in new split, in -" a new tab or, in the last window; takes values "v", "h", or "t" +" a new tab or, in the last window; takes values 'v', 'h', or 't' " 'reuse': if file is already shown in a window, jump there; takes values -" "all", "currenttab", or empty +" 'all', 'currenttab', or empty " 'keepopen': boolean (0 or 1); if true, the tree window will not be closed " 'stay': boolean (0 or 1); if true, remain in tree window after opening function! s:Opener.New(path, opts) @@ -153,21 +153,21 @@ endfunction " FUNCTION: Opener._newSplit() {{{1 function! s:Opener._newSplit() - let onlyOneWin = (winnr("$") ==# 1) + let onlyOneWin = (winnr('$') ==# 1) let savesplitright = &splitright if onlyOneWin - let &splitright = (g:NERDTreeWinPos ==# "left") + let &splitright = (g:NERDTreeWinPos ==# 'left') endif " If only one window (ie. NERDTree), split vertically instead. - let splitMode = onlyOneWin ? "vertical" : "" + let splitMode = onlyOneWin ? 'vertical' : '' " Open the new window try call nerdtree#exec('wincmd p', 1) - call nerdtree#exec(splitMode . " split",1) + call nerdtree#exec(splitMode . ' split',1) catch /^Vim\%((\a\+)\)\=:E37/ call g:NERDTree.CursorToTreeWin() - throw "NERDTree.FileAlreadyOpenAndModifiedError: ". self._path.str() ." is already open and modified." + throw 'NERDTree.FileAlreadyOpenAndModifiedError: '. self._path.str() .' is already open and modified.' catch /^Vim\%((\a\+)\)\=:/ "do nothing endtry @@ -187,10 +187,10 @@ endfunction function! s:Opener._newVSplit() let l:winwidth = winwidth('.') - let onlyOneWin = (winnr("$") ==# 1) + let onlyOneWin = (winnr('$') ==# 1) let savesplitright = &splitright if onlyOneWin - let &splitright = (g:NERDTreeWinPos ==# "left") + let &splitright = (g:NERDTreeWinPos ==# 'left') let l:winwidth = g:NERDTreeWinSize endif @@ -219,7 +219,7 @@ endfunction " FUNCTION: Opener._openFile() {{{1 function! s:Opener._openFile() - if !self._stay && !and(g:NERDTreeQuitOnOpen,1) && exists("b:NERDTreeZoomed") && b:NERDTreeZoomed + if !self._stay && !and(g:NERDTreeQuitOnOpen,1) && exists('b:NERDTreeZoomed') && b:NERDTreeZoomed call b:NERDTree.ui.toggleZoom() endif @@ -247,7 +247,7 @@ function! s:Opener._openDirectory(node) else if empty(self._where) call b:NERDTree.changeRoot(a:node) - elseif self._where == 't' + elseif self._where ==# 't' call g:NERDTreeCreator.CreateTabTree(a:node.path.str()) else call g:NERDTreeCreator.CreateWindowTree(a:node.path.str()) @@ -261,18 +261,18 @@ endfunction " FUNCTION: Opener._previousWindow() {{{1 function! s:Opener._previousWindow() - if !self._isWindowUsable(winnr("#")) && self._firstUsableWindow() ==# -1 + if !self._isWindowUsable(winnr('#')) && self._firstUsableWindow() ==# -1 call self._newSplit() else try - if !self._isWindowUsable(winnr("#")) - call nerdtree#exec(self._firstUsableWindow() . "wincmd w", 1) + if !self._isWindowUsable(winnr('#')) + call nerdtree#exec(self._firstUsableWindow() . 'wincmd w', 1) else call nerdtree#exec('wincmd p', 1) endif catch /^Vim\%((\a\+)\)\=:E37/ call g:NERDTree.CursorToTreeWin() - throw "NERDTree.FileAlreadyOpenAndModifiedError: ". self._path.str() ." is already open and modified." + throw 'NERDTree.FileAlreadyOpenAndModifiedError: '. self._path.str() .' is already open and modified.' catch /^Vim\%((\a\+)\)\=:/ echo v:exception endtry @@ -296,13 +296,13 @@ function! s:Opener._reuseWindow() "check the current tab for the window let winnr = bufwinnr('^' . self._path.str() . '$') - if winnr != -1 - call nerdtree#exec(winnr . "wincmd w", 0) + if winnr !=# -1 + call nerdtree#exec(winnr . 'wincmd w', 0) call self._checkToCloseTree(0) return 1 endif - if self._reuse == 'currenttab' + if self._reuse ==# 'currenttab' return 0 endif @@ -312,7 +312,7 @@ function! s:Opener._reuseWindow() call self._checkToCloseTree(1) call nerdtree#exec(tabnr . 'tabnext', 1) let winnr = bufwinnr('^' . self._path.str() . '$') - call nerdtree#exec(winnr . "wincmd w", 0) + call nerdtree#exec(winnr . 'wincmd w', 0) return 1 endif @@ -321,7 +321,7 @@ endfunction " FUNCTION: Opener._saveCursorPos() {{{1 function! s:Opener._saveCursorPos() - let self._bufnr = bufnr("") + let self._bufnr = bufnr('') let self._tabnr = tabpagenr() endfunction diff --git a/sources_non_forked/nerdtree/lib/nerdtree/path.vim b/sources_non_forked/nerdtree/lib/nerdtree/path.vim index 4ececf9e..6a23c7ba 100644 --- a/sources_non_forked/nerdtree/lib/nerdtree/path.vim +++ b/sources_non_forked/nerdtree/lib/nerdtree/path.vim @@ -25,7 +25,7 @@ function! s:Path.AbsolutePathFor(pathStr) if l:prependWorkingDir let l:result = getcwd() - if l:result[-1:] == s:Path.Slash() + if l:result[-1:] ==# s:Path.Slash() let l:result = l:result . a:pathStr else let l:result = l:result . s:Path.Slash() . a:pathStr @@ -37,7 +37,7 @@ endfunction " FUNCTION: Path.bookmarkNames() {{{1 function! s:Path.bookmarkNames() - if !exists("self._bookmarkNames") + if !exists('self._bookmarkNames') call self.cacheDisplayString() endif return self._bookmarkNames @@ -57,7 +57,7 @@ function! s:Path.cacheDisplayString() abort call add(self._bookmarkNames, i.name) endif endfor - if !empty(self._bookmarkNames) && g:NERDTreeMarkBookmarks == 1 + if !empty(self._bookmarkNames) && g:NERDTreeMarkBookmarks ==# 1 let self.cachedDisplayString = self.addDelimiter(self.cachedDisplayString) . ' {' . join(self._bookmarkNames) . '}' endif @@ -87,22 +87,22 @@ function! s:Path.changeToDir() endif try - if g:NERDTreeUseTCD && exists(":tcd") == 2 - execute "tcd " . dir + if g:NERDTreeUseTCD && exists(':tcd') ==# 2 + execute 'tcd ' . dir call nerdtree#echo("Tab's CWD is now: " . getcwd()) else - execute "cd " . dir - call nerdtree#echo("CWD is now: " . getcwd()) + execute 'cd ' . dir + call nerdtree#echo('CWD is now: ' . getcwd()) endif catch - throw "NERDTree.PathChangeError: cannot change CWD to " . dir + throw 'NERDTree.PathChangeError: cannot change CWD to ' . dir endtry endfunction " FUNCTION: Path.compareTo() {{{1 " " Compares this Path to the given path and returns 0 if they are equal, -1 if -" this Path is "less than" the given path, or 1 if it is "greater". +" this Path is 'less than' the given path, or 1 if it is 'greater'. " " Args: " path: the path object to compare this to @@ -188,7 +188,7 @@ endfunction " dest: the location to copy this dir/file to function! s:Path.copy(dest) if !s:Path.CopyingSupported() - throw "NERDTree.CopyingNotSupportedError: Copying is not supported on this OS" + throw 'NERDTree.CopyingNotSupportedError: Copying is not supported on this OS' endif call s:Path.createParentDirectories(a:dest) @@ -199,10 +199,10 @@ function! s:Path.copy(dest) let cmd_prefix = (self.isDirectory ? g:NERDTreeCopyDirCmd : g:NERDTreeCopyFileCmd) endif - let cmd = cmd_prefix . " " . escape(self.str(), self._escChars()) . " " . escape(a:dest, self._escChars()) + let cmd = cmd_prefix . ' ' . escape(self.str(), self._escChars()) . ' ' . escape(a:dest, self._escChars()) let success = system(cmd) - if v:shell_error != 0 - throw "NERDTree.CopyError: Could not copy ''". self.str() ."'' to: '" . a:dest . "'" + if v:shell_error !=# 0 + throw "NERDTree.CopyError: Could not copy '". self.str() ."' to: '" . a:dest . "'" endif endfunction @@ -258,7 +258,7 @@ function! s:Path.delete() let cmd = g:NERDTreeRemoveDirCmd . self.str({'escape': 1}) let success = system(cmd) - if v:shell_error != 0 + if v:shell_error !=# 0 throw "NERDTree.PathDeletionError: Could not delete directory: '" . self.str() . "'" endif else @@ -269,7 +269,7 @@ function! s:Path.delete() let success = delete(self.str()) endif - if success != 0 + if success !=# 0 throw "NERDTree.PathDeletionError: Could not delete file: '" . self.str() . "'" endif endif @@ -286,7 +286,7 @@ endfunction " Returns a string that specifies how the path should be represented as a " string function! s:Path.displayString() - if self.cachedDisplayString ==# "" + if self.cachedDisplayString ==# '' call self.cacheDisplayString() endif @@ -295,7 +295,7 @@ endfunction " FUNCTION: Path.edit() {{{1 function! s:Path.edit() - exec "edit " . self.str({'format': 'Edit'}) + exec 'edit ' . self.str({'format': 'Edit'}) endfunction " FUNCTION: Path.extractDriveLetter(fullpath) {{{1 @@ -303,10 +303,10 @@ endfunction " If running windows, cache the drive letter for this path function! s:Path.extractDriveLetter(fullpath) if nerdtree#runningWindows() - if a:fullpath =~ '^\(\\\\\|\/\/\)' + if a:fullpath =~# '^\(\\\\\|\/\/\)' "For network shares, the 'drive' consists of the first two parts of the path, i.e. \\boxname\share let self.drive = substitute(a:fullpath, '^\(\(\\\\\|\/\/\)[^\\\/]*\(\\\|\/\)[^\\\/]*\).*', '\1', '') - let self.drive = substitute(self.drive, '/', '\', "g") + let self.drive = substitute(self.drive, '/', '\', 'g') else let self.drive = substitute(a:fullpath, '\(^[a-zA-Z]:\).*', '\1', '') endif @@ -402,7 +402,7 @@ function! s:Path._splitChunks(path) let i = 0 while i < len(chunks) "convert number literals to numbers - if match(chunks[i], '^\d\+$') == 0 + if match(chunks[i], '^\d\+$') ==# 0 let chunks[i] = str2nr(chunks[i]) endif let i = i + 1 @@ -413,21 +413,21 @@ endfunction " FUNCTION: Path.getSortKey() {{{1 " returns a key used in compare function for sorting function! s:Path.getSortKey() - if !exists("self._sortKey") || g:NERDTreeSortOrder !=# g:NERDTreeOldSortOrder + if !exists('self._sortKey') || g:NERDTreeSortOrder !=# g:NERDTreeOldSortOrder " Look for file metadata tags: [[timestamp]], [[extension]], [[size]] let metadata = [] for tag in g:NERDTreeSortOrder if tag =~? '\[\[-\?timestamp\]\]' - let metadata += [self.isDirectory ? 0 : getftime(self.str()) * (tag =~ '-' ? -1 : 1)] + let metadata += [self.isDirectory ? 0 : getftime(self.str()) * (tag =~# '-' ? -1 : 1)] elseif tag =~? '\[\[-\?size\]\]' - let metadata += [self.isDirectory ? 0 : getfsize(self.str()) * (tag =~ '-' ? -1 : 1)] + let metadata += [self.isDirectory ? 0 : getfsize(self.str()) * (tag =~# '-' ? -1 : 1)] elseif tag =~? '\[\[extension\]\]' let extension = matchstr(self.getLastPathComponent(0), '[^.]\+\.\zs[^.]\+$') - let metadata += [self.isDirectory ? '' : (extension == '' ? nr2char(str2nr('0x10ffff',16)) : extension)] + let metadata += [self.isDirectory ? '' : (extension ==# '' ? nr2char(str2nr('0x10ffff',16)) : extension)] endif endfor - if g:NERDTreeSortOrder[0] =~ '\[\[.*\]\]' + if g:NERDTreeSortOrder[0] =~# '\[\[.*\]\]' " Apply tags' sorting first if specified first. let self._sortKey = metadata + [self.getSortOrderIndex()] else @@ -501,7 +501,7 @@ function! s:Path.ignore(nerdtree) endfor for Callback in g:NERDTree.PathFilters() - let Callback = type(Callback) == type(function("tr")) ? Callback : function(Callback) + let Callback = type(Callback) ==# type(function('tr')) ? Callback : function(Callback) if Callback({'path': self, 'nerdtree': a:nerdtree}) return 1 endif @@ -524,12 +524,12 @@ endfunction " returns true if this path matches the given ignore pattern function! s:Path._ignorePatternMatches(pattern) let pat = a:pattern - if strpart(pat,len(pat)-7) == '[[dir]]' + if strpart(pat,len(pat)-7) ==# '[[dir]]' if !self.isDirectory return 0 endif let pat = strpart(pat,0, len(pat)-7) - elseif strpart(pat,len(pat)-8) == '[[file]]' + elseif strpart(pat,len(pat)-8) ==# '[[file]]' if self.isDirectory return 0 endif @@ -550,19 +550,19 @@ function! s:Path.isAncestor(path) let this = self.str() let that = a:path.str() - return stridx(that, this) == 0 + 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 + if a:path.isDirectory ==# 0 return 0 endif let this = self.str() let that = a:path.str() - return stridx(this, that . s:Path.Slash()) == 0 + return stridx(this, that . s:Path.Slash()) ==# 0 endfunction " FUNCTION: Path.JoinPathStrings(...) {{{1 @@ -637,8 +637,8 @@ function! s:Path.readInfoFromDisk(fullpath) let fullpath = s:Path.WinToUnixPath(a:fullpath) - if getftype(fullpath) ==# "fifo" - throw "NERDTree.InvalidFiletypeError: Cant handle FIFO files: " . a:fullpath + if getftype(fullpath) ==# 'fifo' + throw 'NERDTree.InvalidFiletypeError: Cant handle FIFO files: ' . a:fullpath endif let self.pathSegments = filter(split(fullpath, '/'), '!empty(v:val)') @@ -650,7 +650,7 @@ function! s:Path.readInfoFromDisk(fullpath) let self.isDirectory = 0 let self.isReadOnly = filewritable(a:fullpath) ==# 0 else - throw "NERDTree.InvalidArgumentsError: Invalid path = " . a:fullpath + throw 'NERDTree.InvalidArgumentsError: Invalid path = ' . a:fullpath endif let self.isExecutable = 0 @@ -665,7 +665,7 @@ function! s:Path.readInfoFromDisk(fullpath) let hardPath = s:Path.Resolve(self.strTrunk()) . '/' . lastPathComponent "if the last part of the path is a symlink then flag it as such - let self.isSymLink = (s:Path.Resolve(hardPath) != hardPath) + let self.isSymLink = (s:Path.Resolve(hardPath) !=# hardPath) if self.isSymLink let self.symLinkDest = s:Path.Resolve(fullpath) @@ -700,13 +700,13 @@ endfunction " Renames this node on the filesystem function! s:Path.rename(newPath) if a:newPath ==# '' - throw "NERDTree.InvalidArgumentsError: Invalid newPath for renaming = ". a:newPath + throw 'NERDTree.InvalidArgumentsError: Invalid newPath for renaming = '. a:newPath endif call s:Path.createParentDirectories(a:newPath) let success = rename(self.str(), a:newPath) - if success != 0 + if success !=# 0 throw "NERDTree.PathRenameError: Could not rename: '" . self.str() . "'" . 'to:' . a:newPath endif call self.readInfoFromDisk(a:newPath) @@ -742,7 +742,7 @@ endfunction " value associated with 'truncateTo'. A '<' is prepended. function! s:Path.str(...) let options = a:0 ? a:1 : {} - let toReturn = "" + let toReturn = '' if has_key(options, 'format') let format = options['format'] @@ -779,7 +779,7 @@ endfunction " FUNCTION: Path._strForUI() {{{1 function! s:Path._strForUI() let toReturn = '/' . join(self.pathSegments, '/') - if self.isDirectory && toReturn != '/' + if self.isDirectory && toReturn !=# '/' let toReturn = toReturn . '/' endif return toReturn @@ -802,7 +802,7 @@ function! s:Path._strForEdit() " On Windows, the drive letter may be removed by "fnamemodify()". Add it " back, if necessary. - if nerdtree#runningWindows() && l:result[0] == s:Path.Slash() + if nerdtree#runningWindows() && l:result[0] ==# s:Path.Slash() let l:result = self.drive . l:result endif @@ -883,13 +883,13 @@ function! s:Path.WinToUnixPath(pathstr) let toReturn = a:pathstr "remove the x:\ of the front - let toReturn = substitute(toReturn, '^.*:\(\\\|/\)\?', '/', "") + let toReturn = substitute(toReturn, '^.*:\(\\\|/\)\?', '/', '') "remove the \\ network share from the front - let toReturn = substitute(toReturn, '^\(\\\\\|\/\/\)[^\\\/]*\(\\\|\/\)[^\\\/]*\(\\\|\/\)\?', '/', "") + let toReturn = substitute(toReturn, '^\(\\\\\|\/\/\)[^\\\/]*\(\\\|\/\)[^\\\/]*\(\\\|\/\)\?', '/', '') "convert all \ chars to / - let toReturn = substitute(toReturn, '\', '/', "g") + let toReturn = substitute(toReturn, '\', '/', 'g') return toReturn 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 4015f0be..1502ea73 100644 --- a/sources_non_forked/nerdtree/lib/nerdtree/tree_dir_node.vim +++ b/sources_non_forked/nerdtree/lib/nerdtree/tree_dir_node.vim @@ -14,7 +14,7 @@ let g:NERDTreeDirNode = s:TreeDirNode " Class method that returns the highest cached ancestor of the current root. function! s:TreeDirNode.AbsoluteTreeRoot() let currentNode = b:NERDTree.root - while currentNode.parent != {} + while currentNode.parent !=# {} let currentNode = currentNode.parent endwhile return currentNode @@ -100,7 +100,7 @@ function! s:TreeDirNode.displayString() let l:cascade = self.getCascade() for l:dirNode in l:cascade let l:next = l:dirNode.path.displayString() - let l:label .= l:label == '' ? l:next : substitute(l:next,'^.','','') + let l:label .= l:label ==# '' ? l:next : substitute(l:next,'^.','','') endfor " Select the appropriate open/closed status indicator symbol. @@ -133,7 +133,7 @@ function! s:TreeDirNode.findNode(path) if self.path.isDirectory for i in self.children let retVal = i.findNode(a:path) - if retVal != {} + if retVal !=# {} return retVal endif endfor @@ -169,7 +169,7 @@ function! s:TreeDirNode.getCascadeRoot() while !empty(l:parent) && !l:parent.isRoot() - if index(l:parent.getCascade(), self) == -1 + if index(l:parent.getCascade(), self) ==# -1 break endif @@ -218,7 +218,7 @@ endfunction function! s:TreeDirNode.getChildByIndex(indx, visible) let array_to_search = a:visible? self.getVisibleChildren() : self.children if a:indx > len(array_to_search) - throw "NERDTree.InvalidArgumentsError: Index is out of bounds." + throw 'NERDTree.InvalidArgumentsError: Index is out of bounds.' endif return array_to_search[a:indx] endfunction @@ -255,10 +255,10 @@ function! s:TreeDirNode.getChildIndex(path) endfunction " FUNCTION: TreeDirNode.getDirChildren() {{{1 -" Return a list of all child nodes from "self.children" that are of type +" Return a list of all child nodes from 'self.children' that are of type " TreeDirNode. This function supports http://github.com/scrooloose/nerdtree-project-plugin.git. function! s:TreeDirNode.getDirChildren() - return filter(copy(self.children), 'v:val.path.isDirectory == 1') + return filter(copy(self.children), 'v:val.path.isDirectory ==# 1') endfunction " FUNCTION: TreeDirNode._glob(pattern, all) {{{1 @@ -267,7 +267,7 @@ endfunction " " Args: " pattern: (string) the glob pattern to apply -" all: (0 or 1) if 1, include "." and ".." if they match "pattern"; if 0, +" all: (0 or 1) if 1, include '.' and '..' if they match 'pattern'; if 0, " always exclude them " " Note: If the pathnames in the result list are below the working directory, @@ -276,28 +276,28 @@ endfunction " relative paths. function! s:TreeDirNode._glob(pattern, all) - " Construct a path specification such that "globpath()" will return + " Construct a path specification such that globpath() will return " relative pathnames, if possible. - if self.path.str() == getcwd() + if self.path.str() ==# getcwd() let l:pathSpec = ',' else let l:pathSpec = escape(fnamemodify(self.path.str({'format': 'Glob'}), ':.'), ',') - " On Windows, the drive letter may be removed by "fnamemodify()". - if nerdtree#runningWindows() && l:pathSpec[0] == g:NERDTreePath.Slash() + " On Windows, the drive letter may be removed by fnamemodify(). + if nerdtree#runningWindows() && l:pathSpec[0] ==# g:NERDTreePath.Slash() let l:pathSpec = self.path.drive . l:pathSpec endif endif let l:globList = [] - " See ":h version7.txt" and ":h version8.txt" for details on the - " development of the "glob()" and "globpath()" functions. - if v:version > 704 || (v:version == 704 && has('patch654')) + " See ':h version7.txt' and ':h version8.txt' for details on the + " development of the glob() and globpath() functions. + if v:version > 704 || (v:version ==# 704 && has('patch654')) let l:globList = globpath(l:pathSpec, a:pattern, !g:NERDTreeRespectWildIgnore, 1, 0) - elseif v:version == 704 && has('patch279') + elseif v:version ==# 704 && has('patch279') let l:globList = globpath(l:pathSpec, a:pattern, !g:NERDTreeRespectWildIgnore, 1) - elseif v:version > 702 || (v:version == 702 && has('patch051')) + elseif v:version > 702 || (v:version ==# 702 && has('patch051')) let l:globString = globpath(l:pathSpec, a:pattern, !g:NERDTreeRespectWildIgnore) let l:globList = split(l:globString, "\n") else @@ -305,7 +305,7 @@ function! s:TreeDirNode._glob(pattern, all) let l:globList = split(l:globString, "\n") endif - " If "a:all" is false, filter "." and ".." from the output. + " If a:all is false, filter '.' and '..' from the output. if !a:all let l:toRemove = [] @@ -315,13 +315,13 @@ function! s:TreeDirNode._glob(pattern, all) " If l:file has a trailing slash, then its :tail will be ''. Use " :h to drop the slash and the empty string after it; then use :t " to get the directory name. - if l:tail == '' + if l:tail ==# '' let l:tail = fnamemodify(l:file, ':h:t') endif - if l:tail == '.' || l:tail == '..' + if l:tail ==# '.' || l:tail ==# '..' call add(l:toRemove, l:file) - if len(l:toRemove) == 2 + if len(l:toRemove) ==# 2 break endif endif @@ -341,7 +341,7 @@ endfunction unlet s:TreeDirNode.GetSelected function! s:TreeDirNode.GetSelected() let currentDir = g:NERDTreeFileNode.GetSelected() - if currentDir != {} && !currentDir.isRoot() + if currentDir !=# {} && !currentDir.isRoot() if currentDir.path.isDirectory ==# 0 let currentDir = currentDir.parent endif @@ -373,7 +373,7 @@ endfunction " FUNCTION: TreeDirNode.hasVisibleChildren() {{{1 " returns 1 if this node has any childre, 0 otherwise.. function! s:TreeDirNode.hasVisibleChildren() - return self.getVisibleChildCount() != 0 + return self.getVisibleChildCount() !=# 0 endfunction " FUNCTION: TreeDirNode.isCascadable() {{{1 @@ -383,7 +383,7 @@ endfunction " 2. If the parent is a symlink or is bookmarked, you end up with unparsable " text, and NERDTree cannot get the path of any child node. function! s:TreeDirNode.isCascadable() - if g:NERDTreeCascadeSingleChildDir == 0 + if g:NERDTreeCascadeSingleChildDir ==# 0 return 0 endif @@ -398,14 +398,14 @@ function! s:TreeDirNode.isCascadable() endfor let c = self.getVisibleChildren() - return len(c) == 1 && c[0].path.isDirectory + return len(c) ==# 1 && c[0].path.isDirectory endfunction " FUNCTION: TreeDirNode._initChildren() {{{1 " Removes all childen from this node and re-reads them " " Args: -" silent: 1 if the function should not echo any "please wait" messages for +" silent: 1 if the function should not echo any 'please wait' messages for " large directories " " Return: the number of child nodes read @@ -416,7 +416,7 @@ function! s:TreeDirNode._initChildren(silent) let files = self._glob('*', 1) + self._glob('.*', 0) if !a:silent && len(files) > g:NERDTreeNotificationThreshold - call nerdtree#echo("Please wait, caching a large dir ...") + call nerdtree#echo('Please wait, caching a large dir ...') endif let invalidFilesFound = 0 @@ -432,10 +432,10 @@ function! s:TreeDirNode._initChildren(silent) call self.sortChildren() - call nerdtree#echo("") + call nerdtree#echo('') if invalidFilesFound - call nerdtree#echoWarning(invalidFilesFound . " file(s) could not be loaded into the NERD tree") + call nerdtree#echoWarning(invalidFilesFound . ' file(s) could not be loaded into the NERD tree') endif return self.getChildCount() endfunction @@ -447,8 +447,8 @@ endfunction " 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." + if a:path.isDirectory !=# 1 + throw 'NERDTree.InvalidArgumentsError: A TreeDirNode object must be instantiated with a directory Path object.' endif let newTreeNode = copy(self) @@ -510,7 +510,7 @@ function! s:TreeDirNode.openAlong(...) while node.path.isDirectory call node.open(opts) let level += 1 - if node.getVisibleChildCount() == 1 + if node.getVisibleChildCount() ==# 1 let node = node.getChildByIndex(0, 1) else break @@ -523,8 +523,8 @@ endfunction " Open an explorer window for this node in the previous window. The explorer " can be a NERDTree window or a netrw window. function! s:TreeDirNode.openExplorer() - execute "wincmd p" - execute "edit ".self.path.str({'format':'Edit'}) + execute 'wincmd p' + execute 'edit '.self.path.str({'format':'Edit'}) endfunction " FUNCTION: TreeDirNode.openInNewTab(options) {{{1 @@ -567,7 +567,7 @@ function! s:TreeDirNode.refresh() "create a new path and see if it exists in this nodes children let path = g:NERDTreePath.New(i) let newNode = self.getChild(path) - if newNode != {} + if newNode !=# {} call newNode.refresh() call add(newChildNodes, newNode) @@ -587,7 +587,7 @@ function! s:TreeDirNode.refresh() call self.sortChildren() if invalidFilesFound - call nerdtree#echoWarning("some files could not be loaded into the NERD tree") + call nerdtree#echoWarning('some files could not be loaded into the NERD tree') endif endif endfunction @@ -614,7 +614,7 @@ 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() + throw 'NERDTree.InvalidArgumentsError: ' . a:path.str() . ' should be under ' . self.path.str() endif call self.open() @@ -622,11 +622,11 @@ function! s:TreeDirNode.reveal(path, ...) if self.path.equals(a:path.getParent()) let n = self.findNode(a:path) " We may be looking for a newly-saved file that isn't in the tree yet. - if n == {} + if n ==# {} call self.refresh() let n = self.findNode(a:path) endif - if has_key(opts, "open") + if has_key(opts, 'open') call n.open() endif return n @@ -642,8 +642,8 @@ function! s:TreeDirNode.reveal(path, ...) endfunction " FUNCTION: TreeDirNode.removeChild(treenode) {{{1 -" Remove the given treenode from "self.children". -" Throws "NERDTree.ChildNotFoundError" if the node is not found. +" Remove the given treenode from self.children. +" Throws NERDTree.ChildNotFoundError if the node is not found. " " Args: " treenode: the node object to remove @@ -655,16 +655,16 @@ function! s:TreeDirNode.removeChild(treenode) endif endfor - throw "NERDTree.ChildNotFoundError: child node was not found" + throw 'NERDTree.ChildNotFoundError: child node was not found' endfunction " FUNCTION: TreeDirNode.sortChildren() {{{1 -" Sort "self.children" by alphabetical order and directory priority. +" Sort self.children by alphabetical order and directory priority. function! s:TreeDirNode.sortChildren() if count(g:NERDTreeSortOrder, '*') < 1 call add(g:NERDTreeSortOrder, '*') endif - let CompareFunc = function("nerdtree#compareNodesBySortKey") + let CompareFunc = function('nerdtree#compareNodesBySortKey') call sort(self.children, CompareFunc) let g:NERDTreeOldSortOrder = g:NERDTreeSortOrder endfunction @@ -676,7 +676,7 @@ function! s:TreeDirNode.toggleOpen(...) if self.isOpen ==# 1 call self.close() else - if g:NERDTreeCascadeOpenSingleChildDir == 0 + if g:NERDTreeCascadeOpenSingleChildDir ==# 0 call self.open(opts) else call self.openAlong(opts) 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 c14f62a9..34074a25 100644 --- a/sources_non_forked/nerdtree/lib/nerdtree/tree_file_node.vim +++ b/sources_non_forked/nerdtree/lib/nerdtree/tree_file_node.vim @@ -1,7 +1,7 @@ " ============================================================================ " CLASS: TreeFileNode " -" This class is the parent of the "TreeDirNode" class and is the "Component" +" This class is the parent of the TreeDirNode class and is the 'Component' " part of the composite design pattern between the NERDTree node classes. " ============================================================================ @@ -42,7 +42,7 @@ function! s:TreeFileNode.cacheParent() if empty(self.parent) let parentPath = self.path.getParent() if parentPath.equals(self.path) - throw "NERDTree.CannotCacheParentError: already at root" + throw 'NERDTree.CannotCacheParentError: already at root' endif let self.parent = s:TreeFileNode.New(parentPath, self.getNerdtree()) endif @@ -195,7 +195,7 @@ endfunction " FUNCTION: TreeFileNode.isRoot() {{{1 function! s:TreeFileNode.isRoot() if !g:NERDTree.ExistsForBuf() - throw "NERDTree.NoTreeError: No tree exists for the current buffer" + throw 'NERDTree.NoTreeError: No tree exists for the current buffer' endif return self.equals(self.getNerdtree().root) @@ -248,8 +248,8 @@ endfunction " FUNCTION: TreeFileNode.openExplorer() function! s:TreeFileNode.openExplorer() - execute "wincmd p" - execute "edit ".self.path.getParent().str({'format':'Edit'}) + execute 'wincmd p' + execute 'edit '.self.path.getParent().str({'format':'Edit'}) endfunction " FUNCTION: TreeFileNode.putCursorHere(isJump, recurseUpward){{{1 @@ -265,7 +265,7 @@ function! s:TreeFileNode.putCursorHere(isJump, recurseUpward) if a:isJump mark ' endif - call cursor(ln, col(".")) + call cursor(ln, col('.')) else if a:recurseUpward let node = self @@ -317,7 +317,7 @@ endfunction " child nodes are rendered only) " for each depth in the tree function! s:TreeFileNode._renderToString(depth, drawText) - let output = "" + let output = '' if a:drawText ==# 1 let treeParts = repeat(' ', a:depth - 1) diff --git a/sources_non_forked/nerdtree/lib/nerdtree/ui.vim b/sources_non_forked/nerdtree/lib/nerdtree/ui.vim index 5e8b3b64..fc9db71e 100644 --- a/sources_non_forked/nerdtree/lib/nerdtree/ui.vim +++ b/sources_non_forked/nerdtree/lib/nerdtree/ui.vim @@ -27,94 +27,94 @@ function! s:UI._dumpHelp() let help = "\" NERDTree (" . nerdtree#version() . ") quickhelp~\n" let help .= "\" ============================\n" let help .= "\" File node mappings~\n" - let help .= "\" ". (g:NERDTreeMouseMode ==# 3 ? "single" : "double") ."-click,\n" + let help .= '" '. (g:NERDTreeMouseMode ==# 3 ? 'single' : 'double') ."-click,\n" if self.nerdtree.isTabTree() - let help .= "\" ". g:NERDTreeMapActivateNode .": open in prev window\n" + let help .= '" '. g:NERDTreeMapActivateNode .": open in prev window\n" else - let help .= "\" ". g:NERDTreeMapActivateNode .": open in current window\n" + let help .= '" '. g:NERDTreeMapActivateNode .": open in current window\n" endif if self.nerdtree.isTabTree() - let help .= "\" ". g:NERDTreeMapPreview .": preview\n" + let help .= '" '. g:NERDTreeMapPreview .": preview\n" endif - let help .= "\" ". g:NERDTreeMapOpenInTab.": open in new tab\n" - let help .= "\" ". g:NERDTreeMapOpenInTabSilent .": open in new tab silently\n" + let help .= '" '. g:NERDTreeMapOpenInTab.": open in new tab\n" + let help .= '" '. g:NERDTreeMapOpenInTabSilent .": open in new tab silently\n" let help .= "\" middle-click,\n" - let help .= "\" ". g:NERDTreeMapOpenSplit .": open split\n" - let help .= "\" ". g:NERDTreeMapPreviewSplit .": preview split\n" - let help .= "\" ". g:NERDTreeMapOpenVSplit .": open vsplit\n" - let help .= "\" ". g:NERDTreeMapPreviewVSplit .": preview vsplit\n" - let help .= "\" ". g:NERDTreeMapCustomOpen .": custom open\n" + let help .= '" '. g:NERDTreeMapOpenSplit .": open split\n" + let help .= '" '. g:NERDTreeMapPreviewSplit .": preview split\n" + let help .= '" '. g:NERDTreeMapOpenVSplit .": open vsplit\n" + let help .= '" '. g:NERDTreeMapPreviewVSplit .": preview vsplit\n" + let help .= '" '. g:NERDTreeMapCustomOpen .": custom open\n" let help .= "\"\n\" ----------------------------\n" let help .= "\" Directory node mappings~\n" - let help .= "\" ". (g:NERDTreeMouseMode ==# 1 ? "double" : "single") ."-click,\n" - let help .= "\" ". g:NERDTreeMapActivateNode .": open & close node\n" - let help .= "\" ". g:NERDTreeMapOpenRecursively .": recursively open node\n" - let help .= "\" ". g:NERDTreeMapOpenInTab.": open in new tab\n" - let help .= "\" ". g:NERDTreeMapOpenInTabSilent .": open in new tab silently\n" - let help .= "\" ". g:NERDTreeMapCustomOpen .": custom open\n" - let help .= "\" ". g:NERDTreeMapCloseDir .": close parent of node\n" - let help .= "\" ". g:NERDTreeMapCloseChildren .": close all child nodes of\n" + let help .= '" '. (g:NERDTreeMouseMode ==# 1 ? 'double' : 'single') ."-click,\n" + let help .= '" '. g:NERDTreeMapActivateNode .": open & close node\n" + let help .= '" '. g:NERDTreeMapOpenRecursively .": recursively open node\n" + let help .= '" '. g:NERDTreeMapOpenInTab.": open in new tab\n" + let help .= '" '. g:NERDTreeMapOpenInTabSilent .": open in new tab silently\n" + let help .= '" '. g:NERDTreeMapCustomOpen .": custom open\n" + let help .= '" '. g:NERDTreeMapCloseDir .": close parent of node\n" + let help .= '" '. g:NERDTreeMapCloseChildren .": close all child nodes of\n" let help .= "\" current node recursively\n" let help .= "\" middle-click,\n" - let help .= "\" ". g:NERDTreeMapOpenExpl.": explore selected dir\n" + let help .= '" '. g:NERDTreeMapOpenExpl.": explore selected dir\n" let help .= "\"\n\" ----------------------------\n" let help .= "\" Bookmark table mappings~\n" let help .= "\" double-click,\n" - let help .= "\" ". g:NERDTreeMapActivateNode .": open bookmark\n" - let help .= "\" ". g:NERDTreeMapPreview .": preview file\n" - let help .= "\" ". g:NERDTreeMapPreview .": find dir in tree\n" - let help .= "\" ". g:NERDTreeMapOpenInTab.": open in new tab\n" - let help .= "\" ". g:NERDTreeMapOpenInTabSilent .": open in new tab silently\n" - let help .= "\" ". g:NERDTreeMapCustomOpen .": custom open\n" - let help .= "\" ". g:NERDTreeMapDeleteBookmark .": delete bookmark\n" + let help .= '" '. g:NERDTreeMapActivateNode .": open bookmark\n" + let help .= '" '. g:NERDTreeMapPreview .": preview file\n" + let help .= '" '. g:NERDTreeMapPreview .": find dir in tree\n" + let help .= '" '. g:NERDTreeMapOpenInTab.": open in new tab\n" + let help .= '" '. g:NERDTreeMapOpenInTabSilent .": open in new tab silently\n" + let help .= '" '. g:NERDTreeMapCustomOpen .": custom open\n" + let help .= '" '. g:NERDTreeMapDeleteBookmark .": delete bookmark\n" let help .= "\"\n\" ----------------------------\n" let help .= "\" Tree navigation mappings~\n" - let help .= "\" ". g:NERDTreeMapJumpRoot .": go to root\n" - let help .= "\" ". g:NERDTreeMapJumpParent .": go to parent\n" - let help .= "\" ". g:NERDTreeMapJumpFirstChild .": go to first child\n" - let help .= "\" ". g:NERDTreeMapJumpLastChild .": go to last child\n" - let help .= "\" ". g:NERDTreeMapJumpNextSibling .": go to next sibling\n" - let help .= "\" ". g:NERDTreeMapJumpPrevSibling .": go to prev sibling\n" + let help .= '" '. g:NERDTreeMapJumpRoot .": go to root\n" + let help .= '" '. g:NERDTreeMapJumpParent .": go to parent\n" + let help .= '" '. g:NERDTreeMapJumpFirstChild .": go to first child\n" + let help .= '" '. g:NERDTreeMapJumpLastChild .": go to last child\n" + let help .= '" '. g:NERDTreeMapJumpNextSibling .": go to next sibling\n" + let help .= '" '. g:NERDTreeMapJumpPrevSibling .": go to prev sibling\n" let help .= "\"\n\" ----------------------------\n" let help .= "\" Filesystem mappings~\n" - let help .= "\" ". g:NERDTreeMapChangeRoot .": change tree root to the\n" + let help .= '" '. g:NERDTreeMapChangeRoot .": change tree root to the\n" let help .= "\" selected dir\n" - let help .= "\" ". g:NERDTreeMapUpdir .": move tree root up a dir\n" - let help .= "\" ". g:NERDTreeMapUpdirKeepOpen .": move tree root up a dir\n" + let help .= '" '. g:NERDTreeMapUpdir .": move tree root up a dir\n" + let help .= '" '. g:NERDTreeMapUpdirKeepOpen .": move tree root up a dir\n" let help .= "\" but leave old root open\n" - let help .= "\" ". g:NERDTreeMapRefresh .": refresh cursor dir\n" - let help .= "\" ". g:NERDTreeMapRefreshRoot .": refresh current root\n" - let help .= "\" ". g:NERDTreeMapMenu .": Show menu\n" - let help .= "\" ". g:NERDTreeMapChdir .":change the CWD to the\n" + let help .= '" '. g:NERDTreeMapRefresh .": refresh cursor dir\n" + let help .= '" '. g:NERDTreeMapRefreshRoot .": refresh current root\n" + let help .= '" '. g:NERDTreeMapMenu .": Show menu\n" + let help .= '" '. g:NERDTreeMapChdir .":change the CWD to the\n" let help .= "\" selected dir\n" - let help .= "\" ". g:NERDTreeMapCWD .":change tree root to CWD\n" + let help .= '" '. g:NERDTreeMapCWD .":change tree root to CWD\n" let help .= "\"\n\" ----------------------------\n" let help .= "\" Tree filtering mappings~\n" - let help .= "\" ". g:NERDTreeMapToggleHidden .": hidden files (" . (self.getShowHidden() ? "on" : "off") . ")\n" - let help .= "\" ". g:NERDTreeMapToggleFilters .": file filters (" . (self.isIgnoreFilterEnabled() ? "on" : "off") . ")\n" - let help .= "\" ". g:NERDTreeMapToggleFiles .": files (" . (self.getShowFiles() ? "on" : "off") . ")\n" - let help .= "\" ". g:NERDTreeMapToggleBookmarks .": bookmarks (" . (self.getShowBookmarks() ? "on" : "off") . ")\n" + let help .= '" '. g:NERDTreeMapToggleHidden .': hidden files (' . (self.getShowHidden() ? 'on' : 'off') . ")\n" + let help .= '" '. g:NERDTreeMapToggleFilters .': file filters (' . (self.isIgnoreFilterEnabled() ? 'on' : 'off') . ")\n" + let help .= '" '. g:NERDTreeMapToggleFiles .': files (' . (self.getShowFiles() ? 'on' : 'off') . ")\n" + let help .= '" '. g:NERDTreeMapToggleBookmarks .': bookmarks (' . (self.getShowBookmarks() ? 'on' : 'off') . ")\n" " add quickhelp entries for each custom key map let help .= "\"\n\" ----------------------------\n" let help .= "\" Custom mappings~\n" for i in g:NERDTreeKeyMap.All() if !empty(i.quickhelpText) - let help .= "\" ". i.key .": ". i.quickhelpText ."\n" + let help .= '" '. i.key .': '. i.quickhelpText ."\n" endif endfor let help .= "\"\n\" ----------------------------\n" let help .= "\" Other mappings~\n" - let help .= "\" ". g:NERDTreeMapQuit .": Close the NERDTree window\n" - let help .= "\" ". g:NERDTreeMapToggleZoom .": Zoom (maximize-minimize)\n" + let help .= '" '. g:NERDTreeMapQuit .": Close the NERDTree window\n" + let help .= '" '. g:NERDTreeMapToggleZoom .": Zoom (maximize-minimize)\n" let help .= "\" the NERDTree window\n" - let help .= "\" ". g:NERDTreeMapHelp .": toggle help\n" + let help .= '" '. g:NERDTreeMapHelp .": toggle help\n" let help .= "\"\n\" ----------------------------\n" let help .= "\" Bookmark commands~\n" let help .= "\" :Bookmark []\n" @@ -128,7 +128,7 @@ function! s:UI._dumpHelp() let help .= "\" :EditBookmarks\n" silent! put =help elseif !self.isMinimal() - let help ="\" Press ". g:NERDTreeMapHelp ." for help\n" + let help ='" Press '. g:NERDTreeMapHelp ." for help\n" silent! put =help endif endfunction @@ -148,8 +148,8 @@ function! s:UI.New(nerdtree) endfunction " FUNCTION: s:UI.getPath(ln) {{{1 -" Return the "Path" object for the node that is rendered on the given line -" number. If the "up a dir" line is selected, return the "Path" object for +" Return the Path object for the node that is rendered on the given line +" number. If the 'up a dir' line is selected, return the Path object for " the parent of the root. Return the empty dictionary if the given line " does not reference a tree node. function! s:UI.getPath(ln) @@ -157,7 +157,7 @@ function! s:UI.getPath(ln) let rootLine = self.getRootLineNum() - if a:ln == rootLine + if a:ln ==# rootLine return self.nerdtree.root.path endif @@ -174,7 +174,7 @@ function! s:UI.getPath(ln) " remove the tree parts and the leading space let curFile = self._stripMarkup(line) - let dir = "" + let dir = '' let lnum = a:ln while lnum > 0 let lnum = lnum - 1 @@ -182,7 +182,7 @@ function! s:UI.getPath(ln) let curLineStripped = self._stripMarkup(curLine) " have we reached the top of the tree? - if lnum == rootLine + if lnum ==# rootLine let dir = self.nerdtree.root.path.str({'format': 'UI'}) . dir break endif @@ -191,7 +191,7 @@ function! s:UI.getPath(ln) if lpindent < indent let indent = indent - 1 - let dir = substitute (curLineStripped,'^\\', "", "") . dir + let dir = substitute (curLineStripped,'^\\', '', '') . dir continue endif endif @@ -219,17 +219,17 @@ function! s:UI.getLineNum(node) let l:currentLine = getline(l:lineNumber) let l:indentLevel = self._indentLevelFor(l:currentLine) - if l:indentLevel != l:currentPathComponent + if l:indentLevel !=# l:currentPathComponent continue endif let l:currentLine = self._stripMarkup(l:currentLine) let l:currentPath = join(l:pathComponents, '/') . '/' . l:currentLine - " Directories: If the current path "starts with" the full path, then + " Directories: If the current path 'starts with' the full path, then " either the paths are equal or the line is a cascade containing the " full path. - if l:fullPath[-1:] == '/' && stridx(l:currentPath, l:fullPath) == 0 + if l:fullPath[-1:] ==# '/' && stridx(l:currentPath, l:fullPath) ==# 0 return l:lineNumber endif @@ -240,7 +240,7 @@ function! s:UI.getLineNum(node) " Otherwise: If the full path starts with the current path and the " current path is a directory, we add a new path component. - if stridx(l:fullPath, l:currentPath) == 0 && l:currentPath[-1:] == '/' + if stridx(l:fullPath, l:currentPath) ==# 0 && l:currentPath[-1:] ==# '/' let l:currentLine = substitute(l:currentLine, '/\s*$', '', '') call add(l:pathComponents, l:currentLine) let l:currentPathComponent += 1 @@ -296,7 +296,7 @@ endfunction " FUNCTION: s:UI.isIgnoreFilterEnabled() {{{1 function! s:UI.isIgnoreFilterEnabled() - return self._ignoreEnabled == 1 + return self._ignoreEnabled ==# 1 endfunction " FUNCTION: s:UI.isMinimal() {{{1 @@ -313,21 +313,21 @@ endfunction function! s:UI._renderBookmarks() if !self.isMinimal() - call setline(line(".")+1, ">----------Bookmarks----------") - call cursor(line(".")+1, col(".")) + call setline(line('.')+1, '>----------Bookmarks----------') + call cursor(line('.')+1, col('.')) endif - if g:NERDTreeBookmarksSort == 1 || g:NERDTreeBookmarksSort == 2 + if g:NERDTreeBookmarksSort ==# 1 || g:NERDTreeBookmarksSort ==# 2 call g:NERDTreeBookmark.SortBookmarksList() endif for i in g:NERDTreeBookmark.Bookmarks() - call setline(line(".")+1, i.str()) - call cursor(line(".")+1, col(".")) + call setline(line('.')+1, i.str()) + call cursor(line('.')+1, col('.')) endfor - call setline(line(".")+1, '') - call cursor(line(".")+1, col(".")) + call setline(line('.')+1, '') + call cursor(line('.')+1, col('.')) endfunction " FUNCTION: s:UI.restoreScreenState() {{{1 @@ -340,13 +340,13 @@ function! s:UI.restoreScreenState() if !has_key(self, '_screenState') return endif - call nerdtree#exec("silent vertical resize " . self._screenState['oldWindowSize'], 1) + call nerdtree#exec('silent vertical resize ' . self._screenState['oldWindowSize'], 1) let old_scrolloff=&scrolloff let &scrolloff=0 call cursor(self._screenState['oldTopLine'], 0) normal! zt - call setpos(".", self._screenState['oldPos']) + call setpos('.', self._screenState['oldPos']) let &scrolloff=old_scrolloff endfunction @@ -358,10 +358,10 @@ function! s:UI.saveScreenState() let self._screenState = {} try call g:NERDTree.CursorToTreeWin() - let self._screenState['oldPos'] = getpos(".") - let self._screenState['oldTopLine'] = line("w0") - let self._screenState['oldWindowSize']= winwidth("") - call nerdtree#exec(win . "wincmd w", 1) + let self._screenState['oldPos'] = getpos('.') + let self._screenState['oldTopLine'] = line('w0') + let self._screenState['oldWindowSize']= winwidth('') + call nerdtree#exec(win . 'wincmd w', 1) catch endtry endfunction @@ -387,9 +387,9 @@ function! s:UI.render() " remember the top line of the buffer and the current line so we can " restore the view exactly how it was - let curLine = line(".") - let curCol = col(".") - let topLine = line("w0") + let curLine = line('.') + let curCol = col('.') + let topLine = line('w0') " delete all lines in the buffer (being careful not to clobber a register) silent 1,$delete _ @@ -398,8 +398,8 @@ function! s:UI.render() " delete the blank line before the help and add one after it if !self.isMinimal() - call setline(line(".")+1, "") - call cursor(line(".")+1, col(".")) + call setline(line('.')+1, '') + call cursor(line('.')+1, col('.')) endif if self.getShowBookmarks() @@ -408,14 +408,14 @@ function! s:UI.render() " add the 'up a dir' line if !self.isMinimal() - call setline(line(".")+1, s:UI.UpDirLine()) - call cursor(line(".")+1, col(".")) + call setline(line('.')+1, s:UI.UpDirLine()) + call cursor(line('.')+1, col('.')) endif " draw the header line let header = self.nerdtree.root.path.str({'format': 'UI', 'truncateTo': winwidth(0)}) - call setline(line(".")+1, header) - call cursor(line(".")+1, col(".")) + call setline(line('.')+1, header) + call cursor(line('.')+1, col('.')) " draw the tree silent put =self.nerdtree.root.renderToString() @@ -443,13 +443,13 @@ function! s:UI.renderViewSavingPosition() " go up the tree till we find a node that will be visible or till we run " out of nodes - while currentNode != {} && !currentNode.isVisible() && !currentNode.isRoot() + while currentNode !=# {} && !currentNode.isVisible() && !currentNode.isRoot() let currentNode = currentNode.parent endwhile call self.render() - if currentNode != {} + if currentNode !=# {} call currentNode.putCursorHere(0, 0) endif endfunction @@ -507,12 +507,12 @@ endfunction " FUNCTION: s:UI.toggleZoom() {{{1 " zoom (maximize/minimize) the NERDTree window function! s:UI.toggleZoom() - if exists("b:NERDTreeZoomed") && b:NERDTreeZoomed - let size = exists("b:NERDTreeOldWindowSize") ? b:NERDTreeOldWindowSize : g:NERDTreeWinSize - call nerdtree#exec("silent vertical resize ". size, 1) + if exists('b:NERDTreeZoomed') && b:NERDTreeZoomed + let size = exists('b:NERDTreeOldWindowSize') ? b:NERDTreeOldWindowSize : g:NERDTreeWinSize + call nerdtree#exec('silent vertical resize '. size, 1) let b:NERDTreeZoomed = 0 else - call nerdtree#exec("vertical resize ". get(g:, 'NERDTreeWinSizeMax', ''), 1) + call nerdtree#exec('vertical resize '. get(g:, 'NERDTreeWinSizeMax', ''), 1) let b:NERDTreeZoomed = 1 endif endfunction diff --git a/sources_non_forked/nerdtree/nerdtree_plugin/exec_menuitem.vim b/sources_non_forked/nerdtree/nerdtree_plugin/exec_menuitem.vim index c53650a5..fb6c4862 100644 --- a/sources_non_forked/nerdtree/nerdtree_plugin/exec_menuitem.vim +++ b/sources_non_forked/nerdtree/nerdtree_plugin/exec_menuitem.vim @@ -9,7 +9,7 @@ " See http://sam.zoy.org/wtfpl/COPYING for more details. " " ============================================================================ -if exists("g:loaded_nerdtree_exec_menuitem") +if exists('g:loaded_nerdtree_exec_menuitem') finish endif let g:loaded_nerdtree_exec_menuitem = 1 @@ -32,9 +32,9 @@ function! NERDTreeExecFile() let cmd = treenode.path.str({'escape': 1}) let cmd = input(':!', cmd . ' ') - if cmd != '' + if cmd !=# '' exec ':!' . cmd else - echo "Aborted" + echo 'Aborted' endif endfunction diff --git a/sources_non_forked/nerdtree/nerdtree_plugin/fs_menu.vim b/sources_non_forked/nerdtree/nerdtree_plugin/fs_menu.vim index 4167df00..3ecfa816 100644 --- a/sources_non_forked/nerdtree/nerdtree_plugin/fs_menu.vim +++ b/sources_non_forked/nerdtree/nerdtree_plugin/fs_menu.vim @@ -9,13 +9,13 @@ " See http://sam.zoy.org/wtfpl/COPYING for more details. " " ============================================================================ -if exists("g:loaded_nerdtree_fs_menu") +if exists('g:loaded_nerdtree_fs_menu') finish endif let g:loaded_nerdtree_fs_menu = 1 "Automatically delete the buffer after deleting or renaming a file -if !exists("g:NERDTreeAutoDeleteBuffer") +if !exists('g:NERDTreeAutoDeleteBuffer') let g:NERDTreeAutoDeleteBuffer = 0 endif @@ -23,13 +23,13 @@ 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") || has("mac") +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'}) endif -if executable("xdg-open") +if executable('xdg-open') call NERDTreeAddMenuItem({'text': '(r)eveal the current node in file manager', 'shortcut': 'r', 'callback': 'NERDTreeRevealFileLinux'}) call NERDTreeAddMenuItem({'text': '(o)pen the current node with system editor', 'shortcut': 'o', 'callback': 'NERDTreeExecuteFileLinux'}) endif @@ -37,9 +37,9 @@ endif if g:NERDTreePath.CopyingSupported() call NERDTreeAddMenuItem({'text': '(c)opy the current node', 'shortcut': 'c', 'callback': 'NERDTreeCopyNode'}) endif -call NERDTreeAddMenuItem({'text': (has("clipboard")?'copy (p)ath to clipboard':'print (p)ath to screen'), 'shortcut': 'p', 'callback': 'NERDTreeCopyPath'}) +call NERDTreeAddMenuItem({'text': (has('clipboard')?'copy (p)ath to clipboard':'print (p)ath to screen'), 'shortcut': 'p', 'callback': 'NERDTreeCopyPath'}) -if has("unix") || has("osx") +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'}) @@ -51,37 +51,37 @@ endif "Args: "action: the action that is being performed, e.g. 'delete' function! s:inputPrompt(action) - if a:action == "add" - let title = "Add a childnode" + if a:action ==# 'add' + let title = 'Add a childnode' let info = "Enter the dir/file name to be created. Dirs end with a '/'" - let minimal = "Add node:" + let minimal = 'Add node:' - elseif a:action == "copy" - let title = "Copy the current node" - let info = "Enter the new path to copy the node to:" - let minimal = "Copy to:" + elseif a:action ==# 'copy' + let title = 'Copy the current node' + let info = 'Enter the new path to copy the node to:' + let minimal = 'Copy to:' - elseif a:action == "delete" - let title = "Delete the current node" - let info = "Are you sure you wish to delete the node:" - let minimal = "Delete?" + elseif a:action ==# 'delete' + let title = 'Delete the current node' + let info = 'Are you sure you wish to delete the node:' + let minimal = 'Delete?' - elseif a:action == "deleteNonEmpty" - let title = "Delete the current node" + elseif a:action ==# 'deleteNonEmpty' + let title = 'Delete the current node' let info = "STOP! Directory is not empty! To delete, type 'yes'" - let minimal = "Delete directory?" + let minimal = 'Delete directory?' - elseif a:action == "move" - let title = "Rename the current node" - let info = "Enter the new path for the node:" - let minimal = "Move to:" + elseif a:action ==# 'move' + let title = 'Rename the current node' + let info = 'Enter the new path for the node:' + let minimal = 'Move to:' endif if g:NERDTreeMenuController.isMinimal() redraw! " Clear the menu - return minimal . " " + return minimal . ' ' else - let divider = "==========================================================" + let divider = '==========================================================' return title . "\n" . divider . "\n" . info . "\n" end endfunction @@ -114,14 +114,14 @@ function! s:promptToDelBuffer(bufnum, msg) let l:listedBufferCount = 0 endif if l:listedBufferCount > 1 - call nerdtree#exec("tabdo windo if winbufnr(0) == " . a:bufnum . " | exec ':bnext! ' | endif", 1) + call nerdtree#exec('tabdo windo if winbufnr(0) ==# ' . a:bufnum . " | exec ':bnext! ' | endif", 1) else - call nerdtree#exec("tabdo windo if winbufnr(0) == " . a:bufnum . " | exec ':enew! ' | endif", 1) + call nerdtree#exec('tabdo windo if winbufnr(0) ==# ' . a:bufnum . " | exec ':enew! ' | endif", 1) endif - call nerdtree#exec("tabnext " . s:originalTabNumber, 1) - call nerdtree#exec(s:originalWindowNumber . "wincmd w", 1) + call nerdtree#exec('tabnext ' . s:originalTabNumber, 1) + call nerdtree#exec(s:originalWindowNumber . 'wincmd w', 1) " 3. We don't need a previous buffer anymore - call nerdtree#exec("bwipeout! " . a:bufnum, 0) + call nerdtree#exec('bwipeout! ' . a:bufnum, 0) endif endfunction @@ -141,17 +141,17 @@ function! s:renameBuffer(bufNum, newNodeName, isDirectory) let editStr = g:NERDTreePath.New(a:newNodeName).str({'format': 'Edit'}) endif " 1. ensure that a new buffer is loaded - call nerdtree#exec("badd " . quotedFileName, 1) + call nerdtree#exec('badd ' . quotedFileName, 1) " 2. ensure that all windows which display the just deleted filename " display a buffer for a new filename. let s:originalTabNumber = tabpagenr() let s:originalWindowNumber = winnr() - call nerdtree#exec("tabdo windo if winbufnr(0) == " . a:bufNum . " | exec ':e! " . editStr . "' | endif", 1) - call nerdtree#exec("tabnext " . s:originalTabNumber, 1) - call nerdtree#exec(s:originalWindowNumber . "wincmd w", 1) + call nerdtree#exec('tabdo windo if winbufnr(0) ==# ' . a:bufNum . " | exec ':e! " . editStr . "' | endif", 1) + call nerdtree#exec('tabnext ' . s:originalTabNumber, 1) + call nerdtree#exec(s:originalWindowNumber . 'wincmd w', 1) " 3. We don't need a previous buffer anymore try - call nerdtree#exec("confirm bwipeout " . a:bufNum, 0) + call nerdtree#exec('confirm bwipeout ' . a:bufNum, 0) catch " This happens when answering Cancel if confirmation is needed. Do nothing. endtry @@ -160,11 +160,11 @@ endfunction "FUNCTION: NERDTreeAddNode(){{{1 function! NERDTreeAddNode() let curDirNode = g:NERDTreeDirNode.GetSelected() - let prompt = s:inputPrompt("add") - let newNodeName = input(prompt, curDirNode.path.str() . g:NERDTreePath.Slash(), "file") + let prompt = s:inputPrompt('add') + let newNodeName = input(prompt, curDirNode.path.str() . g:NERDTreePath.Slash(), 'file') if newNodeName ==# '' - call nerdtree#echo("Node Creation Aborted.") + call nerdtree#echo('Node Creation Aborted.') return endif @@ -187,26 +187,26 @@ function! NERDTreeAddNode() redraw! catch /^NERDTree/ - call nerdtree#echoWarning("Node Not Created.") + call nerdtree#echoWarning('Node Not Created.') endtry endfunction "FUNCTION: NERDTreeMoveNode(){{{1 function! NERDTreeMoveNode() let curNode = g:NERDTreeFileNode.GetSelected() - let prompt = s:inputPrompt("move") - let newNodePath = input(prompt, curNode.path.str(), "file") + let prompt = s:inputPrompt('move') + let newNodePath = input(prompt, curNode.path.str(), 'file') if newNodePath ==# '' - call nerdtree#echo("Node Renaming Aborted.") + call nerdtree#echo('Node Renaming Aborted.') return endif try if curNode.path.isDirectory - let l:openBuffers = filter(range(1,bufnr("$")),'bufexists(v:val) && fnamemodify(bufname(v:val),":p") =~# curNode.path.str() . "/.*"') + let l:openBuffers = filter(range(1,bufnr('$')),'bufexists(v:val) && fnamemodify(bufname(v:val),":p") =~# curNode.path.str() . "/.*"') else - let l:openBuffers = filter(range(1,bufnr("$")),'bufexists(v:val) && fnamemodify(bufname(v:val),":p") ==# curNode.path.str()') + let l:openBuffers = filter(range(1,bufnr('$')),'bufexists(v:val) && fnamemodify(bufname(v:val),":p") ==# curNode.path.str()') endif call curNode.rename(newNodePath) @@ -221,9 +221,9 @@ function! NERDTreeMoveNode() " renamed files. if !empty(l:openBuffers) if curNode.path.isDirectory - echo "\nDirectory renamed.\n\nFiles with the old directory name are open in buffers " . join(l:openBuffers, ', ') . ". Replace these buffers with the new files? (yN)" + echo "\nDirectory renamed.\n\nFiles with the old directory name are open in buffers " . join(l:openBuffers, ', ') . '. Replace these buffers with the new files? (yN)' else - echo "\nFile renamed.\n\nThe old file is open in buffer " . l:openBuffers[0] . ". Replace this buffer with the new file? (yN)" + echo "\nFile renamed.\n\nThe old file is open in buffer " . l:openBuffers[0] . '. Replace this buffer with the new file? (yN)' endif if g:NERDTreeAutoDeleteBuffer || nr2char(getchar()) ==# 'y' for bufNum in l:openBuffers @@ -236,7 +236,7 @@ function! NERDTreeMoveNode() redraw! catch /^NERDTree/ - call nerdtree#echoWarning("Node Not Renamed.") + call nerdtree#echoWarning('Node Not Renamed.') endtry endfunction @@ -249,11 +249,11 @@ function! NERDTreeDeleteNode() if currentNode.path.isDirectory && ((currentNode.isOpen && currentNode.getChildCount() > 0) || \ (len(currentNode._glob('*', 1)) > 0)) - let prompt = s:inputPrompt("deleteNonEmpty") . currentNode.path.str() . ": " + let prompt = s:inputPrompt('deleteNonEmpty') . currentNode.path.str() . ': ' let choice = input(prompt) let confirmed = choice ==# 'yes' else - let prompt = s:inputPrompt("delete") . currentNode.path.str() . " (yN): " + let prompt = s:inputPrompt('delete') . currentNode.path.str() . ' (yN): ' echo prompt let choice = nr2char(getchar()) let confirmed = choice ==# 'y' @@ -266,18 +266,18 @@ function! NERDTreeDeleteNode() "if the node is open in a buffer, ask the user if they want to "close that buffer - let bufnum = bufnr("^".currentNode.path.str()."$") + let bufnum = bufnr('^'.currentNode.path.str().'$') if buflisted(bufnum) - let prompt = "\nNode deleted.\n\nThe file is open in buffer ". bufnum . (bufwinnr(bufnum) ==# -1 ? " (hidden)" : "") .". Delete this buffer? (yN)" + let prompt = "\nNode deleted.\n\nThe file is open in buffer ". bufnum . (bufwinnr(bufnum) ==# -1 ? ' (hidden)' : '') .'. Delete this buffer? (yN)' call s:promptToDelBuffer(bufnum, prompt) endif redraw! catch /^NERDTree/ - call nerdtree#echoWarning("Could not remove node") + call nerdtree#echoWarning('Could not remove node') endtry else - call nerdtree#echo("delete aborted") + call nerdtree#echo('delete aborted') endif let &shellslash = l:shellslash endfunction @@ -286,10 +286,10 @@ endfunction function! NERDTreeListNode() let treenode = g:NERDTreeFileNode.GetSelected() if !empty(treenode) - let s:uname = system("uname") + let s:uname = system('uname') let stat_cmd = 'stat -c "%s" ' - if s:uname =~? "Darwin" + if s:uname =~? 'Darwin' let stat_cmd = 'stat -f "%z" ' endif @@ -300,7 +300,7 @@ function! NERDTreeListNode() let metadata = split(system(cmd),'\n') call nerdtree#echo(metadata[0]) else - call nerdtree#echo("No information available") + call nerdtree#echo('No information available') endif endfunction @@ -310,10 +310,10 @@ function! NERDTreeListNodeWin32() if !empty(l:node) let l:path = l:node.path.str() - call nerdtree#echo(printf("%s:%s MOD:%s BYTES:%d PERMISSIONS:%s", + call nerdtree#echo(printf('%s:%s MOD:%s BYTES:%d PERMISSIONS:%s', \ toupper(getftype(l:path)), \ fnamemodify(l:path, ':t'), - \ strftime("%c", getftime(l:path)), + \ strftime('%c', getftime(l:path)), \ getfsize(l:path), \ getfperm(l:path))) return @@ -327,16 +327,16 @@ function! NERDTreeCopyNode() let l:shellslash = &shellslash let &shellslash = 0 let currentNode = g:NERDTreeFileNode.GetSelected() - let prompt = s:inputPrompt("copy") - let newNodePath = input(prompt, currentNode.path.str(), "file") + let prompt = s:inputPrompt('copy') + let newNodePath = input(prompt, currentNode.path.str(), 'file') - if newNodePath != "" + if newNodePath !=# '' "strip trailing slash let newNodePath = substitute(newNodePath, '\/$', '', '') let confirmed = 1 if currentNode.path.copyingWillOverwrite(newNodePath) - call nerdtree#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 @@ -355,11 +355,11 @@ function! NERDTreeCopyNode() call newNode.putCursorHere(0, 0) endif catch /^NERDTree/ - call nerdtree#echoWarning("Could not copy node") + call nerdtree#echoWarning('Could not copy node') endtry endif else - call nerdtree#echo("Copy aborted.") + call nerdtree#echo('Copy aborted.') endif let &shellslash = l:shellslash redraw! @@ -368,22 +368,22 @@ endfunction " FUNCTION: NERDTreeCopyPath() {{{1 function! NERDTreeCopyPath() let l:nodePath = g:NERDTreeFileNode.GetSelected().path.str() - if has("clipboard") - if &clipboard == "unnamedplus" + if has('clipboard') + if &clipboard ==# 'unnamedplus' let @+ = l:nodePath else let @* = l:nodePath endif - call nerdtree#echo("The path [" . l:nodePath . "] was copied to your clipboard.") + call nerdtree#echo('The path [' . l:nodePath . '] was copied to your clipboard.') else - call nerdtree#echo("The full path is: " . l:nodePath) + call nerdtree#echo('The full path is: ' . l:nodePath) endif endfunction " FUNCTION: NERDTreeQuickLook() {{{1 function! NERDTreeQuickLook() let treenode = g:NERDTreeFileNode.GetSelected() - if treenode != {} + if treenode !=# {} call system("qlmanage -p 2>/dev/null '" . treenode.path.str() . "'") endif endfunction @@ -391,7 +391,7 @@ endfunction " FUNCTION: NERDTreeRevealInFinder() {{{1 function! NERDTreeRevealInFinder() let treenode = g:NERDTreeFileNode.GetSelected() - if treenode != {} + if treenode !=# {} call system("open -R '" . treenode.path.str() . "'") endif endfunction @@ -399,7 +399,7 @@ endfunction " FUNCTION: NERDTreeExecuteFile() {{{1 function! NERDTreeExecuteFile() let treenode = g:NERDTreeFileNode.GetSelected() - if treenode != {} + if treenode !=# {} call system("open '" . treenode.path.str() . "'") endif endfunction @@ -408,7 +408,7 @@ endfunction function! NERDTreeRevealFileLinux() let treenode = g:NERDTreeFileNode.GetSelected() let parentnode = treenode.parent - if parentnode != {} + if parentnode !=# {} call system("xdg-open '" . parentnode.path.str() . "' &") endif endfunction @@ -416,7 +416,7 @@ endfunction " FUNCTION: NERDTreeExecuteFileLinux() {{{1 function! NERDTreeExecuteFileLinux() let treenode = g:NERDTreeFileNode.GetSelected() - if treenode != {} + if treenode !=# {} call system("xdg-open '" . treenode.path.str() . "' &") endif endfunction diff --git a/sources_non_forked/nerdtree/nerdtree_plugin/vcs.vim b/sources_non_forked/nerdtree/nerdtree_plugin/vcs.vim index d9901b83..36d5427e 100644 --- a/sources_non_forked/nerdtree/nerdtree_plugin/vcs.vim +++ b/sources_non_forked/nerdtree/nerdtree_plugin/vcs.vim @@ -17,7 +17,7 @@ command! -n=? -complete=dir -bar NERDTreeToggleVCS :call ToggleTabTreeVCS(' function! s:CreateTabTreeVCS(name) let l:path = g:NERDTreeCreator._pathForString(a:name) let l:path = s:FindParentVCSRoot(l:path) - call g:NERDTreeCreator.createTabTree(empty(l:path) ? "" : l:path._str()) + call g:NERDTreeCreator.createTabTree(empty(l:path) ? '' : l:path._str()) endfunction " FUNCTION: s:ToggleTabTreeVCS(a:name) {{{1 @@ -25,7 +25,7 @@ endfunction function! s:ToggleTabTreeVCS(name) let l:path = g:NERDTreeCreator._pathForString(a:name) let l:path = s:FindParentVCSRoot(l:path) - call g:NERDTreeCreator.toggleTabTree(empty(l:path) ? "" : l:path._str()) + call g:NERDTreeCreator.toggleTabTree(empty(l:path) ? '' : l:path._str()) endfunction " FUNCTION: s:FindParentVCSRoot(a:path) {{{1 @@ -34,7 +34,7 @@ endfunction function! s:FindParentVCSRoot(path) let l:path = a:path while !empty(l:path) && - \ l:path._str() !~ '^\(\a:\\\|\/\)$' && + \ l:path._str() !~# '^\(\a:\\\|\/\)$' && \ !isdirectory(l:path._str() . '/.git') && \ !isdirectory(l:path._str() . '/.svn') && \ !isdirectory(l:path._str() . '/.hg') && @@ -42,6 +42,6 @@ function! s:FindParentVCSRoot(path) \ !isdirectory(l:path._str() . '/_darcs') let l:path = l:path.getParent() endwhile - return (empty(l:path) || l:path._str() =~ '^\(\a:\\\|\/\)$') ? a:path : l:path + return (empty(l:path) || l:path._str() =~# '^\(\a:\\\|\/\)$') ? a:path : l:path endfunction diff --git a/sources_non_forked/nerdtree/plugin/NERD_tree.vim b/sources_non_forked/nerdtree/plugin/NERD_tree.vim index 5faebaaf..639f87bb 100644 --- a/sources_non_forked/nerdtree/plugin/NERD_tree.vim +++ b/sources_non_forked/nerdtree/plugin/NERD_tree.vim @@ -11,7 +11,9 @@ " " SECTION: Script init stuff {{{1 "============================================================ -if exists("loaded_nerd_tree") +scriptencoding utf-8 + +if exists('loaded_nerd_tree') finish endif if v:version < 703 @@ -20,9 +22,9 @@ if v:version < 703 endif let loaded_nerd_tree = 1 -"for line continuation - i.e dont want C in &cpo -let s:old_cpo = &cpo -set cpo&vim +"for line continuation - i.e dont want C in &cpoptions +let s:old_cpo = &cpoptions +set cpoptions&vim "Function: s:initVariable() function {{{2 "This function is used to initialise a given variable to a given value. The @@ -36,65 +38,65 @@ set cpo&vim "1 if the var is set, 0 otherwise function! s:initVariable(var, value) if !exists(a:var) - exec 'let ' . a:var . ' = ' . "'" . substitute(a:value, "'", "''", "g") . "'" + exec 'let ' . a:var . ' = ' . "'" . substitute(a:value, "'", "''", 'g') . "'" return 1 endif return 0 endfunction "SECTION: Init variable calls and other random constants {{{2 -call s:initVariable("g:NERDTreeAutoCenter", 1) -call s:initVariable("g:NERDTreeAutoCenterThreshold", 3) -call s:initVariable("g:NERDTreeCaseSensitiveSort", 0) -call s:initVariable("g:NERDTreeNaturalSort", 0) -call s:initVariable("g:NERDTreeSortHiddenFirst", 1) -call s:initVariable("g:NERDTreeUseTCD", 0) -call s:initVariable("g:NERDTreeChDirMode", 0) -call s:initVariable("g:NERDTreeCreatePrefix", "silent") -call s:initVariable("g:NERDTreeMinimalUI", 0) -call s:initVariable("g:NERDTreeMinimalMenu", 0) -if !exists("g:NERDTreeIgnore") +call s:initVariable('g:NERDTreeAutoCenter', 1) +call s:initVariable('g:NERDTreeAutoCenterThreshold', 3) +call s:initVariable('g:NERDTreeCaseSensitiveSort', 0) +call s:initVariable('g:NERDTreeNaturalSort', 0) +call s:initVariable('g:NERDTreeSortHiddenFirst', 1) +call s:initVariable('g:NERDTreeUseTCD', 0) +call s:initVariable('g:NERDTreeChDirMode', 0) +call s:initVariable('g:NERDTreeCreatePrefix', 'silent') +call s:initVariable('g:NERDTreeMinimalUI', 0) +call s:initVariable('g:NERDTreeMinimalMenu', 0) +if !exists('g:NERDTreeIgnore') let g:NERDTreeIgnore = ['\~$'] endif -call s:initVariable("g:NERDTreeBookmarksFile", expand('$HOME') . '/.NERDTreeBookmarks') -call s:initVariable("g:NERDTreeBookmarksSort", 1) -call s:initVariable("g:NERDTreeHighlightCursorline", 1) -call s:initVariable("g:NERDTreeHijackNetrw", 1) +call s:initVariable('g:NERDTreeBookmarksFile', expand('$HOME') . '/.NERDTreeBookmarks') +call s:initVariable('g:NERDTreeBookmarksSort', 1) +call s:initVariable('g:NERDTreeHighlightCursorline', 1) +call s:initVariable('g:NERDTreeHijackNetrw', 1) call s:initVariable('g:NERDTreeMarkBookmarks', 1) -call s:initVariable("g:NERDTreeMouseMode", 1) -call s:initVariable("g:NERDTreeNotificationThreshold", 100) -call s:initVariable("g:NERDTreeQuitOnOpen", 0) -call s:initVariable("g:NERDTreeRespectWildIgnore", 0) -call s:initVariable("g:NERDTreeShowBookmarks", 0) -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:NERDTreeMouseMode', 1) +call s:initVariable('g:NERDTreeNotificationThreshold', 100) +call s:initVariable('g:NERDTreeQuitOnOpen', 0) +call s:initVariable('g:NERDTreeRespectWildIgnore', 0) +call s:initVariable('g:NERDTreeShowBookmarks', 0) +call s:initVariable('g:NERDTreeShowFiles', 1) +call s:initVariable('g:NERDTreeShowHidden', 0) +call s:initVariable('g:NERDTreeShowLineNumbers', 0) +call s:initVariable('g:NERDTreeSortDirs', 1) if !nerdtree#runningWindows() && !nerdtree#runningCygwin() - call s:initVariable("g:NERDTreeDirArrowExpandable", "â–¸") - call s:initVariable("g:NERDTreeDirArrowCollapsible", "â–¾") + call s:initVariable('g:NERDTreeDirArrowExpandable', 'â–¸') + call s:initVariable('g:NERDTreeDirArrowCollapsible', 'â–¾') else - call s:initVariable("g:NERDTreeDirArrowExpandable", "+") - call s:initVariable("g:NERDTreeDirArrowCollapsible", "~") + call s:initVariable('g:NERDTreeDirArrowExpandable', '+') + call s:initVariable('g:NERDTreeDirArrowCollapsible', '~') endif -call s:initVariable("g:NERDTreeCascadeOpenSingleChildDir", 1) -call s:initVariable("g:NERDTreeCascadeSingleChildDir", 1) +call s:initVariable('g:NERDTreeCascadeOpenSingleChildDir', 1) +call s:initVariable('g:NERDTreeCascadeSingleChildDir', 1) -if !exists("g:NERDTreeSortOrder") +if !exists('g:NERDTreeSortOrder') let g:NERDTreeSortOrder = ['\/$', '*', '\.swp$', '\.bak$', '\~$'] endif let g:NERDTreeOldSortOrder = [] -call s:initVariable("g:NERDTreeGlyphReadOnly", "RO") +call s:initVariable('g:NERDTreeGlyphReadOnly', 'RO') -if has("conceal") - call s:initVariable("g:NERDTreeNodeDelimiter", "\x07") -elseif (g:NERDTreeDirArrowExpandable == "\u00a0" || g:NERDTreeDirArrowCollapsible == "\u00a0") - call s:initVariable("g:NERDTreeNodeDelimiter", "\u00b7") +if has('conceal') + call s:initVariable('g:NERDTreeNodeDelimiter', "\x07") +elseif (g:NERDTreeDirArrowExpandable ==# "\u00a0" || g:NERDTreeDirArrowCollapsible ==# "\u00a0") + call s:initVariable('g:NERDTreeNodeDelimiter', "\u00b7") else - call s:initVariable("g:NERDTreeNodeDelimiter", "\u00a0") + call s:initVariable('g:NERDTreeNodeDelimiter', "\u00a0") endif if !exists('g:NERDTreeStatusline') @@ -105,60 +107,60 @@ if !exists('g:NERDTreeStatusline') let g:NERDTreeStatusline = "%{exists('b:NERDTree')?b:NERDTree.root.path.str():''}" endif -call s:initVariable("g:NERDTreeWinPos", "left") -call s:initVariable("g:NERDTreeWinSize", 31) +call s:initVariable('g:NERDTreeWinPos', 'left') +call s:initVariable('g:NERDTreeWinSize', 31) "init the shell commands that will be used to copy nodes, and remove dir trees " "Note: the space after the command is important if nerdtree#runningWindows() - call s:initVariable("g:NERDTreeRemoveDirCmd", 'rmdir /s /q ') - call s:initVariable("g:NERDTreeCopyDirCmd", 'xcopy /s /e /i /y /q ') - call s:initVariable("g:NERDTreeCopyFileCmd", 'copy /y ') + call s:initVariable('g:NERDTreeRemoveDirCmd', 'rmdir /s /q ') + call s:initVariable('g:NERDTreeCopyDirCmd', 'xcopy /s /e /i /y /q ') + call s:initVariable('g:NERDTreeCopyFileCmd', 'copy /y ') else - call s:initVariable("g:NERDTreeRemoveDirCmd", 'rm -rf ') - call s:initVariable("g:NERDTreeCopyCmd", 'cp -r ') + call s:initVariable('g:NERDTreeRemoveDirCmd', 'rm -rf ') + call s:initVariable('g:NERDTreeCopyCmd', 'cp -r ') endif "SECTION: Init variable calls for key mappings {{{2 -call s:initVariable("g:NERDTreeMapCustomOpen", "") -call s:initVariable("g:NERDTreeMapActivateNode", "o") -call s:initVariable("g:NERDTreeMapChangeRoot", "C") -call s:initVariable("g:NERDTreeMapChdir", "cd") -call s:initVariable("g:NERDTreeMapCloseChildren", "X") -call s:initVariable("g:NERDTreeMapCloseDir", "x") -call s:initVariable("g:NERDTreeMapDeleteBookmark", "D") -call s:initVariable("g:NERDTreeMapMenu", "m") -call s:initVariable("g:NERDTreeMapHelp", "?") -call s:initVariable("g:NERDTreeMapJumpFirstChild", "K") -call s:initVariable("g:NERDTreeMapJumpLastChild", "J") -call s:initVariable("g:NERDTreeMapJumpNextSibling", "") -call s:initVariable("g:NERDTreeMapJumpParent", "p") -call s:initVariable("g:NERDTreeMapJumpPrevSibling", "") -call s:initVariable("g:NERDTreeMapJumpRoot", "P") -call s:initVariable("g:NERDTreeMapOpenExpl", "e") -call s:initVariable("g:NERDTreeMapOpenInTab", "t") -call s:initVariable("g:NERDTreeMapOpenInTabSilent", "T") -call s:initVariable("g:NERDTreeMapOpenRecursively", "O") -call s:initVariable("g:NERDTreeMapOpenSplit", "i") -call s:initVariable("g:NERDTreeMapOpenVSplit", "s") -call s:initVariable("g:NERDTreeMapPreview", "g" . NERDTreeMapActivateNode) -call s:initVariable("g:NERDTreeMapPreviewSplit", "g" . NERDTreeMapOpenSplit) -call s:initVariable("g:NERDTreeMapPreviewVSplit", "g" . NERDTreeMapOpenVSplit) -call s:initVariable("g:NERDTreeMapQuit", "q") -call s:initVariable("g:NERDTreeMapRefresh", "r") -call s:initVariable("g:NERDTreeMapRefreshRoot", "R") -call s:initVariable("g:NERDTreeMapToggleBookmarks", "B") -call s:initVariable("g:NERDTreeMapToggleFiles", "F") -call s:initVariable("g:NERDTreeMapToggleFilters", "f") -call s:initVariable("g:NERDTreeMapToggleHidden", "I") -call s:initVariable("g:NERDTreeMapToggleZoom", "A") -call s:initVariable("g:NERDTreeMapUpdir", "u") -call s:initVariable("g:NERDTreeMapUpdirKeepOpen", "U") -call s:initVariable("g:NERDTreeMapCWD", "CD") -call s:initVariable("g:NERDTreeMenuDown", "j") -call s:initVariable("g:NERDTreeMenuUp", "k") +call s:initVariable('g:NERDTreeMapCustomOpen', '') +call s:initVariable('g:NERDTreeMapActivateNode', 'o') +call s:initVariable('g:NERDTreeMapChangeRoot', 'C') +call s:initVariable('g:NERDTreeMapChdir', 'cd') +call s:initVariable('g:NERDTreeMapCloseChildren', 'X') +call s:initVariable('g:NERDTreeMapCloseDir', 'x') +call s:initVariable('g:NERDTreeMapDeleteBookmark', 'D') +call s:initVariable('g:NERDTreeMapMenu', 'm') +call s:initVariable('g:NERDTreeMapHelp', '?') +call s:initVariable('g:NERDTreeMapJumpFirstChild', 'K') +call s:initVariable('g:NERDTreeMapJumpLastChild', 'J') +call s:initVariable('g:NERDTreeMapJumpNextSibling', '') +call s:initVariable('g:NERDTreeMapJumpParent', 'p') +call s:initVariable('g:NERDTreeMapJumpPrevSibling', '') +call s:initVariable('g:NERDTreeMapJumpRoot', 'P') +call s:initVariable('g:NERDTreeMapOpenExpl', 'e') +call s:initVariable('g:NERDTreeMapOpenInTab', 't') +call s:initVariable('g:NERDTreeMapOpenInTabSilent', 'T') +call s:initVariable('g:NERDTreeMapOpenRecursively', 'O') +call s:initVariable('g:NERDTreeMapOpenSplit', 'i') +call s:initVariable('g:NERDTreeMapOpenVSplit', 's') +call s:initVariable('g:NERDTreeMapPreview', 'g' . NERDTreeMapActivateNode) +call s:initVariable('g:NERDTreeMapPreviewSplit', 'g' . NERDTreeMapOpenSplit) +call s:initVariable('g:NERDTreeMapPreviewVSplit', 'g' . NERDTreeMapOpenVSplit) +call s:initVariable('g:NERDTreeMapQuit', 'q') +call s:initVariable('g:NERDTreeMapRefresh', 'r') +call s:initVariable('g:NERDTreeMapRefreshRoot', 'R') +call s:initVariable('g:NERDTreeMapToggleBookmarks', 'B') +call s:initVariable('g:NERDTreeMapToggleFiles', 'F') +call s:initVariable('g:NERDTreeMapToggleFilters', 'f') +call s:initVariable('g:NERDTreeMapToggleHidden', 'I') +call s:initVariable('g:NERDTreeMapToggleZoom', 'A') +call s:initVariable('g:NERDTreeMapUpdir', 'u') +call s:initVariable('g:NERDTreeMapUpdirKeepOpen', 'U') +call s:initVariable('g:NERDTreeMapCWD', 'CD') +call s:initVariable('g:NERDTreeMenuDown', 'j') +call s:initVariable('g:NERDTreeMenuUp', 'k') "SECTION: Load class files{{{2 call nerdtree#loadClassFiles() @@ -171,20 +173,20 @@ call nerdtree#ui_glue#setupCommands() "============================================================ augroup NERDTree "Save the cursor position whenever we close the nerd tree - exec "autocmd BufLeave,WinLeave ". g:NERDTreeCreator.BufNamePrefix() ."* if g:NERDTree.IsOpen() | call b:NERDTree.ui.saveScreenState() | endif" + exec 'autocmd BufLeave,WinLeave '. g:NERDTreeCreator.BufNamePrefix() .'* if g:NERDTree.IsOpen() | call b:NERDTree.ui.saveScreenState() | endif' "disallow insert mode in the NERDTree - exec "autocmd BufEnter,WinEnter ". g:NERDTreeCreator.BufNamePrefix() ."* stopinsert" + exec 'autocmd BufEnter,WinEnter '. g:NERDTreeCreator.BufNamePrefix() .'* stopinsert' augroup END if g:NERDTreeHijackNetrw augroup NERDTreeHijackNetrw autocmd VimEnter * silent! autocmd! FileExplorer - au BufEnter,VimEnter * call nerdtree#checkForBrowse(expand("")) + au BufEnter,VimEnter * call nerdtree#checkForBrowse(expand('')) augroup END endif -if g:NERDTreeChDirMode == 3 +if g:NERDTreeChDirMode ==# 3 augroup NERDTreeChDirOnTabSwitch autocmd TabEnter * if g:NERDTree.ExistsForTab()|call g:NERDTree.ForCurrentTab().getRoot().path.changeToDir()|endif augroup END @@ -217,7 +219,7 @@ function! NERDTreeFocus() if g:NERDTree.IsOpen() call g:NERDTree.CursorToTreeWin() else - call g:NERDTreeCreator.ToggleTabTree("") + call g:NERDTreeCreator.ToggleTabTree('') endif endfunction @@ -253,7 +255,7 @@ endfunction " SECTION: Post Source Actions {{{1 call nerdtree#postSourceActions() -"reset &cpo back to users setting -let &cpo = s:old_cpo +"reset &cpoptions back to users setting +let &cpoptions = s:old_cpo " vim: set sw=4 sts=4 et fdm=marker: diff --git a/sources_non_forked/nerdtree/syntax/nerdtree.vim b/sources_non_forked/nerdtree/syntax/nerdtree.vim index 99773bf1..0df9d12e 100644 --- a/sources_non_forked/nerdtree/syntax/nerdtree.vim +++ b/sources_non_forked/nerdtree/syntax/nerdtree.vim @@ -3,7 +3,7 @@ syn match NERDTreeIgnore #\~# exec 'syn match NERDTreeIgnore #\['.g:NERDTreeGlyphReadOnly.'\]#' "highlighting for the .. (up dir) line at the top of the tree -execute "syn match NERDTreeUp #\\V". s:tree_up_dir_line ."#" +execute "syn match NERDTreeUp #\\V". s:tree_up_dir_line .'#' "quickhelp syntax elements syn match NERDTreeHelpKey #" \{1,2\}[^ ]*:#ms=s+2,me=e-1 @@ -27,7 +27,7 @@ exec 'syn match NERDTreeOpenable #' . escape(g:NERDTreeDirArrowExpandable, '~') let s:dirArrows = escape(g:NERDTreeDirArrowCollapsible, '~]\-').escape(g:NERDTreeDirArrowExpandable, '~]\-') exec 'syn match NERDTreeDir #[^'.s:dirArrows.' ].*/#' -syn match NERDTreeExecFile #^ .*\*\($\| \)# contains=NERDTreeRO,NERDTreeBookmark +syn match NERDTreeExecFile '^ .*\*\($\| \)' contains=NERDTreeRO,NERDTreeBookmark exec 'syn match NERDTreeFile #^[^"\.'.s:dirArrows.'] *[^'.s:dirArrows.']*# contains=NERDTreeLink,NERDTreeRO,NERDTreeBookmark,NERDTreeExecFile' "highlighting for readonly files @@ -37,7 +37,7 @@ syn match NERDTreeFlags #^ *\zs\[[^\]]*\]# containedin=NERDTreeFile,NERDTreeExec syn match NERDTreeFlags #\[[^\]]*\]# containedin=NERDTreeDir "highlighing to conceal the delimiter around the file/dir name -if has("conceal") +if has('conceal') exec 'syn match NERDTreeNodeDelimiters #\%d' . char2nr(g:NERDTreeNodeDelimiter) . '# conceal containedin=ALL' setlocal conceallevel=3 concealcursor=nvic else diff --git a/sources_non_forked/vim-fugitive/autoload/fugitive.vim b/sources_non_forked/vim-fugitive/autoload/fugitive.vim index 302d074b..fbd90e17 100644 --- a/sources_non_forked/vim-fugitive/autoload/fugitive.vim +++ b/sources_non_forked/vim-fugitive/autoload/fugitive.vim @@ -206,8 +206,11 @@ function! s:QuickfixCreate(nr, opts) abort endif endfunction -function! s:QuickfixStream(nr, title, cmd, first, callback, ...) abort - call s:QuickfixCreate(a:nr, {'title': a:title}) +function! s:QuickfixStream(nr, event, title, cmd, first, callback, ...) abort + let opts = {'title': a:title, 'context': {'items': []}} + call s:QuickfixCreate(a:nr, opts) + let event = (a:nr < 0 ? 'c' : 'l') . 'fugitive-' . a:event + silent exe s:DoAutocmd('QuickFixCmdPre ' . event) let winnr = winnr() exe a:nr < 0 ? 'copen' : 'lopen' if winnr != winnr() @@ -219,12 +222,20 @@ function! s:QuickfixStream(nr, title, cmd, first, callback, ...) abort for line in lines call extend(buffer, call(a:callback, a:000 + [line])) if len(buffer) >= 20 + let contexts = map(copy(buffer), 'get(v:val, "context", {})') + lockvar contexts + call extend(opts.context.items, contexts) + unlet contexts call s:QuickfixSet(a:nr, remove(buffer, 0, -1), 'a') redraw endif endfor - call s:QuickfixSet(a:nr, extend(buffer, call(a:callback, a:000 + [0])), 'a') + call extend(buffer, call(a:callback, a:000 + [0])) + call extend(opts.context.items, map(copy(buffer), 'get(v:val, "context", {})')) + lockvar opts.context.items + call s:QuickfixSet(a:nr, buffer, 'a') + silent exe s:DoAutocmd('QuickFixCmdPost ' . event) if a:first && len(s:QuickfixGet(a:nr)) call s:BlurStatus() return a:nr < 0 ? 'cfirst' : 'lfirst' @@ -914,8 +925,8 @@ function! fugitive#Find(object, ...) abort let f = 'fugitive://' . dir . '//0/' . rev[1:-1] else if !exists('f') - let commit = substitute(matchstr(rev, '^[^:.-][^:]*\|^:.*'), '^@\%($\|[~^]\|@{\)\@=', 'HEAD', '') - let file = substitute(matchstr(rev, '^[^:.-][^:]*\zs:.*'), '^:', '/', '') + let commit = substitute(matchstr(rev, '^\%([^:.-]\|\.\.[^/:]\)[^:]*\|^:.*'), '^@\%($\|[~^]\|@{\)\@=', 'HEAD', '') + let file = substitute(matchstr(rev, '^\%([^:.-]\|\.\.[^/:]\)[^:]*\zs:.*'), '^:', '/', '') if file =~# '^/\.\.\=\%(/\|$\)\|^//\|^/\a\+:' let file = file =~# '^/\.' ? simplify(getcwd() . file) : file[1:-1] if s:cpath(base . '/', (file . '/')[0 : len(base)]) @@ -2160,7 +2171,10 @@ function! fugitive#Command(line1, line2, range, bang, mods, arg) abort if exists('*s:' . name . 'Subcommand') && get(args, 1, '') !=# '--help' try exe s:DirCheck(dir) - return 'exe ' . string(s:{name}Subcommand(a:line1, a:line2, a:range, a:bang, a:mods, args[1:-1])) . after + let result = s:{name}Subcommand(a:line1, a:line2, a:range, a:bang, a:mods, args[1:-1]) + if type(result) == type('') + return 'exe ' . string(result) . after + endif catch /^fugitive:/ return 'echoerr ' . string(v:exception) endtry @@ -3782,6 +3796,240 @@ augroup fugitive_merge \ endif augroup END +" Section: :Git difftool, :Git mergetool + +function! s:ToolItems(state, from, to, offsets, text, ...) abort + let items = [] + for i in range(len(a:state.diff)) + let diff = a:state.diff[i] + let path = (i == len(a:state.diff) - 1) ? a:to : a:from + if empty(path) + return [] + endif + let item = { + \ 'valid': a:0 ? a:1 : 1, + \ 'filename': diff.filename . FugitiveVimPath(path), + \ 'lnum': matchstr(get(a:offsets, i), '\d\+'), + \ 'text': a:text} + if len(get(diff, 'module', '')) + let item.module = diff.module . path + endif + call add(items, item) + endfor + let diff = items[0:-2] + let items[-1].context = {'diff': items[0:-2]} + return [items[-1]] +endfunction + +function! s:ToolToFrom(str) abort + if a:str =~# ' => ' + let str = a:str =~# '{.* => .*}' ? a:str : '{' . a:str . '}' + return [substitute(str, '{.* => \(.*\)}', '\1', ''), + \ substitute(str, '{\(.*\) => .*}', '\1', '')] + else + return [a:str, a:str] + endif +endfunction + +function! s:ToolParse(state, line) abort + if type(a:line) !=# type('') || a:state.mode ==# 'hunk' && a:line =~# '^[ +-]' + return [] + elseif a:line =~# '^diff ' + let a:state.mode = 'diffhead' + let a:state.from = '' + let a:state.to = '' + elseif a:state.mode ==# 'diffhead' && a:line =~# '^--- [^/]' + let a:state.from = a:line[4:-1] + let a:state.to = a:state.from + elseif a:state.mode ==# 'diffhead' && a:line =~# '^+++ [^/]' + let a:state.to = a:line[4:-1] + if empty(get(a:state, 'from', '')) + let a:state.from = a:state.to + endif + elseif a:line[0] ==# '@' + let a:state.mode = 'hunk' + if has_key(a:state, 'from') + let offsets = split(matchstr(a:line, '^@\+ \zs[-+0-9, ]\+\ze @'), ' ') + return s:ToolItems(a:state, a:state.from, a:state.to, offsets, matchstr(a:line, ' @@\+ \zs.*')) + endif + elseif a:line =~# '^[A-Z]\d*\t.\|^:.*\t.' + " --raw, --name-status + let [status; files] = split(a:line, "\t") + return s:ToolItems(a:state, files[0], files[-1], [], a:state.name_only ? '' : status) + elseif a:line =~# '^ \S.* |' + " --stat + let [_, to, changes; __] = matchlist(a:line, '^ \(.\{-\}\) \+|\zs \(.*\)$') + let [to, from] = s:ToolToFrom(to) + return s:ToolItems(a:state, from, to, [], changes) + elseif a:line =~# '^ *\([0-9.]\+%\) .' + " --dirstat + let [_, changes, to; __] = matchlist(a:line, '^ *\([0-9.]\+%\) \(.*\)') + return s:ToolItems(a:state, to, to, [], changes) + elseif a:line =~# '^\(\d\+\|-\)\t\(\d\+\|-\)\t.' + " --numstat + let [_, add, remove, to; __] = matchlist(a:line, '^\(\d\+\|-\)\t\(\d\+\|-\)\t\(.*\)') + let [to, from] = s:ToolToFrom(to) + return s:ToolItems(a:state, from, to, [], add ==# '-' ? 'Binary file' : '+' . add . ' -' . remove, add !=# '-') + elseif a:state.mode !=# 'diffhead' && a:state.mode !=# 'hunk' && len(a:line) || a:line =~# '^git: \|^usage: \|^error: \|^fatal: ' + return [{'text': a:line}] + endif + return [] +endfunction + +function! s:ToolStream(dir, line1, line2, range, bang, mods, args, state, title) abort + let i = 0 + let argv = copy(a:args) + let prompt = 1 + let state = a:state + while i < len(argv) + let match = matchlist(argv[i], '^\(-[a-zABDFH-KN-RT-Z]\)\ze\(.*\)') + if len(match) && len(match[2]) + call insert(argv, match[1]) + let argv[i+1] = '-' . match[2] + continue + endif + let arg = argv[i] + if arg =~# '^-t$\|^--tool=\|^--tool-help$\|^--help$' + return -1 + elseif arg =~# '^-y$\|^--no-prompt$' + let prompt = 0 + call remove(argv, i) + continue + elseif arg ==# '--prompt' + let prompt = 1 + call remove(argv, i) + continue + elseif arg =~# '^--\%(no-\)\=\(symlinks\|trust-exit-code\|gui\)$' + call remove(argv, i) + continue + elseif arg ==# '--' + break + endif + let i += 1 + endwhile + let a:state.mode = 'init' + let a:state.from = '' + let a:state.to = '' + let exec = s:UserCommandList(a:dir) + ['--no-pager', '-c', 'diff.context=0', 'diff', '--no-ext-diff', '--no-color', '--no-prefix'] + argv + if prompt + return s:QuickfixStream(a:line2, 'difftool', a:title, exec, !a:bang, s:function('s:ToolParse'), a:state) + else + let filename = '' + let cmd = [] + let tabnr = tabpagenr() + 1 + for line in split(s:SystemError(s:shellesc(exec))[0], "\n") + for item in s:ToolParse(a:state, line) + if len(get(item, 'filename', '')) && item.filename != filename + call add(cmd, 'tabedit ' . s:fnameescape(item.filename)) + for i in reverse(range(len(get(item.context, 'diff', [])))) + call add(cmd, (i ? 'rightbelow' : 'leftabove') . ' vert Gdiffsplit! ' . s:fnameescape(item.context.diff[i].filename)) + endfor + call add(cmd, 'wincmd =') + let filename = item.filename + endif + endfor + endfor + return join(cmd, '|') . (empty(cmd) ? '' : '|' . tabnr . 'tabnext') + endif +endfunction + +function! s:MergetoolSubcommand(line1, line2, range, bang, mods, args) abort + let dir = s:Dir() + let i = 0 + let argv = copy(a:args) + let prompt = 1 + let title = ':Git mergetool' . (len(a:args) ? ' ' . s:fnameescape(a:args) : '') + let cmd = ['diff', '--diff-filter=U'] + let state = {'name_only': 0} + let state.diff = [{'prefix': ':2:', 'module': ':2:'}, {'prefix': ':3:', 'module': ':3:'}, {'prefix': ':(top)'}] + call map(state.diff, 'extend(v:val, {"filename": fugitive#Find(v:val.prefix, dir)})') + return s:ToolStream(dir, a:line1, a:line2, a:range, a:bang, a:mods, ['--diff-filter=U'] + a:args, state, title) +endfunction + +function! s:DifftoolSubcommand(line1, line2, range, bang, mods, args) abort + let dir = s:Dir() + let i = 0 + let argv = copy(a:args) + let commits = [] + let cached = 0 + let reverse = 1 + let prompt = 1 + let state = {'name_only': 0} + let merge_base_against = {} + let dash = (index(argv, '--') > i ? ['--'] : []) + while i < len(argv) + let match = matchlist(argv[i], '^\(-[a-zABDFH-KN-RT-Z]\)\ze\(.*\)') + if len(match) && len(match[2]) + call insert(argv, match[1]) + let argv[i+1] = '-' . match[2] + continue + endif + let arg = argv[i] + if arg ==# '--cached' + let cached = 1 + elseif arg ==# '-R' + let reverse = 1 + elseif arg ==# '--name-only' + let state.name_only = 1 + let argv[0] = '--name-status' + elseif arg ==# '--' + break + elseif arg !~# '^-\|^\.\.\=\%(/\|$\)' + let parsed = s:LinesError(['rev-parse', '--revs-only', substitute(arg, ':.*', '', '')] + dash)[0] + call map(parsed, '{"uninteresting": v:val =~# "^\\^", "prefix": substitute(v:val, "^\\^", "", "") . ":"}') + let merge_base_against = {} + if arg =~# '\.\.\.' && len(parsed) > 2 + let display = map(split(arg, '\.\.\.', 1), 'empty(v:val) ? "@" : v:val') + if len(display) == 2 + let parsed[0].module = display[1] . ':' + let parsed[1].module = display[0] . ':' + endif + let parsed[2].module = arg . ':' + if empty(commits) + let merge_base_against = parsed[0] + let parsed = [parsed[2]] + endif + elseif arg =~# '\.\.' && len(parsed) == 2 + let display = map(split(arg, '\.\.', 1), 'empty(v:val) ? "@" : v:val') + if len(display) == 2 + let parsed[0].module = display[0] . ':' + let parsed[1].module = display[1] . ':' + endif + elseif len(parsed) == 1 + let parsed[0].module = arg . ':' + endif + call extend(commits, parsed) + endif + let i += 1 + endwhile + let title = ':Git difftool' . (len(a:args) ? ' ' . s:fnameescape(a:args) : '') + if len(merge_base_against) + call add(commits, merge_base_against) + endif + let commits = filter(copy(commits), 'v:val.uninteresting') + filter(commits, '!v:val.uninteresting') + if cached + if empty(commits) + call add(commits, {'prefix': '@:', 'module': '@:'}) + endif + call add(commits, {'prefix': ':0:', 'module': ':0:'}) + elseif len(commits) < 2 + call add(commits, {'prefix': ':(top)'}) + if len(commits) < 2 + call insert(commits, {'prefix': ':0:', 'module': ':0:'}) + endif + endif + if reverse + let commits = [commits[-1]] + repeat([commits[0]], len(commits) - 1) + call reverse(commits) + endif + if len(commits) > 2 + call add(commits, remove(commits, 0)) + endif + call map(commits, 'extend(v:val, {"filename": fugitive#Find(v:val.prefix, dir)})') + let state.diff = commits + return s:ToolStream(dir, a:line1, a:line2, a:range, a:bang, a:mods, argv, state, title) +endfunction + " Section: :Ggrep, :Glog if !exists('g:fugitive_summary_format') @@ -3869,10 +4117,16 @@ function! s:GrepSubcommand(line1, line2, range, bang, mods, args) abort endif endfunction -function! s:LogFlushQueue(state) abort +let s:log_diff_context = '{"filename": fugitive#Find(v:val . from, a:dir), "lnum": get(offsets, v:key), "module": strpart(v:val, 0, len(a:state.base_module)) . from}' + +function! s:LogFlushQueue(state, dir) abort let queue = remove(a:state, 'queue') - if a:state.child_found + if a:state.child_found && get(a:state, 'ignore_summary') call remove(queue, 0) + elseif len(queue) && len(a:state.target) && len(get(a:state, 'parents', [])) + let from = substitute(a:state.target, '^/', ':', '') + let offsets = [] + let queue[0].context.diff = map(copy(a:state.parents), s:log_diff_context) endif if len(queue) && queue[-1] ==# {'text': ''} call remove(queue, -1) @@ -3881,41 +4135,65 @@ function! s:LogFlushQueue(state) abort endfunction function! s:LogParse(state, dir, line) abort - if a:state.context ==# 'hunk' && a:line =~# '^[-+ ]' + if a:state.mode ==# 'hunk' && a:line =~# '^[-+ ]' return [] endif let list = matchlist(a:line, '^\%(fugitive \(.\{-\}\)\t\|commit \|From \)\=\(\x\{40,\}\)\%( \(.*\)\)\=$') if len(list) - let a:state.context = 'commit' + let queue = s:LogFlushQueue(a:state, a:dir) + let a:state.mode = 'commit' let a:state.base = 'fugitive://' . a:dir . '//' . list[2] - let a:state.base_module = len(list[1]) ? list[1] : list[2] - let a:state.message = list[3] - if has_key(a:state, 'diffing') - call remove(a:state, 'diffing') + if len(list[1]) + let [a:state.base_module; a:state.parents] = split(list[1], ' ') + else + let a:state.base_module = list[2] + let a:state.parents = [] endif - let queue = s:LogFlushQueue(a:state) + let a:state.message = list[3] + let a:state.from = '' + let a:state.to = '' + let context = {} let a:state.queue = [{ \ 'valid': 1, + \ 'context': context, \ 'filename': a:state.base . a:state.target, \ 'module': a:state.base_module . substitute(a:state.target, '^/', ':', ''), \ 'text': a:state.message}] let a:state.child_found = 0 return queue elseif type(a:line) == type(0) - return s:LogFlushQueue(a:state) + return s:LogFlushQueue(a:state, a:dir) elseif a:line =~# '^diff' - let a:state.context = 'diffhead' - elseif a:line =~# '^[+-]\{3\} \w/' && a:state.context ==# 'diffhead' - let a:state.diffing = a:line[5:-1] - elseif a:line =~# '^@@[^@]*+\d' && has_key(a:state, 'diffing') && has_key(a:state, 'base') - let a:state.context = 'hunk' - if empty(a:state.target) || a:state.target ==# a:state.diffing + let a:state.mode = 'diffhead' + let a:state.from = '' + let a:state.to = '' + elseif a:state.mode ==# 'diffhead' && a:line =~# '^--- \w/' + let a:state.from = a:line[6:-1] + let a:state.to = a:state.from + elseif a:state.mode ==# 'diffhead' && a:line =~# '^+++ \w/' + let a:state.to = a:line[6:-1] + if empty(get(a:state, 'from', '')) + let a:state.from = a:state.to + endif + elseif a:line =~# '^@@[^@]*+\d' && len(get(a:state, 'to', '')) && has_key(a:state, 'base') + let a:state.mode = 'hunk' + if empty(a:state.target) || a:state.target ==# '/' . a:state.to + if !a:state.child_found && len(a:state.queue) && a:state.queue[-1] ==# {'text': ''} + call remove(a:state.queue, -1) + endif let a:state.child_found = 1 + let offsets = map(split(matchstr(a:line, '^@\+ \zs[-+0-9, ]\+\ze @'), ' '), '+matchstr(v:val, "\\d\\+")') + let context = {} + if len(a:state.parents) + let from = ":" . a:state.from + let context.diff = map(copy(a:state.parents), s:log_diff_context) + endif call add(a:state.queue, { \ 'valid': 1, - \ 'filename': a:state.base . a:state.diffing, - \ 'module': a:state.base_module . substitute(a:state.diffing, '^/', ':', ''), - \ 'lnum': +matchstr(a:line, '+\zs\d\+'), + \ 'context': context, + \ 'filename': FugitiveVimPath(a:state.base . '/' . a:state.to), + \ 'module': a:state.base_module . ':' . a:state.to, + \ 'lnum': offsets[-1], \ 'text': a:state.message . matchstr(a:line, ' @@\+ .\+')}) endif elseif a:state.follow && @@ -3930,7 +4208,7 @@ function! s:LogParse(state, dir, line) abort if !get(a:state, 'ignore_summary') call add(a:state.queue, {'text': a:line}) endif - elseif a:state.context ==# 'commit' || a:state.context ==# 'init' + elseif a:state.mode ==# 'commit' || a:state.mode ==# 'init' call add(a:state.queue, {'text': a:line}) endif return [] @@ -3953,32 +4231,36 @@ function! fugitive#LogCommand(line1, count, range, bang, mods, args, type) abort endif if a:line1 == 0 && a:count let path = fugitive#Path(bufname(a:count), '/', dir) + let titlepre = ':0,' . a:count elseif a:count >= 0 let path = fugitive#Path(@%, '/', dir) + let titlepre = a:count == 0 ? ':0,' . bufnr('') : ':' else - let path = '' + let titlepre = ':' + let path = '' endif let range = '' - let extra = [] - let state = {'context': 'init', 'child_found': 0, 'queue': [], 'follow': 0} + let extra_args = [] + let extra_paths = [] + let state = {'mode': 'init', 'child_found': 0, 'queue': [], 'follow': 0} if path =~# '^/\.git\%(/\|$\)\|^$' let path = '' elseif a:line1 == 0 let range = "0," . (a:count ? a:count : bufnr('')) - let extra = ['.' . path] + let extra_paths = ['.' . path] if (empty(paths) || paths ==# ['--']) && !s:HasOpt(args, '--no-follow') let state.follow = 1 if !s:HasOpt(args, '--follow') - call insert(args, '--follow') + call insert(extra_args, '--follow') endif if !s:HasOpt(args, '--summary') - call insert(args, '--summary') + call insert(extra_args, '--summary') let state.ignore_summary = 1 endif endif elseif a:count > 0 if !s:HasOpt(args, '--merges', '--no-merges') - call insert(args, '--no-merges') + call insert(extra_args, '--no-merges') endif call add(args, '-L' . a:line1 . ',' . a:count . ':' . path[1:-1]) endif @@ -3988,13 +4270,13 @@ function! fugitive#LogCommand(line1, count, range, bang, mods, args, type) abort call add(args, owner) endif endif - if empty(extra) + if empty(extra_paths) let path = '' endif if s:HasOpt(args, '-g', '--walk-reflogs') - let format = "%gd\t%H %gs" + let format = "%gd %P\t%H %gs" else - let format = "%h\t%H " . g:fugitive_summary_format + let format = "%h %P\t%H " . g:fugitive_summary_format endif let cmd = ['--no-pager'] if fugitive#GitVersion(1, 9) @@ -4004,13 +4286,13 @@ function! fugitive#LogCommand(line1, count, range, bang, mods, args, type) abort endif call extend(cmd, \ ['--no-color', '--no-ext-diff', '--pretty=format:fugitive ' . format] + - \ args + paths + extra) + \ args + extra_args + paths + extra_paths) let state.target = path - let title = (listnr < 0 ? ':Gclog ' : ':Gllog ') . s:fnameescape(args + paths) - if empty(paths + extra) && empty(a:type) && len(s:Relative('/')) + let title = titlepre . (listnr < 0 ? 'Gclog ' : 'Gllog ') . s:fnameescape(args + paths) + if empty(paths + extra_paths) && empty(a:type) && len(s:Relative('/')) let after = '|echohl WarningMsg|echo ' . string('Use :0Glog or :0Gclog for old behavior of targeting current file') . '|echohl NONE' . after endif - return s:QuickfixStream(listnr, title, s:UserCommandList(dir) + cmd, !a:bang, s:function('s:LogParse'), state, dir) . after + return s:QuickfixStream(listnr, 'log', title, s:UserCommandList(dir) + cmd, !a:bang, s:function('s:LogParse'), state, dir) . after endfunction " Section: :Gedit, :Gpedit, :Gsplit, :Gvsplit, :Gtabedit, :Gread @@ -5428,7 +5710,12 @@ function! fugitive#BrowseCommand(line1, count, range, bang, mods, arg, args) abo endif let i = 0 while commit =~# '^ref: ' && i < 10 - let commit = readfile(cdir . '/' . commit[5:-1], '', 1)[0] + let ref_file = cdir . '/' . commit[5:-1] + if getfsize(ref_file) > 0 + let commit = readfile(ref_file, '', 1)[0] + else + let commit = fugitive#RevParse(commit[5:-1], dir) + endif let i -= 1 endwhile endif diff --git a/sources_non_forked/vim-fugitive/doc/fugitive.txt b/sources_non_forked/vim-fugitive/doc/fugitive.txt index 999bfdf1..e4d04aeb 100644 --- a/sources_non_forked/vim-fugitive/doc/fugitive.txt +++ b/sources_non_forked/vim-fugitive/doc/fugitive.txt @@ -103,9 +103,23 @@ that are part of Git repositories). :Glgrep[!] [args] |:lgrep|[!] with git-grep as 'grepprg'. :0Git[!] grep [args] + *:Git-difftool* +:Git[!] difftool [args] Invoke `git diff [args]` and load the changes into the + quickfix list. Each changed hunk gets a separate + quickfix entry unless you pass an option like + --name-only or --name-status. Jumps to the first + change unless [!] is given. + +:Git difftool -y [args] Invoke `git diff [args]`, open each changed file in a + new tab, and invoke `:Gdiffsplit` against the + appropriate commit. + + *:Git-mergetool* +:Git mergetool [args] Like |:Git-difftool|, but target merge conflicts. + *:Gclog* *:Glog* :Gclog[!] [args] Use git-log [args] to load the commit history into the -:Glog[!] [args] |quickfix| list. Jump to the first commit unless [!] +:Glog[!] [args] |quickfix| list. Jumps to the first commit unless [!] is given. :{range}Gclog[!] [args] Use git-log -L to load previous revisions of the given diff --git a/sources_non_forked/vim-gitgutter/README.mkd b/sources_non_forked/vim-gitgutter/README.mkd index 8cb86df9..4f8495c8 100644 --- a/sources_non_forked/vim-gitgutter/README.mkd +++ b/sources_non_forked/vim-gitgutter/README.mkd @@ -82,7 +82,7 @@ This is to avoid a problem which occurs if you have file named `git.*` (i.e. wit ### Getting started -When you make a change to a file tracked by git, the diff markers should appear automatically. The delay is governed by vim's `updatetime` option; the default value is `4000`, i.e. 4 seconds, but I suggest reducing it to around 100ms (add `set updatetime=100` to your vimrc). +When you make a change to a file tracked by git, the diff markers should appear automatically. The delay is governed by vim's `updatetime` option; the default value is `4000`, i.e. 4 seconds, but I suggest reducing it to around 100ms (add `set updatetime=100` to your vimrc). Note `updatetime` also controls the delay before vim writes its swap file (see `:help updatetime`). You can jump between hunks with `[c` and `]c`. You can preview, stage, and undo hunks with `hp`, `hs`, and `hu` respectively. @@ -115,13 +115,15 @@ And you can turn line highlighting on and off (defaults to off): * turn off with `:GitGutterLineHighlightsDisable` * toggle with `:GitGutterLineHighlightsToggle`. +Note that if you have line highlighting on and signs off, you will have an empty sign column – more accurately, a sign column with invisible signs. This is because line highlighting requires signs and Vim/NeoVim always shows the sign column when there are signs even if the signs are invisible. + With Neovim 0.3.2 or higher, you can turn line number highlighting on and off (defaults to off): * turn on with `:GitGutterLineNrHighlightsEnable` * turn off with `:GitGutterLineNrHighlightsDisable` * toggle with `:GitGutterLineNrHighlightsToggle`. -Note that if you have line highlighting on and signs off, you will have an empty sign column – more accurately, a sign column with invisible signs. This is because line highlighting requires signs and Vim always shows the sign column even if the signs are invisible. +The same caveat applies to line number highlighting as to line highlighting just above. If you switch off both line highlighting and signs, you won't see the sign column. @@ -649,7 +651,7 @@ Here are some things you can check: #### When signs take a few seconds to appear -* Try reducing `updatetime`, e.g. `set updatetime=100`. +* Try reducing `updatetime`, e.g. `set updatetime=100`. Note this also controls the delay before vim writes its swap file. #### When signs don't update after focusing Vim diff --git a/sources_non_forked/vim-gitgutter/doc/gitgutter.txt b/sources_non_forked/vim-gitgutter/doc/gitgutter.txt index 23805145..f3c09b87 100644 --- a/sources_non_forked/vim-gitgutter/doc/gitgutter.txt +++ b/sources_non_forked/vim-gitgutter/doc/gitgutter.txt @@ -249,7 +249,8 @@ OPTIONS *gitgutter-options* The most important option is 'updatetime' which determines how long (in milliseconds) the plugin will wait after you stop typing before it updates the -signs. Vim's default is 4000. I recommend 100. +signs. Vim's default is 4000. I recommend 100. Note this also controls how +long vim waits before writing its swap file. Most important option:~ @@ -624,6 +625,8 @@ Try reducing 'updatetime': set updatetime=100 < +Note this also controls how long vim waits before writing its swap file. + When signs don't update after focusing Vim:~ diff --git a/sources_non_forked/vim-snippets/UltiSnips/octave.snippets b/sources_non_forked/vim-snippets/UltiSnips/octave.snippets new file mode 100644 index 00000000..c11805ff --- /dev/null +++ b/sources_non_forked/vim-snippets/UltiSnips/octave.snippets @@ -0,0 +1,2 @@ +extends matlab + diff --git a/sources_non_forked/vim-snippets/snippets/octave.snippets b/sources_non_forked/vim-snippets/snippets/octave.snippets new file mode 100644 index 00000000..c11805ff --- /dev/null +++ b/sources_non_forked/vim-snippets/snippets/octave.snippets @@ -0,0 +1,2 @@ +extends matlab + diff --git a/sources_non_forked/vim-snippets/snippets/pandoc.snippets b/sources_non_forked/vim-snippets/snippets/pandoc.snippets new file mode 100644 index 00000000..1dd9e82e --- /dev/null +++ b/sources_non_forked/vim-snippets/snippets/pandoc.snippets @@ -0,0 +1,2 @@ +extends markdown + From dbcdace7be8d63e82206d7fd52dee2c1c860ffd1 Mon Sep 17 00:00:00 2001 From: Amir Date: Tue, 28 Jan 2020 23:07:36 -0300 Subject: [PATCH 39/40] Updated plugins --- sources_non_forked/bufexplorer/README.md | 14 +- .../bufexplorer/plugin/bufexplorer.vim | 8 +- sources_non_forked/gist-vim/README.md | 3 + sources_non_forked/gist-vim/autoload/gist.vim | 4 +- sources_non_forked/lightline-ale/README.md | 14 +- .../lightline-ale/autoload/lightline/ale.vim | 14 +- sources_non_forked/lightline.vim/LICENSE | 2 +- sources_non_forked/lightline.vim/README.md | 2 +- .../lightline.vim/autoload/lightline.vim | 4 +- .../lightline.vim/doc/lightline.txt | 24 +- sources_non_forked/nerdtree/CHANGELOG.md | 5 + .../nerdtree/autoload/nerdtree.vim | 7 +- .../nerdtree/autoload/nerdtree/ui_glue.vim | 7 +- sources_non_forked/nerdtree/doc/NERDTree.txt | 5 +- .../nerdtree/lib/nerdtree/creator.vim | 30 +- .../nerdtree/nerdtree_plugin/fs_menu.vim | 9 +- sources_non_forked/nginx.vim/README.md | 25 +- .../rust.vim/autoload/cargo.vim | 4 + .../rust.vim/autoload/rustfmt.vim | 22 +- sources_non_forked/rust.vim/plugin/cargo.vim | 1 + .../vim-fugitive/autoload/fugitive.vim | 899 ++++++++---------- .../vim-fugitive/doc/fugitive.txt | 89 +- .../vim-fugitive/plugin/fugitive.vim | 46 +- sources_non_forked/vim-gitgutter/README.mkd | 14 + .../vim-gitgutter/autoload/gitgutter/diff.vim | 2 +- .../vim-gitgutter/doc/gitgutter.txt | 18 + .../vim-javascript/syntax/javascript.vim | 2 +- .../vim-ruby/ftdetect/ruby_extra.vim | 3 + sources_non_forked/vim-ruby/syntax/ruby.vim | 4 +- .../vim-snippets/UltiSnips/tex.snippets | 21 + .../vim-snippets/snippets/elixir.snippets | 2 + .../vim-snippets/snippets/sh.snippets | 4 +- 32 files changed, 644 insertions(+), 664 deletions(-) diff --git a/sources_non_forked/bufexplorer/README.md b/sources_non_forked/bufexplorer/README.md index a5eab5bc..5ee9346e 100644 --- a/sources_non_forked/bufexplorer/README.md +++ b/sources_non_forked/bufexplorer/README.md @@ -5,10 +5,10 @@ BufExplorer Plugin for Vim With bufexplorer, you can quickly and easily switch between buffers by using the one of the default public interfaces: - 'be' (normal open) or - 'bt' (toggle open / close) or - 'bs' (force horizontal split open) or - 'bv' (force vertical split open) + '\be' (normal open) or + '\bt' (toggle open / close) or + '\bs' (force horizontal split open) or + '\bv' (force vertical split open) Once the bufexplorer window is open you can use the normal movement keys (hjkl) to move around and then use or to select the buffer you would like to open. If you would like to have the selected buffer opened in a new tab, simply press either or 't'. Please note that when opening a buffer in a tab, that if the buffer is already in another tab, bufexplorer can switch to that tab automatically for you if you would like. More about that in the supplied VIM help. @@ -28,8 +28,8 @@ This plugin can also be found at http://www.vim.org/scripts/script.php?script_id ## Installation ### Manually -1. If you do not want to use on the the bundle handlers, you can take the zip - file from vim.org and unzip it and copy the plugin to your vimfiles\plugin +1. If you do not want to use one of the the bundle handlers, you can take the + zip file from vim.org and unzip it and copy the plugin to your vimfiles\plugin directory and the txt file to your vimfiles\doc directory. If you do that, make sure you generate the help by executing @@ -65,7 +65,7 @@ This plugin can also be found at http://www.vim.org/scripts/script.php?script_id git clone https://github.com/jlanzarotta/bufexplorer.git ~/.vim/bundle/bufexplorer.vim ## License -Copyright (c) 2001-2019, Jeff Lanzarotta +Copyright (c) 2001-2020, Jeff Lanzarotta All rights reserved. diff --git a/sources_non_forked/bufexplorer/plugin/bufexplorer.vim b/sources_non_forked/bufexplorer/plugin/bufexplorer.vim index aa19a36f..6a7ef4f0 100644 --- a/sources_non_forked/bufexplorer/plugin/bufexplorer.vim +++ b/sources_non_forked/bufexplorer/plugin/bufexplorer.vim @@ -919,7 +919,7 @@ function! s:SelectBuffer(...) endif " Switch to the selected buffer. - execute "keepalt silent b!" _bufNbr + execute "keepjumps keepalt silent b!" _bufNbr endif " Make the buffer 'listed' again. @@ -957,12 +957,6 @@ function! s:RemoveBuffer(mode) let mode = a:mode - " Do not allow this buffer to be deleted if it is the last one. - if len(s:MRUList) == 1 - call s:Error("Sorry, you are not allowed to delete the last buffer") - return - endif - " These commands are to temporarily suspend the activity of winmanager. if exists("b:displayMode") && b:displayMode == "winmanager" call WinManagerSuspendAUs() diff --git a/sources_non_forked/gist-vim/README.md b/sources_non_forked/gist-vim/README.md index 95e3e234..e91463f1 100644 --- a/sources_non_forked/gist-vim/README.md +++ b/sources_non_forked/gist-vim/README.md @@ -266,6 +266,9 @@ Then gist-vim will ask for your password in order to create an access token. If you have two-factor authentication enabled, gist-vim will also prompt you to enter the two-factor key you receive. +NOTE: +If you want you can set it directly to `g:github_user` and `g:gist_token`. + Whichever type of authentication you use, your GitHub password will not be stored, only a OAuth access token produced specifically for gist-vim. The token is stored in `~/.gist-vim`. If you stop using the plugin, you can diff --git a/sources_non_forked/gist-vim/autoload/gist.vim b/sources_non_forked/gist-vim/autoload/gist.vim index 50d88427..afe797e7 100644 --- a/sources_non_forked/gist-vim/autoload/gist.vim +++ b/sources_non_forked/gist-vim/autoload/gist.vim @@ -961,7 +961,9 @@ function! s:GistGetAuthHeader() abort return printf('basic %s', webapi#base64#b64encode(g:github_user.':'.password)) endif let auth = '' - if filereadable(s:gist_token_file) + if !empty(get(g:, 'gist_token', $GITHUB_TOKEN)) + let auth = 'token ' . get(g:, 'gist_token', $GITHUB_TOKEN) + elseif filereadable(s:gist_token_file) let str = join(readfile(s:gist_token_file), '') if type(str) == 1 let auth = str diff --git a/sources_non_forked/lightline-ale/README.md b/sources_non_forked/lightline-ale/README.md index a2e345b0..ebfbc7e6 100644 --- a/sources_non_forked/lightline-ale/README.md +++ b/sources_non_forked/lightline-ale/README.md @@ -30,6 +30,7 @@ let g:lightline = {} let g:lightline.component_expand = { \ 'linter_checking': 'lightline#ale#checking', + \ 'linter_infos': 'lightline#ale#infos', \ 'linter_warnings': 'lightline#ale#warnings', \ 'linter_errors': 'lightline#ale#errors', \ 'linter_ok': 'lightline#ale#ok', @@ -40,17 +41,18 @@ let g:lightline.component_expand = { ```viml let g:lightline.component_type = { - \ 'linter_checking': 'left', + \ 'linter_checking': 'right', + \ 'linter_infos': 'right', \ 'linter_warnings': 'warning', \ 'linter_errors': 'error', - \ 'linter_ok': 'left', + \ 'linter_ok': 'right', \ } ``` 3. Add the components to the lightline, for example to the right side: ```viml -let g:lightline.active = { 'right': [[ 'linter_checking', 'linter_errors', 'linter_warnings', 'linter_ok' ]] } +let g:lightline.active = { 'right': [[ 'linter_checking', 'linter_errors', 'linter_warnings', 'linter_infos', 'linter_ok' ]] } ``` ## Configuration @@ -59,6 +61,10 @@ let g:lightline.active = { 'right': [[ 'linter_checking', 'linter_errors', 'lint The indicator to use when ALE is in progress. Default is `Linting...`. +##### `g:lightline#ale#indicator_infos` + +The indicator to use when there are infos. Default is `I:`. + ##### `g:lightline#ale#indicator_warnings` The indicator to use when there are warnings. Default is `W:`. @@ -78,6 +84,7 @@ If you would like to replace the default indicators with symbols like on the scr The following icons from the Font Awesome font are used in the screenshot: * Checking: [f110](https://fontawesome.com/icons/spinner) +* Infos: [f129](https://fontawesome.com/icons/info) * Warnings: [f071](https://fontawesome.com/icons/exclamation-triangle) * Errors: [f05e](https://fontawesome.com/icons/ban) * OK: [f00c](https://fontawesome.com/icons/check) (although I prefer to disable this component) @@ -93,6 +100,7 @@ Here's the configuration snippet used in the screenshot: ```viml let g:lightline#ale#indicator_checking = "\uf110" +let g:lightline#ale#indicator_infos = "\uf129" let g:lightline#ale#indicator_warnings = "\uf071" let g:lightline#ale#indicator_errors = "\uf05e" let g:lightline#ale#indicator_ok = "\uf00c" diff --git a/sources_non_forked/lightline-ale/autoload/lightline/ale.vim b/sources_non_forked/lightline-ale/autoload/lightline/ale.vim index 06aa90c1..0b34f7bc 100644 --- a/sources_non_forked/lightline-ale/autoload/lightline/ale.vim +++ b/sources_non_forked/lightline-ale/autoload/lightline/ale.vim @@ -1,3 +1,4 @@ +let s:indicator_infos = get(g:, 'lightline#ale#indicator_infos', 'I: ') let s:indicator_warnings = get(g:, 'lightline#ale#indicator_warnings', 'W: ') let s:indicator_errors = get(g:, 'lightline#ale#indicator_errors', 'E: ') let s:indicator_ok = get(g:, 'lightline#ale#indicator_ok', 'OK') @@ -7,14 +8,21 @@ let s:indicator_checking = get(g:, 'lightline#ale#indicator_checking', 'Linting. """""""""""""""""""""" " Lightline components +function! lightline#ale#infos() abort + if !lightline#ale#linted() + return '' + endif + let l:counts = ale#statusline#Count(bufnr('')) + return l:counts.info == 0 ? '' : printf(s:indicator_infos . '%d', l:counts.info) +endfunction + function! lightline#ale#warnings() abort if !lightline#ale#linted() return '' endif let l:counts = ale#statusline#Count(bufnr('')) - let l:all_errors = l:counts.error + l:counts.style_error - let l:all_non_errors = l:counts.total - l:all_errors - return l:all_non_errors == 0 ? '' : printf(s:indicator_warnings . '%d', all_non_errors) + let l:all_warnings = l:counts.warning + l:counts.style_warning + return l:all_warnings == 0 ? '' : printf(s:indicator_warnings . '%d', all_warnings) endfunction function! lightline#ale#errors() abort diff --git a/sources_non_forked/lightline.vim/LICENSE b/sources_non_forked/lightline.vim/LICENSE index 56144fc6..ee9e0c80 100644 --- a/sources_non_forked/lightline.vim/LICENSE +++ b/sources_non_forked/lightline.vim/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2013-2019 itchyny +Copyright (c) 2013-2020 itchyny Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sources_non_forked/lightline.vim/README.md b/sources_non_forked/lightline.vim/README.md index f4061bd5..bb116378 100644 --- a/sources_non_forked/lightline.vim/README.md +++ b/sources_non_forked/lightline.vim/README.md @@ -246,7 +246,7 @@ let g:lightline = { \ [ 'gitbranch', 'readonly', 'filename', 'modified' ] ] \ }, \ 'component_function': { - \ 'gitbranch': 'fugitive#head' + \ 'gitbranch': 'FugitiveHead' \ }, \ } ``` diff --git a/sources_non_forked/lightline.vim/autoload/lightline.vim b/sources_non_forked/lightline.vim/autoload/lightline.vim index 127622c0..07800f42 100644 --- a/sources_non_forked/lightline.vim/autoload/lightline.vim +++ b/sources_non_forked/lightline.vim/autoload/lightline.vim @@ -2,7 +2,7 @@ " Filename: autoload/lightline.vim " Author: itchyny " License: MIT License -" Last Change: 2019/08/20 14:00:00. +" Last Change: 2020/01/27 19:41:58. " ============================================================================= let s:save_cpo = &cpo @@ -432,7 +432,7 @@ function! s:line(tabline, inactive) abort let _ .= i < l + len(lt) - len(l_) && ll[i] < l || ll[i] != ll[i + 1] ? p.left : len(lt[i]) ? s.left : '' endfor let _ .= '%#LightlineMiddle_' . mode . '#%=' - for i in reverse(range(len(rt))) + for i in range(len(rt) - 1, 0, -1) let _ .= '%#LightlineRight_' . mode . '_' . rl[i] . '_' . rl[i + 1] . '#' let _ .= i < r + len(rt) - len(r_) && rl[i] < r || rl[i] != rl[i + 1] ? p.right : len(rt[i]) ? s.right : '' let _ .= '%#LightlineRight_' . mode . '_' . rl[i] . '#' diff --git a/sources_non_forked/lightline.vim/doc/lightline.txt b/sources_non_forked/lightline.vim/doc/lightline.txt index 5bb51eee..c94b63d0 100644 --- a/sources_non_forked/lightline.vim/doc/lightline.txt +++ b/sources_non_forked/lightline.vim/doc/lightline.txt @@ -4,7 +4,7 @@ Version: 0.1 Author: itchyny (https://github.com/itchyny) License: MIT License Repository: https://github.com/itchyny/lightline.vim -Last Change: 2019/12/27 18:23:29. +Last Change: 2020/01/28 18:40:21. CONTENTS *lightline-contents* @@ -148,7 +148,7 @@ OPTIONS *lightline-option* \ [ 'gitbranch', 'readonly', 'filename', 'modified' ] ] \ }, \ 'component_function': { - \ 'gitbranch': 'fugitive#head' + \ 'gitbranch': 'FugitiveHead' \ }, \ } < @@ -316,8 +316,8 @@ nice. return &readonly ? 'î‚¢' : '' endfunction function! LightlineFugitive() - if exists('*fugitive#head') - let branch = fugitive#head() + if exists('*FugitiveHead') + let branch = FugitiveHead() return branch !=# '' ? 'î‚ '.branch : '' endif return '' @@ -341,8 +341,8 @@ look nice. return &readonly ? 'â­¤' : '' endfunction function! LightlineFugitive() - if exists('*fugitive#head') - let branch = fugitive#head() + if exists('*FugitiveHead') + let branch = FugitiveHead() return branch !=# '' ? 'â­  '.branch : '' endif return '' @@ -742,8 +742,8 @@ A nice example for non-patched font users. \ (LightlineModified() !=# '' ? ' ' . LightlineModified() : '') endfunction function! LightlineFugitive() - if &ft !~? 'vimfiler' && exists('*fugitive#head') - return fugitive#head() + if &ft !~? 'vimfiler' && exists('*FugitiveHead') + return FugitiveHead() endif return '' endfunction @@ -777,8 +777,8 @@ A nice example for |vim-powerline| font users: \ (LightlineModified() !=# '' ? ' ' . LightlineModified() : '') endfunction function! LightlineFugitive() - if &ft !~? 'vimfiler' && exists('*fugitive#head') - let branch = fugitive#head() + if &ft !~? 'vimfiler' && exists('*FugitiveHead') + let branch = FugitiveHead() return branch !=# '' ? 'â­  '.branch : '' endif return '' @@ -836,9 +836,9 @@ For users who uses lots of plugins: function! LightlineFugitive() try - if expand('%:t') !~? 'Tagbar\|Gundo\|NERD' && &ft !~? 'vimfiler' && exists('*fugitive#head') + if expand('%:t') !~? 'Tagbar\|Gundo\|NERD' && &ft !~? 'vimfiler' && exists('*FugitiveHead') let mark = '' " edit here for cool mark - let branch = fugitive#head() + let branch = FugitiveHead() return branch !=# '' ? mark.branch : '' endif catch diff --git a/sources_non_forked/nerdtree/CHANGELOG.md b/sources_non_forked/nerdtree/CHANGELOG.md index c8989ef3..e163c6c9 100644 --- a/sources_non_forked/nerdtree/CHANGELOG.md +++ b/sources_non_forked/nerdtree/CHANGELOG.md @@ -7,7 +7,12 @@ in an unordered list. The format is: - **.PATCH**: Pull Request Title (PR Author) [PR Number](Link to PR) --> +#### 6.5 +- **.0**: `NERDTreeToggle ` always sets NERDTree root. (PhilRunninger) [#1083](https://github.com/preservim/nerdtree/pull/1083) #### 6.4 +- **.6**: NERDTreeFind shows expected message if file doesn't exist e.g. with vim-startify (andys8). [#1081](https://github.com/preservim/nerdtree/pull/1081) +- **.5**: Ensure events are (or aren't) being ignored correctly. (PhilRunninger) [#1080](https://github.com/preservim/nerdtree/pull/1080) +- **.4**: Prevent overwriting existing files/dirs on node move. (PhilRunninger) [#1079](https://github.com/preservim/nerdtree/pull/1079) - **.3**: Fix regex that finds keyword for minimal menu. (PhilRunninger) [#1075](https://github.com/preservim/nerdtree/pull/1075) - **.2**: Lint vimscript, fix errors and warnings, add CI job to review PRs (Caleb Maclennan) [#1071](https://github.com/preservim/nerdtree/pull/1071) - **.1**: Ensure backward compatibility. v:t_func is not available before Vim 8.0 (Phil Runninger) diff --git a/sources_non_forked/nerdtree/autoload/nerdtree.vim b/sources_non_forked/nerdtree/autoload/nerdtree.vim index 5c9af895..156b2602 100644 --- a/sources_non_forked/nerdtree/autoload/nerdtree.vim +++ b/sources_non_forked/nerdtree/autoload/nerdtree.vim @@ -169,8 +169,11 @@ function! nerdtree#exec(cmd, ignoreAll) abort if a:ignoreAll set eventignore=all endif - exec a:cmd - let &eventignore = old_ei + try + exec a:cmd + finally + let &eventignore = old_ei + endtry endfunction " FUNCTION: nerdtree#has_opt(options, name) {{{2 diff --git a/sources_non_forked/nerdtree/autoload/nerdtree/ui_glue.vim b/sources_non_forked/nerdtree/autoload/nerdtree/ui_glue.vim index 400e52dc..57af126b 100644 --- a/sources_non_forked/nerdtree/autoload/nerdtree/ui_glue.vim +++ b/sources_non_forked/nerdtree/autoload/nerdtree/ui_glue.vim @@ -284,15 +284,16 @@ endfunction " FUNCTION: s:findAndRevealPath(pathStr) {{{1 function! s:findAndRevealPath(pathStr) abort let l:pathStr = !empty(a:pathStr) ? a:pathStr : expand('%:p') - if !filereadable(l:pathStr) - let l:pathStr = fnamemodify(l:pathStr, ':h') - endif if empty(l:pathStr) call nerdtree#echoWarning('no file for the current buffer') return endif + if !filereadable(l:pathStr) + let l:pathStr = fnamemodify(l:pathStr, ':h') + endif + try let l:pathStr = g:NERDTreePath.Resolve(l:pathStr) let l:pathObj = g:NERDTreePath.New(l:pathStr) diff --git a/sources_non_forked/nerdtree/doc/NERDTree.txt b/sources_non_forked/nerdtree/doc/NERDTree.txt index 857e6823..e2dd56a3 100644 --- a/sources_non_forked/nerdtree/doc/NERDTree.txt +++ b/sources_non_forked/nerdtree/doc/NERDTree.txt @@ -122,8 +122,9 @@ The following features and functionality are provided by the NERDTree: :NERDTreeToggle [ | ] *:NERDTreeToggle* If a NERDTree already exists for this tab, it is reopened and rendered - again. If no NERDTree exists for this tab then this command acts the - same as the |:NERDTree| command. + again. If or is given, the root of NERDTree + is set to that path. If no NERDTree exists for this tab then this command + acts the same as the |:NERDTree| command. :NERDTreeToggleVCS [ | ] *:NERDTreeToggleVCS* Like |:NERDTreeToggle|, but searches up the directory tree to find the top of diff --git a/sources_non_forked/nerdtree/lib/nerdtree/creator.vim b/sources_non_forked/nerdtree/lib/nerdtree/creator.vim index 39e3f554..e2b3fa0a 100644 --- a/sources_non_forked/nerdtree/lib/nerdtree/creator.vim +++ b/sources_non_forked/nerdtree/lib/nerdtree/creator.vim @@ -333,14 +333,17 @@ function! s:Creator._tabpagevar(tabnr, var) let old_ei = &eventignore set eventignore=all - exec 'tabnext ' . a:tabnr - let v = -1 - if exists('t:' . a:var) - exec 'let v = t:' . a:var - endif - exec 'tabnext ' . currentTab + try + exec 'tabnext ' . a:tabnr + let v = -1 + if exists('t:' . a:var) + exec 'let v = t:' . a:var + endif + exec 'tabnext ' . currentTab - let &eventignore = old_ei + finally + let &eventignore = old_ei + endtry return v endfunction @@ -352,17 +355,20 @@ function! s:Creator.ToggleTabTree(dir) endfunction " 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) +" Toggles the NERD tree. I.e if the NERD tree is open, it is closed. If it is +" closed, it is restored or initialized. If dir is not empty, it will be set +" as the new root. " " Args: -" dir: the full path for the root node (is only used if the NERD tree is being -" initialized. +" dir: the full path for the root node (is used if the NERD tree is being +" initialized, or to change the root to a new dir.) function! s:Creator.toggleTabTree(dir) if g:NERDTree.ExistsForTab() if !g:NERDTree.IsOpen() call self._createTreeWin() - if !&hidden + if !empty(a:dir) + call self.createTabTree(a:dir) + elseif !&hidden call b:NERDTree.render() endif call b:NERDTree.ui.restoreScreenState() diff --git a/sources_non_forked/nerdtree/nerdtree_plugin/fs_menu.vim b/sources_non_forked/nerdtree/nerdtree_plugin/fs_menu.vim index 3ecfa816..281116fd 100644 --- a/sources_non_forked/nerdtree/nerdtree_plugin/fs_menu.vim +++ b/sources_non_forked/nerdtree/nerdtree_plugin/fs_menu.vim @@ -141,12 +141,12 @@ function! s:renameBuffer(bufNum, newNodeName, isDirectory) let editStr = g:NERDTreePath.New(a:newNodeName).str({'format': 'Edit'}) endif " 1. ensure that a new buffer is loaded - call nerdtree#exec('badd ' . quotedFileName, 1) + call nerdtree#exec('badd ' . quotedFileName, 0) " 2. ensure that all windows which display the just deleted filename " display a buffer for a new filename. let s:originalTabNumber = tabpagenr() let s:originalWindowNumber = winnr() - call nerdtree#exec('tabdo windo if winbufnr(0) ==# ' . a:bufNum . " | exec ':e! " . editStr . "' | endif", 1) + call nerdtree#exec('tabdo windo if winbufnr(0) ==# ' . a:bufNum . " | exec ':e! " . editStr . "' | endif", 0) call nerdtree#exec('tabnext ' . s:originalTabNumber, 1) call nerdtree#exec(s:originalWindowNumber . 'wincmd w', 1) " 3. We don't need a previous buffer anymore @@ -196,6 +196,11 @@ function! NERDTreeMoveNode() let curNode = g:NERDTreeFileNode.GetSelected() let prompt = s:inputPrompt('move') let newNodePath = input(prompt, curNode.path.str(), 'file') + while filereadable(newNodePath) + call nerdtree#echoWarning('This destination already exists. Try again.') + let newNodePath = input(prompt, curNode.path.str(), 'file') + endwhile + if newNodePath ==# '' call nerdtree#echo('Node Renaming Aborted.') diff --git a/sources_non_forked/nginx.vim/README.md b/sources_non_forked/nginx.vim/README.md index 58eceefa..669159ad 100644 --- a/sources_non_forked/nginx.vim/README.md +++ b/sources_non_forked/nginx.vim/README.md @@ -51,22 +51,27 @@ For help with secure cipher selection, visit [Mozillas SSL Configuration Generat ## Installation -### Pathogen +Install using any vim plugin manager. If you're not familiar with any, go with Plug ([``vim-plug``](https://github.com/junegunn/vim-plug)). +Then install this plugin using the your vim's plugin manager as follows: -```bash -git clone https://github.com/chr4/nginx.vim ~/.vim/bundle/nginx.vim +### Plug +``` +Plug 'chr4/nginx.vim' ``` -### Other (Plug, Dein.vim, Vundle) -```vim -" Plug -Plug 'chr4/nginx.vim' - -" Dein.vim +### Dein.vim +``` call dein#add('chr4/nginx.vim') +``` -" Vundle +### Vundle +``` Plugin 'chr4/nginx.vim' ``` +### Pathogen +``` +git clone https://github.com/chr4/nginx.vim ~/.vim/bundle/nginx.vim +``` + Optionally, if you like [Jinja](http://jinja.pocoo.org/) template syntax highlighting, install `lepture/vim-jinja`, too. diff --git a/sources_non_forked/rust.vim/autoload/cargo.vim b/sources_non_forked/rust.vim/autoload/cargo.vim index 01ab2ccc..b84f62a8 100644 --- a/sources_non_forked/rust.vim/autoload/cargo.vim +++ b/sources_non_forked/rust.vim/autoload/cargo.vim @@ -65,6 +65,10 @@ function! cargo#build(args) call cargo#cmd("build " . a:args) endfunction +function! cargo#check(args) + call cargo#cmd("check " . a:args) +endfunction + function! cargo#clean(args) call cargo#cmd("clean " . a:args) endfunction diff --git a/sources_non_forked/rust.vim/autoload/rustfmt.vim b/sources_non_forked/rust.vim/autoload/rustfmt.vim index 7fd9b43c..4a5f86cc 100644 --- a/sources_non_forked/rust.vim/autoload/rustfmt.vim +++ b/sources_non_forked/rust.vim/autoload/rustfmt.vim @@ -60,18 +60,19 @@ function! s:RustfmtWriteMode() endif endfunction -function! s:RustfmtConfig() +function! s:RustfmtConfigOptions() let l:rustfmt_toml = findfile('rustfmt.toml', expand('%:p:h') . ';') if l:rustfmt_toml !=# '' - return '--config-path '.l:rustfmt_toml + return '--config-path '.fnamemodify(l:rustfmt_toml, ":p") endif let l:_rustfmt_toml = findfile('.rustfmt.toml', expand('%:p:h') . ';') if l:_rustfmt_toml !=# '' - return '--config-path '.l:_rustfmt_toml + return '--config-path '.fnamemodify(l:_rustfmt_toml, ":p") endif - return '' + " Default to edition 2018 in case no rustfmt.toml was found. + return '--edition 2018' endfunction function! s:RustfmtCommandRange(filename, line1, line2) @@ -82,7 +83,7 @@ function! s:RustfmtCommandRange(filename, line1, line2) let l:arg = {"file": shellescape(a:filename), "range": [a:line1, a:line2]} let l:write_mode = s:RustfmtWriteMode() - let l:rustfmt_config = s:RustfmtConfig() + let l:rustfmt_config = s:RustfmtConfigOptions() " FIXME: When --file-lines gets to be stable, add version range checking " accordingly. @@ -96,14 +97,9 @@ function! s:RustfmtCommandRange(filename, line1, line2) endfunction function! s:RustfmtCommand() - if g:rustfmt_emit_files - let l:write_mode = "--emit=stdout" - else - let l:write_mode = "--write-mode=display" - endif - " rustfmt will pick on the right config on its own due to the - " current directory change. - return g:rustfmt_command . " ". l:write_mode . " " . g:rustfmt_options + let write_mode = g:rustfmt_emit_files ? '--emit=stdout' : '--write-mode=display' + let config = s:RustfmtConfigOptions() + return join([g:rustfmt_command, write_mode, config, g:rustfmt_options]) endfunction function! s:DeleteLines(start, end) abort diff --git a/sources_non_forked/rust.vim/plugin/cargo.vim b/sources_non_forked/rust.vim/plugin/cargo.vim index 5cd413cc..efc38768 100644 --- a/sources_non_forked/rust.vim/plugin/cargo.vim +++ b/sources_non_forked/rust.vim/plugin/cargo.vim @@ -7,6 +7,7 @@ set cpoptions&vim command! -nargs=+ Cargo call cargo#cmd() command! -nargs=* Cbuild call cargo#build() +command! -nargs=* Ccheck call cargo#check() command! -nargs=* Cclean call cargo#clean() command! -nargs=* Cdoc call cargo#doc() command! -nargs=+ Cnew call cargo#new() diff --git a/sources_non_forked/vim-fugitive/autoload/fugitive.vim b/sources_non_forked/vim-fugitive/autoload/fugitive.vim index fbd90e17..2823ec13 100644 --- a/sources_non_forked/vim-fugitive/autoload/fugitive.vim +++ b/sources_non_forked/vim-fugitive/autoload/fugitive.vim @@ -42,7 +42,7 @@ function! s:Uniq(list) abort endfunction function! s:winshell() abort - return has('win32') && &shellcmdflag =~# '^/\|^-Command$' + return has('win32') && &shellcmdflag !~# '^-' endfunction function! s:shellesc(arg) abort @@ -138,6 +138,19 @@ function! s:executable(binary) abort return s:executables[a:binary] endfunction +if !exists('s:temp_scripts') + let s:temp_scripts = {} +endif +function! s:TempScript(...) abort + let body = join(a:000, "\n") + if !has_key(s:temp_scripts, body) + let temp = tempname() . '.sh' + call writefile(['#!/bin/sh'] + a:000, temp) + let s:temp_scripts[body] = temp + endif + return FugitiveGitPath(s:temp_scripts[body]) +endfunction + function! s:DoAutocmd(cmd) abort if v:version >= 704 || (v:version == 703 && has('patch442')) return 'doautocmd ' . a:cmd @@ -244,6 +257,25 @@ function! s:QuickfixStream(nr, event, title, cmd, first, callback, ...) abort endif endfunction +let s:common_efm = '' + \ . '%+Egit:%.%#,' + \ . '%+Eusage:%.%#,' + \ . '%+Eerror:%.%#,' + \ . '%+Efatal:%.%#,' + \ . '%-G%.%#%\e[K%.%#,' + \ . '%-G%.%#%\r%.%\+' + +function! fugitive#Cwindow() abort + if &buftype == 'quickfix' + cwindow + else + botright cwindow + if &buftype == 'quickfix' + wincmd p + endif + endif +endfunction + " Section: Git function! s:UserCommandList(...) abort @@ -414,17 +446,24 @@ function! fugitive#PrepareDirEnvArgv(...) abort return [dir, env, cmd] endfunction +function! s:BuildEnvPrefix(env) abort + let pre = '' + let env = items(a:env) + if empty(env) + return '' + elseif &shellcmdflag =~# '-Command' + return join(map(env, '"$Env:" . v:val[0] . " = ''" . substitute(v:val[1], "''", "''''", "g") . "''; "'), '') + elseif s:winshell() + return join(map(env, '"set " . substitute(join(v:val, "="), "[&|<>^]", "^^^&", "g") . "& "'), '') + else + return 'env ' . s:shellesc(map(env, 'join(v:val, "=")')) . ' ' + endif +endfunction + function! s:BuildShell(dir, env, args) abort let cmd = copy(a:args) let tree = s:Tree(a:dir) - let pre = '' - for [var, val] in items(a:env) - if s:winshell() - let pre .= 'set ' . var . '=' . s:shellesc(val) . '& ' - else - let pre = (len(pre) ? pre : 'env ') . var . '=' . s:shellesc(val) . ' ' - endif - endfor + let pre = s:BuildEnvPrefix(a:env) if empty(tree) || index(cmd, '--') == len(cmd) - 1 call insert(cmd, '--git-dir=' . FugitiveGitPath(a:dir)) elseif fugitive#GitVersion(1, 8, 5) @@ -1260,17 +1299,16 @@ function! fugitive#setfperm(url, perm) abort endfunction function! s:TempCmd(out, cmd) abort - let prefix = '' try let cmd = (type(a:cmd) == type([]) ? fugitive#Prepare(a:cmd) : a:cmd) let redir = ' > ' . a:out - if s:winshell() + if (s:winshell() || &shellcmdflag ==# '-Command') && !has('nvim') let cmd_escape_char = &shellxquote == '(' ? '^' : '^^^' - return s:SystemError('cmd /c "' . prefix . s:gsub(cmd, '[<>]', cmd_escape_char . '&') . redir . '"') + return s:SystemError('cmd /c "' . s:gsub(cmd, '[<>%]', cmd_escape_char . '&') . redir . '"') elseif &shell =~# 'fish' - return s:SystemError(' begin;' . prefix . cmd . redir . ';end ') + return s:SystemError(' begin;' . cmd . redir . ';end ') else - return s:SystemError(' (' . prefix . cmd . redir . ') ') + return s:SystemError(' (' . cmd . redir . ') ') endif endtry endfunction @@ -1555,28 +1593,16 @@ function! s:ReplaceCmd(cmd) abort if exec_error call s:throw((len(err) ? err : filereadable(temp) ? join(readfile(temp), ' ') : 'unknown error running ' . a:cmd)) endif - let temp = s:Resolve(temp) - let fn = expand('%:p') - silent exe 'keepalt file '.temp - let modelines = &modelines - try - set modelines=0 - silent keepjumps noautocmd edit! - finally - let &modelines = modelines - try - silent exe 'keepalt file '.s:fnameescape(fn) - catch /^Vim\%((\a\+)\)\=:E302:/ - endtry - call delete(temp) - if s:cpath(fnamemodify(bufname('$'), ':p'), temp) - silent! execute 'bwipeout '.bufnr('$') - endif - endtry + silent exe 'lockmarks keepalt 0read ++edit' s:fnameescape(temp) + silent keepjumps $delete _ + call delete(temp) + if s:cpath(fnamemodify(bufname('$'), ':p'), temp) + silent! execute bufnr('$') . 'bwipeout' + endif endfunction function! s:QueryLog(refspec) abort - let lines = s:LinesError(['log', '-n', '256', '--format=%h%x09%s', a:refspec, '--'])[0] + let lines = s:LinesError(['log', '-n', '256', '--pretty=format:%h%x09%s', a:refspec, '--'])[0] call map(lines, 'split(v:val, "\t")') call map(lines, '{"type": "Log", "commit": v:val[0], "subject": v:val[-1]}') return lines @@ -1626,12 +1652,28 @@ function! s:AddSection(label, lines, ...) abort call append(line('$'), ['', a:label . (len(note) ? ': ' . note : ' (' . len(a:lines) . ')')] + s:Format(a:lines)) endfunction +let s:rebase_abbrevs = { + \ 'p': 'pick', + \ 'r': 'reword', + \ 'e': 'edit', + \ 's': 'squash', + \ 'f': 'fixup', + \ 'x': 'exec', + \ 'd': 'drop', + \ 'l': 'label', + \ 't': 'reset', + \ 'm': 'merge', + \ 'b': 'break', + \ } + function! fugitive#BufReadStatus() abort let amatch = s:Slash(expand('%:p')) let b:fugitive_type = 'index' unlet! b:fugitive_reltime try silent doautocmd BufReadPre + let config = fugitive#Config() + let cmd = [fnamemodify(amatch, ':h')] setlocal noro ma nomodeline buftype=nowrite if s:cpath(fnamemodify($GIT_INDEX_FILE !=# '' ? $GIT_INDEX_FILE : fugitive#Find('.git/index'), ':p')) !=# s:cpath(amatch) @@ -1746,15 +1788,13 @@ function! fugitive#BufReadStatus() abort let b:fugitive_files['Unstaged'][dict.filename] = dict endfor - let config = fugitive#Config() - let pull_type = 'Pull' if len(pull) let rebase = fugitive#Config('branch.' . branch . '.rebase', config) if empty(rebase) let rebase = fugitive#Config('pull.rebase', config) endif - if rebase =~# '^\%(true\|yes\|on\|1\|interactive\)$' + if rebase =~# '^\%(true\|yes\|on\|1\|interactive\|merges\|preserve\)$' let pull_type = 'Rebase' elseif rebase =~# '^\%(false\|no|off\|0\|\)$' let pull_type = 'Merge' @@ -1765,20 +1805,22 @@ function! fugitive#BufReadStatus() abort if empty(push_remote) let push_remote = fugitive#Config('remote.pushDefault', config) endif - let push = len(push_remote) && len(branch) ? push_remote . '/' . branch : '' - if empty(push) - let push = pull + let fetch_remote = fugitive#Config('branch.' . branch . '.remote', config) + if empty(fetch_remote) + let fetch_remote = 'origin' + endif + if empty(push_remote) + let push_remote = fetch_remote endif - if len(pull) && get(props, 'branch.ab') !~# ' -0$' - let unpulled = s:QueryLog(head . '..' . pull) - else - let unpulled = [] + let push_default = fugitive#Config('push.default') + if empty(push_default) + let push_default = fugitive#GitVersion(2) ? 'simple' : 'matching' endif - if len(push) && !(push ==# pull && get(props, 'branch.ab') =~# '^+0 ') - let unpushed = s:QueryLog(push . '..' . head) + if push_default ==# 'upstream' + let push = pull else - let unpushed = [] + let push = len(branch) ? (push_remote ==# '.' ? '' : push_remote . '/') . branch : '' endif if isdirectory(fugitive#Find('.git/rebase-merge/')) @@ -1844,8 +1886,19 @@ function! fugitive#BufReadStatus() abort let unstaged_end = len(unstaged) ? line('$') : 0 call s:AddSection('Staged', staged) let staged_end = len(staged) ? line('$') : 0 - call s:AddSection('Unpushed to ' . push, unpushed) - call s:AddSection('Unpulled from ' . pull, unpulled) + + if len(pull) && get(props, 'branch.ab') !~# ' -0$' + call s:AddSection('Unpulled from ' . pull, s:QueryLog(head . '..' . pull)) + endif + if len(push) && push !=# pull + call s:AddSection('Unpulled from ' . push, s:QueryLog(head . '..' . push)) + endif + if len(pull) && push !=# pull + call s:AddSection('Unpushed to ' . pull, s:QueryLog(pull . '..' . head)) + endif + if len(push) && !(push ==# pull && get(props, 'branch.ab') =~# '^+0 ') + call s:AddSection('Unpushed to ' . push, s:QueryLog(push . '..' . head)) + endif setlocal nomodified readonly noswapfile silent doautocmd BufReadPost @@ -1916,7 +1969,7 @@ function! fugitive#BufReadStatus() abort endfor let b:fugitive_reltime = reltime() - return '' + return 'silent ' . s:DoAutocmd('User FugitiveIndex') catch /^fugitive:/ return 'echoerr ' . string(v:exception) endtry @@ -2019,7 +2072,7 @@ function! fugitive#BufReadCmd(...) abort setlocal endofline try - silent doautocmd BufReadPre + silent exe s:DoAutocmd('BufReadPre') if b:fugitive_type ==# 'tree' let b:fugitive_display_format = b:fugitive_display_format % 2 if b:fugitive_display_format @@ -2043,6 +2096,7 @@ function! fugitive#BufReadCmd(...) abort call s:ReplaceCmd([dir, 'cat-file', b:fugitive_type, rev]) else call s:ReplaceCmd([dir, 'show', '--no-color', '-m', '--first-parent', '--pretty=format:tree%x20%T%nparent%x20%P%nauthor%x20%an%x20<%ae>%x20%ad%ncommitter%x20%cn%x20<%ce>%x20%cd%nencoding%x20%e%n%n%s%n%n%b', rev]) + keepjumps 1 keepjumps call search('^parent ') if getline('.') ==# 'parent ' silent keepjumps delete_ @@ -2079,8 +2133,16 @@ function! fugitive#BufReadCmd(...) abort endtry setlocal modifiable + + let browsex = maparg('NetrwBrowseX', 'n') + let remote_check = '\Cnetrw#CheckIfRemote(\%(netrw#GX()\)\=)' + if browsex =~# remote_check + exe 'nnoremap NetrwBrowseX' substitute(browsex, remote_check, '0', 'g') + endif + return 'silent ' . s:DoAutocmd('BufReadPost') . - \ (modifiable ? '' : '|setl nomodifiable') + \ (modifiable ? '' : '|setl nomodifiable') . '|silent ' . + \ s:DoAutocmd('User Fugitive' . substitute(b:fugitive_type, '^\l', '\u&', '')) catch /^fugitive:/ return 'echoerr ' . string(v:exception) endtry @@ -2119,9 +2181,7 @@ function! s:TempReadPre(file) abort setlocal nomodeline setlocal bufhidden=delete nobuflisted setlocal buftype=nowrite - if has_key(dict, 'modifiable') - let &l:modifiable = dict.modifiable - endif + setlocal nomodifiable if len(dict.dir) let b:git_dir = dict.dir call extend(b:, {'fugitive_type': 'temp'}, 'keep') @@ -2154,6 +2214,124 @@ augroup END " Section: :Git +function! s:RunJobs() abort + return exists('*job_start') || exists('*jobstart') +endfunction + +function! s:RunReceive(state, job, data, ...) abort + call add(a:state.log, a:data) + let data = type(a:data) == type([]) ? join(a:data, "\n") : a:data + if has_key(a:state, 'buffer') + let data = remove(a:state, 'buffer') . data + endif + let escape = "\033]51;[^\007]*" + let a:state.buffer = matchstr(data, escape . "$\\|[\r\n]\\+$") + if len(a:state.buffer) + let data = strpart(data, 0, len(data) - len(a:state.buffer)) + endif + let cmd = matchstr(data, escape . "\007")[5:-2] + let data = substitute(data, escape . "\007", '', 'g') + echon substitute(data, "\r\\ze\n", '', 'g') + if cmd =~# '^fugitive:' + let a:state.request = strpart(cmd, 9) + endif +endfunction + +function! s:RunSend(job, str) abort + try + if type(a:job) == type(0) + call chansend(a:job, a:str) + else + call ch_sendraw(a:job, a:str) + endif + return len(a:str) + catch /^Vim\%((\a\+)\)\=:E90[06]:/ + return 0 + endtry +endfunction + +if !exists('s:edit_jobs') + let s:edit_jobs = {} +endif +function! s:RunWait(state, job) abort + let finished = 0 + try + while get(a:state, 'request', '') !=# 'edit' && (type(a:job) == type(0) ? jobwait([a:job], 1)[0] == -1 : ch_status(a:job) !=# 'closed') + if !exists('*jobwait') + sleep 1m + endif + let peek = getchar(1) + if peek != 0 && !(has('win32') && peek == 128) + let c = getchar() + let c = type(c) == type(0) ? nr2char(c) : c + call s:RunSend(a:job, c) + if !a:state.pty + echon c + endif + endif + endwhile + sleep 1m + echo + if get(a:state, 'request', '') == 'edit' + call remove(a:state, 'request') + let file = readfile(a:state.temp . '.edit')[0] + exe substitute(a:state.mods, '\', '-tab', 'g') 'keepalt split' s:fnameescape(file) + set bufhidden=wipe + let s:edit_jobs[bufnr('')] = [a:state, a:job] + endif + let finished = 1 + finally + if !finished + try + if a:state.pty + call s:RunSend(a:job, "\") + elseif type(a:job) == type(0) + call jobstop(a:job) + else + call job_stop(a:job) + endif + catch /.*/ + endtry + endif + endtry + call fugitive#ReloadStatus(a:state.dir, 1) + return '' +endfunction + +if !exists('s:resume_queue') + let s:resume_queue = [] +endif +function! fugitive#Resume() abort + while len(s:resume_queue) + let [state, job] = remove(s:resume_queue, 0) + call s:RunWait(state, job) + endwhile +endfunction + +function! s:RunBufDelete(bufnr) abort + if has_key(s:edit_jobs, a:bufnr) | + if filereadable(s:edit_jobs[a:bufnr][0].temp . '.edit') + call delete(s:edit_jobs[a:bufnr][0].temp . '.edit') + endif + call add(s:resume_queue, remove(s:edit_jobs, a:bufnr)) + call feedkeys(":redraw!|call fugitive#Resume()|silent checktime\r", 'n') + endif +endfunction + +augroup fugitive_job + autocmd! + autocmd BufDelete * call s:RunBufDelete(expand('')) + autocmd VimLeave * + \ for s:jobbuf in keys(s:edit_jobs) | + \ call writefile([], remove(s:edit_jobs, s:jobbuf)[0].temp . '.exit') | + \ endfor +augroup END + +let s:disable_colors = [] +for s:colortype in ['advice', 'branch', 'diff', 'grep', 'interactive', 'pager', 'push', 'remote', 'showBranch', 'status', 'transport', 'ui'] + call extend(s:disable_colors, ['-c', 'color.' . s:colortype . '=false']) +endfor +unlet s:colortype function! fugitive#Command(line1, line2, range, bang, mods, arg) abort let dir = s:Dir() let [args, after] = s:SplitExpandChain(a:arg, s:Tree(dir)) @@ -2171,22 +2349,27 @@ function! fugitive#Command(line1, line2, range, bang, mods, arg) abort if exists('*s:' . name . 'Subcommand') && get(args, 1, '') !=# '--help' try exe s:DirCheck(dir) - let result = s:{name}Subcommand(a:line1, a:line2, a:range, a:bang, a:mods, args[1:-1]) - if type(result) == type('') - return 'exe ' . string(result) . after + let opts = s:{name}Subcommand(a:line1, a:line2, a:range, a:bang, a:mods, args[1:-1]) + if type(opts) == type('') + return 'exe ' . string(opts) . after endif catch /^fugitive:/ return 'echoerr ' . string(v:exception) endtry + else + let opts = {} endif - if a:bang || args[0] =~# '^-P$\|^--no-pager$\|diff\%(tool\)\@!\|log\|^show$' || + let args = get(opts, 'args', args) + if a:bang || args[0] =~# '^-p$\|^--paginate$\|diff\%(tool\)\@!\|log\|^show$' || \ (args[0] ==# 'stash' && get(args, 1, '') ==# 'show') || \ (args[0] ==# 'help' || get(args, 1, '') ==# '--help') && !s:HasOpt(args, '--web') + if args[0] =~# '^-p$\|^--paginate$' + call remove(args, 0) + endif return s:OpenExec((a:line2 > 0 ? a:line2 : '') . (a:line2 ? 'split' : 'edit'), a:mods, args, dir) . after endif if s:HasOpt(args, ['add', 'checkout', 'commit', 'stage', 'stash', 'reset'], '-p', '--patch') || - \ s:HasOpt(args, ['add', 'clean', 'stage'], '-i', '--interactive') || - \ index(['--paginate', '-p'], args[0]) >= 0 + \ s:HasOpt(args, ['add', 'clean', 'stage'], '-i', '--interactive') let mods = substitute(s:Mods(a:mods), '\', '-tab', 'g') let assign = len(dir) ? '|let b:git_dir = ' . string(dir) : '' if has('nvim') @@ -2197,16 +2380,81 @@ function! fugitive#Command(line1, line2, range, bang, mods, arg) abort return 'exe ' . string(mods . 'terminal ' . (a:line2 ? '' : '++curwin ') . join(map(s:UserCommandList(dir) + args, 's:fnameescape(v:val)'))) . assign . after endif endif - if has('gui_running') && !has('win32') - call insert(args, '--no-pager') + let env = get(opts, 'env', {}) + if s:RunJobs() + let state = {'dir': dir, 'mods': s:Mods(a:mods), 'temp': tempname(), 'log': []} + let state.pty = get(g:, 'fugitive_pty', has('unix') && (has('patch-8.0.0744') || has('nvim'))) + if !state.pty + let args = s:AskPassArgs(dir) + args + endif + let env.FUGITIVE_TEMP = state.temp + let editor = 'sh ' . s:TempScript( + \ '[ -f "$FUGITIVE_TEMP.exit" ] && exit 1', + \ 'echo "$1" > "$FUGITIVE_TEMP.edit"', + \ 'printf "\033]51;fugitive:edit\007"', + \ 'while [ -f "$FUGITIVE_TEMP.edit" -a ! -f "$FUGITIVE_TEMP.exit" ]; do sleep 0.05 2>/dev/null || sleep 1; done', + \ 'exit 0') + call extend(env, { + \ 'NO_COLOR': '1', + \ 'GIT_EDITOR': editor, + \ 'GIT_SEQUENCE_EDITOR': editor, + \ 'GIT_MERGE_AUTOEDIT': '1', + \ 'GIT_PAGER': 'cat', + \ 'PAGER': 'cat'}, 'keep') + let args = ['-c', 'advice.waitingForEditor=false'] + s:disable_colors + args + let argv = s:UserCommandList(dir) + args + if !has('patch-8.0.0902') || has('nvim') + let envlist = map(items(env), 'join(v:val, "=")') + if s:executable('env') + let argv = ['env'] + envlist + argv + elseif has('win32') + let argv = ['cmd.exe', '/c', + \ join(map(envlist, { _, v -> 'set ' . substitute(v, '[&|<>^]', '^^^&', 'g') }) + + \ [s:shellesc(argv)], '& ')] + else + return 'echoerr ' . string('fugitive: "env" command missing') + endif + let env = {} + endif + let state.cmd = argv + let g:_fugitive_last_job = state + if &autowrite || &autowriteall | silent! wall | endif + if exists('*job_start') + let jobopts = { + \ 'mode': 'raw', + \ 'callback': function('s:RunReceive', [state]), + \ } + if state.pty + let jobopts.pty = 1 + endif + if len(env) + let jobopts.env = env + endif + let job = job_start(argv, jobopts) + else + let job = jobstart(argv, { + \ 'pty': state.pty, + \ 'env': env, + \ 'TERM': 'dumb', + \ 'on_stdout': function('s:RunReceive', [state]), + \ 'on_stderr': function('s:RunReceive', [state]), + \ }) + endif + let state.job = job + call s:RunWait(state, job) + return 'silent checktime' . after + else + if has('gui_running') && !has('win32') + call insert(args, '--no-pager') + endif + if has('nvim') + let env.GIT_TERMINAL_PROMPT = '0' + endif + let pre = s:BuildEnvPrefix(env) + return 'exe ' . string('noautocmd !' . escape(pre . s:UserCommand(dir, args), '!#%')) . + \ '|call fugitive#ReloadStatus(' . string(dir) . ', 1)' . + \ after endif - let pre = '' - if has('nvim') && executable('env') - let pre .= 'env GIT_TERMINAL_PROMPT=0 ' - endif - return 'exe ' . string('noautocmd !' . escape(pre . s:UserCommand(dir, args), '!#%')) . - \ '|call fugitive#ReloadStatus(' . string(dir) . ', 1)' . - \ after endfunction let s:exec_paths = {} @@ -3206,7 +3454,7 @@ function! s:DoStageUnpushedHeading(heading) abort let remote = '.' endif let branch = matchstr(a:heading, 'to \%([^/]\+/\)\=\zs\S\+') - call feedkeys(':Gpush ' . remote . ' ' . 'HEAD:' . branch) + call feedkeys(':Git push ' . remote . ' ' . 'HEAD:' . 'refs/heads/' . branch) endfunction function! s:DoToggleUnpushedHeading(heading) abort @@ -3219,7 +3467,7 @@ function! s:DoStageUnpushed(record) abort let remote = '.' endif let branch = matchstr(a:record.heading, 'to \%([^/]\+/\)\=\zs\S\+') - call feedkeys(':Gpush ' . remote . ' ' . a:record.commit . ':' . branch) + call feedkeys(':Git push ' . remote . ' ' . a:record.commit . ':' . 'refs/heads/' . branch) endfunction function! s:DoToggleUnpushed(record) abort @@ -3227,7 +3475,7 @@ function! s:DoToggleUnpushed(record) abort endfunction function! s:DoUnstageUnpulledHeading(heading) abort - call feedkeys(':Grebase') + call feedkeys(':Git rebase') endfunction function! s:DoToggleUnpulledHeading(heading) abort @@ -3235,7 +3483,7 @@ function! s:DoToggleUnpulledHeading(heading) abort endfunction function! s:DoUnstageUnpulled(record) abort - call feedkeys(':Grebase ' . a:record.commit) + call feedkeys(':Git rebase ' . a:record.commit) endfunction function! s:DoToggleUnpulled(record) abort @@ -3243,7 +3491,7 @@ function! s:DoToggleUnpulled(record) abort endfunction function! s:DoUnstageUnpushed(record) abort - call feedkeys(':Grebase --autosquash ' . a:record.commit . '^') + call feedkeys(':Git rebase --autosquash ' . a:record.commit . '^') endfunction function! s:DoToggleStagedHeading(...) abort @@ -3370,109 +3618,28 @@ function! s:CommitInteractive(line1, line2, range, bang, mods, args, patch) abor endif endfunction -function! s:CommitSubcommand(line1, line2, range, bang, mods, args, ...) abort - let mods = substitute(s:Mods(a:mods), '\C\', '-tab', 'g') - let dir = a:0 ? a:1 : s:Dir() - let tree = s:Tree(dir) - let msgfile = fugitive#Find('.git/COMMIT_EDITMSG', dir) - let outfile = tempname() - try - if s:winshell() - let command = 'set GIT_EDITOR=false& ' +function! s:CommitSubcommand(line1, line2, range, bang, mods, args) abort + let argv = copy(a:args) + let i = 0 + while get(argv, i, '--') !=# '--' + if argv[i] =~# '^-[apzsneiovq].' + call insert(argv, argv[i][0:1]) + let argv[i+1] = '-' . argv[i+1][2:-1] else - let command = 'env GIT_EDITOR=false ' + let i += 1 endif - let argv = a:args - let i = 0 - while get(argv, i, '--') !=# '--' - if argv[i] =~# '^-[apzsneiovq].' - call insert(argv, argv[i][0:1]) - let argv[i+1] = '-' . argv[i+1][2:-1] - else - let i += 1 - endif - endwhile - let command .= s:UserCommand(dir, ['commit'] + argv) - if (&autowrite || &autowriteall) && !a:0 - silent! wall - endif - if s:HasOpt(argv, '-i', '--interactive') - return s:CommitInteractive(a:line1, a:line2, a:range, a:bang, a:mods, argv, 0) - elseif s:HasOpt(argv, '-p', '--patch') - return s:CommitInteractive(a:line1, a:line2, a:range, a:bang, a:mods, argv, 1) - else - let [error_string, exec_error] = s:TempCmd(outfile, command) - let errors = split(error_string, "\n") - endif - if !has('gui_running') - redraw! - endif - if !exec_error - echo join(errors, "\n") - if filereadable(outfile) - echo join(readfile(outfile), "\n") - endif - call fugitive#ReloadStatus(dir, 1) - return '' - else - let error = get(errors,-2,get(errors,-1,'!')) - if error =~# 'false''\=\.$' - let i = 0 - while get(argv, i, '--') !=# '--' - if argv[i] =~# '^\%(-[eips]\|-[CcFm].\+\|--edit\|--interactive\|--patch\|--signoff\|--reedit-message=.*\|--reuse-message=.*\|--file=.*\|--message=.*\)$' - call remove(argv, i) - elseif argv[i] =~# '^\%(-[CcFm]\|--reedit-message\|--reuse-message\|--file\|--message\)$' - call remove(argv, i, i + 1) - else - if argv[i] =~# '^--cleanup\>' - let cleanup = 1 - endif - let i += 1 - endif - endwhile - call insert(argv, '--no-signoff', i) - call insert(argv, '--no-interactive', i) - call insert(argv, '--no-edit', i) - if !exists('cleanup') - call insert(argv, '--cleanup=strip') - endif - call extend(argv, ['-F', msgfile], 'keep') - if (bufname('%') == '' && line('$') == 1 && getline(1) == '' && !&modified) || a:line2 == 0 - execute mods . 'keepalt edit' s:fnameescape(msgfile) - elseif s:HasOpt(argv, '-v') || mods =~# '\' - execute mods . 'keepalt -tabedit' s:fnameescape(msgfile) - else - execute mods . 'keepalt split' s:fnameescape(msgfile) - endif - let b:fugitive_commit_arguments = argv - setlocal bufhidden=wipe filetype=gitcommit - return '1' - elseif empty(errors) - let out = readfile(outfile) - echo get(out, -1, '') =~# 'stash\|\d' ? get(out, -2, '') : get(out, -1, '') - return '' - else - echo join(errors, "\n") - return '' - endif - endif - catch /^fugitive:/ - return 'echoerr ' . string(v:exception) - finally - call delete(outfile) - endtry + endwhile + if s:HasOpt(argv, '-i', '--interactive') + return s:CommitInteractive(a:line1, a:line2, a:range, a:bang, a:mods, argv, 0) + elseif s:HasOpt(argv, '-p', '--patch') + return s:CommitInteractive(a:line1, a:line2, a:range, a:bang, a:mods, argv, 1) + else + return {} + endif endfunction function! s:RevertSubcommand(line1, line2, range, bang, mods, args) abort - let dir = s:Dir() - let no_commit = s:HasOpt(a:args, '-n', '--no-commit', '--no-edit', '--abort', '--continue', '--quit') - let cmd = s:UserCommand(dir, ['revert'] + (no_commit ? [] : ['-n']) + a:args) - let [out, exec_error] = s:SystemError(cmd) - call fugitive#ReloadStatus(dir, 1) - if no_commit || exec_error - return 'echo ' . string(substitute(out, "\n$", '', '')) - endif - return s:CommitSubcommand(a:line1, a:line2, a:range, a:bang, a:mods, [], dir) + return {'args': ['revert', '--edit'] + a:args} endfunction function! fugitive#CommitComplete(A, L, P) abort @@ -3496,20 +3663,6 @@ function! fugitive#RevertComplete(A, L, P) abort return s:CompleteSub('revert', a:A, a:L, a:P, function('s:CompleteRevision')) endfunction -function! s:FinishCommit() abort - let buf = +expand('') - let args = getbufvar(buf, 'fugitive_commit_arguments') - if !empty(args) - call setbufvar(buf, 'fugitive_commit_arguments', []) - if getbufvar(buf, 'fugitive_commit_rebase') - call setbufvar(buf, 'fugitive_commit_rebase', 0) - let s:rebase_continue = [s:Dir(buf), 0] - endif - return s:CommitSubcommand(-1, -1, 0, 0, '', args, s:Dir(buf)) - endif - return '' -endfunction - " Section: :Gmerge, :Grebase, :Gpull function! fugitive#MergeComplete(A, L, P) abort @@ -3524,278 +3677,24 @@ function! fugitive#PullComplete(A, L, P) abort return s:CompleteSub('pull', a:A, a:L, a:P, function('s:CompleteRemote')) endfunction -function! s:RebaseSequenceAborter() abort - if !exists('s:rebase_sequence_aborter') - let temp = tempname() . '.sh' - call writefile( - \ ['#!/bin/sh', - \ 'echo exec false | cat - "$1" > "$1.fugitive"', - \ 'mv "$1.fugitive" "$1"'], - \ temp) - let s:rebase_sequence_aborter = temp - endif - return s:rebase_sequence_aborter -endfunction - -function! fugitive#Cwindow() abort - if &buftype == 'quickfix' - cwindow - else - botright cwindow - if &buftype == 'quickfix' - wincmd p - endif - endif -endfunction - -let s:common_efm = '' - \ . '%+Egit:%.%#,' - \ . '%+Eusage:%.%#,' - \ . '%+Eerror:%.%#,' - \ . '%+Efatal:%.%#,' - \ . '%-G%.%#%\e[K%.%#,' - \ . '%-G%.%#%\r%.%\+' - -let s:rebase_abbrevs = { - \ 'p': 'pick', - \ 'r': 'reword', - \ 'e': 'edit', - \ 's': 'squash', - \ 'f': 'fixup', - \ 'x': 'exec', - \ 'd': 'drop', - \ 'l': 'label', - \ 't': 'reset', - \ 'm': 'merge', - \ 'b': 'break', - \ } - -function! s:RebaseEdit(cmd, dir) abort - let rebase_todo = s:fnameescape(fugitive#Find('.git/rebase-merge/git-rebase-todo', a:dir)) - - if filereadable(rebase_todo) - let new = readfile(rebase_todo) - let sha_length = 0 - let shas = {} - - for i in range(len(new)) - if new[i] =~# '^\l\+\s\+[0-9a-f]\{5,\}\>' - let sha = matchstr(new[i], '\C\<[a-f0-9]\{5,\}\>') - if !sha_length - let sha_length = len(s:TreeChomp(a:dir, 'rev-parse', '--short', sha)) - endif - let shortened_sha = strpart(sha, 0, sha_length) - let shas[shortened_sha] = sha - let new[i] = substitute(new[i], sha, shortened_sha, '') - endif - endfor - call writefile(new, rebase_todo) - endif - return a:cmd . ' +setlocal\ bufhidden=wipe\|' . escape('let b:fugitive_rebase_shas = ' . string(shas), ' ') . ' ' . rebase_todo -endfunction - -function! s:MergeRebase(cmd, bang, mods, args, ...) abort - let dir = a:0 ? a:1 : s:Dir() - let args = a:args - let mods = s:Mods(a:mods) - if a:cmd =~# '^rebase' && s:HasOpt(args, '-i', '--interactive') - let cmd = fugitive#Prepare(dir, '-c', 'sequence.editor=sh ' . s:RebaseSequenceAborter(), 'rebase') . ' ' . s:shellesc(args) - let out = system(cmd)[0:-2] - for file in ['end', 'msgnum'] - let file = fugitive#Find('.git/rebase-merge/' . file, dir) - if !filereadable(file) - return 'echoerr ' . string("fugitive: " . out) - endif - call writefile([readfile(file)[0] - 1], file) - endfor - call writefile([], fugitive#Find('.git/rebase-merge/done', dir)) - if a:bang - return 'exe' - endif - return s:RebaseEdit(mods . 'split', dir) - elseif a:cmd =~# '^rebase' && s:HasOpt(args, '--edit-todo') && filereadable(fugitive#Find('.git/rebase-merge/git-rebase-todo', dir)) - return s:RebaseEdit(mods . 'split', dir) - elseif a:cmd =~# '^rebase' && s:HasOpt(args, '--continue') && !a:0 - let rdir = fugitive#Find('.git/rebase-merge', dir) - let exec_error = s:ChompError([dir, 'diff-index', '--cached', '--quiet', 'HEAD', '--'])[1] - if exec_error && isdirectory(rdir) - if getfsize(rdir . '/amend') <= 0 - return 'exe ' . string(mods . 'Gcommit -n -F ' . s:fnameescape(rdir .'/message') . ' -e') . '|let b:fugitive_commit_rebase = 1' - elseif readfile(rdir . '/amend')[0] ==# fugitive#Head(-1, dir) - return 'exe ' . string(mods . 'Gcommit --amend -n -F ' . s:fnameescape(rdir . '/message') . ' -e') . '|let b:fugitive_commit_rebase = 1' - endif - endif - endif - let had_merge_msg = filereadable(fugitive#Find('.git/MERGE_MSG', dir)) - let argv = [] - if a:cmd ==# 'pull' - let argv += s:AskPassArgs(dir) + ['pull', '--progress'] - else - call add(argv, a:cmd) - endif - if !s:HasOpt(args, '--no-edit', '--abort', '-m') && a:cmd !=# 'rebase' - call add(argv, '--edit') - endif - if a:cmd ==# 'rebase' && s:HasOpt(args, '--autosquash') && !s:HasOpt(args, '--interactive', '-i') - call add(argv, '--interactive') - endif - call extend(argv, args) - - let [mp, efm] = [&l:mp, &l:efm] - try - let cdback = s:Cd(s:Tree(dir)) - let &l:errorformat = '' - \ . '%-Gerror:%.%#false''.,' - \ . '%-G%.%# ''git commit'' %.%#,' - \ . '%+Emerge:%.%#,' - \ . s:common_efm . ',' - \ . '%+ECannot %.%#: You have unstaged changes.,' - \ . '%+ECannot %.%#: Your index contains uncommitted changes.,' - \ . '%+EThere is no tracking information for the current branch.,' - \ . '%+EYou are not currently on a branch. Please specify which,' - \ . '%+I %#git rebase --continue,' - \ . 'CONFLICT (%m): %f deleted in %.%#,' - \ . 'CONFLICT (%m): Merge conflict in %f,' - \ . 'CONFLICT (%m): Rename \"%f\"->%.%#,' - \ . 'CONFLICT (%m): Rename %.%#->%f %.%#,' - \ . 'CONFLICT (%m): There is a directory with name %f in %.%#,' - \ . '%+ECONFLICT %.%#,' - \ . '%+EKONFLIKT %.%#,' - \ . '%+ECONFLIT %.%#,' - \ . "%+EXUNG \u0110\u1ed8T %.%#," - \ . "%+E\u51b2\u7a81 %.%#," - \ . 'U%\t%f' - if a:cmd =~# '^merge' && empty(args) && - \ (had_merge_msg || isdirectory(fugitive#Find('.git/rebase-apply', dir)) || - \ !empty(s:TreeChomp(dir, 'diff-files', '--diff-filter=U'))) - let cmd = g:fugitive_git_executable.' diff-files --name-status --diff-filter=U' - else - let cmd = s:UserCommand(dir, argv) - endif - if !empty($GIT_SEQUENCE_EDITOR) || has('win32') - let old_sequence_editor = $GIT_SEQUENCE_EDITOR - let $GIT_SEQUENCE_EDITOR = 'true' - else - let cmd = 'env GIT_SEQUENCE_EDITOR=true ' . cmd - endif - if !empty($GIT_EDITOR) || has('win32') - let old_editor = $GIT_EDITOR - let $GIT_EDITOR = 'false' - else - let cmd = 'env GIT_EDITOR=false ' . substitute(cmd, '^env ', '', '') - endif - if !has('patch-8.1.0334') && has('terminal') && &autowrite - let autowrite_was_set = 1 - set noautowrite - silent! wall - endif - let &l:makeprg = cmd - silent noautocmd make! - catch /^Vim\%((\a\+)\)\=:E211/ - let err = v:exception - finally - if exists('autowrite_was_set') - set autowrite - endif - redraw! - let [&l:mp, &l:efm] = [mp, efm] - if exists('old_editor') - let $GIT_EDITOR = old_editor - endif - if exists('old_sequence_editor') - let $GIT_SEQUENCE_EDITOR = old_sequence_editor - endif - execute cdback - endtry - call fugitive#ReloadStatus(dir, 1) - if empty(filter(getqflist(),'v:val.valid && v:val.type !=# "I"')) - if a:cmd =~# '^rebase' && - \ filereadable(fugitive#Find('.git/rebase-merge/done', dir)) && - \ get(readfile(fugitive#Find('.git/rebase-merge/done', dir)), -1, '') =~# '^[^bep]' - cclose - let amend = filereadable(fugitive#Find('.git/rebase-merge/amend', dir)) ? '--amend ' : '' - return 'exe ' . string(mods . 'Gcommit ' . amend . '-n -F ' . s:fnameescape(fugitive#Find('.git/rebase-merge/message', dir)) . ' -e') . '|let b:fugitive_commit_rebase = 1' - elseif !had_merge_msg && filereadable(fugitive#Find('.git/MERGE_MSG', dir)) - cclose - return mods . 'Gcommit --no-status -n -t '.s:fnameescape(fugitive#Find('.git/MERGE_MSG', dir)) - endif - endif - let qflist = getqflist() - let found = 0 - for e in qflist - if !empty(e.bufnr) - let found = 1 - let e.pattern = '^<<<<<<<' - endif - endfor - call fugitive#Cwindow() - if found - call setqflist(qflist, 'r') - if !a:bang - call s:BlurStatus() - return 'cfirst' - endif - endif - return exists('err') ? 'echoerr '.string(err) : 'exe' -endfunction - -function! s:RebaseClean(file) abort - if !filereadable(a:file) - return '' - endif - let old = readfile(a:file) - let new = copy(old) - for i in range(len(new)) - let new[i] = substitute(new[i], '^\l\>', '\=get(s:rebase_abbrevs,submatch(0),submatch(0))', '') - - let sha = matchstr(new[i], '\C\<[a-f0-9]\{5,\}\>') - let rebase_shas = getbufvar(a:file, 'fugitive_rebase_shas') - if len(sha) && type(rebase_shas) == type({}) && has_key(rebase_shas, sha) - let new[i] = substitute(new[i], '\C\<' . sha . '\>', rebase_shas[sha], '') - endif - endfor - if new !=# old - call writefile(new, a:file) - endif - return '' -endfunction - function! s:MergeSubcommand(line1, line2, range, bang, mods, args) abort - return s:MergeRebase('merge', a:bang, a:mods, a:args) + let dir = s:Dir() + if empty(a:args) && ( + \ filereadable(fugitive#Find('.git/MERGE_MSG', dir)) || + \ isdirectory(fugitive#Find('.git/rebase-apply', dir)) || + \ !empty(s:TreeChomp(dir, 'diff-files', '--diff-filter=U'))) + return 'echohl WarningMsg|echo ":Git merge for loading conflicts is deprecated in favor of :Git mergetool"|echohl NONE|silent Git' . (a:bang ? '!' : '') . ' mergetool' + endif + return {} endfunction function! s:RebaseSubcommand(line1, line2, range, bang, mods, args) abort - return s:MergeRebase('rebase', a:bang, a:mods, a:args) + if s:HasOpt(a:args, '--autosquash') && !s:HasOpt(a:args, '-i', '--interactive') + return {'env': {'GIT_SEQUENCE_EDITOR': 'true'}, 'args': ['rebase', '--interactive'] + a:args} + endif + return {} endfunction -function! s:PullSubcommand(line1, line2, range, bang, mods, args) abort - return s:MergeRebase('pull', a:bang, a:mods, a:args) -endfunction - -function! s:RebaseContinue(arg, ...) abort - let [dir, edit_todo] = a:arg - exe s:MergeRebase('rebase', 0, '', [edit_todo && getfsize(fugitive#Find('.git/rebase-merge/git-rebase-todo', dir)) <= 0 ? '--abort' : '--continue'], dir) -endfunction - -augroup fugitive_merge - autocmd! - autocmd VimLeavePre,BufDelete git-rebase-todo - \ if getbufvar(+expand(''), '&bufhidden') ==# 'wipe' | - \ call s:RebaseClean(expand('')) | - \ if getfsize(FugitiveFind('.git/rebase-merge/done', +expand(''))) == 0 | - \ let s:rebase_continue = [FugitiveGitDir(+expand('')), 1] | - \ endif | - \ endif - autocmd BufEnter * nested - \ if exists('s:rebase_continue') | - \ if has('timers') | - \ call timer_start(0, function('s:RebaseContinue', [remove(s:, 'rebase_continue')])) | - \ else | - \ call s:RebaseContinue(remove(s:, 'rebase_continue')) | - \ endif | - \ endif -augroup END - " Section: :Git difftool, :Git mergetool function! s:ToolItems(state, from, to, offsets, text, ...) abort @@ -3852,6 +3751,9 @@ function! s:ToolParse(state, line) abort let offsets = split(matchstr(a:line, '^@\+ \zs[-+0-9, ]\+\ze @'), ' ') return s:ToolItems(a:state, a:state.from, a:state.to, offsets, matchstr(a:line, ' @@\+ \zs.*')) endif + elseif a:line =~# '^\* Unmerged path .' + let file = a:line[16:-1] + return s:ToolItems(a:state, file, file, [], '') elseif a:line =~# '^[A-Z]\d*\t.\|^:.*\t.' " --raw, --name-status let [status; files] = split(a:line, "\t") @@ -3890,7 +3792,7 @@ function! s:ToolStream(dir, line1, line2, range, bang, mods, args, state, title) endif let arg = argv[i] if arg =~# '^-t$\|^--tool=\|^--tool-help$\|^--help$' - return -1 + return {} elseif arg =~# '^-y$\|^--no-prompt$' let prompt = 0 call remove(argv, i) @@ -4084,12 +3986,7 @@ function! s:GrepSubcommand(line1, line2, range, bang, mods, args) abort call add(cmd, '--column') endif let tree = s:Tree(dir) - if type(a:args) == type([]) - let [args, after] = [a:args, ''] - else - let [args, after] = s:SplitExpandChain(a:args, tree) - endif - let prefix = FugitiveVimPath(s:HasOpt(args, '--cached') || empty(tree) ? 'fugitive://' . dir . '//0/' : tree . '/') + let args = a:args let name_only = s:HasOpt(args, '-l', '--files-with-matches', '--name-only', '-L', '--files-without-match') let title = [listnr < 0 ? ':Ggrep' : ':Glgrep'] + args if listnr > 0 @@ -4102,6 +3999,9 @@ function! s:GrepSubcommand(line1, line2, range, bang, mods, args) abort let tempfile = tempname() let event = listnr < 0 ? 'grep-fugitive' : 'lgrep-fugitive' silent exe s:DoAutocmd('QuickFixCmdPre ' . event) + let prefix = FugitiveVimPath(s:HasOpt(args, '--cached') || empty(tree) ? + \ 'fugitive://' . dir . '//0/' : + \ s:cpath(getcwd(), tree) ? '' : tree . '/') exe '!' . escape(s:UserCommand(dir, cmd + args), '%#!') \ printf(&shellpipe . (&shellpipe =~# '%s' ? '' : ' %s'), s:shellesc(tempfile)) let list = map(readfile(tempfile), 's:GrepParseLine(prefix, name_only, dir, v:val)') @@ -4111,9 +4011,9 @@ function! s:GrepSubcommand(line1, line2, range, bang, mods, args) abort redraw endif if !a:bang && !empty(list) - return (listnr < 0 ? 'c' : 'l').'first' . after + return (listnr < 0 ? 'c' : 'l').'first' else - return after[1:-1] + return '' endif endfunction @@ -4408,13 +4308,7 @@ function! s:OpenExec(cmd, mods, args, ...) abort let dir = a:0 ? s:Dir(a:1) : s:Dir() let temp = tempname() let columns = get(g:, 'fugitive_columns', 80) - if columns <= 0 - let env = '' - elseif s:winshell() - let env = 'set COLUMNS=' . columns . '& ' - else - let env = 'env COLUMNS=' . columns . ' ' - endif + let env = s:BuildEnvPrefix({'COLUMNS': columns}) silent! execute '!' . escape(env . s:UserCommand(dir, ['--no-pager'] + a:args), '!#%') . \ (&shell =~# 'csh' ? ' >& ' . temp : ' > ' . temp . ' 2>&1') redraw! @@ -4425,7 +4319,7 @@ function! s:OpenExec(cmd, mods, args, ...) abort else let filetype = 'git' endif - let s:temp_files[s:cpath(temp)] = { 'dir': dir, 'filetype': filetype, 'modifiable': first =~# '^diff ' } + let s:temp_files[s:cpath(temp)] = { 'dir': dir, 'filetype': filetype } if a:cmd ==# 'edit' call s:BlurStatus() endif @@ -4512,26 +4406,8 @@ function! fugitive#WriteCommand(line1, line2, range, bang, mods, arg, args) abor return 'wq' elseif get(b:, 'fugitive_type', '') ==# 'index' return 'Gcommit' - elseif &buftype ==# 'nowrite' && getline(4) =~# '^+++ ' - let filename = getline(4)[6:-1] - setlocal buftype= - silent write - setlocal buftype=nowrite - if matchstr(getline(2),'index [[:xdigit:]]\+\.\.\zs[[:xdigit:]]\{7\}') ==# fugitive#RevParse(':0:'.filename)[0:6] - let [message, exec_error] = s:ChompError(['apply', '--cached', '--reverse', '--', expand('%:p')]) - else - let [message, exec_error] = s:ChompError(['apply', '--cached', '--', expand('%:p')]) - endif - if exec_error - echohl ErrorMsg - echo message - echohl NONE - return '' - elseif a:bang - return 'bdelete' - else - return 'Gedit '.fnameescape(filename) - endif + elseif &buftype ==# 'nowrite' && getline(4) =~# '^[+-]\{3\} ' + return 'echoerr ' . string('fugitive: :Gwrite from :Git diff has been removed in favor of :Git add --edit') endif let mytab = tabpagenr() let mybufnr = bufnr('') @@ -4667,11 +4543,6 @@ function! fugitive#WqCommand(...) abort endif endfunction -augroup fugitive_commit - autocmd! - autocmd VimLeavePre,BufDelete COMMIT_EDITMSG execute substitute(s:FinishCommit(), '\C^echoerr \(''[^'']*''\)*', 'redraw|echohl ErrorMsg|echo \1|echohl NONE', '') -augroup END - " Section: :Gpush, :Gfetch function! fugitive#PushComplete(A, L, P) abort @@ -5258,7 +5129,7 @@ function! s:BlameSubcommand(line1, count, range, bang, mods, args) abort endfor return '' endif - let temp_state = {'dir': s:Dir(), 'filetype': (raw ? '' : 'fugitiveblame'), 'blame_flags': flags, 'blame_file': file, 'modifiable': 0} + let temp_state = {'dir': s:Dir(), 'filetype': (raw ? '' : 'fugitiveblame'), 'blame_flags': flags, 'blame_file': file} if s:HasOpt(flags, '--reverse') let temp_state.blame_reverse_end = matchstr(get(commits, 0, ''), '\.\.\zs.*') endif @@ -5911,14 +5782,14 @@ function! fugitive#MapJumps(...) abort nnoremap c :Git commit nnoremap c :Git commit - nnoremap cv :Git commit -v - nnoremap cv :Git commit -v + nnoremap cv :tab Git commit -v + nnoremap cv :tab Git commit -v nnoremap ca :Gcommit --amend nnoremap cc :Gcommit nnoremap ce :Gcommit --amend --no-edit nnoremap cw :Gcommit --amend --only - nnoremap cva :Gcommit -v --amend - nnoremap cvc :Gcommit -v + nnoremap cva :tab Gcommit -v --amend + nnoremap cvc :tab Gcommit -v nnoremap cRa :Gcommit --reset-author --amend nnoremap cRe :Gcommit --reset-author --amend --no-edit nnoremap cRw :Gcommit --reset-author --amend --only @@ -5937,6 +5808,7 @@ function! fugitive#MapJumps(...) abort nnoremap cm :Git merge nnoremap cm :Git merge + nnoremap cmt :Git mergetool nnoremap cm? :help fugitive_cm nnoremap cz :Git stash @@ -6302,43 +6174,22 @@ function! fugitive#foldtext() abort return fugitive#Foldtext() endfunction -augroup fugitive_folding - autocmd! - autocmd User Fugitive - \ if &filetype =~# '^git\%(commit\)\=$' && &foldtext ==# 'foldtext()' | - \ set foldtext=fugitive#Foldtext() | - \ endif -augroup END - " Section: Initialization function! fugitive#Init() abort - if exists('#User#FugitiveBoot') - exe s:DoAutocmd('User FugitiveBoot') - endif - let dir = s:Dir() - if &tags !~# '\.git' && @% !~# '\.git' && !exists('s:tags_warning') - let actualdir = fugitive#Find('.git/', dir) - if filereadable(actualdir . 'tags') - let s:tags_warning = 1 - echohl WarningMsg - echo "Fugitive .git/tags support removed in favor of `:set tags^=./.git/tags;`" - echohl NONE - endif - endif - exe s:DoAutocmd('User Fugitive') + throw 'Third party code is using fugitive#Init() which has been removed. Contact the author if you have a reason to still use it' endfunction function! fugitive#is_git_dir(path) abort - return FugitiveIsGitDir(a:path) + throw 'Third party code is using fugitive#is_git_dir() which has been removed. Change it to FugitiveIsGitDir()' endfunction function! fugitive#extract_git_dir(path) abort - return FugitiveExtractGitDir(a:path) + throw 'Third party code is using fugitive#extract_git_dir() which has been removed. Change it to FugitiveExtractGitDir()' endfunction function! fugitive#detect(path) abort - return FugitiveDetect(a:path) + throw 'Third party code is using fugitive#detect() which has been removed. Contact the author if you have a reason to still use it' endfunction " Section: End diff --git a/sources_non_forked/vim-fugitive/doc/fugitive.txt b/sources_non_forked/vim-fugitive/doc/fugitive.txt index e4d04aeb..efb4425a 100644 --- a/sources_non_forked/vim-fugitive/doc/fugitive.txt +++ b/sources_non_forked/vim-fugitive/doc/fugitive.txt @@ -16,14 +16,18 @@ These commands are local to the buffers in which they work (generally, buffers that are part of Git repositories). *:Git* *fugitive-:G* -:Git {args} Run an arbitrary git command. Similar to :!git [args] -:G {args} but chdir to the repository tree first. For some - subcommands, a Fugitive command is called instead. +:Git {args} Run an arbitrary git command and display any output. +:G {args} On UNIX this uses a pty and on other platforms it uses + a pipe, which will cause some behavior differences + such as the absence of progress bars. Any file the + command edits (for example, a commit message) will be + loaded into a split window. Closing that window will + resume running the command. A few Git subcommands + have different behavior; these are documented below. - *:Git!* -:Git! {args} Like |:Git|, but capture the output into a temp file, -:Git --no-pager {args} and |:split| that temp file. Use :0Git to -:Git -P {args} |:edit| the temp file instead. A temp file is always +:Git! {args} Run an arbitrary git command, capture output to a temp +:Git --paginate {args} file, and |:split| that temp file. Use :0Git to +:Git -p {args} |:edit| the temp file instead. A temp file is always used for diff and log commands. *:Gstatus* @@ -31,44 +35,6 @@ that are part of Git repositories). :G Press g? or see |fugitive-maps| for usage. :Gstatus - *:Git-commit* *:Gcommit* -:Git commit [args] A wrapper around git-commit. Unless the arguments -:Gcommit [args] given would skip the invocation of an editor (e.g., - -m), a split window will be used to obtain a commit - message, or a new tab if -v is given. Write and close - the window (:wq) to finish the commit. To cancel, use - an empty message. - - *:Git-revert* *:Grevert* -:Git revert [args] A wrapper around git-revert. Similar to |:Gcommit|. -:Grevert [args] - - *:Git-merge* *:Gmerge* -:Git merge [args] Calls git-merge and loads errors and conflicted files -:Gmerge [args] into the |quickfix| list. Opens a |:Gcommit| style - split window for the commit message if the merge - succeeds. If called during a merge conflict, the - conflicted files from the current index are loaded - into the |quickfix| list. - - *:Git-pull* *:Gpull* -:Git pull [args] Like |:Gmerge|, but for git-pull. -:Gpull [args] - - *:Git-rebase* *:Grebase* -:Git rebase [args] Like |:Gmerge|, but for git-rebase. Interactive -:Grebase [args] rebase is experimentally supported. - - *:Git-push* *:Gpush* -:Git push [args] Invoke git-push, load the results into the |quickfix| -:Gpush [args] list, and invoke |:cwindow| to reveal any errors. - |:Dispatch| is used if available for asynchronous - invocation. - - *:Git-fetch* *:Gfetch* -:Git fetch [args] Like |:Gpush|, but for git-fetch. -:Gfetch [args] - *:Git-blame* *:Gblame* :Git blame [flags] Run git-blame [flags] on the current file and open the :Gblame [flags] results in a scroll-bound vertical split. The @@ -111,12 +77,39 @@ that are part of Git repositories). change unless [!] is given. :Git difftool -y [args] Invoke `git diff [args]`, open each changed file in a - new tab, and invoke `:Gdiffsplit` against the + new tab, and invoke `:Gdiffsplit!` against the appropriate commit. *:Git-mergetool* :Git mergetool [args] Like |:Git-difftool|, but target merge conflicts. + *:Git-push* *:Gpush* +:Git push [args] Invoke git-push, load the results into the |quickfix| +:Gpush [args] list, and invoke |:cwindow| to reveal any errors. + |:Dispatch| is used if available for asynchronous + invocation. + + *:Git-fetch* *:Gfetch* +:Git fetch [args] Like |:Gpush|, but for git-fetch. +:Gfetch [args] + + *:Git-merge* *:Gmerge* +:Gmerge [args] Deprecated alias for |:Git| merge. Use |:Git-mergetool| + to get the old behavior of loading merge conflicts + into the quickfix list. + + *:Git-pull* *:Gpull* +:Gpull [args] Deprecated alias for |:Git| pull. + + *:Git-rebase* *:Grebase* +:Grebase [args] Deprecated alias for |:Git| rebase. + + *:Git-commit* *:Gcommit* +:Gcommit [args] Deprecated alias for |:Git| commit. + + *:Git-revert* *:Grevert* +:Grevert [args] Deprecated alias for |:Git| revert. + *:Gclog* *:Glog* :Gclog[!] [args] Use git-log [args] to load the commit history into the :Glog[!] [args] |quickfix| list. Jumps to the first commit unless [!] @@ -208,7 +201,7 @@ that are part of Git repositories). focus on the current window. During a merge conflict, this is a three-way diff against the "ours" and "theirs" ancestors. Additional d2o and d3o maps are - provided to to obtain the hunk from the "ours" or + provided to obtain the hunk from the "ours" or "theirs" ancestor, respectively. :Gdiffsplit! {object} Like |:Gdiffsplit|, but retain focus on the current @@ -315,7 +308,7 @@ P under the cursor. On untracked files, this instead *fugitive_d* Diff maps ~ *fugitive_dp* -dp Invoke |:Git!| diff on the file under the cursor. +dp Invoke |:Git| diff on the file under the cursor. Deprecated in favor of inline diffs. *fugitive_dd* diff --git a/sources_non_forked/vim-fugitive/plugin/fugitive.vim b/sources_non_forked/vim-fugitive/plugin/fugitive.vim index e98f437d..a1e66fb6 100644 --- a/sources_non_forked/vim-fugitive/plugin/fugitive.vim +++ b/sources_non_forked/vim-fugitive/plugin/fugitive.vim @@ -1,6 +1,6 @@ " fugitive.vim - A Git wrapper so awesome, it should be illegal " Maintainer: Tim Pope -" Version: 3.1 +" Version: 3.2 " GetLatestVimScripts: 2975 1 :AutoInstall: fugitive.vim if exists('g:loaded_fugitive') @@ -66,8 +66,8 @@ function! FugitivePath(...) abort endfunction " FugitiveParse() takes a fugitive:// URL and returns a 2 element list -" containing the Git dir and an object name ("commit:file"). It's effectively -" then inverse of FugitiveFind(). +" containing an object name ("commit:file") and the Git dir. It's effectively +" the inverse of FugitiveFind(). function! FugitiveParse(...) abort let path = s:Slash(a:0 ? a:1 : @%) if path !~# '^fugitive:' @@ -103,6 +103,24 @@ function! FugitiveConfig(...) abort endif endfunction +" Retrieve a Git configuration value. An optional second argument provides +" the Git dir as with FugitiveFind(). Pass a blank string to limit to the +" global config. +function! FugitiveConfigGet(name, ...) abort + return call('FugitiveConfig', [a:name] + a:000) +endfunction + +" Like FugitiveConfigGet(), but return a list of all values. +function! FugitiveConfigGetAll(name, ...) abort + if a:0 && type(a:1) ==# type({}) + let config = a:1 + else + let config = fugitive#Config(FugitiveGitDir(a:0 ? a:1 : -1)) + endif + let name = substitute(a:name, '^[^.]\+\|[^.]\+$', '\L&', 'g') + return copy(get(config, name, [])) +endfunction + function! FugitiveRemoteUrl(...) abort return fugitive#RemoteUrl(a:0 ? a:1 : '', FugitiveGitDir(a:0 > 1 ? a:2 : -1)) endfunction @@ -261,9 +279,23 @@ function! FugitiveDetect(path) abort let b:git_dir = dir endif endif - if exists('b:git_dir') - return fugitive#Init() + if !exists('b:git_dir') || !exists('#User#Fugitive') + return '' endif + if v:version >= 704 || (v:version == 703 && has('patch442')) + doautocmd User Fugitive + elseif &modelines > 0 + let modelines = &modelines + try + set modelines=0 + doautocmd User Fugitive + finally + let &modelines = modelines + endtry + else + doautocmd User Fugitive + endif + return '' endfunction function! FugitiveVimPath(path) abort @@ -339,6 +371,10 @@ augroup fugitive \ if len(FugitiveGitDir()) | \ call fugitive#MapCfile('fugitive#MessageCfile()') | \ endif + autocmd FileType git,gitcommit + \ if len(FugitiveGitDir()) && &foldtext ==# 'foldtext()' | + \ setlocal foldtext=fugitive#Foldtext() | + \ endif autocmd FileType fugitive \ if len(FugitiveGitDir()) | \ call fugitive#MapCfile('fugitive#StatusCfile()') | diff --git a/sources_non_forked/vim-gitgutter/README.mkd b/sources_non_forked/vim-gitgutter/README.mkd index 4f8495c8..0c21f3c1 100644 --- a/sources_non_forked/vim-gitgutter/README.mkd +++ b/sources_non_forked/vim-gitgutter/README.mkd @@ -234,6 +234,20 @@ gitgutter#fold#foldtext(): +-- 45 lines (*): abcdef You can use `gitgutter#fold#is_changed()` in your own `foldtext` expression to find out whether the folded lines have been changed. +### Status line + +Call the `GitGutterGetHunkSummary()` function from your status line to get a list of counts of added, modified, and removed lines in the current buffer. For example: + +```viml +" Your vimrc +function! GitStatus() + let [a,m,r] = GitGutterGetHunkSummary() + return printf('+%d ~%d -%d', a, m, r) +endfunction +set statusline+=%{GitStatus()} +``` + + ### Customisation You can customise: diff --git a/sources_non_forked/vim-gitgutter/autoload/gitgutter/diff.vim b/sources_non_forked/vim-gitgutter/autoload/gitgutter/diff.vim index 498fe9e9..be8a685f 100644 --- a/sources_non_forked/vim-gitgutter/autoload/gitgutter/diff.vim +++ b/sources_non_forked/vim-gitgutter/autoload/gitgutter/diff.vim @@ -4,7 +4,7 @@ let s:hunk_re = '^@@ -\(\d\+\),\?\(\d*\) +\(\d\+\),\?\(\d*\) @@' " True for git v1.7.2+. function! s:git_supports_command_line_config_override() abort - call system(g:gitgutter_git_executable.' '.g:gitgutter_git_args.' -c foo.bar=baz --version') + call gitgutter#utility#system(g:gitgutter_git_executable.' '.g:gitgutter_git_args.' -c foo.bar=baz --version') return !v:shell_error endfunction diff --git a/sources_non_forked/vim-gitgutter/doc/gitgutter.txt b/sources_non_forked/vim-gitgutter/doc/gitgutter.txt index f3c09b87..1f52989f 100644 --- a/sources_non_forked/vim-gitgutter/doc/gitgutter.txt +++ b/sources_non_forked/vim-gitgutter/doc/gitgutter.txt @@ -17,6 +17,7 @@ CONTENTS *gitgutter* Commands ..................... |gitgutter-commands| Mappings ..................... |gitgutter-mappings| Autocommand .................. |gitgutter-autocommand| + Status line .................. |gitgutter-statusline| Options ...................... |gitgutter-options| Highlights ................... |gitgutter-highlights| FAQ .......................... |gitgutter-faq| @@ -244,6 +245,23 @@ trailing empty lines. < +=============================================================================== +STATUS LINE *gitgutter-statusline* + + +Call the `GitGutterGetHunkSummary()` function from your status line to get a +list of counts of added, modified, and removed lines in the current buffer. +For example: +> + " Your vimrc + function! GitStatus() + let [a,m,r] = GitGutterGetHunkSummary() + return printf('+%d ~%d -%d', a, m, r) + endfunction + set statusline+=%{GitStatus()} +< + + =============================================================================== OPTIONS *gitgutter-options* diff --git a/sources_non_forked/vim-javascript/syntax/javascript.vim b/sources_non_forked/vim-javascript/syntax/javascript.vim index c8daec93..4d1a7e50 100644 --- a/sources_non_forked/vim-javascript/syntax/javascript.vim +++ b/sources_non_forked/vim-javascript/syntax/javascript.vim @@ -199,7 +199,7 @@ syntax match jsDestructuringNoise contained /[,[\]]/ syntax region jsDestructuringPropertyComputed contained matchgroup=jsDestructuringBraces start=/\[/ end=/]/ contains=@jsExpression skipwhite skipempty nextgroup=jsDestructuringValue,jsDestructuringValueAssignment,jsDestructuringNoise extend fold " Comments -syntax keyword jsCommentTodo contained TODO FIXME XXX TBD +syntax keyword jsCommentTodo contained TODO FIXME XXX TBD NOTE syntax region jsComment start=+//+ end=/$/ contains=jsCommentTodo,@Spell extend keepend syntax region jsComment start=+/\*+ end=+\*/+ contains=jsCommentTodo,@Spell fold extend keepend syntax region jsEnvComment start=/\%^#!/ end=/$/ display diff --git a/sources_non_forked/vim-ruby/ftdetect/ruby_extra.vim b/sources_non_forked/vim-ruby/ftdetect/ruby_extra.vim index 8a02d736..68e1567a 100644 --- a/sources_non_forked/vim-ruby/ftdetect/ruby_extra.vim +++ b/sources_non_forked/vim-ruby/ftdetect/ruby_extra.vim @@ -57,6 +57,9 @@ au BufNewFile,BufRead [rR]outefile call s:setf('ruby') " SimpleCov au BufNewFile,BufRead .simplecov call s:setf('ruby') +" Sorbet RBI files +au BufNewFile,BufRead *.rbi call s:setf('ruby') + " Thor au BufNewFile,BufRead [tT]horfile,*.thor call s:setf('ruby') diff --git a/sources_non_forked/vim-ruby/syntax/ruby.vim b/sources_non_forked/vim-ruby/syntax/ruby.vim index 6dbaf9a8..563885ed 100644 --- a/sources_non_forked/vim-ruby/syntax/ruby.vim +++ b/sources_non_forked/vim-ruby/syntax/ruby.vim @@ -91,7 +91,7 @@ if exists("ruby_operators") || exists("ruby_pseudo_operators") syn match rubyBooleanOperator "\%(\w\|[^\x00-\x7F]\)\@1\@!\|-=\|/=\|\*\*=\|\*=\|&&=\|&=\|||=\||=\|%=\|+=\|>>=\|<<=\|\^=" - syn match rubyAssignmentOperator "=>\@!" containedin=rubyBlockParameterList " TODO: this is inelegant + syn match rubyAssignmentOperator "=>\@!" contained containedin=rubyBlockParameterList " TODO: this is inelegant syn match rubyEqualityOperator "===\|==\|!=\|!\~\|=\~" syn region rubyBracketOperator matchgroup=rubyOperator start="\%(\%(\w\|[^\x00-\x7F]\)[?!]\=\|[]})]\)\@2<=\[" end="]" contains=ALLBUT,@rubyNotTop @@ -192,7 +192,7 @@ SynFold ':' syn region rubySymbol matchgroup=rubySymbolDelimiter start="[]})\"': syn match rubyCapitalizedMethod "\%(\%(^\|[^.]\)\.\s*\)\@\%(\s*(\)\@=" -syn region rubyParentheses start="(" end=")" contains=ALLBUT,@rubyNotTop containedin=rubyBlockParameterList +syn region rubyParentheses start="(" end=")" contains=ALLBUT,@rubyNotTop contained containedin=rubyBlockParameterList syn region rubyBlockParameterList start="\%(\%(\\|{\)\_s*\)\@32<=|" end="|" contains=ALLBUT,@rubyNotTop,@rubyProperOperator if exists('ruby_global_variable_error') diff --git a/sources_non_forked/vim-snippets/UltiSnips/tex.snippets b/sources_non_forked/vim-snippets/UltiSnips/tex.snippets index 355d9e46..b5be4b74 100644 --- a/sources_non_forked/vim-snippets/UltiSnips/tex.snippets +++ b/sources_non_forked/vim-snippets/UltiSnips/tex.snippets @@ -220,4 +220,25 @@ ${2:${VISUAL:code}} $0 endsnippet + +snippet gln "New glossary item" b +\newglossaryentry{${1:identifier}} +{ + name={${2:name}}, + first={${3:first occurrence}}, + sort={${4:sort value}}, + description={${0:description}}, +} +endsnippet +snippet glnl "New long glossary item" b +\longnewglossaryentry{${1:identifier}} +{ + name={${2:name}}, + first={${3:first occurrence}}, + sort={${4:sort value}}, +} +{ + ${0:description} +} +endsnippet # vim:ft=snippets: diff --git a/sources_non_forked/vim-snippets/snippets/elixir.snippets b/sources_non_forked/vim-snippets/snippets/elixir.snippets index 64b63f6e..468575d0 100644 --- a/sources_non_forked/vim-snippets/snippets/elixir.snippets +++ b/sources_non_forked/vim-snippets/snippets/elixir.snippets @@ -188,6 +188,8 @@ snippet try try .. rescue .. end snippet pry require IEx; IEx.pry ${0} +snippet ppry + |> (fn x -> require IEx; IEx.pry; x end).()${0} snippet qu quote do ${1} diff --git a/sources_non_forked/vim-snippets/snippets/sh.snippets b/sources_non_forked/vim-snippets/snippets/sh.snippets index 35afa301..2ce67ec4 100644 --- a/sources_non_forked/vim-snippets/snippets/sh.snippets +++ b/sources_non_forked/vim-snippets/snippets/sh.snippets @@ -4,10 +4,10 @@ snippet #! snippet s#! #!/usr/bin/env sh - set -euo pipefail + set -eu snippet safe - set -euo pipefail + set -eu snippet bash #!/usr/bin/env bash From 27ad0d07862847896f691309a544a206783c94d6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Mar 2020 16:02:27 -0300 Subject: [PATCH 40/40] Bump rake in /sources_non_forked/vim-multiple-cursors (#565) Bumps [rake](https://github.com/ruby/rake) from 10.4.2 to 12.3.3. - [Release notes](https://github.com/ruby/rake/releases) - [Changelog](https://github.com/ruby/rake/blob/master/History.rdoc) - [Commits](https://github.com/ruby/rake/compare/v10.4.2...v12.3.3) Signed-off-by: dependabot[bot] --- sources_non_forked/vim-multiple-cursors/Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources_non_forked/vim-multiple-cursors/Gemfile.lock b/sources_non_forked/vim-multiple-cursors/Gemfile.lock index e833b243..5e909c4a 100644 --- a/sources_non_forked/vim-multiple-cursors/Gemfile.lock +++ b/sources_non_forked/vim-multiple-cursors/Gemfile.lock @@ -2,7 +2,7 @@ GEM remote: https://rubygems.org/ specs: diff-lcs (1.2.5) - rake (10.4.2) + rake (12.3.3) rspec (3.4.0) rspec-core (~> 3.4.0) rspec-expectations (~> 3.4.0)