From 6d3db671dc441ea967af6a33e4e2c8c68c0f2ff6 Mon Sep 17 00:00:00 2001 From: Maxim Likhachev Date: Tue, 2 Aug 2016 13:12:38 +0500 Subject: [PATCH] =?UTF-8?q?vim:=20=D0=BF=D0=BB=D0=B0=D0=B3=D0=B8=D0=BD?= =?UTF-8?q?=D1=8B=20=D0=BE=D1=82=D0=B2=D1=8F=D0=B7=D0=B0=D0=BD=D1=8B=20?= =?UTF-8?q?=D0=BE=D1=82=20git-=D1=80=D0=B5=D0=BF=D0=BE=D0=B7=D0=B8=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=B8=D0=B5=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vim/+plugins/javascript-libraries-syntax.vim | 1 - .../javascript-libraries-syntax.vim/Makefile | 364 +++++++++++++++++ .../javascript-libraries-syntax.vim/README.md | 182 +++++++++ .../after/syntax/coffee.vim | 10 + .../after/syntax/html.vim | 10 + .../after/syntax/javascript.vim | 10 + .../after/syntax/ls.vim | 10 + .../after/syntax/typescript.vim | 10 + .../autoload/jslibsyntax.vim | 61 +++ .../autoload/syntax/angularjs.coffee.vim | 95 +++++ .../autoload/syntax/angularjs.html.vim | 32 ++ .../autoload/syntax/angularjs.javascript.vim | 95 +++++ .../autoload/syntax/angularjs.ls.vim | 95 +++++ .../autoload/syntax/angularjs.typescript.vim | 95 +++++ .../autoload/syntax/angularui.html.vim | 14 + .../autoload/syntax/angularuirouter.coffee.vim | 44 ++ .../autoload/syntax/angularuirouter.javascript.vim | 44 ++ .../autoload/syntax/angularuirouter.ls.vim | 44 ++ .../autoload/syntax/angularuirouter.typescript.vim | 44 ++ .../autoload/syntax/backbone.coffee.vim | 67 +++ .../autoload/syntax/backbone.javascript.vim | 67 +++ .../autoload/syntax/backbone.ls.vim | 67 +++ .../autoload/syntax/backbone.typescript.vim | 67 +++ .../autoload/syntax/chai.coffee.vim | 49 +++ .../autoload/syntax/chai.javascript.vim | 49 +++ .../autoload/syntax/chai.ls.vim | 49 +++ .../autoload/syntax/chai.typescript.vim | 49 +++ .../autoload/syntax/flux.coffee.vim | 31 ++ .../autoload/syntax/flux.javascript.vim | 31 ++ .../autoload/syntax/flux.ls.vim | 31 ++ .../autoload/syntax/flux.typescript.vim | 31 ++ .../autoload/syntax/handlebars.coffee.vim | 41 ++ .../autoload/syntax/handlebars.javascript.vim | 41 ++ .../autoload/syntax/handlebars.ls.vim | 41 ++ .../autoload/syntax/handlebars.typescript.vim | 41 ++ .../autoload/syntax/jasmine.coffee.vim | 64 +++ .../autoload/syntax/jasmine.javascript.vim | 64 +++ .../autoload/syntax/jasmine.ls.vim | 64 +++ .../autoload/syntax/jasmine.typescript.vim | 64 +++ .../autoload/syntax/jquery.coffee.vim | 124 ++++++ .../autoload/syntax/jquery.javascript.vim | 124 ++++++ .../autoload/syntax/jquery.ls.vim | 124 ++++++ .../autoload/syntax/jquery.typescript.vim | 124 ++++++ .../autoload/syntax/postprocess.coffee.vim | 18 + .../autoload/syntax/postprocess.javascript.vim | 16 + .../autoload/syntax/postprocess.ls.vim | 28 ++ .../autoload/syntax/postprocess.typescript.vim | 11 + .../autoload/syntax/prelude.coffee.vim | 37 ++ .../autoload/syntax/prelude.javascript.vim | 37 ++ .../autoload/syntax/prelude.ls.vim | 37 ++ .../autoload/syntax/prelude.typescript.vim | 37 ++ .../autoload/syntax/react.coffee.vim | 37 ++ .../autoload/syntax/react.javascript.vim | 37 ++ .../autoload/syntax/react.ls.vim | 37 ++ .../autoload/syntax/react.typescript.vim | 37 ++ .../autoload/syntax/requirejs.coffee.vim | 36 ++ .../autoload/syntax/requirejs.javascript.vim | 36 ++ .../autoload/syntax/requirejs.ls.vim | 36 ++ .../autoload/syntax/requirejs.typescript.vim | 36 ++ .../autoload/syntax/sugar.coffee.vim | 90 ++++ .../autoload/syntax/sugar.javascript.vim | 90 ++++ .../autoload/syntax/sugar.ls.vim | 90 ++++ .../autoload/syntax/sugar.typescript.vim | 90 ++++ .../autoload/syntax/underscore.coffee.vim | 128 ++++++ .../autoload/syntax/underscore.javascript.vim | 128 ++++++ .../autoload/syntax/underscore.ls.vim | 128 ++++++ .../autoload/syntax/underscore.typescript.vim | 128 ++++++ .../autoload/syntax/update.sh | 7 + .../javascript-libraries-syntax.vim/config.mk | 6 + etc/soft/vim/vim/+plugins/vimple | 1 - etc/soft/vim/vim/+plugins/vimple/README | 148 +++++++ etc/soft/vim/vim/+plugins/vimple/autoload/args.vim | 107 +++++ .../vim/vim/+plugins/vimple/autoload/complete.vim | 67 +++ .../vim/+plugins/vimple/autoload/completers.vim | 73 ++++ etc/soft/vim/vim/+plugins/vimple/autoload/file.vim | 3 + etc/soft/vim/vim/+plugins/vimple/autoload/list.vim | 208 ++++++++++ .../vim/vim/+plugins/vimple/autoload/loclist.vim | 21 + .../vim/vim/+plugins/vimple/autoload/ml/bayes.vim | 91 +++++ .../vim/vim/+plugins/vimple/autoload/ml/porter.vim | 196 +++++++++ .../vim/vim/+plugins/vimple/autoload/overlay.vim | 115 ++++++ .../vim/vim/+plugins/vimple/autoload/parse/ini.vim | 58 +++ .../vim/vim/+plugins/vimple/autoload/quickfix.vim | 23 ++ .../vim/vim/+plugins/vimple/autoload/regex.vim | 74 ++++ etc/soft/vim/vim/+plugins/vimple/autoload/rng.vim | 18 + .../vim/vim/+plugins/vimple/autoload/scope.vim | 92 +++++ .../vim/vim/+plugins/vimple/autoload/scripts.vim | 47 +++ .../vim/vim/+plugins/vimple/autoload/string.vim | 292 +++++++++++++ .../vim/vim/+plugins/vimple/autoload/variable.vim | 3 + .../vim/vim/+plugins/vimple/autoload/vimple.vim | 256 ++++++++++++ .../vimple/autoload/vimple/abbreviations.vim | 105 +++++ .../vimple/autoload/vimple/comparators.vim | 66 +++ .../+plugins/vimple/autoload/vimple/highlight.vim | 103 +++++ .../+plugins/vimple/autoload/vimple/history.vim | 90 ++++ .../vim/vim/+plugins/vimple/autoload/vimple/ls.vim | 386 ++++++++++++++++++ .../vim/+plugins/vimple/autoload/vimple/map.vim | 176 ++++++++ .../vim/+plugins/vimple/autoload/vimple/marks.vim | 110 +++++ .../+plugins/vimple/autoload/vimple/options.vim | 209 ++++++++++ .../vimple/autoload/vimple/scriptnames.vim | 100 +++++ .../+plugins/vimple/autoload/vimple/undolist.vim | 176 ++++++++ .../+plugins/vimple/autoload/vimple/version.vim | 115 ++++++ etc/soft/vim/vim/+plugins/vimple/demo/bufgrep.vim | 47 +++ etc/soft/vim/vim/+plugins/vimple/demo/calendar.vim | 89 ++++ .../vim/vim/+plugins/vimple/demo/changelist.vim | 63 +++ .../vim/vim/+plugins/vimple/demo/global_marks.vim | 26 ++ etc/soft/vim/vim/+plugins/vimple/demo/helptoc.vim | 32 ++ etc/soft/vim/vim/+plugins/vimple/demo/iabbrevs.vim | 29 ++ .../vim/vim/+plugins/vimple/demo/identsearch.vim | 34 ++ etc/soft/vim/vim/+plugins/vimple/demo/jumplist.vim | 63 +++ etc/soft/vim/vim/+plugins/vimple/demo/oldfiles.vim | 22 + .../vim/vim/+plugins/vimple/demo/spellsuggest.vim | 45 ++ etc/soft/vim/vim/+plugins/vimple/demo/tagkinds.vim | 24 ++ .../vim/vim/+plugins/vimple/demo/tagsearch.vim | 41 ++ etc/soft/vim/vim/+plugins/vimple/doc/vimple.txt | 316 +++++++++++++++ etc/soft/vim/vim/+plugins/vimple/doc/vimple_ls.txt | 344 ++++++++++++++++ .../vim/+plugins/vimple/ftplugin/python_scope.vim | 6 + .../vim/vim/+plugins/vimple/ftplugin/vim_scope.vim | 4 + etc/soft/vim/vim/+plugins/vimple/plugin/vimple.vim | 451 +++++++++++++++++++++ .../vim/+plugins/vimple/syntax/vimple_jumplist.vim | 11 + etc/soft/vim/vim/+plugins/vimple/test/Makefile | 11 + etc/soft/vim/vim/+plugins/vimple/test/README | 13 + etc/soft/vim/vim/+plugins/vimple/test/_setup.vim | 16 + .../vim/vim/+plugins/vimple/test/buffer_list.vim | 19 + etc/soft/vim/vim/+plugins/vimple/test/ini_001.ini | 13 + .../vim/vim/+plugins/vimple/test/ini_001_out.ini | 8 + etc/soft/vim/vim/+plugins/vimple/test/ini_002.ini | 5 + .../vim/vim/+plugins/vimple/test/ini_002_out.ini | 4 + .../vim/vim/+plugins/vimple/test/parse_ini_001.vim | 9 + .../vim/vim/+plugins/vimple/test/parse_ini_002.vim | 9 + .../vim/vim/+plugins/vimple/test/string001.vim | 48 +++ .../vim/vim/+plugins/vimple/test/vimple001.vim | 18 + .../vim/vim/+plugins/vimple/test/vimple002.vim | 15 + 131 files changed, 9524 insertions(+), 2 deletions(-) delete mode 160000 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/Makefile create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/README.md create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/after/syntax/coffee.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/after/syntax/html.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/after/syntax/javascript.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/after/syntax/ls.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/after/syntax/typescript.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/jslibsyntax.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/angularjs.coffee.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/angularjs.html.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/angularjs.javascript.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/angularjs.ls.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/angularjs.typescript.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/angularui.html.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/angularuirouter.coffee.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/angularuirouter.javascript.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/angularuirouter.ls.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/angularuirouter.typescript.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/backbone.coffee.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/backbone.javascript.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/backbone.ls.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/backbone.typescript.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/chai.coffee.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/chai.javascript.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/chai.ls.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/chai.typescript.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/flux.coffee.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/flux.javascript.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/flux.ls.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/flux.typescript.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/handlebars.coffee.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/handlebars.javascript.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/handlebars.ls.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/handlebars.typescript.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/jasmine.coffee.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/jasmine.javascript.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/jasmine.ls.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/jasmine.typescript.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/jquery.coffee.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/jquery.javascript.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/jquery.ls.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/jquery.typescript.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/postprocess.coffee.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/postprocess.javascript.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/postprocess.ls.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/postprocess.typescript.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/prelude.coffee.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/prelude.javascript.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/prelude.ls.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/prelude.typescript.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/react.coffee.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/react.javascript.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/react.ls.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/react.typescript.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/requirejs.coffee.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/requirejs.javascript.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/requirejs.ls.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/requirejs.typescript.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/sugar.coffee.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/sugar.javascript.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/sugar.ls.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/sugar.typescript.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/underscore.coffee.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/underscore.javascript.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/underscore.ls.vim create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/underscore.typescript.vim create mode 100755 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/update.sh create mode 100644 etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/config.mk delete mode 160000 etc/soft/vim/vim/+plugins/vimple create mode 100644 etc/soft/vim/vim/+plugins/vimple/README create mode 100644 etc/soft/vim/vim/+plugins/vimple/autoload/args.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/autoload/complete.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/autoload/completers.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/autoload/file.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/autoload/list.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/autoload/loclist.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/autoload/ml/bayes.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/autoload/ml/porter.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/autoload/overlay.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/autoload/parse/ini.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/autoload/quickfix.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/autoload/regex.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/autoload/rng.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/autoload/scope.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/autoload/scripts.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/autoload/string.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/autoload/variable.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/autoload/vimple.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/autoload/vimple/abbreviations.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/autoload/vimple/comparators.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/autoload/vimple/highlight.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/autoload/vimple/history.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/autoload/vimple/ls.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/autoload/vimple/map.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/autoload/vimple/marks.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/autoload/vimple/options.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/autoload/vimple/scriptnames.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/autoload/vimple/undolist.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/autoload/vimple/version.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/demo/bufgrep.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/demo/calendar.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/demo/changelist.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/demo/global_marks.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/demo/helptoc.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/demo/iabbrevs.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/demo/identsearch.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/demo/jumplist.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/demo/oldfiles.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/demo/spellsuggest.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/demo/tagkinds.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/demo/tagsearch.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/doc/vimple.txt create mode 100644 etc/soft/vim/vim/+plugins/vimple/doc/vimple_ls.txt create mode 100644 etc/soft/vim/vim/+plugins/vimple/ftplugin/python_scope.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/ftplugin/vim_scope.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/plugin/vimple.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/syntax/vimple_jumplist.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/test/Makefile create mode 100644 etc/soft/vim/vim/+plugins/vimple/test/README create mode 100644 etc/soft/vim/vim/+plugins/vimple/test/_setup.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/test/buffer_list.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/test/ini_001.ini create mode 100644 etc/soft/vim/vim/+plugins/vimple/test/ini_001_out.ini create mode 100644 etc/soft/vim/vim/+plugins/vimple/test/ini_002.ini create mode 100644 etc/soft/vim/vim/+plugins/vimple/test/ini_002_out.ini create mode 100644 etc/soft/vim/vim/+plugins/vimple/test/parse_ini_001.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/test/parse_ini_002.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/test/string001.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/test/vimple001.vim create mode 100644 etc/soft/vim/vim/+plugins/vimple/test/vimple002.vim diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim deleted file mode 160000 index 0298871..0000000 --- a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0298871aff580d5c419d3b6ca25a5d3ec418f9a8 diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/Makefile b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/Makefile new file mode 100644 index 0000000..7892414 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/Makefile @@ -0,0 +1,364 @@ +# vim:filetype=make:foldmethod=marker:fdl=0: +# +# Makefile: install/uninstall/link vim plugin files. +# Author: Cornelius +# Date: 一 3/15 22:49:26 2010 +# Version: 1.0 +# +# PLEASE DO NOT EDIT THIS FILE. THIS FILE IS AUTO-GENERATED FROM Makefile.tpl +# LICENSE {{{ +# Copyright (c) 2010 +# +# Permission is hereby granted, free of charge, to any person +# obtaining a copy of this software and associated documentation +# files (the "Software"), to deal in the Software without +# restriction, including without limitation the rights to use, +# copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following +# conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. +# }}} +# VIM RECORD FORMAT: {{{ +# { +# version => 0.2, # record spec version +# generated_by => 'Vimana-' . $Vimana::VERSION, +# install_type => 'auto', # auto , make , rake ... etc +# package => $self->package_name, +# files => \@e, +# } +# }}} + +# INTERNAL VARIABLES {{{ + +RECORD_FILE=.record +PWD=`pwd` +README_FILES=`ls -1 | grep -i readme` +WGET_OPT=-c -nv +CURL_OPT= +RECORD_SCRIPT=.mkrecord +TAR=tar czvf + +GIT_SOURCES= + +# INTERNAL FUNCTIONS {{{ +record_file = \ + PTYPE=`cat $(1) | perl -nle 'print $$1 if /^"\s*script\s*type:\s*(\S*)$$/i'` ;\ + echo $(VIMRUNTIME)/$$PTYPE/$(1) >> $(2) + +# }}} + +# PUBLIC FUNCTIONS {{{ + +GIT_SOURCES= +DEPEND_DIR=/tmp/vim-deps + +# Usage: +# +# $(call install_git_sources) +# + +install_git_source = \ + PWD=$(PWD) ; \ + mkdir -p $(DEPEND_DIR) ; \ + cd $(DEPEND_DIR) ; \ + for git_uri in $(GIT_SOURCES) ; do \ + OUTDIR=$$(echo $$git_uri | perl -pe 's{^.*/}{}') ;\ + echo $$OUTDIR ; \ + if [[ -e $$OUTDIR ]] ; then \ + cd $$OUTDIR ; \ + git pull origin master && \ + make install && cd .. ; \ + else \ + git clone $$git_uri $$OUTDIR && \ + cd $$OUTDIR && \ + make install && cd .. ; \ + fi; \ + done ; + + + + +# install file by inspecting content +install_file = \ + PTYPE=`cat $(1) | perl -nle 'print $$1 if /^"\s*script\s*type:\s*(\S*)$$/i'` ;\ + cp -v $(1) $(VIMRUNTIME)/$$PTYPE/$(1) + +link_file = \ + PTYPE=`cat $(1) | perl -nle 'print $$1 if /^"\s*script\s*type:\s*(\S*)$$/i'` ;\ + cp -v $(1) $(VIMRUNTIME)/$$PTYPE/$(1) + +unlink_file = \ + PTYPE=`cat $(1) | perl -nle 'print $$1 if /^"\s*script\s*type:\s*(\S*)$$/i'` ;\ + rm -fv $(VIMRUNTIME)/$$PTYPE/$(1) + +# fetch script from an url +fetch_url = \ + @if [[ -e $(2) ]] ; then \ + exit \ + ; fi \ + ; echo " => $(2)" \ + ; if [[ ! -z `which curl` ]] ; then \ + curl $(CURL_OPT) $(1) -o $(2) ; \ + ; elif [[ ! -z `which wget` ]] ; then \ + wget $(WGET_OPT) $(1) -O $(2) \ + ; fi \ + ; echo $(2) >> .bundlefiles + + +install_source = \ + for git_uri in $(GIT_SOURCES) ; do \ + OUTDIR=$$(echo $$git_uri | perl -pe 's{^.*/}{}') ;\ + echo $$OUTDIR ; \ + done + +# fetch script from github +fetch_github = \ + @if [[ -e $(5) ]] ; then \ + exit \ + ; fi \ + ; echo " => $(5)" \ + ; if [[ ! -z `which curl` ]] ; then \ + curl $(CURL_OPT) http://github.com/$(1)/$(2)/raw/$(3)/$(4) -o $(5) \ + ; elif [[ ! -z `which wget` ]] ; then \ + wget $(WGET_OPT) http://github.com/$(1)/$(2)/raw/$(3)/$(4) -O $(5) \ + ; fi \ + ; echo $(5) >> .bundlefiles + +# fetch script from local file +fetch_local = @cp -v $(1) $(2) \ + ; @echo $(2) >> .bundlefiles + +# 1: NAME , 2: URI +dep_from_git = \ + D=/tmp/$(1)-$$RANDOM ; git clone $(2) $$D ; cd $$D ; make install ; + +dep_from_svn = \ + D=/tmp/$(1)-$$RANDOM ; svn checkout $(2) $$D ; cd $$D ; make install ; + +# }}} +# }}} +# ======= DEFAULT CONFIG ======= {{{ + +# Default plugin name +NAME=`basename \`pwd\`` +VERSION=0.1 + +# Files to add to tarball: +DIRS=`ls -1F | grep / | sed -e 's/\///'` + +# Runtime path to install: +VIMRUNTIME=~/.vim + +# Other Files to be added: +FILES=`ls -1 | grep '.vim$$'` +MKFILES=Makefile `ls -1 | grep '.mk$$'` + +# ======== USER CONFIG ======= {{{ +# please write config in config.mk +# this will override default config +# +# Custom Name: +# +# NAME=[plugin name] +# +# Custom dir list: +# +# DIRS=autoload after doc syntax plugin +# +# Files to add to tarball: +# +# FILES= +# +# Bundle dependent scripts: +# +# bundle-deps: +# $(call fetch_github,[account id],[project],[branch],[source path],[target path]) +# $(call fetch_url,[file url],[target path]) +# $(call fetch_local,[from],[to]) + +SHELL=bash + +CONFIG_FILE=config.mk +-include ~/.vimauthor.mk +-include $(CONFIG_FILE) + +# }}} +# }}} +# ======= SECTIONS ======= {{{ +-include ext.mk + +all: install-deps install + +install-deps: + # check required binaries + [[ -n $$(which git) ]] + [[ -n $$(which bash) ]] + [[ -n $$(which vim) ]] + [[ -n $$(which wget) || -n $$(which curl) ]] + $(call install_git_sources) + +check-require: + @if [[ -n `which wget` || -n `which curl` || -n `which fetch` ]]; then echo "wget|curl|fetch: OK" ; else echo "wget|curl|fetch: NOT OK" ; fi + @if [[ -n `which vim` ]] ; then echo "vim: OK" ; else echo "vim: NOT OK" ; fi + +config: + @rm -f $(CONFIG_FILE) + @echo "NAME=" >> $(CONFIG_FILE) + @echo "VERSION=" >> $(CONFIG_FILE) + @echo "#DIRS=" + @echo "#FILES=" + @echo "" >> $(CONFIG_FILE) + @echo "bundle-deps:" >> $(CONFIG_FILE) + @echo "\t\t\$$(call fetch_github,ID,REPOSITORY,BRANCH,PATH,TARGET_PATH)" >> $(CONFIG_FILE) + @echo "\t\t\$$(call fetch_url,FILE_URL,TARGET_PATH)" >> $(CONFIG_FILE) + + +init-author: + @echo "AUTHOR=" > ~/.vimauthor.mk + +bundle-deps: + +bundle: bundle-deps + +dist: bundle mkfilelist + @$(TAR) $(NAME)-$(VERSION).tar.gz --exclude '*.svn' --exclude '.git' $(DIRS) $(README_FILES) $(FILES) $(MKFILES) + @echo "$(NAME)-$(VERSION).tar.gz is ready." + +init-runtime: + @mkdir -vp $(VIMRUNTIME) + @mkdir -vp $(VIMRUNTIME)/record + @if [[ -n "$(DIRS)" ]] ; then find $(DIRS) -type d | while read dir ; do \ + mkdir -vp $(VIMRUNTIME)/$$dir ; done ; fi + +release: + if [[ -n `which vimup` ]] ; then \ + fi + +pure-install: + @echo "Using Shell:" $(SHELL) + @echo "Installing" + @if [[ -n "$(DIRS)" ]] ; then find $(DIRS) -type f | while read file ; do \ + cp -v $$file $(VIMRUNTIME)/$$file ; done ; fi + @echo "$(FILES)" | while read vimfile ; do \ + if [[ -n $$vimfile ]] ; then \ + $(call install_file,$$vimfile) ; fi ; done + +install: init-runtime bundle pure-install record + + +uninstall-files: + @echo "Uninstalling" + @if [[ -n "$(DIRS)" ]] ; then find $(DIRS) -type f | while read file ; do \ + rm -fv $(VIMRUNTIME)/$$file ; done ; fi + @echo "$(FILES)" | while read vimfile ; do \ + if [[ -n $$vimfile ]] ; then \ + $(call unlink_file,$$vimfile) ; fi ; done + +uninstall: uninstall-files rmrecord + +link: init-runtime + @echo "Linking" + @if [[ -n "$(DIRS)" ]]; then find $(DIRS) -type f | while read file ; do \ + ln -sfv $(PWD)/$$file $(VIMRUNTIME)/$$file ; done ; fi + @echo "$(FILES)" | while read vimfile ; do \ + if [[ -n $$vimfile ]] ; then \ + $(call link_file,$$vimfile) ; fi ; done + +mkfilelist: + @echo $(NAME) > $(RECORD_FILE) + @echo $(VERSION) >> $(RECORD_FILE) + @if [[ -n "$(DIRS)" ]] ; then find $(DIRS) -type f | while read file ; do \ + echo $(VIMRUNTIME)/$$file >> $(RECORD_FILE) ; done ; fi + @echo "$(FILES)" | while read vimfile ; do \ + if [[ -n $$vimfile ]] ; then \ + $(call record_file,$$vimfile,$(RECORD_FILE)) ; fi ; done + +vimball-edit: + find $(DIRS) -type f > .tmp_list + vim .tmp_list + vim .tmp_list -c ":%MkVimball $(NAME)-$(VERSION) ." -c "q" + @rm -vf .tmp_list + @echo "$(NAME)-$(VERSION).vba is ready." + +vimball: + find $(DIRS) -type f > .tmp_list + vim .tmp_list -c ":%MkVimball $(NAME)-$(VERSION) ." -c "q" + @rm -vf .tmp_list + @echo "$(NAME)-$(VERSION).vba is ready." + +mkrecordscript: + @echo "" > $(RECORD_SCRIPT) + @echo "fun! s:mkmd5(file)" >> $(RECORD_SCRIPT) + @echo " if executable('md5')" >> $(RECORD_SCRIPT) + @echo " return system('cat ' . a:file . ' | md5')" >> $(RECORD_SCRIPT) + @echo " else" >> $(RECORD_SCRIPT) + @echo " return \"\"" >> $(RECORD_SCRIPT) + @echo " endif" >> $(RECORD_SCRIPT) + @echo "endf" >> $(RECORD_SCRIPT) + @echo "let files = readfile('.record')" >> $(RECORD_SCRIPT) + @echo "let package_name = remove(files,0)" >> $(RECORD_SCRIPT) + @echo "let script_version = remove(files,0)" >> $(RECORD_SCRIPT) + @echo "let record = { 'version' : 0.3 , 'generated_by': 'Vim-Makefile' , 'script_version': script_version , 'install_type' : 'makefile' , 'package' : package_name , 'files': [ ] }" >> $(RECORD_SCRIPT) + @echo "for file in files " >> $(RECORD_SCRIPT) + @echo " let md5 = s:mkmd5(file)" >> $(RECORD_SCRIPT) + @echo " cal add( record.files , { 'checksum': md5 , 'file': file } )" >> $(RECORD_SCRIPT) + @echo "endfor" >> $(RECORD_SCRIPT) + @echo "redir => output" >> $(RECORD_SCRIPT) + @echo "silent echon record" >> $(RECORD_SCRIPT) + @echo "redir END" >> $(RECORD_SCRIPT) + @echo "let content = join(split(output,\"\\\\n\"),'')" >> $(RECORD_SCRIPT) + @echo "let record_file = expand('~/.vim/record/' . package_name )" >> $(RECORD_SCRIPT) + @echo "cal writefile( [content] , record_file )" >> $(RECORD_SCRIPT) + @echo "cal delete('.record')" >> $(RECORD_SCRIPT) + @echo "echo \"Done\"" >> $(RECORD_SCRIPT) + + +record: mkfilelist mkrecordscript + vim --noplugin -V10install.log -c "so $(RECORD_SCRIPT)" -c "q" + @echo "Vim script record making log: install.log" +# @rm -vf $(RECORD_FILE) + +rmrecord: + @echo "Removing Record" + @rm -vf $(VIMRUNTIME)/record/$(NAME) + +clean: clean-bundle-deps + @rm -vf $(RECORD_FILE) + @rm -vf $(RECORD_SCRIPT) + @rm -vf install.log + @rm -vf *.tar.gz + +clean-bundle-deps: + @echo "Removing Bundled scripts..." + @if [[ -e .bundlefiles ]] ; then \ + rm -fv `echo \`cat .bundlefiles\``; \ + fi + @rm -fv .bundlefiles + +update: + @echo "Updating Makefile..." + @URL=http://github.com/c9s/vim-makefile/raw/master/Makefile ; \ + if [[ -n `which curl` ]]; then \ + curl $$URL -o Makefile ; \ + if [[ -n `which wget` ]]; then \ + wget -c $$URL ; \ + elif [[ -n `which fetch` ]]; then \ + fetch $$URL ; \ + fi + +version: + @echo version - $(MAKEFILE_VERSION) + +# }}} diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/README.md b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/README.md new file mode 100644 index 0000000..08144f8 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/README.md @@ -0,0 +1,182 @@ +javascript-libraries-syntax.vim +=============================== + +Syntax file for JavaScript libraries. Supports JavaScript libraries I am using (patches welcome). +Should work well with other JavaScript syntax files. [SyntaxComplete][] also works well on all +supported languages. + +[SyntaxComplete]:http://www.vim.org/scripts/script.php?script_id=3172 + +Libraries +--------- + +* [jQuery](http://jquery.com/) +* [underscore.js](http://underscorejs.org/) +* [lo-dash](http://lodash.com/) +* [Backbone.js](http://backbonejs.org/) +* [prelude.ls](http://gkz.github.com/prelude-ls/) +* [AngularJS](http://angularjs.org/) +* [AngularUI](http://angular-ui.github.io) +* [AngularUI Router](http://angular-ui.github.io/ui-router/) +* [React](https://facebook.github.io/react/) +* [Flux](https://facebook.github.io/flux/) +* [RequireJS](http://requirejs.org/) +* [Sugar.js](http://sugarjs.com/) +* [Jasmine](http://pivotal.github.io/jasmine/) +* [Chai](http://chaijs.com/) +* [Handlebars](http://handlebarsjs.com/) + +File Types +---------- + +* JavaScript +* [CoffeeScript](http://coffeescript.org/) +* [LiveScript](http://livescript.net/) +* [TypeScript](http://www.typescriptlang.org/) + +Will be more when SyntaxComplete has new version. + +Install +------- + +Use [pathogen][] or [vundle][] is recommended. + +[pathogen]:http://www.vim.org/scripts/script.php?script_id=2332 +[vundle]:https://github.com/gmarik/vundle + +Config +------ + +You can use g:used_javascript_libs to setup used libraries, ex: + +```viml +let g:used_javascript_libs = 'underscore,backbone' +``` + +Support libs id: + +* jQuery: jquery +* underscore.js: underscore +* Lo-Dash: underscore +* Backbone.js: backbone +* prelude.ls: prelude +* AngularJS: angularjs +* AngularUI: angularui +* AngularUI Router: angularuirouter +* React: react +* Flux: flux +* RequireJS: requirejs +* Sugar.js: sugar +* Jasmine: jasmine +* Chai: chai +* Handlebars: handlebars + +Default lib set is: `jquery,underscore,backbone` + +You can use [local vimrc][] to setup libraries used in project. Sample code for local vimrc: + +```viml +autocmd BufReadPre *.js let b:javascript_lib_use_jquery = 1 +autocmd BufReadPre *.js let b:javascript_lib_use_underscore = 1 +autocmd BufReadPre *.js let b:javascript_lib_use_backbone = 1 +autocmd BufReadPre *.js let b:javascript_lib_use_prelude = 0 +autocmd BufReadPre *.js let b:javascript_lib_use_angularjs = 0 +``` + +[local vimrc]:https://github.com/MarcWeber/vim-addon-local-vimrc + +Todo +---- + +* Support future version of SyntaxComplete + +Known Issue +----------- + +SyntaxComplete only accept groups with filetype prefixed. For example, 'javascript' files. +Only keywords in groups which's name matches /javascript.*/ will be available. So to make it +possible to use SyntaxComplete on CoffeeScript, LiveScript and other compile to JavaScript +languages. We must redefine all syntax many times, with different name prefix. SyntaxComplete +might have new feature to support a user define pattern for group name to include. +All repeat defination will be removed when SyntaxComplete supports this feature. + +Changes +------- + +### Version 0.4 +* Add React, Flux, Chai, Handlbars +* Default lib set +* Bug fix + +### Version 0.3.6 +* Add Jasmine, AngularUI +* Update underscore, jQuery + +### Version 0.3.5 +* Add sugar.js support +* b:current_syntax to detect current syntax + +### Version 0.3.4 +* Add $ to iskeyword for jQuery and angular (Issue #4) +* Support linecomment (Issue #6) +* Add augularjs HTML custom attribute support + +### Version 0.3.3 +* No strict mode, better compatibility. + +### Version 0.3.2 +* Fix coffee script compatible +* Update jQuery syntax to latest version +* Support lo-dash +* jQuery selector update +* Minor bug fix + +### Version 0.3.1 +* Fix performance issue + +### Version 0.3 +* Supports AngularJS, RequireJS +* Support TypeScript +* Setup used libraries +* Better init way + +### Version 0.2 +* Supports library selection + +### Version 0.1 +* First release. + +Credits +------- + +* Bruno Michel, [jQuery : Syntax file for jQuery][jquery.vim] +* [Peter Renström][], for [summarize and explain AngularJS stuff][issue1]. + +[jquery.vim]:http://www.vim.org/scripts/script.php?script_id=2416 +[Peter Renström]:https://github.com/renstrom +[issue1]:https://github.com/othree/javascript-libraries-syntax.vim/issues/1 + +License +------- + +Copyright (c) 2013 Wei-Ko Kao + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/after/syntax/coffee.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/after/syntax/coffee.vim new file mode 100644 index 0000000..f70de93 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/after/syntax/coffee.vim @@ -0,0 +1,10 @@ +" Vim plugin file +" Language: +" Maintainer: othree +" Last Change: 2013/08/26 +" Version: 0.4.1 +" URL: https://github.com/othree/javascript-libraries-syntax.vim + +if b:current_syntax == 'coffee' + call jslibsyntax#load() +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/after/syntax/html.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/after/syntax/html.vim new file mode 100644 index 0000000..7f5ac1d --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/after/syntax/html.vim @@ -0,0 +1,10 @@ +" Vim plugin file +" Language: +" Maintainer: othree +" Last Change: 2013/08/26 +" Version: 0.5.1 +" URL: https://github.com/othree/javascript-libraries-syntax.vim + +if b:current_syntax == 'html' + call jslibsyntax#load() +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/after/syntax/javascript.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/after/syntax/javascript.vim new file mode 100644 index 0000000..ff0e5a4 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/after/syntax/javascript.vim @@ -0,0 +1,10 @@ +" Vim plugin file +" Language: +" Maintainer: othree +" Last Change: 2013/08/26 +" Version: 0.4.1 +" URL: https://github.com/othree/javascript-libraries-syntax.vim + +if b:current_syntax == 'javascript' + call jslibsyntax#load() +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/after/syntax/ls.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/after/syntax/ls.vim new file mode 100644 index 0000000..2d7e77c --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/after/syntax/ls.vim @@ -0,0 +1,10 @@ +" Vim plugin file +" Language: +" Maintainer: othree +" Last Change: 2013/08/26 +" Version: 0.4.1 +" URL: https://github.com/othree/javascript-libraries-syntax.vim + +if b:current_syntax == 'ls' + call jslibsyntax#load() +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/after/syntax/typescript.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/after/syntax/typescript.vim new file mode 100644 index 0000000..69d3b06 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/after/syntax/typescript.vim @@ -0,0 +1,10 @@ +" Vim plugin file +" Language: +" Maintainer: othree +" Last Change: 2013/08/26 +" Version: 0.4.1 +" URL: https://github.com/othree/javascript-libraries-syntax.vim + +if b:current_syntax == 'typescript' + call jslibsyntax#load() +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/jslibsyntax.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/jslibsyntax.vim new file mode 100644 index 0000000..95f620a --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/jslibsyntax.vim @@ -0,0 +1,61 @@ +" Vim plugin file +" Language: JS Lib syntax loader +" Maintainer: othree +" Last Change: 2014/10/30 +" Version: 0.4 +" URL: https://github.com/othree/javascript-libraries-syntax.vim + +let s:libs = [ + \ 'jquery', + \ 'underscore', + \ 'backbone', + \ 'prelude', + \ 'angularjs', + \ 'angularui', + \ 'angularuirouter', + \ 'requirejs', + \ 'sugar', + \ 'jasmine', + \ 'chai', + \ 'react', + \ 'flux', + \ 'handlebars' + \ ] + +let s:default_libs = [ + \ 'jquery', + \ 'underscore', + \ 'backbone', + \ 'react' + \ ] + +let s:path = expand(':p:h') + +function! jslibsyntax#load() + if !exists('g:used_javascript_libs') + let g:used_javascript_libs = join(s:default_libs, ',') + endif + + let index = 0 + let loaded = 0 + while index < len(s:libs) + let lib = s:libs[index] + let use = g:used_javascript_libs =~ lib + if exists('b:javascript_lib_use_'.lib) + exec('let use = b:javascript_lib_use_'.lib) + endif + if use + let fn = s:path.'/syntax/'.lib.'.'.b:current_syntax.'.vim' + if filereadable(fn) + exe('source '.fnameescape(fn)) + let loaded = loaded + 1 + endif + endif + let index = index + 1 + endwhile + let fn = s:path.'/syntax/postprocess.'.b:current_syntax.'.vim' + if loaded > 0 && filereadable(fn) + exe('source '.fnameescape(fn)) + endif +endfunction + diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/angularjs.coffee.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/angularjs.coffee.vim new file mode 100644 index 0000000..14c598c --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/angularjs.coffee.vim @@ -0,0 +1,95 @@ +" Vim syntax file +" Language: AngularJS for coffee +" Maintainer: othree +" Last Change: 2013/07/26 +" Version: 1.1.13.1 +" URL: http://angularjs.org/ + +syntax keyword coffeeAngular angular containedin=ALLBUT,coffeeComment,coffeeLineComment,coffeeString,coffeeTemplate,coffeeTemplateSubstitution nextgroup=coffeeAngulardot +syntax match coffeeAngulardot contained /\./ nextgroup=coffeeAngularMethods +syntax keyword coffeeAngularMethods contained bind bootstrap copy element equals +syntax keyword coffeeAngularMethods contained extend forEach fromJson identity injector +syntax keyword coffeeAngularMethods contained isArray isDate isDefined isElement isFunction +syntax keyword coffeeAngularMethods contained isNumber isObject isString isUndefined lowercase +syntax keyword coffeeAngularMethods contained mock module noop toJson uppercase version + +syntax keyword coffeeAServices containedin=ALLBUT,coffeeComment,coffeeLineComment,coffeeString $anchorScroll $cacheFactory $compile $controller $document +syntax keyword coffeeAServices containedin=ALLBUT,coffeeComment,coffeeLineComment,coffeeString $exceptionHandler $filter $httpBackend +syntax keyword coffeeAServices containedin=ALLBUT,coffeeComment,coffeeLineComment,coffeeString $locale $parse $rootElement +syntax keyword coffeeAServices containedin=ALLBUT,coffeeComment,coffeeLineComment,coffeeString $routeParams $templateCache $window +syntax keyword coffeeAServices containedin=ALLBUT,coffeeComment,coffeeLineComment,coffeeString $cookies $resource $sanitize + +syntax keyword coffeeAServices containedin=ALLBUT,coffeeComment,coffeeLineComment,coffeeString $http nextgroup=coffeeAShttpdot +syntax match coffeeAShttpdot contained /\./ nextgroup=coffeeAShttpMethods +syntax keyword coffeeAShttpMethods contained get head post put delete jsonp defaults prendingRequests + +syntax keyword coffeeAServices containedin=ALLBUT,coffeeComment,coffeeLineComment,coffeeString $interpolate nextgroup=coffeeASinterpolatedot +syntax match coffeeASinterpolatedot contained /\./ nextgroup=coffeeASinterpolateMethods +syntax keyword coffeeASinterpolateMethods contained endSymbol startSymbol + +syntax keyword coffeeAServices containedin=ALLBUT,coffeeComment,coffeeLineComment,coffeeString $location nextgroup=coffeeASlocationdot +syntax match coffeeASlocationdot contained /\./ nextgroup=coffeeASlocationMethods +syntax keyword coffeeASlocationMethods contained absUrl hash host path port protocol replace search url + +syntax keyword coffeeAServices containedin=ALLBUT,coffeeComment,coffeeLineComment,coffeeString $log nextgroup=coffeeASlogdot +syntax match coffeeASlogdot contained /\./ nextgroup=coffeeASlogMethods +syntax keyword coffeeASlogMethods contained error info log warn + +syntax keyword coffeeAServices containedin=ALLBUT,coffeeComment,coffeeLineComment,coffeeString $q nextgroup=coffeeASqdot +syntax match coffeeASqdot contained /\./ nextgroup=coffeeASqMethods +syntax keyword coffeeASqMethods contained all defer reject when + +syntax keyword coffeeAServices containedin=ALLBUT,coffeeComment,coffeeLineComment,coffeeString $route nextgroup=coffeeASroutedot +syntax match coffeeASroutedot contained /\./ nextgroup=coffeeASrouteMethods +syntax keyword coffeeASrouteMethods contained reload current route + +syntax keyword coffeeAServices containedin=ALLBUT,coffeeComment,coffeeLineComment,coffeeString $timeout nextgroup=coffeeAStimeoutdot +syntax match coffeeAStimeoutdot contained /\./ nextgroup=coffeeAStimeoutMethods +syntax keyword coffeeAStimeoutMethods contained cancel + +syntax keyword coffeeAServices containedin=ALLBUT,coffeeComment,coffeeLineComment,coffeeString $scope $rootScope nextgroup=coffeeASscopedot +syntax match coffeeASscopedot contained /\./ nextgroup=coffeeASscopeMethods +syntax keyword coffeeASscopeMethods contained $apply $broadcast $destroy $digest $emit $eval $evalAsync $new $on $watch $id + +syntax keyword coffeeAServices containedin=ALLBUT,coffeeComment,coffeeLineComment,coffeeString $cookieStore nextgroup=coffeeAScookieStoredot +syntax match coffeeAScookieStoredot contained /\./ nextgroup=coffeeAScookieStoreMethods +syntax keyword coffeeAScookieStoreMethods contained get put remove + +syntax cluster coffeeAFunctions contains=coffeeAMFunctions +syntax cluster coffeeAAttrs contains=coffeeAMAttrs + +syntax keyword coffeeAMFunctions contained config constant controller directive factory +syntax keyword coffeeAMFunctions contained filter provider run service value +syntax keyword coffeeAMAttrs contained name requires + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_angularjs_coffee_syntax_inits") + if version < 508 + let did_angularjs_coffee_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink coffeeAngular Constant + HiLink coffeeAServices Constant + + HiLink coffeeAngularMethods PreProc + HiLink coffeeAMFunctions PreProc + HiLink coffeeAMAttrs PreProc + + HiLink coffeeAShttpMethods PreProc + HiLink coffeeASinterpolateMethods PreProc + HiLink coffeeASlocationMethods PreProc + HiLink coffeeASlogMethods PreProc + HiLink coffeeASqMethods PreProc + HiLink coffeeASrouteMethods PreProc + HiLink coffeeAStimeoutMethods PreProc + HiLink coffeeASscopeMethods PreProc + HiLink coffeeAScookieStoreMethods PreProc + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/angularjs.html.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/angularjs.html.vim new file mode 100644 index 0000000..0e1a4eb --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/angularjs.html.vim @@ -0,0 +1,32 @@ +" Vim syntax file +" Language: AngularJS for javascript +" Maintainer: othree , Rafael Benevides +" Last Change: 2015/10/04 +" Version: 1.4.5 - Taken from: https://code.angularjs.org/1.4.5/docs/api/ng/directive +" URL: http://angularjs.org/ + +setlocal iskeyword+=- + +syntax keyword htmlArg contained ng-app ng-bind ng-bind-html ng-bind-template ng-blur ng-change ng-checked ng-class +syntax keyword htmlArg contained ng-class-even ng-class-odd ng-click ng-cloak ng-controller ng-copy ng-csp ng-dblclick +syntax keyword htmlArg contained ng-disabled ng-form ng-hide ng-href ng-if ng-include ng-init ng-jq ng-keydown ng-keypress +syntax keyword htmlArg contained ng-keyup ng-list ng-model ng-model-options ng-mousedown ng-mouseenter ng-mouseleave ng-mousemove +syntax keyword htmlArg contained ng-mouseover ng-mouseup ng-non-bindable ng-open ng-options ng-paste ng-pluralize ng-readonly +syntax keyword htmlArg contained ng-repeat ng-selected ng-show ng-src ng-srcset ng-style ng-submit ng-switch ng-switch-when +syntax keyword htmlArg contained ng-switch-default ng-transclude ng-view +"Input directives +syntax keyword htmlArg contained ng-required ng-minlength ng-maxlength ng-pattern ng-trim ng-true-values ng-false-values ng-min ng-max + +" http://docs.angularjs.org/guide/directive +syntax match htmlArg contained /\(ng_\|ng:\|x-ng-\)\(app\|bind\|bind-html\|blur\|bind-template\|change\|checked\|class\)/ +syntax match htmlArg contained /\(ng_\|ng:\|x-ng-\)\(class-even\|class-odd\|click\|cloak\|controller\|copy\|csp\|dblclick\)/ +syntax match htmlArg contained /\(ng_\|ng:\|x-ng-\)\(disabled\|form\|hide\|href\|if\|include\|init\|jq\|keydown\|keypress\)/ +syntax match htmlArg contained /\(ng_\|ng:\|x-ng-\)\(keyup\|list\|model\|model-options\|mousedown\|mouseenter\|mouseleave\|mousemove\)/ +syntax match htmlArg contained /\(ng_\|ng:\|x-ng-\)\(mouseover\|mouseup\|non-bindable\|open\|options\|paste\|pluralize\|readonly\)/ +syntax match htmlArg contained /\(ng_\|ng:\|x-ng-\)\(repeat\|selected\|show\|src\|srset\|style\|submit\|switch\|switch-when\)/ +syntax match htmlArg contained /\(ng_\|ng:\|x-ng-\)\(switch-default\|transclude\|view\)/ +syntax match htmlArg contained /\(ng_\|ng:\|x-ng-\)\(required\|minlength\|maxlength\|pattern\|trim\|true-values\|false-values\|min\|max\)/ + +syntax keyword htmlArg contained expression autoscroll count when offset on + +syntax keyword htmlTagName contained ng-form ng-include ng-pluralize ng-transclude ng-view diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/angularjs.javascript.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/angularjs.javascript.vim new file mode 100644 index 0000000..ad6d087 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/angularjs.javascript.vim @@ -0,0 +1,95 @@ +" Vim syntax file +" Language: AngularJS for javascript +" Maintainer: othree +" Last Change: 2013/07/26 +" Version: 1.1.13.1 +" URL: http://angularjs.org/ + +syntax keyword javascriptAngular angular containedin=ALLBUT,javascriptComment,javascriptLineComment,javascriptString,javascriptTemplate,javascriptTemplateSubstitution nextgroup=javascriptAngulardot +syntax match javascriptAngulardot contained /\./ nextgroup=javascriptAngularMethods +syntax keyword javascriptAngularMethods contained bind bootstrap copy element equals +syntax keyword javascriptAngularMethods contained extend forEach fromJson identity injector +syntax keyword javascriptAngularMethods contained isArray isDate isDefined isElement isFunction +syntax keyword javascriptAngularMethods contained isNumber isObject isString isUndefined lowercase +syntax keyword javascriptAngularMethods contained mock module noop toJson uppercase version + +syntax keyword javascriptAServices containedin=ALLBUT,javascriptComment,javascriptLineComment,javascriptString $anchorScroll $cacheFactory $compile $controller $document +syntax keyword javascriptAServices containedin=ALLBUT,javascriptComment,javascriptLineComment,javascriptString $exceptionHandler $filter $httpBackend +syntax keyword javascriptAServices containedin=ALLBUT,javascriptComment,javascriptLineComment,javascriptString $locale $parse $rootElement +syntax keyword javascriptAServices containedin=ALLBUT,javascriptComment,javascriptLineComment,javascriptString $routeParams $templateCache $window +syntax keyword javascriptAServices containedin=ALLBUT,javascriptComment,javascriptLineComment,javascriptString $cookies $resource $sanitize + +syntax keyword javascriptAServices containedin=ALLBUT,javascriptComment,javascriptLineComment,javascriptString $http nextgroup=javascriptAShttpdot +syntax match javascriptAShttpdot contained /\./ nextgroup=javascriptAShttpMethods +syntax keyword javascriptAShttpMethods contained get head post put delete jsonp defaults prendingRequests + +syntax keyword javascriptAServices containedin=ALLBUT,javascriptComment,javascriptLineComment,javascriptString $interpolate nextgroup=javascriptASinterpolatedot +syntax match javascriptASinterpolatedot contained /\./ nextgroup=javascriptASinterpolateMethods +syntax keyword javascriptASinterpolateMethods contained endSymbol startSymbol + +syntax keyword javascriptAServices containedin=ALLBUT,javascriptComment,javascriptLineComment,javascriptString $location nextgroup=javascriptASlocationdot +syntax match javascriptASlocationdot contained /\./ nextgroup=javascriptASlocationMethods +syntax keyword javascriptASlocationMethods contained absUrl hash host path port protocol replace search url + +syntax keyword javascriptAServices containedin=ALLBUT,javascriptComment,javascriptLineComment,javascriptString $log nextgroup=javascriptASlogdot +syntax match javascriptASlogdot contained /\./ nextgroup=javascriptASlogMethods +syntax keyword javascriptASlogMethods contained error info log warn + +syntax keyword javascriptAServices containedin=ALLBUT,javascriptComment,javascriptLineComment,javascriptString $q nextgroup=javascriptASqdot +syntax match javascriptASqdot contained /\./ nextgroup=javascriptASqMethods +syntax keyword javascriptASqMethods contained all defer reject when + +syntax keyword javascriptAServices containedin=ALLBUT,javascriptComment,javascriptLineComment,javascriptString $route nextgroup=javascriptASroutedot +syntax match javascriptASroutedot contained /\./ nextgroup=javascriptASrouteMethods +syntax keyword javascriptASrouteMethods contained reload current route + +syntax keyword javascriptAServices containedin=ALLBUT,javascriptComment,javascriptLineComment,javascriptString $timeout nextgroup=javascriptAStimeoutdot +syntax match javascriptAStimeoutdot contained /\./ nextgroup=javascriptAStimeoutMethods +syntax keyword javascriptAStimeoutMethods contained cancel + +syntax keyword javascriptAServices containedin=ALLBUT,javascriptComment,javascriptLineComment,javascriptString $scope $rootScope nextgroup=javascriptASscopedot +syntax match javascriptASscopedot contained /\./ nextgroup=javascriptASscopeMethods +syntax keyword javascriptASscopeMethods contained $apply $broadcast $destroy $digest $emit $eval $evalAsync $new $on $watch $id + +syntax keyword javascriptAServices containedin=ALLBUT,javascriptComment,javascriptLineComment,javascriptString $cookieStore nextgroup=javascriptAScookieStoredot +syntax match javascriptAScookieStoredot contained /\./ nextgroup=javascriptAScookieStoreMethods +syntax keyword javascriptAScookieStoreMethods contained get put remove + +syntax cluster javascriptAFunctions contains=javascriptAMFunctions +syntax cluster javascriptAAttrs contains=javascriptAMAttrs + +syntax keyword javascriptAMFunctions contained config constant controller directive factory +syntax keyword javascriptAMFunctions contained filter provider run service value +syntax keyword javascriptAMAttrs contained name requires + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_angularjs_javascript_syntax_inits") + if version < 508 + let did_angularjs_javascript_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink javascriptAngular Constant + HiLink javascriptAServices Constant + + HiLink javascriptAngularMethods PreProc + HiLink javascriptAMFunctions PreProc + HiLink javascriptAMAttrs PreProc + + HiLink javascriptAShttpMethods PreProc + HiLink javascriptASinterpolateMethods PreProc + HiLink javascriptASlocationMethods PreProc + HiLink javascriptASlogMethods PreProc + HiLink javascriptASqMethods PreProc + HiLink javascriptASrouteMethods PreProc + HiLink javascriptAStimeoutMethods PreProc + HiLink javascriptASscopeMethods PreProc + HiLink javascriptAScookieStoreMethods PreProc + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/angularjs.ls.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/angularjs.ls.vim new file mode 100644 index 0000000..f60b395 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/angularjs.ls.vim @@ -0,0 +1,95 @@ +" Vim syntax file +" Language: AngularJS for ls +" Maintainer: othree +" Last Change: 2013/07/26 +" Version: 1.1.13.1 +" URL: http://angularjs.org/ + +syntax keyword lsAngular angular containedin=ALLBUT,lsComment,lsLineComment,lsString,lsTemplate,lsTemplateSubstitution nextgroup=lsAngulardot +syntax match lsAngulardot contained /\./ nextgroup=lsAngularMethods +syntax keyword lsAngularMethods contained bind bootstrap copy element equals +syntax keyword lsAngularMethods contained extend forEach fromJson identity injector +syntax keyword lsAngularMethods contained isArray isDate isDefined isElement isFunction +syntax keyword lsAngularMethods contained isNumber isObject isString isUndefined lowercase +syntax keyword lsAngularMethods contained mock module noop toJson uppercase version + +syntax keyword lsAServices containedin=ALLBUT,lsComment,lsLineComment,lsString $anchorScroll $cacheFactory $compile $controller $document +syntax keyword lsAServices containedin=ALLBUT,lsComment,lsLineComment,lsString $exceptionHandler $filter $httpBackend +syntax keyword lsAServices containedin=ALLBUT,lsComment,lsLineComment,lsString $locale $parse $rootElement +syntax keyword lsAServices containedin=ALLBUT,lsComment,lsLineComment,lsString $routeParams $templateCache $window +syntax keyword lsAServices containedin=ALLBUT,lsComment,lsLineComment,lsString $cookies $resource $sanitize + +syntax keyword lsAServices containedin=ALLBUT,lsComment,lsLineComment,lsString $http nextgroup=lsAShttpdot +syntax match lsAShttpdot contained /\./ nextgroup=lsAShttpMethods +syntax keyword lsAShttpMethods contained get head post put delete jsonp defaults prendingRequests + +syntax keyword lsAServices containedin=ALLBUT,lsComment,lsLineComment,lsString $interpolate nextgroup=lsASinterpolatedot +syntax match lsASinterpolatedot contained /\./ nextgroup=lsASinterpolateMethods +syntax keyword lsASinterpolateMethods contained endSymbol startSymbol + +syntax keyword lsAServices containedin=ALLBUT,lsComment,lsLineComment,lsString $location nextgroup=lsASlocationdot +syntax match lsASlocationdot contained /\./ nextgroup=lsASlocationMethods +syntax keyword lsASlocationMethods contained absUrl hash host path port protocol replace search url + +syntax keyword lsAServices containedin=ALLBUT,lsComment,lsLineComment,lsString $log nextgroup=lsASlogdot +syntax match lsASlogdot contained /\./ nextgroup=lsASlogMethods +syntax keyword lsASlogMethods contained error info log warn + +syntax keyword lsAServices containedin=ALLBUT,lsComment,lsLineComment,lsString $q nextgroup=lsASqdot +syntax match lsASqdot contained /\./ nextgroup=lsASqMethods +syntax keyword lsASqMethods contained all defer reject when + +syntax keyword lsAServices containedin=ALLBUT,lsComment,lsLineComment,lsString $route nextgroup=lsASroutedot +syntax match lsASroutedot contained /\./ nextgroup=lsASrouteMethods +syntax keyword lsASrouteMethods contained reload current route + +syntax keyword lsAServices containedin=ALLBUT,lsComment,lsLineComment,lsString $timeout nextgroup=lsAStimeoutdot +syntax match lsAStimeoutdot contained /\./ nextgroup=lsAStimeoutMethods +syntax keyword lsAStimeoutMethods contained cancel + +syntax keyword lsAServices containedin=ALLBUT,lsComment,lsLineComment,lsString $scope $rootScope nextgroup=lsASscopedot +syntax match lsASscopedot contained /\./ nextgroup=lsASscopeMethods +syntax keyword lsASscopeMethods contained $apply $broadcast $destroy $digest $emit $eval $evalAsync $new $on $watch $id + +syntax keyword lsAServices containedin=ALLBUT,lsComment,lsLineComment,lsString $cookieStore nextgroup=lsAScookieStoredot +syntax match lsAScookieStoredot contained /\./ nextgroup=lsAScookieStoreMethods +syntax keyword lsAScookieStoreMethods contained get put remove + +syntax cluster lsAFunctions contains=lsAMFunctions +syntax cluster lsAAttrs contains=lsAMAttrs + +syntax keyword lsAMFunctions contained config constant controller directive factory +syntax keyword lsAMFunctions contained filter provider run service value +syntax keyword lsAMAttrs contained name requires + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_angularjs_ls_syntax_inits") + if version < 508 + let did_angularjs_ls_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink lsAngular Constant + HiLink lsAServices Constant + + HiLink lsAngularMethods PreProc + HiLink lsAMFunctions PreProc + HiLink lsAMAttrs PreProc + + HiLink lsAShttpMethods PreProc + HiLink lsASinterpolateMethods PreProc + HiLink lsASlocationMethods PreProc + HiLink lsASlogMethods PreProc + HiLink lsASqMethods PreProc + HiLink lsASrouteMethods PreProc + HiLink lsAStimeoutMethods PreProc + HiLink lsASscopeMethods PreProc + HiLink lsAScookieStoreMethods PreProc + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/angularjs.typescript.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/angularjs.typescript.vim new file mode 100644 index 0000000..568fbbc --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/angularjs.typescript.vim @@ -0,0 +1,95 @@ +" Vim syntax file +" Language: AngularJS for typescript +" Maintainer: othree +" Last Change: 2013/07/26 +" Version: 1.1.13.1 +" URL: http://angularjs.org/ + +syntax keyword typescriptAngular angular containedin=ALLBUT,typescriptComment,typescriptLineComment,typescriptString,typescriptTemplate,typescriptTemplateSubstitution nextgroup=typescriptAngulardot +syntax match typescriptAngulardot contained /\./ nextgroup=typescriptAngularMethods +syntax keyword typescriptAngularMethods contained bind bootstrap copy element equals +syntax keyword typescriptAngularMethods contained extend forEach fromJson identity injector +syntax keyword typescriptAngularMethods contained isArray isDate isDefined isElement isFunction +syntax keyword typescriptAngularMethods contained isNumber isObject isString isUndefined lowercase +syntax keyword typescriptAngularMethods contained mock module noop toJson uppercase version + +syntax keyword typescriptAServices containedin=ALLBUT,typescriptComment,typescriptLineComment,typescriptString $anchorScroll $cacheFactory $compile $controller $document +syntax keyword typescriptAServices containedin=ALLBUT,typescriptComment,typescriptLineComment,typescriptString $exceptionHandler $filter $httpBackend +syntax keyword typescriptAServices containedin=ALLBUT,typescriptComment,typescriptLineComment,typescriptString $locale $parse $rootElement +syntax keyword typescriptAServices containedin=ALLBUT,typescriptComment,typescriptLineComment,typescriptString $routeParams $templateCache $window +syntax keyword typescriptAServices containedin=ALLBUT,typescriptComment,typescriptLineComment,typescriptString $cookies $resource $sanitize + +syntax keyword typescriptAServices containedin=ALLBUT,typescriptComment,typescriptLineComment,typescriptString $http nextgroup=typescriptAShttpdot +syntax match typescriptAShttpdot contained /\./ nextgroup=typescriptAShttpMethods +syntax keyword typescriptAShttpMethods contained get head post put delete jsonp defaults prendingRequests + +syntax keyword typescriptAServices containedin=ALLBUT,typescriptComment,typescriptLineComment,typescriptString $interpolate nextgroup=typescriptASinterpolatedot +syntax match typescriptASinterpolatedot contained /\./ nextgroup=typescriptASinterpolateMethods +syntax keyword typescriptASinterpolateMethods contained endSymbol startSymbol + +syntax keyword typescriptAServices containedin=ALLBUT,typescriptComment,typescriptLineComment,typescriptString $location nextgroup=typescriptASlocationdot +syntax match typescriptASlocationdot contained /\./ nextgroup=typescriptASlocationMethods +syntax keyword typescriptASlocationMethods contained absUrl hash host path port protocol replace search url + +syntax keyword typescriptAServices containedin=ALLBUT,typescriptComment,typescriptLineComment,typescriptString $log nextgroup=typescriptASlogdot +syntax match typescriptASlogdot contained /\./ nextgroup=typescriptASlogMethods +syntax keyword typescriptASlogMethods contained error info log warn + +syntax keyword typescriptAServices containedin=ALLBUT,typescriptComment,typescriptLineComment,typescriptString $q nextgroup=typescriptASqdot +syntax match typescriptASqdot contained /\./ nextgroup=typescriptASqMethods +syntax keyword typescriptASqMethods contained all defer reject when + +syntax keyword typescriptAServices containedin=ALLBUT,typescriptComment,typescriptLineComment,typescriptString $route nextgroup=typescriptASroutedot +syntax match typescriptASroutedot contained /\./ nextgroup=typescriptASrouteMethods +syntax keyword typescriptASrouteMethods contained reload current route + +syntax keyword typescriptAServices containedin=ALLBUT,typescriptComment,typescriptLineComment,typescriptString $timeout nextgroup=typescriptAStimeoutdot +syntax match typescriptAStimeoutdot contained /\./ nextgroup=typescriptAStimeoutMethods +syntax keyword typescriptAStimeoutMethods contained cancel + +syntax keyword typescriptAServices containedin=ALLBUT,typescriptComment,typescriptLineComment,typescriptString $scope $rootScope nextgroup=typescriptASscopedot +syntax match typescriptASscopedot contained /\./ nextgroup=typescriptASscopeMethods +syntax keyword typescriptASscopeMethods contained $apply $broadcast $destroy $digest $emit $eval $evalAsync $new $on $watch $id + +syntax keyword typescriptAServices containedin=ALLBUT,typescriptComment,typescriptLineComment,typescriptString $cookieStore nextgroup=typescriptAScookieStoredot +syntax match typescriptAScookieStoredot contained /\./ nextgroup=typescriptAScookieStoreMethods +syntax keyword typescriptAScookieStoreMethods contained get put remove + +syntax cluster typescriptAFunctions contains=typescriptAMFunctions +syntax cluster typescriptAAttrs contains=typescriptAMAttrs + +syntax keyword typescriptAMFunctions contained config constant controller directive factory +syntax keyword typescriptAMFunctions contained filter provider run service value +syntax keyword typescriptAMAttrs contained name requires + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_angularjs_typescript_syntax_inits") + if version < 508 + let did_angularjs_typescript_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink typescriptAngular Constant + HiLink typescriptAServices Constant + + HiLink typescriptAngularMethods PreProc + HiLink typescriptAMFunctions PreProc + HiLink typescriptAMAttrs PreProc + + HiLink typescriptAShttpMethods PreProc + HiLink typescriptASinterpolateMethods PreProc + HiLink typescriptASlocationMethods PreProc + HiLink typescriptASlogMethods PreProc + HiLink typescriptASqMethods PreProc + HiLink typescriptASrouteMethods PreProc + HiLink typescriptAStimeoutMethods PreProc + HiLink typescriptASscopeMethods PreProc + HiLink typescriptAScookieStoreMethods PreProc + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/angularui.html.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/angularui.html.vim new file mode 100644 index 0000000..14e79df --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/angularui.html.vim @@ -0,0 +1,14 @@ +" Vim syntax file +" Language: AngularUI for HTML +" Maintainer: Tom Vincent +" URL: http://angular-ui.github.io + +setlocal iskeyword+=- + +syntax keyword htmlArg contained ui-view ui-event ui-match ui-include ui-jq +syntax keyword htmlArg contained ui-keypress ui-keydown ui-keyup ui-options +syntax keyword htmlArg contained ui-reset ui-route ui-scrollfixed ui-show +syntax keyword htmlArg contained ui-hide ui-toggle ui-validate ui-date +syntax keyword htmlArg contained ui-codemirror ui-ace ui-calendar ui-map +syntax keyword htmlArg contained ui-select2 ui-tinymce ui-sortable ui-sref +syntax keyword htmlArg contained ui-sref-active diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/angularuirouter.coffee.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/angularuirouter.coffee.vim new file mode 100644 index 0000000..6edfe91 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/angularuirouter.coffee.vim @@ -0,0 +1,44 @@ +" Vim syntax file +" Language: AngularUI Router for coffee +" Maintainer: Dan Hansen +" URL: http://angular-ui.github.io/ui-router/ + +syntax keyword coffeeUIRouter containedin=ALLBUT,coffeeComment,coffeeLineComment,coffeeString $stateProvider nextgroup=coffeeASstateProviderdot +syntax match coffeeASstateProverdot contained /\./ nextgroup=coffeeASstateProviderMethods +syntax keyword coffeeASstateProviderMethods contained state decorator + +syntax keyword coffeeUIRouter containedin=ALLBUT,coffeeComment,coffeeLineComment,coffeeString $urlRouterProvider nextgroup=coffeeASurlRouterProviderdot +syntax match coffeeASstateProverdot contained /\./ nextgroup=coffeeASurlRouterProviderMethods +syntax keyword coffeeASurlRouterProviderMethods contained when otherwise rule + +syntax keyword coffeeUIRouter containedin=ALLBUT,coffeeComment,coffeeLineComment,coffeeString $state nextgroup=coffeeASstatedot +syntax match coffeeASstatedot contained /\./ nextgroup=coffeeASstateMethods +syntax keyword coffeeASstateMethods contained current get go href includes is reload transitionTo + +syntax keyword coffeeUIRouter containedin=ALLBUT,coffeeComment,coffeeLineComment,coffeeString $urlRouter nextgroup=coffeeASurlRouterdot +syntax match coffeeASurlRouterdot contained /\./ nextgroup=coffeeASurlRouterMethods +syntax keyword coffeeASurlRouterMethods contained href sync + +syntax keyword coffeeUIRouter containedin=ALLBUT,coffeeComment,coffeeLineComment,coffeeString $stateParams $uiViewScroll + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_angularui_router_coffee_syntax_inits") + if version < 508 + let did_angularui_router_coffee_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink coffeeUIRouter Constant + + HiLink coffeeASstateProviderMethods PreProc + HiLink coffeeASurlRouterProviderMethods PreProc + HiLink coffeeASstateMethods PreProc + HiLink coffeeASurlRouterMethods PreProc + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/angularuirouter.javascript.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/angularuirouter.javascript.vim new file mode 100644 index 0000000..878162f --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/angularuirouter.javascript.vim @@ -0,0 +1,44 @@ +" Vim syntax file +" Language: AngularUI Router for javascript +" Maintainer: Dan Hansen +" URL: http://angular-ui.github.io/ui-router/ + +syntax keyword javascriptUIRouter containedin=ALLBUT,javascriptComment,javascriptLineComment,javascriptString $stateProvider nextgroup=javascriptASstateProviderdot +syntax match javascriptASstateProverdot contained /\./ nextgroup=javascriptASstateProviderMethods +syntax keyword javascriptASstateProviderMethods contained state decorator + +syntax keyword javascriptUIRouter containedin=ALLBUT,javascriptComment,javascriptLineComment,javascriptString $urlRouterProvider nextgroup=javascriptASurlRouterProviderdot +syntax match javascriptASstateProverdot contained /\./ nextgroup=javascriptASurlRouterProviderMethods +syntax keyword javascriptASurlRouterProviderMethods contained when otherwise rule + +syntax keyword javascriptUIRouter containedin=ALLBUT,javascriptComment,javascriptLineComment,javascriptString $state nextgroup=javascriptASstatedot +syntax match javascriptASstatedot contained /\./ nextgroup=javascriptASstateMethods +syntax keyword javascriptASstateMethods contained current get go href includes is reload transitionTo + +syntax keyword javascriptUIRouter containedin=ALLBUT,javascriptComment,javascriptLineComment,javascriptString $urlRouter nextgroup=javascriptASurlRouterdot +syntax match javascriptASurlRouterdot contained /\./ nextgroup=javascriptASurlRouterMethods +syntax keyword javascriptASurlRouterMethods contained href sync + +syntax keyword javascriptUIRouter containedin=ALLBUT,javascriptComment,javascriptLineComment,javascriptString $stateParams $uiViewScroll + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_angularui_router_javascript_syntax_inits") + if version < 508 + let did_angularui_router_javascript_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink javascriptUIRouter Constant + + HiLink javascriptASstateProviderMethods PreProc + HiLink javascriptASurlRouterProviderMethods PreProc + HiLink javascriptASstateMethods PreProc + HiLink javascriptASurlRouterMethods PreProc + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/angularuirouter.ls.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/angularuirouter.ls.vim new file mode 100644 index 0000000..42fbc39 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/angularuirouter.ls.vim @@ -0,0 +1,44 @@ +" Vim syntax file +" Language: AngularUI Router for ls +" Maintainer: Dan Hansen +" URL: http://angular-ui.github.io/ui-router/ + +syntax keyword lsUIRouter containedin=ALLBUT,lsComment,lsLineComment,lsString $stateProvider nextgroup=lsASstateProviderdot +syntax match lsASstateProverdot contained /\./ nextgroup=lsASstateProviderMethods +syntax keyword lsASstateProviderMethods contained state decorator + +syntax keyword lsUIRouter containedin=ALLBUT,lsComment,lsLineComment,lsString $urlRouterProvider nextgroup=lsASurlRouterProviderdot +syntax match lsASstateProverdot contained /\./ nextgroup=lsASurlRouterProviderMethods +syntax keyword lsASurlRouterProviderMethods contained when otherwise rule + +syntax keyword lsUIRouter containedin=ALLBUT,lsComment,lsLineComment,lsString $state nextgroup=lsASstatedot +syntax match lsASstatedot contained /\./ nextgroup=lsASstateMethods +syntax keyword lsASstateMethods contained current get go href includes is reload transitionTo + +syntax keyword lsUIRouter containedin=ALLBUT,lsComment,lsLineComment,lsString $urlRouter nextgroup=lsASurlRouterdot +syntax match lsASurlRouterdot contained /\./ nextgroup=lsASurlRouterMethods +syntax keyword lsASurlRouterMethods contained href sync + +syntax keyword lsUIRouter containedin=ALLBUT,lsComment,lsLineComment,lsString $stateParams $uiViewScroll + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_angularui_router_ls_syntax_inits") + if version < 508 + let did_angularui_router_ls_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink lsUIRouter Constant + + HiLink lsASstateProviderMethods PreProc + HiLink lsASurlRouterProviderMethods PreProc + HiLink lsASstateMethods PreProc + HiLink lsASurlRouterMethods PreProc + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/angularuirouter.typescript.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/angularuirouter.typescript.vim new file mode 100644 index 0000000..b686954 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/angularuirouter.typescript.vim @@ -0,0 +1,44 @@ +" Vim syntax file +" Language: AngularUI Router for typescript +" Maintainer: Dan Hansen +" URL: http://angular-ui.github.io/ui-router/ + +syntax keyword typescriptUIRouter containedin=ALLBUT,typescriptComment,typescriptLineComment,typescriptString $stateProvider nextgroup=typescriptASstateProviderdot +syntax match typescriptASstateProverdot contained /\./ nextgroup=typescriptASstateProviderMethods +syntax keyword typescriptASstateProviderMethods contained state decorator + +syntax keyword typescriptUIRouter containedin=ALLBUT,typescriptComment,typescriptLineComment,typescriptString $urlRouterProvider nextgroup=typescriptASurlRouterProviderdot +syntax match typescriptASstateProverdot contained /\./ nextgroup=typescriptASurlRouterProviderMethods +syntax keyword typescriptASurlRouterProviderMethods contained when otherwise rule + +syntax keyword typescriptUIRouter containedin=ALLBUT,typescriptComment,typescriptLineComment,typescriptString $state nextgroup=typescriptASstatedot +syntax match typescriptASstatedot contained /\./ nextgroup=typescriptASstateMethods +syntax keyword typescriptASstateMethods contained current get go href includes is reload transitionTo + +syntax keyword typescriptUIRouter containedin=ALLBUT,typescriptComment,typescriptLineComment,typescriptString $urlRouter nextgroup=typescriptASurlRouterdot +syntax match typescriptASurlRouterdot contained /\./ nextgroup=typescriptASurlRouterMethods +syntax keyword typescriptASurlRouterMethods contained href sync + +syntax keyword typescriptUIRouter containedin=ALLBUT,typescriptComment,typescriptLineComment,typescriptString $stateParams $uiViewScroll + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_angularui_router_typescript_syntax_inits") + if version < 508 + let did_angularui_router_typescript_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink typescriptUIRouter Constant + + HiLink typescriptASstateProviderMethods PreProc + HiLink typescriptASurlRouterProviderMethods PreProc + HiLink typescriptASstateMethods PreProc + HiLink typescriptASurlRouterMethods PreProc + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/backbone.coffee.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/backbone.coffee.vim new file mode 100644 index 0000000..af0b119 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/backbone.coffee.vim @@ -0,0 +1,67 @@ +" Vim syntax file +" Language: Backbone.js for coffee +" Maintainer: othree +" Last Change: 2016/01/07 +" Version: 1.2.3 +" URL: http://backbonejs.org/ + +syntax keyword coffeeBackbone Backbone containedin=ALLBUT,coffeeComment,coffeeLineComment,coffeeString,coffeeTemplate,coffeeTemplateSubstitution,coffeeBDot +syntax match coffeeBDot contained /\./ nextgroup=coffeeBObjects +syntax keyword coffeeBObjects contained Collection Model View Events Router History Utility sync ajax emulateHTTP emulateJSON + +syntax cluster coffeeBFunctions contains=coffeeBEvents,coffeeBModel,coffeeBCollection,coffeeBRouter,coffeeBHistory,coffeeBSync,coffeeBView,coffeeBUtility +syntax cluster coffeeBAttrs contains=coffeeBModelAttrs,coffeeBCollectionAttrs,coffeeBRouterAttrs,coffeeBSyncAttrs,coffeeBViewAttrs + +syntax keyword coffeeBEvents contained on off trigger once listenTo stopListening listenToOnce +syntax keyword coffeeBModel contained extend constructor initialize get set escape has unset clear +syntax keyword coffeeBModel contained toJSON sync fetch save destroy validate validationError url parse +syntax keyword coffeeBModel contained clone isNew hasChanged changedAttributes previous previousAttributes +syntax keyword coffeeBCollection contained extend constructor initialize toJSON sync add remove reset set get at +syntax keyword coffeeBCollection contained push pop unshift shift slice length comparator sort pluck where +syntax keyword coffeeBCollection contained findWhere url parse clone fetch create +syntax keyword coffeeBRouter contained extend constructor initialize route navigate execute +syntax keyword coffeeBHistory contained start +syntax keyword coffeeBSync contained ajax +syntax keyword coffeeBView contained extend constructor initialize setElement render remove delegateEvents undelegateEvents +syntax keyword coffeeBUtility contained noConflict + +syntax keyword coffeeBModelAttrs contained id idAttribute cid attributes changed defaults urlRoot +syntax keyword coffeeBCollectionAttrs contained model modelId models length comparator url +syntax keyword coffeeBRouterAttrs contained routes +syntax keyword coffeeBViewAttrs contained el attributes events +syntax keyword coffeeBViewAttrs match /$el/ +syntax keyword coffeeBViewAttrs match /$/ + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_backbone_coffee_syntax_inits") + if version < 508 + let did_backbone_coffee_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink coffeeBackbone Constant + HiLink coffeeBObjects Constant + + HiLink coffeeBEvents PreProc + HiLink coffeeBModel PreProc + HiLink coffeeBCollection PreProc + HiLink coffeeBRouter PreProc + HiLink coffeeBHistory PreProc + HiLink coffeeBSync PreProc + HiLink coffeeBView PreProc + HiLink coffeeBUtility PreProc + + HiLink coffeeBModelAttrs PreProc + HiLink coffeeBCollectionAttrs PreProc + HiLink coffeeBRouterAttrs PreProc + HiLink coffeeBSyncAttrs PreProc + HiLink coffeeBViewAttrs PreProc + + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/backbone.javascript.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/backbone.javascript.vim new file mode 100644 index 0000000..70a5d16 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/backbone.javascript.vim @@ -0,0 +1,67 @@ +" Vim syntax file +" Language: Backbone.js for javascript +" Maintainer: othree +" Last Change: 2016/01/07 +" Version: 1.2.3 +" URL: http://backbonejs.org/ + +syntax keyword javascriptBackbone Backbone containedin=ALLBUT,javascriptComment,javascriptLineComment,javascriptString,javascriptTemplate,javascriptTemplateSubstitution,javascriptBDot +syntax match javascriptBDot contained /\./ nextgroup=javascriptBObjects +syntax keyword javascriptBObjects contained Collection Model View Events Router History Utility sync ajax emulateHTTP emulateJSON + +syntax cluster javascriptBFunctions contains=javascriptBEvents,javascriptBModel,javascriptBCollection,javascriptBRouter,javascriptBHistory,javascriptBSync,javascriptBView,javascriptBUtility +syntax cluster javascriptBAttrs contains=javascriptBModelAttrs,javascriptBCollectionAttrs,javascriptBRouterAttrs,javascriptBSyncAttrs,javascriptBViewAttrs + +syntax keyword javascriptBEvents contained on off trigger once listenTo stopListening listenToOnce +syntax keyword javascriptBModel contained extend constructor initialize get set escape has unset clear +syntax keyword javascriptBModel contained toJSON sync fetch save destroy validate validationError url parse +syntax keyword javascriptBModel contained clone isNew hasChanged changedAttributes previous previousAttributes +syntax keyword javascriptBCollection contained extend constructor initialize toJSON sync add remove reset set get at +syntax keyword javascriptBCollection contained push pop unshift shift slice length comparator sort pluck where +syntax keyword javascriptBCollection contained findWhere url parse clone fetch create +syntax keyword javascriptBRouter contained extend constructor initialize route navigate execute +syntax keyword javascriptBHistory contained start +syntax keyword javascriptBSync contained ajax +syntax keyword javascriptBView contained extend constructor initialize setElement render remove delegateEvents undelegateEvents +syntax keyword javascriptBUtility contained noConflict + +syntax keyword javascriptBModelAttrs contained id idAttribute cid attributes changed defaults urlRoot +syntax keyword javascriptBCollectionAttrs contained model modelId models length comparator url +syntax keyword javascriptBRouterAttrs contained routes +syntax keyword javascriptBViewAttrs contained el attributes events +syntax keyword javascriptBViewAttrs match /$el/ +syntax keyword javascriptBViewAttrs match /$/ + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_backbone_javascript_syntax_inits") + if version < 508 + let did_backbone_javascript_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink javascriptBackbone Constant + HiLink javascriptBObjects Constant + + HiLink javascriptBEvents PreProc + HiLink javascriptBModel PreProc + HiLink javascriptBCollection PreProc + HiLink javascriptBRouter PreProc + HiLink javascriptBHistory PreProc + HiLink javascriptBSync PreProc + HiLink javascriptBView PreProc + HiLink javascriptBUtility PreProc + + HiLink javascriptBModelAttrs PreProc + HiLink javascriptBCollectionAttrs PreProc + HiLink javascriptBRouterAttrs PreProc + HiLink javascriptBSyncAttrs PreProc + HiLink javascriptBViewAttrs PreProc + + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/backbone.ls.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/backbone.ls.vim new file mode 100644 index 0000000..63aef70 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/backbone.ls.vim @@ -0,0 +1,67 @@ +" Vim syntax file +" Language: Backbone.js for ls +" Maintainer: othree +" Last Change: 2016/01/07 +" Version: 1.2.3 +" URL: http://backbonejs.org/ + +syntax keyword lsBackbone Backbone containedin=ALLBUT,lsComment,lsLineComment,lsString,lsTemplate,lsTemplateSubstitution,lsBDot +syntax match lsBDot contained /\./ nextgroup=lsBObjects +syntax keyword lsBObjects contained Collection Model View Events Router History Utility sync ajax emulateHTTP emulateJSON + +syntax cluster lsBFunctions contains=lsBEvents,lsBModel,lsBCollection,lsBRouter,lsBHistory,lsBSync,lsBView,lsBUtility +syntax cluster lsBAttrs contains=lsBModelAttrs,lsBCollectionAttrs,lsBRouterAttrs,lsBSyncAttrs,lsBViewAttrs + +syntax keyword lsBEvents contained on off trigger once listenTo stopListening listenToOnce +syntax keyword lsBModel contained extend constructor initialize get set escape has unset clear +syntax keyword lsBModel contained toJSON sync fetch save destroy validate validationError url parse +syntax keyword lsBModel contained clone isNew hasChanged changedAttributes previous previousAttributes +syntax keyword lsBCollection contained extend constructor initialize toJSON sync add remove reset set get at +syntax keyword lsBCollection contained push pop unshift shift slice length comparator sort pluck where +syntax keyword lsBCollection contained findWhere url parse clone fetch create +syntax keyword lsBRouter contained extend constructor initialize route navigate execute +syntax keyword lsBHistory contained start +syntax keyword lsBSync contained ajax +syntax keyword lsBView contained extend constructor initialize setElement render remove delegateEvents undelegateEvents +syntax keyword lsBUtility contained noConflict + +syntax keyword lsBModelAttrs contained id idAttribute cid attributes changed defaults urlRoot +syntax keyword lsBCollectionAttrs contained model modelId models length comparator url +syntax keyword lsBRouterAttrs contained routes +syntax keyword lsBViewAttrs contained el attributes events +syntax keyword lsBViewAttrs match /$el/ +syntax keyword lsBViewAttrs match /$/ + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_backbone_ls_syntax_inits") + if version < 508 + let did_backbone_ls_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink lsBackbone Constant + HiLink lsBObjects Constant + + HiLink lsBEvents PreProc + HiLink lsBModel PreProc + HiLink lsBCollection PreProc + HiLink lsBRouter PreProc + HiLink lsBHistory PreProc + HiLink lsBSync PreProc + HiLink lsBView PreProc + HiLink lsBUtility PreProc + + HiLink lsBModelAttrs PreProc + HiLink lsBCollectionAttrs PreProc + HiLink lsBRouterAttrs PreProc + HiLink lsBSyncAttrs PreProc + HiLink lsBViewAttrs PreProc + + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/backbone.typescript.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/backbone.typescript.vim new file mode 100644 index 0000000..30012dd --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/backbone.typescript.vim @@ -0,0 +1,67 @@ +" Vim syntax file +" Language: Backbone.js for typescript +" Maintainer: othree +" Last Change: 2016/01/07 +" Version: 1.2.3 +" URL: http://backbonejs.org/ + +syntax keyword typescriptBackbone Backbone containedin=ALLBUT,typescriptComment,typescriptLineComment,typescriptString,typescriptTemplate,typescriptTemplateSubstitution,typescriptBDot +syntax match typescriptBDot contained /\./ nextgroup=typescriptBObjects +syntax keyword typescriptBObjects contained Collection Model View Events Router History Utility sync ajax emulateHTTP emulateJSON + +syntax cluster typescriptBFunctions contains=typescriptBEvents,typescriptBModel,typescriptBCollection,typescriptBRouter,typescriptBHistory,typescriptBSync,typescriptBView,typescriptBUtility +syntax cluster typescriptBAttrs contains=typescriptBModelAttrs,typescriptBCollectionAttrs,typescriptBRouterAttrs,typescriptBSyncAttrs,typescriptBViewAttrs + +syntax keyword typescriptBEvents contained on off trigger once listenTo stopListening listenToOnce +syntax keyword typescriptBModel contained extend constructor initialize get set escape has unset clear +syntax keyword typescriptBModel contained toJSON sync fetch save destroy validate validationError url parse +syntax keyword typescriptBModel contained clone isNew hasChanged changedAttributes previous previousAttributes +syntax keyword typescriptBCollection contained extend constructor initialize toJSON sync add remove reset set get at +syntax keyword typescriptBCollection contained push pop unshift shift slice length comparator sort pluck where +syntax keyword typescriptBCollection contained findWhere url parse clone fetch create +syntax keyword typescriptBRouter contained extend constructor initialize route navigate execute +syntax keyword typescriptBHistory contained start +syntax keyword typescriptBSync contained ajax +syntax keyword typescriptBView contained extend constructor initialize setElement render remove delegateEvents undelegateEvents +syntax keyword typescriptBUtility contained noConflict + +syntax keyword typescriptBModelAttrs contained id idAttribute cid attributes changed defaults urlRoot +syntax keyword typescriptBCollectionAttrs contained model modelId models length comparator url +syntax keyword typescriptBRouterAttrs contained routes +syntax keyword typescriptBViewAttrs contained el attributes events +syntax keyword typescriptBViewAttrs match /$el/ +syntax keyword typescriptBViewAttrs match /$/ + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_backbone_typescript_syntax_inits") + if version < 508 + let did_backbone_typescript_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink typescriptBackbone Constant + HiLink typescriptBObjects Constant + + HiLink typescriptBEvents PreProc + HiLink typescriptBModel PreProc + HiLink typescriptBCollection PreProc + HiLink typescriptBRouter PreProc + HiLink typescriptBHistory PreProc + HiLink typescriptBSync PreProc + HiLink typescriptBView PreProc + HiLink typescriptBUtility PreProc + + HiLink typescriptBModelAttrs PreProc + HiLink typescriptBCollectionAttrs PreProc + HiLink typescriptBRouterAttrs PreProc + HiLink typescriptBSyncAttrs PreProc + HiLink typescriptBViewAttrs PreProc + + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/chai.coffee.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/chai.coffee.vim new file mode 100644 index 0000000..1227e0d --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/chai.coffee.vim @@ -0,0 +1,49 @@ +" Vim syntax file +" Language: chai.js for coffee +" Maintainer: tkrugg +" Last Change: 2014/03/25 +" Version: 1.9.2 +" URL: http://chaijs.com/ + +" TDD (assert) +syntax keyword coffeechai assert +syntax keyword coffee_asserter fail ok notOk +syntax keyword coffee_asserter equal notEqual strictEqual notStrictEqual deepEqual notDeepEqual +syntax keyword coffee_asserter isTrue isFalse isNull isNotNull isUndefined isDefined isFunction isNotFunction isObject isNotObject isArray isNotArray isString isNotString isNumber isNotNumber isBoolean isNotBoolean +syntax keyword coffee_asserter typeOf notTypeOf instanceOf notInstanceOf +syntax keyword coffee_asserter include notInclude match notMatch +syntax keyword coffee_asserter property notProperty deepProperty notDeepProperty propertyVal propertyNotVal deepPropertyVal deepPropertyNotVal +syntax keyword coffee_asserter lengthOf +syntax keyword coffee_asserter throws throw Throw doesNotThrow +syntax keyword coffee_asserter operator closeTo +syntax keyword coffee_asserter sameMembers includeMembers + +" BDD (expect/should) +syntax keyword coffeechai expect should +syntax keyword coffee_chain to be been is that and has have with at of same +syntax keyword coffee_asserter not deep a an include contain +syntax keyword coffee_asserter ok true false null undefined exist empty +syntax keyword coffee_asserter arguments Arguments equal equals eq eql eqls +syntax keyword coffee_asserter above gt greaterThan least gte below lt lessThan most lte within +syntax keyword coffee_asserter instanceof instanceOf property ownProperty haveOwnProperty +syntax keyword coffee_asserter length lengthOf match string keys key +syntax keyword coffee_asserter throw throws Throw respondTo itself satisfy closeTo members + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_chai_coffee_syntax_inits") + if version < 508 + let did_chai_coffee_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink coffeechai Constant + + HiLink coffee_chain Comment + HiLink coffee_asserter PreProc + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/chai.javascript.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/chai.javascript.vim new file mode 100644 index 0000000..1cc13b2 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/chai.javascript.vim @@ -0,0 +1,49 @@ +" Vim syntax file +" Language: chai.js for javascript +" Maintainer: tkrugg +" Last Change: 2014/03/25 +" Version: 1.9.2 +" URL: http://chaijs.com/ + +" TDD (assert) +syntax keyword javascriptchai assert +syntax keyword javascript_asserter fail ok notOk +syntax keyword javascript_asserter equal notEqual strictEqual notStrictEqual deepEqual notDeepEqual +syntax keyword javascript_asserter isTrue isFalse isNull isNotNull isUndefined isDefined isFunction isNotFunction isObject isNotObject isArray isNotArray isString isNotString isNumber isNotNumber isBoolean isNotBoolean +syntax keyword javascript_asserter typeOf notTypeOf instanceOf notInstanceOf +syntax keyword javascript_asserter include notInclude match notMatch +syntax keyword javascript_asserter property notProperty deepProperty notDeepProperty propertyVal propertyNotVal deepPropertyVal deepPropertyNotVal +syntax keyword javascript_asserter lengthOf +syntax keyword javascript_asserter throws throw Throw doesNotThrow +syntax keyword javascript_asserter operator closeTo +syntax keyword javascript_asserter sameMembers includeMembers + +" BDD (expect/should) +syntax keyword javascriptchai expect should +syntax keyword javascript_chain to be been is that and has have with at of same +syntax keyword javascript_asserter not deep a an include contain +syntax keyword javascript_asserter ok true false null undefined exist empty +syntax keyword javascript_asserter arguments Arguments equal equals eq eql eqls +syntax keyword javascript_asserter above gt greaterThan least gte below lt lessThan most lte within +syntax keyword javascript_asserter instanceof instanceOf property ownProperty haveOwnProperty +syntax keyword javascript_asserter length lengthOf match string keys key +syntax keyword javascript_asserter throw throws Throw respondTo itself satisfy closeTo members + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_chai_javascript_syntax_inits") + if version < 508 + let did_chai_javascript_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink javascriptchai Constant + + HiLink javascript_chain Comment + HiLink javascript_asserter PreProc + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/chai.ls.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/chai.ls.vim new file mode 100644 index 0000000..88a6ec9 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/chai.ls.vim @@ -0,0 +1,49 @@ +" Vim syntax file +" Language: chai.js for ls +" Maintainer: tkrugg +" Last Change: 2014/03/25 +" Version: 1.9.2 +" URL: http://chaijs.com/ + +" TDD (assert) +syntax keyword lschai assert +syntax keyword ls_asserter fail ok notOk +syntax keyword ls_asserter equal notEqual strictEqual notStrictEqual deepEqual notDeepEqual +syntax keyword ls_asserter isTrue isFalse isNull isNotNull isUndefined isDefined isFunction isNotFunction isObject isNotObject isArray isNotArray isString isNotString isNumber isNotNumber isBoolean isNotBoolean +syntax keyword ls_asserter typeOf notTypeOf instanceOf notInstanceOf +syntax keyword ls_asserter include notInclude match notMatch +syntax keyword ls_asserter property notProperty deepProperty notDeepProperty propertyVal propertyNotVal deepPropertyVal deepPropertyNotVal +syntax keyword ls_asserter lengthOf +syntax keyword ls_asserter throws throw Throw doesNotThrow +syntax keyword ls_asserter operator closeTo +syntax keyword ls_asserter sameMembers includeMembers + +" BDD (expect/should) +syntax keyword lschai expect should +syntax keyword ls_chain to be been is that and has have with at of same +syntax keyword ls_asserter not deep a an include contain +syntax keyword ls_asserter ok true false null undefined exist empty +syntax keyword ls_asserter arguments Arguments equal equals eq eql eqls +syntax keyword ls_asserter above gt greaterThan least gte below lt lessThan most lte within +syntax keyword ls_asserter instanceof instanceOf property ownProperty haveOwnProperty +syntax keyword ls_asserter length lengthOf match string keys key +syntax keyword ls_asserter throw throws Throw respondTo itself satisfy closeTo members + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_chai_ls_syntax_inits") + if version < 508 + let did_chai_ls_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink lschai Constant + + HiLink ls_chain Comment + HiLink ls_asserter PreProc + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/chai.typescript.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/chai.typescript.vim new file mode 100644 index 0000000..c1e75eb --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/chai.typescript.vim @@ -0,0 +1,49 @@ +" Vim syntax file +" Language: chai.js for typescript +" Maintainer: tkrugg +" Last Change: 2014/03/25 +" Version: 1.9.2 +" URL: http://chaijs.com/ + +" TDD (assert) +syntax keyword typescriptchai assert +syntax keyword typescript_asserter fail ok notOk +syntax keyword typescript_asserter equal notEqual strictEqual notStrictEqual deepEqual notDeepEqual +syntax keyword typescript_asserter isTrue isFalse isNull isNotNull isUndefined isDefined isFunction isNotFunction isObject isNotObject isArray isNotArray isString isNotString isNumber isNotNumber isBoolean isNotBoolean +syntax keyword typescript_asserter typeOf notTypeOf instanceOf notInstanceOf +syntax keyword typescript_asserter include notInclude match notMatch +syntax keyword typescript_asserter property notProperty deepProperty notDeepProperty propertyVal propertyNotVal deepPropertyVal deepPropertyNotVal +syntax keyword typescript_asserter lengthOf +syntax keyword typescript_asserter throws throw Throw doesNotThrow +syntax keyword typescript_asserter operator closeTo +syntax keyword typescript_asserter sameMembers includeMembers + +" BDD (expect/should) +syntax keyword typescriptchai expect should +syntax keyword typescript_chain to be been is that and has have with at of same +syntax keyword typescript_asserter not deep a an include contain +syntax keyword typescript_asserter ok true false null undefined exist empty +syntax keyword typescript_asserter arguments Arguments equal equals eq eql eqls +syntax keyword typescript_asserter above gt greaterThan least gte below lt lessThan most lte within +syntax keyword typescript_asserter instanceof instanceOf property ownProperty haveOwnProperty +syntax keyword typescript_asserter length lengthOf match string keys key +syntax keyword typescript_asserter throw throws Throw respondTo itself satisfy closeTo members + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_chai_typescript_syntax_inits") + if version < 508 + let did_chai_typescript_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink typescriptchai Constant + + HiLink typescript_chain Comment + HiLink typescript_asserter PreProc + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/flux.coffee.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/flux.coffee.vim new file mode 100644 index 0000000..ade2cc0 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/flux.coffee.vim @@ -0,0 +1,31 @@ +" Vim syntax file +" Language: Flux for coffee +" Maintainer: othree +" Last Change: 2014/10/30 +" Version: 2.0.2 +" URL: https://facebook.github.io/flux/docs/dispatcher.html + +syntax keyword coffeeFlux Dispatcher containedin=ALLBUT,coffeeComment,coffeeLineComment,coffeeString,coffeeTemplate,coffeeTemplateSubstitution + +syntax keyword coffeeFDispatcher contained register unregister waitFor dispatch isDispatching + +syntax cluster coffeeFFunction contains=coffeeFDispatcher + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_jquery_coffee_syntax_inits") + if version < 508 + let did_jquery_coffee_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink coffeeFlux Constant + + HiLink coffeeFDispatcher PreProc + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/flux.javascript.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/flux.javascript.vim new file mode 100644 index 0000000..697f346 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/flux.javascript.vim @@ -0,0 +1,31 @@ +" Vim syntax file +" Language: Flux for javascript +" Maintainer: othree +" Last Change: 2014/10/30 +" Version: 2.0.2 +" URL: https://facebook.github.io/flux/docs/dispatcher.html + +syntax keyword javascriptFlux Dispatcher containedin=ALLBUT,javascriptComment,javascriptLineComment,javascriptString,javascriptTemplate,javascriptTemplateSubstitution + +syntax keyword javascriptFDispatcher contained register unregister waitFor dispatch isDispatching + +syntax cluster javascriptFFunction contains=javascriptFDispatcher + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_jquery_javascript_syntax_inits") + if version < 508 + let did_jquery_javascript_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink javascriptFlux Constant + + HiLink javascriptFDispatcher PreProc + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/flux.ls.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/flux.ls.vim new file mode 100644 index 0000000..5aa1920 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/flux.ls.vim @@ -0,0 +1,31 @@ +" Vim syntax file +" Language: Flux for ls +" Maintainer: othree +" Last Change: 2014/10/30 +" Version: 2.0.2 +" URL: https://facebook.github.io/flux/docs/dispatcher.html + +syntax keyword lsFlux Dispatcher containedin=ALLBUT,lsComment,lsLineComment,lsString,lsTemplate,lsTemplateSubstitution + +syntax keyword lsFDispatcher contained register unregister waitFor dispatch isDispatching + +syntax cluster lsFFunction contains=lsFDispatcher + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_jquery_ls_syntax_inits") + if version < 508 + let did_jquery_ls_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink lsFlux Constant + + HiLink lsFDispatcher PreProc + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/flux.typescript.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/flux.typescript.vim new file mode 100644 index 0000000..364c83c --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/flux.typescript.vim @@ -0,0 +1,31 @@ +" Vim syntax file +" Language: Flux for typescript +" Maintainer: othree +" Last Change: 2014/10/30 +" Version: 2.0.2 +" URL: https://facebook.github.io/flux/docs/dispatcher.html + +syntax keyword typescriptFlux Dispatcher containedin=ALLBUT,typescriptComment,typescriptLineComment,typescriptString,typescriptTemplate,typescriptTemplateSubstitution + +syntax keyword typescriptFDispatcher contained register unregister waitFor dispatch isDispatching + +syntax cluster typescriptFFunction contains=typescriptFDispatcher + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_jquery_typescript_syntax_inits") + if version < 508 + let did_jquery_typescript_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink typescriptFlux Constant + + HiLink typescriptFDispatcher PreProc + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/handlebars.coffee.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/handlebars.coffee.vim new file mode 100644 index 0000000..8c53884 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/handlebars.coffee.vim @@ -0,0 +1,41 @@ +" Vim syntax file +" Language: handlebars for coffee +" Maintainer: othree +" Last Change: 2015/02/02 +" Version: 2.0.0 +" URL: http://handlebarsjs.com/ + +syntax keyword coffeeHandlebars Handlebars containedin=ALLBUT,coffeeComment,coffeeLineComment,coffeeString,coffeeTemplate,coffeeTemplateSubstitution +" syntax match coffeeunderscoredot contained /\./ nextgroup=@coffee_Functions +" syntax match coffeeunderscoredot contained /([^)]*)\./ nextgroup=@coffee_Functions + +syntax cluster coffeeHFunctions contains=coffeeHmethods,coffeeHutilityMethod + +syntax keyword coffeeHmethods contained compile precompile template unregisterPartial registerPartial +syntax keyword coffeeHmethods contained registerHelper unregisterHelper SafeString escapeExpression +syntax keyword coffeeHmethods contained createFrame create log + +syntax keyword coffeeHutility contained Utils + +syntax keyword coffeeHutilityMethod contained isEmpty extend toString isArray isFunction appendContextPath + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_underscore_coffee_syntax_inits") + if version < 508 + let did_underscore_coffee_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink coffeeHandlebars Constant + + HiLink coffeeHmethods PreProc + HiLink coffeeHutility PreProc + HiLink coffeeHutilityMethod PreProc + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/handlebars.javascript.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/handlebars.javascript.vim new file mode 100644 index 0000000..5d377f5 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/handlebars.javascript.vim @@ -0,0 +1,41 @@ +" Vim syntax file +" Language: handlebars for javascript +" Maintainer: othree +" Last Change: 2015/02/02 +" Version: 2.0.0 +" URL: http://handlebarsjs.com/ + +syntax keyword javascriptHandlebars Handlebars containedin=ALLBUT,javascriptComment,javascriptLineComment,javascriptString,javascriptTemplate,javascriptTemplateSubstitution +" syntax match javascriptunderscoredot contained /\./ nextgroup=@javascript_Functions +" syntax match javascriptunderscoredot contained /([^)]*)\./ nextgroup=@javascript_Functions + +syntax cluster javascriptHFunctions contains=javascriptHmethods,javascriptHutilityMethod + +syntax keyword javascriptHmethods contained compile precompile template unregisterPartial registerPartial +syntax keyword javascriptHmethods contained registerHelper unregisterHelper SafeString escapeExpression +syntax keyword javascriptHmethods contained createFrame create log + +syntax keyword javascriptHutility contained Utils + +syntax keyword javascriptHutilityMethod contained isEmpty extend toString isArray isFunction appendContextPath + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_underscore_javascript_syntax_inits") + if version < 508 + let did_underscore_javascript_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink javascriptHandlebars Constant + + HiLink javascriptHmethods PreProc + HiLink javascriptHutility PreProc + HiLink javascriptHutilityMethod PreProc + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/handlebars.ls.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/handlebars.ls.vim new file mode 100644 index 0000000..7984b4f --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/handlebars.ls.vim @@ -0,0 +1,41 @@ +" Vim syntax file +" Language: handlebars for ls +" Maintainer: othree +" Last Change: 2015/02/02 +" Version: 2.0.0 +" URL: http://handlebarsjs.com/ + +syntax keyword lsHandlebars Handlebars containedin=ALLBUT,lsComment,lsLineComment,lsString,lsTemplate,lsTemplateSubstitution +" syntax match lsunderscoredot contained /\./ nextgroup=@ls_Functions +" syntax match lsunderscoredot contained /([^)]*)\./ nextgroup=@ls_Functions + +syntax cluster lsHFunctions contains=lsHmethods,lsHutilityMethod + +syntax keyword lsHmethods contained compile precompile template unregisterPartial registerPartial +syntax keyword lsHmethods contained registerHelper unregisterHelper SafeString escapeExpression +syntax keyword lsHmethods contained createFrame create log + +syntax keyword lsHutility contained Utils + +syntax keyword lsHutilityMethod contained isEmpty extend toString isArray isFunction appendContextPath + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_underscore_ls_syntax_inits") + if version < 508 + let did_underscore_ls_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink lsHandlebars Constant + + HiLink lsHmethods PreProc + HiLink lsHutility PreProc + HiLink lsHutilityMethod PreProc + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/handlebars.typescript.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/handlebars.typescript.vim new file mode 100644 index 0000000..f8639eb --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/handlebars.typescript.vim @@ -0,0 +1,41 @@ +" Vim syntax file +" Language: handlebars for typescript +" Maintainer: othree +" Last Change: 2015/02/02 +" Version: 2.0.0 +" URL: http://handlebarsjs.com/ + +syntax keyword typescriptHandlebars Handlebars containedin=ALLBUT,typescriptComment,typescriptLineComment,typescriptString,typescriptTemplate,typescriptTemplateSubstitution +" syntax match typescriptunderscoredot contained /\./ nextgroup=@typescript_Functions +" syntax match typescriptunderscoredot contained /([^)]*)\./ nextgroup=@typescript_Functions + +syntax cluster typescriptHFunctions contains=typescriptHmethods,typescriptHutilityMethod + +syntax keyword typescriptHmethods contained compile precompile template unregisterPartial registerPartial +syntax keyword typescriptHmethods contained registerHelper unregisterHelper SafeString escapeExpression +syntax keyword typescriptHmethods contained createFrame create log + +syntax keyword typescriptHutility contained Utils + +syntax keyword typescriptHutilityMethod contained isEmpty extend toString isArray isFunction appendContextPath + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_underscore_typescript_syntax_inits") + if version < 508 + let did_underscore_typescript_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink typescriptHandlebars Constant + + HiLink typescriptHmethods PreProc + HiLink typescriptHutility PreProc + HiLink typescriptHutilityMethod PreProc + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/jasmine.coffee.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/jasmine.coffee.vim new file mode 100644 index 0000000..1a099ed --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/jasmine.coffee.vim @@ -0,0 +1,64 @@ +" Vim syntax file +" Language: jasmine for coffee +" Maintainer: othree +" Last Change: 2014/01/31 +" Version: 2.0 +" URL: http://jasmine.github.io/ + + +syntax keyword coffeeJasmine jasmine containedin=ALLBUT,coffeeComment,coffeeLineComment,coffeeString,coffeeTemplate,coffeeTemplateSubstitution nextgroup=coffeeJdot +syntax match coffeeJdot contained /\./ nextgroup=coffeeJMethods +syntax keyword coffeeJMethods contained any createSpy createSpyObj HtmlReporter Clock getEnv + +syntax keyword coffeeJMethods contained tick useMock +syntax keyword coffeeJMethods contained addReporter specFilter + +syntax cluster coffeeJFunctions contains=coffeeJMethods,coffeeJEnvMethods,coffeeJEnvMethods,coffeeJExpectMethods,coffeeJSpyMethods,coffeeJSpyAndMethods,coffeeJSpyCallsMethods +syntax cluster coffeeJAttrs contains=coffeeJExpectNot,coffeeJSpyAnd,coffeeJSpyCalls + +syntax keyword coffeeJGlobalMethod describe done runs waitsFor it beforeEach afterEach containedin=ALLBUT,coffeeComment,coffeeLineComment,coffeeString + +syntax keyword coffeeJGlobalMethod xdescribe xit containedin=ALLBUT,coffeeComment,coffeeLineComment,coffeeString + +syntax keyword coffeeJGlobalMethod spyOn containedin=ALLBUT,coffeeComment,coffeeLineComment,coffeeString + +syntax keyword coffeeJSpyAnd and contained +syntax keyword coffeeJSpyAndMethods returnValue callFake throwError stub contained +syntax keyword coffeeJSpyCalls calls contained +syntax keyword coffeeJSpyMethods andReturn andCallThrough callThrough contained +syntax keyword coffeeJCallsMethods any count argsFor allArgs all mostRecent first reset contained + +syntax keyword coffeeJGlobalMethod expect containedin=ALLBUT,coffeeComment,coffeeLineComment,coffeeString +syntax keyword coffeeJExpectNot not contained nextgroup=coffeeJExpectNotdot + +syntax keyword coffeeJExpectMethods toHaveBeenCalled toHaveBeenCalledWith toEqual toBe toMatch contained +syntax keyword coffeeJExpectMethods toBeDefined toBeUndefined toBeNull toBeTruthy toBeFalsy contained +syntax keyword coffeeJExpectMethods toContain toBeCloseTo toBeLessThan toBeGreaterThan toThrow contained + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_requirejs_coffee_syntax_inits") + if version < 508 + let did_requirejs_coffee_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink coffeeJasmine Constant + HiLink coffeeJMethods PreProc + HiLink coffeeJEnvMethods PreProc + HiLink coffeeJClockMethods PreProc + HiLink coffeeJGlobalMethod PreProc + HiLink coffeeJSpyAnd PreProc + HiLink coffeeJSpyAndMethods PreProc + HiLink coffeeJSpyCalls PreProc + HiLink coffeeJSpyMethods PreProc + HiLink coffeeJCallsMethods PreProc + HiLink coffeeJExpectNot PreProc + HiLink coffeeJExpectMethods PreProc + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/jasmine.javascript.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/jasmine.javascript.vim new file mode 100644 index 0000000..0bab916 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/jasmine.javascript.vim @@ -0,0 +1,64 @@ +" Vim syntax file +" Language: jasmine for javascript +" Maintainer: othree +" Last Change: 2014/01/31 +" Version: 2.0 +" URL: http://jasmine.github.io/ + + +syntax keyword javascriptJasmine jasmine containedin=ALLBUT,javascriptComment,javascriptLineComment,javascriptString,javascriptTemplate,javascriptTemplateSubstitution nextgroup=javascriptJdot +syntax match javascriptJdot contained /\./ nextgroup=javascriptJMethods +syntax keyword javascriptJMethods contained any createSpy createSpyObj HtmlReporter Clock getEnv + +syntax keyword javascriptJMethods contained tick useMock +syntax keyword javascriptJMethods contained addReporter specFilter + +syntax cluster javascriptJFunctions contains=javascriptJMethods,javascriptJEnvMethods,javascriptJEnvMethods,javascriptJExpectMethods,javascriptJSpyMethods,javascriptJSpyAndMethods,javascriptJSpyCallsMethods +syntax cluster javascriptJAttrs contains=javascriptJExpectNot,javascriptJSpyAnd,javascriptJSpyCalls + +syntax keyword javascriptJGlobalMethod describe done runs waitsFor it beforeEach afterEach containedin=ALLBUT,javascriptComment,javascriptLineComment,javascriptString + +syntax keyword javascriptJGlobalMethod xdescribe xit containedin=ALLBUT,javascriptComment,javascriptLineComment,javascriptString + +syntax keyword javascriptJGlobalMethod spyOn containedin=ALLBUT,javascriptComment,javascriptLineComment,javascriptString + +syntax keyword javascriptJSpyAnd and contained +syntax keyword javascriptJSpyAndMethods returnValue callFake throwError stub contained +syntax keyword javascriptJSpyCalls calls contained +syntax keyword javascriptJSpyMethods andReturn andCallThrough callThrough contained +syntax keyword javascriptJCallsMethods any count argsFor allArgs all mostRecent first reset contained + +syntax keyword javascriptJGlobalMethod expect containedin=ALLBUT,javascriptComment,javascriptLineComment,javascriptString +syntax keyword javascriptJExpectNot not contained nextgroup=javascriptJExpectNotdot + +syntax keyword javascriptJExpectMethods toHaveBeenCalled toHaveBeenCalledWith toEqual toBe toMatch contained +syntax keyword javascriptJExpectMethods toBeDefined toBeUndefined toBeNull toBeTruthy toBeFalsy contained +syntax keyword javascriptJExpectMethods toContain toBeCloseTo toBeLessThan toBeGreaterThan toThrow contained + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_requirejs_javascript_syntax_inits") + if version < 508 + let did_requirejs_javascript_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink javascriptJasmine Constant + HiLink javascriptJMethods PreProc + HiLink javascriptJEnvMethods PreProc + HiLink javascriptJClockMethods PreProc + HiLink javascriptJGlobalMethod PreProc + HiLink javascriptJSpyAnd PreProc + HiLink javascriptJSpyAndMethods PreProc + HiLink javascriptJSpyCalls PreProc + HiLink javascriptJSpyMethods PreProc + HiLink javascriptJCallsMethods PreProc + HiLink javascriptJExpectNot PreProc + HiLink javascriptJExpectMethods PreProc + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/jasmine.ls.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/jasmine.ls.vim new file mode 100644 index 0000000..a84f9d6 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/jasmine.ls.vim @@ -0,0 +1,64 @@ +" Vim syntax file +" Language: jasmine for ls +" Maintainer: othree +" Last Change: 2014/01/31 +" Version: 2.0 +" URL: http://jasmine.github.io/ + + +syntax keyword lsJasmine jasmine containedin=ALLBUT,lsComment,lsLineComment,lsString,lsTemplate,lsTemplateSubstitution nextgroup=lsJdot +syntax match lsJdot contained /\./ nextgroup=lsJMethods +syntax keyword lsJMethods contained any createSpy createSpyObj HtmlReporter Clock getEnv + +syntax keyword lsJMethods contained tick useMock +syntax keyword lsJMethods contained addReporter specFilter + +syntax cluster lsJFunctions contains=lsJMethods,lsJEnvMethods,lsJEnvMethods,lsJExpectMethods,lsJSpyMethods,lsJSpyAndMethods,lsJSpyCallsMethods +syntax cluster lsJAttrs contains=lsJExpectNot,lsJSpyAnd,lsJSpyCalls + +syntax keyword lsJGlobalMethod describe done runs waitsFor it beforeEach afterEach containedin=ALLBUT,lsComment,lsLineComment,lsString + +syntax keyword lsJGlobalMethod xdescribe xit containedin=ALLBUT,lsComment,lsLineComment,lsString + +syntax keyword lsJGlobalMethod spyOn containedin=ALLBUT,lsComment,lsLineComment,lsString + +syntax keyword lsJSpyAnd and contained +syntax keyword lsJSpyAndMethods returnValue callFake throwError stub contained +syntax keyword lsJSpyCalls calls contained +syntax keyword lsJSpyMethods andReturn andCallThrough callThrough contained +syntax keyword lsJCallsMethods any count argsFor allArgs all mostRecent first reset contained + +syntax keyword lsJGlobalMethod expect containedin=ALLBUT,lsComment,lsLineComment,lsString +syntax keyword lsJExpectNot not contained nextgroup=lsJExpectNotdot + +syntax keyword lsJExpectMethods toHaveBeenCalled toHaveBeenCalledWith toEqual toBe toMatch contained +syntax keyword lsJExpectMethods toBeDefined toBeUndefined toBeNull toBeTruthy toBeFalsy contained +syntax keyword lsJExpectMethods toContain toBeCloseTo toBeLessThan toBeGreaterThan toThrow contained + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_requirejs_ls_syntax_inits") + if version < 508 + let did_requirejs_ls_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink lsJasmine Constant + HiLink lsJMethods PreProc + HiLink lsJEnvMethods PreProc + HiLink lsJClockMethods PreProc + HiLink lsJGlobalMethod PreProc + HiLink lsJSpyAnd PreProc + HiLink lsJSpyAndMethods PreProc + HiLink lsJSpyCalls PreProc + HiLink lsJSpyMethods PreProc + HiLink lsJCallsMethods PreProc + HiLink lsJExpectNot PreProc + HiLink lsJExpectMethods PreProc + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/jasmine.typescript.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/jasmine.typescript.vim new file mode 100644 index 0000000..3e0be5b --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/jasmine.typescript.vim @@ -0,0 +1,64 @@ +" Vim syntax file +" Language: jasmine for typescript +" Maintainer: othree +" Last Change: 2014/01/31 +" Version: 2.0 +" URL: http://jasmine.github.io/ + + +syntax keyword typescriptJasmine jasmine containedin=ALLBUT,typescriptComment,typescriptLineComment,typescriptString,typescriptTemplate,typescriptTemplateSubstitution nextgroup=typescriptJdot +syntax match typescriptJdot contained /\./ nextgroup=typescriptJMethods +syntax keyword typescriptJMethods contained any createSpy createSpyObj HtmlReporter Clock getEnv + +syntax keyword typescriptJMethods contained tick useMock +syntax keyword typescriptJMethods contained addReporter specFilter + +syntax cluster typescriptJFunctions contains=typescriptJMethods,typescriptJEnvMethods,typescriptJEnvMethods,typescriptJExpectMethods,typescriptJSpyMethods,typescriptJSpyAndMethods,typescriptJSpyCallsMethods +syntax cluster typescriptJAttrs contains=typescriptJExpectNot,typescriptJSpyAnd,typescriptJSpyCalls + +syntax keyword typescriptJGlobalMethod describe done runs waitsFor it beforeEach afterEach containedin=ALLBUT,typescriptComment,typescriptLineComment,typescriptString + +syntax keyword typescriptJGlobalMethod xdescribe xit containedin=ALLBUT,typescriptComment,typescriptLineComment,typescriptString + +syntax keyword typescriptJGlobalMethod spyOn containedin=ALLBUT,typescriptComment,typescriptLineComment,typescriptString + +syntax keyword typescriptJSpyAnd and contained +syntax keyword typescriptJSpyAndMethods returnValue callFake throwError stub contained +syntax keyword typescriptJSpyCalls calls contained +syntax keyword typescriptJSpyMethods andReturn andCallThrough callThrough contained +syntax keyword typescriptJCallsMethods any count argsFor allArgs all mostRecent first reset contained + +syntax keyword typescriptJGlobalMethod expect containedin=ALLBUT,typescriptComment,typescriptLineComment,typescriptString +syntax keyword typescriptJExpectNot not contained nextgroup=typescriptJExpectNotdot + +syntax keyword typescriptJExpectMethods toHaveBeenCalled toHaveBeenCalledWith toEqual toBe toMatch contained +syntax keyword typescriptJExpectMethods toBeDefined toBeUndefined toBeNull toBeTruthy toBeFalsy contained +syntax keyword typescriptJExpectMethods toContain toBeCloseTo toBeLessThan toBeGreaterThan toThrow contained + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_requirejs_typescript_syntax_inits") + if version < 508 + let did_requirejs_typescript_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink typescriptJasmine Constant + HiLink typescriptJMethods PreProc + HiLink typescriptJEnvMethods PreProc + HiLink typescriptJClockMethods PreProc + HiLink typescriptJGlobalMethod PreProc + HiLink typescriptJSpyAnd PreProc + HiLink typescriptJSpyAndMethods PreProc + HiLink typescriptJSpyCalls PreProc + HiLink typescriptJSpyMethods PreProc + HiLink typescriptJCallsMethods PreProc + HiLink typescriptJExpectNot PreProc + HiLink typescriptJExpectMethods PreProc + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/jquery.coffee.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/jquery.coffee.vim new file mode 100644 index 0000000..b96d270 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/jquery.coffee.vim @@ -0,0 +1,124 @@ +" Vim syntax file +" Language: jQuery for coffee +" Maintainer: othree +" Maintainer: Bruno Michel +" Last Change: 2014/10/29 +" Version: 1.9.0.2 +" URL: http://api.jquery.com/ + +setlocal iskeyword-=$ +if exists("b:current_syntax") && b:current_syntax == 'coffee' + setlocal iskeyword+=$ +endif + +syntax keyword coffeejQuery jQuery $ containedin=ALLBUT,coffeeComment,coffeeLineComment,coffeeString,coffeeTemplate,coffeeTemplateSubstitution +" syntax match coffeejQuerydot contained /\./ nextgroup=@coffeeQGlobals +" syntax match coffeejQuerydot contained /([^)]*)\./ nextgroup=@coffeeQFunctions + +" jQuery.* +syntax cluster coffeeQGlobals contains=coffeeQCore,coffeeQCoreObj,coffeeQCoreData,coffeeQUtilities,coffeeQProperties +syntax keyword coffeeQCore contained holdReady noConflict when +syntax keyword coffeeQCoreObj contained Callback Deferred +syntax keyword coffeeQCoreData contained data dequeue hasData queue removeData +syntax keyword coffeeQCoreAjax contained ajax ajaxPrefilter ajaxSetup ajaxTransport param get getJSON getScript post +syntax keyword coffeeQProperties contained context fx.interval fx.off length support cssHooks +syntax keyword coffeeQUtilities contained each extend globalEval grep inArray isArray isEmptyObject isFunction isPlainObject isWindow isXMLDoc makeArray map merge noop now parseHTML parseJSON parseXML proxy trim type unique +syntax match coffeeQUtilities contained /contains/ + +" jqobj.* +syntax cluster coffeeQFunctions contains=@coffeeQGlobals,coffeeQAjax,coffeeQAttributes,coffeeQCallbacks,coffeeQCore,coffeeQCSS,coffeeQData,coffeeQDeferred,coffeeQDimensions,coffeeQEffects,coffeeQEvents,coffeeQManipulation,coffeeQMiscellaneous,coffeeQOffset,coffeeQTraversing,coffeeQUtilities +syntax keyword coffeeQAjax contained ajaxComplete ajaxError ajaxSend ajaxStart ajaxStop ajaxSuccess +syntax keyword coffeeQAjax contained serialize serializeArray ajaxTransport load +syntax keyword coffeeQAttributes contained addClass attr hasClass html prop removeAttr removeClass removeProp toggleClass val +syntax keyword coffeeQCallbacks contained add disable disabled empty fire fired fireWith has lock locked remove Callbacks +syntax keyword coffeeQCSS contained css +syntax keyword coffeeQData contained clearQueue data dequeue queue removeData +syntax keyword coffeeQDeferred contained Deferred always done fail notify progress promise reject rejectWith resolved resolveWith notifyWith state then +syntax keyword coffeeQDimensions contained height innerHeight innerWidth outerHeight outerWidth width +syntax keyword coffeeQEffects contained hide show toggle +syntax keyword coffeeQEffects contained animate delay stop finish +syntax keyword coffeeQEffects contained fadeIn fadeOut fadeTo fadeToggle +syntax keyword coffeeQEffects contained slideDown slideToggle slideUp +syntax keyword coffeeQEvents contained error resize scroll +syntax keyword coffeeQEvents contained ready unload +syntax keyword coffeeQEvents contained bind delegate on off one proxy trigger triggerHandler unbind undelegate +syntax keyword coffeeQEvents contained Event currentTarget isDefaultPrevented isImmediatePropagationStopped isPropagationStopped namespace pageX pageY preventDefault relatedTarget result stopImmediatePropagation stopPropagation target timeStamp which +syntax keyword coffeeQEvents contained blur change focus select submit +syntax keyword coffeeQEvents contained focusin focusout keydown keypress keyup +syntax keyword coffeeQEvents contained click dblclick hover mousedown mouseenter mouseleave mousemove mouseout mouseover mouseup +syntax keyword coffeeQManipulation contained clone +syntax keyword coffeeQManipulation contained unwrap wrap wrapAll wrapInner +syntax keyword coffeeQManipulation contained append appendTo html prepend prependTo text +syntax keyword coffeeQManipulation contained after before insertAfter insertBefore +syntax keyword coffeeQManipulation contained detach empty remove +syntax keyword coffeeQManipulation contained replaceAll replaceWith +syntax keyword coffeeQMiscellaneous contained index toArray +syntax keyword coffeeQOffset contained offset offsetParent position scrollTop scrollLeft +syntax keyword coffeeQTraversing contained eq filter first has is last map not slice +syntax keyword coffeeQTraversing contained add andBack contents end +syntax keyword coffeeQTraversing contained children closest find next nextAll nextUntil parent parents parentsUntil prev prevAll prevUntil siblings + + +" selector +" syntax match coffeeASCII contained /\\\d\d\d/ +" syntax region coffeeString start=/"/ skip=/\\\\\|\\"\|\\\n/ end=/"\|$/ contains=coffeeASCII,@jSelectors +" syntax region coffeeString start=/'/ skip=/\\\\\|\\'\|\\\n/ end=/'\|$/ contains=coffeeASCII,@jSelectors + +syntax cluster cssSelectors contains=cssId,cssClass,cssOperators,cssBasicFilters,cssContentFilters,cssVisibility,cssChildFilters,cssForms,cssFormFilters +syntax cluster coffeeNoReserved add=@cssSelectors +syntax match cssId contained containedin=coffeeString /#[0-9A-Za-z_\-]\+/ +syntax match cssClass contained containedin=coffeeString /\.[0-9A-Za-z_\-]\+/ +syntax match cssOperators contained containedin=coffeeString /*\|>\|+\|-\|\~/ +syntax match cssBasicFilters contained containedin=coffeeString /:\(animated\|eq\|even\|first\|focus\|gt\|header\|last\|lang\|lt\|not\|odd\|root\|target\)/ +syntax match cssChildFilters contained containedin=coffeeString /:\(first\|last\|nth\|only\|nth-last\)-child/ +syntax match cssChildFilters contained containedin=coffeeString /:\(first\|last\|nth\|only\|nth-last\)-of-type/ +syntax match cssContentFilters contained containedin=coffeeString /:\(contains\|empty\|has\|parent\)/ +syntax match cssForms contained containedin=coffeeString /:\(button\|checkbox\|checked\|disabled\|enabled\|file\|image\|input\|password\|radio\|reset\|selected\|submit\|text\)/ +syntax match cssVisibility contained containedin=coffeeString /:\(hidden\|visible\)/ + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_jquery_coffee_syntax_inits") + if version < 508 + let did_jquery_coffee_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink coffeejQuery Constant + + HiLink coffeeQCore PreProc + HiLink coffeeQCoreObj PreProc + HiLink coffeeQCoreData PreProc + + HiLink coffeeQAjax PreProc + HiLink coffeeQAttributes PreProc + HiLink coffeeQCallbacks PreProc + HiLink coffeeQCSS PreProc + HiLink coffeeQData PreProc + HiLink coffeeQDeferred PreProc + HiLink coffeeQDimensions PreProc + HiLink coffeeQEffects PreProc + HiLink coffeeQEvents PreProc + HiLink coffeeQManipulation PreProc + HiLink coffeeQMiscellaneous PreProc + HiLink coffeeQOffset PreProc + HiLink coffeeQProperties PreProc + HiLink coffeeQTraversing PreProc + HiLink coffeeQUtilities PreProc + + HiLink cssId Identifier + HiLink cssClass Constant + HiLink cssOperators Special + HiLink cssBasicFilters Statement + HiLink cssContentFilters Statement + HiLink cssVisibility Statement + HiLink cssChildFilters Statement + HiLink cssForms Statement + HiLink cssFormFilters Statement + + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/jquery.javascript.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/jquery.javascript.vim new file mode 100644 index 0000000..05e53ef --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/jquery.javascript.vim @@ -0,0 +1,124 @@ +" Vim syntax file +" Language: jQuery for javascript +" Maintainer: othree +" Maintainer: Bruno Michel +" Last Change: 2014/10/29 +" Version: 1.9.0.2 +" URL: http://api.jquery.com/ + +setlocal iskeyword-=$ +if exists("b:current_syntax") && b:current_syntax == 'javascript' + setlocal iskeyword+=$ +endif + +syntax keyword javascriptjQuery jQuery $ containedin=ALLBUT,javascriptComment,javascriptLineComment,javascriptString,javascriptTemplate,javascriptTemplateSubstitution +" syntax match javascriptjQuerydot contained /\./ nextgroup=@javascriptQGlobals +" syntax match javascriptjQuerydot contained /([^)]*)\./ nextgroup=@javascriptQFunctions + +" jQuery.* +syntax cluster javascriptQGlobals contains=javascriptQCore,javascriptQCoreObj,javascriptQCoreData,javascriptQUtilities,javascriptQProperties +syntax keyword javascriptQCore contained holdReady noConflict when +syntax keyword javascriptQCoreObj contained Callback Deferred +syntax keyword javascriptQCoreData contained data dequeue hasData queue removeData +syntax keyword javascriptQCoreAjax contained ajax ajaxPrefilter ajaxSetup ajaxTransport param get getJSON getScript post +syntax keyword javascriptQProperties contained context fx.interval fx.off length support cssHooks +syntax keyword javascriptQUtilities contained each extend globalEval grep inArray isArray isEmptyObject isFunction isPlainObject isWindow isXMLDoc makeArray map merge noop now parseHTML parseJSON parseXML proxy trim type unique +syntax match javascriptQUtilities contained /contains/ + +" jqobj.* +syntax cluster javascriptQFunctions contains=@javascriptQGlobals,javascriptQAjax,javascriptQAttributes,javascriptQCallbacks,javascriptQCore,javascriptQCSS,javascriptQData,javascriptQDeferred,javascriptQDimensions,javascriptQEffects,javascriptQEvents,javascriptQManipulation,javascriptQMiscellaneous,javascriptQOffset,javascriptQTraversing,javascriptQUtilities +syntax keyword javascriptQAjax contained ajaxComplete ajaxError ajaxSend ajaxStart ajaxStop ajaxSuccess +syntax keyword javascriptQAjax contained serialize serializeArray ajaxTransport load +syntax keyword javascriptQAttributes contained addClass attr hasClass html prop removeAttr removeClass removeProp toggleClass val +syntax keyword javascriptQCallbacks contained add disable disabled empty fire fired fireWith has lock locked remove Callbacks +syntax keyword javascriptQCSS contained css +syntax keyword javascriptQData contained clearQueue data dequeue queue removeData +syntax keyword javascriptQDeferred contained Deferred always done fail notify progress promise reject rejectWith resolved resolveWith notifyWith state then +syntax keyword javascriptQDimensions contained height innerHeight innerWidth outerHeight outerWidth width +syntax keyword javascriptQEffects contained hide show toggle +syntax keyword javascriptQEffects contained animate delay stop finish +syntax keyword javascriptQEffects contained fadeIn fadeOut fadeTo fadeToggle +syntax keyword javascriptQEffects contained slideDown slideToggle slideUp +syntax keyword javascriptQEvents contained error resize scroll +syntax keyword javascriptQEvents contained ready unload +syntax keyword javascriptQEvents contained bind delegate on off one proxy trigger triggerHandler unbind undelegate +syntax keyword javascriptQEvents contained Event currentTarget isDefaultPrevented isImmediatePropagationStopped isPropagationStopped namespace pageX pageY preventDefault relatedTarget result stopImmediatePropagation stopPropagation target timeStamp which +syntax keyword javascriptQEvents contained blur change focus select submit +syntax keyword javascriptQEvents contained focusin focusout keydown keypress keyup +syntax keyword javascriptQEvents contained click dblclick hover mousedown mouseenter mouseleave mousemove mouseout mouseover mouseup +syntax keyword javascriptQManipulation contained clone +syntax keyword javascriptQManipulation contained unwrap wrap wrapAll wrapInner +syntax keyword javascriptQManipulation contained append appendTo html prepend prependTo text +syntax keyword javascriptQManipulation contained after before insertAfter insertBefore +syntax keyword javascriptQManipulation contained detach empty remove +syntax keyword javascriptQManipulation contained replaceAll replaceWith +syntax keyword javascriptQMiscellaneous contained index toArray +syntax keyword javascriptQOffset contained offset offsetParent position scrollTop scrollLeft +syntax keyword javascriptQTraversing contained eq filter first has is last map not slice +syntax keyword javascriptQTraversing contained add andBack contents end +syntax keyword javascriptQTraversing contained children closest find next nextAll nextUntil parent parents parentsUntil prev prevAll prevUntil siblings + + +" selector +" syntax match javascriptASCII contained /\\\d\d\d/ +" syntax region javascriptString start=/"/ skip=/\\\\\|\\"\|\\\n/ end=/"\|$/ contains=javascriptASCII,@jSelectors +" syntax region javascriptString start=/'/ skip=/\\\\\|\\'\|\\\n/ end=/'\|$/ contains=javascriptASCII,@jSelectors + +" syntax cluster cssSelectors contains=cssId,cssClass,cssOperators,cssBasicFilters,cssContentFilters,cssVisibility,cssChildFilters,cssForms,cssFormFilters +" syntax cluster javascriptNoReserved add=@cssSelectors +" syntax match cssId contained containedin=javascriptString /#[0-9A-Za-z_\-]\+/ +" syntax match cssClass contained containedin=javascriptString /\.[0-9A-Za-z_\-]\+/ +" syntax match cssOperators contained containedin=javascriptString /*\|>\|+\|-\|\~/ +" syntax match cssBasicFilters contained containedin=javascriptString /:\(animated\|eq\|even\|first\|focus\|gt\|header\|last\|lang\|lt\|not\|odd\|root\|target\)/ +" syntax match cssChildFilters contained containedin=javascriptString /:\(first\|last\|nth\|only\|nth-last\)-child/ +" syntax match cssChildFilters contained containedin=javascriptString /:\(first\|last\|nth\|only\|nth-last\)-of-type/ +" syntax match cssContentFilters contained containedin=javascriptString /:\(contains\|empty\|has\|parent\)/ +" syntax match cssForms contained containedin=javascriptString /:\(button\|checkbox\|checked\|disabled\|enabled\|file\|image\|input\|password\|radio\|reset\|selected\|submit\|text\)/ +" syntax match cssVisibility contained containedin=javascriptString /:\(hidden\|visible\)/ + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_jquery_javascript_syntax_inits") + if version < 508 + let did_jquery_javascript_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink javascriptjQuery Constant + + HiLink javascriptQCore PreProc + HiLink javascriptQCoreObj PreProc + HiLink javascriptQCoreData PreProc + + HiLink javascriptQAjax PreProc + HiLink javascriptQAttributes PreProc + HiLink javascriptQCallbacks PreProc + HiLink javascriptQCSS PreProc + HiLink javascriptQData PreProc + HiLink javascriptQDeferred PreProc + HiLink javascriptQDimensions PreProc + HiLink javascriptQEffects PreProc + HiLink javascriptQEvents PreProc + HiLink javascriptQManipulation PreProc + HiLink javascriptQMiscellaneous PreProc + HiLink javascriptQOffset PreProc + HiLink javascriptQProperties PreProc + HiLink javascriptQTraversing PreProc + HiLink javascriptQUtilities PreProc + + " HiLink cssId Identifier + " HiLink cssClass Constant + " HiLink cssOperators Special + " HiLink cssBasicFilters Statement + " HiLink cssContentFilters Statement + " HiLink cssVisibility Statement + " HiLink cssChildFilters Statement + " HiLink cssForms Statement + " HiLink cssFormFilters Statement + + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/jquery.ls.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/jquery.ls.vim new file mode 100644 index 0000000..9d35b7f --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/jquery.ls.vim @@ -0,0 +1,124 @@ +" Vim syntax file +" Language: jQuery for ls +" Maintainer: othree +" Maintainer: Bruno Michel +" Last Change: 2014/10/29 +" Version: 1.9.0.2 +" URL: http://api.jquery.com/ + +setlocal iskeyword-=$ +if exists("b:current_syntax") && b:current_syntax == 'ls' + setlocal iskeyword+=$ +endif + +syntax keyword lsjQuery jQuery $ containedin=ALLBUT,lsComment,lsLineComment,lsString,lsTemplate,lsTemplateSubstitution +" syntax match lsjQuerydot contained /\./ nextgroup=@lsQGlobals +" syntax match lsjQuerydot contained /([^)]*)\./ nextgroup=@lsQFunctions + +" jQuery.* +syntax cluster lsQGlobals contains=lsQCore,lsQCoreObj,lsQCoreData,lsQUtilities,lsQProperties +syntax keyword lsQCore contained holdReady noConflict when +syntax keyword lsQCoreObj contained Callback Deferred +syntax keyword lsQCoreData contained data dequeue hasData queue removeData +syntax keyword lsQCoreAjax contained ajax ajaxPrefilter ajaxSetup ajaxTransport param get getJSON getScript post +syntax keyword lsQProperties contained context fx.interval fx.off length support cssHooks +syntax keyword lsQUtilities contained each extend globalEval grep inArray isArray isEmptyObject isFunction isPlainObject isWindow isXMLDoc makeArray map merge noop now parseHTML parseJSON parseXML proxy trim type unique +syntax match lsQUtilities contained /contains/ + +" jqobj.* +syntax cluster lsQFunctions contains=@lsQGlobals,lsQAjax,lsQAttributes,lsQCallbacks,lsQCore,lsQCSS,lsQData,lsQDeferred,lsQDimensions,lsQEffects,lsQEvents,lsQManipulation,lsQMiscellaneous,lsQOffset,lsQTraversing,lsQUtilities +syntax keyword lsQAjax contained ajaxComplete ajaxError ajaxSend ajaxStart ajaxStop ajaxSuccess +syntax keyword lsQAjax contained serialize serializeArray ajaxTransport load +syntax keyword lsQAttributes contained addClass attr hasClass html prop removeAttr removeClass removeProp toggleClass val +syntax keyword lsQCallbacks contained add disable disabled empty fire fired fireWith has lock locked remove Callbacks +syntax keyword lsQCSS contained css +syntax keyword lsQData contained clearQueue data dequeue queue removeData +syntax keyword lsQDeferred contained Deferred always done fail notify progress promise reject rejectWith resolved resolveWith notifyWith state then +syntax keyword lsQDimensions contained height innerHeight innerWidth outerHeight outerWidth width +syntax keyword lsQEffects contained hide show toggle +syntax keyword lsQEffects contained animate delay stop finish +syntax keyword lsQEffects contained fadeIn fadeOut fadeTo fadeToggle +syntax keyword lsQEffects contained slideDown slideToggle slideUp +syntax keyword lsQEvents contained error resize scroll +syntax keyword lsQEvents contained ready unload +syntax keyword lsQEvents contained bind delegate on off one proxy trigger triggerHandler unbind undelegate +syntax keyword lsQEvents contained Event currentTarget isDefaultPrevented isImmediatePropagationStopped isPropagationStopped namespace pageX pageY preventDefault relatedTarget result stopImmediatePropagation stopPropagation target timeStamp which +syntax keyword lsQEvents contained blur change focus select submit +syntax keyword lsQEvents contained focusin focusout keydown keypress keyup +syntax keyword lsQEvents contained click dblclick hover mousedown mouseenter mouseleave mousemove mouseout mouseover mouseup +syntax keyword lsQManipulation contained clone +syntax keyword lsQManipulation contained unwrap wrap wrapAll wrapInner +syntax keyword lsQManipulation contained append appendTo html prepend prependTo text +syntax keyword lsQManipulation contained after before insertAfter insertBefore +syntax keyword lsQManipulation contained detach empty remove +syntax keyword lsQManipulation contained replaceAll replaceWith +syntax keyword lsQMiscellaneous contained index toArray +syntax keyword lsQOffset contained offset offsetParent position scrollTop scrollLeft +syntax keyword lsQTraversing contained eq filter first has is last map not slice +syntax keyword lsQTraversing contained add andBack contents end +syntax keyword lsQTraversing contained children closest find next nextAll nextUntil parent parents parentsUntil prev prevAll prevUntil siblings + + +" selector +" syntax match lsASCII contained /\\\d\d\d/ +" syntax region lsString start=/"/ skip=/\\\\\|\\"\|\\\n/ end=/"\|$/ contains=lsASCII,@jSelectors +" syntax region lsString start=/'/ skip=/\\\\\|\\'\|\\\n/ end=/'\|$/ contains=lsASCII,@jSelectors + +syntax cluster cssSelectors contains=cssId,cssClass,cssOperators,cssBasicFilters,cssContentFilters,cssVisibility,cssChildFilters,cssForms,cssFormFilters +syntax cluster lsNoReserved add=@cssSelectors +syntax match cssId contained containedin=lsString /#[0-9A-Za-z_\-]\+/ +syntax match cssClass contained containedin=lsString /\.[0-9A-Za-z_\-]\+/ +syntax match cssOperators contained containedin=lsString /*\|>\|+\|-\|\~/ +syntax match cssBasicFilters contained containedin=lsString /:\(animated\|eq\|even\|first\|focus\|gt\|header\|last\|lang\|lt\|not\|odd\|root\|target\)/ +syntax match cssChildFilters contained containedin=lsString /:\(first\|last\|nth\|only\|nth-last\)-child/ +syntax match cssChildFilters contained containedin=lsString /:\(first\|last\|nth\|only\|nth-last\)-of-type/ +syntax match cssContentFilters contained containedin=lsString /:\(contains\|empty\|has\|parent\)/ +syntax match cssForms contained containedin=lsString /:\(button\|checkbox\|checked\|disabled\|enabled\|file\|image\|input\|password\|radio\|reset\|selected\|submit\|text\)/ +syntax match cssVisibility contained containedin=lsString /:\(hidden\|visible\)/ + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_jquery_ls_syntax_inits") + if version < 508 + let did_jquery_ls_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink lsjQuery Constant + + HiLink lsQCore PreProc + HiLink lsQCoreObj PreProc + HiLink lsQCoreData PreProc + + HiLink lsQAjax PreProc + HiLink lsQAttributes PreProc + HiLink lsQCallbacks PreProc + HiLink lsQCSS PreProc + HiLink lsQData PreProc + HiLink lsQDeferred PreProc + HiLink lsQDimensions PreProc + HiLink lsQEffects PreProc + HiLink lsQEvents PreProc + HiLink lsQManipulation PreProc + HiLink lsQMiscellaneous PreProc + HiLink lsQOffset PreProc + HiLink lsQProperties PreProc + HiLink lsQTraversing PreProc + HiLink lsQUtilities PreProc + + HiLink cssId Identifier + HiLink cssClass Constant + HiLink cssOperators Special + HiLink cssBasicFilters Statement + HiLink cssContentFilters Statement + HiLink cssVisibility Statement + HiLink cssChildFilters Statement + HiLink cssForms Statement + HiLink cssFormFilters Statement + + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/jquery.typescript.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/jquery.typescript.vim new file mode 100644 index 0000000..1eb82a7 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/jquery.typescript.vim @@ -0,0 +1,124 @@ +" Vim syntax file +" Language: jQuery for typescript +" Maintainer: othree +" Maintainer: Bruno Michel +" Last Change: 2014/10/29 +" Version: 1.9.0.2 +" URL: http://api.jquery.com/ + +setlocal iskeyword-=$ +if exists("b:current_syntax") && b:current_syntax == 'typescript' + setlocal iskeyword+=$ +endif + +syntax keyword typescriptjQuery jQuery $ containedin=ALLBUT,typescriptComment,typescriptLineComment,typescriptString,typescriptTemplate,typescriptTemplateSubstitution +" syntax match typescriptjQuerydot contained /\./ nextgroup=@typescriptQGlobals +" syntax match typescriptjQuerydot contained /([^)]*)\./ nextgroup=@typescriptQFunctions + +" jQuery.* +syntax cluster typescriptQGlobals contains=typescriptQCore,typescriptQCoreObj,typescriptQCoreData,typescriptQUtilities,typescriptQProperties +syntax keyword typescriptQCore contained holdReady noConflict when +syntax keyword typescriptQCoreObj contained Callback Deferred +syntax keyword typescriptQCoreData contained data dequeue hasData queue removeData +syntax keyword typescriptQCoreAjax contained ajax ajaxPrefilter ajaxSetup ajaxTransport param get getJSON getScript post +syntax keyword typescriptQProperties contained context fx.interval fx.off length support cssHooks +syntax keyword typescriptQUtilities contained each extend globalEval grep inArray isArray isEmptyObject isFunction isPlainObject isWindow isXMLDoc makeArray map merge noop now parseHTML parseJSON parseXML proxy trim type unique +syntax match typescriptQUtilities contained /contains/ + +" jqobj.* +syntax cluster typescriptQFunctions contains=@typescriptQGlobals,typescriptQAjax,typescriptQAttributes,typescriptQCallbacks,typescriptQCore,typescriptQCSS,typescriptQData,typescriptQDeferred,typescriptQDimensions,typescriptQEffects,typescriptQEvents,typescriptQManipulation,typescriptQMiscellaneous,typescriptQOffset,typescriptQTraversing,typescriptQUtilities +syntax keyword typescriptQAjax contained ajaxComplete ajaxError ajaxSend ajaxStart ajaxStop ajaxSuccess +syntax keyword typescriptQAjax contained serialize serializeArray ajaxTransport load +syntax keyword typescriptQAttributes contained addClass attr hasClass html prop removeAttr removeClass removeProp toggleClass val +syntax keyword typescriptQCallbacks contained add disable disabled empty fire fired fireWith has lock locked remove Callbacks +syntax keyword typescriptQCSS contained css +syntax keyword typescriptQData contained clearQueue data dequeue queue removeData +syntax keyword typescriptQDeferred contained Deferred always done fail notify progress promise reject rejectWith resolved resolveWith notifyWith state then +syntax keyword typescriptQDimensions contained height innerHeight innerWidth outerHeight outerWidth width +syntax keyword typescriptQEffects contained hide show toggle +syntax keyword typescriptQEffects contained animate delay stop finish +syntax keyword typescriptQEffects contained fadeIn fadeOut fadeTo fadeToggle +syntax keyword typescriptQEffects contained slideDown slideToggle slideUp +syntax keyword typescriptQEvents contained error resize scroll +syntax keyword typescriptQEvents contained ready unload +syntax keyword typescriptQEvents contained bind delegate on off one proxy trigger triggerHandler unbind undelegate +syntax keyword typescriptQEvents contained Event currentTarget isDefaultPrevented isImmediatePropagationStopped isPropagationStopped namespace pageX pageY preventDefault relatedTarget result stopImmediatePropagation stopPropagation target timeStamp which +syntax keyword typescriptQEvents contained blur change focus select submit +syntax keyword typescriptQEvents contained focusin focusout keydown keypress keyup +syntax keyword typescriptQEvents contained click dblclick hover mousedown mouseenter mouseleave mousemove mouseout mouseover mouseup +syntax keyword typescriptQManipulation contained clone +syntax keyword typescriptQManipulation contained unwrap wrap wrapAll wrapInner +syntax keyword typescriptQManipulation contained append appendTo html prepend prependTo text +syntax keyword typescriptQManipulation contained after before insertAfter insertBefore +syntax keyword typescriptQManipulation contained detach empty remove +syntax keyword typescriptQManipulation contained replaceAll replaceWith +syntax keyword typescriptQMiscellaneous contained index toArray +syntax keyword typescriptQOffset contained offset offsetParent position scrollTop scrollLeft +syntax keyword typescriptQTraversing contained eq filter first has is last map not slice +syntax keyword typescriptQTraversing contained add andBack contents end +syntax keyword typescriptQTraversing contained children closest find next nextAll nextUntil parent parents parentsUntil prev prevAll prevUntil siblings + + +" selector +" syntax match typescriptASCII contained /\\\d\d\d/ +" syntax region typescriptString start=/"/ skip=/\\\\\|\\"\|\\\n/ end=/"\|$/ contains=typescriptASCII,@jSelectors +" syntax region typescriptString start=/'/ skip=/\\\\\|\\'\|\\\n/ end=/'\|$/ contains=typescriptASCII,@jSelectors + +syntax cluster cssSelectors contains=cssId,cssClass,cssOperators,cssBasicFilters,cssContentFilters,cssVisibility,cssChildFilters,cssForms,cssFormFilters +syntax cluster typescriptNoReserved add=@cssSelectors +syntax match cssId contained containedin=typescriptString /#[0-9A-Za-z_\-]\+/ +syntax match cssClass contained containedin=typescriptString /\.[0-9A-Za-z_\-]\+/ +syntax match cssOperators contained containedin=typescriptString /*\|>\|+\|-\|\~/ +syntax match cssBasicFilters contained containedin=typescriptString /:\(animated\|eq\|even\|first\|focus\|gt\|header\|last\|lang\|lt\|not\|odd\|root\|target\)/ +syntax match cssChildFilters contained containedin=typescriptString /:\(first\|last\|nth\|only\|nth-last\)-child/ +syntax match cssChildFilters contained containedin=typescriptString /:\(first\|last\|nth\|only\|nth-last\)-of-type/ +syntax match cssContentFilters contained containedin=typescriptString /:\(contains\|empty\|has\|parent\)/ +syntax match cssForms contained containedin=typescriptString /:\(button\|checkbox\|checked\|disabled\|enabled\|file\|image\|input\|password\|radio\|reset\|selected\|submit\|text\)/ +syntax match cssVisibility contained containedin=typescriptString /:\(hidden\|visible\)/ + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_jquery_typescript_syntax_inits") + if version < 508 + let did_jquery_typescript_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink typescriptjQuery Constant + + HiLink typescriptQCore PreProc + HiLink typescriptQCoreObj PreProc + HiLink typescriptQCoreData PreProc + + HiLink typescriptQAjax PreProc + HiLink typescriptQAttributes PreProc + HiLink typescriptQCallbacks PreProc + HiLink typescriptQCSS PreProc + HiLink typescriptQData PreProc + HiLink typescriptQDeferred PreProc + HiLink typescriptQDimensions PreProc + HiLink typescriptQEffects PreProc + HiLink typescriptQEvents PreProc + HiLink typescriptQManipulation PreProc + HiLink typescriptQMiscellaneous PreProc + HiLink typescriptQOffset PreProc + HiLink typescriptQProperties PreProc + HiLink typescriptQTraversing PreProc + HiLink typescriptQUtilities PreProc + + HiLink cssId Identifier + HiLink cssClass Constant + HiLink cssOperators Special + HiLink cssBasicFilters Statement + HiLink cssContentFilters Statement + HiLink cssVisibility Statement + HiLink cssChildFilters Statement + HiLink cssForms Statement + HiLink cssFormFilters Statement + + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/postprocess.coffee.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/postprocess.coffee.vim new file mode 100644 index 0000000..4b441ce --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/postprocess.coffee.vim @@ -0,0 +1,18 @@ +" Vim syntax file +" Language: JS Lib syntax post process for coffee +" Maintainer: othree +" Last Change: 2014/07/01 +" Version: 0.5 +" URL: https://github.com/othree/javascript-libraries-syntax.vim +" + +" work with https://github.com/kchmck/vim-coffee-script +syntax cluster props add=@coffeeQFunctions,@coffee_Functions,@coffeeBFunctions +syntax cluster props add=@coffeepFunctions,@coffeeAFunctions,@coffeeSFunctions,@coffeeJFunctions +syntax cluster props add=@coffeeQAttrs,@coffee_Attrs,@coffeeBAttrs,@coffeepAttrs,@coffeeAAttrs,@coffeeJAttrs +syntax cluster props add=@coffeeRProp +" syntax match coffeeLDot /\./ containedin=ALLBUT,coffeeComment,coffeeLineComment,coffeeString nextgroup=@coffeeLibraryFuncs,@coffeeLibraryAttrs +" +syntax region coffeeString start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=@coffeeInterpString,@jSelectors +syntax region coffeeString start=/'/ skip=/\\\\\|\\'/ end=/'/ contains=@coffeeBasicString,@jSelectors + diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/postprocess.javascript.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/postprocess.javascript.vim new file mode 100644 index 0000000..a0d87ad --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/postprocess.javascript.vim @@ -0,0 +1,16 @@ +" Vim syntax file +" Language: JS Lib syntax post process for javascript +" Maintainer: othree +" Last Change: 2014/07/01 +" Version: 0.5 +" URL: https://github.com/othree/javascript-libraries-syntax.vim +" + +syntax cluster props add=@javascriptQFunctions,@javascript_Functions,@javascriptBFunctions +syntax cluster props add=@javascriptpFunctions,@javascriptAFunctions,@javascriptSFunctions,@javascriptJFunctions +syntax cluster props add=@javascriptQAttrs,@javascript_Attrs,@javascriptBAttrs,@javascriptpAttrs,@javascriptAAttrs,@javascriptJAttrs +syntax cluster props add=@javascriptRProp + +if !exists("javascript_props") + syntax match javascriptLDot /\./ containedin=ALLBUT,javascriptComment,javascriptLineComment,javascriptLineComment,javascriptString nextgroup=@props +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/postprocess.ls.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/postprocess.ls.vim new file mode 100644 index 0000000..0c15b24 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/postprocess.ls.vim @@ -0,0 +1,28 @@ +" Vim syntax file +" Language: JS Lib syntax post process for ls +" Maintainer: othree +" Last Change: 2013/02/25 +" Version: 0.4 +" URL: https://github.com/othree/javascript-libraries-syntax.vim +" + +syntax cluster lsLibraryFuncs contains=@lsQFunctions,@ls_Functions,@lsBFunctions,@lspFunctions,@lsAFunctions +syntax cluster lsLibraryFuncs contains=@lsSFunctions,@lsJFunctions,@lsRProp +syntax cluster lsLibraryAttrs contains=@lsQAttrs,@ls_Attrs,@lsBAttrs,@lspAttrs,@lsAAttrs,@lsSAttrs,@lsJAttrs +" ).fun! +" ).fun() +" fun0!fun! +" fun0!fun() +" obj.fun! +" obj.fun() +" ).fun arg +" !fun arg +" obj.fun arg +syntax match lsLDot /\./ containedin=ALLBUT,lsComment,lsLineComment,lsString contains=@lsLibraryFuncs,@lsLibraryAttrs +syntax match lsLExp /!/ containedin=ALLBUT,lsComment,lsLineComment,lsString contains=@lsLibraryFuncs,@lsLibraryAttrs + +syntax match lsLPipe /|>/ containedin=ALLBUT,lsComment,lsLineComment,lsString skipwhite nextgroup=@lspFunctions +syntax match lsLCompose />>/ containedin=ALLBUT,lsComment,lsLineComment,lsString skipwhite nextgroup=@lspFunctions + +syntax region lsString start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=@lsInterpString,@jSelectors +syntax region lsString start=/'/ skip=/\\\\\|\\'/ end=/'/ contains=@lsSimpleString,@jSelectors diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/postprocess.typescript.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/postprocess.typescript.vim new file mode 100644 index 0000000..e1fda98 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/postprocess.typescript.vim @@ -0,0 +1,11 @@ +" Vim syntax file +" Language: JS Lib syntax post process for typescript +" Maintainer: othree +" Last Change: 2013/02/25 +" Version: 0.4 +" URL: https://github.com/othree/javascript-libraries-syntax.vim +" + +syntax cluster typescriptLibraryFuncs contains=@typescriptQFunctions,@typescript_Functions,@typescriptBFunctions,@typescriptpFunctions,@typescriptAFunctions,typescriptSFunctions,typescriptJFunctions,@typescriptRProp +syntax cluster typescriptLibraryAttrs contains=@typescriptQAttrs,@typescript_Attrs,@typescriptBAttrs,@typescriptpAttrs,@typescriptAAttrs,@typescriptSAttrs,@typescriptJAttrs +syntax match typescriptLDot /\./ containedin=ALLBUT,typescriptComment,typescriptLineComment,typescriptString nextgroup=@typescriptLibraryFuncs,@typescriptLibraryAttrs diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/prelude.coffee.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/prelude.coffee.vim new file mode 100644 index 0000000..c67ff8a --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/prelude.coffee.vim @@ -0,0 +1,37 @@ +" Vim syntax file +" Language: prelude.ls for coffee +" Maintainer: othree +" Last Change: 2013/07/26 +" Version: 0.6.0 +" URL: http://gkz.github.com/prelude-ls/ + +syntax cluster coffeepFunctions contains=coffeepFunction + +syntax keyword coffeepFunction contained map filter reject partition find each head tail last initial +syntax keyword coffeepFunction contained empty values keys length cons append join reverse fold fold1 +syntax keyword coffeepFunction contained foldr foldr1 unfold andList orList any all unique sort sortBy +syntax keyword coffeepFunction contained compare sum product mean concat concatMap maximum minimum scan scan1 +syntax keyword coffeepFunction contained scanr scanr1 replicate take drop splitAt takeWhile dropWhile span breakIt +syntax keyword coffeepFunction contained listToObj objToFunc zip zipWith zipAll zipAllWith compose curry id flip +syntax keyword coffeepFunction contained fix lines unlines words unwords max min negate abs signum +syntax keyword coffeepFunction contained quot rem div mod recip pi tau exp sqrt ln +syntax keyword coffeepFunction contained pow sin cos tan asin acos atan atan2 truncate round +syntax keyword coffeepFunction contained ceiling floor isItNaN even odd gcd lcm + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_prelude_coffee_syntax_inits") + if version < 508 + let did_prelude_coffee_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink coffeepFunction PreProc + + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/prelude.javascript.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/prelude.javascript.vim new file mode 100644 index 0000000..dea2586 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/prelude.javascript.vim @@ -0,0 +1,37 @@ +" Vim syntax file +" Language: prelude.ls for javascript +" Maintainer: othree +" Last Change: 2013/07/26 +" Version: 0.6.0 +" URL: http://gkz.github.com/prelude-ls/ + +syntax cluster javascriptpFunctions contains=javascriptpFunction + +syntax keyword javascriptpFunction contained map filter reject partition find each head tail last initial +syntax keyword javascriptpFunction contained empty values keys length cons append join reverse fold fold1 +syntax keyword javascriptpFunction contained foldr foldr1 unfold andList orList any all unique sort sortBy +syntax keyword javascriptpFunction contained compare sum product mean concat concatMap maximum minimum scan scan1 +syntax keyword javascriptpFunction contained scanr scanr1 replicate take drop splitAt takeWhile dropWhile span breakIt +syntax keyword javascriptpFunction contained listToObj objToFunc zip zipWith zipAll zipAllWith compose curry id flip +syntax keyword javascriptpFunction contained fix lines unlines words unwords max min negate abs signum +syntax keyword javascriptpFunction contained quot rem div mod recip pi tau exp sqrt ln +syntax keyword javascriptpFunction contained pow sin cos tan asin acos atan atan2 truncate round +syntax keyword javascriptpFunction contained ceiling floor isItNaN even odd gcd lcm + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_prelude_javascript_syntax_inits") + if version < 508 + let did_prelude_javascript_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink javascriptpFunction PreProc + + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/prelude.ls.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/prelude.ls.vim new file mode 100644 index 0000000..ac0caec --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/prelude.ls.vim @@ -0,0 +1,37 @@ +" Vim syntax file +" Language: prelude.ls for ls +" Maintainer: othree +" Last Change: 2013/07/26 +" Version: 0.6.0 +" URL: http://gkz.github.com/prelude-ls/ + +syntax cluster lspFunctions contains=lspFunction + +syntax keyword lspFunction contained map filter reject partition find each head tail last initial +syntax keyword lspFunction contained empty values keys length cons append join reverse fold fold1 +syntax keyword lspFunction contained foldr foldr1 unfold andList orList any all unique sort sortBy +syntax keyword lspFunction contained compare sum product mean concat concatMap maximum minimum scan scan1 +syntax keyword lspFunction contained scanr scanr1 replicate take drop splitAt takeWhile dropWhile span breakIt +syntax keyword lspFunction contained listToObj objToFunc zip zipWith zipAll zipAllWith compose curry id flip +syntax keyword lspFunction contained fix lines unlines words unwords max min negate abs signum +syntax keyword lspFunction contained quot rem div mod recip pi tau exp sqrt ln +syntax keyword lspFunction contained pow sin cos tan asin acos atan atan2 truncate round +syntax keyword lspFunction contained ceiling floor isItNaN even odd gcd lcm + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_prelude_ls_syntax_inits") + if version < 508 + let did_prelude_ls_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink lspFunction PreProc + + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/prelude.typescript.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/prelude.typescript.vim new file mode 100644 index 0000000..93765b2 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/prelude.typescript.vim @@ -0,0 +1,37 @@ +" Vim syntax file +" Language: prelude.ls for typescript +" Maintainer: othree +" Last Change: 2013/07/26 +" Version: 0.6.0 +" URL: http://gkz.github.com/prelude-ls/ + +syntax cluster typescriptpFunctions contains=typescriptpFunction + +syntax keyword typescriptpFunction contained map filter reject partition find each head tail last initial +syntax keyword typescriptpFunction contained empty values keys length cons append join reverse fold fold1 +syntax keyword typescriptpFunction contained foldr foldr1 unfold andList orList any all unique sort sortBy +syntax keyword typescriptpFunction contained compare sum product mean concat concatMap maximum minimum scan scan1 +syntax keyword typescriptpFunction contained scanr scanr1 replicate take drop splitAt takeWhile dropWhile span breakIt +syntax keyword typescriptpFunction contained listToObj objToFunc zip zipWith zipAll zipAllWith compose curry id flip +syntax keyword typescriptpFunction contained fix lines unlines words unwords max min negate abs signum +syntax keyword typescriptpFunction contained quot rem div mod recip pi tau exp sqrt ln +syntax keyword typescriptpFunction contained pow sin cos tan asin acos atan atan2 truncate round +syntax keyword typescriptpFunction contained ceiling floor isItNaN even odd gcd lcm + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_prelude_typescript_syntax_inits") + if version < 508 + let did_prelude_typescript_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink typescriptpFunction PreProc + + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/react.coffee.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/react.coffee.vim new file mode 100644 index 0000000..b5ed8ec --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/react.coffee.vim @@ -0,0 +1,37 @@ +" Vim syntax file +" Language: React for coffee +" Maintainer: othree +" Last Change: 2014/10/29 +" Version: 0.12.0 +" URL: https://facebook.github.io/react/docs/top-level-api.html +" URL: https://facebook.github.io/react/docs/component-api.html + +syntax keyword coffeeReact React ReactDOM containedin=ALLBUT,coffeeComment,coffeeLineComment,coffeeString,coffeeTemplate,coffeeTemplateSubstitution + +syntax keyword coffeeRTop contained createClass render unmountComponentAtNode renderToString +syntax keyword coffeeRTop contained renderToStaticMarkup isValidElement DOM PropTypes +syntax keyword coffeeRTop contained initializeTouchEvents Children map forEach count only +syntax keyword coffeeRComponent contained setState replaceState forceUpdate getDOMNode +syntax keyword coffeeRComponent contained isMounted setProps replaceProps + +syntax cluster coffeeRProp contains=coffeeRTop,coffeeRComponent + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_jquery_coffee_syntax_inits") + if version < 508 + let did_jquery_coffee_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink coffeeReact Constant + + HiLink coffeeRTop PreProc + HiLink coffeeRComponent PreProc + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/react.javascript.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/react.javascript.vim new file mode 100644 index 0000000..22948b9 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/react.javascript.vim @@ -0,0 +1,37 @@ +" Vim syntax file +" Language: React for javascript +" Maintainer: othree +" Last Change: 2014/10/29 +" Version: 0.12.0 +" URL: https://facebook.github.io/react/docs/top-level-api.html +" URL: https://facebook.github.io/react/docs/component-api.html + +syntax keyword javascriptReact React ReactDOM containedin=ALLBUT,javascriptComment,javascriptLineComment,javascriptString,javascriptTemplate,javascriptTemplateSubstitution + +syntax keyword javascriptRTop contained createClass render unmountComponentAtNode renderToString +syntax keyword javascriptRTop contained renderToStaticMarkup isValidElement DOM PropTypes +syntax keyword javascriptRTop contained initializeTouchEvents Children map forEach count only +syntax keyword javascriptRComponent contained setState replaceState forceUpdate getDOMNode +syntax keyword javascriptRComponent contained isMounted setProps replaceProps + +syntax cluster javascriptRProp contains=javascriptRTop,javascriptRComponent + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_jquery_javascript_syntax_inits") + if version < 508 + let did_jquery_javascript_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink javascriptReact Constant + + HiLink javascriptRTop PreProc + HiLink javascriptRComponent PreProc + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/react.ls.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/react.ls.vim new file mode 100644 index 0000000..7e4215e --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/react.ls.vim @@ -0,0 +1,37 @@ +" Vim syntax file +" Language: React for ls +" Maintainer: othree +" Last Change: 2014/10/29 +" Version: 0.12.0 +" URL: https://facebook.github.io/react/docs/top-level-api.html +" URL: https://facebook.github.io/react/docs/component-api.html + +syntax keyword lsReact React ReactDOM containedin=ALLBUT,lsComment,lsLineComment,lsString,lsTemplate,lsTemplateSubstitution + +syntax keyword lsRTop contained createClass render unmountComponentAtNode renderToString +syntax keyword lsRTop contained renderToStaticMarkup isValidElement DOM PropTypes +syntax keyword lsRTop contained initializeTouchEvents Children map forEach count only +syntax keyword lsRComponent contained setState replaceState forceUpdate getDOMNode +syntax keyword lsRComponent contained isMounted setProps replaceProps + +syntax cluster lsRProp contains=lsRTop,lsRComponent + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_jquery_ls_syntax_inits") + if version < 508 + let did_jquery_ls_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink lsReact Constant + + HiLink lsRTop PreProc + HiLink lsRComponent PreProc + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/react.typescript.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/react.typescript.vim new file mode 100644 index 0000000..869cad3 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/react.typescript.vim @@ -0,0 +1,37 @@ +" Vim syntax file +" Language: React for typescript +" Maintainer: othree +" Last Change: 2014/10/29 +" Version: 0.12.0 +" URL: https://facebook.github.io/react/docs/top-level-api.html +" URL: https://facebook.github.io/react/docs/component-api.html + +syntax keyword typescriptReact React ReactDOM containedin=ALLBUT,typescriptComment,typescriptLineComment,typescriptString,typescriptTemplate,typescriptTemplateSubstitution + +syntax keyword typescriptRTop contained createClass render unmountComponentAtNode renderToString +syntax keyword typescriptRTop contained renderToStaticMarkup isValidElement DOM PropTypes +syntax keyword typescriptRTop contained initializeTouchEvents Children map forEach count only +syntax keyword typescriptRComponent contained setState replaceState forceUpdate getDOMNode +syntax keyword typescriptRComponent contained isMounted setProps replaceProps + +syntax cluster typescriptRProp contains=typescriptRTop,typescriptRComponent + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_jquery_typescript_syntax_inits") + if version < 508 + let did_jquery_typescript_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink typescriptReact Constant + + HiLink typescriptRTop PreProc + HiLink typescriptRComponent PreProc + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/requirejs.coffee.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/requirejs.coffee.vim new file mode 100644 index 0000000..3759655 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/requirejs.coffee.vim @@ -0,0 +1,36 @@ +" Vim syntax file +" Language: require.js for coffee +" Maintainer: othree +" Last Change: 2013/07/26 +" Version: 2.1.4.1 +" URL: http://requirejs.org/ + + +syntax keyword coffeeRequire require requirejs containedin=ALLBUT,coffeeComment,coffeeLineComment,coffeeString,coffeeTemplate,coffeeTemplateSubstitution nextgroup=coffeeRequiredot +syntax match coffeeRequiredot contained /\./ nextgroup=coffeeRequireMethods +syntax keyword coffeeRequireMethods contained config + +syntax keyword coffeeRdefine define containedin=ALLBUT,coffeeComment,coffeeLineComment,coffeeString nextgroup=coffeeRdefinedot +syntax match coffeeRdefinedot contained /\./ nextgroup=coffeeRdefineMethods +syntax keyword coffeeRdefineMethods contained amd + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_requirejs_coffee_syntax_inits") + if version < 508 + let did_requirejs_coffee_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink coffeeRequire PreProc + HiLink coffeeRequireMethods PreProc + HiLink coffeeRdefine PreProc + HiLink coffeeRdefineMethods PreProc + + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/requirejs.javascript.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/requirejs.javascript.vim new file mode 100644 index 0000000..3e8afec --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/requirejs.javascript.vim @@ -0,0 +1,36 @@ +" Vim syntax file +" Language: require.js for javascript +" Maintainer: othree +" Last Change: 2013/07/26 +" Version: 2.1.4.1 +" URL: http://requirejs.org/ + + +syntax keyword javascriptRequire require requirejs containedin=ALLBUT,javascriptComment,javascriptLineComment,javascriptString,javascriptTemplate,javascriptTemplateSubstitution nextgroup=javascriptRequiredot +syntax match javascriptRequiredot contained /\./ nextgroup=javascriptRequireMethods +syntax keyword javascriptRequireMethods contained config + +syntax keyword javascriptRdefine define containedin=ALLBUT,javascriptComment,javascriptLineComment,javascriptString nextgroup=javascriptRdefinedot +syntax match javascriptRdefinedot contained /\./ nextgroup=javascriptRdefineMethods +syntax keyword javascriptRdefineMethods contained amd + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_requirejs_javascript_syntax_inits") + if version < 508 + let did_requirejs_javascript_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink javascriptRequire PreProc + HiLink javascriptRequireMethods PreProc + HiLink javascriptRdefine PreProc + HiLink javascriptRdefineMethods PreProc + + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/requirejs.ls.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/requirejs.ls.vim new file mode 100644 index 0000000..9c9e138 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/requirejs.ls.vim @@ -0,0 +1,36 @@ +" Vim syntax file +" Language: require.js for ls +" Maintainer: othree +" Last Change: 2013/07/26 +" Version: 2.1.4.1 +" URL: http://requirejs.org/ + + +syntax keyword lsRequire require requirejs containedin=ALLBUT,lsComment,lsLineComment,lsString,lsTemplate,lsTemplateSubstitution nextgroup=lsRequiredot +syntax match lsRequiredot contained /\./ nextgroup=lsRequireMethods +syntax keyword lsRequireMethods contained config + +syntax keyword lsRdefine define containedin=ALLBUT,lsComment,lsLineComment,lsString nextgroup=lsRdefinedot +syntax match lsRdefinedot contained /\./ nextgroup=lsRdefineMethods +syntax keyword lsRdefineMethods contained amd + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_requirejs_ls_syntax_inits") + if version < 508 + let did_requirejs_ls_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink lsRequire PreProc + HiLink lsRequireMethods PreProc + HiLink lsRdefine PreProc + HiLink lsRdefineMethods PreProc + + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/requirejs.typescript.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/requirejs.typescript.vim new file mode 100644 index 0000000..5c71b03 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/requirejs.typescript.vim @@ -0,0 +1,36 @@ +" Vim syntax file +" Language: require.js for typescript +" Maintainer: othree +" Last Change: 2013/07/26 +" Version: 2.1.4.1 +" URL: http://requirejs.org/ + + +syntax keyword typescriptRequire require requirejs containedin=ALLBUT,typescriptComment,typescriptLineComment,typescriptString,typescriptTemplate,typescriptTemplateSubstitution nextgroup=typescriptRequiredot +syntax match typescriptRequiredot contained /\./ nextgroup=typescriptRequireMethods +syntax keyword typescriptRequireMethods contained config + +syntax keyword typescriptRdefine define containedin=ALLBUT,typescriptComment,typescriptLineComment,typescriptString nextgroup=typescriptRdefinedot +syntax match typescriptRdefinedot contained /\./ nextgroup=typescriptRdefineMethods +syntax keyword typescriptRdefineMethods contained amd + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_requirejs_typescript_syntax_inits") + if version < 508 + let did_requirejs_typescript_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink typescriptRequire PreProc + HiLink typescriptRequireMethods PreProc + HiLink typescriptRdefine PreProc + HiLink typescriptRdefineMethods PreProc + + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/sugar.coffee.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/sugar.coffee.vim new file mode 100644 index 0000000..70beeb7 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/sugar.coffee.vim @@ -0,0 +1,90 @@ +" Vim syntax file +" Language: prelude.ls for coffee +" Maintainer: othree +" Last Change: 2013/07/26 +" Version: 1.3.9 +" URL: http://sugarjs.com/ +" http://sugarjs.com/api + +syntax cluster coffeeSFunctions contains=coffeeSFunction + +" String +syntax keyword coffeeSFunction contained add assign at camelize capitalize chars codes compact dasherize decodeBase64 +syntax keyword coffeeSFunction contained each encodeBase64 endsWith escapeHTML escapeRegExp escapeURL first from hankaku has +syntax keyword coffeeSFunction contained hasArabic hasCyrillic hasGreek hasHangul hasHan hasKanji hasHebrew hasHiragana hasKana hasKatakana +syntax keyword coffeeSFunction contained hasLatin hasThai hasDevanagari hiragana humanize insert isBlank isArabic isCyrillic isGreek +syntax keyword coffeeSFunction contained isHangul isHan isKanji isHebrew isHiragana isKana isKatakana isKatakana isThai isDevanagari +syntax keyword coffeeSFunction contained katakana last lines normalize pad padLeft padRight paragraphs parameterize plualize +syntax keyword coffeeSFunction contained remove removeTags repeat reverse shift singularize spacify startsWith stripTags titleize +syntax keyword coffeeSFunction contained to toNumber trim trimLeft trimRight truncate underscore unescapeHTML unescapeURL words +syntax keyword coffeeSFunction contained zenkaku + +" Number +syntax keyword coffeeSFunction contained abbr bytes ceil chr downto duration floor format hex isEven +syntax keyword coffeeSFunction contained isInteger isMultipleOf isOdd log abs sin asin cos acos tan +syntax keyword coffeeSFunction contained atan sqrt exp pow metric ordinalize pad round times toNumber +syntax keyword coffeeSFunction contained millisecond milliseconds second seconds minute minutes hour hours day days +syntax keyword coffeeSFunction contained week weeks month months year years upto + +" Array + +syntax keyword coffeeSFunction contained create add all any at average clone compact count each +syntax keyword coffeeSFunction contained every exclude filter find findAll findFrom findIndex findIndexFrom first flatten +syntax keyword coffeeSFunction contained forEach from groupBy inGroups inGroupsOf include indexOf insert intersect isEmpty +syntax keyword coffeeSFunction contained last lastIndexOf least map max min most none randomize reduce +syntax keyword coffeeSFunction contained reduceRight remove removeAt sample some sortBy subtract sum to union +syntax keyword coffeeSFunction contained unique zip + +" Object + +syntax keyword coffeeSFunction contained extended fromQueryString isArray isObject isBoolean isDate isFunction isNaN isNumber isString +syntax keyword coffeeSFunction contained isRegExp toQueryString clone each map any all none count find +syntax keyword coffeeSFunction contained findAll reduce isEmpty sum average min max least most equal +syntax keyword coffeeSFunction contained has keys merge reject select size tap values watch + +" Function + +syntax keyword coffeeSFunction contained after bind cancel debounce delay everyfill lazyredrawonce throttle + +" RegExp + +syntax keyword coffeeSFunction contained escape addFlag getFlags removeFlag setFlags + +" Date +syntax keyword coffeeSFunction contained addLocale create future getLocale now past range setLocale addMilliseconds addSeconds +syntax keyword coffeeSFunction contained addMinutes addHours addDays addWeeks addMonths addYears advance beginningOfDay beginningOfWeek beginningOfMonth +syntax keyword coffeeSFunction contained beginningOfYear clone daysInMonth endOfDay endOfWeek endOfMonth endOfYear format getISOWeek getUTCOffset +syntax keyword coffeeSFunction contained getWeekday is isAfter isBefore isBetween isToday isYesterday isTomorrow isWeekday isWeekend +syntax keyword coffeeSFunction contained isSunday isMonday isTuesday isWednesday isThursday isFriday isSaturday isFuture isLastWeek isLastMonth +syntax keyword coffeeSFunction contained isLastYear isPast isThisWeek isThisMonth isThisYear isUTC isValid iso relative reset +syntax keyword coffeeSFunction contained rewind set setISOWeek setWeekday toISOString toJSON millisecondsSince secondsSince minutesSince hoursSince +syntax keyword coffeeSFunction contained daysSince weeksSince monthsSince yearsSince millisecondsUntil secondsUntil minutesUntil hoursUntil daysUntil weeksUntil +syntax keyword coffeeSFunction contained monthsUntil yearsUntil millisecondAfter millisecondsAfter secondAfter secondsAfter minuteAfter minutesAfter hourAfter hoursAfter +syntax keyword coffeeSFunction contained dayAfter daysAfter weekAfter weeksAfter monthAfter monthsAfter yearAfter yearsAfter millisecondAgo millisecondsAgo +syntax keyword coffeeSFunction contained secondAgo secondsAgo minuteAgo minutesAgo hourAgo hoursAgo dayAgo daysAgo weekAgo weeksAgo +syntax keyword coffeeSFunction contained monthAgo monthsAgo yearAgo yearsAgo millisecondBefore millisecondsBefore secondBefore secondsBefore minuteBefore minutesBefore +syntax keyword coffeeSFunction contained hourBefore hoursBefore dayBefore daysBefore weekBefore weeksBefore monthBefore monthsBefore yearBefore yearsBefore +syntax keyword coffeeSFunction contained millisecondFromNow millisecondsFromNow secondFromNow secondsFromNow minuteFromNow minutesFromNow hourFromNow hoursFromNow dayFromNow daysFromNow +syntax keyword coffeeSFunction contained weekFromNow weeksFromNow monthFromNow monthsFromNow yearFromNow yearsFromNow utc + +" Range + +syntax keyword coffeeSFunction contained clamp clone every intersect isValid span toString union +syntax keyword coffeeSFunction contained contain[s] + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_prelude_coffee_syntax_inits") + if version < 508 + let did_prelude_coffee_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink coffeeSFunction PreProc + + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/sugar.javascript.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/sugar.javascript.vim new file mode 100644 index 0000000..0f7bdef --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/sugar.javascript.vim @@ -0,0 +1,90 @@ +" Vim syntax file +" Language: prelude.ls for javascript +" Maintainer: othree +" Last Change: 2013/07/26 +" Version: 1.3.9 +" URL: http://sugarjs.com/ +" http://sugarjs.com/api + +syntax cluster javascriptSFunctions contains=javascriptSFunction + +" String +syntax keyword javascriptSFunction contained add assign at camelize capitalize chars codes compact dasherize decodeBase64 +syntax keyword javascriptSFunction contained each encodeBase64 endsWith escapeHTML escapeRegExp escapeURL first from hankaku has +syntax keyword javascriptSFunction contained hasArabic hasCyrillic hasGreek hasHangul hasHan hasKanji hasHebrew hasHiragana hasKana hasKatakana +syntax keyword javascriptSFunction contained hasLatin hasThai hasDevanagari hiragana humanize insert isBlank isArabic isCyrillic isGreek +syntax keyword javascriptSFunction contained isHangul isHan isKanji isHebrew isHiragana isKana isKatakana isKatakana isThai isDevanagari +syntax keyword javascriptSFunction contained katakana last lines normalize pad padLeft padRight paragraphs parameterize plualize +syntax keyword javascriptSFunction contained remove removeTags repeat reverse shift singularize spacify startsWith stripTags titleize +syntax keyword javascriptSFunction contained to toNumber trim trimLeft trimRight truncate underscore unescapeHTML unescapeURL words +syntax keyword javascriptSFunction contained zenkaku + +" Number +syntax keyword javascriptSFunction contained abbr bytes ceil chr downto duration floor format hex isEven +syntax keyword javascriptSFunction contained isInteger isMultipleOf isOdd log abs sin asin cos acos tan +syntax keyword javascriptSFunction contained atan sqrt exp pow metric ordinalize pad round times toNumber +syntax keyword javascriptSFunction contained millisecond milliseconds second seconds minute minutes hour hours day days +syntax keyword javascriptSFunction contained week weeks month months year years upto + +" Array + +syntax keyword javascriptSFunction contained create add all any at average clone compact count each +syntax keyword javascriptSFunction contained every exclude filter find findAll findFrom findIndex findIndexFrom first flatten +syntax keyword javascriptSFunction contained forEach from groupBy inGroups inGroupsOf include indexOf insert intersect isEmpty +syntax keyword javascriptSFunction contained last lastIndexOf least map max min most none randomize reduce +syntax keyword javascriptSFunction contained reduceRight remove removeAt sample some sortBy subtract sum to union +syntax keyword javascriptSFunction contained unique zip + +" Object + +syntax keyword javascriptSFunction contained extended fromQueryString isArray isObject isBoolean isDate isFunction isNaN isNumber isString +syntax keyword javascriptSFunction contained isRegExp toQueryString clone each map any all none count find +syntax keyword javascriptSFunction contained findAll reduce isEmpty sum average min max least most equal +syntax keyword javascriptSFunction contained has keys merge reject select size tap values watch + +" Function + +syntax keyword javascriptSFunction contained after bind cancel debounce delay everyfill lazyredrawonce throttle + +" RegExp + +syntax keyword javascriptSFunction contained escape addFlag getFlags removeFlag setFlags + +" Date +syntax keyword javascriptSFunction contained addLocale create future getLocale now past range setLocale addMilliseconds addSeconds +syntax keyword javascriptSFunction contained addMinutes addHours addDays addWeeks addMonths addYears advance beginningOfDay beginningOfWeek beginningOfMonth +syntax keyword javascriptSFunction contained beginningOfYear clone daysInMonth endOfDay endOfWeek endOfMonth endOfYear format getISOWeek getUTCOffset +syntax keyword javascriptSFunction contained getWeekday is isAfter isBefore isBetween isToday isYesterday isTomorrow isWeekday isWeekend +syntax keyword javascriptSFunction contained isSunday isMonday isTuesday isWednesday isThursday isFriday isSaturday isFuture isLastWeek isLastMonth +syntax keyword javascriptSFunction contained isLastYear isPast isThisWeek isThisMonth isThisYear isUTC isValid iso relative reset +syntax keyword javascriptSFunction contained rewind set setISOWeek setWeekday toISOString toJSON millisecondsSince secondsSince minutesSince hoursSince +syntax keyword javascriptSFunction contained daysSince weeksSince monthsSince yearsSince millisecondsUntil secondsUntil minutesUntil hoursUntil daysUntil weeksUntil +syntax keyword javascriptSFunction contained monthsUntil yearsUntil millisecondAfter millisecondsAfter secondAfter secondsAfter minuteAfter minutesAfter hourAfter hoursAfter +syntax keyword javascriptSFunction contained dayAfter daysAfter weekAfter weeksAfter monthAfter monthsAfter yearAfter yearsAfter millisecondAgo millisecondsAgo +syntax keyword javascriptSFunction contained secondAgo secondsAgo minuteAgo minutesAgo hourAgo hoursAgo dayAgo daysAgo weekAgo weeksAgo +syntax keyword javascriptSFunction contained monthAgo monthsAgo yearAgo yearsAgo millisecondBefore millisecondsBefore secondBefore secondsBefore minuteBefore minutesBefore +syntax keyword javascriptSFunction contained hourBefore hoursBefore dayBefore daysBefore weekBefore weeksBefore monthBefore monthsBefore yearBefore yearsBefore +syntax keyword javascriptSFunction contained millisecondFromNow millisecondsFromNow secondFromNow secondsFromNow minuteFromNow minutesFromNow hourFromNow hoursFromNow dayFromNow daysFromNow +syntax keyword javascriptSFunction contained weekFromNow weeksFromNow monthFromNow monthsFromNow yearFromNow yearsFromNow utc + +" Range + +syntax keyword javascriptSFunction contained clamp clone every intersect isValid span toString union +syntax keyword javascriptSFunction contained contain[s] + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_prelude_javascript_syntax_inits") + if version < 508 + let did_prelude_javascript_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink javascriptSFunction PreProc + + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/sugar.ls.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/sugar.ls.vim new file mode 100644 index 0000000..66a31f7 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/sugar.ls.vim @@ -0,0 +1,90 @@ +" Vim syntax file +" Language: prelude.ls for ls +" Maintainer: othree +" Last Change: 2013/07/26 +" Version: 1.3.9 +" URL: http://sugarjs.com/ +" http://sugarjs.com/api + +syntax cluster lsSFunctions contains=lsSFunction + +" String +syntax keyword lsSFunction contained add assign at camelize capitalize chars codes compact dasherize decodeBase64 +syntax keyword lsSFunction contained each encodeBase64 endsWith escapeHTML escapeRegExp escapeURL first from hankaku has +syntax keyword lsSFunction contained hasArabic hasCyrillic hasGreek hasHangul hasHan hasKanji hasHebrew hasHiragana hasKana hasKatakana +syntax keyword lsSFunction contained hasLatin hasThai hasDevanagari hiragana humanize insert isBlank isArabic isCyrillic isGreek +syntax keyword lsSFunction contained isHangul isHan isKanji isHebrew isHiragana isKana isKatakana isKatakana isThai isDevanagari +syntax keyword lsSFunction contained katakana last lines normalize pad padLeft padRight paragraphs parameterize plualize +syntax keyword lsSFunction contained remove removeTags repeat reverse shift singularize spacify startsWith stripTags titleize +syntax keyword lsSFunction contained to toNumber trim trimLeft trimRight truncate underscore unescapeHTML unescapeURL words +syntax keyword lsSFunction contained zenkaku + +" Number +syntax keyword lsSFunction contained abbr bytes ceil chr downto duration floor format hex isEven +syntax keyword lsSFunction contained isInteger isMultipleOf isOdd log abs sin asin cos acos tan +syntax keyword lsSFunction contained atan sqrt exp pow metric ordinalize pad round times toNumber +syntax keyword lsSFunction contained millisecond milliseconds second seconds minute minutes hour hours day days +syntax keyword lsSFunction contained week weeks month months year years upto + +" Array + +syntax keyword lsSFunction contained create add all any at average clone compact count each +syntax keyword lsSFunction contained every exclude filter find findAll findFrom findIndex findIndexFrom first flatten +syntax keyword lsSFunction contained forEach from groupBy inGroups inGroupsOf include indexOf insert intersect isEmpty +syntax keyword lsSFunction contained last lastIndexOf least map max min most none randomize reduce +syntax keyword lsSFunction contained reduceRight remove removeAt sample some sortBy subtract sum to union +syntax keyword lsSFunction contained unique zip + +" Object + +syntax keyword lsSFunction contained extended fromQueryString isArray isObject isBoolean isDate isFunction isNaN isNumber isString +syntax keyword lsSFunction contained isRegExp toQueryString clone each map any all none count find +syntax keyword lsSFunction contained findAll reduce isEmpty sum average min max least most equal +syntax keyword lsSFunction contained has keys merge reject select size tap values watch + +" Function + +syntax keyword lsSFunction contained after bind cancel debounce delay everyfill lazyredrawonce throttle + +" RegExp + +syntax keyword lsSFunction contained escape addFlag getFlags removeFlag setFlags + +" Date +syntax keyword lsSFunction contained addLocale create future getLocale now past range setLocale addMilliseconds addSeconds +syntax keyword lsSFunction contained addMinutes addHours addDays addWeeks addMonths addYears advance beginningOfDay beginningOfWeek beginningOfMonth +syntax keyword lsSFunction contained beginningOfYear clone daysInMonth endOfDay endOfWeek endOfMonth endOfYear format getISOWeek getUTCOffset +syntax keyword lsSFunction contained getWeekday is isAfter isBefore isBetween isToday isYesterday isTomorrow isWeekday isWeekend +syntax keyword lsSFunction contained isSunday isMonday isTuesday isWednesday isThursday isFriday isSaturday isFuture isLastWeek isLastMonth +syntax keyword lsSFunction contained isLastYear isPast isThisWeek isThisMonth isThisYear isUTC isValid iso relative reset +syntax keyword lsSFunction contained rewind set setISOWeek setWeekday toISOString toJSON millisecondsSince secondsSince minutesSince hoursSince +syntax keyword lsSFunction contained daysSince weeksSince monthsSince yearsSince millisecondsUntil secondsUntil minutesUntil hoursUntil daysUntil weeksUntil +syntax keyword lsSFunction contained monthsUntil yearsUntil millisecondAfter millisecondsAfter secondAfter secondsAfter minuteAfter minutesAfter hourAfter hoursAfter +syntax keyword lsSFunction contained dayAfter daysAfter weekAfter weeksAfter monthAfter monthsAfter yearAfter yearsAfter millisecondAgo millisecondsAgo +syntax keyword lsSFunction contained secondAgo secondsAgo minuteAgo minutesAgo hourAgo hoursAgo dayAgo daysAgo weekAgo weeksAgo +syntax keyword lsSFunction contained monthAgo monthsAgo yearAgo yearsAgo millisecondBefore millisecondsBefore secondBefore secondsBefore minuteBefore minutesBefore +syntax keyword lsSFunction contained hourBefore hoursBefore dayBefore daysBefore weekBefore weeksBefore monthBefore monthsBefore yearBefore yearsBefore +syntax keyword lsSFunction contained millisecondFromNow millisecondsFromNow secondFromNow secondsFromNow minuteFromNow minutesFromNow hourFromNow hoursFromNow dayFromNow daysFromNow +syntax keyword lsSFunction contained weekFromNow weeksFromNow monthFromNow monthsFromNow yearFromNow yearsFromNow utc + +" Range + +syntax keyword lsSFunction contained clamp clone every intersect isValid span toString union +syntax keyword lsSFunction contained contain[s] + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_prelude_ls_syntax_inits") + if version < 508 + let did_prelude_ls_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink lsSFunction PreProc + + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/sugar.typescript.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/sugar.typescript.vim new file mode 100644 index 0000000..0c23784 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/sugar.typescript.vim @@ -0,0 +1,90 @@ +" Vim syntax file +" Language: prelude.ls for typescript +" Maintainer: othree +" Last Change: 2013/07/26 +" Version: 1.3.9 +" URL: http://sugarjs.com/ +" http://sugarjs.com/api + +syntax cluster typescriptSFunctions contains=typescriptSFunction + +" String +syntax keyword typescriptSFunction contained add assign at camelize capitalize chars codes compact dasherize decodeBase64 +syntax keyword typescriptSFunction contained each encodeBase64 endsWith escapeHTML escapeRegExp escapeURL first from hankaku has +syntax keyword typescriptSFunction contained hasArabic hasCyrillic hasGreek hasHangul hasHan hasKanji hasHebrew hasHiragana hasKana hasKatakana +syntax keyword typescriptSFunction contained hasLatin hasThai hasDevanagari hiragana humanize insert isBlank isArabic isCyrillic isGreek +syntax keyword typescriptSFunction contained isHangul isHan isKanji isHebrew isHiragana isKana isKatakana isKatakana isThai isDevanagari +syntax keyword typescriptSFunction contained katakana last lines normalize pad padLeft padRight paragraphs parameterize plualize +syntax keyword typescriptSFunction contained remove removeTags repeat reverse shift singularize spacify startsWith stripTags titleize +syntax keyword typescriptSFunction contained to toNumber trim trimLeft trimRight truncate underscore unescapeHTML unescapeURL words +syntax keyword typescriptSFunction contained zenkaku + +" Number +syntax keyword typescriptSFunction contained abbr bytes ceil chr downto duration floor format hex isEven +syntax keyword typescriptSFunction contained isInteger isMultipleOf isOdd log abs sin asin cos acos tan +syntax keyword typescriptSFunction contained atan sqrt exp pow metric ordinalize pad round times toNumber +syntax keyword typescriptSFunction contained millisecond milliseconds second seconds minute minutes hour hours day days +syntax keyword typescriptSFunction contained week weeks month months year years upto + +" Array + +syntax keyword typescriptSFunction contained create add all any at average clone compact count each +syntax keyword typescriptSFunction contained every exclude filter find findAll findFrom findIndex findIndexFrom first flatten +syntax keyword typescriptSFunction contained forEach from groupBy inGroups inGroupsOf include indexOf insert intersect isEmpty +syntax keyword typescriptSFunction contained last lastIndexOf least map max min most none randomize reduce +syntax keyword typescriptSFunction contained reduceRight remove removeAt sample some sortBy subtract sum to union +syntax keyword typescriptSFunction contained unique zip + +" Object + +syntax keyword typescriptSFunction contained extended fromQueryString isArray isObject isBoolean isDate isFunction isNaN isNumber isString +syntax keyword typescriptSFunction contained isRegExp toQueryString clone each map any all none count find +syntax keyword typescriptSFunction contained findAll reduce isEmpty sum average min max least most equal +syntax keyword typescriptSFunction contained has keys merge reject select size tap values watch + +" Function + +syntax keyword typescriptSFunction contained after bind cancel debounce delay everyfill lazyredrawonce throttle + +" RegExp + +syntax keyword typescriptSFunction contained escape addFlag getFlags removeFlag setFlags + +" Date +syntax keyword typescriptSFunction contained addLocale create future getLocale now past range setLocale addMilliseconds addSeconds +syntax keyword typescriptSFunction contained addMinutes addHours addDays addWeeks addMonths addYears advance beginningOfDay beginningOfWeek beginningOfMonth +syntax keyword typescriptSFunction contained beginningOfYear clone daysInMonth endOfDay endOfWeek endOfMonth endOfYear format getISOWeek getUTCOffset +syntax keyword typescriptSFunction contained getWeekday is isAfter isBefore isBetween isToday isYesterday isTomorrow isWeekday isWeekend +syntax keyword typescriptSFunction contained isSunday isMonday isTuesday isWednesday isThursday isFriday isSaturday isFuture isLastWeek isLastMonth +syntax keyword typescriptSFunction contained isLastYear isPast isThisWeek isThisMonth isThisYear isUTC isValid iso relative reset +syntax keyword typescriptSFunction contained rewind set setISOWeek setWeekday toISOString toJSON millisecondsSince secondsSince minutesSince hoursSince +syntax keyword typescriptSFunction contained daysSince weeksSince monthsSince yearsSince millisecondsUntil secondsUntil minutesUntil hoursUntil daysUntil weeksUntil +syntax keyword typescriptSFunction contained monthsUntil yearsUntil millisecondAfter millisecondsAfter secondAfter secondsAfter minuteAfter minutesAfter hourAfter hoursAfter +syntax keyword typescriptSFunction contained dayAfter daysAfter weekAfter weeksAfter monthAfter monthsAfter yearAfter yearsAfter millisecondAgo millisecondsAgo +syntax keyword typescriptSFunction contained secondAgo secondsAgo minuteAgo minutesAgo hourAgo hoursAgo dayAgo daysAgo weekAgo weeksAgo +syntax keyword typescriptSFunction contained monthAgo monthsAgo yearAgo yearsAgo millisecondBefore millisecondsBefore secondBefore secondsBefore minuteBefore minutesBefore +syntax keyword typescriptSFunction contained hourBefore hoursBefore dayBefore daysBefore weekBefore weeksBefore monthBefore monthsBefore yearBefore yearsBefore +syntax keyword typescriptSFunction contained millisecondFromNow millisecondsFromNow secondFromNow secondsFromNow minuteFromNow minutesFromNow hourFromNow hoursFromNow dayFromNow daysFromNow +syntax keyword typescriptSFunction contained weekFromNow weeksFromNow monthFromNow monthsFromNow yearFromNow yearsFromNow utc + +" Range + +syntax keyword typescriptSFunction contained clamp clone every intersect isValid span toString union +syntax keyword typescriptSFunction contained contain[s] + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_prelude_typescript_syntax_inits") + if version < 508 + let did_prelude_typescript_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink typescriptSFunction PreProc + + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/underscore.coffee.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/underscore.coffee.vim new file mode 100644 index 0000000..376faa6 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/underscore.coffee.vim @@ -0,0 +1,128 @@ +" Vim syntax file +" Language: underscore.js for coffee +" Maintainer: othree +" Last Change: 2016/01/18 +" Version: 1.7.0 +" URL: http://underscorejs.org/ +" LoDash: 4.0.0 +" URL: http://lodash.com/ + +syntax keyword coffeeunderscore _ containedin=ALLBUT,coffeeComment,coffeeLineComment,coffeeString,coffeeTemplate,coffeeTemplateSubstitution +" syntax match coffeeunderscoredot contained /\./ nextgroup=@coffee_Functions +" syntax match coffeeunderscoredot contained /([^)]*)\./ nextgroup=@coffee_Functions + +syntax cluster coffee_Functions contains=coffee_collections,coffee_strings,coffee_arrays,coffee_functions,coffee_objects,coffee_chaining,coffee_utility,coffee_lodash,coffee_math,coffee_number + +syntax match coffee_collections contained /contains/ +syntax keyword coffee_collections contained include +syntax keyword coffee_collections contained each map reduce reduceRight find filter where findWhere +syntax keyword coffee_collections contained reject every some invoke pluck max min sortBy +syntax keyword coffee_collections contained groupBy indexBy countBy shuffle toArray size +syntax keyword coffee_collections contained partition iteratee +" lodash 3.0.0 +syntax keyword coffee_collections contained partition sortByAll includes callback +" lodash 4.0.0 +syntax keyword coffee_collections contained flatMap commit next plant reverse toJSON valueOf +syntax keyword coffee_collections contained forEachRight invokeMap keyBy orderBy sample sampleSize + +" lodash 3.0.0 +syntax keyword coffee_strings contained camelCase capitalize deburr endsWith escapeRegExp +syntax keyword coffee_strings contained kebabCase pad padLeft padRight repeat snakeCase +syntax keyword coffee_strings contained startsWith trim trimLeft trimRight trunc words +" lodash 4.0.0 +syntax keyword coffee_strings contained lowerCase lowerFirst padEnd padStart replace startCase +syntax keyword coffee_strings contained startWith toLower toUpper trimEnd trimStart truncate upperCase +syntax keyword coffee_strings contained upperFirst + +syntax keyword coffee_arrays contained first initial last rest compact flatten without union +syntax keyword coffee_arrays contained intersection difference uniq zip object indextOf +syntax keyword coffee_arrays contained lastIndexOf sortedIndex range +" lodash 3.0.0 +syntax keyword coffee_arrays contained chunk dropRight dropRightWhile dropWhile flattenDeep +syntax keyword coffee_arrays contained pullAt slice sortedLastIndex takeRight takeRightWhile +syntax keyword coffee_arrays contained takeWhile +" lodash 4.0.0 +syntax keyword coffee_arrays contained concat differenceBy differenceWith drop fill findLastIndex +syntax keyword coffee_arrays contained fromPairs head indexOf intersection intersectionBy intersectionWith +syntax keyword coffee_arrays contained join pull pullAll pullAllBy remove slice sortedIndexBy sortedIndexOf +syntax keyword coffee_arrays contained sortedLastIndexBy sortedLastIndexOf sortedUniq sortedUniqBy tail +syntax keyword coffee_arrays contained take takeRightWhile unionBy unionWith uniqBy uniqWith unzipWith +syntax keyword coffee_arrays contained xorBy xorWith zipObject zipWith + +syntax keyword coffee_functions contained bind bindAll partial memoize delay throttle debounce +syntax keyword coffee_functions contained once after before wrap negate compose flow flowRight +" lodash 3.0.0 +syntax keyword coffee_functions contained ary before curryRight negate rearg +syntax keyword coffee_functions contained backflow compose partial cancel +" lodash 4.0.0 +syntax keyword coffee_functions contained curry defer eachRight findLast flip negate overArgs rest spread unary + +syntax keyword coffee_objects contained keys values pairs invert functions extend pick omit +syntax keyword coffee_objects contained defaults clone tap has isEqual isEmpty isElement isArray +syntax keyword coffee_objects contained isObject isArguments isFunction isString isNumber +syntax keyword coffee_objects contained isFinite isBoolean isDate isRegExp isNaN isNull +syntax keyword coffee_objects contained isUndefined property matches +" lodash 3.0.0 +syntax keyword coffee_objects contained keysIn valuesIn assign get set +syntax keyword coffee_objects contained mapKeys +" lodash 4.0.0 +syntax keyword coffee_objects contained assignIn assignInWith assignWith defaultsDeep extendWith +syntax keyword coffee_objects contained findKey findLastKey forIn forInRight forOwn forOwnRight +syntax keyword coffee_objects contained functionsIn hasIn mergeWith omitBy pickBy setWith toPairs +syntax keyword coffee_objects contained toPairsIn transform unset +" +syntax keyword coffee_utility contained noConflict identify times random mixin uniqueId +syntax keyword coffee_utility contained escape unescape result template iteratee noop +" lodash 3.0.0 +syntax keyword coffee_utility contained attempt matches matchesProperty propertyOf constant now +" lodash 4.0.0 +syntax keyword coffee_utility contained cond conforms flow identity matches method methodOf nthArg +syntax keyword coffee_utility contained over overEvery overSome rangeRight times toPath uniqueId + +syntax keyword coffee_chaining contained chain value thru + +syntax keyword coffee_lodash contained at bindKey cloneDeep createCallback findIndex findKey +syntax keyword coffee_lodash contained forEach forIn forOwn isPlainObject merge parseInt partial +syntax keyword coffee_lodash contained partialRight runInContext support unzip where +syntax keyword coffee_lodash contained capitalize match slice trim trimLeft trimRight +syntax keyword coffee_lodash contained constant mapValues now property xor +syntax keyword coffee_lodash contained create noop transform +" lodash 3.0.0 +syntax keyword coffee_lodash contained isError isMatch isNative isTypedArray toPlainObject +" lodash 4.0.0 +syntax keyword coffee_lodash contained clone cloneDeepWith cloneWith eq gt gte isArrayLike isArrayLikeObject +syntax keyword coffee_lodash contained isEqualWith isInteger isLength isMatchWith isNil isObjectLike isSafeInteger +syntax keyword coffee_lodash contained isSymbol lt lte toInteger toLength toNumber toSafeInteger toString +syntax keyword coffee_lodash contained templateSettings evaluate imports interpolate varible +syntax keyword coffee_lodash contained VERSION + +" lodash 4.0.0 +syntax keyword coffee_math contained add ceil floor max maxBy mean min minBy round subtract sum sumBy +syntax keyword coffee_number contained clamp inRange + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_underscore_coffee_syntax_inits") + if version < 508 + let did_underscore_coffee_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink coffeeunderscore Constant + + HiLink coffee_collections PreProc + HiLink coffee_strings PreProc + HiLink coffee_arrays PreProc + HiLink coffee_functions PreProc + HiLink coffee_objects PreProc + HiLink coffee_utility PreProc + HiLink coffee_chaining PreProc + HiLink coffee_lodash PreProc + HiLink coffee_math PreProc + HiLink coffee_number PreProc + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/underscore.javascript.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/underscore.javascript.vim new file mode 100644 index 0000000..2b50b3d --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/underscore.javascript.vim @@ -0,0 +1,128 @@ +" Vim syntax file +" Language: underscore.js for javascript +" Maintainer: othree +" Last Change: 2016/01/18 +" Version: 1.7.0 +" URL: http://underscorejs.org/ +" LoDash: 4.0.0 +" URL: http://lodash.com/ + +syntax keyword javascriptunderscore _ containedin=ALLBUT,javascriptComment,javascriptLineComment,javascriptString,javascriptTemplate,javascriptTemplateSubstitution +" syntax match javascriptunderscoredot contained /\./ nextgroup=@javascript_Functions +" syntax match javascriptunderscoredot contained /([^)]*)\./ nextgroup=@javascript_Functions + +syntax cluster javascript_Functions contains=javascript_collections,javascript_strings,javascript_arrays,javascript_functions,javascript_objects,javascript_chaining,javascript_utility,javascript_lodash,javascript_math,javascript_number + +syntax match javascript_collections contained /contains/ +syntax keyword javascript_collections contained include +syntax keyword javascript_collections contained each map reduce reduceRight find filter where findWhere +syntax keyword javascript_collections contained reject every some invoke pluck max min sortBy +syntax keyword javascript_collections contained groupBy indexBy countBy shuffle toArray size +syntax keyword javascript_collections contained partition iteratee +" lodash 3.0.0 +syntax keyword javascript_collections contained partition sortByAll includes callback +" lodash 4.0.0 +syntax keyword javascript_collections contained flatMap commit next plant reverse toJSON valueOf +syntax keyword javascript_collections contained forEachRight invokeMap keyBy orderBy sample sampleSize + +" lodash 3.0.0 +syntax keyword javascript_strings contained camelCase capitalize deburr endsWith escapeRegExp +syntax keyword javascript_strings contained kebabCase pad padLeft padRight repeat snakeCase +syntax keyword javascript_strings contained startsWith trim trimLeft trimRight trunc words +" lodash 4.0.0 +syntax keyword javascript_strings contained lowerCase lowerFirst padEnd padStart replace startCase +syntax keyword javascript_strings contained startWith toLower toUpper trimEnd trimStart truncate upperCase +syntax keyword javascript_strings contained upperFirst + +syntax keyword javascript_arrays contained first initial last rest compact flatten without union +syntax keyword javascript_arrays contained intersection difference uniq zip object indextOf +syntax keyword javascript_arrays contained lastIndexOf sortedIndex range +" lodash 3.0.0 +syntax keyword javascript_arrays contained chunk dropRight dropRightWhile dropWhile flattenDeep +syntax keyword javascript_arrays contained pullAt slice sortedLastIndex takeRight takeRightWhile +syntax keyword javascript_arrays contained takeWhile +" lodash 4.0.0 +syntax keyword javascript_arrays contained concat differenceBy differenceWith drop fill findLastIndex +syntax keyword javascript_arrays contained fromPairs head indexOf intersection intersectionBy intersectionWith +syntax keyword javascript_arrays contained join pull pullAll pullAllBy remove slice sortedIndexBy sortedIndexOf +syntax keyword javascript_arrays contained sortedLastIndexBy sortedLastIndexOf sortedUniq sortedUniqBy tail +syntax keyword javascript_arrays contained take takeRightWhile unionBy unionWith uniqBy uniqWith unzipWith +syntax keyword javascript_arrays contained xorBy xorWith zipObject zipWith + +syntax keyword javascript_functions contained bind bindAll partial memoize delay throttle debounce +syntax keyword javascript_functions contained once after before wrap negate compose flow flowRight +" lodash 3.0.0 +syntax keyword javascript_functions contained ary before curryRight negate rearg +syntax keyword javascript_functions contained backflow compose partial cancel +" lodash 4.0.0 +syntax keyword javascript_functions contained curry defer eachRight findLast flip negate overArgs rest spread unary + +syntax keyword javascript_objects contained keys values pairs invert functions extend pick omit +syntax keyword javascript_objects contained defaults clone tap has isEqual isEmpty isElement isArray +syntax keyword javascript_objects contained isObject isArguments isFunction isString isNumber +syntax keyword javascript_objects contained isFinite isBoolean isDate isRegExp isNaN isNull +syntax keyword javascript_objects contained isUndefined property matches +" lodash 3.0.0 +syntax keyword javascript_objects contained keysIn valuesIn assign get set +syntax keyword javascript_objects contained mapKeys +" lodash 4.0.0 +syntax keyword javascript_objects contained assignIn assignInWith assignWith defaultsDeep extendWith +syntax keyword javascript_objects contained findKey findLastKey forIn forInRight forOwn forOwnRight +syntax keyword javascript_objects contained functionsIn hasIn mergeWith omitBy pickBy setWith toPairs +syntax keyword javascript_objects contained toPairsIn transform unset +" +syntax keyword javascript_utility contained noConflict identify times random mixin uniqueId +syntax keyword javascript_utility contained escape unescape result template iteratee noop +" lodash 3.0.0 +syntax keyword javascript_utility contained attempt matches matchesProperty propertyOf constant now +" lodash 4.0.0 +syntax keyword javascript_utility contained cond conforms flow identity matches method methodOf nthArg +syntax keyword javascript_utility contained over overEvery overSome rangeRight times toPath uniqueId + +syntax keyword javascript_chaining contained chain value thru + +syntax keyword javascript_lodash contained at bindKey cloneDeep createCallback findIndex findKey +syntax keyword javascript_lodash contained forEach forIn forOwn isPlainObject merge parseInt partial +syntax keyword javascript_lodash contained partialRight runInContext support unzip where +syntax keyword javascript_lodash contained capitalize match slice trim trimLeft trimRight +syntax keyword javascript_lodash contained constant mapValues now property xor +syntax keyword javascript_lodash contained create noop transform +" lodash 3.0.0 +syntax keyword javascript_lodash contained isError isMatch isNative isTypedArray toPlainObject +" lodash 4.0.0 +syntax keyword javascript_lodash contained clone cloneDeepWith cloneWith eq gt gte isArrayLike isArrayLikeObject +syntax keyword javascript_lodash contained isEqualWith isInteger isLength isMatchWith isNil isObjectLike isSafeInteger +syntax keyword javascript_lodash contained isSymbol lt lte toInteger toLength toNumber toSafeInteger toString +syntax keyword javascript_lodash contained templateSettings evaluate imports interpolate varible +syntax keyword javascript_lodash contained VERSION + +" lodash 4.0.0 +syntax keyword javascript_math contained add ceil floor max maxBy mean min minBy round subtract sum sumBy +syntax keyword javascript_number contained clamp inRange + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_underscore_javascript_syntax_inits") + if version < 508 + let did_underscore_javascript_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink javascriptunderscore Constant + + HiLink javascript_collections PreProc + HiLink javascript_strings PreProc + HiLink javascript_arrays PreProc + HiLink javascript_functions PreProc + HiLink javascript_objects PreProc + HiLink javascript_utility PreProc + HiLink javascript_chaining PreProc + HiLink javascript_lodash PreProc + HiLink javascript_math PreProc + HiLink javascript_number PreProc + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/underscore.ls.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/underscore.ls.vim new file mode 100644 index 0000000..e8dd6b7 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/underscore.ls.vim @@ -0,0 +1,128 @@ +" Vim syntax file +" Language: underscore.js for ls +" Maintainer: othree +" Last Change: 2016/01/18 +" Version: 1.7.0 +" URL: http://underscorejs.org/ +" LoDash: 4.0.0 +" URL: http://lodash.com/ + +syntax keyword lsunderscore _ containedin=ALLBUT,lsComment,lsLineComment,lsString,lsTemplate,lsTemplateSubstitution +" syntax match lsunderscoredot contained /\./ nextgroup=@ls_Functions +" syntax match lsunderscoredot contained /([^)]*)\./ nextgroup=@ls_Functions + +syntax cluster ls_Functions contains=ls_collections,ls_strings,ls_arrays,ls_functions,ls_objects,ls_chaining,ls_utility,ls_lodash,ls_math,ls_number + +syntax match ls_collections contained /contains/ +syntax keyword ls_collections contained include +syntax keyword ls_collections contained each map reduce reduceRight find filter where findWhere +syntax keyword ls_collections contained reject every some invoke pluck max min sortBy +syntax keyword ls_collections contained groupBy indexBy countBy shuffle toArray size +syntax keyword ls_collections contained partition iteratee +" lodash 3.0.0 +syntax keyword ls_collections contained partition sortByAll includes callback +" lodash 4.0.0 +syntax keyword ls_collections contained flatMap commit next plant reverse toJSON valueOf +syntax keyword ls_collections contained forEachRight invokeMap keyBy orderBy sample sampleSize + +" lodash 3.0.0 +syntax keyword ls_strings contained camelCase capitalize deburr endsWith escapeRegExp +syntax keyword ls_strings contained kebabCase pad padLeft padRight repeat snakeCase +syntax keyword ls_strings contained startsWith trim trimLeft trimRight trunc words +" lodash 4.0.0 +syntax keyword ls_strings contained lowerCase lowerFirst padEnd padStart replace startCase +syntax keyword ls_strings contained startWith toLower toUpper trimEnd trimStart truncate upperCase +syntax keyword ls_strings contained upperFirst + +syntax keyword ls_arrays contained first initial last rest compact flatten without union +syntax keyword ls_arrays contained intersection difference uniq zip object indextOf +syntax keyword ls_arrays contained lastIndexOf sortedIndex range +" lodash 3.0.0 +syntax keyword ls_arrays contained chunk dropRight dropRightWhile dropWhile flattenDeep +syntax keyword ls_arrays contained pullAt slice sortedLastIndex takeRight takeRightWhile +syntax keyword ls_arrays contained takeWhile +" lodash 4.0.0 +syntax keyword ls_arrays contained concat differenceBy differenceWith drop fill findLastIndex +syntax keyword ls_arrays contained fromPairs head indexOf intersection intersectionBy intersectionWith +syntax keyword ls_arrays contained join pull pullAll pullAllBy remove slice sortedIndexBy sortedIndexOf +syntax keyword ls_arrays contained sortedLastIndexBy sortedLastIndexOf sortedUniq sortedUniqBy tail +syntax keyword ls_arrays contained take takeRightWhile unionBy unionWith uniqBy uniqWith unzipWith +syntax keyword ls_arrays contained xorBy xorWith zipObject zipWith + +syntax keyword ls_functions contained bind bindAll partial memoize delay throttle debounce +syntax keyword ls_functions contained once after before wrap negate compose flow flowRight +" lodash 3.0.0 +syntax keyword ls_functions contained ary before curryRight negate rearg +syntax keyword ls_functions contained backflow compose partial cancel +" lodash 4.0.0 +syntax keyword ls_functions contained curry defer eachRight findLast flip negate overArgs rest spread unary + +syntax keyword ls_objects contained keys values pairs invert functions extend pick omit +syntax keyword ls_objects contained defaults clone tap has isEqual isEmpty isElement isArray +syntax keyword ls_objects contained isObject isArguments isFunction isString isNumber +syntax keyword ls_objects contained isFinite isBoolean isDate isRegExp isNaN isNull +syntax keyword ls_objects contained isUndefined property matches +" lodash 3.0.0 +syntax keyword ls_objects contained keysIn valuesIn assign get set +syntax keyword ls_objects contained mapKeys +" lodash 4.0.0 +syntax keyword ls_objects contained assignIn assignInWith assignWith defaultsDeep extendWith +syntax keyword ls_objects contained findKey findLastKey forIn forInRight forOwn forOwnRight +syntax keyword ls_objects contained functionsIn hasIn mergeWith omitBy pickBy setWith toPairs +syntax keyword ls_objects contained toPairsIn transform unset +" +syntax keyword ls_utility contained noConflict identify times random mixin uniqueId +syntax keyword ls_utility contained escape unescape result template iteratee noop +" lodash 3.0.0 +syntax keyword ls_utility contained attempt matches matchesProperty propertyOf constant now +" lodash 4.0.0 +syntax keyword ls_utility contained cond conforms flow identity matches method methodOf nthArg +syntax keyword ls_utility contained over overEvery overSome rangeRight times toPath uniqueId + +syntax keyword ls_chaining contained chain value thru + +syntax keyword ls_lodash contained at bindKey cloneDeep createCallback findIndex findKey +syntax keyword ls_lodash contained forEach forIn forOwn isPlainObject merge parseInt partial +syntax keyword ls_lodash contained partialRight runInContext support unzip where +syntax keyword ls_lodash contained capitalize match slice trim trimLeft trimRight +syntax keyword ls_lodash contained constant mapValues now property xor +syntax keyword ls_lodash contained create noop transform +" lodash 3.0.0 +syntax keyword ls_lodash contained isError isMatch isNative isTypedArray toPlainObject +" lodash 4.0.0 +syntax keyword ls_lodash contained clone cloneDeepWith cloneWith eq gt gte isArrayLike isArrayLikeObject +syntax keyword ls_lodash contained isEqualWith isInteger isLength isMatchWith isNil isObjectLike isSafeInteger +syntax keyword ls_lodash contained isSymbol lt lte toInteger toLength toNumber toSafeInteger toString +syntax keyword ls_lodash contained templateSettings evaluate imports interpolate varible +syntax keyword ls_lodash contained VERSION + +" lodash 4.0.0 +syntax keyword ls_math contained add ceil floor max maxBy mean min minBy round subtract sum sumBy +syntax keyword ls_number contained clamp inRange + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_underscore_ls_syntax_inits") + if version < 508 + let did_underscore_ls_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink lsunderscore Constant + + HiLink ls_collections PreProc + HiLink ls_strings PreProc + HiLink ls_arrays PreProc + HiLink ls_functions PreProc + HiLink ls_objects PreProc + HiLink ls_utility PreProc + HiLink ls_chaining PreProc + HiLink ls_lodash PreProc + HiLink ls_math PreProc + HiLink ls_number PreProc + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/underscore.typescript.vim b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/underscore.typescript.vim new file mode 100644 index 0000000..1522942 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/underscore.typescript.vim @@ -0,0 +1,128 @@ +" Vim syntax file +" Language: underscore.js for typescript +" Maintainer: othree +" Last Change: 2016/01/18 +" Version: 1.7.0 +" URL: http://underscorejs.org/ +" LoDash: 4.0.0 +" URL: http://lodash.com/ + +syntax keyword typescriptunderscore _ containedin=ALLBUT,typescriptComment,typescriptLineComment,typescriptString,typescriptTemplate,typescriptTemplateSubstitution +" syntax match typescriptunderscoredot contained /\./ nextgroup=@typescript_Functions +" syntax match typescriptunderscoredot contained /([^)]*)\./ nextgroup=@typescript_Functions + +syntax cluster typescript_Functions contains=typescript_collections,typescript_strings,typescript_arrays,typescript_functions,typescript_objects,typescript_chaining,typescript_utility,typescript_lodash,typescript_math,typescript_number + +syntax match typescript_collections contained /contains/ +syntax keyword typescript_collections contained include +syntax keyword typescript_collections contained each map reduce reduceRight find filter where findWhere +syntax keyword typescript_collections contained reject every some invoke pluck max min sortBy +syntax keyword typescript_collections contained groupBy indexBy countBy shuffle toArray size +syntax keyword typescript_collections contained partition iteratee +" lodash 3.0.0 +syntax keyword typescript_collections contained partition sortByAll includes callback +" lodash 4.0.0 +syntax keyword typescript_collections contained flatMap commit next plant reverse toJSON valueOf +syntax keyword typescript_collections contained forEachRight invokeMap keyBy orderBy sample sampleSize + +" lodash 3.0.0 +syntax keyword typescript_strings contained camelCase capitalize deburr endsWith escapeRegExp +syntax keyword typescript_strings contained kebabCase pad padLeft padRight repeat snakeCase +syntax keyword typescript_strings contained startsWith trim trimLeft trimRight trunc words +" lodash 4.0.0 +syntax keyword typescript_strings contained lowerCase lowerFirst padEnd padStart replace startCase +syntax keyword typescript_strings contained startWith toLower toUpper trimEnd trimStart truncate upperCase +syntax keyword typescript_strings contained upperFirst + +syntax keyword typescript_arrays contained first initial last rest compact flatten without union +syntax keyword typescript_arrays contained intersection difference uniq zip object indextOf +syntax keyword typescript_arrays contained lastIndexOf sortedIndex range +" lodash 3.0.0 +syntax keyword typescript_arrays contained chunk dropRight dropRightWhile dropWhile flattenDeep +syntax keyword typescript_arrays contained pullAt slice sortedLastIndex takeRight takeRightWhile +syntax keyword typescript_arrays contained takeWhile +" lodash 4.0.0 +syntax keyword typescript_arrays contained concat differenceBy differenceWith drop fill findLastIndex +syntax keyword typescript_arrays contained fromPairs head indexOf intersection intersectionBy intersectionWith +syntax keyword typescript_arrays contained join pull pullAll pullAllBy remove slice sortedIndexBy sortedIndexOf +syntax keyword typescript_arrays contained sortedLastIndexBy sortedLastIndexOf sortedUniq sortedUniqBy tail +syntax keyword typescript_arrays contained take takeRightWhile unionBy unionWith uniqBy uniqWith unzipWith +syntax keyword typescript_arrays contained xorBy xorWith zipObject zipWith + +syntax keyword typescript_functions contained bind bindAll partial memoize delay throttle debounce +syntax keyword typescript_functions contained once after before wrap negate compose flow flowRight +" lodash 3.0.0 +syntax keyword typescript_functions contained ary before curryRight negate rearg +syntax keyword typescript_functions contained backflow compose partial cancel +" lodash 4.0.0 +syntax keyword typescript_functions contained curry defer eachRight findLast flip negate overArgs rest spread unary + +syntax keyword typescript_objects contained keys values pairs invert functions extend pick omit +syntax keyword typescript_objects contained defaults clone tap has isEqual isEmpty isElement isArray +syntax keyword typescript_objects contained isObject isArguments isFunction isString isNumber +syntax keyword typescript_objects contained isFinite isBoolean isDate isRegExp isNaN isNull +syntax keyword typescript_objects contained isUndefined property matches +" lodash 3.0.0 +syntax keyword typescript_objects contained keysIn valuesIn assign get set +syntax keyword typescript_objects contained mapKeys +" lodash 4.0.0 +syntax keyword typescript_objects contained assignIn assignInWith assignWith defaultsDeep extendWith +syntax keyword typescript_objects contained findKey findLastKey forIn forInRight forOwn forOwnRight +syntax keyword typescript_objects contained functionsIn hasIn mergeWith omitBy pickBy setWith toPairs +syntax keyword typescript_objects contained toPairsIn transform unset +" +syntax keyword typescript_utility contained noConflict identify times random mixin uniqueId +syntax keyword typescript_utility contained escape unescape result template iteratee noop +" lodash 3.0.0 +syntax keyword typescript_utility contained attempt matches matchesProperty propertyOf constant now +" lodash 4.0.0 +syntax keyword typescript_utility contained cond conforms flow identity matches method methodOf nthArg +syntax keyword typescript_utility contained over overEvery overSome rangeRight times toPath uniqueId + +syntax keyword typescript_chaining contained chain value thru + +syntax keyword typescript_lodash contained at bindKey cloneDeep createCallback findIndex findKey +syntax keyword typescript_lodash contained forEach forIn forOwn isPlainObject merge parseInt partial +syntax keyword typescript_lodash contained partialRight runInContext support unzip where +syntax keyword typescript_lodash contained capitalize match slice trim trimLeft trimRight +syntax keyword typescript_lodash contained constant mapValues now property xor +syntax keyword typescript_lodash contained create noop transform +" lodash 3.0.0 +syntax keyword typescript_lodash contained isError isMatch isNative isTypedArray toPlainObject +" lodash 4.0.0 +syntax keyword typescript_lodash contained clone cloneDeepWith cloneWith eq gt gte isArrayLike isArrayLikeObject +syntax keyword typescript_lodash contained isEqualWith isInteger isLength isMatchWith isNil isObjectLike isSafeInteger +syntax keyword typescript_lodash contained isSymbol lt lte toInteger toLength toNumber toSafeInteger toString +syntax keyword typescript_lodash contained templateSettings evaluate imports interpolate varible +syntax keyword typescript_lodash contained VERSION + +" lodash 4.0.0 +syntax keyword typescript_math contained add ceil floor max maxBy mean min minBy round subtract sum sumBy +syntax keyword typescript_number contained clamp inRange + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_underscore_typescript_syntax_inits") + if version < 508 + let did_underscore_typescript_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink typescriptunderscore Constant + + HiLink typescript_collections PreProc + HiLink typescript_strings PreProc + HiLink typescript_arrays PreProc + HiLink typescript_functions PreProc + HiLink typescript_objects PreProc + HiLink typescript_utility PreProc + HiLink typescript_chaining PreProc + HiLink typescript_lodash PreProc + HiLink typescript_math PreProc + HiLink typescript_number PreProc + + delcommand HiLink +endif diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/update.sh b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/update.sh new file mode 100755 index 0000000..8a0672e --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/autoload/syntax/update.sh @@ -0,0 +1,7 @@ +for filetype in 'coffee' 'ls' 'typescript' +do + for lib in 'jquery' 'underscore' 'backbone' 'prelude' 'angularjs' 'angularuirouter' 'requirejs' 'sugar' 'jasmine' 'chai' 'react' 'flux' 'handlebars' + do + sed "s/javascript/$filetype/g" $lib.javascript.vim > $lib.$filetype.vim + done +done diff --git a/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/config.mk b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/config.mk new file mode 100644 index 0000000..2c4980e --- /dev/null +++ b/etc/soft/vim/vim/+plugins/javascript-libraries-syntax.vim/config.mk @@ -0,0 +1,6 @@ +NAME=javascript-libraries-syntax.vim +VERSION=0.4 + +bundle-deps: + $(call fetch_github,ID,REPOSITORY,BRANCH,PATH,TARGET_PATH) + $(call fetch_url,FILE_URL,TARGET_PATH) diff --git a/etc/soft/vim/vim/+plugins/vimple b/etc/soft/vim/vim/+plugins/vimple deleted file mode 160000 index 48eb1b3..0000000 --- a/etc/soft/vim/vim/+plugins/vimple +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 48eb1b343684c9db3835209757095050bc501824 diff --git a/etc/soft/vim/vim/+plugins/vimple/README b/etc/soft/vim/vim/+plugins/vimple/README new file mode 100644 index 0000000..12456bd --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/README @@ -0,0 +1,148 @@ +Vimple +------ + +__Pacifying Vimmers__ + +++Version 0.9 -- Lil' Vimmer++ + +http://of-vim-and-vigor.blogspot.com/2012/03/pacifying-vimmers.html[Ad] + +Perhaps most usefully, Vimple provides a few maps and commands to make +the casual vimmer's life a little easier, such as: + +=== `:View ex-command` + +Opens a split with the output of `ex-command`. + +=== `z=` + +Shows spelling suggestions in an overlay window. Pressing `` +will replace the word under the cursor in the original window with the +current word under the cursor in the overlay. + +Use `vimple_spell_suggest` if you want to map this behaviour +to a differnt key. + +=== `[I` + +Shows identifier search results in an overlay window. Pressing `` +will jump to the associated line of the identifier under the cursor. + +Use `vimple_ident_search` if you want to map this behaviour +to a differnt key. + +=== `g]` + +Shows tag search results in an overlay window. Pressing `` +will jump to the associated line of the tag under the cursor. + +Use `vimple_tag_search` if you want to map this behaviour +to a differnt key. + +=== `SCall( script , function , arg )` + +A function which calls script-local `function` in `script` +with arguments `arg`. This lets you call `` / `s:` +functions by script name rather than SNR (script-number). + +=== `:Silently ex-command` + +Performs the series of bar-separated ex-commands silently. + +=== `:QFdo ex-command` + +Performs the series of bar-separated ex-commands over the buffers in the QuickFix list. + +NOTE: The location-list analogue is `:LLdo` + +=== `:BufTypeDo type ex-commands` + +Performs the series of bar-separated ex-commands over the buffers of the given +type+. + +=== `:BufMatchDo pattern ex-commands` + +Performs the series of bar-separated ex-commands over the buffers with names matching +pattern+. + +=== `:Collect register-or-variable ex-command` + +Saves the output of `ex-command` into the specified register +or variable. + +=== `Collect('register-or-variable ex-command')` + +Saves the output of `ex-command` into the specified register +or variable and returns the output for further use in +expressions. + +=== `GCollect( pattern )` + +Uses `pattern` in a `:global /pattern/` command and returns +the results as a list of lines. + + :echo GCollect('^\s*===\s*') + +=== `GCCollect( pattern )` + +Uses `pattern` in a `:global /pattern/` command and returns +the results as a list of lines with the `pattern` stripped. + + :echo GCCollect('^\s*===\s*') + +=== `:MyMaps` + +Shows your currently active |:map|s and |:imap|s in a new buffer. :MyMaps +attempts to group related maps to more easily allow you to create a custom map +layout for your various |'filetype'|s. + +=== `Scope()` + +The Scope() function attempts to show the current function or +class/method scope. Some people like to display this information in +their `statusline`, like: + + set statusline=%f%m%r%h%w\ [%n:%{&ff}/%Y]\%{Scope()}%=[0x\%04.4B][%03v][%p%%\ line\ %l\ of\ %L] + +Currently only Vim & Python (and Python only for testing purposes, created by a NON Pythonista -- patches welcome) have been implemented, but it is very easy for you to write scope functions for your own filetypes. Take Ruby for example: Create `~/.vim/ftplugin/ruby_scope.vim` like this: + +---- +function! Scope_ruby() + let class_scope = scope#inspect('^\s*class\s\+\([a-zA-Z0-9_.]\+\)', '^\s*end') + let method_scope = scope#inspect('^\s*def\s\+\([a-zA-Z0-9_.]\+\)', '^\s*end') + return ' ' . join(map(class_scope.stack, 'v:val.head_line_number . "," . v:val.tail_line_number . " " . v:val.head_string'), ' :: ') + \. ' >> ' . join(map(method_scope.stack, 'v:val.head_line_number . "," . v:val.tail_line_number . " " . v:val.head_string'), ' > ') +endfunction +---- + +NOTE: The above example for Ruby is woefully inadequate. A better effect +might be achievable with more context in the regex patterns. The +patterns in `syntax/ruby.vim` might be useful. Parsing with regex is futile. + +=== Composable Completions + +By default, `jj` in insert mode activates a user-extendible +meta-completion list. The default list includes abbreviations (if you +have https://github.com/dahu/Aboriginal), some date-time patterns and +the built-in dictionary completion (``). + +The default `jj` can be overridden like this: + + imap vimple_completers_trigger + +Vimple also provides VimLOO (Object Oriented VimL) objects +for these read-only ++:ex++ commands: + +* ++:ls++ -- vimple#bl +* ++:scriptnames++ -- vimple#sn +* ++:highlight++ -- vimple#hl +* ++:version++ -- vimple#vn +* ++:marks++ -- vimple#ma +* ++:undolist++ -- vimple#ul +* ++:maps++ -- vimple#mp + +NOTE: The awesome plugin +https://github.com/Raimondi/vim-buffalo[buffalo] uses the +`vimple#bl` object. + +In addition to these existing ++:ex++ wrappers, Vimple allows +developers to craft their own objects too. See autoload/vimple/*.vim +for examples. diff --git a/etc/soft/vim/vim/+plugins/vimple/autoload/args.vim b/etc/soft/vim/vim/+plugins/vimple/autoload/args.vim new file mode 100644 index 0000000..7709c65 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/autoload/args.vim @@ -0,0 +1,107 @@ +function! args#merge_dict(initial, ...) + let dict = a:initial + for arg in a:000 + if type(arg) == type({}) + call extend(dict, arg) + elseif type(arg) == type('') + if exists(arg) + call extend(dict, eval(arg)) + endif + elseif type(arg) == type([]) + if ! empty(arg[0]) + if has_key(arg[0][arg[1]], arg[2]) + call extend(dict, get(arg[0][arg[1]], arg[2])) + endif + endif + else + echohl Warning + echom 'args#merge_dict: Unhandled type: ' . type(arg) + echohl None + endif + unlet arg + endfor + return dict +endfunction + +function! args#merge_string(initial, ...) + let str = a:initial + for arg in a:000 + if type(arg) == type('') + if exists(arg) + let str = eval(arg) + endif + elseif type(arg) == type([]) + if ! empty(arg[0]) + if has_key(arg[0][arg[1]], arg[2]) + let str = get(arg[0][arg[1]], arg[2]) + endif + endif + else + echohl Warning + echom 'args#merge_string: Unhandled type: ' . type(arg) + echohl None + endif + unlet arg + endfor + return str +endfunction + +function! args#merge(initial, ...) + let initial = a:initial + let type = type(initial) + if type == type({}) + return call('args#merge_dict', [initial] + a:000) + elseif type == type('') + return call('args#merge_string', [initial] + a:000) + else + echohl Warning + echom 'args#merge: Unhandled type: ' . type + echohl None + end +endfunction + +if expand('%:p') == expand(':p') + " TEST string merge + + func! args#test_merge_2(...) + return args#merge( + \ 'override me' + \, 'g:default' + \, 'g:default_2' + \, [a:000, 0, 'my_default'] + \) + endfunc + + let default = 'default' + silent! unlet default_2 + echo 'default' == args#test_merge_2() + + let default_2 = 'default 2' + echo 'default 2' == args#test_merge_2() + + echo 'my default' == args#test_merge_2({'my_default' : 'my default'}) + + " TEST dict merge + + let default_styles = { + \ 'one' : 1 + \, 'two' : 2 + \, 'three' : 3 + \} + + func! args#test_merge_1(...) + return args#merge( + \ {} + \, g:default_styles + \, 'g:default_styles_2' + \, [a:000, 0, 'my_styles'] + \) + endfunc + + silent! unlet g:default_styles_2 + echo default_styles == args#test_merge_1() + echo default_styles != args#test_merge_1({'my_styles': {'one' : 4}}) + echo {'one' : 4, 'two' : 2, 'three' : 3} == args#test_merge_1({'my_styles' : {'one' : 4}}) + let g:default_styles_2 = {'one' : 5} + echo {'one' : 5, 'two' : 2, 'three' : 3} == args#test_merge_1() +endif diff --git a/etc/soft/vim/vim/+plugins/vimple/autoload/complete.vim b/etc/soft/vim/vim/+plugins/vimple/autoload/complete.vim new file mode 100644 index 0000000..e7859c7 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/autoload/complete.vim @@ -0,0 +1,67 @@ +let s:old_cfu = '' + +function! complete#reset() + let &completefunc = s:old_cfu + let s:old_cfu = '' + augroup CompleteTrigger + au! + augroup END +endfunction + +function! complete#trigger(func) + if s:old_cfu == '' + let s:old_cfu = &completefunc + endif + let &completefunc = a:func + augroup CompleteTrigger + au! + au CursorMovedI * call complete#reset() + augroup END + return "\\" +endfunction + +" Example Completers +"------------------- +" +function! complete#short_files_in_path(findstart, base) + if a:findstart + let line = getline('.') + let start = col('.') - 1 + while start > 0 && line[start - 1] =~ '\f' + let start -= 1 + endwhile + return start + else + let res = map(globpath(&path, a:base . '*', 0, 1) + \, 'fnamemodify(v:val, ":t")') + return res + endif +endfunction + +function! complete#files_in_path(findstart, base) + if a:findstart + let line = getline('.') + let start = col('.') - 1 + while start > 0 && line[start - 1] =~ '\f' + let start -= 1 + endwhile + return start + else + let res = map(globpath(&path, a:base . '*', 0, 1) + \, 'substitute(v:val, "^\.\/", "", "")') + return res + endif +endfunction + +function! complete#foist(findstart, base) + if a:findstart + return 0 + else + let base = matchstr(a:base, '^\s*\zs.*\ze\s*$') + let all_buf_lines = [] + let curbuf = bufnr('%') + silent bufdo call extend(all_buf_lines, getline(1, '$')) + exe "buffer " . curbuf + return filter(all_buf_lines, 'stridx(v:val, base) > -1') + endif +endfunction diff --git a/etc/soft/vim/vim/+plugins/vimple/autoload/completers.vim b/etc/soft/vim/vim/+plugins/vimple/autoload/completers.vim new file mode 100644 index 0000000..7adf131 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/autoload/completers.vim @@ -0,0 +1,73 @@ +let completers#completers = [ + \ {'word': "\\", 'abbr': 'abbreviation'} + \, {'word': "\\", 'abbr': 'datetime'} + \, {'word': "\\", 'abbr': 'dictionary'} + \] + +function! completers#trigger(findstart, base) + if a:findstart + let line = getline('.') + let start = col('.') - 1 + while start > 0 && line[start-1] =~ '\w' + let start -= 1 + endwhile + let b:completers_start = start + return start + else + augroup AfterCompleters + au! + au CompleteDone * call completers#apply_completion() + augroup END + return map(deepcopy(g:completers#completers), 'extend(v:val, {"word" : a:base . get(v:val, "word")})') + endif +endfunction + +function! completers#apply_completion() + augroup AfterCompleters + au! + augroup END + let reg_un = @@ + exe 'normal! d' . (b:completers_start + 1) . '|' + if col('.') == (col('$')-1) && col('.') != 1 + let @@ = ' ' . @@ + endif + call feedkeys(@@) + let @@ = reg_un +endfunction + +function! completers#datetime(findstart, base) + if a:findstart + let line = getline('.') + let start = col('.') - 1 + while start > 0 && line[start - 1] =~ '[a-zA-Z0-9-./]' + let start -= 1 + endwhile + return start + else + let now = localtime() + let datetimes = [] + for ts in ['%c', '%Y %b %d %X', '%Y%m%d %T', '%Y-%m-%d', '%Y%m%d', '%H:%M'] + call add(datetimes, strftime(ts, now)) + endfor + return filter(datetimes, 'v:val =~ "^" . a:base') + endif +endfunction + +function! completers#abbrevs(findstart, base) + if exists('*CompleteAbbrevs') + return CompleteAbbrevs(a:findstart, a:base) + else + echohl Error + echom 'Requires https://github.com/dahu/Aboriginal' + echohl NONE + endif +endfunction + +function! completers#init() + inoremap vimple_completers_trigger complete#trigger('completers#trigger') + if !hasmapto('vimple_completers_trigger', 'i') + imap jj vimple_completers_trigger + endif + inoremap complete#trigger('completers#abbrevs') + inoremap complete#trigger('completers#datetime') +endfunction diff --git a/etc/soft/vim/vim/+plugins/vimple/autoload/file.vim b/etc/soft/vim/vim/+plugins/vimple/autoload/file.vim new file mode 100644 index 0000000..7ce32ed --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/autoload/file.vim @@ -0,0 +1,3 @@ +function! file#read(file) + return filereadable(a:file) ? readfile(a:file) : [] +endfunction diff --git a/etc/soft/vim/vim/+plugins/vimple/autoload/list.vim b/etc/soft/vim/vim/+plugins/vimple/autoload/list.vim new file mode 100644 index 0000000..656c2a1 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/autoload/list.vim @@ -0,0 +1,208 @@ +" list#flat([elem, ...]) {{{1 +" +" Flatten the arguments into a single list. +" +" given: a = ['a', 'b'] +" b = [1, 2] +" list#flat(a,b) : ['a', 'b', 1, 2] +" +function! list#flat(...) + let fl = [] + let list = a:000 + if a:0 == 1 + let list = list[0] + endif + for el in list + if type(el) == type([]) + call extend(fl, list#flat(el)) + else + call extend(fl, [el]) + endif + unlet el + endfor + return fl +endfunction + +function! list#split(list, match) + let ret = [] + let r = [] + for e in a:list + if e =~ a:match + call add(ret, r) + let r = [] + else + call add(r, e) + endif + endfor + call add(ret, r) + return ret +endfunction + +" list#zip(list_a, list_b, method) {{{1 +" +" Join each element of list_a with the corresponding element of list_b +" Use the third argument, method, to dictate how the elements should be +" combined: +" given: a = [a, b] +" b = [1, 2] +" 0 = flattened list : [a, 1, b, 2] +" 1 = list groups : [[a, 1], [b, 2]] +" x = join separator x : [ax1, bx2] +" +" NOTE: If one list is longer than the other, the tail of that list is added +" to the result. +function! list#zip(a, b, ...) + let method = 1 + if a:0 + let method = a:1 + endif + let i = 0 + let r = [] + let l_a = len(a:a) + let l_b = len(a:b) + let n = min([len(a:a), len(a:b)]) + while i < n + if method == "0" + call add(r, a:a[i]) + call add(r, a:b[i]) + elseif method == "1" + call add(r, [a:a[i], a:b[i]]) + else + call add(r, join([a:a[i], a:b[i]], method)) + endif + let i+= 1 + endwhile + if l_a == l_b + return r + elseif l_a > l_b + exe "return r + a:a[" . n . ":]" + else + exe "return r + a:b[" . n . ":]" + endif +endfunction "}}}1 + +" list#inject(list, init, funcref) +function! list#inject(list, init, funcref) + if ! exists('*' . a:funcref) + throw 'vimple: list#inject(): Funcref ' . a:funcref . ' does not exist!' + return a:init + elseif empty(a:list) + return a:init + else + let i = a:list[0] + let r = a:list[1:-1] + let v = call(a:funcref, [a:init, i]) + return list#inject(r, v, a:funcref) + endif +endf + +" partition list into count-element sublists +function! list#partition(list, count) + let lst = deepcopy(a:list) + let len = len(lst) + let cnt = a:count + let newlists = [] + if cnt <= 0 + throw 'vimple: list#partition: count must be positive' + endif + if cnt >= len + return lst + endif + for idx in range(0, len - 1, cnt) + if cnt > len(lst) + let cnt = len(lst) + endif + call add(newlists, remove(lst, 0, (cnt - 1))) + endfor + return newlists +endfunc + +" partition list into cols sublists and join with colsep=\t +" list#lspread(list, cols, colsep="\t") +" returns a list +function! list#lspread(list, cols, ...) + let colsep = "\t" + if a:0 + let colsep = a:1 + endif + return map(list#partition(a:list, a:cols), 'join(v:val, "' . escape(colsep, '"') . '")') +endfunction + +" partition list into cols sublists and join with col and row seps +" list#spread(list, cols, colsep, rowsep) +" returns a string +function! list#spread(list, cols, ...) + let colsep = "\t" + let rowsep = "\n" + if a:0 + if a:0 == 2 + let colsep = a:1 + let rowsep = a:2 + else + let colsep = a:1 + endif + endif + return join(list#lspread(a:list, a:cols, colsep), rowsep) +endfunction + +" " map expr over each element of each sublist of list +" function! list#lmap(list, expr) +" return map(a:list, 'map(v:val, ''' . a:expr . ''')') +" endfunction + +function! list#shuffle(a) + let b = deepcopy(a:a) + let n = 0 + let length = len(b) + while n < length + let tmp = b[n] + let dst = rng#rand() % length + let b[n] = b[dst] + let b[dst] = tmp + let n += 1 + endwhile + return b +endfunction + +" list#paste(a, b, join, sep) +" Emulate the unix paste command +" Arguments: +" a - each of 'a' and 'b' are lists, or +" b - strings containing 'sep' (default='\n') delimited elements +" join - separator (default=' ') to use when joining each respective line of +" a and b +" sep - separator (default='\n') to use when splitting a and b (if strings) +" e.g. +" ------v yank following into register a - "a3yy +" one +" two +" three +" ------v yank following into register b - "b3yy +" satu +" dua +" tiga +" call append('.', Paste(@a, @b)) +function! list#paste(a, b, ...) + let join = (a:0 >= 1) ? a:1 : ' ' + let sep = (a:0 == 2) ? a:2 : '\n' + if type(a:a) == 1 + let a = split(a:a, sep) + let b = split(a:b, sep) + else + let a = a:a + let b = a:b + end + return list#zip(a, b, join) +endfunction + +" list#lrotate(array) +" Perform a Left Rotate on array +function! list#lrotate(a) + return extend(a:a[1:-1], [a:a[0]]) +endfunction + +" list#rrotate(array) +" Perform a Right Rotate on array +function! list#rrotate(a) + return extend([a:a[-1]], a:a[0:-2]) +endfunction diff --git a/etc/soft/vim/vim/+plugins/vimple/autoload/loclist.vim b/etc/soft/vim/vim/+plugins/vimple/autoload/loclist.vim new file mode 100644 index 0000000..8993b13 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/autoload/loclist.vim @@ -0,0 +1,21 @@ +" location-list niceties (copied from autoload/loclist.vim) +" Barry Arthur, Mar 2015 + +function! loclist#bufnames() + return uniq(sort(map(getloclist(0), 'bufname(v:val.bufnr)'))) +endfunction + +function! loclist#to_args(global) + let global = !empty(a:global) + let arg_cmd = global ? 'args ' : 'arglocal ' + exe arg_cmd . join(map(loclist#bufnames(), 'escape(v:val, " ")'), ' ') +endfunction + +function! loclist#do(cmd) + " create a new window so as not to interfere with user's arglist + split + call loclist#to_args(0) " 0 == local not global + exe 'argdo ' . a:cmd + close +endfunction + diff --git a/etc/soft/vim/vim/+plugins/vimple/autoload/ml/bayes.vim b/etc/soft/vim/vim/+plugins/vimple/autoload/ml/bayes.vim new file mode 100644 index 0000000..1937521 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/autoload/ml/bayes.vim @@ -0,0 +1,91 @@ +function! s:as_category(category) + return toupper(substitute(a:category, '_', ' ', 'g')) +endfunction + +function! s:sort_numerically(a, b) + return (a:a[1] - a:b[1]) > 0 +endfunction + +" function! s:beyes_base() + +" return obj +" endfunction + +function! ml#beyes#new(category, ...) + " let obj = s:beyes_base() + + let obj = {} + let obj.categories = {} + let obj.words = 0 + let obj.counts = {} + let obj.word_count = {} + + func obj.add_category(category) + let arg_type = type(a:category) + if arg_type == type({}) + call extend(self.categories, a:category) + elseif arg_type == type([]) + for c in a:category + call self.add_category(c) + endfor + elseif arg_type == type('') || type(0) || type(0.0) + let self.categories[s:as_category(a:category)] = {} + else + echoerr 'ml#beyes#add_category Error: Unable to handle argument type ' . type(a:category) . ' for argument ' . string(a:category) + endif + endfunc + + func obj.train(category, text) + let category = s:as_category(a:category) + let self.word_count[category] = get(self.word_count, category, 0) + let self.counts[category] = get(self.counts, category, 0) + 1 + for [word, cnt] in items(string#words(a:text)) + let self.categories[category][word] = get(self.categories[category], word, 0) + cnt + let self.word_count[category] += cnt + let self.words += cnt + endfor + return self + endfunc + + " Returns the scores in each category of the provided `text`, eg: + " {"Uninteresting" : -12.6997928013932, "Interesting" : -18.4206807439524} + " The score closest to 0 is the one picked out by classify() + func obj.classifications(text) + let scores = {} + let training_count = 0.0 + for cnt in values(self.counts) + let training_count += cnt + endfor + for [category, words] in items(self.categories) + let scores[category] = 0 + let total = get(self.word_count, category, 1) * 1.0 + for [word, cnt] in items(string#words(a:text)) + let scores[category] += log(get(words, word, 0.1) / total) + endfor + " add in prior probability for the category + let scores[category] += log(get(self.counts, category, 0.1) / training_count) + endfor + return scores + endfunc + + func obj.classify(text) + " return sort(items(self.classifications(a:text)), 's:sort_numerically') + return sort(items(self.classifications(a:text)), 's:sort_numerically')[0][0] + endfunc + + + call obj.add_category(a:category) + if a:0 + for c in a:000 + call obj.add_category(c) + endfor + endif + + return obj +endfunction + +" let b = ml#beyes#new('yes', 'no') +" call b.train('yes', 'this is something good') +" call b.train('no', 'this is something bad and full of hate') +" echo b.classifications('something to hate you with') +" echo b.classify('something to hate you with') diff --git a/etc/soft/vim/vim/+plugins/vimple/autoload/ml/porter.vim b/etc/soft/vim/vim/+plugins/vimple/autoload/ml/porter.vim new file mode 100644 index 0000000..02833f6 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/autoload/ml/porter.vim @@ -0,0 +1,196 @@ +" Porter stemmer in VimL. +" +" Taken from: +" http://burakkanber.com/blog/machine-learning-full-text-search-in-javascript-relevance-scoring/ +" Which referenced: +" Porter, 1980, An algorithm for suffix stripping, Program, Vol. 14, +" no. 3, pp 130-137, +" +" see also http://www.tartarus.org/~martin/PorterStemmer + +let s:step2list = { + \ "ational" : "ate" + \, "tional" : "tion" + \, "enci" : "ence" + \, "anci" : "ance" + \, "izer" : "ize" + \, "bli" : "ble" + \, "alli" : "al" + \, "entli" : "ent" + \, "eli" : "e" + \, "ousli" : "ous" + \, "ization" : "ize" + \, "ation" : "ate" + \, "ator" : "ate" + \, "alism" : "al" + \, "iveness" : "ive" + \, "fulness" : "ful" + \, "ousness" : "ous" + \, "aliti" : "al" + \, "iviti" : "ive" + \, "biliti" : "ble" + \, "logi" : "log" + \} + +let s:step3list = { + \ "icate" : "ic" + \, "ative" : "" + \, "alize" : "al" + \, "iciti" : "ic" + \, "ical" : "ic" + \, "ful" : "" + \, "ness" : "" + \} + +let s:c = "[^aeiou]" " consonant +let s:v = "[aeiouy]" " vowel +let s:C = s:c . "[^aeiouy]*" " consonant sequence +let s:V = s:v . "[aeiou]*" " vowel sequence + +let s:mgr0 = '^\(' . s:C . '\)\?' . s:V . s:C " [C]VC... is m>0 +let s:meq1 = '^\(' . s:C . '\)\?' . s:V . s:C . '\(' . s:V . '\)\?$' " [C]VC[V] is m=1 +let s:mgr1 = '^\(' . s:C . '\)\?' . s:V . s:C . s:V . s:C " [C]VCVC... is m>1 +let s:s_v = '^\(' . s:C . '\)\?' . s:v " vowel in stem + +function! s:p(s) + return + echom string(a:s) +endfunction + +function! ml#porter#stemmer(w) + let w = a:w + + if len(w) < 3 + return w + endif + + let firstch = w[0] + if firstch == 'y' + let w = 'Y' . w[1:] + endif + + " Step 1a + let re = '^\(.\{-}\)\(ss\|i\)es$' + let re2 = '^\(.\{-}\)\([^s]\)s$' + + if w =~ re + let w = substitute(w, re, '\1\2', '') + elseif w =~ re2 + let w = substitute(w, re2, '\1\2', '') + endif + + call s:p(w) + + " Step 1b + let re = '^\(.\{-}\)eed$' + let re2 = '^\(.\{-}\)\(ed\|ing\)$' + + if w =~ re + let fp = matchlist(w, re) + let re = s:mgr0 + if fp[1] =~ re + let re = '.$' + let w = substitute(w, re, '', '') + endif + elseif w =~ re2 + let fp = matchlist(w, re2) + let stem = fp[1] + let re2 = s:s_v + if stem =~ re2 + let w = stem + let re2 = '\(at\|bl\|iz\)$' + let re3 = '\([^aeiouylsz]\)\1$' + let re4 = '^' . s:C . s:v . '[^aeiouwxy]$' + if w =~ re2 + let w = w . 'e' + elseif w =~ re3 + let re = '.$' + let w = substitute(w, re, '', '') + elseif w =~ re4 + let w = w . 'e' + endif + endif + endif + + " Step 1c + let re = '^\(.\{-}\)y$' + if w =~ re + let fp = matchlist(w, re) + let stem = fp[1] + let re = s:s_v + if stem =~ re + let w = stem . 'i' + endif + endif + + " Step 2 + let re = '^\(.\{-}\)\(ational\|tional\|enci\|anci\|izer\|bli\|alli\|entli\|eli\|ousli\|ization\|ation\|ator\|alism\|iveness\|fulness\|ousness\|aliti\|iviti\|biliti\|logi\)$' + if w =~ re + let fp = matchlist(w, re) + let stem = fp[1] + let suffix = fp[2] + let re = s:mgr0 + if stem =~ re + let w = stem . s:step2list[suffix] + endif + endif + + " Step 3 + let re = '^\(.\{-}\)\(icate\|ative\|alize\|iciti\|ical\|ful\|ness\)$' + if w =~ re + let fp = matchlist(w, re) + let stem = fp[1] + let suffix = fp[2] + let re = s:mgr0 + if stem =~ re + let w = stem . s:step3list[suffix] + endif + endif + + " Step 4 + let re = '^\(.\{-}\)\(al\|ance\|ence\|er\|ic\|able\|ible\|ant\|ement\|ment\|ent\|ou\|ism\|ate\|iti\|ous\|ive\|ize\)$' + let re2 = '^\(.\{-}\)\(s\|t\)\(ion\)$' + if w =~ re + let fp = matchlist(w, re) + let stem = fp[1] + let re = s:mgr1 + if stem =~ re + let w = stem + endif + elseif w =~ re2 + let fp = matchlist(w, re2) + let stem = fp[1] . fp[2] + let re2 = s:mgr1 + if stem =~ re2 + let w = stem + endif + endif + + " Step 5 + let re = '^\(.\{-}\)e$' + if w =~ re + let fp = matchlist(w, re) + let stem = fp[1] + let re = s:mgr1 + let re2 = s:meq1 + let re3 = '^' . s:C . s:v . '[^aeiouwxy]$' + if (stem =~ re || stem =~ re2) && stem !~ re3 + let w = stem + endif + endif + + let re = 'll$' + let re2 = s:mgr1 + if w =~ re && w =~ re2 + let re = '.$' + let w = substitute(w, re, '', '') + endif + + " and turn initial Y back to y + + if firstch == 'y' + let w = 'y' . w[1:] + endif + + return w +endfunction diff --git a/etc/soft/vim/vim/+plugins/vimple/autoload/overlay.vim b/etc/soft/vim/vim/+plugins/vimple/autoload/overlay.vim new file mode 100644 index 0000000..9207cd1 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/autoload/overlay.vim @@ -0,0 +1,115 @@ +function! overlay#controller(...) + if a:0 + for [key, act] in items(a:1) + exe 'nnoremap ' . key . ' ' . act + endfor + endif +endfunction + +let s:overlay_count = 1 + +function! overlay#show(list, actions, ...) + let overlay_parent_altbuf = bufnr('#') + let overlay_parent = bufnr('%') + + let options = { + \ 'filter' : 1, + \ 'use_split' : 0, + \ 'auto_act' : 0, + \ 'name' : '__overlay__' + \ } + if a:0 + if type(a:1) == type({}) + call extend(options, a:1) + endif + endif + + if options.name == '__overlay__' + let options.name .= s:overlay_count . '__' + let s:overlay_count += 1 + endif + + if options.use_split + hide noautocmd split + endif + hide noautocmd enew + let b:options = options + " let b:overlay_use_split = b:options.use_split + let b:overlay_parent = overlay_parent + let b:overlay_parent_altbuf = overlay_parent_altbuf + setlocal buftype=nofile + setlocal bufhidden=hide + setlocal noswapfile + setlocal nobuflisted + setlocal foldmethod=manual + setlocal foldcolumn=0 + setlocal nospell + setlocal modifiable + setlocal noreadonly + for o in keys(filter(copy(options), 'v:key =~ "^set"')) + exe o + endfor + exe 'file ' . b:options.name + + 1 + call overlay#update(a:list) + + let old_is = &incsearch + set incsearch + let old_hls = &hlsearch + set hlsearch + call overlay#controller(a:actions) +endfunction + +function! overlay#update(list) + let line = line('.') + % delete + call append(0, a:list) + $ + delete _ + exe line + if b:options.filter + if exists(':Filter') + Filter + else + call feedkeys('/') + endif + endif + if b:options.auto_act + if line('$') == 1 + call feedkeys("\") + endif + endif +endfunction + +function! overlay#close() + if b:options.use_split + let scratch_buf = bufnr('') + wincmd q + exe 'bwipe ' . scratch_buf + else + exe 'buffer ' . b:overlay_parent + bwipe # + if exists('b:overlay_parent_altbuf') + \ && buflisted(b:overlay_parent_altbuf) + exe 'buffer ' . b:overlay_parent_altbuf + silent! buffer # + endif + endif +endfunction + +function! overlay#select_line() + let line = getline('.') + call overlay#close() + return line +endfunction + +function! overlay#select_buffer() + let lines = getline(1,'$') + call overlay#close() + return lines +endfunction + +function! overlay#command(cmd, actions, options) + call overlay#show(vimple#redir(a:cmd), a:actions, a:options) +endfunction diff --git a/etc/soft/vim/vim/+plugins/vimple/autoload/parse/ini.vim b/etc/soft/vim/vim/+plugins/vimple/autoload/parse/ini.vim new file mode 100644 index 0000000..4fd3917 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/autoload/parse/ini.vim @@ -0,0 +1,58 @@ +function! parse#ini#from_file(file) + let file = a:file + if ! filereadable(file) + throw "E484: Can't open file " . file + endif + return parse#ini#from_string(join(readfile(file), "\n")) +endfunction + +function! parse#ini#from_string(string) + let scanner = string#scanner(a:string) + let data = {} + let current_section = data + + while ! scanner.eos() + call scanner.skip('\_s\+') + if scanner.scan(';') != "" + call scanner.skip_until('[\r\n]\+') + elseif scanner.scan('\[\([^\]]\+\)\]') != "" + let section_name = scanner.matches[1] + let data[section_name] = {} + let current_section = data[section_name] + elseif scanner.scan('\([^=]\+\)\s*=\s*\(\%([\r\n]\@!.\)*\)') != "" + let current_section[string#trim(scanner.matches[1])] + \ = string#eval((scanner.matches[2])) + endif + endwhile + + return data +endfunction + +function! parse#ini#to_file(hash, file) + call writefile(split(parse#ini#to_string(a:hash), "\n"), a:file) +endfunction + +function! parse#ini#to_string(hash) + let hash = a:hash + let head = '' + let body = '' + if type(hash) != type({}) + throw 'Expected Dictionary but given ' . variable#type_to_string(hash) + endif + for [section, values] in items(hash) + if type(values) == type({}) + let body .= '[' . section . "]\n" + for [name, val] in items(values) + let body .= name . ' = ' . string#to_string(val) . "\n" + unlet val + endfor + elseif type(values) == type([]) + " what now?! + else + let head .= section . ' = ' . string#to_string(values) . "\n" + endif + unlet values + endfor + return head . body +endfunction + diff --git a/etc/soft/vim/vim/+plugins/vimple/autoload/quickfix.vim b/etc/soft/vim/vim/+plugins/vimple/autoload/quickfix.vim new file mode 100644 index 0000000..2c323fa --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/autoload/quickfix.vim @@ -0,0 +1,23 @@ +" quickfix niceties +" Barry Arthur, Jan 2012 + +" original idea from: +" http://stackoverflow.com/questions/1830839/how-to-open-multiple-files-in-vim-after-vimgrep + +function! quickfix#bufnames() + return uniq(sort(map(getqflist(), 'bufname(v:val.bufnr)'))) +endfunction + +function! quickfix#to_args(global) + let global = !empty(a:global) + let arg_cmd = global ? 'args ' : 'arglocal ' + exe arg_cmd . join(map(quickfix#bufnames(), 'escape(v:val, " ")'), ' ') +endfunction + +function! quickfix#do(cmd) + " create a new window so as not to interfere with user's arglist + split + call quickfix#to_args(0) " 0 == local not global + exe 'argdo ' . a:cmd + close +endfunction diff --git a/etc/soft/vim/vim/+plugins/vimple/autoload/regex.vim b/etc/soft/vim/vim/+plugins/vimple/autoload/regex.vim new file mode 100644 index 0000000..6afa027 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/autoload/regex.vim @@ -0,0 +1,74 @@ +" Allow use of line continuation. +let s:save_cpo = &cpo +set cpo&vim + +function! regex#ExtendedRegex(...) + let erex = {} + let erex.lookup_function = '' + let erex.lookup_dict = {} + + func erex.default_lookup(name) dict + return eval(a:name) + endfunc + + "TODO: revisit this with eval() solution + func erex.lookup(name) dict + if empty(self.lookup_function) + return call(self.default_lookup, [a:name], self) + else + "TODO: this 'self' dict arg needs to be the object's self... + return call(self.lookup_function, [a:name], self.lookup_dict) + endif + endfunc + + func erex.expand_composition_atom(ext_reg) dict + let ext_reg = a:ext_reg + let composition_atom = '\\%{\s*\([^,} \t]\+\)\%(\s*,\s*\(\d\+\)\%(\s*,\s*\(.\{-}\)\)\?\)\?\s*}' + let remaining = match(ext_reg, composition_atom) + while remaining != -1 + let [_, name, cnt, sep ;__] = matchlist(ext_reg, composition_atom) + let cnt = cnt ? cnt : 1 + let sep = escape(escape(sep, '.*[]$^'), '\\') + let pattern = escape(self.lookup(name), '\\' ) + let ext_reg = substitute(ext_reg, composition_atom, join(repeat([pattern], cnt), sep), '') + let remaining = match(ext_reg, composition_atom) + endwhile + return ext_reg + endfunc + + func erex.expand(ext_reg) dict + return self.expand_composition_atom(a:ext_reg) + endfunc + + func erex.parse_multiline_regex(ext_reg) dict + return substitute(substitute(substitute(a:ext_reg, '#\s\+\S\+', '', 'g'), '\\\@ 1 + call erex.register_lookup_dict(a:2) + endif + endif + + return erex +endfunction + +"reset &cpo back to users setting +let &cpo = s:save_cpo + +" vim: set sw=2 sts=2 et fdm=marker: diff --git a/etc/soft/vim/vim/+plugins/vimple/autoload/rng.vim b/etc/soft/vim/vim/+plugins/vimple/autoload/rng.vim new file mode 100644 index 0000000..8a90b1b --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/autoload/rng.vim @@ -0,0 +1,18 @@ +" George Marsaglia's Multiply-with-carry Random Number Generator +" Modified to work within Vim's semantics +let s:m_w = 1 + getpid() +let s:m_z = localtime() + +" not sure of the wisdom of generating a full 32-bit RN here +" and then using abs() on the sucker. Feedback welcome. +function! rng#rand(...) + if a:0 == 0 + let s:m_z = (36969 * and(s:m_z, 0xffff)) + (s:m_z / 65536) + let s:m_w = (18000 * and(s:m_w, 0xffff)) + (s:m_w / 65536) + return (s:m_z * 65536) + s:m_w " 32-bit result + elseif a:0 == 1 " We return a number in [0, a:1] or [a:1, 0] + return a:1 < 0 ? rng#rand(a:1,0) : rng#rand(0,a:1) + else " if a:0 >= 2 + return abs(rng#rand()) % (abs(a:2 - a:1) + 1) + a:1 + endif +endfunction diff --git a/etc/soft/vim/vim/+plugins/vimple/autoload/scope.vim b/etc/soft/vim/vim/+plugins/vimple/autoload/scope.vim new file mode 100644 index 0000000..c3f6ef5 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/autoload/scope.vim @@ -0,0 +1,92 @@ +function! scope#pair(head, tail) + let obj = {} + let obj.head = a:head + let obj.tail = a:tail + let obj.head_line_number = obj.head[0] + let obj.tail_line_number = obj.tail[0] + + if len(obj.head[1]) == 0 + let obj.head_string = '' + elseif join(obj.head[1][1:]) == '' + let obj.head_string = obj.head[1][0] + else + let obj.head_string = string#trim(join(obj.head[1][1:], ' ')) + endif + + if len(obj.tail[1]) == 0 + let obj.tail_string = '' + elseif join(obj.tail[1][1:]) == '' + let obj.tail_string = obj.tail[1][0] + else + let obj.tail_string = join(obj.tail[1][1:], ' ') + endif + + return obj +endfunction + +function! scope#inspect(head_pattern, tail_pattern) + let obj = {} + let obj.head_search_pattern = substitute(a:head_pattern, '\\(', '\\%(', 'g') + let obj.head_collect_pattern = a:head_pattern + let obj.tail_search_pattern = substitute(a:tail_pattern, '\\(', '\\%(', 'g') + if obj.tail_search_pattern !~ '\\z[es]' && obj.tail_search_pattern !~ '\$$' + let obj.tail_search_pattern = obj.tail_search_pattern . '\zs' + endif + let obj.tail_collect_pattern = a:tail_pattern + + func obj.init() + let self.stack = [] + endfunc + + func obj.push(head, tail) + call add(self.stack, scope#pair([a:head, matchlist(getline(a:head), self.head_collect_pattern)], [a:tail, matchlist(getline(a:tail), self.tail_collect_pattern)])) + endfunc + + func obj.find_outer_tail() + let self.outer_tail = searchpair(self.head_search_pattern, '', self.tail_search_pattern, 'rcnW') + endfunc + + func obj.find_outer_head() + let self.outer_head = searchpair(self.head_search_pattern, '', self.tail_search_pattern, 'rbcnW') + endfunc + + func obj.find_current_head() + let self.current_head = searchpair(self.head_search_pattern, '', self.tail_search_pattern, 'bW') + endfunc + + func obj.find_current_tail() + let self.current_tail = searchpair(self.head_search_pattern, '', self.tail_search_pattern, 'nW') + endfunc + + func obj.scope() + let self.stack = reverse(list#lrotate(self.stack)) + return self + endfunc + + func obj.get_scope() + call self.init() + call self.find_outer_tail() + if self.outer_tail == 0 + return self + endif + + let cur_pos = getpos('.') + + call self.find_outer_head() + if self.outer_head == 0 + return self + endif + call self.push(self.outer_head, self.outer_tail) + call self.find_current_head() + while self.current_head > self.outer_head + call self.find_current_tail() + call self.push(self.current_head, self.current_tail) + call self.find_current_head() + endwhile + + call setpos('.', cur_pos) + return self.scope() + endfunction + + return obj.get_scope() +endfunction diff --git a/etc/soft/vim/vim/+plugins/vimple/autoload/scripts.vim b/etc/soft/vim/vim/+plugins/vimple/autoload/scripts.vim new file mode 100644 index 0000000..d49f59c --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/autoload/scripts.vim @@ -0,0 +1,47 @@ +let s:script_dir = expand(':p:h:h') +let s:script_db = s:script_dir . '/scripts.db' +let s:init_sql = 'create virtual table plugins using fts4 (plugin, file, type, content);' +let s:content_sql = 'insert into plugins values("%s", "%s", "%s", "%s")' + +function! scripts#query(sql) + let sql = 'sqlite3 ' . s:script_db . " '" . a:sql . "'" + return system(sql) +endfunc + +function! scripts#escape(value) + return substitute(substitute(a:value, '"', '""', 'g'), "'", "'\"'\"'", 'g') +endfunc + +function! scripts#init() + if filereadable(s:script_db) + call delete(s:script_db) + endif + call scripts#query(s:init_sql) + redir => scripts + silent scriptnames + redir END + for s in split(scripts, "\n") + if s == "" + continue + endif + let file = matchstr(s, '^\s*\d\+:\s*\zs\(.*\)') + let content = readfile(file) + let plugin = '' + if file =~ '/\.\?\(ex\|gvim\|vim\)rc$' + let type = 'vimrc' + let plugin = matchstr(file, '/\zs.\+\ze/\.\?\(ex\|gvim\|vim\)rc$') + elseif file =~ '/autoload/' + let type = 'autoload' + elseif file =~ '/after/' + let type = matchstr(file, '/\zsafter/.\+\ze/[^/]\+$') + else + let type = matchstr(file, '.*/\zs.\+\ze/[^/]\+$') + endif + if plugin == '' + let plugin = matchstr(file, '.*/\zs.\+\ze/' . type) + endif + echo scripts#query(printf(s:content_sql, scripts#escape(plugin), scripts#escape(file), scripts#escape(type), scripts#escape(join(content, "\n")))) + endfor +endfunction + +command! ScriptMatch echo scripts#query('select file from plugins where content match "' . scripts#escape() . '"') diff --git a/etc/soft/vim/vim/+plugins/vimple/autoload/string.vim b/etc/soft/vim/vim/+plugins/vimple/autoload/string.vim new file mode 100644 index 0000000..083630e --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/autoload/string.vim @@ -0,0 +1,292 @@ +function! string#scanner(str) + let obj = {} + if type(a:str) == type([]) + let obj.string = join(a:str, "\n") + else + let obj.string = a:str + endif + let obj.length = len(obj.string) + let obj.index = 0 + + func obj.eos() dict + return self.index >= self.length + endfunc + + func obj.inject(str) + let self.string = strpart(self.string, 0, self.index) + \ . a:str . strpart(self.string, self.index) + let self.length = len(self.string) + return self + endfunc + + func obj.skip(pat) dict + let pos = matchend(self.string, '\_^' . a:pat, self.index) + if pos != -1 + let self.index = pos + endif + return pos + endfunc + + func obj.skip_until(pat) dict + let pos = matchend(self.string, '\_.\{-}\ze' . a:pat, self.index) + if pos != -1 + let self.index = pos + endif + return pos + endfunc + + func obj.scan(pat) dict + " Use \_^ here to anchor the match at the start of the index. + " Otherwise it finds the first match after index. + let m = matchlist(self.string, '\_^' . a:pat, self.index) + if ! empty(m) + let self.index += len(m[0]) + let self.matches = m + return m[0] + endif + return "" + endfunc + + func obj.collect(pat) dict + let matches = [] + while ! self.eos() + if self.skip_until(a:pat) == -1 + break + endif + call add(matches, self.scan(a:pat)) + endwhile + return matches + endfunc + + func obj.split(sep, ...) dict + let keepsep = 0 + if a:0 + let keepsep = a:1 + endif + let pieces = [] + let old_index = 0 + while ! self.eos() + if self.skip_until(a:sep) == -1 + call add(pieces, strpart(self.string, old_index)) + break + endif + let the_piece = strpart(self.string, old_index, (self.index - old_index)) + call add(pieces, the_piece) + let the_sep = self.scan(a:sep) + if keepsep && (the_sep != '') + call add(pieces, the_sep) + endif + if old_index == self.index + call add(pieces, strpart(self.string, old_index, 1)) + let self.index += 1 + endif + let old_index = self.index + endwhile + return pieces + endfunc + + return obj +endfunction + +" A list of tokens with navigation methods & element access +function! string#tokens() + let obj = {} + let obj.tokens = [] + let obj.index = 0 + let obj.cur_tok = [] + let obj.next_tok = [] + + "foo + func obj.finalise() + call add(self.tokens, ['_end_', '_end_', self.tokens[-1][-1]]) + let self.num_tokens = len(self.tokens) + let self.next_tok = self.tokens[0] + return self + endfunc + + func obj.next() + let self.cur_tok = self.next_tok + if self.index < self.num_tokens + let self.index += 1 + endif + let self.next_tok = self.tokens[self.index] + return self.cur_tok + endfunc + + func obj.add(type, value, line) + call add(self.tokens, [a:type, a:value, a:line]) + endfunc + + return obj +endfunction + +function! string#lexer(string) + let obj = {} + let obj.tokens = string#tokens() + let obj.string = '' + let obj.line_continuation_pattern = '\n\s*\\' + let obj.pattern_order = [ + \ 'whitespace', 'name' + \, 'float_number', 'hex_number', 'oct_number', 'int_number' + \, 'tq_string', 'dq_string', 'sq_string' + \, 'operator', 'comment', 'unknown' + \] + let obj.newline_patterns = [ + \ 'whitespace' + \, 'tq_string', 'dq_string', 'sq_string' + \, 'comment', 'unknown' + \] + let obj.patterns = { + \ 'whitespace' : ['\s\+', '\n\%(\s*\\\s*\)\?'] + \, 'name' : ['[ablgstw]:\w*', '[_a-zA-Z]\+'] + \, 'float_number' : ['\d\+\.\d\+\%([eE][+-]\?\d\+\)\?'] + \, 'hex_number' : ['0x\x\+'] + \, 'oct_number' : ['0\o\+'] + \, 'int_number' : ['\d\+'] + \, 'tq_string' : ['"""\_.\{-}"""'] + \, 'dq_string' : ['"\%(\\\.\|[^\n]\)*"'] + \, 'sq_string' : ['''\%(''''\|\_.\)\{-}'''] + \, 'operator' : ['[\\\[\](){}<>:,./\\?=+!@#$%^&*`~|-]\+'] + \, 'comment' : ['"[^\n]*\n'] + \, 'unknown' : ['\S\+'] + \} + + func obj.new(str) + let self.tokens = string#tokens() + if type(a:str) == type([]) + let self.string = join(a:str, "\n") + else + let self.string = a:str + endif + let self.ss = string#scanner(self.string . "\n") + call self.lex() + let self.tokens = self.tokens.finalise() + return self + endfunc + + func obj.join_line_continuations(string) + return substitute(a:string, self.line_continuation_pattern, '', 'g') + endfunc + + func obj.lex() + let lines = 1 + while self.ss.index < self.ss.length + let matched = 0 + for type in self.pattern_order + for pat in self.patterns[type] + let value = self.ss.scan(pat) + if value != '' + let matched = 1 + let t_value = value + if index(self.newline_patterns, type) != -1 + let value = self.join_line_continuations(value) + endif + call self.tokens.add(type, value, lines) + if index(self.newline_patterns, type) != -1 + let lines += len(substitute(t_value, '[^\n]', '', 'g')) + endif + break + endif + endfor + if matched + break + endif + endfor + endwhile + endfunc + + return obj.new(a:string) +endfunction + + +let s:stops = map( + \ ["a" , "about" , "above" , "after" , "again" , "against" , "all" , "am" , "an" , "and" , "any" , "are" , "aren't" , "as" , "at" , "be" , "because" , "been" , "before" , "being" , "below" , "between" , "both" , "but" , "by" , "can't" , "cannot" , "could" , "couldn't" , "did" , "didn't" , "do" , "does" , "doesn't" , "doing" , "don't" , "down" , "during" , "each" , "few" , "for" , "from" , "further" , "had" , "hadn't" , "has" , "hasn't" , "have" , "haven't" , "having" , "he" , "he'd" , "he'll" , "he's" , "her" , "here" , "here's" , "hers" , "herself" , "him" , "himself" , "his" , "how" , "how's" , "i" , "i'd" , "i'll" , "i'm" , "i've" , "if" , "in" , "into" , "is" , "isn't" , "it" , "it's" , "its" , "itself" , "let's" , "me" , "more" , "most" , "mustn't" , "my" , "myself" , "no" , "nor" , "not" , "of" , "off" , "on" , "once" , "only" , "or" , "other" , "ought" , "our" , "ours" , "ourselves" , "out" , "over" , "own" , "same" , "shan't" , "she" , "she'd" , "she'll" , "she's" , "should" , "shouldn't" , "so" , "some" , "such" , "than" , "that" , "that's" , "the" , "their" , "theirs" , "them" , "themselves" , "then" , "there" , "there's" , "these" , "they" , "they'd" , "they'll" , "they're" , "they've" , "this" , "those" , "through" , "to" , "too" , "under" , "until" , "up" , "very" , "was" , "wasn't" , "we" , "we'd" , "we'll" , "we're" , "we've" , "were" , "weren't" , "what" , "what's" , "when" , "when's" , "where" , "where's" , "which" , "while" , "who" , "who's" , "whom" , "why" , "why's" , "with" , "won't" , "would" , "wouldn't" , "you" , "you'd" , "you'll" , "you're" , "you've" , "your" , "yours" , "yourself" , "yourselves"] + \, 'ml#porter#stemmer(v:val)') + +function! string#tokenize(text) + let t = (type(a:text) == type([]) ? join(a:text, ' ') : a:text) + let text = map( + \ split( + \ substitute( + \ substitute( + \ substitute(tolower(t) + \ , '\W', ' ', 'g') + \ , '\s\+', ' ', 'g') + \ , '^\s*\(.\{-}\)\s*$', '\1', '') + \ , ' ') + \, 'ml#porter#stemmer(v:val)') + + " Filter out stops + let out = [] + for word in text + if index(s:stops, word) == -1 + call add(out, word) + endif + endfor + + return out +endfunction + + +function! string#trim(str) + return matchstr(a:str, '^\_s*\zs.\{-}\ze\_s*$') +endfunction + +function! string#to_string(obj) + let obj = a:obj + if type(obj) < 2 + return obj + else + return string(obj) + endif +endfunction + +function! string#eval(line) + let line = string#trim(a:line) + if line[0] =~ '[{[]' + return eval(line) + else + return line + endif +endfunction + +" range(number) - ['A' .. 'A'+number] +" range(65, 90) - ['a' .. 'z'] +" range('a', 'f') - ['a' .. 'f'] +" range('A', 6) - ['A' .. 'F'] +function! string#range(...) + if ! a:0 + throw 'vimple string#range: not enough arguments' + endif + if a:0 > 2 + throw 'vimple string#range: too many arguments' + endif + if a:0 == 1 + return map(range(a:1), 'nr2char(char2nr("A")+v:val)') + else + if type(a:1) == type(0) + let start = a:1 + else + let start = char2nr(a:1) + endif + if type(a:2) == type(0) + if type(a:1) == type(0) + let end = a:2 + else + let end = (start + a:2) - 1 + endif + else + let end = char2nr(a:2) + endif + return map(range(start, end), 'nr2char(v:val)') + endif +endfunction + +" returns a dict of {word : count} +function! string#words(text) + let words = {} + for w in split(a:text) + let words[w] = get(words, w, 0) + 1 + endfor + return words +endfunction diff --git a/etc/soft/vim/vim/+plugins/vimple/autoload/variable.vim b/etc/soft/vim/vim/+plugins/vimple/autoload/variable.vim new file mode 100644 index 0000000..48c2e73 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/autoload/variable.vim @@ -0,0 +1,3 @@ +function! variable#type_to_string(var) + return ['Number', 'String', 'Funcref', 'List', 'Dictionary', 'Float'][type(a:var)] +endfunction diff --git a/etc/soft/vim/vim/+plugins/vimple/autoload/vimple.vim b/etc/soft/vim/vim/+plugins/vimple/autoload/vimple.vim new file mode 100644 index 0000000..58a022a --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/autoload/vimple.vim @@ -0,0 +1,256 @@ +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Vim library provides objects for builtin ++:ex++ commands +" Maintainers: Barry Arthur +" Israel Chauca F. +" Version: 0.9 +" Description: Vimple provides VimLOO (Object Oriented VimL) objects for +" Vim's write-only ++:ex++ commands, such as ++:ls++, +" ++:scriptnames++ and ++:highlight++. +" Last Change: 2012-04-08 +" License: Vim License (see :help license) +" Location: autoload/vimple.vim +" Website: https://github.com/dahu/vimple +" +" See vimple.txt for help. This can be accessed by doing: +" +" :helptags ~/.vim/doc +" :help vimple +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +let g:vimple_version = '0.9' + +" Vimscript Setup: {{{1 +" Allow use of line continuation. +let s:save_cpo = &cpo +set cpo&vim + +" load guard +" uncomment after plugin development +"if exists("g:loaded_lib_vimple") +" \ || v:version < 700 +" \ || v:version == 703 && !has('patch338') +" \ || &compatible +" let &cpo = s:save_cpo +" finish +"endif +"let g:loaded_lib_vimple = 1 + +" Library Interface: {{{1 +"let str = vimple#format( +" \ format, +" \ { 'b': ['d', 1], +" \ 'f': ['s', "abc"], +" \ 'n': ['s', "efg"], +" \ 'l': ['s', "hij"]}, +" \ default +" \ ) + +function! vimple#format(format, args_d, default) + let format = a:format == '' ? a:default : a:format + let format = substitute(format, '\(%%\)*\zs%[-0-9#+ .]*c', a:default, 'g') + + let args = '' + let items = map(split(substitute(format, '%%', '', 'g'), '\ze%'), 'matchstr(v:val, ''^%[-+#. 0-9]*.'')') + call map(items, 'substitute(v:val, ''^%[-0-9#+ .]*\(.\)'', ''\1'', "g")') + for item in items + let arg_l = get(a:args_d, item, '') + if type(arg_l) != type([]) + continue + endif + let args .= arg_l[0] == 's' ? string(arg_l[1]) : arg_l[1] + let args .= args[-1] =~ ',' ? '' : ', ' + endfor + let args = substitute(args, '^\s*,\s*\(.\{-}\),\s*$', '\1', '') + + let format = substitute(format, '\%(%%\)*%[-1-9#+ .]*\zs.', '\=get(a:args_d[submatch(0)], 0,submatch(0))', 'g') + let printf_str ='printf("'.escape(format, '\"').'", '.args.')' + + return eval(printf_str) +endfunction + +function! vimple#redir(command, ...) + let split_pat = '\n' + let str = '' + if a:0 != 0 + let split_pat = a:1 + endif + let lang = v:lang + silent! language messages C + redir => str + silent exe a:command + redir END + silent! exec 'language messages ' . lang + return split(str, split_pat) +endfunction + +function! vimple#associate(lines, subs, maps) + let lst = copy(a:lines) + for i in range(0, len(lst) - 1) + " echo lst[i] + for s in a:subs + " echo " " . string(s) + let lst[i] = substitute(lst[i], s[0], s[1], s[2]) + " echo " -->" . string(lst[i]) + endfor + endfor + call filter(lst, 'v:val != ""') + for m in a:maps + " echo "\n" . m + call map(lst, m) + " echo "-->" . string(lst) + endfor + return lst +endfunction + +function! vimple#join(data, pattern) + let x = -1 + let lines = repeat([''], len(a:data)) + for line in a:data + if line =~ a:pattern + let lines[x] .= line + else + let x += 1 + let lines[x] = line + endif + endfor + return filter(lines, 'v:val !~ "^$"') +endfunction + +function! vimple#echoc(data) + for sets in a:data + exe "echohl " . sets[0] + exe "echon " . string(sets[1]) + endfor + echohl Normal +endfunction + +function! s:vimple_highlight(name, attrs) + if !hlexists(a:name) + silent exe "hi ".a:name." ".a:attrs + endif +endfunction + +" Solarized inspired default colours... +" Doesn't override existing user-defined colours for these highlight terms. +" Shown with case here, but actually case-insensitive within Vim. +" +" TODO: Only vaguely considered at this stage. Based on the 16 colour +" solarized pallette +" the order of applying these to echoc is important +" +function! vimple#default_colorscheme() + " Buffer List + call s:vimple_highlight('vimple_BL_Number' , 'ctermfg=4 ctermbg=8 guifg=#0087ff guibg=#1c1c1c') + call s:vimple_highlight('vimple_BL_Line' , 'ctermfg=10 ctermbg=8 guifg=#4e4e4e guibg=#1c1c1c') + call s:vimple_highlight('vimple_BL_Name' , 'ctermfg=12 ctermbg=8 guifg=#808080 guibg=#1c1c1c') + call s:vimple_highlight('vimple_BL_Unlisted' , 'ctermfg=10 ctermbg=8 guifg=#4e4e4e guibg=#1c1c1c') + call s:vimple_highlight('vimple_BL_CurrentBuffer' , 'ctermfg=14 ctermbg=0 guifg=#8a8a8a guibg=#262626') + call s:vimple_highlight('vimple_BL_AlternateBuffer' , 'ctermfg=14 ctermbg=0 guifg=#8a8a8a guibg=#262626') + " buffer active + call s:vimple_highlight('vimple_BL_Active' , 'ctermfg=12 ctermbg=0 guifg=#808080 guibg=#262626') + call s:vimple_highlight('vimple_BL_Hidden' , 'ctermfg=10 ctermbg=8 guifg=#4e4e4e guibg=#1c1c1c') + " flags + call s:vimple_highlight('vimple_BL_Current' , 'ctermfg=5 guifg=#af005f') + call s:vimple_highlight('vimple_BL_Alternate' , 'ctermfg=13 guifg=#5f5faf') + call s:vimple_highlight('vimple_BL_Modifiable' , 'ctermfg=2 guifg=#5f8700') + call s:vimple_highlight('vimple_BL_Readonly' , 'ctermfg=6 guifg=#00afaf') + call s:vimple_highlight('vimple_BL_Modified' , 'ctermfg=9 guifg=#d75f00') + call s:vimple_highlight('vimple_BL_ReadError' , 'ctermfg=1 guifg=#af0000') + + " Scriptnames + call s:vimple_highlight('vimple_SN_Number' , 'ctermfg=4 ctermbg=8 guifg=#0087ff guibg=#1c1c1c') + call s:vimple_highlight('vimple_SN_Term' , 'ctermfg=12 ctermbg=8 guifg=#808080 guibg=#1c1c1c') + + " Options + call s:vimple_highlight('vimple_OP_BoolEnabled' , 'ctermfg=12 ctermbg=8 guifg=#808080 guibg=#262626') + call s:vimple_highlight('vimple_OP_BoolDisabled' , 'ctermfg=10 ctermbg=8 guifg=#4e4e4e guibg=#1c1c1c') +endfunction + +function! vimple#tracer() + let d = {} + func d.t() + return expand('') + endfunc + echom d.t() +endfunction + +" Buffer Line Filter {{{1 +function! vimple#filter(lines, options) + let obj = {} + let obj.lines = a:lines + let obj.options = a:options + + func obj.initialize() dict + if has_key(self.options, 'new') + enew + endif + if has_key(self.options, 'msg') + let self.msg = self.options.msg + else + let self.msg = 'Filter: ' + endif + return self + endfunc + + func obj.filter() dict + let old_hls = &hlsearch + set hlsearch + call self.incremental() + let &hlsearch = old_hls + return self + endfunc + + func obj.incremental() dict + let c = '' + let self.partial = '' + let &ul = &ul + call self.update(0) + while 1 + call self.update(1) + let c = nr2char(getchar()) + if c == "\" + break + elseif c == "\" + if self.partial =~ '\k\+\s*$' + let self.partial = substitute(self.partial, '\k\+\s*$', '', '') + else + let self.partial = substitute(self.partial, '.*\k\+\zs.*$', '', '') + endif + elseif c == "\" + silent undo + break + elseif c == '' + let self.partial = self.partial[:-2] + else + let self.partial .= c + endif + endwhile + endfunc + + func obj.update(undojoin) dict + if a:undojoin + undojoin + endif + %delete + let partial = substitute(substitute(self.partial, ' ', '.*', 'g'), '\.\*$', '', '') + if partial =~ '\.\*\$$' + let partial = substitute(partial, '\.\*\$$', '$', '') + endif + call append(0, filter(copy(self.lines), 'v:val =~ partial')) + $delete + if self.partial == '' + nohlsearch + else + exe "silent! norm! /" . partial . "\" + endif + 1 + redraw + echo self.msg . self.partial + endfunc + + return obj.initialize() +endfunction + +" Teardown:{{{1 +"reset &cpo back to users setting +let &cpo = s:save_cpo +" vim: set sw=2 sts=2 et fdm=marker: diff --git a/etc/soft/vim/vim/+plugins/vimple/autoload/vimple/abbreviations.vim b/etc/soft/vim/vim/+plugins/vimple/autoload/vimple/abbreviations.vim new file mode 100644 index 0000000..af490c6 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/autoload/vimple/abbreviations.vim @@ -0,0 +1,105 @@ +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Vimple wrapper for :abbreviations builtin +" Maintainers: Barry Arthur +" Israel Chauca F. +" Description: Vimple object for Vim's builtin :abbreviations command. +" Last Change: 2012-04-08 +" License: Vim License (see :help license) +" Location: autoload/vimple/abbreviations.vim +" Website: https://github.com/dahu/vimple +" +" See vimple#abbreviations.txt for help. This can be accessed by doing: +" +" :helptags ~/.vim/doc +" :help vimple#abbreviations +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +" Vimscript Setup: {{{1 +" Allow use of line continuation. +let s:save_cpo = &cpo +set cpo&vim + +" load guard +" uncomment after plugin development +"if exists("g:loaded_lib_vimple") +" \ || v:version < 700 +" \ || v:version == 703 && !has('patch338') +" \ || &compatible +" let &cpo = s:save_cpo +" finish +"endif +"let g:loaded_lib_vimple = 1 + +" TODO: Use the Numerically sort comparator for print() +" abbreviations object + +function! vimple#abbreviations#new() + let ab = {} + let ab.__data = {} + let ab.__filter = '' + + func ab.update() dict abort + let self.__data = vimple#associate(vimple#join(vimple#redir('iabbrev'), '^\s\+'), + \ [['^\S\+\s*\(\S\+\)\s*\(.*\)$', '\1\t\2', '']], + \ ['split(v:val, "\t", 2)', + \ '{"abbr": v:val[0],' + \. '"type": "i",' + \. '"expansion": substitute(v:val[1], "\\s\\+", " ", "g")}']) + return self + endfunc + + " takes two optional arguments: + " 1 : format + " 2 : data + func ab.to_s(...) dict + let default = "%t %a %e\n" + let format = a:0 && a:1 != '' ? a:1 : default + let data = a:0 > 1 ? a:2.__data : self.__data + let str = '' + let data = sort(data, 'vimple#comparators#abbrly') + for i in range(0, len(data) - 1) + let str .= vimple#format( + \ format, + \ { 'a': ['s', data[i]['abbr']], + \ 't': ['s', data[i]['type']], + \ 'e': ['s', data[i]['expansion']]}, + \ default + \ ) + endfor + return str + endfunc + + func ab.to_l(...) dict + return self.__data + endfunc + + " only able to colour print the default to_s() output at this stage + func ab.print() dict + let str = self.to_s() + let dta = map(split(str, "\n"), '[split(v:val, " ")[0], v:val . "\n"]') + call vimple#echoc(dta) + endfunc + + func ab.filter(filter) dict abort + let dict = deepcopy(self) + call filter(dict.__data, a:filter) + let dict.__filter .= (dict.__filter == '' ? '' : ' && ').a:filter + return dict + endfunc + + func ab.filter_by_abbr(abbr) dict abort + return self.filter('v:val["abbr"] =~ "' . escape(a:abbr, '"') . '"') + endfunc + + func ab.sort() + return sort(self.__data, vimple#comparators#abbrly) + endfunc + + call ab.update() + return ab +endfunction + +" Teardown:{{{1 +"reset &cpo back to users setting +let &cpo = s:save_cpo +" vim: set sw=2 sts=2 et fdm=marker: diff --git a/etc/soft/vim/vim/+plugins/vimple/autoload/vimple/comparators.vim b/etc/soft/vim/vim/+plugins/vimple/autoload/vimple/comparators.vim new file mode 100644 index 0000000..39469d1 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/autoload/vimple/comparators.vim @@ -0,0 +1,66 @@ +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Vimple Sort Comparators +" Maintainers: Barry Arthur +" Israel Chauca F. +" Description: Vimple sort comparators +" Last Change: 2012-04-08 +" License: Vim License (see :help license) +" Location: autoload/vimple/comparators.vim +" Website: https://github.com/dahu/vimple +" +" See vimple#comparators.txt for help. This can be accessed by doing: +" +" :helptags ~/.vim/doc +" :help vimple#comparators +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +" Vimscript Setup: {{{1 +" Allow use of line continuation. +let s:save_cpo = &cpo +set cpo&vim + +" load guard +" uncomment after plugin development +"if exists("g:loaded_lib_vimple") +" \ || v:version < 700 +" \ || v:version == 703 && !has('patch338') +" \ || &compatible +" let &cpo = s:save_cpo +" finish +"endif +"let g:loaded_lib_vimple = 1 + +function! vimple#comparators#numerically(i1, i2) + let i1 = str2nr(a:i1) + let i2 = str2nr(a:i2) + return i1 == i2 ? 0 : i1 > i2 ? 1 : -1 +endfunction + +function! vimple#comparators#abbrly(i1, i2) + let i1 = a:i1['abbr'] + let i2 = a:i2['abbr'] + return i1 == i2 ? 0 : i1 > i2 ? 1 : -1 +endfunction + +function! vimple#comparators#termly(i1, i2) + let i1 = a:i1['term'] + let i2 = a:i2['term'] + return i1 == i2 ? 0 : i1 > i2 ? 1 : -1 +endfunction + +function! vimple#comparators#rhsly(i1, i2) + let i1 = matchstr(a:i1['rhs'], '\c^.*\zs.*') + let i2 = matchstr(a:i2['rhs'], '\c^.*\zs.*') + return i1 == i2 ? 0 : i1 > i2 ? 1 : -1 +endfunction + +function! vimple#comparators#lhsly(i1, i2) + let i1 = a:i1['lhs'] + let i2 = a:i2['lhs'] + return i1 == i2 ? 0 : i1 > i2 ? 1 : -1 +endfunction + +" Teardown:{{{1 +"reset &cpo back to users setting +let &cpo = s:save_cpo +" vim: set sw=2 sts=2 et fdm=marker: diff --git a/etc/soft/vim/vim/+plugins/vimple/autoload/vimple/highlight.vim b/etc/soft/vim/vim/+plugins/vimple/autoload/vimple/highlight.vim new file mode 100644 index 0000000..4e70c1f --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/autoload/vimple/highlight.vim @@ -0,0 +1,103 @@ +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Vimple wrapper for :highlight builtin +" Maintainers: Barry Arthur +" Israel Chauca F. +" Description: Vimple object for Vim's builtin :highlight command. +" Last Change: 2012-04-08 +" License: Vim License (see :help license) +" Location: autoload/vimple/highlight.vim +" Website: https://github.com/dahu/vimple +" +" See vimple#highlight.txt for help. This can be accessed by doing: +" +" :helptags ~/.vim/doc +" :help vimple#highlight +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +" Vimscript Setup: {{{1 +" Allow use of line continuation. +let s:save_cpo = &cpo +set cpo&vim + +" load guard +" uncomment after plugin development +"if exists("g:loaded_lib_vimple") +" \ || v:version < 700 +" \ || v:version == 703 && !has('patch338') +" \ || &compatible +" let &cpo = s:save_cpo +" finish +"endif +"let g:loaded_lib_vimple = 1 + +" TODO: Use the Numerically sort comparator for print() +" Highlight object + +function! vimple#highlight#new() + let hl = {} + let hl.__data = {} + let hl.__filter = '' + + func hl.update() dict abort + let self.__data = vimple#associate(vimple#join(vimple#redir('highlight'), '^\s\+'), + \ [['^\(\S\+\)\s*\S\+\s*\(.*\)$', '\1\t\2', '']], + \ ['split(v:val, "\t", 2)', + \ '{"term": v:val[0],' + \. '"attrs": substitute(v:val[1], "\\s\\+", " ", "g")}']) + return self + endfunc + + " takes two optional arguments: + " 1 : format + " 2 : data + func hl.to_s(...) dict + let default = "%t %a\n" + let format = a:0 && a:1 != '' ? a:1 : default + let data = a:0 > 1 ? a:2.__data : self.__data + let str = '' + let data = sort(data, 'vimple#comparators#termly') + for i in range(0, len(data) - 1) + let str .= vimple#format( + \ format, + \ { 't': ['s', data[i]['term']], + \ 'a': ['s', data[i]['attrs']]}, + \ default + \ ) + endfor + return str + endfunc + + func hl.to_l(...) dict + return self.__data + endfunc + + " only able to colour print the default to_s() output at this stage + func hl.print() dict + let str = self.to_s() + let dta = map(split(str, "\n"), '[split(v:val, " ")[0], v:val . "\n"]') + call vimple#echoc(dta) + endfunc + + func hl.filter(filter) dict abort + let dict = deepcopy(self) + call filter(dict.__data, a:filter) + let dict.__filter .= (dict.__filter == '' ? '' : ' && ').a:filter + return dict + endfunc + + func hl.filter_by_term(term) dict abort + return self.filter('v:val["term"] =~ "' . escape(a:term, '"') . '"') + endfunc + + func hl.sort() + return sort(self.__data, vimple#comparators#termly) + endfunc + + call hl.update() + return hl +endfunction + +" Teardown:{{{1 +"reset &cpo back to users setting +let &cpo = s:save_cpo +" vim: set sw=2 sts=2 et fdm=marker: diff --git a/etc/soft/vim/vim/+plugins/vimple/autoload/vimple/history.vim b/etc/soft/vim/vim/+plugins/vimple/autoload/vimple/history.vim new file mode 100644 index 0000000..4403321 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/autoload/vimple/history.vim @@ -0,0 +1,90 @@ +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Vimple wrapper for :history builtin +" Maintainers: Barry Arthur +" Israel Chauca F. +" Description: Vimple object for Vim's builtin :history command. +" Last Change: 2012-04-08 +" License: Vim License (see :help license) +" Location: autoload/vimple/history.vim +" Website: https://github.com/dahu/vimple +" +" See vimple#history.txt for help. This can be accessed by doing: +" +" :helptags ~/.vim/doc +" :help vimple#history +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +" Vimscript Setup: {{{1 +" Allow use of line continuation. +let s:save_cpo = &cpo +set cpo&vim + +" load guard +" uncomment after plugin development +"if exists("g:loaded_lib_vimple") +" \ || v:version < 700 +" \ || v:version == 703 && !has('patch338') +" \ || &compatible +" let &cpo = s:save_cpo +" finish +"endif +"let g:loaded_lib_vimple = 1 + +" TODO: Use the Numerically sort comparator for print() + +function! vimple#history#new() + let hist = {} + let hist.__commands = {} + let hist.__filter = '' + + func hist.update() dict abort + let self.__commands = vimple#associate(vimple#redir('history'), + \ [['^\s*#.*', '', ''], + \ ['[^0-9]*\(\%(\d\+\)\|#\)\s*\(.*\)$', '\1-=-=\2', '']], + \ ['split(v:val, "-=-=")', '{"number": v:val[0], "command": v:val[1]}']) + return self + endfunc + + func hist.to_s(...) dict + let default = "%3n %s\n" + "let format = default + let format = a:0 && a:1 != '' ? a:1 : default + let commands = a:0 > 1 ? a:2.__commands : self.__commands + let str = '' + for i in range(0, len(commands) - 1) + let str .= vimple#format( + \ format, + \ { 'n': ['d', commands[i]['number']], + \ 's': ['s', commands[i]['command']]}, + \ default + \ ) + endfor + return str + endfunc + + " only able to colour print the default to_s() output at this stage + " Note: This is a LOT of dancing just to get coloured numbers ;) + func hist.print() dict + call self.update() + call map(map(map(split(self.to_s(), '\n'), 'split(v:val, "\\d\\@<= ")'), '[["vimple_SN_Number", v:val[0]] , ["vimple_SN_Term", " : " . v:val[1] . "\n"]]'), 'vimple#echoc(v:val)') + endfunc + + func hist.filter(filter) dict abort + let dict = deepcopy(self) + call filter(dict.__commands, a:filter) + let dict.__filter .= (dict.__filter == '' ? '' : ' && ').a:filter + return dict + endfunc + + func hist.filter_by_name(name) dict abort + return self.filter('v:val["command"] =~ "' . escape(a:name, '"') . '"') + endfunc + + call hist.update() + return hist +endfunction + +" Teardown:{{{1 +"reset &cpo back to users setting +let &cpo = s:save_cpo +" vim: set sw=2 sts=2 et fdm=marker: diff --git a/etc/soft/vim/vim/+plugins/vimple/autoload/vimple/ls.vim b/etc/soft/vim/vim/+plugins/vimple/autoload/vimple/ls.vim new file mode 100644 index 0000000..b152c6f --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/autoload/vimple/ls.vim @@ -0,0 +1,386 @@ +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Vimple wrapper for :ls builtin +" Maintainers: Barry Arthur +" Israel Chauca F. +" Description: Vimple object for Vim's builtin :ls command. +" Last Change: 2012-04-08 +" License: Vim License (see :help license) +" Location: autoload/vimple/ls.vim +" Website: https://github.com/dahu/vimple +" +" See vimple#ls.txt for help. This can be accessed by doing: +" +" :helptags ~/.vim/doc +" :help vimple#ls +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +" Vimscript Setup: {{{1 +" Allow use of line continuation. +let s:save_cpo = &cpo +set cpo&vim + +" load guard +" uncomment after plugin development +"if exists("g:loaded_lib_vimple") +" \ || v:version < 700 +" \ || v:version == 703 && !has('patch338') +" \ || &compatible +" let &cpo = s:save_cpo +" finish +"endif +"let g:loaded_lib_vimple = 1 + +" TODO: Use the Numerically sort comparator for print() +" TODO: Use one s:dict instead of recreating the whole thing. Easier to debug. +" TODO: Improve alignment of line numbers of print(). + +function! vimple#ls#new() + let bl = {} + let bl.__buffers = {} + let bl.current = 0 + let bl.alternate = 0 + let bl.__filter = '' + + " public interface {{{1 + + func bl._filename(bufnum, fallback) + let bname = bufname(a:bufnum) + if bname =~ '^\s*$' + let bname = a:fallback + endif + echo '####' . bname . '#### + return bname + endfunc + + " update {{{2 + func bl.update() dict abort + let bufferlist = vimple#associate(vimple#redir('ls!'), + \ [[ '^\s*\(\d\+\)\(\s*[-u%#ah=+x ]*\)\s\+\"\(.*\)\"\s\+\(\S\+\%(\s\+\S\+\)*\)\s\+\(\d\+\)\%(\s\+.*\)\?$', + \ '\1,\2,\4,\5,\3', + \ '' ]], + \ [ 'split(v:val, ",")', + \ 'add(v:val[0:3], join(v:val[4:-1], ","))', + \ '{"number": v:val[0],' + \.'"line_text": v:val[2],' + \.'"line": v:val[3],' + \.'"name": (v:val[4] =~ ''\[.\{-}\]'' ? (bufname(v:val[0] + 0) ? bufname(v:val[0] + 0) : v:val[4]) : v:val[4]),' + \.'"listed": v:val[1] !~ "u",' + \.'"current": v:val[1] =~ "%",' + \.'"alternate": v:val[1] =~ "#",' + \.'"active": v:val[1] =~ "a",' + \.'"hidden": v:val[1] =~ "h",' + \.'"modifiable": v:val[1] !~ "-",' + \.'"readonly": v:val[1] =~ "=",' + \.'"modified": v:val[1] =~ "+",' + \.'"read_error": v:val[1] =~ "x"}' ]) + + let self.__buffers = {} + for bfr in map(copy(bufferlist), '{v:val["number"]: v:val}') + call extend(self.__buffers, bfr) + endfor + if self.__filter != '' + call filter(self.__buffers, self.__filter) + endif + + let current_l = filter(copy(bufferlist), 'v:val["current"] == 1') + let alternate_l = filter(copy(bufferlist), 'v:val["alternate"] == 1') + let self.current = len(current_l) > 0 ?current_l[0].number : 0 + let self.alternate = len(alternate_l) > 0 ? alternate_l[0].number : 0 + return self + endfun + + " to_s([format]) {{{2 + " format: When absent or empty the default value ("%3b%f\"%n\" line %l\n") + " will be used. + " Use %b, %n, %f and %l to insert the buffer number, name, flags and cursor + " line respectively . The last character will be replaced by d or s as + " required by printf(), so you can include extra flags (e.g.: %3b). + func bl.to_s(...) dict + " An empty format argument uses the default. + let default = "%3b%f\"%n\" %t %l\n" + let format = a:0 && a:1 != '' ? a:1 : default + " Apply filter. + let buffers = self.data() + + let str = '' + for key in sort(keys(buffers), 'vimple#comparators#numerically') + let str .= vimple#format( + \ format, + \ { 'b': ['d', buffers[key]['number']], + \ 'f': ['s', self.buffer_flags(buffers[key])], + \ 't': ['s', buffers[key]['line_text']], + \ 'n': ['s', buffers[key]['name']], + \ 'l': ['s', buffers[key]['line']]}, + \ default + \ ) + endfor + return str + endfunc + + " to_l {{{2 + func bl.to_l(...) dict + return values(call(self.buffers, a:000, self).__buffers) + endfunc + + " to_d {{{2 + func bl.to_d(...) dict + return call(self.buffers, a:000, self).__buffers + endfunc + + " print {{{2 + " only able to colour print the default to_s() output at this stage + func bl.print(...) dict + let bang = a:0 ? a:1 : 0 + call self.update() + "let str = self.to_s() + " following code is from hl.print() and would not work as is here + "let dta = map(split(str, "\n"), '[split(v:val, " ")[0], v:val . "\n"]') + "call vimple#echoc(dta) + let pairs = [] + let data = self.data() + let max_length = max(map(deepcopy(values(self.data())), 'len(v:val.name)')) + for buffer in sort(values(data), self.compare, self) + if !bang && !buffer.listed + continue + endif + call add(pairs, ['vimple_BL_Nnumber', printf('%3d',buffer.number)]) + if buffer.listed + call add(pairs, ['Normal', ' ']) + else + call add(pairs, ['vimple_BL_Unlisted', 'u']) + endif + if buffer.current + call add(pairs, ['vimple_BL_Current', '%']) + elseif buffer.alternate + call add(pairs, ['vimple_BL_Alternate', '#']) + else + call add(pairs, ['Normal', ' ']) + endif + if buffer.active + call add(pairs, ['vimple_BL_Active', 'a']) + elseif buffer.hidden + call add(pairs, ['vimple_BL_Hidden', 'h']) + else + call add(pairs, ['Normal', ' ']) + endif + if !buffer.modifiable + call add(pairs, ['vimple_BL_Modifiable', '-']) + elseif buffer.readonly + call add(pairs, ['vimple_BL_Readonly', '=']) + else + call add(pairs, ['Normal', ' ']) + endif + if buffer.read_error + call add(pairs, ['vimple_BL_RearError', 'x']) + elseif buffer.modified + call add(pairs, ['vimple_BL_Modified', '+']) + else + call add(pairs, ['Normal', ' ']) + endif + call add(pairs, ['Normal', ' ']) + call add(pairs, [ + \ buffer.current ? + \ 'vimple_BL_CurrentBuffer' : + \ buffer.alternate ? + \ 'vimple_BL_AlternateBuffer' : + \ 'Normal', + \ '"' . buffer.name . '"']) + let spaces = len(buffer.name) >= 29 ? 1 : 29 - len(buffer.name) + call add(pairs, ['Normal', + \ repeat(' ', spaces)]) + call add(pairs, ['vimple_BL_Line', + \ buffer.line_text . ' ']) + call add(pairs, ['vimple_BL_Line', + \ buffer.line . "\" + \ ]) + endfor + call vimple#echoc(pairs) + " Remove the last . Why? + let pairs[-1][1] = pairs[-1][-1][:-2] + return pairs + endfunc + + " compare {{{3 + func bl.compare(k1, k2) dict + let k1 = a:k1.number * 1 + let k2 = a:k2.number * 1 + return k1 == k2 ? 0 : k1 > k2 ? 1 : -1 + endfunc + + " filter {{{2 + func bl.filter(filter) dict abort + let dict = deepcopy(self) + call filter(dict.__buffers, a:filter) + let dict.__filter .= (dict.__filter == '' ? '' : ' && ').a:filter + return dict + endfunc + + " get_filter {{{3 + func bl.get_filter() dict + return string(self.__filter) + endfunc + + " filter_add_or {{{3 + func bl.filter_add_or(filter) dict + let self.__filter .= ' || ' . a:filter + endfunc + + " filter_add_and {{{3 + func bl.filter_add_and(filter) dict + let self.__filter .= ' && ' . a:filter + endfunc + + " merge {{{3 + func bl.merge(bl) dict + let bl = deepcopy(self) + call extend(bl.__buffers, a:bl.__buffers, 'keep') + call bl.filter_add_or(a:bl.__filter) + return bl + endfunc + + " and {{{3 + func bl.and(filter) dict + return call(self.buffers, [a:filter], self) + endfunc + + " hidden {{{3 + func bl.hidden(...) dict + let filters = { + \ 1: 'v:val.hidden', + \ 2: '!v:val.active && v:val.listed', + \ 3: '!v:val.listed', + \ 4: '!v:val.active && v:val.listed && !v:val.hidden', + \ 5: '!v:val.active || !v:val.listed' + \ } + let choice = a:0 ? a:1 : 1 + return self.filter_with_choice(choice, filters) + endfunc + + " active {{{3 + func bl.active() dict + return self.filter('v:val.active') + endfunc + + " modifiable {{{3 + func bl.modifiable(...) dict + let filters = { + \ 1: '!v:val.modifiable', + \ 2: '!v:val.modifiable || v:val.readonly' + \ } + let choice = a:0 ? a:1 : 1 + return self.filter_with_choice(choice, filters) + endfunc + + " readonly {{{3 + func bl.readonly(...) dict + let filters = { + \ 1: '!v:val.readonly', + \ 2: '!v:val.modifiable || v:val.readonly' + \ } + let choice = a:0 ? a:1 : 1 + return self.filter_with_choice(choice, filters) + endfunc + + " modified {{{3 + func bl.modified() dict + return self.filter('v:val.modified') + endfunc + + " read_error {{{3 + func bl.read_error() dict + return self.filter('v:val.read_error') + endfunc + + " unloaded {{{3 + func bl.unloaded() dict + return self.filter('!v:val.active && !v:val.hidden && v:val.listed') + endfunc + + " buffers - alias for data {{{2 + func bl.buffers(...) dict + if !a:0 + " Return listed buffers. + return self.filter('v:val.listed') + endif + if a:1 =~ '^\%(non\?\|un\)' + let arg = matchstr(a:1, '^\%(un\|non\)\zs.*') + let bang = '!' + else + let arg = a:1 + let bang = '' + endif + if arg == 'hidden' + let filter = 'v:val.hidden' + elseif arg == 'active' + let filter = 'v:val.active' + elseif arg == 'modifiable' + let filter = 'v:val.modifiable' + elseif arg == 'readonly' + let filter = 'v:val.readonly' + elseif arg == 'modified' + let filter = 'v:val.modified' + elseif arg == 'read_error' + let filter = 'v:val.read_error' + elseif arg == 'unloaded' + let filter = '!v:val.active && !v:val.hidden && v:val.listed' + elseif arg == 'listed' + let filter = 'v:val.listed' + elseif arg == 'all' + let filter = '1' + else + let filter = arg + endif + let bl = self.filter(bang . '(' . filter . ')') + return bl + endfunc + + " data - alias for buffers {{{3 + func bl.data() dict + return self.__buffers + endfunc + + " Private functions - don't need 'dict' modifier {{{2 + + " filter_with_choice {{{3 + func bl.filter_with_choice(choice, filters, ...) + if a:0 + return filter(deepcopy(a:1), a:filters[a:choice]) + else + return self.filter(a:filters[a:choice]) + endif + endfunc + + " buffer_status {{{3 + func bl.buffer_status(b) + return a:b['active'] == 1 ? 'a' : a:b['hidden'] == 1 ? 'h' : '!' + endfunc + + " buffer_type {{{3 + func bl.buffer_type(b) + return a:b['current'] == 1 ? '%' : a:b['alternate'] == 1 ? '#' : ' ' + endfunc + + " buffer_flags {{{3 + func bl.buffer_flags(b) + return (a:b['listed'] == 0 ? 'u' : ' ') + \. (a:b['current'] == 1 ? '%' : + \ (a:b['alternate'] == 1 ? '#' : ' ')) + \. (a:b['active'] == 1 ? 'a' : + \ (a:b['hidden'] == 1 ? 'h' : ' ')) + \. (a:b['modifiable'] == 0 ? '-' : + \ (a:b['readonly'] == 1 ? '=' : ' ')) + \. (a:b['modified'] == 1 ? '+' : ' ') + \. (a:b['read_error'] == 1 ? 'x' : ' ') + endfunc + " }}}2 + + " constructor + + call bl.update() + return bl +endfunction + +" Teardown:{{{1 +"reset &cpo back to users setting +let &cpo = s:save_cpo +" vim: set sw=2 sts=2 et fdm=marker: diff --git a/etc/soft/vim/vim/+plugins/vimple/autoload/vimple/map.vim b/etc/soft/vim/vim/+plugins/vimple/autoload/vimple/map.vim new file mode 100644 index 0000000..e116dbf --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/autoload/vimple/map.vim @@ -0,0 +1,176 @@ +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Vimple wrapper for :map builtin +" Maintainers: Barry Arthur +" Israel Chauca F. +" Description: Vimple object for Vim's builtin :map command. +" Last Change: 2012-04-08 +" License: Vim License (see :help license) +" Location: autoload/vimple/scriptnames.vim +" Website: https://github.com/dahu/vimple +" +" See vimple#map.txt for help. This can be accessed by doing: +" +" :helptags ~/.vim/doc +" :help vimple#map +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +" Vimscript Setup: {{{1 +" Allow use of line continuation. +let s:save_cpo = &cpo +set cpo&vim + +" load guard +" uncomment after plugin development +"if exists("g:loaded_lib_vimple") +" \ || v:version < 700 +" \ || v:version == 703 && !has('patch338') +" \ || &compatible +" let &cpo = s:save_cpo +" finish +"endif +"let g:loaded_lib_vimple = 1 + +" TODO: Use the Numerically sort comparator for print() + +function! vimple#map#new() + let m = {} + let m.__data = {} + let m.__filter = '' + + func m.update() dict abort + let self.__data = vimple#associate(vimple#redir('map') + vimple#redir('map!'), + \ [['', + \ '', '']], + \ ['[matchstr(v:val, ''^.''), + \ matchstr(v:val, ''^.\s\+\zs\S\+''), + \ matchstr(v:val, ''^.\s\+\S\+\s\+\zs[*& ]\ze[@ ]\S''), + \ matchstr(v:val, ''^.\s\+\S\+\s\+[*& ]\zs[@ ]\ze\S''), + \ matchstr(v:val, ''^.\s\+\S\+\s\+[*& ][@ ]\zs\S.*'') + \ ]', + \ '{"normal" : v:val[0] =~ "[n ]", + \ "visual" : v:val[0] =~ "[vx ]", + \ "select" : v:val[0] =~ "[vs ]", + \ "operator" : v:val[0] =~ "[o ]", + \ "insert" : v:val[0] =~ "[i!]", + \ "lang" : v:val[0] =~ "l", + \ "command" : v:val[0] =~ "[c!]", + \ "lhs" : v:val[1], + \ "remappable" : v:val[2] != "*", + \ "script_remappable" : v:val[2] == "&", + \ "buffer" : v:val[3] == "@", + \ "rhs" : v:val[4] + \ }']) + return self + endfunc + + func m.map_type(map) + let tt = ['normal', 'insert', 'select', 'visual', 'operator', 'command', 'lang'] + let type = '' + for i in range(0, (len(tt) - 1)) + if a:map[tt[i]] + if i == 3 + if type == 's' + let type = 'v' + else + let type = 'x' + endif + else + let type = tt[i][0] + endif + endif + endfor + return type + endfunc + + func m.map_extra(map) + let et = ['remappable', 'script_remappable', 'buffer'] + let rt = [' ', '&', '@'] + let extra = '*' + for i in range(0, (len(et) - 1)) + if a:map[et[i]] + let extra = rt[i] + endif + endfor + return extra + endfunc + + func m.to_s(...) dict + let default = "%3n %s\n" + let default = "%t %L %e %R\n" + "let format = default + let format = a:0 && a:1 != '' ? a:1 : default + let maps = a:0 > 1 ? a:2.__data : self.__data + let str = '' + " for i in range(0, len(maps) - 1) + let lhs_plugs = self.filter('v:val["lhs"] =~ "\\c"').to_l() + let rhs_plugs = self.filter('v:val["rhs"] =~ "\\c"').to_l() + let non_plugs = self.filter('v:val["lhs"] !~ "\\c" && v:val["rhs"] !~ "\\c"').to_l() + let all_maps = sort(lhs_plugs, 'vimple#comparators#lhsly') + \+ sort(rhs_plugs, 'vimple#comparators#rhsly') + \+ sort(non_plugs, 'vimple#comparators#lhsly') + for map in all_maps + let type = self.map_type(map) + let extra = self.map_extra(map) + let str .= vimple#format( + \ format, + \ { 't': ['s', type], + \ 'L': ['s', map['lhs']], + \ 'e': ['s', extra], + \ 'R': ['s', map['rhs']]}, + \ default + \ ) + endfor + return str + endfunc + + " to_l {{{2 + func m.to_l(...) dict + return self.__data + endfunc + + " only able to colour print the default to_s() output at this stage + " Note: This is a LOT of dancing just to get coloured numbers ;) + func m.print() dict + call self.update() + call map(map(map(split(self.to_s(), '\n'), 'split(v:val, "\\d\\@<= ")'), '[["vimple_SN_Number", v:val[0]] , ["vimple_SN_Term", " : " . v:val[1] . "\n"]]'), 'vimple#echoc(v:val)') + endfunc + + func m.filter(filter) dict abort + let dict = deepcopy(self) + call filter(dict.__data, a:filter) + let dict.__filter .= (dict.__filter == '' ? '' : ' && ').a:filter + return dict + endfunc + + func m.lhs_is(lhs) dict abort + return self.filter('v:val["lhs"] ==# "' . escape(a:lhs, '\"') . '"') + endfunc + + call m.update() + return m +endfunction + +function! MyMaps() + let maps = split(g:vimple#mp.update().filter('v:val["lhs"] !~ "\\c"').to_s("%t %e %L %R\n"), "\n") + let max_l = 0 + for s in maps + let l = stridx(s, ' ', 5) + let max_l = l > max_l ? l : max_l + endfor + let max_l += 1 + let ms = [] + let pat = '^.\s.\s\S\+\zs\s\+\ze' + for s in maps + let ns = match(s, pat) + call add(ms, substitute(s, pat, repeat(' ', max_l - ns), '')) + endfor + return ms +endfunction + +command! -nargs=0 -bar MyMaps call ShowInNewBuf(MyMaps()) + +" Teardown:{{{1 +"reset &cpo back to users setting +let &cpo = s:save_cpo +" vim: set sw=2 sts=2 et fdm=marker: + diff --git a/etc/soft/vim/vim/+plugins/vimple/autoload/vimple/marks.vim b/etc/soft/vim/vim/+plugins/vimple/autoload/vimple/marks.vim new file mode 100644 index 0000000..8a4efe0 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/autoload/vimple/marks.vim @@ -0,0 +1,110 @@ +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Vimple wrapper for :marks builtin +" Maintainers: Barry Arthur +" Israel Chauca F. +" Description: Vimple object for Vim's builtin :marks command. +" Last Change: 2012-04-08 +" License: Vim License (see :help license) +" Location: autoload/vimple/scriptnames.vim +" Website: https://github.com/dahu/vimple +" +" See vimple#marks.txt for help. This can be accessed by doing: +" +" :helptags ~/.vim/doc +" :help vimple#marks +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +" Vimscript Setup: {{{1 +" Allow use of line continuation. +let s:save_cpo = &cpo +set cpo&vim + +" load guard +" uncomment after plugin development +"if exists("g:loaded_lib_vimple") +" \ || v:version < 700 +" \ || v:version == 703 && !has('patch338') +" \ || &compatible +" let &cpo = s:save_cpo +" finish +"endif +"let g:loaded_lib_vimple = 1 + +" TODO: Use the Numerically sort comparator for print() + +function! vimple#marks#new() + let m = {} + let m.__data = {} + let m.__filter = '' + + func m.update() dict abort + let self.__data = vimple#associate(vimple#redir('marks')[1:-1], + \ [['^\s*', '', '']], + \ ['split(v:val)', + \ '{"mark" : v:val[0], + \ "line" : v:val[1], + \ "col" : v:val[2], + \ "text" : substitute(join(v:val[3:-1], " "), "\n", "", ""), + \ }']) + + return self + endfunc + + func m.to_s(...) dict + let default = "%2m %5l %4o %t\n" + let format = a:0 && a:1 != '' ? a:1 : default + let marks = a:0 > 1 ? a:2.__data : self.__data + let str = '' + for i in range(0, len(marks) - 1) + let str .= vimple#format( + \ format, + \ { 'm': ['s', marks[i]['mark']], + \ 'l': ['d', marks[i]['line']], + \ 'o': ['d', marks[i]['col']], + \ 't': ['s', marks[i]['text']]}, + \ default + \ ) + endfor + return str + endfunc + + func m.to_l() dict + return self.__data + endfunc + + " " only able to colour print the default to_s() output at this stage + " " Note: This is a LOT of dancing just to get coloured numbers ;) + " func m.print() dict + " call self.update() + " call map(map(map(split(self.to_s(), '\n'), 'split(v:val, "\\d\\@<= ")'), '[["vimple_SN_Number", v:val[0]] , ["vimple_SN_Term", " : " . v:val[1] . "\n"]]'), 'vimple#echoc(v:val)') + " endfunc + + "TODO: This looks like a candidate for moving into the parent class... no? + func m.filter(filter) dict abort + let dict = deepcopy(self) + call filter(dict.__data, a:filter) + let dict.__filter .= (dict.__filter == '' ? '' : ' && ').a:filter + return dict + endfunc + + func m.lhs_is(lhs) dict abort + return self.filter('v:val["lhs"] ==# "' . escape(a:lhs, '\"') . '"') + endfunc + + func m.local_marks() dict abort + return self.filter('v:val["mark"] =~# "[a-z]"') + endfunc + + func m.global_marks() dict abort + return self.filter('v:val["mark"] =~# "[A-Z]"') + endfunc + + call m.update() + return m +endfunction + +" Teardown:{{{1 +"reset &cpo back to users setting +let &cpo = s:save_cpo +" vim: set sw=2 sts=2 et fdm=marker: + diff --git a/etc/soft/vim/vim/+plugins/vimple/autoload/vimple/options.vim b/etc/soft/vim/vim/+plugins/vimple/autoload/vimple/options.vim new file mode 100644 index 0000000..bcffa80 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/autoload/vimple/options.vim @@ -0,0 +1,209 @@ +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Vimple wrapper for options +" Maintainers: Barry Arthur +" Israel Chauca F. +" Description: Vimple object for Vim's options +" Last Change: 2012-04-08 +" License: Vim License (see :help license) +" Location: autoload/vimple/options.vim +" Website: https://github.com/dahu/vimple +" +" See vimple#options.txt for help. This can be accessed by doing: +" +" :helptags ~/.vim/doc +" :help vimple#options +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +" Vimscript Setup: {{{1 +" Allow use of line continuation. +let s:save_cpo = &cpo +set cpo&vim + +" load guard +" uncomment after plugin development +"if exists("g:loaded_lib_vimple") +" \ || v:version < 700 +" \ || v:version == 703 && !has('patch338') +" \ || &compatible +" let &cpo = s:save_cpo +" finish +"endif +"let g:loaded_lib_vimple = 1 + +function! vimple#options#new() + if exists('g:vimple#op') + return deepcopy(g:vimple#op).update() + endif + let op = {} + let op.__options = {} + let op.__filter = '' + let op.__update_with_map = 0 + + " update {{{2 + func op.update() dict abort + if self.__update_with_map + call map(self.__options, 'extend(v:val, {"value": eval("&".v:key)}, "force")') + " Preserve filter. + if !empty(self.__filter) + call filter(self.__options, self.__filter) + endif + return self + endif + + silent! options + let content = getline(1, '$') + close + bwipe option-window + + let long = '' + for l in content + if l =~ '^\s*\%(".*\)\?$' + continue + elseif l =~ '^\s*\d' + continue + elseif l =~ '^\w' + let [long, desc] = split(l, '\t') + let self.__options[long] = {} + let self.__options[long] = {'long' : long, 'desc' : desc} + elseif l =~ '^\t' + let self.__options[long].desc .= ' ' . matchstr(l, '^\t\zs.*') + else + if l =~ 'set \w\+=' + let l = substitute(l, '^ \tset \(\w\+\)=', ' string \1 ', '') + else + let l = substitute(l, '^ \tset \(\w\+\)\t\(\w\+\)', '\=" bool " . (submatch(1) !~? "^no" ? submatch(1) : submatch(2)) . " " . (submatch(1) !~? "^no")', '') + endif + let [type, short] = matchlist(l, '^ \(\w\+\) \(\w\+\)')[1:2] + call extend(self.__options[long], {'type' : type, 'short' : short, 'value': eval('&'.long)}) + endif + endfor + + for o in items(self.__options) + call extend(o[1], {'scope' : (o[1].desc =~ '(.\{-}local.\{-})' ? matchstr(o[1].desc, '(\zs.\{-}\ze)') : 'global')}) + call extend(self.__options, {o[1].short : o[1]}) + endfor + + " Preserve filter. + if !empty(self.__filter) + call filter(self.__options, self.__filter) + endif + let self.__update_with_map = 1 + return self + endfunc + + " to_d {{{2 + func op.to_d(...) dict + return self.__options + endfunc + + " to_l {{{2 + func op.to_l(...) dict + return map(items(self.__options), '[v:val[0], v:val[1].value]') + endfunc + + " to_s {{{2 + func op.to_s(...) dict + let default = "%-15l %-2p %1t %v\n" + let format = a:0 && a:1 != '' ? a:1 : default + let opts = a:0 > 1 ? a:2.__options : self.__options + let str = '' + for o in sort(items(opts)) + let str .= vimple#format( + \ format, + \ { 'l': ['s', o[1]['long']], + \ 's': ['s', o[1]['short']], + \ 'd': ['s', o[1]['desc']], + \ 'p': ['s', join(map(filter(split(o[1]['scope']), 'index(["or", "local", "to"], v:val) == -1'), 'strpart(v:val, 0, 1)'), '')], + \ 't': ['s', strpart(o[1]['type'], 0, 1)], + \ 'v': ['s', o[1]['value']]}, + \ default + \ ) + endfor + return str + endfunc + + " changed {{{2 + func op.changed() dict + return self.filter('v:val.value !=# eval("&".v:key)') + endfunc + + " short {{{2 + func op.short() dict + return self.filter('v:val.short ==# v:key') + endfunc + + " long {{{2 + func op.long() dict + return self.filter('v:val.long ==# v:key') + endfunc + + " print {{{2 + " only able to colour print the default to_s() output at this stage + func op.print() dict + "let str = self.to_s() + " following code is from hl.print() and would not work as is here + "let dta = map(split(str, "\n"), '[split(v:val, " ")[0], v:val . "\n"]') + "call vimple#echoc(dta) + let pairs = [] + let changed = self.changed() + let max_name = max(map(values(map(copy(self.__options), 'v:val.long." ".v:val.short.""')), 'len(v:val)')) + for key in sort(keys(self.long().__options)) + let option = self.__options[key] + call add(pairs, ['vimple_BL_Number', option.long]) + call add(pairs, ['Normal', ' (']) + call add(pairs, ['vimple_BL_Hidden', option.short]) + call add(pairs, ['Normal', ')' . repeat(' ', max_name - len(option.short) - len(option.long))]) + let len = len(option.value) + if len < &columns + call add(pairs, ['Normal', option.value . "\"]) + else + let screen_len = &columns - max_name - 6 + let i = 0 + while i <= len + let j = i + screen_len + call add(pairs, ['Normal', repeat(' ', i == 0 ? 0 : max_name + 3) . option.value[i : j] . "\"]) + let i = j + 1 + endwhile + endif + if has_key(changed.__options, key) + let len = len(eval('&'.key)) + if len < &columns + call add(pairs, ['vimple_BL_Alternate', repeat(' ', max_name + 3) . eval('&'.key) . "\"]) + else + let screen_len = &columns - max_name - 6 + let i = 0 + while i <= len + let j = i + screen_len + call add(pairs, ['vimple_BL_Alternate', repeat(' ', max_name + 3) . eval('&'.key)[i : j] . "\"]) + let i = j + 1 + endwhile + endif + endif + endfor + call vimple#echoc(pairs) + " Remove the last . Why? + let pairs[-1][1] = pairs[-1][-1][:-2] + return pairs + endfunc + + " filter {{{2 + func op.filter(filter) dict abort + let dict = deepcopy(self) + call filter(dict.__options, a:filter) + let dict.__filter .= (dict.__filter == '' ? '' : ' && ').a:filter + return dict + endfunc + + " filter_by_name {{{2 + func op.filter_by_name(name) dict abort + return self.filter('v:val["long"] =~ "' . escape(a:name, '"') . '"') + endfunc + + call op.update() + return op +endfunction + +" Teardown:{{{1 +"reset &cpo back to users setting +let &cpo = s:save_cpo +" vim: set sw=2 sts=2 et fdm=marker: diff --git a/etc/soft/vim/vim/+plugins/vimple/autoload/vimple/scriptnames.vim b/etc/soft/vim/vim/+plugins/vimple/autoload/vimple/scriptnames.vim new file mode 100644 index 0000000..571bd38 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/autoload/vimple/scriptnames.vim @@ -0,0 +1,100 @@ +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Vimple wrapper for :scriptnames builtin +" Maintainers: Barry Arthur +" Israel Chauca F. +" Description: Vimple object for Vim's builtin :scriptnames command. +" Last Change: 2012-04-08 +" License: Vim License (see :help license) +" Location: autoload/vimple/scriptnames.vim +" Website: https://github.com/dahu/vimple +" +" See vimple#scriptnames.txt for help. This can be accessed by doing: +" +" :helptags ~/.vim/doc +" :help vimple#scriptnames +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +" Vimscript Setup: {{{1 +" Allow use of line continuation. +let s:save_cpo = &cpo +set cpo&vim + +" load guard +" uncomment after plugin development +"if exists("g:loaded_lib_vimple") +" \ || v:version < 700 +" \ || v:version == 703 && !has('patch338') +" \ || &compatible +" let &cpo = s:save_cpo +" finish +"endif +"let g:loaded_lib_vimple = 1 + +" TODO: Use the Numerically sort comparator for print() + +function! vimple#scriptnames#new() + let sn = {} + let sn.__scripts = {} + let sn.__filter = '' + + " update {{{2 + func sn.update() dict abort + let self.__scripts = vimple#associate(vimple#redir('scriptnames'), + \ [['^\s*\(\d\+\):\s*\(.*\)$', + \ '\1,\2', '']], + \ ['split(v:val, ",")', '{"number": v:val[0], "script": v:val[1]}']) + return self + endfunc + + " to_l {{{2 + func sn.to_l(...) dict + return self.__scripts + endfunc + + " to_s {{{2 + func sn.to_s(...) dict + let default = "%3n %s\n" + "let format = default + let format = a:0 && a:1 != '' ? a:1 : default + let scripts = a:0 > 1 ? a:2.__scripts : self.__scripts + let str = '' + for i in range(0, len(scripts) - 1) + let str .= vimple#format( + \ format, + \ { 'n': ['d', scripts[i]['number']], + \ 's': ['s', scripts[i]['script']]}, + \ default + \ ) + endfor + return str + endfunc + + " print {{{2 + " only able to colour print the default to_s() output at this stage + " Note: This is a LOT of dancing just to get coloured numbers ;) + func sn.print() dict + call self.update() + call map(map(map(split(self.to_s(), '\n'), 'split(v:val, "\\d\\@<= ")'), '[["vimple_SN_Number", v:val[0]] , ["vimple_SN_Term", " : " . v:val[1] . "\n"]]'), 'vimple#echoc(v:val)') + endfunc + + " filter {{{2 + func sn.filter(filter) dict abort + let dict = deepcopy(self) + call filter(dict.__scripts, a:filter) + let dict.__filter .= (dict.__filter == '' ? '' : ' && ').a:filter + return dict + endfunc + + " filter_by_name {{{2 + func sn.filter_by_name(name) dict abort + return self.filter('v:val["script"] =~ "' . escape(a:name, '"') . '"') + endfunc + + call sn.update() + return sn +endfunction + +" Teardown:{{{1 +"reset &cpo back to users setting +let &cpo = s:save_cpo +" vim: set sw=2 sts=2 et fdm=marker: diff --git a/etc/soft/vim/vim/+plugins/vimple/autoload/vimple/undolist.vim b/etc/soft/vim/vim/+plugins/vimple/autoload/vimple/undolist.vim new file mode 100644 index 0000000..6149f33 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/autoload/vimple/undolist.vim @@ -0,0 +1,176 @@ +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Vimple wrapper for :undolist builtin +" Maintainers: Barry Arthur +" Israel Chauca F. +" Description: Vimple object for Vim's builtin :undolist command. +" Last Change: 2012-04-08 +" License: Vim License (see :help license) +" Location: autoload/vimple/scriptnames.vim +" Website: https://github.com/dahu/vimple +" +" See vimple#undolist.txt for help. This can be accessed by doing: +" +" :helptags ~/.vim/doc +" :help vimple#undolist +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +" Vimscript Setup: {{{1 +" Allow use of line continuation. +let s:save_cpo = &cpo +set cpo&vim + +" load guard +" uncomment after plugin development +"if exists("g:loaded_lib_vimple") +" \ || v:version < 700 +" \ || v:version == 703 && !has('patch338') +" \ || &compatible +" let &cpo = s:save_cpo +" finish +"endif +"let g:loaded_lib_vimple = 1 + +function! vimple#undolist#get_undolist() + let bnum = bufnr('%') + let bname = bufname('%') + let ulist = vimple#undolist#new() + if len(ulist.to_l()) != 0 + return [ulist.sort_by_age().to_l()[-1]['age'], bnum, bname] + else + return [99999999999, bnum, bname] + endif +endfunction + +function! vimple#undolist#most_recently_used() + let orig_pos = getpos('.') + let orig_pos[0] = bufnr('%') + + let uls = [] + bufdo call add(uls, vimple#undolist#get_undolist()) + call sort(uls) + + exe 'buffer ' . orig_pos[0] + let orig_pos[0] = 0 + call setpos('.', orig_pos) + return reverse(uls) +endfunction + +function! vimple#undolist#print_mru() + let mru = vimple#undolist#most_recently_used() + let str = '' + for buf in mru + let str .= printf("%3d %s\n", buf[1], buf[2]) + endfor + return str +endfunction + +nnoremap VimpleMRU :echo vimple#undolist#print_mru() . "\n":buffer +if !hasmapto('VimpleMRU') + nmap gu VimpleMRU +endif + +function! vimple#undolist#normalise_time(t, now) + let t = a:t + let now = a:now + if t =~? '^\d\+ ' + let now -= matchstr(t, '^\d*') + let time = strftime('%Y/%m/%d %H:%M:%S', now) + elseif t !~ '\/' + let time = strftime('%Y/%m/%d ', now) . t + elseif t !~ '\/.*\/' + let time = strftime('%Y/', now) . t + else + let time = t + endif + return time +endfunction + +function! vimple#undolist#julian_date(t) + let [year, mon, day] = matchlist(a:t, '^\(\d\{4}\)/\(\d\d\)/\(\d\d\)')[1:3] + let y = year + 4800 - (mon <= 2) + let m = mon + (mon <= 2 ? 9 : -3) + let jul = day + (153 * m + 2) / 5 + (1461 * y / 4) - 32083 + return jul - (y / 100) + (y / 400) + 38 +endfunction + +" in UTC +function! vimple#undolist#time_to_seconds(t, now) + let t = vimple#undolist#normalise_time(a:t, a:now) + let jd = vimple#undolist#julian_date(t) + let jd_linux = vimple#undolist#julian_date('1970/01/01 00:00:00') + let [hour, min, sec] = matchlist(t, ' \(\d\d\):\(\d\d\):\(\d\d\)')[1:3] + return (jd - jd_linux) * 86400 + hour * 3600 + min * 60 + sec +endfunction +. +function! vimple#undolist#new() + let m = {} + let m.__data = {} + let m.__filter = '' + + func m.update() dict abort + let now = localtime() + let self.__data = vimple#associate(vimple#redir('undolist')[1:-1], + \ [ + \ ['^\s*', '', ''], + \ ['\s\s\+', '__', 'g'] + \ ], + \ ['split(v:val, "__")', + \ '{"number" : v:val[0], + \ "changes" : v:val[1], + \ "when" : vimple#undolist#normalise_time(v:val[2], ' .now. '), + \ "age" : vimple#undolist#time_to_seconds(v:val[2], ' .now. '), + \ "saved" : len(v:val) == 4 ? v:val[3] : 0 + \ }']) + + return self + endfunc + + func m.to_s(...) dict + let default = "%4n %4h %4s %w\n" + let format = a:0 && a:1 != '' ? a:1 : default + let data = a:0 > 1 ? a:2.__data : self.__data + let str = '' + for i in range(0, len(data) - 1) + let str .= vimple#format( + \ format, + \ { 'n': ['d', data[i]['number']], + \ 'h': ['d', data[i]['changes']], + \ 'w': ['s', data[i]['when']], + \ 'a': ['d', data[i]['age']], + \ 's': ['d', data[i]['saved']]}, + \ default + \ ) + endfor + return str + endfunc + + func m.agely(a, b) dict + return a:a['age'] - a:b['age'] + endfunc + + func m.sort_by_age() dict + let Fn_age = self.agely + call sort(self.__data, Fn_age, self) + return self + endfunc + + func m.to_l() dict + return self.__data + endfunc + + "TODO: This looks like a candidate for moving into the parent class... no? + func m.filter(filter) dict abort + let dict = deepcopy(self) + call filter(dict.__data, a:filter) + let dict.__filter .= (dict.__filter == '' ? '' : ' && ').a:filter + return dict + endfunc + + call m.update() + return m +endfunction + +" Teardown:{{{1 +"reset &cpo back to users setting +let &cpo = s:save_cpo +" vim: set sw=2 sts=2 et fdm=marker: diff --git a/etc/soft/vim/vim/+plugins/vimple/autoload/vimple/version.vim b/etc/soft/vim/vim/+plugins/vimple/autoload/vimple/version.vim new file mode 100644 index 0000000..abb3e0c --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/autoload/vimple/version.vim @@ -0,0 +1,115 @@ +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Vimple wrapper for :version builtin +" Maintainers: Barry Arthur +" Israel Chauca F. +" Description: Vimple object for Vim's builtin :version command. +" Last Change: 2012-04-08 +" License: Vim License (see :help license) +" Location: autoload/vimple/version.vim +" Website: https://github.com/dahu/vimple +" +" See vimple#version.txt for help. This can be accessed by doing: +" +" :helptags ~/.vim/doc +" :help vimple#version +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +" Vimscript Setup: {{{1 +" Allow use of line continuation. +let s:save_cpo = &cpo +set cpo&vim + +" load guard +" uncomment after plugin development +"if exists("g:loaded_lib_vimple") +" \ || v:version < 700 +" \ || v:version == 703 && !has('patch338') +" \ || &compatible +" let &cpo = s:save_cpo +" finish +"endif +"let g:loaded_lib_vimple = 1 + +function! vimple#version#new() + let vn = {} + let vn.__info = {} + let vn.__filter = '' + + " update {{{2 + func vn.update() dict abort + let i = self.__info + let info = vimple#associate(vimple#redir('version'), [], []) + + let [i['version'], i['major'], i['minor'], i['build_name'], i['compiled']] = + \ split( + \ substitute(info[0] + \ , '^N\?VIM.\{-}\(\(\d\+\)\.\(\d\+\)\).\{-}' + \ . '(\(.\{-}\)\%(,\s\+\S\+\s\+\(.\{-}\)\)\?)' + \ , '\1\n\2\n\3\n\4\n\5', '') + \ , "\n", 1) + let i['patches'] = substitute(info[1], '^.*:\s\+\(.*\)', '\1', '') + let i['compiled_by'] = info[2] + let i['build_version'] = substitute(info[3], '^\(.\{-}\)\..*', '\1', '') + let i['features'] = {} + for line in range(4, len(info)) + if (info[line] =~ '^\s*$') || (info[line] =~ '^\s\+.*:\s') + break + endif + call map(split(info[line], '\s\+'), + \ 'extend(i["features"], {strpart(v:val, 1) : (v:val =~ "^+" ? 1 : 0)})') + endfor + return self + endfunc + + " to_l {{{2 + func vn.to_l(...) dict + return self.__info + endfunc + + " " to_s {{{2 + " func vn.to_s(...) dict + " let default = "%3n %s\n" + " "let format = default + " let format = a:0 && a:1 != '' ? a:1 : default + " let scripts = a:0 > 1 ? a:2.__info : self.__info + " let str = '' + " for i in range(0, len(scripts) - 1) + " let str .= vimple#format( + " \ format, + " \ { 'n': ['d', scripts[i]['number']], + " \ 's': ['s', scripts[i]['script']]}, + " \ default + " \ ) + " endfor + " return str + " endfunc + + " " print {{{2 + " " only able to colour print the default to_s() output at this stage + " " Note: This is a LOT of dancing just to get coloured numbers ;) + " func vn.print() dict + " call self.update() + " call map(map(map(split(self.to_s(), '\n'), 'split(v:val, "\\d\\@<= ")'), '[["vimple_SN_Number", v:val[0]] , ["vimple_SN_Term", " : " . v:val[1] . "\n"]]'), 'vimple#echoc(v:val)') + " endfunc + + " filter {{{2 + func vn.filter(filter) dict abort + let dict = deepcopy(self) + call filter(dict.__info["features"], a:filter) + let dict.__filter .= (dict.__filter == '' ? '' : ' && ').a:filter + return dict + endfunc + + " filter_by_name {{{2 + func vn.filter_by_name(name) dict abort + return self.filter('v:key =~ "' . escape(a:name, '"') . '"') + endfunc + + call vn.update() + return vn +endfunction + +" Teardown:{{{1 +"reset &cpo back to users setting +let &cpo = s:save_cpo +" vim: set sw=2 sts=2 et fdm=marker: diff --git a/etc/soft/vim/vim/+plugins/vimple/demo/bufgrep.vim b/etc/soft/vim/vim/+plugins/vimple/demo/bufgrep.vim new file mode 100644 index 0000000..2595419 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/demo/bufgrep.vim @@ -0,0 +1,47 @@ +" Wanna grep your buffer and be able to jump to one of the matches quickly? +" +" Use bg or the :G command + +" In the overlay window: +" You're prompted with a filter pattern. Use to cancel. +" jumps to the current-line match +" q closes the overlay without action + +function! BufGrep(pattern) + let pattern = a:pattern + let fc = pattern[0] + let lc = pattern[-1] + if fc !~ '[[:punct:]]' + let fc = '/' + let lc = '/' + elseif fc != lc + let lc = fc + let pattern = pattern[1:] + else + let pattern = pattern[1:-2] + endif + let pattern = escape(pattern, fc) + + let data = vimple#redir('global ' . fc . pattern . lc . '#') + if data[0] =~ 'Pattern not found:' + echohl Warning + echo data[0] + echohl None + return + endif + call overlay#show( + \ data + \, { + \ '' : ':call BufGrepAccept()' + \ , 'q' : ':call overlay#close()' + \ } + \, {'filter' : 1, 'use_split' : 1}) +endfunction + +function! BufGrepAccept() + let num = matchstr(overlay#select_line(), '\d\+') + exe 'silent! norm! ' . num . "G" +endfunction + +nnoremap bg :call BufGrep(input('', '/')) +command! -nargs=* G call BufGrep() diff --git a/etc/soft/vim/vim/+plugins/vimple/demo/calendar.vim b/etc/soft/vim/vim/+plugins/vimple/demo/calendar.vim new file mode 100644 index 0000000..8cc4e7e --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/demo/calendar.vim @@ -0,0 +1,89 @@ +" Interactive Calendar overlay demo +" NOTE: Depends on system 'cal' tool. +" In the overlay window: +" inserts the date as YYYY-MM-DD from the day under the cursor. +" moves back one month +" moves forward one month +" moves back one year +" moves forward one year +" q closes the overlay without action + +" functions {{{1 + +function! GetCalendar(month, year) "{{{2 + let calendar = split(substitute(substitute(substitute(system('cal ' . a:month . ' ' . a:year), '\n', '\n ', 'g'), '_ _', '*', ''), '\s\+\_$', '', 'g'), "\n") + return calendar +endfunction + +function! Calendar(month, year) "{{{2 + call overlay#show( + \ GetCalendar(a:month, a:year) + \, { + \ '' : ':call CalendarAccept()' + \ , '' : ':call CalendarUpdate("m", 1)' + \ , '' : ':call CalendarUpdate("m", -1)' + \ , '' : ':call CalendarUpdate("y", 1)' + \ , '' : ':call CalendarUpdate("y", -1)' + \ , 'q' : ':call overlay#close()' + \ } + \, {'filter' : 0, 'use_split' : 1, 'month' : a:month, 'year' : a:year}) + syntax match Today '\*\d\+' + highlight def link Today TODO +endfunction + +function! CalendarUpdate(time, amount) "{{{2 + if a:time == 'm' + let b:options.month += a:amount + else + let b:options.year += a:amount + endif + call overlay#update(GetCalendar(b:options.month, b:options.year)) +endfunction + +function! CalendarAccept() "{{{2 + let day = expand('') + let date = b:options.year . '-' . printf('%02d', b:options.month) . '-' . printf('%02d', day) + call overlay#close() + if exists('g:insertlessly_cleanup_trailing_ws') + let insertlessly_cleanup_trailing_ws = g:insertlessly_cleanup_trailing_ws + let insertlessly_cleanup_all_ws = g:insertlessly_cleanup_all_ws + let g:insertlessly_cleanup_trailing_ws = 0 + let g:insertlessly_cleanup_all_ws = 0 + endif + if exists('b:cal_mode') + let cal_mode = b:cal_mode + unlet b:cal_mode + else + let cal_mode = 'i' + endif + if cal_mode ==# 'I' + exe 'norm! a' . date . ' ' + startinsert + call feedkeys("\l") + elseif cal_mode ==# 'i' + exe 'norm! i' . date + elseif cal_mode ==# 'a' + exe 'norm! a' . date + elseif cal_mode ==# 'c' + exe 'norm! ciW' . date + endif + if exists('g:insertlessly_cleanup_trailing_ws') + let g:insertlessly_cleanup_trailing_ws = insertlessly_cleanup_trailing_ws + let g:insertlessly_cleanup_all_ws = insertlessly_cleanup_all_ws + endif + let b:date = date + return date +endfunction + +function! CalendarToday() "{{{2 + return Calendar(strftime('%m'), strftime('%Y')) +endfunction + +" maps {{{1 + +inoremap :let b:cal_mode='I':call CalendarToday() +nnoremap dda :let b:cal_mode='a':call CalendarToday() +nnoremap ddi :let b:cal_mode='i':call CalendarToday() +nnoremap ddc :let b:cal_mode='c':call CalendarToday() + +" vim: fen fdm=marker diff --git a/etc/soft/vim/vim/+plugins/vimple/demo/changelist.vim b/etc/soft/vim/vim/+plugins/vimple/demo/changelist.vim new file mode 100644 index 0000000..e915d60 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/demo/changelist.vim @@ -0,0 +1,63 @@ +" Think :changes could be a bit sexier? +" +" Use g; or :Changes to enter the changelist overlay + +" In the overlay window: +" You're prompted with a filter pattern. Use to cancel. +" jumps to the current entry +" q closes the overlay without action + +function! ChangeListData() + let data = reverse(vimple#redir('changes')[1:]) + let files = {} + let lines = [] + for d in data + if d == '>' + call add(lines, "x 0\t<-- At changelist head") + continue + endif + let [n, l, c; t] = split(matchstr(d, '^>\?\zs.*'), '\s\+') + let tt = join(t, ' ') + let type = 'l' + if (tt != '') && (filereadable(tt) || (bufnr(tt) != -1)) + let type = 'f' + if has_key(files, tt) + continue + endif + let files[tt] = 1 + endif + call add(lines, join([type, n, l], ' ') . "\t" . tt) + endfor + return lines +endfunction + +function! ChangeList() + call overlay#show( + \ ChangeListData() + \, { + \ '' : ':call ChangeListAccept()' + \ , 'q' : ':call overlay#close()' + \ } + \, {'filter' : 0, 'use_split' : 1}) + call search('^.\s*0', 'w') + set syntax=vimple_jumplist + setlocal conceallevel=2 concealcursor=nv tabstop=12 +endfunction + +function! ChangeListAccept() + let l = line('.') + let cur = search('^.\s*0', 'wn') + if l == cur + call overlay#close() + return + else + let lst = overlay#select_buffer() + let num = matchstr(lst[l-1], '\d\+') + let dir = (l > cur) ? "g;" : "g," + exe 'silent! norm! ' . num . dir + endif +endfunction + +nnoremap g; :call ChangeList() +nnoremap g, :call ChangeList() +command! -nargs=0 Changes call ChangeList() diff --git a/etc/soft/vim/vim/+plugins/vimple/demo/global_marks.vim b/etc/soft/vim/vim/+plugins/vimple/demo/global_marks.vim new file mode 100644 index 0000000..8d9ad14 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/demo/global_marks.vim @@ -0,0 +1,26 @@ +" Wish you could jump to a global mark that's already open in another tabpage? + +" Ensure that: +" set swb+=useopen,usetab + +" In the overlay window: +" does a sbuffer to the current-line global-mark's filename +" q closes the overlay without action + +function! GlobalMarks() + let data = split(g:vimple#ma.update().global_marks().to_s(), "\n") + call overlay#show( + \ data + \, { + \ '' : ':call GlobalMarksAccept()' + \ , 'q' : ':call overlay#close()' + \ } + \, {'filter' : 0, 'use_split' : 1}) +endfunction + +function! GlobalMarksAccept() + let file = matchstr(overlay#select_line(), '\s\zs\S\+$') + silent! exe 'sbuffer ' . file +endfunction + +nnoremap gg' :call GlobalMarks() diff --git a/etc/soft/vim/vim/+plugins/vimple/demo/helptoc.vim b/etc/soft/vim/vim/+plugins/vimple/demo/helptoc.vim new file mode 100644 index 0000000..503192f --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/demo/helptoc.vim @@ -0,0 +1,32 @@ +" Jump to a help-tag entry in the current help file + +" In the overlay window: +" You're prompted with a filter pattern. Use to cancel. +" jumps to the tag beneath the cursor +" q closes the overlay without action + +" functions {{{1 + +function! HelpTOC() "{{{2 + call overlay#show( + \ list#lspread(map(filter(string#scanner(getline(1, '$')).collect('\*\S\+\*'), 'v:val =~ "[a-z]"'), 'strpart(v:val, 1, len(v:val)-2)'), 3) + \, { + \ '' : ':exe "tag " . HelpTOCAccept()' + \ , 'q' : ':call overlay#close()' + \ } + \, {'filter' : 1, 'use_split' : 1, 'setlocal tabstop=50' :-0}) +endfunction + +function! HelpTOCAccept() + let line = getline('.') + let idx = strlen(substitute(line[:col('.')], '[^\t]', '', 'g')) + let word_list = split(line, '\t') + call overlay#close() + return word_list[idx] +endfunction + +" maps {{{1 + +nnoremap t :call HelpTOC() + +" vim: fen fdm=marker diff --git a/etc/soft/vim/vim/+plugins/vimple/demo/iabbrevs.vim b/etc/soft/vim/vim/+plugins/vimple/demo/iabbrevs.vim new file mode 100644 index 0000000..b6e2f81 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/demo/iabbrevs.vim @@ -0,0 +1,29 @@ +" Wanna choose from a list of abbreviations? + +" In the overlay window: +" inserts the currently selected abbreviation expansion +" q closes the overlay without action + +" functions {{{1 + +function! Abbreviations() "{{{2 + call overlay#show( + \ map(g:vimple#ab.update().to_l(), 'v:val["expansion"]') + \, { + \ '' : ':call AbbreviationsAccept()' + \ , 'q' : ':call overlay#close()' + \ } + \, {'filter' : 0, 'use_split' : 1}) +endfunction + +function! AbbreviationsAccept() "{{{2 + let line = overlay#select_line() + exe 'norm! a' . line . " \l" + startinsert +endfunction + +" maps {{{1 + +inoremap _ :call Abbreviations() + +" vim: fen fdm=marker diff --git a/etc/soft/vim/vim/+plugins/vimple/demo/identsearch.vim b/etc/soft/vim/vim/+plugins/vimple/demo/identsearch.vim new file mode 100644 index 0000000..1b50f9e --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/demo/identsearch.vim @@ -0,0 +1,34 @@ +" Are you bored with vanilla [I ? +" Did the improvement above :help [i excite you only briefly? +" Want a better experience? +" Overlay is here for you. + +" In the overlay window: +" You're prompted with a filter pattern. Use to cancel. +" jumps to the current-line ident-search match +" q closes the overlay without action + +function! IdentSearch() + try + let data = vimple#redir('norm! [I') + catch '^Vim\%((\a\+)\)\=:E389:' + echohl Warning + echom 'Could not find pattern' + echohl None + return + endtry + call overlay#show( + \ data + \, { + \ '' : ':call IdentSearchAccept()' + \ , 'q' : ':call overlay#close()' + \ } + \, {'filter' : 1, 'use_split' : 1}) +endfunction + +function! IdentSearchAccept() + let num = matchstr(overlay#select_line(), '\d\+') + exe 'silent! norm! ' . num . "[\t" +endfunction + +nnoremap [I :call IdentSearch() diff --git a/etc/soft/vim/vim/+plugins/vimple/demo/jumplist.vim b/etc/soft/vim/vim/+plugins/vimple/demo/jumplist.vim new file mode 100644 index 0000000..5afb832 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/demo/jumplist.vim @@ -0,0 +1,63 @@ +" Think :jumps could be a bit sexier? +" +" Use or :Jumps to enter the jumplist overlay + +" In the overlay window: +" You're prompted with a filter pattern. Use to cancel. +" jumps to the current entry +" q closes the overlay without action + +function! JumpListData() + let data = reverse(vimple#redir('jumps')[1:]) + let files = {} + let lines = [] + for d in data + if d == '>' + call add(lines, "x 0\t<-- At jumplist head") + continue + endif + let [n, l, c; t] = split(matchstr(d, '^>\?\zs.*'), '\s\+') + let tt = join(t, ' ') + let type = 'l' + if (tt != '') && (filereadable(tt) || (bufnr(tt) != -1)) + let type = 'f' + if has_key(files, tt) + continue + endif + let files[tt] = 1 + endif + call add(lines, join([type, n, l], ' ') . "\t" . tt) + endfor + return lines +endfunction + +function! JumpList() + call overlay#show( + \ JumpListData() + \, { + \ '' : ':call JumpListAccept()' + \ , 'q' : ':call overlay#close()' + \ } + \, {'filter' : 0, 'use_split' : 1}) + call search('^.\s*0', 'w') + set syntax=vimple_jumplist + setlocal conceallevel=2 concealcursor=nv tabstop=12 +endfunction + +function! JumpListAccept() + let l = line('.') + let cur = search('^.\s*0', 'wn') + if l == cur + call overlay#close() + return + else + let lst = overlay#select_buffer() + let num = matchstr(lst[l-1], '\d\+') + let dir = (l > cur) ? "\" : "\" + exe 'silent! norm! ' . num . dir + endif +endfunction + +nnoremap :call JumpList() +nnoremap :call JumpList() +command! -nargs=0 Jumps call JumpList() diff --git a/etc/soft/vim/vim/+plugins/vimple/demo/oldfiles.vim b/etc/soft/vim/vim/+plugins/vimple/demo/oldfiles.vim new file mode 100644 index 0000000..abe4012 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/demo/oldfiles.vim @@ -0,0 +1,22 @@ +" Better navigation of :oldfiles + +" In the overlay window: +" loads the file under the cursor +" q closes the overlay without action + +function! Oldfiles() + call overlay#show( + \ vimple#redir('oldfiles') + \, { + \ '' : ':call OldfilesAccept()' + \ , 'q' : ':call overlay#close()' + \ } + \, {'filter' : 1, 'use_split' : 1}) +endfunction + +function! OldfilesAccept() + let old_file_number = matchstr(overlay#select_line(), '^\d\+') + exe 'edit #<' . old_file_number +endfunction + +command! -nargs=0 Oldfiles call Oldfiles() diff --git a/etc/soft/vim/vim/+plugins/vimple/demo/spellsuggest.vim b/etc/soft/vim/vim/+plugins/vimple/demo/spellsuggest.vim new file mode 100644 index 0000000..bfa2bcf --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/demo/spellsuggest.vim @@ -0,0 +1,45 @@ +" Are you bored with vanilla z= ? + +" In the overlay window: +" replaces current word with word under cursor +" q closes the overlay without action + +" functions {{{1 + +function! GetSuggestions(ident) "{{{2 + let spell = &spell + if ! spell + set spell + endif + let suggestions = list#lspread(spellsuggest(a:ident), 5) + if ! spell + set nospell + endif + return suggestions +endfunction + +function! SpellSuggest(ident) "{{{2 + call overlay#show( + \ GetSuggestions(a:ident) + \, { + \ '' : ':call SpellSuggestAccept()' + \ , 'q' : ':call overlay#close()' + \ } + \, {'filter' : 0, 'use_split' : 1}) +endfunction + +function! SpellSuggestAccept() "{{{2 + let line = getline('.') + let idx = strlen(substitute(line[:col('.')], '[^\t]', '', 'g')) + let word_list = split(line, '\t') + call overlay#close() + let [r1, r2] = [@@, @-] + exe 'norm! ciw' . word_list[idx] + let [@@, @-] = [r1, r2] +endfunction + +" maps {{{1 + +nnoremap z= :call SpellSuggest(expand('')) + +" vim: fen fdm=marker diff --git a/etc/soft/vim/vim/+plugins/vimple/demo/tagkinds.vim b/etc/soft/vim/vim/+plugins/vimple/demo/tagkinds.vim new file mode 100644 index 0000000..d979287 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/demo/tagkinds.vim @@ -0,0 +1,24 @@ +" TagKind shows an overlay containing the kind of tag requested + +" In the overlay window: +" jumps to the current-line tag name +" q closes the overlay without action + +function! TagKind(kind) + let tags = sort(map(filter(taglist('.'), 'v:val.kind == "' . a:kind . '"'), 'v:val.name')) + call overlay#show( + \ tags + \, { + \ '' : ':call TagKindAccept()' + \ , 'q' : ':call overlay#close()' + \ } + \, {'filter' : 0, 'use_split' : 1}) +endfunction + +function! TagKindAccept() + let tag = overlay#select_line() + exe 'tjump ' . tag +endfunction + +nnoremap tc :call TagKind('c') +nnoremap tf :call TagKind('f') diff --git a/etc/soft/vim/vim/+plugins/vimple/demo/tagsearch.vim b/etc/soft/vim/vim/+plugins/vimple/demo/tagsearch.vim new file mode 100644 index 0000000..1b115d0 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/demo/tagsearch.vim @@ -0,0 +1,41 @@ +" Are you bored with vanilla g] ? +" Did the improvement above :help g] excite you only briefly? +" Want a better experience? +" Overlay is here for you. + +" In the overlay window: +" You're prompted with a filter pattern. Use to cancel. +" jumps to the current-line tag-search match +" q closes the overlay without action + +function! TagSearch() + let ident = expand('') + let s:tags = taglist(ident) + if empty(s:tags) + echohl Warning + echom 'Tag not found: ' . ident + echohl None + return + endif + let data = map(copy(s:tags), 'v:key . " " . v:val.name . "\t" . v:val.filename') + call overlay#show( + \ data + \, { + \ '' : ':call TagSearchAccept()' + \ , 'q' : ':call overlay#close()' + \ } + \, {'filter' : 1, 'use_split' : 1}) +endfunction + +function! TagSearchAccept() + let ident = matchstr(overlay#select_line(), '^\d\+') + let fname = s:tags[ident].filename + if bufnr(fname) == -1 + exec 'edit ' . fname + else + exec 'buffer ' . fname + endif + silent! exe s:tags[ident].cmd +endfunction + +nnoremap g] :call TagSearch() diff --git a/etc/soft/vim/vim/+plugins/vimple/doc/vimple.txt b/etc/soft/vim/vim/+plugins/vimple/doc/vimple.txt new file mode 100644 index 0000000..3cf8204 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/doc/vimple.txt @@ -0,0 +1,316 @@ +*vimple.txt* Programmatic access to Vim's read-only command output. + + + VIM REFERENCE MANUAL by Barry Arthur + + +Help on using vimple *vimple* + +1. Introduction |vimple-intro| +2. View |vimple-view-command| +3. Collect |vimple-collect-command| +4. GCollect |vimple-gcollect-function| +5. GCCollect |vimple-gccollect-function| +6. MyMaps |vimple-mymaps-command| +7. ReadIntoBuffer |vimple-readintobuffer-command| +8. Filter |vimple-filter-command| +9. QFdo |vimple-quickfix-commands| +10. BufDo |vimple-bufdo-commands| +11. Overlay Tools |vimple-overlay-tools| +12. Scope |vimple-scope| +13. Custom Insert-mode Completers |vimple-completers| + + +============================================================================== + 1. INTRODUCTION *vimple-intro* + +Vimple provides VimLOO (Object-oriented VimL) objects for several +built-in commands, such as: + +* ls / buffers -> vimple#bl +* scriptnames -> vimple#sn +* highlight -> vimple#hl +* version -> vimple#vn +* marks -> vimple#ma +* maps -> vimple#mp +* undolist -> vimple#ul + +These objects all support at least the following three methods: + +* update() -> refresh the object's data +* to_s() -> return a string representation fit for :echo +* to_l() -> return a list representation + +Vimple also provides the following two utility commands to make it +easier to work with Vim's command output: + +============================================================================== + 2. VIEW *:View* *vimple-view-command* +> + :View +< +View will show the output of the given command in a split window. +Having the output in a buffer makes it easily searchable and +modifiable. This command is great if all you want to do is quickly +check for the existance of somthing within the messy formatted output +of a command, or if you need to elaborately massage the output for +some reason. Being in a Vim buffer, you have all of Vim's editing +tools at your disposal. + +By default, :View will prompt you for a pattern to filter the results by. If +you want to disable this default behaviour, add a line like this to your +|$MYVIMRC|: +> + let vimple_auto_filter = [] +< or > + let vimple_auto_filter = ['vfm'] +< (if you want auto-filter in VFM but not :View) + +============================================================================== + 3. COLLECT *:Collect* *vimple-collect-command* +> + :Collect +< +Collect is useful for grabbing the command's output into a named +register or variable. This is useful for doing further programmatic +manipulations on the data. If the first argument is a single letter +[a-z] then it is treated as the corresponding register to save the +command output into. If you want to save the command output into a +variable, use a fully scoped variable, like: +> + :Collect g:regs registers +< +============================================================================== + 4. GCollect() *GCollect()* *vimple-gcollect-function* +> + GCollect( pattern ) +< +Uses "pattern" in a :global /pattern/ command and returns the results as a +list of lines. +> + :echo GCollect('^\s*===\s*') +< +============================================================================== + 5. GCCollect() *CGCollect()* *vimple-gccollect-function* +> + GCCollect( pattern ) +< +Uses "pattern" in a :global /pattern/ command and returns the results as a +list of lines with the "pattern" stripped. +> + :echo GCCollect('^\s*===\s*') + +============================================================================== + 6. MYMAPS *:MyMaps* *vimple-mymaps-command* +> + :MyMaps +< +Will show in a new buffer your curently active maps (:map and :map!). The maps +are displayed slightly differently to the builtin commands in that the map +special indicators (*, & and @) are shown immediately after the mode indicator +at the start of the map. maps (where appears in the +lefthand-side) are removed for clarity, and the maps are sorted in an attempt +to group related maps together. + +============================================================================== + 7. READINTOBUFFER *:ReadIntoBuffer* *vimple-readintobuffer-command* +> + :ReadIntoBuffer +< +For those times when you'd like to read in a subset of lines from a file. +> + :ReadIntoBuffer foo 5 10 +< +Will grab six lines (5 through 10, both inclusive) from file 'foo' into the +current file beneath the current line (as |:read| does). + + +It defaults to the current line, but you can specify another: +> + :7 ReadIntoBuffer foo 5 10 +< +Will grab six lines (5 through 10, both inclusive) from file 'foo' into the +current file beneath line seven (which means it starts on line 8 - the start +range in this command is exclusive; the end range (shown next) is inclusive.) + + +And you can limit the insertion range too: +> + :7,9 ReadIntoBuffer foo 5 10 +< +Will grab two lines (5 and 6) from file 'foo' into the current file beneath +line seven (therefore occupying lines 8 and 9 in the current buffer). + +The usefulness of being able to limit the range at both ends is debatable, but +if I didn't I'd get requests to do so, surely. + +============================================================================== + 8. FILTER *:Filter* *vimple-filter-command* +> + :Filter +< +The :Filter command behaves like an interactive :g/re/p on the current buffer. +Only matching lines are shown, with non-matching ones being filtered out. + +WARNING: This command alters your buffer contents. Using it from within a + buffer you don't intend to filter is ill advised. + + +NEW!: :Filter is now even fuzzier! That's right! Put _down_ your hair-drier, + because :Filter now automatically inserts `.*` whenever you press ! + Awesomes, right? Searching for /some/long/path/to/file.boring?! + Make it fun with s l p t f \o/ + +The :Filter command is heavily used by the |VimFindsMe| plugin from within its +browse window. + +============================================================================== + 9. QUICKFIX COMMANDS *vimple-quickfix-commands* + *QFdo* +NOTE: The location-list analogue for the QuickFix commands start with LL + +> + :QFdo + :LLdo +< +The :QFdo command performs the series of bar-separated ex-commands over the +buffers in the QuickFix list. + +Example: +> + :vimgrep /prince/j **/*.txt + :QFdo %s/Vim/frog/g +< +Will change all princes into frogs recursively throughout your txt files. + +NOTE: If you have the (https://github.com/dahu/grope) Grope plugin (which uses + the |location-list|, this is even easier: +> + :Grope /prince/ @@txt + :LLdo %s/Vim/frog/g +< + +> + :QFbufs + :LLbufs +< +Returns the unique list of buffer names within the QuickFix / Location list. + +> + :QFargs + :QFargslocal + :LLargs + :LLargslocal +< +Sets the |:args| or |:arglocal| from the relevant list. + +Example: +> + :vimgrep /prince/j **/*.txt + :tabnew | QFargslocal +< +Will open a new tab-page and set the local argument list to the unique set of +buffers contained within the QuickFix list. + + +============================================================================== + 10. BUFDO COMMANDS *vimple-bufdo-commands* + *BufDo* *BufTypeDo* *BufMatchDo* + +Example: +> + :BufTypeDo vim %s/func\\>\\ze/&tion/e +< + +Will replace 'func' with 'function' in all VIM files. + +Note the use of the 'e' |s_flags| to ignore errors where the search term +doesn't exist in a file. + +Example: +> + :Nexus 1 1 + :BufMatchDo test g/Test/s/\\d\\+/\\=Nexus() +< + +Will re-number the test cases in all files containing 'test' in their filename. + +NOTE: This example depends on https://github.com/dahu/Nexus + + +============================================================================== + 11. OVERLAY TOOLS *vimple-overlay-tools* + *vimple-z=* *vimple-[I* *vimple-g]* + +|z=| + +Shows |spell| suggestions in an overlay window. Pressing `` +will replace the word under the cursor in the original window with the +current word under the cursor in the overlay. + +Use `vimple_spell_suggest` if you want to map this behaviour +to a differnt key. + +|[I| + +Shows |ident-search| results in an overlay window. Pressing `` +will jump to the associated line of the identifier under the cursor. + +Use `vimple_ident_search` if you want to map this behaviour +to a differnt key. + +|g]| + +Shows |tag| search results in an overlay window. Pressing `` +will jump to the associated line of the tag under the cursor. + +Use `vimple_tag_search` if you want to map this behaviour +to a differnt key. + + + +============================================================================== + 12. SCOPE *vimple-scope* + +The Scope() function attempts to show the current function or class/method +scope. Some people like to display this information in their `statusline`, +like: +> + set statusline=%f%m%r%h%w\ [%n:%{&ff}/%Y]\%{Scope()}%=[0x\%04.4B][%03v][%p%%\ line\ %l\ of\ %L] +< + +Currently only Vim & Python (and Python only for testing purposes, created by +a NON Pythonista -- patches welcome) have been implemented, but it is very +easy for you to write scope functions for your own filetypes. Take Ruby for +example: Create `~/.vim/ftplugin/ruby_scope.vim` like this: + +---- +function! Scope_ruby() + let class_scope = scope#inspect('^\s*class\s\+\([a-zA-Z0-9_.]\+\)', '^\s*end') + let method_scope = scope#inspect('^\s*def\s\+\([a-zA-Z0-9_.]\+\)', '^\s*end') + return ' ' . join(map(class_scope.stack, 'v:val.head_line_number . "," . v:val.tail_line_number . " " . v:val.head_string'), ' :: ') + \. ' >> ' . join(map(method_scope.stack, 'v:val.head_line_number . "," . v:val.tail_line_number . " " . v:val.head_string'), ' > ') +endfunction +---- + +NOTE: The above example for Ruby is woefully inadequate. A better effect might +be achievable with more context in the regex patterns. The patterns in +`syntax/ruby.vim` might be useful. Parsing with regex is futile. + + +============================================================================== + 13. COMPOSABLE COMPLETIONS *vimple-completers* + *vimple-jj* + + +By default, `jj` in insert mode activates a user-extendible meta-completion +list. The default list includes abbreviations (if you have +https://github.com/dahu/Aboriginal), some date-time patterns and the built-in +dictionary completion (``). + +The default `jj` can be overridden like this: +> + imap vimple_completers_trigger +< + + vim:tw=78:ts=8:ft=help:norl: diff --git a/etc/soft/vim/vim/+plugins/vimple/doc/vimple_ls.txt b/etc/soft/vim/vim/+plugins/vimple/doc/vimple_ls.txt new file mode 100644 index 0000000..289f31a --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/doc/vimple_ls.txt @@ -0,0 +1,344 @@ +*vimple#ls.txt* Plugin for accessing the :ls info programatically + + + VIM REFERENCE MANUAL by Barry Arthur + + +Help on using vimple#ls *vimple#ls* + +1. The Vimple Architecture |vimple#ls-architecture| +2. The Buffer List Object |vimple#ls-object| +3. Public Methods |vimple#ls-public_methods| +4. Plugins Using Vimple Buffer List |vimple#ls-plugins| + +============================================================================== + 1. THE VIMPLE ARCHITECTURE *vimple#ls-architecture* + +|Vimple| uses VimLOO (Object Oriented VimL) and so returns Objects which +contain methods to update and manipulate them. See OBJECT ORIENTED PROGRAMMING +in section |41.8| to learn more about VimLOO. + +============================================================================== + 2. THE BUFFER LIST OBJECT *vimple#ls-object* + +The Vimple Buffer List provides a scriptable interface to Vim's |:buffers| (or +|:ls|) command. + + *vimple#ls-constructor* +Constructor~ + +To instantiate a new vimple#ls object: +> + :let bl = vimple#ls#new() +< + +This will create a globally accessible object called: +> + bl +< + + 3. BUFFER LIST PUBLIC METHODS *vimple#ls-public-methods* + *vimple#ls-update()* +------------------------------------------------------------------------------ +Args: NONE~ + +Overview:~ + + Refreshes the object's internal buffer list data structure. + +Synopsis:~ +> + :call vimple#bl.update() +< +Description:~ + +Use this method to update the vimple#bl object's knowledge of Vim's +current buffer state. If you open new files or use |:bdelete| or |:bwipeout| +to remove buffers, you will need to manually update your vimple#ls +objects to reflect those changes. The need to call this manually for certain +vimple#ls calls might be removed in future versions. + +Return:~ + +The bl object which allows chaining of vimple#ls methods, like: +> + :echo vimple#bl.update().to_s() +< + + *vimple#ls-to_s()* +------------------------------------------------------------------------------ +Args: [format]~ + +Overview:~ + + Returns a string representation of the buffer list. + +Synopsis:~ +> + :echo vimple#bl.to_s( ... ) +< +Description:~ + +This method returns a simple textual representation of the buffer list. The +default (without arguments) tries to emulate the layout of the builtin |:ls| +output. This method should be used with Vim's :echo or :let statements, like: +> + :echo vimple#bl.to_s() + :echo vimple#bl.to_s("%n\n") + :let my_buffers = split(vimple#bl.to_s("%n\n"), "\n") +< + +Arguments:~ + +format~ + +Using a printf-like format specifier, you can alter the appearance of the +output. The available format specifiers are: + +- %b buffer number +- %n name +- %f flags +- %l cursor line + +Return:~ + +A string of newline terminated buffer list entries similar to the |:ls| +builtin. + +NOTE: Currently you have to manually call vimple#bl.update() before calling +vimple#bl.to_s() if you want the latest information. This may change in a +future version. + + *vimple#ls-to_l()* +------------------------------------------------------------------------------ +Args: [buffer_property]~ + +Overview:~ + + Returns a list representation of the buffer list. + +Synopsis:~ +> + :echo vimple#bl.to_l( ... ) +< +Description:~ + +This method returns a list representation of the buffer list. + +Arguments:~ + +The to_l() method is actually just a wrapper for the |vimple#ls-buffers()| +method. See that method for details about the buffer_property argument. + +Return:~ + +The to_l() method returns a list of dictionaries, each with the following +fields (with example values): +> + {'active': 0, + 'number': '1', + 'alternate': 0, + 'name': 'doc/buffer_list.txt', + 'readonly': 0, + 'current': 1, + 'line': '1', + 'modified': 0, + 'modifiable': 1, + 'hidden': 0, + 'read_error': 0, + 'listed': 1 + } +< + +NOTE: Currently you have to manually call vimple#bl.update() before calling +vimple#bl.to_l() if you want the latest information. This may change in a +future version. + + *vimple#ls-to_d()* +------------------------------------------------------------------------------ +Args: [buffer_property]~ + +Overview:~ + + Returns a dictionary representation of the buffer list. + +Synopsis:~ +> + :echo vimple#bl.to_d( ... ) +< +Description:~ + +This method returns a dictionary representation of the buffer list. The key +for each entry in the dictionary is the buffer number as shown by |:ls| + +Arguments:~ + +The to_d() method is actually just a wrapper for the |vimple#ls-buffers()| +method. See that method for details about the buffer_property argument. + +Return:~ + +The to_d() method returns a dictionary of dictionaries with the following +fields (with example values): +> + {'1': + {'active': 0, + 'number': '1', + 'alternate': 0, + 'name': 'doc/buffer_list.txt', + 'readonly': 0, + 'current': 1, + 'line': '1', + 'modified': 0, + 'modifiable': 1, + 'hidden': 0, + 'read_error': 0, + 'listed': 1 + } + } +< + +NOTE: Currently you have to manually call vimple#bl.update() before calling +vimple#bl.to_d() if you want the latest information. This may change in a +future version. + + *vimple#ls-print()* +------------------------------------------------------------------------------ +Args: [show_unlisted]~ + +Overview:~ + + Prints (colourfully) the buffer list. + +Synopsis:~ +> + :call vimple#bl.print( BOOL ) +< +Description:~ + +Use this method to print to the screen a coloured representation of the buffer +list. The layout resembles the builtin |:ls| command but is by default +coloured to show important information more obviously. See the +autoload/vimple/vimple.vim file to see how to customise the colours used by +vimple#ls.print(). + +Arguments:~ + +show_unlisted~ + +If this boolean argument is not false then all buffers (including the unlisted +ones) are printed (as with the |:ls!| command. With no argument or one that +evaluates to false, only the listed buffers are shown (as with the |:ls| +command). + +Return:~ + +The bl object (for chaining), although it's not immediately clear how this +could be useful (for the print() method), but a design decision was made to +return the bl object for all methods that didn't have to explicitly return a +different type (as the to_x() methods do). + +NOTE: Unlike most of the other methods, the print() method -does- update the +buffer list (with an internal call to update()) prior to printing. + + *vimple#ls-filter()* +------------------------------------------------------------------------------ +Args: [filter]~ + +Overview:~ + + Auxilliary method used to filter out desired buffers only. + +Synopsis:~ +> + :call vimple#bl.filter( ... ) +< +Description:~ + +The filter() method selects buffers from the internal list based on the +criteria provided in the argument. This method is used heavily internally by +other public methods, like the to_l() and to_d() and buffers() methods. This +method returns a new vimple#ls object containing only the selected buffers. + +Arguments:~ + +filter~ + +The vimple#ls#filter() method uses the built-in |filter()| function which +uses the |v:val| variable to aaccess the elements of the internal buffer +properties. Call filter() like this: +> + :call vimple#bl.filter('v:val.modified').print() + :call vimple#bl.filter('v:val.name =~ "\.txt$"').print() + :echo vimple#bl.filter('v:val.name =~ "\.txt$"').to_s() +< +The available v:val properties are: + +- active +- alternate +- current +- hidden +- line +- listed +- modifiable +- modified +- name +- number +- read_error +- readonly + +Return:~ + +The bl object (for chaining). + + *vimple#ls-buffers()* +------------------------------------------------------------------------------ +Args: [buffer_property]~ + +Overview:~ + + Simplified filter wrapper. + +Synopsis:~ +> + :echo vimple#bl.buffers( ... ) +< +Description:~ + +This utility method provides a simpler way to filter based on the flags +commonly used to select buffers. + +Arguments:~ + +buffer_property~ + +Call buffers() like this: +> + :echo vimple#bl.buffers('modified') + :echo vimple#bl.buffers('hidden') +< +The available buffer properties are: + +- active +- hidden +- listed +- modifiable +- modified +- read_error +- readonly + +Return:~ + +The bl object (for chaining). + + +============================================================================== + 4. PLUGINS USING VIMPLE BUFFER LIST *vimple#ls-plugins* + +Vimple was designed to be a library for Vim developers and plugin writers. The +currently known plugins using Vimple: + +- the buffalo (https://github.com/Raimondi/vim-buffalo) - A lightning fast + buffer switching tool using fuzzy matching. + + vim:tw=78:ts=8:ft=help:norl: diff --git a/etc/soft/vim/vim/+plugins/vimple/ftplugin/python_scope.vim b/etc/soft/vim/vim/+plugins/vimple/ftplugin/python_scope.vim new file mode 100644 index 0000000..53cd6dc --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/ftplugin/python_scope.vim @@ -0,0 +1,6 @@ +function! Scope_python() + let class_scope = scope#inspect('^\s*class\s\+\([a-zA-Z0-9_.]\+\)', '\ze\n\(\s*class\|\S\)') + let method_scope = scope#inspect('^\s*def\s\+\([a-zA-Z0-9_.]\+\)', '.\(\n\(\n\|\S\)\)\@=') + return ' ' . join(map(class_scope.stack, 'v:val.head_line_number . "," . v:val.tail_line_number . " " . v:val.head_string'), ' :: ') + \. ' >> ' . join(map(method_scope.stack, 'v:val.head_line_number . "," . v:val.tail_line_number . " " . v:val.head_string'), ' > ') +endfunction diff --git a/etc/soft/vim/vim/+plugins/vimple/ftplugin/vim_scope.vim b/etc/soft/vim/vim/+plugins/vimple/ftplugin/vim_scope.vim new file mode 100644 index 0000000..8ea4ae5 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/ftplugin/vim_scope.vim @@ -0,0 +1,4 @@ +function! Scope_vim() + let scope = scope#inspect('^\s*fu\%[nction]!\?\s*\([a-zA-Z0-9_#.]\+\)', '^\s*endf\%[unction]') + return ' ' . join(map(scope.stack, 'v:val.head_line_number . "," . v:val.tail_line_number . " " . v:val.head_string'), ' > ') +endfunction diff --git a/etc/soft/vim/vim/+plugins/vimple/plugin/vimple.vim b/etc/soft/vim/vim/+plugins/vimple/plugin/vimple.vim new file mode 100644 index 0000000..fa616ae --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/plugin/vimple.vim @@ -0,0 +1,451 @@ +function! s:SID() + return "" . matchstr(expand(''), '\zs\d\+_\zeSID$') +endfun + +if !exists('g:vim_home') + let vim_home = fnamemodify($MYVIMRC, ':p:h') +endif +if !exists('g:vim_bundle_home') + let vim_bundle_home = g:vim_home . '/bundle/' +endif + +" example call: +" call PathogenAddPlugin(g:vim_bundle_home . '/unused/csapprox{}') +function! PathogenAddPlugin(plugin) + call pathogen#surround(a:plugin) + silent! runtime! plugin/*.vim +endfunction + +function! CurrentPartialWord() + let p = searchpos('\W\zs\w\+\%#', 'bnW') + let b:partial_word = strpart(getline('.'), p[1]-1, col('.')-p[1]) +endfunction + +augroup Vimple + au! + autocmd CursorMovedI * call CurrentPartialWord() +augroup END + +function! Scope() + let ft = tolower(&ft) + if exists('*Scope_' . ft) + return call('Scope_' . ft, []) + endif +endfunction + +if ! exists('g:vimple_override_file_complete') + let g:vimple_override_file_complete = 0 +endif +if ! exists('g:vimple_file_complete_short') + let g:vimple_file_complete_short = 0 +endif +if ! exists('g:vimple_override_line_complete') + let g:vimple_override_line_complete = 0 +endif + +if g:vimple_override_file_complete + if g:vimple_file_complete_short + inoremap complete#trigger('complete#short_files_in_path') + else + inoremap complete#trigger('complete#files_in_path') + endif +endif +if g:vimple_override_line_complete + inoremap complete#trigger('complete#foist') +endif + +function! ExtendedRegexObject(...) + return call('regex#ExtendedRegex', a:000) +endfunction + +" ERex is a global object with access to Vim's vars: +let ERex = ExtendedRegexObject() + + +function! TagSearch() + let ident = expand('') + if exists('s:tags') + unlet s:tags + endif + let s:tags = taglist(ident) + if empty(s:tags) + echohl Warning + echom 'Tag not found: ' . ident + echohl None + return + endif + let data = map(copy(s:tags), 'v:key . " " . v:val.name . "\t" . v:val.filename') + call overlay#show( + \ data + \, { + \ '' : ':call ' . s:SID() . 'tagsearchaccept()' + \ , 'q' : ':call overlay#close()' + \ } + \, {'filter' : 1, 'use_split' : 1}) +endfunction + +function! s:tagsearchaccept() + let ident = matchstr(overlay#select_line(), '^\d\+') + let fname = s:tags[ident].filename + if bufnr(fname) == -1 + exec 'edit ' . fname + else + exec 'buffer ' . fname + endif + silent! exe s:tags[ident].cmd +endfunction + +nnoremap vimple_tag_search :call TagSearch() + +if !hasmapto('vimple_tag_search') + nmap g] vimple_tag_search +endif + + +function! IdentSearch(type) + let type = a:type ? ']I' : '[I' + try + let data = vimple#redir('norm! ' . type) + catch '^Vim\%((\a\+)\)\=:E389:' + echohl Warning + echom 'Could not find pattern' + echohl None + return + endtry + call overlay#show( + \ data + \, { + \ '' : ':call ' . s:SID() . 'identsearchaccept(' . a:type . ')' + \ , 'q' : ':call overlay#close()' + \ } + \, {'filter' : 1, 'use_split' : 1}) +endfunction + +function! s:identsearchaccept(type) + let type = a:type ? ']' : '[' + let num = matchstr(overlay#select_line(), '\d\+') + exe 'silent! norm! ' . num . type . "\t" +endfunction + +nnoremap vimple_ident_search :call IdentSearch(0) +nnoremap vimple_ident_search_forward :call IdentSearch(1) + +if !hasmapto('vimple_ident_search') + nmap [I vimple_ident_search +endif + +if !hasmapto('vimple_ident_search_forward') + nmap ]I vimple_ident_search_forward +endif + + + +function! SpellSuggest(ident) + call overlay#show( + \ s:getsuggestions(a:ident) + \, { + \ '' : ':call ' . s:SID() . 'spellsuggestaccept()' + \ , 'q' : ':call overlay#close()' + \ } + \, {'filter' : 0, 'use_split' : 1}) +endfunction + +function! s:getsuggestions(ident) + let spell = &spell + if ! spell + set spell + endif + let suggestions = list#lspread(spellsuggest(a:ident), 5) + if ! spell + set nospell + endif + return suggestions +endfunction + +function! s:spellsuggestaccept() + let line = getline('.') + let idx = strlen(substitute(line[:col('.')], '[^\t]', '', 'g')) + let word_list = split(line, '\t') + call overlay#close() + let [r1, r2] = [@@, @-] + exe 'norm! ciw' . word_list[idx] + let [@@, @-] = [r1, r2] +endfunction + +nnoremap vimple_spell_suggest :call SpellSuggest(expand('')) + +if !hasmapto('vimple_spell_suggest') + nmap z= vimple_spell_suggest +endif + + +function! BufGrep(pattern) + let pattern = a:pattern + let fc = pattern[0] + let lc = pattern[-1] + if fc !~ '[[:punct:]]' + let fc = '/' + let lc = '/' + elseif fc != lc + let lc = fc + let pattern = pattern[1:] + else + let pattern = pattern[1:-2] + endif + let pattern = escape(pattern, fc) + + let data = vimple#redir('global ' . fc . pattern . lc . '#') + if data[0] =~ 'Pattern not found:' + echohl Warning + echo data[0] + echohl None + return + endif + call overlay#show( + \ data + \, { + \ '' : ':call ' . s:SID() . 'bufgrepaccept()' + \ , 'q' : ':call overlay#close()' + \ } + \, {'filter' : 1, 'use_split' : 1}) +endfunction + +function! s:bufgrepaccept() + let num = matchstr(overlay#select_line(), '\d\+') + exe 'silent! norm! ' . num . "G" +endfunction + +command! -nargs=* G call BufGrep() + +function! StringScanner(first, last, command, ...) + let args = [] + if a:0 + let args = a:000 + endif + let ss = string#scanner(getline(a:first, a:last)) + let g:vimple#ss = call(eval('ss.' . a:command), args, ss) + return g:vimple#ss +endfunction + +command! -bar -range=% -nargs=+ StringScanner echo StringScanner(, , ) + +function! Mkvimrc() + let rtp = uniq(map(filter(map(getline(1, '$'), + \ 'matchstr(v:val, "^\\s*\\d\\+:\\s\\+\\zs.*")'), 'v:val != ""'), + \ 'fnameescape(substitute(v:val, "/\\(autoload\\|colors\\|compiler\\|doc\\|ftdetect\\|ftplugin\\|indent\\|keymap\\|lang\\|plugin\\|syntax\\).*", "", ""))')) + + if empty(rtp) + echohl Error + echom 'Mkvimrc: Buffer does not contain :scriptnames output' + echohl None + return + endif + let vimrc_lines = [ + \ "set nocompatible" + \ , "let &rtp = join(" . string(map(rtp, 'fnameescape(v:val)')) . ", ',') . ',' . &rtp" + \ , "filetype plugin indent on" + \ , "syntax enable" + \ ] + let datetime = localtime() + let vimrc_file = './vimrc-' . datetime + call writefile(vimrc_lines, vimrc_file) + return vimrc_file +endfunction + +command! -nargs=0 -bar Mkvimrc echom Mkvimrc() + +function! BufDo(cmds) + let old_hidden = &hidden + set hidden + tabnew + echom 'bufdo ' . a:cmds + exe 'bufdo ' . a:cmds + tabclose + let &hidden = old_hidden +endfunction + +function! BufTypeDo(args) + let [type; commands] = split(a:args, ' ') + let cmds = join(commands) + call BufDo('if &ft ==? "' . escape(type, '"') . '" | exe "' . escape(cmds, '"') . '" | endif') +endfunction + +function! BufMatchDo(args) + let [pattern; commands] = split(a:args, ' ') + let cmds = join(commands) + call BufDo('if expand("%") =~? "' . escape(pattern, '"') . '" | exe "' . escape(cmds, '"') . '" | endif') +endfunction + +command! -nargs=+ BufTypeDo call BufTypeDo() +command! -nargs=+ BufMatchDo call BufMatchDo() + +function! QFbufs() + return quickfix#bufnames() +endfunction + +command! -bar QFargs call quickfix#to_args(1) +command! -bar QFargslocal call quickfix#to_args(0) +command! -bar LLargs call loclist#to_args(1) +command! -bar LLargslocal call loclist#to_args(0) + +command! -bar QFbufs echo quickfix#bufnames() +command! -bar LLbufs echo loclist#bufnames() + +command! -nargs=+ QFdo call quickfix#do() +command! -nargs=+ LLdo call loclist#do() + +command! -range -nargs=0 Filter call vimple#filter(getline(1,'$'), {}).filter() +nnoremap vimple_filter :Filter + +if !hasmapto('vimple_filter') + nmap cf vimple_filter +endif + +" Takes a range as well as optional start and end lines to extract from the +" file. If both ends of the range are given, the shorter of first:last vs +" start:end will be used to fill the range. +function! ReadIntoBuffer(file, ...) range + let first = a:firstline + let last = a:lastline + let lines = readfile(a:file) + let start = 0 + let end = len(lines) + if a:0 + let start = a:1 - 1 + if a:0 > 1 + let end = a:2 - 1 + endif + endif + if start > len(lines) + return + endif + let lines = lines[start : end] + if len(lines) > (last-first) + let lines = lines[0:(last-first-1)] + endif + call append(first, lines) +endfunction + +command! -range -nargs=+ -complete=file ReadIntoBuffer ,call ReadIntoBuffer() + +function! View(cmd) + call ShowInNewBuf(vimple#redir(a:cmd)) +endfunction + +function! ViewFT(cmd) + call overlay#show(vimple#redir(a:cmd), { + \ 'q' : ':call overlay#close()', + \ '' : ':let t:linenum = matchstr(getline("."), "^\\s*\\d\\+") \| wincmd w \| exe "normal! " . t:linenum . "G"' + \ }, { + \ 'set ft=' . &ft : 1, 'use_split' : 1, 'filter' : index(g:vimple_auto_filter, 'view') != -1 + \ }) +endfunction + +if ! exists('g:vimple_auto_filter') + let g:vimple_auto_filter = ['view', 'vfm'] +endif + +function! ShowInNewBuf(data) + call overlay#show(a:data, {'q' : ':call overlay#close()'}, {'use_split' : 1, 'filter' : index(g:vimple_auto_filter, 'view') != -1}) +endfunction + +command! -bar -nargs=+ -complete=command View call View() +command! -bar -nargs=+ -complete=command ViewFT call ViewFT() +command! -bar -nargs=+ -complete=command ViewExpr call ShowInNewBuf(eval()) +command! -bar -nargs=+ -complete=command ViewSys call ShowInNewBuf(split(system(), "\n")) + +function! Collect(args) + let [regvar; command] = split(a:args) + let cmd = join(command, " ") + let list = &list + set nolist + let buf = join(vimple#redir(cmd), "\n") + if list + set list + endif + if len(regvar) > 1 + exe 'let ' . regvar . '="' . escape(buf, '"') . '"' + else + call setreg(regvar, buf) + endif + return split(buf, '\n') +endfunction + +function! GCollect(pattern) + return map(Collect('_ g/' . a:pattern), 'substitute(v:val, "^\\s*\\d\\+\\s*", "", "")') +endfunction + +function! GCCollect(pattern) + return map(map(Collect('_ g/' . a:pattern), 'join(split(v:val, "^\\s*\\d\\+\\s*"))'), + \ 'substitute(v:val, a:pattern, "", "")') +endfunction + +function! VCollect(pattern) + return map(Collect('_ v/' . a:pattern), 'substitute(v:val, "^\\s*\\d\\+\\s*", "", "")') +endfunction + +function! VCCollect(pattern) + return map(map(Collect('_ v/' . a:pattern), 'join(split(v:val, "^\\s*\\d\\+\\s*"))'), + \ 'substitute(v:val, a:pattern, "", "")') +endfunction + +command! -nargs=+ Collect call Collect() +command! -nargs=+ GCollect let GC = GCollect() + +function! SCall(script, function, args) + let scripts = g:vimple#sn.update().filter_by_name(a:script).to_l() + if len(scripts) == 0 + echo "SCall: no script matches " . a:script + return + elseif len(scripts) > 1 + echo "SCall: more than one script matches " . a:script + endif + let func = '' . scripts[0]['number'] . '_' . a:function + if exists('*' . func) + return call(func, a:args) + else + echo "SCall: no function " . func . " in script " . a:script + return + endif +endfunction + +command! -nargs=+ Silently exe join(map(split(, '|'), '"silent! ".v:val'), '|') + + +" " Pre-initialise library objects +if get(g:, 'vimple_init_vars', 1) + if get(g:, 'vimple_init_ab', 1) + let vimple#ab = vimple#abbreviations#new() + endif + if get(g:, 'vimple_init_bl', 1) + let vimple#bl = vimple#ls#new() + endif + if get(g:, 'vimple_init_hl', 1) + let vimple#hl = vimple#highlight#new() + endif + if get(g:, 'vimple_init_sn', 1) + let vimple#sn = vimple#scriptnames#new() + endif + if get(g:, 'vimple_init_vn', 1) + let vimple#vn = vimple#version#new() + endif + if get(g:, 'vimple_init_ma', 1) + let vimple#ma = vimple#marks#new() + endif + if get(g:, 'vimple_init_ul', 1) + let vimple#ul = vimple#undolist#new() + endif + if get(g:, 'vimple_init_mp', 1) + let vimple#mp = vimple#map#new() + endif + if get(g:, 'vimple_init_op', 0) + let vimple#op = vimple#options#new() + endif +endif + +call vimple#default_colorscheme() + +call completers#init() + +" disabled by default +" let vimple#au = vimple#autocmd#new() diff --git a/etc/soft/vim/vim/+plugins/vimple/syntax/vimple_jumplist.vim b/etc/soft/vim/vim/+plugins/vimple/syntax/vimple_jumplist.vim new file mode 100644 index 0000000..c36ed2d --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/syntax/vimple_jumplist.vim @@ -0,0 +1,11 @@ +syn match VJL_X /^.\s*0\s\+/ conceal contained +syn match VJL_L /^l \d\+\s\+/ conceal contained +syn match VJL_F /^f \d\+\s\+/ conceal contained + +syn match VJL_TextLine /^l.*/ contains=VJL_L +syn match VJL_FileLine /^f.*/ contains=VJL_F +syn match VJL_CurrLine /^.\s*0.*/ contains=VJL_X + +hi link VJL_CurrLine Constant +hi link VJL_TextLine String +hi link VJL_FileLine Comment diff --git a/etc/soft/vim/vim/+plugins/vimple/test/Makefile b/etc/soft/vim/vim/+plugins/vimple/test/Makefile new file mode 100644 index 0000000..c54a862 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/test/Makefile @@ -0,0 +1,11 @@ +# Run tests +# Barry Arthur, 2014-05-10 12:12 + +all: + runVimTests.sh -1 *.vim + +clean: + rm *.tap *.msgout + +# vim:ft=make +# diff --git a/etc/soft/vim/vim/+plugins/vimple/test/README b/etc/soft/vim/vim/+plugins/vimple/test/README new file mode 100644 index 0000000..21b3cea --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/test/README @@ -0,0 +1,13 @@ +The plugins runVimTests (http://www.vim.org/scripts/script.php?script_id=2565) +and VimTAP (http://www.vim.org/scripts/script.php?script_id=2213) are needed to +run these tests. + +Besides the _setup.vim configuration file present in this repo you need to +create a global one and place it in the same dir where the runVimTests +executable is located. Assuming the executable is at '~/bin/runVimTests' this +global configuration file should be '~/bin/runVimTestsSetup.vim' and should +have something like the following lines inside of it: + +" Prepend tests repos to &rtp +let &runtimepath = '/path/to/runVimTests_dir,' . &rtp +let &runtimepath = '/path/to/vimTAP_dir,' . &rtp diff --git a/etc/soft/vim/vim/+plugins/vimple/test/_setup.vim b/etc/soft/vim/vim/+plugins/vimple/test/_setup.vim new file mode 100644 index 0000000..fbb0f8c --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/test/_setup.vim @@ -0,0 +1,16 @@ +let &rtp = expand(':p:h:h') . ',' . &rtp . ',' . expand(':p:h:h') . '/after' + +runtime plugin/vimple.vim +runtime plugin/string.vim + +function! Ok(test, desc) + return vimtap#Ok(a:test, '"' . escape(a:test, '"') . '"', a:desc) +endfunction + +function! Is(got, expected, desc) + return vimtap#Is(a:got, a:expected, '"' . escape(a:got, '"') . '"', a:desc) +endfunction + +function! Isnt(got, unexpected, desc) + return vimtap#Isnt(a:got, a:unexpected, '"' . escape(a:got, '"') . '"', a:desc) +endfunction diff --git a/etc/soft/vim/vim/+plugins/vimple/test/buffer_list.vim b/etc/soft/vim/vim/+plugins/vimple/test/buffer_list.vim new file mode 100644 index 0000000..eaa15b5 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/test/buffer_list.vim @@ -0,0 +1,19 @@ +call vimtest#StartTap() +call vimtap#Plan(6) " <== XXX Keep plan number updated. XXX + +" silent! call vimple#redir('set') +call Is(type(vimple#bl.buffers()), type({}), 'buffers() returns a dict') +call vimtap#Diag(vimple#bl.to_s()) +call Ok(vimple#bl.to_s() =~ '^ 1 %a\?\s\+".\{-}" line 1', 'Check to_s() output') + +let blist = vimple#bl.to_l() +call Ok(len(blist) == 1, 'Check to_l() output.:'.string(blist).':') +call Ok(has_key(blist[0], 'number') == 1, 'Check to_l() content.:'.string(blist).':') +call Ok(blist[0]['number'] == 1, 'Check to_l() buffer number.:'.string(blist).':') + +new +call vimple#bl.update() +call Ok(len(vimple#bl.to_l()) == 2, 'update() works') + +call vimtest#Quit() + diff --git a/etc/soft/vim/vim/+plugins/vimple/test/ini_001.ini b/etc/soft/vim/vim/+plugins/vimple/test/ini_001.ini new file mode 100644 index 0000000..b1e7a90 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/test/ini_001.ini @@ -0,0 +1,13 @@ +; ignore this +; and this + +this_var = bare +another var = with whitespace + +[section1] +name = some 'string' here +age = 10 + +[section 2] +name = some "other" string +age = 20 diff --git a/etc/soft/vim/vim/+plugins/vimple/test/ini_001_out.ini b/etc/soft/vim/vim/+plugins/vimple/test/ini_001_out.ini new file mode 100644 index 0000000..299c53a --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/test/ini_001_out.ini @@ -0,0 +1,8 @@ +another var = with whitespace +this_var = bare +[section1] +age = 10 +name = some 'string' here +[section 2] +age = 20 +name = some "other" string diff --git a/etc/soft/vim/vim/+plugins/vimple/test/ini_002.ini b/etc/soft/vim/vim/+plugins/vimple/test/ini_002.ini new file mode 100644 index 0000000..3e1164f --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/test/ini_002.ini @@ -0,0 +1,5 @@ +; lists +[s1] +lines = [1, 2, 5, 9, 10] +peeps = {'bob': {'age': 20, 'sex': 'male'}, 'alice': {'age': 20, 'sex': 'female'}} +sep = \t diff --git a/etc/soft/vim/vim/+plugins/vimple/test/ini_002_out.ini b/etc/soft/vim/vim/+plugins/vimple/test/ini_002_out.ini new file mode 100644 index 0000000..a807221 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/test/ini_002_out.ini @@ -0,0 +1,4 @@ +[s1] +peeps = {'alice': {'age': 20, 'sex': 'female'}, 'bob': {'age': 20, 'sex': 'male'}} +sep = \t +lines = [1, 2, 5, 9, 10] diff --git a/etc/soft/vim/vim/+plugins/vimple/test/parse_ini_001.vim b/etc/soft/vim/vim/+plugins/vimple/test/parse_ini_001.vim new file mode 100644 index 0000000..57c9201 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/test/parse_ini_001.vim @@ -0,0 +1,9 @@ +call vimtest#StartTap() +call vimtap#Plan(1) " <== XXX Keep plan number updated. XXX + +let ini_hash = parse#ini#from_file('ini_001.ini') +call parse#ini#to_file(ini_hash, 'ini_001_out.ini') + +call Is(parse#ini#from_file('ini_001_out.ini'), ini_hash , 'round-trip') + +call vimtest#Quit() diff --git a/etc/soft/vim/vim/+plugins/vimple/test/parse_ini_002.vim b/etc/soft/vim/vim/+plugins/vimple/test/parse_ini_002.vim new file mode 100644 index 0000000..b28debc --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/test/parse_ini_002.vim @@ -0,0 +1,9 @@ +call vimtest#StartTap() +call vimtap#Plan(1) " <== XXX Keep plan number updated. XXX + +let ini_hash = parse#ini#from_file('ini_002.ini') +call parse#ini#to_file(ini_hash, 'ini_002_out.ini') + +call Is(parse#ini#from_file('ini_002_out.ini'), ini_hash , 'round-trip') + +call vimtest#Quit() diff --git a/etc/soft/vim/vim/+plugins/vimple/test/string001.vim b/etc/soft/vim/vim/+plugins/vimple/test/string001.vim new file mode 100644 index 0000000..57724b3 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/test/string001.vim @@ -0,0 +1,48 @@ +call vimtest#StartTap() +call vimtap#Plan(19) " <== XXX Keep plan number updated. XXX + +let s = 'this is a string' +let S = string#scanner(s) + +call Is(S.skip('\w\+') , 4 , 'skips a word') +call Is(S.skip('\s\+') , 6 , 'skips a space') +call Is(S.skip('\s\+') , -1 , '"fail" if pattern to skip not found') +call Is(S.skip('\w\+') , 8 , 'skips another word') +call Is(S.scan('\w\+') , '' , 'no word to scan here') +call Is(S.index , 8 , 'index unchanged from unsuccessful scan') +call Is(S.skip('\d\+') , -1 , 'no digits to skip') +call Isnt(S.skip('\s\+') , -1 , 'skip over whitespace') +call Is(S.scan('\w\+') , 'a' , 'get next word') + +let s = 'this is a string' +let S = string#scanner(s) + +call Is(S.skip('\_s\+') , -1 , 'no leading whitespace to skip') +call Is(S.scan('\w\+') , 'this' , 'scan "this"') +call Isnt(S.skip('\s\+') , -1 , 'skip whitespace') +call Is(S.scan('\w\+') , 'is' , 'scan "is"') +call Isnt(S.skip('\s\+') , -1 , 'skip whitespace') + +let s = 'this is a string' +let S = string#scanner(s) + +call Is(S.skip_until('string') , 10 , 'skips until a target') +call Is(S.scan('\w\+') , 'string' , 'scan collects the pattern match') + +let s = "one foo\ntwo foo" +let S = string#scanner(s) + +call Is(S.inject("\n").string , "\none foo\ntwo foo" , 'inject at start') +call S.skip('\_s*\w\+') +call Is(S.inject("\n").string , "\none\n foo\ntwo foo" , 'inject inside string') + + + +let s = "one foo\ntwo foo\nthree foo\nfour foo\n" +let S = string#scanner(s) + +call Is(S.collect('\n\zs\w\+') , ['one', 'two', 'three', 'four'] , 'collect by pattern') + + + +call vimtest#Quit() diff --git a/etc/soft/vim/vim/+plugins/vimple/test/vimple001.vim b/etc/soft/vim/vim/+plugins/vimple/test/vimple001.vim new file mode 100644 index 0000000..02eb1bc --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/test/vimple001.vim @@ -0,0 +1,18 @@ +call vimtest#StartTap() +call vimtap#Plan(2) " <== XXX Keep plan number updated. XXX + +redir => test +set filetype? +redir END +let result = vimple#redir('set filetype?') +call Is(result, split(test, '\n'), '#redir()') +unlet test +unlet result + +let test = ' 12.35' +let result = vimple#format('%8.2l', {'l': ['f', '12.3456']}, '') +call Is(result, test, '#format()') +unlet test +unlet result + +call vimtest#Quit() diff --git a/etc/soft/vim/vim/+plugins/vimple/test/vimple002.vim b/etc/soft/vim/vim/+plugins/vimple/test/vimple002.vim new file mode 100644 index 0000000..7ba1b59 --- /dev/null +++ b/etc/soft/vim/vim/+plugins/vimple/test/vimple002.vim @@ -0,0 +1,15 @@ +call vimtest#StartTap() +call vimtap#Plan(2) " <== XXX Keep plan number updated. XXX + +hi VimpleTestHi term=bold,reverse cterm=bold ctermbg=239 gui=bold guibg=#4e4e4e + +call vimple#hl.update() +let result = vimple#hl.filter_by_term('VimpleTestHi').to_l() + +call Is(len(result), 1, 'handle commas in highlights') +call Is(result[0]['attrs'] + \, 'term=bold,reverse cterm=bold ctermbg=239 gui=bold guibg=#4e4e4e' + \, 'handle commas in highlights') + +call vimtest#Quit() +