Permalink
Browse files

Merge remote-tracking branch 'vim-perl/master'

  • Loading branch information...
2 parents 21ccd6b + 8d69964 commit 7fe95a5c784ea02bcc2a643c4e3ddd8651091160 @rkitover committed May 16, 2015
Showing with 5,619 additions and 1,530 deletions.
  1. +6 −1 .travis.yml
  2. +21 −13 CONTRIBUTING.md
  3. +11 −1 Changes
  4. +49 −5 Makefile
  5. +32 −8 README.md
  6. +127 −40 build-corpus.pl
  7. +7 −0 contrib/highlight-all-pragmas.vim
  8. +14 −0 contrib/method-signatures.vim
  9. +34 −0 ftdetect/perl11.vim
  10. +1 −1 ftplugin/perl.vim
  11. +15 −4 ftplugin/perl6.vim
  12. +0 −5 indent/perl.vim
  13. +0 −5 indent/perl6.vim
  14. +68 −64 syntax/perl.vim
  15. +759 −1,053 syntax/perl6.vim
  16. +1,961 −0 syntax/perl6.vim.pre
  17. +97 −0 syntax/tap.vim
  18. +2 −2 syntax/tt2.vim
  19. +109 −102 t/01_highlighting.t
  20. +6 −20 t/02_syntax_tt2.t
  21. +24 −1 t/03_folding_subs.t
  22. +2 −6 t/04_folding_anonymous_subs.t
  23. +66 −89 t/05_syntax_mason.t
  24. +76 −0 t/06_corpus.t
  25. +39 −0 t/07_perl6_folding.t
  26. +0 −53 t/define_all.vim
  27. +6 −6 t_source/perl/advanced.t.html
  28. +3 −3 t_source/perl/basic.t.html
  29. +1 −1 t_source/perl/brace-in-substitution.t.html
  30. +1 −1 t_source/perl/braces-in-heredoc.t.html
  31. +8 −0 t_source/perl/hash-slices.t
  32. +20 −0 t_source/perl/hash-slices.t.html
  33. +4 −4 t_source/perl/issue16.t.html
  34. +13 −0 t_source/perl/issue166.t
  35. +25 −0 t_source/perl/issue166.t.html
  36. +1 −1 t_source/perl/issue42b.t.html
  37. +2 −2 t_source/perl/issue48.t.html
  38. +1 −1 t_source/perl/issue52.t.html
  39. +16 −0 t_source/perl/postfix-dereference.t
  40. +28 −0 t_source/perl/postfix-dereference.t.html
  41. +252 −0 t_source/perl6/basic.t
  42. +254 −2 t_source/perl6/basic.t.html
  43. +33 −0 t_source/perl6/comments.t
  44. +45 −0 t_source/perl6/comments.t.html
  45. +49 −0 t_source/perl6/grammars.t
  46. +61 −0 t_source/perl6/grammars.t.html
  47. +362 −0 t_source/perl6/metaops.t
  48. +374 −0 t_source/perl6/metaops.t.html
  49. +69 −0 t_source/perl6/pod.t
  50. +81 −0 t_source/perl6/pod.t.html
  51. +51 −0 t_source/perl6/quoting.t
  52. +63 −0 t_source/perl6/quoting.t.html
  53. +123 −0 tools/Local/Utils.pm
  54. +2 −12 tools/Local/VimColor.pm
  55. +6 −0 tools/clean-slate.vim
  56. +3 −0 tools/config.vim
  57. +30 −0 tools/launch-vim
  58. +10 −24 tools/make-tarball.pl
  59. +24 −0 tools/populate-last-change.pl
  60. +46 −0 tools/preproc.pl
  61. +26 −0 tools/time-it.vim
