diff --git a/Makefile b/Makefile index 7bb9aaf82202861ceed453f57871b48f55d35c15..554ddb109f953329fd4af537b387953efcee312c 100644 --- a/Makefile +++ b/Makefile @@ -13,12 +13,14 @@ SUBDIRSCLEAN:=$(addsuffix .clean,$(SUBDIRS)) ifdef GCCDEP all: $(MAKE) lib + $(MAKE) -C vim lib: $(MAKE) -C src install: $(MAKE) -C src install + $(MAKE) -C vim uninstall: $(MAKE) -C src uninstall diff --git a/regtest/basic/rt-vimsyntax/annotation.dat.reference b/regtest/basic/rt-vimsyntax/annotation.dat.reference index d15299e09118c494feee46474818da73640bc933..1d23bcb942274d416b20542fdd14d33a7fc15771 100644 --- a/regtest/basic/rt-vimsyntax/annotation.dat.reference +++ b/regtest/basic/rt-vimsyntax/annotation.dat.reference @@ -36,138 +36,138 @@ ANNOTATION 2 5 m +plumedComment ANNOTATION 2 6 e +plumedComment ANNOTATION 2 7 n +plumedComment ANNOTATION 2 8 t +plumedComment -ANNOTATION 3 0 D +plumedLineDISTANCE+plumedActionDISTANCE -ANNOTATION 3 1 I +plumedLineDISTANCE+plumedActionDISTANCE -ANNOTATION 3 2 S +plumedLineDISTANCE+plumedActionDISTANCE -ANNOTATION 3 3 T +plumedLineDISTANCE+plumedActionDISTANCE -ANNOTATION 3 4 A +plumedLineDISTANCE+plumedActionDISTANCE -ANNOTATION 3 5 N +plumedLineDISTANCE+plumedActionDISTANCE -ANNOTATION 3 6 C +plumedLineDISTANCE+plumedActionDISTANCE -ANNOTATION 3 7 E +plumedLineDISTANCE+plumedActionDISTANCE -ANNOTATION 3 8 +plumedLineDISTANCE -ANNOTATION 3 9 . +plumedLineDISTANCE+plumedDots -ANNOTATION 3 10 . +plumedLineDISTANCE+plumedDots -ANNOTATION 3 11 . +plumedLineDISTANCE+plumedDots -ANNOTATION 4 0 +plumedLineDISTANCE -ANNOTATION 4 1 +plumedLineDISTANCE -ANNOTATION 4 2 +plumedLineDISTANCE -ANNOTATION 4 3 A +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 4 4 T +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 4 5 O +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 4 6 M +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 4 7 S +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 4 8 = +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 4 9 1 +plumedLineDISTANCE+plumedKeywordsDISTANCE+plumedStringInKeyword -ANNOTATION 4 10 , +plumedLineDISTANCE+plumedKeywordsDISTANCE+plumedStringInKeyword -ANNOTATION 4 11 2 +plumedLineDISTANCE+plumedKeywordsDISTANCE+plumedStringInKeyword -ANNOTATION 4 12 +plumedLineDISTANCE -ANNOTATION 4 13 C +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 4 14 O +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 4 15 M +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 4 16 P +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 4 17 O +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 4 18 N +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 4 19 E +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 4 20 N +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 4 21 T +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 4 22 S +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 4 23 +plumedLineDISTANCE -ANNOTATION 4 24 L +plumedLineDISTANCE+plumedLabel -ANNOTATION 4 25 A +plumedLineDISTANCE+plumedLabel -ANNOTATION 4 26 B +plumedLineDISTANCE+plumedLabel -ANNOTATION 4 27 E +plumedLineDISTANCE+plumedLabel -ANNOTATION 4 28 L +plumedLineDISTANCE+plumedLabel -ANNOTATION 4 29 = +plumedLineDISTANCE+plumedLabel -ANNOTATION 4 30 a +plumedLineDISTANCE+plumedLabel +ANNOTATION 3 0 D +plumedCLineDISTANCE+plumedActionDISTANCE +ANNOTATION 3 1 I +plumedCLineDISTANCE+plumedActionDISTANCE +ANNOTATION 3 2 S +plumedCLineDISTANCE+plumedActionDISTANCE +ANNOTATION 3 3 T +plumedCLineDISTANCE+plumedActionDISTANCE +ANNOTATION 3 4 A +plumedCLineDISTANCE+plumedActionDISTANCE +ANNOTATION 3 5 N +plumedCLineDISTANCE+plumedActionDISTANCE +ANNOTATION 3 6 C +plumedCLineDISTANCE+plumedActionDISTANCE +ANNOTATION 3 7 E +plumedCLineDISTANCE+plumedActionDISTANCE +ANNOTATION 3 8 +plumedCLineDISTANCE +ANNOTATION 3 9 . +plumedCLineDISTANCE+plumedDots +ANNOTATION 3 10 . +plumedCLineDISTANCE+plumedDots +ANNOTATION 3 11 . +plumedCLineDISTANCE+plumedDots +ANNOTATION 4 0 +plumedCLineDISTANCE +ANNOTATION 4 1 +plumedCLineDISTANCE +ANNOTATION 4 2 +plumedCLineDISTANCE +ANNOTATION 4 3 A +plumedCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 4 4 T +plumedCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 4 5 O +plumedCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 4 6 M +plumedCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 4 7 S +plumedCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 4 8 = +plumedCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 4 9 1 +plumedCLineDISTANCE+plumedKeywordsDISTANCE+plumedStringInKeyword +ANNOTATION 4 10 , +plumedCLineDISTANCE+plumedKeywordsDISTANCE+plumedStringInKeyword +ANNOTATION 4 11 2 +plumedCLineDISTANCE+plumedKeywordsDISTANCE+plumedStringInKeyword +ANNOTATION 4 12 +plumedCLineDISTANCE +ANNOTATION 4 13 C +plumedCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 4 14 O +plumedCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 4 15 M +plumedCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 4 16 P +plumedCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 4 17 O +plumedCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 4 18 N +plumedCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 4 19 E +plumedCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 4 20 N +plumedCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 4 21 T +plumedCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 4 22 S +plumedCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 4 23 +plumedCLineDISTANCE +ANNOTATION 4 24 L +plumedCLineDISTANCE+plumedLabel +ANNOTATION 4 25 A +plumedCLineDISTANCE+plumedLabel +ANNOTATION 4 26 B +plumedCLineDISTANCE+plumedLabel +ANNOTATION 4 27 E +plumedCLineDISTANCE+plumedLabel +ANNOTATION 4 28 L +plumedCLineDISTANCE+plumedLabel +ANNOTATION 4 29 = +plumedCLineDISTANCE+plumedLabel +ANNOTATION 4 30 a +plumedCLineDISTANCE+plumedLabel ANNOTATION 5 0 . +plumedActionDISTANCE ANNOTATION 5 1 . +plumedActionDISTANCE ANNOTATION 5 2 . +plumedActionDISTANCE ANNOTATION 5 3 +plumedActionDISTANCE -ANNOTATION 6 0 D +plumedLineDISTANCE+plumedActionDISTANCE -ANNOTATION 6 1 I +plumedLineDISTANCE+plumedActionDISTANCE -ANNOTATION 6 2 S +plumedLineDISTANCE+plumedActionDISTANCE -ANNOTATION 6 3 T +plumedLineDISTANCE+plumedActionDISTANCE -ANNOTATION 6 4 A +plumedLineDISTANCE+plumedActionDISTANCE -ANNOTATION 6 5 N +plumedLineDISTANCE+plumedActionDISTANCE -ANNOTATION 6 6 C +plumedLineDISTANCE+plumedActionDISTANCE -ANNOTATION 6 7 E +plumedLineDISTANCE+plumedActionDISTANCE -ANNOTATION 6 8 +plumedLineDISTANCE -ANNOTATION 6 9 L +plumedLineDISTANCE+plumedLabel -ANNOTATION 6 10 A +plumedLineDISTANCE+plumedLabel -ANNOTATION 6 11 B +plumedLineDISTANCE+plumedLabel -ANNOTATION 6 12 E +plumedLineDISTANCE+plumedLabel -ANNOTATION 6 13 L +plumedLineDISTANCE+plumedLabel -ANNOTATION 6 14 = +plumedLineDISTANCE+plumedLabel -ANNOTATION 6 15 a +plumedLineDISTANCE+plumedLabel -ANNOTATION 6 16 +plumedLineDISTANCE -ANNOTATION 6 17 . +plumedLineDISTANCE+plumedDots -ANNOTATION 6 18 . +plumedLineDISTANCE+plumedDots -ANNOTATION 6 19 . +plumedLineDISTANCE+plumedDots -ANNOTATION 7 0 +plumedLineDISTANCE -ANNOTATION 7 1 +plumedLineDISTANCE -ANNOTATION 7 2 +plumedLineDISTANCE -ANNOTATION 7 3 A +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 7 4 T +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 7 5 O +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 7 6 M +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 7 7 S +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 7 8 = +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 7 9 1 +plumedLineDISTANCE+plumedKeywordsDISTANCE+plumedStringInKeyword -ANNOTATION 7 10 , +plumedLineDISTANCE+plumedKeywordsDISTANCE+plumedStringInKeyword -ANNOTATION 7 11 2 +plumedLineDISTANCE+plumedKeywordsDISTANCE+plumedStringInKeyword -ANNOTATION 7 12 +plumedLineDISTANCE -ANNOTATION 7 13 C +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 7 14 O +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 7 15 M +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 7 16 P +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 7 17 O +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 7 18 N +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 7 19 E +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 7 20 N +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 7 21 T +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 7 22 S +plumedLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 6 0 D +plumedCLineDISTANCE+plumedActionDISTANCE +ANNOTATION 6 1 I +plumedCLineDISTANCE+plumedActionDISTANCE +ANNOTATION 6 2 S +plumedCLineDISTANCE+plumedActionDISTANCE +ANNOTATION 6 3 T +plumedCLineDISTANCE+plumedActionDISTANCE +ANNOTATION 6 4 A +plumedCLineDISTANCE+plumedActionDISTANCE +ANNOTATION 6 5 N +plumedCLineDISTANCE+plumedActionDISTANCE +ANNOTATION 6 6 C +plumedCLineDISTANCE+plumedActionDISTANCE +ANNOTATION 6 7 E +plumedCLineDISTANCE+plumedActionDISTANCE +ANNOTATION 6 8 +plumedCLineDISTANCE +ANNOTATION 6 9 L +plumedCLineDISTANCE+plumedLabel +ANNOTATION 6 10 A +plumedCLineDISTANCE+plumedLabel +ANNOTATION 6 11 B +plumedCLineDISTANCE+plumedLabel +ANNOTATION 6 12 E +plumedCLineDISTANCE+plumedLabel +ANNOTATION 6 13 L +plumedCLineDISTANCE+plumedLabel +ANNOTATION 6 14 = +plumedCLineDISTANCE+plumedLabel +ANNOTATION 6 15 a +plumedCLineDISTANCE+plumedLabel +ANNOTATION 6 16 +plumedCLineDISTANCE +ANNOTATION 6 17 . +plumedCLineDISTANCE+plumedDots +ANNOTATION 6 18 . +plumedCLineDISTANCE+plumedDots +ANNOTATION 6 19 . +plumedCLineDISTANCE+plumedDots +ANNOTATION 7 0 +plumedCLineDISTANCE +ANNOTATION 7 1 +plumedCLineDISTANCE +ANNOTATION 7 2 +plumedCLineDISTANCE +ANNOTATION 7 3 A +plumedCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 7 4 T +plumedCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 7 5 O +plumedCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 7 6 M +plumedCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 7 7 S +plumedCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 7 8 = +plumedCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 7 9 1 +plumedCLineDISTANCE+plumedKeywordsDISTANCE+plumedStringInKeyword +ANNOTATION 7 10 , +plumedCLineDISTANCE+plumedKeywordsDISTANCE+plumedStringInKeyword +ANNOTATION 7 11 2 +plumedCLineDISTANCE+plumedKeywordsDISTANCE+plumedStringInKeyword +ANNOTATION 7 12 +plumedCLineDISTANCE +ANNOTATION 7 13 C +plumedCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 7 14 O +plumedCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 7 15 M +plumedCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 7 16 P +plumedCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 7 17 O +plumedCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 7 18 N +plumedCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 7 19 E +plumedCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 7 20 N +plumedCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 7 21 T +plumedCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 7 22 S +plumedCLineDISTANCE+plumedKeywordsDISTANCE ANNOTATION 8 0 . +plumedActionDISTANCE ANNOTATION 8 1 . +plumedActionDISTANCE ANNOTATION 8 2 . +plumedActionDISTANCE ANNOTATION 8 3 +plumedActionDISTANCE -ANNOTATION 9 0 a +plumedLineDISTANCE+plumedActionDISTANCE -ANNOTATION 9 1 : +plumedLineDISTANCE+plumedActionDISTANCE -ANNOTATION 9 2 +plumedLineDISTANCE+plumedActionDISTANCE -ANNOTATION 9 3 . +plumedLineDISTANCE+plumedDots -ANNOTATION 9 4 . +plumedLineDISTANCE+plumedDots -ANNOTATION 9 5 . +plumedLineDISTANCE+plumedDots -ANNOTATION 10 0 +plumedLineDISTANCE -ANNOTATION 10 1 +plumedLineDISTANCE -ANNOTATION 10 2 D +plumedLineDISTANCE+plumedSpecialDISTANCE -ANNOTATION 10 3 I +plumedLineDISTANCE+plumedSpecialDISTANCE -ANNOTATION 10 4 S +plumedLineDISTANCE+plumedSpecialDISTANCE -ANNOTATION 10 5 T +plumedLineDISTANCE+plumedSpecialDISTANCE -ANNOTATION 10 6 A +plumedLineDISTANCE+plumedSpecialDISTANCE -ANNOTATION 10 7 N +plumedLineDISTANCE+plumedSpecialDISTANCE -ANNOTATION 10 8 C +plumedLineDISTANCE+plumedSpecialDISTANCE -ANNOTATION 10 9 E +plumedLineDISTANCE+plumedSpecialDISTANCE -ANNOTATION 10 10 +plumedLineDISTANCE -ANNOTATION 10 11 A +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 10 12 T +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 10 13 O +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 10 14 M +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 10 15 S +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 10 16 = +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 10 17 1 +plumedLineDISTANCE+plumedKeywordsDISTANCE+plumedStringInKeyword -ANNOTATION 10 18 , +plumedLineDISTANCE+plumedKeywordsDISTANCE+plumedStringInKeyword -ANNOTATION 10 19 2 +plumedLineDISTANCE+plumedKeywordsDISTANCE+plumedStringInKeyword -ANNOTATION 11 0 +plumedLineDISTANCE -ANNOTATION 11 1 +plumedLineDISTANCE -ANNOTATION 11 2 C +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 11 3 O +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 11 4 M +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 11 5 P +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 11 6 O +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 11 7 N +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 11 8 E +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 11 9 N +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 11 10 T +plumedLineDISTANCE+plumedKeywordsDISTANCE -ANNOTATION 11 11 S +plumedLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 9 0 a +plumedLCLineDISTANCE+plumedActionDISTANCE +ANNOTATION 9 1 : +plumedLCLineDISTANCE+plumedActionDISTANCE +ANNOTATION 9 2 +plumedLCLineDISTANCE+plumedActionDISTANCE +ANNOTATION 9 3 . +plumedLCLineDISTANCE+plumedDots +ANNOTATION 9 4 . +plumedLCLineDISTANCE+plumedDots +ANNOTATION 9 5 . +plumedLCLineDISTANCE+plumedDots +ANNOTATION 10 0 +plumedLCLineDISTANCE +ANNOTATION 10 1 +plumedLCLineDISTANCE +ANNOTATION 10 2 D +plumedLCLineDISTANCE+plumedSpecialDISTANCE +ANNOTATION 10 3 I +plumedLCLineDISTANCE+plumedSpecialDISTANCE +ANNOTATION 10 4 S +plumedLCLineDISTANCE+plumedSpecialDISTANCE +ANNOTATION 10 5 T +plumedLCLineDISTANCE+plumedSpecialDISTANCE +ANNOTATION 10 6 A +plumedLCLineDISTANCE+plumedSpecialDISTANCE +ANNOTATION 10 7 N +plumedLCLineDISTANCE+plumedSpecialDISTANCE +ANNOTATION 10 8 C +plumedLCLineDISTANCE+plumedSpecialDISTANCE +ANNOTATION 10 9 E +plumedLCLineDISTANCE+plumedSpecialDISTANCE +ANNOTATION 10 10 +plumedLCLineDISTANCE +ANNOTATION 10 11 A +plumedLCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 10 12 T +plumedLCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 10 13 O +plumedLCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 10 14 M +plumedLCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 10 15 S +plumedLCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 10 16 = +plumedLCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 10 17 1 +plumedLCLineDISTANCE+plumedKeywordsDISTANCE+plumedStringInKeyword +ANNOTATION 10 18 , +plumedLCLineDISTANCE+plumedKeywordsDISTANCE+plumedStringInKeyword +ANNOTATION 10 19 2 +plumedLCLineDISTANCE+plumedKeywordsDISTANCE+plumedStringInKeyword +ANNOTATION 11 0 +plumedLCLineDISTANCE +ANNOTATION 11 1 +plumedLCLineDISTANCE +ANNOTATION 11 2 C +plumedLCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 11 3 O +plumedLCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 11 4 M +plumedLCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 11 5 P +plumedLCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 11 6 O +plumedLCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 11 7 N +plumedLCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 11 8 E +plumedLCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 11 9 N +plumedLCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 11 10 T +plumedLCLineDISTANCE+plumedKeywordsDISTANCE +ANNOTATION 11 11 S +plumedLCLineDISTANCE+plumedKeywordsDISTANCE ANNOTATION 12 0 . +plumedActionDISTANCE ANNOTATION 12 1 . +plumedActionDISTANCE ANNOTATION 12 2 . +plumedActionDISTANCE diff --git a/scripts/vim2html.sh b/scripts/vim2html.sh index bfe4c794ea8227be931882b28cfd82021985c63c..e8e891bf2a0d0f9cf8010be40db67135a94008c6 100755 --- a/scripts/vim2html.sh +++ b/scripts/vim2html.sh @@ -1,10 +1,6 @@ #! /bin/bash -VIMFILE="$PLUMED_ROOT"/src/lib/plumed.vim - -if [ "$PLUMED_IS_INSTALLED" = yes ] ; then - VIMFILE="$PLUMED_ROOT/vim/syntax/$PLUMED_PROGRAM_NAME".vim -fi +VIMFILE="$PLUMED_ROOT/vim/syntax/plumed.vim" if [ "$1" = --description ] ; then echo "convert plumed input file to colored html using vim syntax" diff --git a/src/lib/Makefile b/src/lib/Makefile index 772b8da95077f7711d327f8f25570e5592e9fc4d..4ab0a565efb4b4068d6d15a18bd1ae32a5400a78 100644 --- a/src/lib/Makefile +++ b/src/lib/Makefile @@ -58,15 +58,8 @@ PLUMED_MAIN_STATIC := $(PLUMED_LIBDIR)plumed PLUMED_MAIN_SHARED := $(PLUMED_LIBDIR)plumed-shared PLUMED_MAIN_RUNTIME := $(PLUMED_LIBDIR)plumed-runtime -# vim syntax file -ifeq ($(program_can_run),yes) - PLUMED_VIM := $(PLUMED_LIBDIR)plumed.vim -else - PLUMED_VIM := -endif - -.PHONY: all links $(DIRS) $(DIRSLINKS) all-static $(PLUMED_LIBDIR)Plumed.cmake $(PLUMED_LIBDIR)Plumed.inc install $(PLUMED_SCRIPTS_EXE) install-html $(PLUMED_VIM) +.PHONY: all links $(DIRS) $(DIRSLINKS) all-static $(PLUMED_LIBDIR)Plumed.cmake $(PLUMED_LIBDIR)Plumed.inc install $(PLUMED_SCRIPTS_EXE) install-html all: $(MAKE) dirslinks $(MAKE) dirs @@ -193,11 +186,8 @@ endif # modulefile cp install/modulefile "$(DESTDIR)$(libdir)/$(program_name)/modulefile" # vim syntax file -ifeq ($(program_can_run),yes) - mkdir -p "$(DESTDIR)$(libdir)/$(program_name)"/vim - mkdir -p "$(DESTDIR)$(libdir)/$(program_name)"/vim/syntax - cp install/plumed.vim "$(DESTDIR)$(libdir)/$(program_name)/vim/syntax/$(program_name)".vim -endif + if test -d ../../vim/syntax ; then mkdir -p "$(DESTDIR)$(libdir)/$(program_name)" && cd ../../ && tar cf - vim/syntax | tar xf - -C "$(DESTDIR)$(libdir)/$(program_name)/" ; fi + if test -d ../../vim/help ; then mkdir -p "$(DESTDIR)$(libdir)/$(program_name)" && cd ../../ && tar cf - vim/help | tar xf - -C "$(DESTDIR)$(libdir)/$(program_name)/" ; fi # making everything visible: chmod -R go+rX,go-w "$(DESTDIR)$(libdir)/$(program_name)" chmod -R go+rX,go-w "$(DESTDIR)$(includedir)/$(program_name)" @@ -221,15 +211,6 @@ ifdef SOEXT @echo "- Set this environment variable : PLUMED_KERNEL=$(libdir)/lib$(program_name)Kernel.$(SOEXT)" endif @echo -ifeq ($(program_can_run),yes) - @echo "A vim syntax file can be found here:" - @echo "$(libdir)/$(program_name)/vim/syntax" - @echo "Copy it to $(HOME)/.vim/syntax" - @echo "Alternatively:" - @echo "- Set this environment variable : PLUMED_VIMPATH=$(libdir)/$(program_name)/vim" - @echo "- Add the command 'let &runtimepath.=','.\$$PLUMED_VIMPATH' to your .vimrc file" - @echo "From vim, you can use :set syntax=$(program_name) to enable it" -endif @echo "To create a tcl module that sets all the variables above, use this one as a starting point:" @echo "$(libdir)/$(program_name)/modulefile" @echo @@ -243,6 +224,12 @@ ifdef SOEXT @echo $(libdir)/lib$(program_name).$(SOEXT) @echo $(libdir)/lib$(program_name)Kernel.$(SOEXT) endif + @if test -d ../../vim/help ; then echo "A vim plugin can be found here: $(libdir)/$(program_name)/vim/" ; fi + @if test -d ../../vim/help ; then echo "Copy it to $(HOME)/.vim/ directory" ; fi + @if test -d ../../vim/help ; then echo "Alternatively:" ; fi + @if test -d ../../vim/help ; then echo "- Set this environment variable : PLUMED_VIMPATH=$(libdir)/$(program_name)/vim" ; fi + @if test -d ../../vim/help ; then echo "- Add the command 'let &runtimepath.=','.\$$PLUMED_VIMPATH' to your .vimrc file" ; fi + @if test -d ../../vim/help ; then echo "From vim, you can use :set syntax=$(program_name) to enable it" ; fi ifeq ($(program_can_run),no) @echo "WARNING: $(program_name) executable will not run on this machine" @echo "WARNING: to patch an MD code use 'plumed-patch'" @@ -282,7 +269,7 @@ $(DIRS): .PHONY: lib lib-static lib-shared lib-install lib-static-install -lib: lib-static lib-shared $(PLUMED_VIM) +lib: lib-static lib-shared lib-static: $(PLUMED_MAIN_STATIC) $(OBJ_WRAPPER) $(PLUMED_LIBDIR)Plumed.inc.static $(PLUMED_LIBDIR)Plumed.cmake.static $(PLUMED_SCRIPTS_EXE) @@ -329,9 +316,6 @@ else $(LDSO) -o $@ $^ $(DYNAMIC_LIBS) endif -$(PLUMED_VIM): $(PLUMED_MAIN_STATIC) - ../maketools/vimsyntax.sh ./plumed > $@ - $(PLUMED_MAIN_STATIC): $(OBJ_MAIN) $(OBJ_KERNEL) $(OBJ_WRAPPER) $(LD) $(LDFLAGS) $^ -o $@ $(LIBS) $(DYNAMIC_LIBS) @@ -430,6 +414,8 @@ clean: rm -f $(CLEANLIST) rm -f $(PLUMED_MAIN_STATIC) $(PLUMED_MAIN_SHARED) $(PLUMED_MAIN_RUNTIME) rm -f Plumed.inc* plumed-* Plumed.cmake* +# this is not necessary, I leave it here to remove spurious plumed.vim files generated with +# the first version of plumed.vim syntax file: rm -f plumed.vim rm -f .lib* rm -fr install/ diff --git a/src/tools/Keywords.cpp b/src/tools/Keywords.cpp index eb2fdb644169944b53b07bc5fb54a74b806524c8..ccfd8337cf8089fcb0c850a922cf41409d6428e4 100644 --- a/src/tools/Keywords.cpp +++ b/src/tools/Keywords.cpp @@ -309,6 +309,8 @@ void Keywords::print_vim() const { else printf(",option:%s",keys[i].c_str() ); } } + fprintf(stdout,"\n"); + print(stdout); } void Keywords::print_html() const { diff --git a/user-doc/Misc.txt b/user-doc/Misc.txt index cebc51f839f34cc94de7d480f09e95d389063fbc..7c5fe38dafcd5960741c282f2ead324903914596 100644 --- a/user-doc/Misc.txt +++ b/user-doc/Misc.txt @@ -105,28 +105,33 @@ For the impatients: :let &runtimepath.=','.$PLUMED_VIMPATH " This makes autocompletion work in the expected way: :set completeopt=longest,menuone +" This binds the F2 key to toggle short helps +: nmap <F2> : PHelp<CR> \endverbatim - When you open a PLUMED input file, you can enable syntax highlighting with: \verbatim -:set syntax=plumed +:set ft=plumed \endverbatim This will also enable autocompletion. Use `<CTRL-X><CTRL-O>` to autocomplete a word. - If you want to fold multiline statements, type \verbatim :setlocal foldmethod=syntax \endverbatim +- While in vim normal mode, you can use the button `<F2>` to show in a split window a short + help about the action defined in the line where the cursor is. Hitting `<F2>` again you will + close that window. With `<CTRL-W><CTRL-W>` you go back and forth between the two windows. See below for more detailed instructions. \par Configuration -When PLUMED is compiled, a file named `plumed.vim` will appear in directory `src/lib/`. -This file is a VIM syntax file that can be used to highlight proper PLUMED instructions in a PLUMED -input file. +When PLUMED is compiled, directories `help` and `syntax` will appear in `builddir/vim`. +They contain a VIM plugin that can be used to highlight proper PLUMED instructions in a PLUMED +input file and to quickly retrieve help. \warning Notice that this file does not appear if you are cross compiling. -In this case, you must copy the syntax file from another machine. +In this case, you must copy the plugin files from another machine. You can try it right after compilation by typing in VIM \verbatim @@ -134,9 +139,10 @@ You can try it right after compilation by typing in VIM :source /path/to/plumed/src/lib/plumed.vim \endverbatim -Alternatively, you can copy it to your `.vim/syntax` directory, so that you can later enable it using +You can copy the two directories into your `$HOME/.vim` directory so that later you can +enable plumed syntax with the command \verbatim -:set syntax=plumed +:set ft=plumed \endverbatim If you work in an environment where several PLUMED versions are installed (e.g. using env modules), @@ -152,11 +158,11 @@ to the proper path. Thus, when working with a given PLUMED module loaded, you should be able to enable to proper syntax by just typing \verbatim -:set syntax=plumed +:set ft=plumed \endverbatim in VIM. -If you are tired of typing `:set syntax=plumed`, you can use a modeline. +If you are tired of typing `:set ft=plumed`, you can use a modeline. Add to your `.vimrc` file the following commands \verbatim :set modeline @@ -164,7 +170,7 @@ Add to your `.vimrc` file the following commands \endverbatim Then, at the beginning of your PLUMED input file, put the following comment: \verbatim -# vim:syntax=plumed +# vim:ft=plumed d: DISTANCE ATOMS=1,2 RESTRAINT ARG=d AT=0.0 KAPPA=1.0 \endverbatim @@ -199,7 +205,7 @@ Try to do the following: - Open a PLUMED input file - Enable PLUMED syntax \verbatim -:set syntax=plumed +:set ft=plumed \endverbatim - Enable syntax-based folding \verbatim @@ -246,7 +252,7 @@ you want to browse files that contain a lot of actions defined on multiple lines Another VIM feature that comes when you load PLUMED syntax is autocompletion of PLUMED actions and keywords. Open your favorite PLUMED input file and set it to PLUMED syntax highlighting with \verbatim -:set syntax=plumed +:set ft=plumed \endverbatim Now go into insert mode pressing `i` and type `DU` followed by `<CTRL+X><CTRL+O>`. Here `<CTRL+X>` stands for autocompletion and `<CTRL+O>` for omnifunc autocompletion. You will see a short @@ -276,6 +282,38 @@ if you use autocompletion after you have typed the word `DISTANCE` followed by a a menu listing `LABEL=`, `COMPONENTS`, etc. Basically, all the keywords that are possibly used withint a `DISTANCE` line will be shown. +\par Quick help + +You can also retrieve quick explanation of the input options for a specific collective variable. +Try to do the following. Enable plumed syntax: +\verbatim +:set ft=plumed +\endverbatim +Then add the following line +\verbatim +DISTANCE +\endverbatim +Now, in normal mode, go with the cursor on the `DISTANCE` line and type +\verbatim +:PHelp +\endverbatim +A new split window should appear containing some documentation about the \ref DISTANCE collective variable. +You can go back and forth between the two windows with `<CTRL+W><CTRL+W>`, as usually in vim. +Notice that if you are in the help window and type `:PHelp` this window will be closed. + +To make the navigation easier, you can add a shortcut in your .vimrc file. For example, adding: +\verbatim +: nmap <F2> : PHelp<CR> +\endverbatim +you should be able to open and close the manual hitting the F2 key. +We prefer not to set this in the PLUMED syntax file to avoid clashing with other shortcuts you might +have bound to the F2 key. + + + + + + \page includes Including other files diff --git a/vim/.gitignore b/vim/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..7b438271e346a2e062995b98f1d07be3f50d8a53 --- /dev/null +++ b/vim/.gitignore @@ -0,0 +1,3 @@ +/help +/syntax + diff --git a/vim/Makefile b/vim/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..ad1ec86c1ab5e5de37d6a20fb1872f0babe12c8a --- /dev/null +++ b/vim/Makefile @@ -0,0 +1,30 @@ +# include the machine dependent configuration +-include ../Makefile.conf + +.PHONY: all clean + +plumed_compiled := $(wildcard ../src/lib/plumed) + +ifeq ($(strip $(plumed_compiled)),) + +all: + @echo You must compile plumed before building the user manual + +else + +ifeq ($(program_can_run),no) + +all: + @echo PLUMED cannot run on this machine, so you cannot generate VIM syntax file + +else + +all: + ./vimsyntax.sh + +endif + +endif + +clean: + rm -fr syntax help diff --git a/vim/syntax/plumed.vim b/vim/syntax/plumed.vim deleted file mode 120000 index 49937ff15937df63faad32e1c646c0d590165eb8..0000000000000000000000000000000000000000 --- a/vim/syntax/plumed.vim +++ /dev/null @@ -1 +0,0 @@ -../../src/lib/plumed.vim \ No newline at end of file diff --git a/src/maketools/vimsyntax.sh b/vim/vimsyntax.sh similarity index 68% rename from src/maketools/vimsyntax.sh rename to vim/vimsyntax.sh index 6026aa85e55fe342bb0f7ba9448dbae885d8d0c7..f7deff1a3fba35f2624fb64a3158da62f419c3aa 100755 --- a/src/maketools/vimsyntax.sh +++ b/vim/vimsyntax.sh @@ -1,22 +1,42 @@ #! /bin/bash +# Making sure that plumed executable is available +echo -n "Searching for plumed ..." +if plumed --no-mpi 2>/dev/null 1>/dev/null ; then + echo " found" +else + echo " not found" + echo -n "Sourcing sourceme.sh and searching again ..." + if source ../sourceme.sh && plumed --no-mpi 2>/dev/null 1>/dev/null ; then + echo " found" + else + echo "ERROR: you should compile plumed first!" + exit 1 + fi +fi + +mkdir -p syntax help + + actions=$( -eval "$1" --no-mpi manual --action 2>&1 | awk '{ +plumed --no-mpi manual --action 2>&1 | awk '{ if(NR==1) next; if(NF!=1) exit; print $1 }' ) + actions="$( for a in $actions do -eval "$1" --no-mpi manual --action $a --vim 2>/dev/null +plumed --no-mpi manual --action $a --vim 2>/dev/null | head -n 1 done )" +{ cat << \EOF " Vim syntax file @@ -28,6 +48,8 @@ endif let b:current_syntax="plumed" +let s:path=expand('<sfile>:p:h') . "/../" + " All except space and hash are in word set iskeyword=33,34,36-126 @@ -38,6 +60,7 @@ highlight link plumedDots Type let b:plumedActions=[] let b:plumedDictionary={} +let b:plumedFullMan={} EOF for a in $actions ; do @@ -48,6 +71,19 @@ echo 'call add(b:plumedActions,{"word":"'"$action_name"'"})' dictionary='{"word":"LABEL=","menu":"add a label"}' + + +#echo "let b:plumedFullMan[\"$action_name\"]=\"$( +#eval plumed" --no-mpi manual --action $action_name --vim 2>/dev/null | awk '{if(NR>1)printf("%s\\n",$0)}' )"\" + +{ +echo "****************************************" +echo "Short helpfile for action $action_name" +echo "****************************************" +plumed --no-mpi manual --action $action_name --vim 2>/dev/null | awk '{if(NR>1) print}' +} > help/$action_name.txt + + for l in $(echo "$a" | sed 's/,/ /g') do string= @@ -92,12 +128,12 @@ syntax region plumedLineACTNAME matchgroup=plumedActionACTNAME start=/\v^\s*ACTI " ends on dots, possibly followed by the same action name and possibly a comment " comments and initial dots are not part of the match " can contain all the keywords associated with this action, plus strings, label, and comments -syntax region plumedLineACTNAME matchgroup=plumedActionACTNAME start=/\v^\s*ACTION>(.+\.\.\.\s*(#.*)*$)@=/ end=/\v^\s*\.\.\.(\s+ACTION)?\s*((#.*)*$)@=/ contains=plumedComment,plumedKeywordsACTNAME,plumedLabel,plumedString,plumedDots fold +syntax region plumedCLineACTNAME matchgroup=plumedActionACTNAME start=/\v^\s*ACTION>(.+\.\.\.\s*(#.*)*$)@=/ end=/\v^\s*\.\.\.(\s+ACTION)?\s*((#.*)*$)@=/ contains=plumedComment,plumedKeywordsACTNAME,plumedLabel,plumedString,plumedDots fold " single line, with label: syntax " matching label followed by action " can contain all the keywords associated with this action, plus strings and comments " labels are not allwed -syntax region plumedLineACTNAME matchgroup=plumedActionACTNAME start=/\v^\s*[^ #@][^ #]*:\s+ACTION/ excludenl end=/$/ contains=plumedComment,plumedKeywordsACTNAME,plumedStringOneline fold +syntax region plumedLLineACTNAME matchgroup=plumedActionACTNAME start=/\v^\s*[^ #@][^ #]*:\s+ACTION/ excludenl end=/$/ contains=plumedComment,plumedKeywordsACTNAME,plumedStringOneline fold " multiple line, with label: syntax " first row might contain extra words before arriving at the dots " thus continuation dots are matched by plumedDots @@ -105,7 +141,7 @@ syntax region plumedLineACTNAME matchgroup=plumedActionACTNAME start=/\v^\s*[^ # " comments and dots are not part of the match " ends on dots, possibly followed by the same label and possibly a comment " comments and initial dots are not part of the match -syntax region plumedLineACTNAME matchgroup=plumedActionACTNAME start=/\v^\s*\z([^ #@][^ #]*\:)\s+ACTION>(.+\.\.\.\s*(#.*)*$)@=/ end=/\v^\s*\.\.\.(\s+\z1)?\s*((#.*)*$)@=/ contains=plumedComment,plumedKeywordsACTNAME,plumedString,plumedDots fold +syntax region plumedLCLineACTNAME matchgroup=plumedActionACTNAME start=/\v^\s*\z([^ #@][^ #]*\:)\s+ACTION>(.+\.\.\.\s*(#.*)*$)@=/ end=/\v^\s*\.\.\.(\s+\z1)?\s*((#.*)*$)@=/ contains=plumedComment,plumedKeywordsACTNAME,plumedString,plumedDots fold " this is a hack required to match the ACTION when it is in the second line syntax match plumedSpecialACTNAME /\v(\.\.\.\s*(#.*)*\_s*)@<=ACTION>/ contained highlight link plumedSpecialACTNAME Type @@ -114,7 +150,7 @@ highlight link plumedSpecialACTNAME Type " matching label, dots, possibly comments, newline, then action name " comments, dots, and action are not part of the match " ends on dots possibly followed by the same label and possibly a comment -syntax region plumedLineACTNAME matchgroup=plumedActionACTNAME start=/\v^\s*\z([^ #@][^ #]*\:)\s+(\.\.\.\s*(#.*)*\_s*ACTION)@=/ end=/\v^\s*\.\.\.(\s+\z1)?\s*((#.*)*$)@=/ contains=plumedComment,plumedKeywordsACTNAME,plumedString,plumedSpecialACTNAME,plumedDots fold +syntax region plumedLCLineACTNAME matchgroup=plumedActionACTNAME start=/\v^\s*\z([^ #@][^ #]*\:)\s+(\.\.\.\s*(#.*)*\_s*ACTION)@=/ end=/\v^\s*\.\.\.(\s+\z1)?\s*((#.*)*$)@=/ contains=plumedComment,plumedKeywordsACTNAME,plumedString,plumedSpecialACTNAME,plumedDots fold highlight link plumedActionACTNAME Type highlight link plumedKeywordsACTNAME Statement EOF @@ -141,6 +177,54 @@ syntax region plumedComment start="\v^\s*ENDPLUMED>" end="\%$" fold syntax match plumedComment excludenl "\v#.*$" highlight link plumedComment Comment + +fun! PlumedGuessRegion() +" this is to find the match +" first, sync syntax + syn sync fromstart +" find the syntactic attribute of the present region + let col=col(".") + let line=line(".") + let key="" + let stack=synstack(line,col) + if(len(stack)>0) + let key = synIDattr(stack[0], "name") + endif + if(key=~"^plumed[LC]*Line.*") + return substitute(key,"^plumed[LC]*Line","","") + endif + return "" +endfunction + +fun! PlumedContextManual() + if(exists("b:plumed_helpfile")) + quit + return + endif + let m=PlumedGuessRegion() + if(m=="") + return + else + let name=s:path . "/help/" . m . ".txt" + if(exists("b:plumed_helpfile_vertical")) + execute 'rightbelow vsplit | view ' name + else + execute 'rightbelow split | view ' name + endif + let b:plumed_helpfile=1 + endif +endfunction + +fun! PlumedManualV() + let b:plumed_helpfile_vertical=1 +endfunction + +fun! PlumedManualH() + unlet b:plumed_helpfile_vertical +endfunction + +command! -nargs=0 PHelp call PlumedContextManual() + " autocomplete function fun! PlumedComplete(findstart, base) " this is to find the start of the word to be completed @@ -169,13 +253,15 @@ fun! PlumedComplete(findstart, base) endif endif let comp=[] +" normalize key removing L/C/LC indication + let key1=substitute(key,"^plumed[LC]*Line","plumedLine","") if key =="" " if outside of any region, complete with list of actions let comp=b:plumedActions elseif has_key(b:plumedDictionary,key) " if inside a region in the form "plumedLineXXX" " complete with keywords associated to action XXX - let comp=b:plumedDictionary[key] + let comp=b:plumedDictionary[key1] endif " find months matching with "a:base" let res = [] @@ -188,7 +274,9 @@ fun! PlumedComplete(findstart, base) let n=m endif if n =~ '^' . a:base + if(n!="LABEL=" || key =~ "^plumedLine.*" || key =~ "^plumedCLine.*") call add(res, m) + endif endif " in principle comp could be a heterogeneous list " so it should be unlet to iterate the loop @@ -219,7 +307,7 @@ fun! PlumedAnnotateSyntax() if line[p] !~ "[ \t]" if(len(stack)==0) let wrong=1 - elseif(synIDattr(stack[len(stack)-1],"name")=~"^plumedLine.*") + elseif(synIDattr(stack[len(stack)-1],"name")=~"^plumed[LC]*Line.*") let wrong=1 endif endif @@ -245,6 +333,8 @@ endfun EOF +} > syntax/plumed.vim + # colors: # Constant # Identifier