View
@@ -1,4 +1,9 @@
language: perl
install:
- sudo apt-get install vim
- - cpanm --notest Test::Differences Text::VimColor IO::Pty Test::Deep
+ - cpanm --notest Test::Differences Text::VimColor IO::Pty Test::Deep Parallel::ForkManager JSON Path::Tiny Test::SharedFork
+ - git fetch origin p5-corpus:origin/p5-corpus
+ - vim --version
+branches:
+ except:
+ - p5-corpus
View
@@ -6,24 +6,32 @@ When submitting an issue relating to highlighting/folding, please attach the fol
- The file used in the screenshot. If it's proprietary or too big, please try
to reproduce the issue in a small sample file.
- A link to your vimrc, if it exists.
+ - The output of `vim --version`.
These things make issues **much** easier to debug!
-Also, remember that scripts under `contrib` or other third party plugins have the potential to
+**IMPORTANT**
+
+Remember that scripts under `contrib` or other third party plugins have the potential to
break your highlighting/folding; if you find an issue, please try it without any contrib scripts or
-other plugins set up.
+other plugins set up. This includes any `after/syntax/perl` scripts you have set up yourself, of course.
+To make things easier on everyone, try to reproduce the issue with a minimal vim setup and an up-to-date
+checkout of vim-perl. Taking the time to help out with issues you have found makes things easier on all
+of us, and that's the whole reason this is an open project. =)
+
+Also, before you report something as a bug, please make sure you're using the latest version of
+vim-perl from Git. If you're using an older version, chances are that you're stumbling on a bug that
+someone else has in the past.
+
+If you have read and understand these guidelines, add the text "I have read the guidelines" in your issue
+when you create it.
# Helping Out
If you would like to contribute to vim-perl, please be aware that we have a test suite which can
-be run using the `prove` command. We also have a regression test suite in the `build-corpus.pl`
-and `verify-corpus.pl` scripts. If you plan on making changes to vim-perl, please drop the sources
-for `Moose`, `Data::Printer`, and `Regexp::Debugger` under a directory named `corpus` under the
-Git root, and extract the archives. Then run `build-corpus.pl`; this will take a few seconds.
-
-After you've made your changes, run the test suite via `prove`, as well as the regression tests
-via `verify-corpus.pl`. The former tests a host of known situations for consistency, and the
-latter simply verifies that vim-perl still highlights and folds code the way it did when you
-ran `build-corpus.pl`. Most fixes don't change highlighting, so `verify-corpus.pl` should print
-nothing. If it does, open the file(s) printed and make sure that their highlighting still makes
-sense.
+be run using the `prove` command. After you've made your changes, run the test suite via `prove`.
+The tests test a host of known situations for consistency, as well as verifies that vim-perl still
+highlights and folds code the way it does with the latest code on GitHub. Most fixes don't change highlighting,
+so the regression test should pass. If it fails, open the file(s) printed and make sure that their highlighting
+still makes sense. If it does, note that in your pull request and a maintainer will update the regression corpus
+data when he/she merges it.
View
12 Changes
@@ -41,6 +41,14 @@ M. Carlson.
Provide information to matchit plugin to jump between if/elsif/else.
Credit to Alan Young.
+Added "fc" and "evalbytes" keywords. Thanks, Rafael Kitover.
+
+Added optional highlighting for subroutine signatures, as well
+as highlighting for new postfix dereferencing. Thanks, mattn!
+
+Added tap.vim (based on https://github.com/threebytesfull/perltest). Thanks
+to Rufus Cable for sharing!
+
[FIXES]
Minor tweak to p6RxCharClass. Thanks, Arne Skjærholt.
@@ -58,10 +66,12 @@ Braces within a heredoc no longer confuse the highlighting.
Keyword detection for "accept" was looking for "acept".
-Added higlighting for "import" and "format".
+Added highlighting for "import" and "format".
Stop setting "iskeyword" globally. (Hinrik)
+Fix folding for subroutines with prototypes. (zdm)
+
[TESTING]
Added a test harness in t/ (try "make test"). Moved example code
to t_source/ (Hinrik)
View
@@ -5,14 +5,12 @@ INDENT=$(PREFIX)/indent
SYNTAX=$(PREFIX)/syntax
TOOLS=$(PREFIX)/tools
-default:
- @echo There is no default target.
- @echo Some targets: test, install
+default: preproc
dirs:
mkdir -p $(FTPLUGIN) $(INDENT) $(SYNTAX) $(TOOLS)
-install: dirs
+install: dirs fix_old_vim
cp ftplugin/*.vim $(FTPLUGIN)/
cp indent/*.vim $(INDENT)/
cp syntax/*.vim $(SYNTAX)/
@@ -21,5 +19,51 @@ install: dirs
tarball:
perl tools/make-tarball.pl
-test:
+test: preproc fix_old_vim
prove -rv t
+
+test6: preproc
+ perl t/01_highlighting.t t_source/perl6/*.t
+
+clean:
+ rm -fr after/syntax/perl
+
+contrib_syntax:
+ mkdir -p after/syntax/perl
+
+carp: contrib_syntax
+ cp contrib/carp.vim after/syntax/perl/
+
+dancer: contrib_syntax
+ cp contrib/dancer.vim after/syntax/perl/
+
+heredoc-sql-mason: contrib_syntax
+ cp contrib/heredoc-sql-mason.vim after/syntax/perl/
+
+heredoc-sql: contrib_syntax
+ cp contrib/heredoc-sql.vim after/syntax/perl/
+
+highlight-all-pragmas: contrib_syntax
+ cp contrib/highlight-all-pragmas.vim after/syntax/perl/
+
+js-css-in-mason: contrib_syntax
+ cp contrib/js-css-in-mason.vim after/syntax/perl/
+
+method-signatures: contrib_syntax
+ cp contrib/method-signatures.vim after/syntax/perl/
+
+moose: contrib_syntax
+ cp contrib/moose.vim after/syntax/perl/
+
+test-more: contrib_syntax
+ cp contrib/test-more.vim after/syntax/perl/
+
+try-tiny: contrib_syntax
+ cp contrib/try-tiny.vim after/syntax/perl/
+
+preproc:
+ tools/preproc.pl syntax/perl6.vim.pre > syntax/perl6.vim
+
+# this gets rid of a regex optimization introduced in Vim 7.4
+fix_old_vim:
+ expr `vim --version|head -n1|grep -Poh '\d\.\d'|head -n1` \< 7.4 >/dev/null && sed -i 's/\\@[0-9]\+/\\@/g; /version < 704/d' syntax/perl6.vim; true
View
@@ -1,5 +1,7 @@
# vim-perl
+[![Build Status](https://api.travis-ci.org/vim-perl/vim-perl.png?branch=master)](https://travis-ci.org/vim-perl/vim-perl)
+
This is the aggregation of all the various Perl-related syntax and
helper files for Perl 5 and Perl 6.
@@ -10,12 +12,31 @@ You can install vim-perl using
* [Pathogen](https://github.com/tpope/vim-pathogen) and git submodules
* [Vundle](https://github.com/gmarik/vundle)
* [VAM](https://github.com/MarcWeber/vim-addon-manager)
+* [vim-plug](https://github.com/junegunn/vim-plug)
They were all tested and work: please read the related documentation on the related sites.
The legacy method is to install just do a "make install" and you'll get the
.vim files all installed in your `~/.vim` directory.
+## Installing using [vim-plug](https://github.com/junegunn/vim-plug)
+
+In your `.vimrc`:
+
+ call plug#begin('~/.vim/plugged')
+
+ Plug 'vim-perl/vim-perl', { 'for': 'perl', 'do': 'make clean carp dancer highlight-all-pragmas moose test-more try-tiny' }
+
+ call plug#end()
+
+Re-source your configuration, do `PlugInstall`, and you're done.
+
+The `do` argument is optional, and can be used
+if you want to enable any of the optional sub-syntaxes.
+
+The `perl` argument is also optional, and only required if you want to
+lazy-load the plugin only if dealing with Perl files.
+
# Getting Help
Any bug reports/feature requests/patches should be directed to the [vim-perl group](https://groups.google.com/group/vim-perl).
@@ -28,7 +49,17 @@ as a screenshot demonstrating the problem.
## Can you add highlighting for Moose, Try::Tiny, Test::More, SQL in strings, etc?
We have syntax "extensions" under the `contrib/` directory; you can find custom highlighting
-for these sorts of things there.
+for these sorts of things there. To enable any of them, just drop the relevant
+file in a `after/syntax/perl` directory visible to vim.
+
+ $ cp contrib/dancer.vim ~/.vim/after/syntax/perl/
+
+You can also populate the local `after/syntax/perl/` via `make`:
+
+ $ make dancer moose
+
+ $ ls after/syntax/perl
+ dancer.vim moose.vim
## Curly braces inside of regexes/strings are considered when I use %
@@ -38,13 +69,6 @@ Vim itself only considers double quotes in this scenario; the matchit plugin, ho
can deal with this scenario and vim-perl's files are set up to work with it should you
choose to use it.
-# Contributing
-
-If you would like to contribute to vim-perl (which would be greatly appreciated!), you may find
-the `build-corpus.pl` and `verify-corpus.pl` scripts of use. What I do is drop the sources
-for `Moose`, `Data::Printer`, and `Regexp::Debugger` in the corpus directory and use the scripts
-to make sure my changes don't cause regressions in highlighting and folding.
-
xoxo,<br />
eiro,<br />
Andy (andy@petdance.com)
Oops, something went wrong.

0 comments on commit 7fe95a5

Please sign in to comment.