diff --git a/.gitignore b/.gitignore index 834ac9e990..2f0e02e7dc 100644 --- a/.gitignore +++ b/.gitignore @@ -24,8 +24,11 @@ src/MacVim/PSMTabBarControl/build src/MacVim/build src/TAGS src/Vim +src/auto/config.cache src/auto/config.h +src/auto/config.log src/auto/config.mk +src/auto/config.status src/auto/if_perl.c src/auto/link.log src/auto/link.sed diff --git a/.hgignore b/.hgignore index 0451da43ed..284a6839f2 100644 --- a/.hgignore +++ b/.hgignore @@ -32,17 +32,23 @@ src/auto/pathdef.c *.suo *.res *.RES +src/if_perl.c src/pathdef.c src/Obj*/pathdef.c gvimext.dll gvimext.lib +# Mac OSX +src/xxd/xxd.dSYM + # All platforms *.rej *.orig *.mo *.swp *~ +*.pyc +src/po/vim.pot # Generated by "make test" src/po/*.ck @@ -52,3 +58,4 @@ src/testdir/lua.vim src/testdir/small.vim src/testdir/tiny.vim src/testdir/test*.out +src/testdir/test.log diff --git a/.hgtags b/.hgtags index 4353652793..1a58e038f9 100644 --- a/.hgtags +++ b/.hgtags @@ -1983,3 +1983,765 @@ fdac34e3afa5f0dea26dba5e96932e3b9a0be50a v7-3-643 fb7c028dcac7555fee78096813e3846d157cc91b v7-3-644 1810ee914648ef3e16a8cf866299a32c4a9a00cb v7-3-645 e70485d3f81df4d72cb40d6fa4ad4218cf1e8392 v7-3-646 +29fe4e5c1db17a62b16a95fdda84f08cd05c27b5 v7-3-647 +76c099d45772a233982c39a29510d89eaa4d5a1c v7-3-648 +063765c3cebbd6040dc091b8c1ba28739fef9118 v7-3-649 +a638ae0f1b0cc41d8d753d79503238f11215f3ea v7-3-650 +ece544e85821a6118da55dad1538ea4c3625bd1c v7-3-651 +5edf3c51aa93110e57fcd0428c30e5bed149df34 v7-3-652 +fd0c7452fa51118d8f6557b34b4cc96e830ef6c7 v7-3-653 +73557eda70271b49015265b7147562b63a7a094d v7-3-654 +0d3238b54963c4b1358a1f33221f75e067c1613f v7-3-655 +a2f61b2b8e770bb8d233ce50c8c7508508578a8b v7-3-656 +3958b0e672d676a310d756bff1b9c629a7b0142f v7-3-657 +15cdcb8ddcfb848c929cc37e239d5da8fe48a8d9 v7-3-658 +e75da4a3225d48e59ee321411134cf9999348b7d v7-3-659 +8fdadfccd184b7de73811a3a18dc8815b7eb3434 v7-3-660 +5e909c379a1e87491bfa95ba1a37b39d0725933b v7-3-661 +87afa95a2992a31b1937def0e1db4a193b0ab32f v7-3-662 +2a200527131fac8f50487790ec201badbccdaf0e v7-3-663 +f86619764a1e0338ef9e14c653a5909847304b8b v7-3-664 +35939e1e25ff5a3862b83248f8039971c81936d0 v7-3-665 +1e22adc6176ec07f52102f383a9c3c414d43f9c2 v7-3-666 +cd36c0fed43e63a94d6e87b5c5c0b4d95628da27 v7-3-667 +dde6d0216a08a5554f3c351e519134c386d14232 v7-3-668 +2b3b7b48370848149c8b831b2b7aee9b7f4f88bb v7-3-669 +2bf8c00741f7f07d9b58596764236a92eaeca862 v7-3-670 +530f5a9030315f984e096794938c61f9d3562e22 v7-3-671 +fd6ef931aa77239804860b74ed2362b29c1a6d4a v7-3-672 +ca1c025079b11c98363e11576d903af756a593fc v7-3-673 +4da6003f0f0eee0f3908f8627af6d13a94c10cc6 v7-3-674 +9963f7a9b41b555a0660288dd94df44b6dee7c2e v7-3-675 +5309996ddcedd7e2dcc8c46624348405290b8940 v7-3-676 +8115f449a574bc146f75449161f1757aaa5bbb66 v7-3-677 +de253f606048a2862a338190b071e5e3c7de7a41 v7-3-678 +dd0f25ede9a8322b5b638961835cc4743cd479a2 v7-3-679 +52acec46b75ecf24d044982d4cc067ef7890e7d6 v7-3-680 +a2fe24ec6a0d06d0af286b9fee9e307c33f27cca v7-3-681 +8eb5b61161b4c56b378ec829e360204102d22db4 v7-3-682 +0f5ee262963528ddccfa1f54b83696f939d21b53 v7-3-683 +1cc37b8cfaa1c670e442e2f9444feeb1820228bc v7-3-684 +34aa94a421b7a03a71013ddbb92937dbaf83b1aa v7-3-685 +ba9c9d0c4ff4cf56c3c5d2dec2da71decbbe9f6a v7-3-686 +0545dab1517f8ce2b8319c02572e4bb357567034 v7-3-687 +2696da84d37093da0dea419878e4241385eb515b v7-3-688 +3c072c1cb87372f3ebd345463abbc451e80143e2 v7-3-689 +caa0ca9ad06cb515b7e6d2e4410e03802b58e167 v7-3-690 +7f10daa706bb6ed0c39f1d2905cd78368a98d19f v7-3-691 +337a4368fd2b68b9822b94e595d77b4d6773bfa4 v7-3-692 +fd96b3cc88ed71d4c4d24c6ac67c9d3a68ae6e6b v7-3-693 +8235ccf121bb241f8105d0ba6e1c92e9f8b04555 v7-3-694 +cd6c420e31d6843fa1231e1cf7a3d9eff0ad4e07 v7-3-695 +447c688b82eb4a5eb7cd0e16521094b77160fd0f v7-3-696 +7c72b5f7ada1f4a028315aa50f8739e0e83c2e74 v7-3-697 +b5b892472ecb1a10cce1709e41700b264b6485d2 v7-3-698 +4ffb6f9b58e0b51923fe6a71e6af158b6e3f7864 v7-3-699 +c656847932d33b5d68394ae1ea3153dbdba4d3ff v7-3-700 +48af8656094539f8f71dc51e0a6aa14d48ddffd0 v7-3-701 +916b5c11a13e9978c85f9742546e70d614116883 v7-3-702 +f69321485951a3c9bd0e9e7484a1901b94cae726 v7-3-703 +be8ad9c9b973a4d87b9bcfee2b6a8de1f6d3e071 v7-3-704 +0aa74f2f50a8333fd5544f5d4b383132be41704c v7-3-705 +d0ae72c2f5f94e2483ab0979eec652b1289679a8 v7-3-706 +d24d309c365fc5c6a9324a6183d7b927d9f5132f v7-3-707 +64427849c1582299f2af389c6225eead529f0329 v7-3-708 +fb7dec372910b61478abdd7f79871724153ebfdd v7-3-709 +906eb5c0ef129b6876fa9c6c5a13e44807f7a503 v7-3-710 +2a7b2943be22c27edb3c0334423c1b17275f18fb v7-3-711 +557ef119999ea687ccb84eddca295755c24989da v7-3-712 +f15769bce0b811fc840fd455035270288e8d744d v7-3-713 +9ea14f097855e0929f86c86d405725717efb044d v7-3-714 +4f0ddf4137eeb08753f2593a32b42a1dcb1e6f4c v7-3-715 +eb268db98f321b93f5e7552920b6389f9dddfd3f v7-3-716 +6a76846b84eb0fe1220f8cfa19b1161145932d4d v7-3-717 +18e95db59826aa9379e6e3ada5d3540cbae1e596 v7-3-718 +e6d8b44065bc05741effbc0635c21506032d97b4 v7-3-719 +9e119e0ade5d804f174a3b67ad5e0d0e7449739f v7-3-720 +b23f583e132e88ec98f2b449b7216642ba64a8a8 v7-3-721 +de6968039340db04ec65164a3450a40773488e00 v7-3-722 +ee138f29259e02f62fe8181073e7a063523e50b8 v7-3-723 +6e5acfdf7a5a2b3fa27a529881af77c1e1b1c0f7 v7-3-724 +f4aa43d952f5bacc752951c80495fd20c72ba90c v7-3-725 +5049eacbff0e9688af99eb67a408cae5919ff52c v7-3-726 +d3c291efdb0b9f5cd286013b789eb1c91ae868ca v7-3-727 +233666f859339f425684af70dd008354776259af v7-3-728 +d08f05285dd102d8f071ee42869416d25dd4e72d v7-3-729 +37a4cacd20511ead4cf1a8ecb235276bc448fddf v7-3-730 +778ff2e87806133faa8fcfefbd41cad2b601bdb6 v7-3-731 +fa8bf69d3866eaf31e6c8fed74862feea11a40b0 v7-3-732 +509e55bd4a3feeb651ea173cefcbd933f723d8b6 v7-3-733 +fc8b4a06af9db05af800b1304599afd3e1229980 v7-3-734 +d3158bf4dee9270477defcde85949ce58fa350e5 v7-3-735 +b1536bbbda104edb11b0f5772e433d2b5388905e v7-3-736 +1773d5aa6437b0f88029a192cdde2c510faf517d v7-3-737 +eccae034465b9a44aa2389039ba06b25dc6ae7dc v7-3-738 +e2d36f345a7f1131e085336e7b471f718fad6c9d v7-3-739 +2c12cd5c1381dd9691af5e7d3e1fe1f54c929ee1 v7-3-740 +6e1fe64cf4404d899232a880552cf52998934656 v7-3-741 +4d1753f3e85c7fb6d9cde1a8aa9ded8d11cdcd01 v7-3-742 +67e3b2753a6ef97a94084b85f87873c309fea3d6 v7-3-743 +26c8b3b49f743ca163a63463da08cc3822322bc2 v7-3-744 +aab4b29520e79134e33f2c641f1d960de2dcdc1e v7-3-745 +4934eb2e22dc0bc03fd5d4f95706a69a1ddffb94 v7-3-746 +cd59ba19985a3b3bd66dffdcf59b00427f844818 v7-3-747 +56bb88c68f985365b0545a0370be59fcd97a4178 v7-3-748 +3e22fe67fa6935d1156738a34e50bffdf62006c9 v7-3-749 +5c36fe9f19a529fb6064b37b8e47e82cdeeb7ca8 v7-3-750 +d149f18b289fdf19363214e7805a0637307bd264 v7-3-751 +ed936effb1f374004db15f092b8c8ab87631fdd4 v7-3-752 +c83cd3d01128204d6926550cbe1064daaf8dee8c v7-3-753 +beceb0a18c79b5b1bda4822b34cb2d62b2967d27 v7-3-754 +d9b4cf53be2edbb872cc489aea32a4441b39eaf9 v7-3-755 +706c87d16d40ecdf9c6fba45bc47b911d8e140cc v7-3-756 +65ef7c96d65fb2fbf660797608809f0ac5d0c4b7 v7-3-757 +9eb0d30510f7b02aa5f55f400bfab08d847ab447 v7-3-758 +25ea15fdfa5c7d5894a06814fe9411b75050ebff v7-3-759 +8e54a32bcd56226647cfd3d8c5e142e3a98c0ca7 v7-3-760 +6834d6aeae099d6bfdff5151aa2174cafc22647f v7-3-761 +699f8d8f096d4627f97e8d3bcf64b8634a484c26 v7-3-762 +b6148e4a9c397b5dd1716cdac2f96730bd0f353d v7-3-763 +b29e55d0ef01c506ec48c0c5782e669bb1d80f14 v7-3-764 +915fb3d2dd8ffc322a5cc9e294d9bb7dfa8c5a83 v7-3-765 +b5103b7d9e1284ef9ffbc7d1170d9105c0769c4d v7-3-766 +be1cffa1e477c4a96bb54a3097d3369b23f32825 v7-3-767 +9ea81cd9b1f50054629547ce2eccfac1fa00d096 v7-3-768 +d179a8eff9d7b0adc561f4a4dcfb0b7612c1f301 v7-3-769 +da7a7ba36ed2a51f28e4d3f7e1fd550303e3ece8 v7-3-770 +3bd2c055319e086665af5e449498a4d5bf40f25e v7-3-771 +d828cab6964f4249db54bff6df0fe02d0f290387 v7-3-772 +3db9aee957f7eea6729e5bfd294e3a24d41c79e4 v7-3-773 +a8f5876e498125f4916c5f7168823885c27dad8c v7-3-774 +a6e60677aea727622dde15d1306c61588b805500 v7-3-775 +80b041b994d156360992666110964e74f7473d3e v7-3-776 +9a1a4c486e6bb367c639c29c6120d5fb1fadcc38 v7-3-777 +562bbee33aa4f9896cb23ed6de8fbf60cac323e0 v7-3-778 +2067ed78d37c331685ef8f293d6a23c372ca4b78 v7-3-779 +42edc5dac33c92876d93f00f8ab8c1f6bb25d3fc v7-3-780 +29f29e86602e4a7f83d4572d2fe75b9b0de2752f v7-3-781 +0de969850c0687d2018e025f31e5cef9e9ce1444 v7-3-782 +a80af62d5e3b3614ff9e058f42647c99bffe7481 v7-3-783 +fbadf0f6987790d98c3b3fd935fea0494743830a v7-3-784 +be4baed0c933e1f1543ea175e2e36551ff6caa18 v7-3-785 +8b3e88bab70215a18768fca5a90c6f07ac1aa5eb v7-3-786 +e1b98967a985f4d1ad889c8e69b822d9126411ab v7-3-787 +386fc822dd002958fdade4329845013cbfaa3dab v7-3-788 +43c15135926fb95fa82b01424677a9c37f4d0e46 v7-3-789 +8819ea6dcb72dcf61fd0d20f8ea1904a7546917f v7-3-790 +16e8a09e8ab08d2226dc84b12b7e434bda6b4fa9 v7-3-791 +7061704c2014e4563efa032672264a47b4b7b0d9 v7-3-792 +fdbded463fdcc861630b3ea61b9654374847231a v7-3-793 +9867f92c9b9fb082ee6daca816f859b53ed8e58b v7-3-794 +17a312ba38a0b606cfd64d82ed2ebc844828085f v7-3-795 +2c12c4e2fae8db60fbdf58b34c8b73eacdc32665 v7-3-796 +0cbea05f19c73c01dbd0f04378a65ab7de6719e7 v7-3-797 +cdaa688e3dddc442c1d39780b6ac0b5ac98c253e v7-3-798 +5e9730de25e9b4fc2abe14b8d6b0968a9e59983a v7-3-799 +c0cc0e0620dd935956a472e5b23369d1d78f5fb9 v7-3-800 +48b54c590dc83b705f2e19f9aea1e9a69fe09720 v7-3-801 +cd5145d2408bb52217417af654f5664af269e19e v7-3-802 +77fa4dee43fcd1c0bacad9dc85b3deb39e0ba487 v7-3-803 +2eb4b9ed2d42312eff32e845336aab748f7fe311 v7-3-804 +dc30c01f995623e65ee6651a46b12ff062df8860 v7-3-805 +f7e3f87ac9928df0079741258a3c6034ecc48806 v7-3-806 +1efc30385c417bb413f5199253edca2795f9da0e v7-3-807 +3b2a771abb39f670269b0ee9c4041bf02c2d5b84 v7-3-808 +918d7df425afb77261428968ae646efb95b15224 v7-3-809 +8904ccd5ee85ff326a05530c02cc90e1260f768a v7-3-810 +ad21448af931b3923d9b76e4efdcf0e966c9d199 v7-3-811 +4584e59860b8db6fc5870f0b8f0425f540ea90a7 v7-3-812 +4e6e012af15028dde0f55bd9bc676bbb14e481ff v7-3-813 +d5b1d6177b374bbecfbd5c75fbce28e148eeecea v7-3-814 +448a6e7cf32e14a4adcbc4066743e2f058f7e1c0 v7-3-815 +2b340e5c5baaf66015f3367208d9bf22ce1dfc8e v7-3-816 +01fa9313d4b560997234b94b2408e6bf64808afc v7-3-817 +ad7b6062a7f4041b736d45c5f045671d60eb782f v7-3-818 +36fd800b8c6c527c75bfe285d0ed0c3bc1cf45f7 v7-3-819 +688da4d486a019afa3565ffc553af6ee1a4e67d8 v7-3-820 +4936ee89b4bcfaa33f74114bd07f20af382af14d v7-3-821 +2f7883063b19039840a4a73fa227f6f42b9e3281 v7-3-822 +db401e5e4c5d868b7848486c84521f047dc04b01 v7-3-823 +f5ef9b9c18cd9345eca783fb0c6d4ed50e215cb8 v7-3-824 +6b1f3fc893cdb6d0a4fff5997cc8ff083940e727 v7-3-825 +646cb6b6ff2372c26cb9dc9ef1a0f8d562204950 v7-3-826 +5e17a12a3b1438a7ce044db02d9916ef36e404a9 v7-3-827 +13170a796134824375a42e77af4ff012ceed2b5a v7-3-828 +7728d626ae038dedbf3347508238ef3ab4216a9e v7-3-829 +454d35a4339251adf125de78a8a98d99105533eb v7-3-830 +cb185366f5c84852a7221ed6d9b274a7239ad06d v7-3-831 +670e576a58d19c2033877d26b4338873d8a7db12 v7-3-832 +b971097606032c6fceb961fd559121d5bd74a260 v7-3-833 +3ac9d7d8274e669d10178c4d95eac55080ee0ea5 v7-3-834 +d356b5ce84ceac41b036136807ebe887208fb6f0 v7-3-835 +ff193256398a81a520b44c67d661eee36c64ee95 v7-3-836 +14698f63de8db5b034939aa66b7076ab76bcd529 v7-3-837 +1c819b05529cbbc39982513271499e0217382124 v7-3-838 +2030aca407edf6c865114f459bf2d5d79adea390 v7-3-839 +1778d51fcbc37e819c305b860f98c949915d35eb v7-3-840 +b40e6a47ee53789e91b57c04d9ee7328fa9237d5 v7-3-841 +78321dcaa8e263cdf408f7880530b7aea7401a49 v7-3-842 +f4960ddda07ce46a098d9106ac1b22fd0f6d0f0a v7-3-843 +eccc0e8a82fb632efdfa600db3f65f4ed3dff01b v7-3-844 +171234e02b1e74a2482003d56e7110d37fb4a62b v7-3-845 +b06bb07d906be3be689f90399effd2b3b2ac2ee3 v7-3-846 +4dd43d6b3df705a513be75db8a1b50a83f72088d v7-3-847 +e49b80f267dc3cde78de78026368dec3a20520f2 v7-3-848 +dc77c2a14a05810bda7e53373d76b7f41341f44d v7-3-849 +07fef68eb0188adb3d750b92b78059cf41fc8c7c v7-3-850 +dd669f296568a7525e02ab54b615bde20d37c466 v7-3-851 +3fd805ca2a6a6ef231f111c6a7b3cd512abaf537 v7-3-852 +eea32254940fb4cd61339650e10a808f4e702e62 v7-3-853 +14cdb6e4d5b88aaaf7e33eaee87efec5b1c1ebf5 v7-3-854 +6604853dd8227c7983dc1b10f804f6aa4b28578f v7-3-855 +fb533fb6c015f40a3b1301c0c876c35665b0d6ef v7-3-856 +4905e038b1057e133d0e72c48cf88580cdedf26b v7-3-857 +0a3fab86f34d6bab27e0be69db4f39ffb664557a v7-3-858 +ecf21be84def6033137d168e0a66500c29aeffec v7-3-859 +6ce32844727d8d04e8dc91310d0a4118d81aa161 v7-3-860 +6fe728bf165e9b6974ef47e86d98b0eb14ce21f3 v7-3-861 +dd4f3ceb5d86f8367d4cfd6fdc898e493c6d0aad v7-3-862 +5c0652f455c9f2ae72790a782fe5b5fd1a0e857c v7-3-863 +a82ef37d38c09523bab204253b52e177dbbc0581 v7-3-864 +94342b0605fb9111b7fd4a45a8bbc72992c4c255 v7-3-865 +90d72df431e54d677f03171cbe558434029c027e v7-3-866 +0fcb050fd79d84ed190452e6387e42d320678fec v7-3-867 +b31989e2b05832d432557a32ed8901dce237dec2 v7-3-868 +23ce9a61bdc2a35892ec4e4fa22e8964d60dc6cd v7-3-869 +26e59a39fdd965ffe83bd654b705540551c8e0c8 v7-3-870 +d52c45b35fb0c3b77bbace6cec3deda8100fbb7a v7-3-871 +edd0bc1f26bd019cfd328a0dc2c9a854607e4a41 v7-3-872 +7faeece39228fde0ac5c26a362a223d0dbe9bba5 v7-3-873 +4d0b39bcec207130e483ffa66b6f51f999d8e95b v7-3-874 +beab15a2ef147b880bf7b5add269142b9af58317 v7-3-875 +787df0fc6539ff7886e9fabc85ea403096577440 v7-3-876 +96f478b812b14fb1a5710450a1174baa55c73409 v7-3-877 +97a5ce76cb7d5f635876bbddf35b421c0c76690c v7-3-878 +79176b78969cf5d182b378ffb8e341e22f18775b v7-3-879 +9945fe0536a32496fe4842524199b5c24bb8b0d0 v7-3-880 +d8acfc49d94e485f839d8e2534d302b91a98bf9d v7-3-881 +8653c39b85ea93e052bb0cbda571e7298451eebe v7-3-882 +76aa34cef80f5d22bbbcf60278c833fdadd70131 v7-3-883 +22adc26aaa9f701267bd1ee4636592859ee2dc70 v7-3-884 +c5eab656ec51dc2d40ef6e39194c74af868a4b5e v7-3-885 +902d6ab377ee2f011279b3aaebeb05d0f5c2bf80 v7-3-886 +015e53d9978721bbb9283a999c668c98ad2554a9 v7-3-887 +b0b253898cf9ff8f5fbacf69de76b5640b1b6a55 v7-3-888 +cb0c694517a08f1f8f548f0771e874537a390dd4 v7-3-889 +89bdd6d575101291c66f9e701c456ee71085d147 v7-3-890 +1dc160bf2488fb1332250edaefcc9f1e320c8e57 v7-3-891 +6c2e8074ea2588f710adc669e7a15041f6e80adc v7-3-892 +dc3efb6d5a0821c79f939db8e3b77a714292195c v7-3-893 +52e946d654e0fe978609e0a23dde3c8998f2ce24 v7-3-894 +11007e80829ca9d72813a9c60a2eded80a0c1855 v7-3-895 +af3a3680fc75f090e896d902f0b4c7a710c41d41 v7-3-896 +5aa74a2f8f9de4a6c10bdebbef910d6750f2a980 v7-3-897 +aca1886102bdf19f755dc5eb1ac379f1f0680f6d v7-3-898 +bb3cfdb626077d9236447f40ee725b9a5d78216b v7-3-899 +b53fa3b431934de82d3bee329643bbe0856f651b v7-3-900 +790238e5a46c70f45232c0a54d0c73a6ca1d37dd v7-3-901 +b01e3cff92530f6c317e0cf2c0ba0fb4f97df883 v7-3-902 +166b3df562ead7b4f85a494fb8a6eef40affdf85 v7-3-903 +bdab73bf24a8b361a42ffcf429c0aa705d4594e0 v7-3-904 +8e1d1da398b378cf03c0910979cf475ddb2df7e3 v7-3-905 +ff1f3e42df08b2ebc39e3b1f2c80f4751bf16dbc v7-3-906 +9f3da1dea7c0944837e8d5a080eb59a24f6c9dd7 v7-3-907 +4281875776fb2c3127d08a03c3600b58353c9796 v7-3-908 +b79f3c3a584c701e93acd1881a934c931634c39f v7-3-909 +d8d9c591c50fec51b64c12bd2f42d3550bd31d7d v7-3-910 +f1eab4f77a6fe4b77508d86a68a6681195806607 v7-3-911 +62eadd7de409641de83ce61e1eb311e9116e06fa v7-3-912 +0d3573091d42d4797f10cff1c4139557d384f899 v7-3-913 +9f642ac84df9303d34d0214da2ade28f78ecfb6c v7-3-914 +d8053e6bf72a555ed34201c6edb55a23b4fc9965 v7-3-915 +f39af34195702c5587eff88dec51b40e327f418d v7-3-916 +3887b02953cec045611021e0adcd512b3d127692 v7-3-917 +6a8ffaf0585660badbb817f6a2f1cb583c9f1447 v7-3-918 +12636b8248163628e7c8df68210dc17932440157 v7-3-919 +923277a9cce4316d6b4cb3c6571dab538a6b0108 v7-3-920 +97474f967eec7f24f09d20dbac65ec9bb660bb2e v7-3-921 +1d56e5dfa08e68c9ef0645cabf076e401799e3bd v7-3-922 +6ecb80dc6521837e28bc58d27539767d6947037d v7-3-923 +7eaccdaa530431c15fb0e0803e5495074e883bb9 v7-3-924 +04736b4030ecfa2c9e8d6046ea533718dc5d8ff0 v7-3-925 +c80838526eebf3374fc42febcf40cd911cc1523c v7-3-926 +d67e292af6f9d259d0893c8062f3896a8aac000f v7-3-927 +6d45e6f974159e816a4300877296e9a0760ad113 v7-3-928 +94aa0d30a3ea6291daf7e6207810ec5282cc97a4 v7-3-929 +d85196defe0da017ff6d547e36bcf40aecba9661 v7-3-930 +fe0c7437ae8b0e05b57990549e1ddc71e456f18e v7-3-931 +b7f2d97ae2b7442c46c48ef36d9e33c3ddd34db7 v7-3-932 +c9820396afb971035e722ddce2058d5db2f0fc64 v7-3-933 +000bb500208d54e17de26bd5cc5a18fae8d1729c v7-3-934 +c42e130ebf36515e574d89efbe98fe380ec7c694 v7-3-935 +e7361b2d8136f6468daedf1bec7390d77c5c5bb1 v7-3-936 +8ec7323f417d998685afc26bbb4e466eb0204352 v7-3-937 +a2f03b41dca7024da5e702d016ae52fe7f51594c v7-3-938 +48a22f36ff45659594ca865f502fe95691b2e332 v7-3-939 +e2db42528a5bf380bc7e92e41afc807b27f01c12 v7-3-940 +da71e66dc1d4300cd792f0da77a5afd99d634c6c v7-3-941 +358c10968c7fcb2599356b419473a3fd46edcb69 v7-3-942 +736b8e18a3bced7e498a6b81e7189d78cf4671e0 v7-3-943 +71fa86c8fd4a1af0a27a880ea15e3a7b97334453 v7-3-944 +80eea7a9d6b9c2e7e8ceb18d6a090387f7e1e9f5 v7-3-945 +11376842075637114ee3714ccbc2e0e8a432a4ac v7-3-946 +a84f21892563be88839b4026bafba77f9e9a1fec v7-3-947 +a6f0544df95e5f783861d3c67d84bc5a28a315da v7-3-948 +cfd76908da252e03f46ea15cde44a3664e895fb0 v7-3-949 +d4816e7c33289b9c8aec739850133484c5c3e8fa v7-3-950 +907b1f035ee7cc61fec1463db85a9eaba4717120 v7-3-951 +2a166caf8709876053f9b32f4f88590a4fbc6899 v7-3-952 +7b789d337820088f09f6a8fb488efd418f702133 v7-3-953 +1afdb7d21c14e15a1239d406205563dd702d7d24 v7-3-954 +fa90ebf2c8f36d98ef27b2668ac1e1c11db75bbe v7-3-955 +0bbacb6a83bd678266a0a864e47f4e03927103fd v7-3-956 +c16602758d847665ed50138a562f1513ca5dedc8 v7-3-957 +58b74ab7f29df09e54bf76ac84697f04b9f4c163 v7-3-958 +ef6b11bb183da058edf52c86ce705726ccf72600 v7-3-959 +e67522c4f56646bd6ef91ad63b152bcec96b2e05 v7-3-960 +d5177d5ece0c539680390448c8ce8d05a6d61201 v7-3-961 +0a94ac379769762200c427995551fa4325ec8f28 v7-3-962 +7eafa576528e6921f337da5c1e3e2d0a9617993a v7-3-963 +7d81f4e967285d14c9e9901328d2c66911a9a2f2 v7-3-964 +8a3ca4adb5d8046f87aabcf30a2b7aefb8b9d46c v7-3-965 +9b800f0a757fcbedc2c6a1851353c3e5044d39b2 v7-3-966 +20e30e31bd86390590e288516670b81caec6188c v7-3-967 +dfbe53a54c790d63f8788c13a6a2d18198825605 v7-3-968 +137f9d41f50894cd25e5b47764af817dd84037cd v7-3-969 +ccecb03e5e8ba41db171a5535047f9a30b5d391d v7-3-970 +8d6bb2338a583af5eb85589949065cfe46c42bd4 v7-3-971 +ba53304245f033b6cf2f6088c09f45dc0d98c47c v7-3-972 +09e1e574a52d38522a35af8741b3f8ce92336398 v7-3-973 +92fec4b83be56a65ed81f25885717f6db7639854 v7-3-974 +44b89b025cdfb6a7371a036ef1b2dd93670b2a15 v7-3-975 +015a8fabf90072ae0eadee5c013f7db00f83977c v7-3-976 +21e13403140aec6f32a8f9b49dac02c37945ab11 v7-3-977 +fe8a0a6a1c2a2ca51c92275a9010999106505ed8 v7-3-978 +a63361b9097952faa9c9eba2caebef09b9f8b62b v7-3-979 +c83656c9745a005df1aa7d6985787048a1884734 v7-3-980 +4ff8fa416a0dd64046e0471933d09f7f19a4ea0f v7-3-981 +dde1cf311be6edf32243f03fd8436bdf9798de93 v7-3-982 +ab5154170c3dfc0dd769243e1da53a865e1f69d7 v7-3-983 +94c5441984cc47971ac49435d184c13cd6d3014b v7-3-984 +0c940b6f282836186f428d201760c6f6b9b52fc6 v7-3-985 +3cc2dca142a0aed29befbe6d2944ed580d728545 v7-3-986 +032c9f916f257ed59f7c55a6c8113791d3def365 v7-3-987 +035fb0d5e7ce67eaff19a6cadb37b57c0c25a36b v7-3-988 +cd005ab15ef3fce8f551c81ea10c93889f42d09d v7-3-989 +9a1d78f828261181232734378f73d648148a42bc v7-3-990 +8fe768bc1234fc817db3cda61ae9e9dabf4ae958 v7-3-991 +89ea7593fc0cb9ec66cc04619217447715289a78 v7-3-992 +dff1542e64f95a3fe10ea24f4007206d53880087 v7-3-993 +f74611bfb1b77eb2ad42b6d74b3e3657cf3f0725 v7-3-994 +6d517f6e5f0b031cdb386878d8d428f7f2cfc2a1 v7-3-995 +ebd94eabfd8013a605d8efc7df64a970531fd5a8 v7-3-996 +ef02f32d8e53a7b3d7327ac79359a18070e4a101 v7-3-997 +47e6dec5ce3cbc8e833480b8300132d4bf5f035e v7-3-998 +e6e60d9da892296ad770b26a22f98bb72c4e1b7d v7-3-999 +d037b9cbdaaa0af2b383c93acd0fd87e8eb2b8f1 v7-3-1000 +9dbbddb2ed10936c20048ad28a2dcb9fdb6cdd79 v7-3-1001 +b498224f5b417bc436c9b967978628703191c0d9 v7-3-1002 +ce94a870b59bbaad92399eb782edc33a855e0b93 v7-3-1003 +cadb57fbb78165c81fe4718a355b5f73c641bb62 v7-3-1004 +90e9917d4114461c5f7258c04e61de1dff2e1a74 v7-3-1005 +9a2183bd829502597d52f22a1c27fec8399298fd v7-3-1006 +fba9c0f86f77942d47a5505b065e01a733e7f111 v7-3-1007 +8cb14f59a3275cb183f031e2aa1e29e230635d6f v7-3-1008 +57393dc4b811a1283a77c759a09bc52ba78acb8d v7-3-1009 +36ddcf4cecbc96b9854af6956f371dea205a6890 v7-3-1010 +55bcaa1d2749f9dc22187bea848b002220cfe960 v7-3-1011 +432a6b8c7d933dee8faf25a342e857fa0a538eea v7-3-1012 +1be43c095affe8e945751a5cb4e21210f31c02ab v7-3-1013 +6a2005efa02b4ae30fa4867db1463fd4a3689843 v7-3-1014 +45f97c34953728cfe859cfe5212c241fab1da20f v7-3-1015 +5cc98a5898cf9ff0841c78acfe1056ae075a217a v7-3-1016 +532c2e850256cced37b8864ee7042ef8240f135a v7-3-1017 +80170d61a85cc03d66228c16c80cd8a4898a971e v7-3-1018 +08ac4698095359c3a888b34074548435e9775973 v7-3-1019 +f7944ce459ac77416617e0b2f8a91a9c8cb385b6 v7-3-1020 +fc997f05cbc7b566df765c79452a541afaadccb8 v7-3-1021 +849180347ac359fd52b92d70b545800126178eab v7-3-1022 +f0c37f5cf4eabb04044ccab4031cc4056c5a47a2 v7-3-1023 +7b835b2969af137f979b633977d59e13cc0960df v7-3-1024 +b2946c06d1b6d4e9d38fad1d4281e2d4db3523f3 v7-3-1025 +888c12c899e552deb33b2e1e8ea3c8141352c3ce v7-3-1026 +04086e29756318d7a7cfe3d35fd38ccf550ac366 v7-3-1027 +4d81fdda8f35cf764744161118aeaec948b9fc90 v7-3-1028 +e7016af0cbf92a5562c01e95f2cec306b6465783 v7-3-1029 +d1f3c77159f9b69f229ee0f70fd98464b2546920 v7-3-1030 +96c1a785009768720fcb16add8b9daf1290ce56d v7-3-1031 +f262fb02889d46743226a78363250e2e1ed7426b v7-3-1032 +b2a8e3a66f8cc73c3942ef5cb9c0519df86203cd v7-3-1033 +37e444aeb33b2adf359f8736807f18ff5dc11019 v7-3-1034 +626e9ccb7c48b3fa7ff6d2ca5efe91bff39135dc v7-3-1035 +b22bff1a6af81dd78f8e9ff0bcded471ab858245 v7-3-1036 +7a2be4a39423e4763ca164dc77fcfd4b27f91a8e v7-3-1037 +6a73ac422c67d7ad4642ae9194cf9d4c832021d2 v7-3-1038 +321cfbef943199e8e967f6354877ca8fc07e4551 v7-3-1039 +b9f87487d93597f69f09ecab8cdca11bef6c09d0 v7-3-1040 +63c9b681c3dba1cfcd2df48085de2453c43855af v7-3-1041 +fa39483a1363d533f9c7897d476bf0ebd1b8f44b v7-3-1042 +1e8952a5a726ddc1458ff40270cd5da16be3f272 v7-3-1043 +0cf552b325b55d417079ad28dff4e27afec5a2ca v7-3-1044 +29b2be2bba0d369fef85af7aa3196f8b84cce35c v7-3-1045 +00eecb2f8e3e9664ff00682d278a2b1e19cc4b09 v7-3-1046 +89bec74fd7936cc425b42f9e882f1f3864b1c95d v7-3-1047 +19d406a8509d9755b05af7d5ea521925b01f0d76 v7-3-1048 +074491a83571596acb6aac6d371140e8f99fbc24 v7-3-1049 +38276cfe40b2069f94b159cc14b4ade47257c836 v7-3-1050 +70600448f9e7f3bff3b8b0c2f2733662bac08ea8 v7-3-1051 +12421d8a45d5597828b8343c31faa79f77d9c512 v7-3-1052 +49f0fcd9762ce5057e4ac22417105b3ce43a35f3 v7-3-1053 +219b2fcad60d27febcaf7251a91be331484b2c98 v7-3-1054 +5679b8ddd8cc0eb004cbb61babb336c3af398c92 v7-3-1055 +21a99611149b0f1c200e001ec26b8b07c6e28c45 v7-3-1056 +90beab957ba9ebeac150bc5a56cf6ad90f53336d v7-3-1057 +66e615ce7f61948a2a4a8615d703a42d56763490 v7-3-1058 +548b889fe3cfbf06ab50de373df5e65f52cb249c v7-3-1059 +cb5c1e37ad4d4811e5fe178f14c523b178da81ec v7-3-1060 +18ba89e06fab93e8cdf7ca8dfbb34b66ff9d61d1 v7-3-1061 +e4e48d4ee0409509d56f7d654b77a35133283bc7 v7-3-1062 +4157fef7b95074cac55977127964adfa883ec030 v7-3-1063 +3857d399ab41ee8af64c5307c27da64b01e0a233 v7-3-1064 +07c534fe9b6cdbfecfd100b7e01f894d6708de1b v7-3-1065 +4c46e1487c634997f4701d8e68ba9ab019f85227 v7-3-1066 +52a4f66ae1f5695426de21877b2954d11ad8a4f4 v7-3-1067 +59e6c2bd68e38244d2133fc8d76bfc9c7b082d9f v7-3-1068 +6ec3dada4ad3c7e2551191e598cfb6d37bedac36 v7-3-1069 +c316a30a889217be4158fba900c85d9d44ad3a1b v7-3-1070 +857f6c53f1172ed836d44f105f6832973369bef5 v7-3-1071 +9f502d8d5165a79b361ad6048e84c278e1397f88 v7-3-1072 +f10f63aaec5c08e6f3b1b3abdef6ce3eef1cff6f v7-3-1073 +b943fd24c351141113dba360bd1d1f02b38813f5 v7-3-1074 +779ca415f8e142ab5ca74f95c8f732d1f00fb7dc v7-3-1075 +93b7ed814bec8a9a0b43138be7500b948d48eb92 v7-3-1076 +80b0081824fa3084d0e12f0b21f6e504b4e5e076 v7-3-1077 +0dce3d812e7acc74c39b3d87d8bb5b3a4dbee878 v7-3-1078 +bce2051173f01564805158ff669255359953fcad v7-3-1079 +7a35419393c36edcb710602edba31d5096d357d0 v7-3-1080 +9e7ef781d494694a36e056631dbd2c4357ab1090 v7-3-1081 +2d15582e132f62aa37e5eea5e837b3824f148dd2 v7-3-1082 +b3c59716e7001ab5127c259c9fd3552de0d36d53 v7-3-1083 +05d57d7c2d5578f1d794151be9cbb5aef89d821e v7-3-1084 +811a4c9b51d808cbd54dd0bab606d7cc1cc2e412 v7-3-1085 +c1622ff9ed8d984604a47ad0805d3fc528452bde v7-3-1086 +4d92b873acefb69e112fd73b642bfdf7979f1355 v7-3-1087 +2f51ee8825dbeb31713e635fd8d77ef77742ad64 v7-3-1088 +79522bb1712556183073b148e085d302967d7260 v7-3-1089 +8db697ae406a8ceb05f9fb8b45a70980904f230a v7-3-1090 +371cc0c44097772ac13e0e3cb59350c6be52257a v7-3-1091 +9d97a0c045ef5c86652c7fae4d4cd5752bcb42d6 v7-3-1092 +08fbb1ce1bc56e3884c5d35106df31a9cae1f954 v7-3-1093 +efc4fb311d5d45f6320b9d17ed47d24748335bcb v7-3-1094 +ed4e689bbea1c45a8aeb808b526dfd052470ef20 v7-3-1095 +2db0050523719e39f17f4bd855310bf5688155f5 v7-3-1096 +0c25fa1dfd97721cd4c92f4e7a9a524a24f3f43e v7-3-1097 +26f2dbea7443f719c854c7a1fc35dbacdd129307 v7-3-1098 +542af01979be709a4763eb8b9cc1cbcfaf584838 v7-3-1099 +bf917ee1fad22f643d7ef1a919b233f07fc1fb3c v7-3-1100 +761e42cc79c2560af55ebec0ec1060f547e64577 v7-3-1101 +1c5da99d1b708b7af2928e7bc0d9d57935872958 v7-3-1102 +832bf8136d86dd17489d962cd2d7316d7edf5087 v7-3-1103 +fc4d7f02ea3ac731a9717438c72aba098b117e8e v7-3-1104 +a804309e7327f0ece015aace3c855e7987f0ac3d v7-3-1105 +ec72bb4a0fc2e7f0d517cb12f784770cea9cc19c v7-3-1106 +bd6bef0bd0fbeb79b440e429f5e077169388198c v7-3-1107 +3534e9b4fa42b392399d66d08a1dcdd230accba5 v7-3-1108 +450e13fe16211217f32bc57c3827f439540398bf v7-3-1109 +3849c811cc0bccbe09a559e2be5fec7e810510cc v7-3-1110 +43de4ebbe7ad009199987337b864240ba19bfec6 v7-3-1111 +749e2b2755d59eedd6fd28e7d9ec47523b722be7 v7-3-1112 +0798b096bab3efde994f0b50d6776ac72ca0f41c v7-3-1113 +532c31f9e92fd44526d02d26c503a15c1c1c78c2 v7-3-1114 +3f2319a953b3c2fc8cbe9ae9225080a5b30a638a v7-3-1115 +66a9e8fa6f45ddd8dec5b98c193abc576330e4d4 v7-3-1116 +97560c16ca99a1341f31d88ed9f508d777647b5c v7-3-1117 +6a706ca7a889d27ecd6b671e31dbe28ab6b66f28 v7-3-1118 +a62695305e031260557ff0cde6eca1db5ab9e3e9 v7-3-1119 +d1376091d18b5a742ada87bf825d20e99ccbef19 v7-3-1120 +4b9503f0c7d3d75d772c2c0dbe19616da2480749 v7-3-1121 +7793e737ec8723a18d4c5468b33a895249ba4f02 v7-3-1122 +77ecab3bb2078fe525602172b35c2031c819ade3 v7-3-1123 +be1e4acb30cab46ab439e45b9b6871a7aff23800 v7-3-1124 +96f3348f9f119a996ae8826ef4d5a06c3f7e677f v7-3-1125 +b25a1b2e3175902e49a69e8d9ccc5c1cc43fbe3f v7-3-1126 +532a9855bd30d28cc14848ce5136658a273bc999 v7-3-1127 +47906f888725760ac704668b71057629e266e486 v7-3-1128 +f824cb97eb922975cdc1025f3c2c62f1bdbcfdd6 v7-3-1129 +ec24ff78a79c1851d8003780035d6c55f98dcceb v7-3-1130 +82e6588762e4aee5b0f0cd51d5c124ebfec6424d v7-3-1131 +b20dbf3a5370543ffaa1d6fc337df1969843477e v7-3-1132 +03375ccf28a27ed72f6cf347383aaacbd1a51e4d v7-3-1133 +531e598651fc6a7c28bc808d82c09ddc1759bf4f v7-3-1134 +e4bc21965079eb6948d8e22ad96d145659852707 v7-3-1135 +343d09006056ff408f08850317b8e8caf056f5fe v7-3-1136 +c02c7df9bdc91ae08ef626d4a8262fed47285c41 v7-3-1137 +47222d8b1e94c962f9daf6c2ff3f6c6ddcb71613 v7-3-1138 +3b5a023a45434e825b8dbeed551cf7f4578243f6 v7-3-1139 +7fde662e1db24077abbe26e6d78c286928f5c9b6 v7-3-1140 +10673b3531ebcc18467d04bb806036cbee1b8e2b v7-3-1141 +65cef998f860b3745880622cba74135bfa249ae2 v7-3-1142 +66e849c4558aca6c522026882159b41994d0c0c1 v7-3-1143 +8360a59aa04b8668e377a66d1fc46e9e52b35110 v7-3-1144 +a30e3762957d61966152040315d160f860433576 v7-3-1145 +e3f9e33fb28c367aac7b2270b6fd304fd755b6d4 v7-3-1146 +3cd3cc1e91193a0b45e6aff1373cd4802e595a16 v7-3-1147 +220bdea4f57919c290d92b1f6c83a7252cd660b6 v7-3-1148 +66803af09906a828b9f41d7ae0f7a379137eaf99 v7-3-1149 +3dbd251777de232c168d87650acda5fec408146c v7-3-1150 +4d7e3df04256790855f7a6dc289f32ffc04da133 v7-3-1151 +9909e44879b9f80679fd05af19a423b2673b2301 v7-3-1152 +bc3f4804cf470cec5773d8842743efb760f69102 v7-3-1153 +6419ee8098c80f0418081c73b790b09c61f13c3a v7-3-1154 +bf1e6326df1104cabc04b8490f9456dbda901fd2 v7-3-1155 +8c4324e6f4779ee316361511ff783f6344750be9 v7-3-1156 +2f1ee97f5f23a5f9e1c572ed4afb50fb79ce7a35 v7-3-1157 +46077370bc605815f5e41cbfc925120a913acbaa v7-3-1158 +208a6c04e6b8221c1f5187391d86c5b57e61445b v7-3-1159 +60301d4d16827a961019d72a78e811f41326c680 v7-3-1160 +ff393592644960783e9a1c7c7959a8cbb0954673 v7-3-1161 +b8eabb6a96871321bec8526fa04ba1ff1a96780e v7-3-1162 +70b1178dec7919120632cdeee6056e38108356a7 v7-3-1163 +4db0bf9f1b44d1f0d42a1863732dfaef73c9971d v7-3-1164 +05b8436873d48055cbd24f043548092755d77be7 v7-3-1165 +d59ff2114733a526847ea38d093897f496f73ffc v7-3-1166 +81dedcd648216d6b3fc6b967368fef23d8ee1154 v7-3-1167 +ed47632fd1498d50e31ab5b30aac403de3db2496 v7-3-1168 +a83fb2bd8c8ea8865f460f7d82d8ebff8202cced v7-3-1169 +14c2e63caec65cca0d315e82f90b5e1d84430487 v7-3-1170 +fc7f985df53745d157182585b01ee5dadb722a62 v7-3-1171 +96e154e825a7441274a615e7d7fdbe68e5534ee9 v7-3-1172 +b584d361e7461c79728585f16f408984b0234fdd v7-3-1173 +52850ef928f85755f005267c1f02fe9e9f898c99 v7-3-1174 +84a8d1ba81c393dcc3a45eb3b20fb6ac5f18df7b v7-3-1175 +e48cabe984537b06cfa945926844c4af96799331 v7-3-1176 +e79a20f07daa91051435208887cc31b245555046 v7-3-1177 +c4d4f0fc12b9b8665d6859680155797be960c36f v7-3-1178 +d84833983de7708de27774e3f01e7ffc8c03eec6 v7-3-1179 +04b8912a9c85e72728a2cd6a4f8e6aee82525b31 v7-3-1180 +b7bb20390111b75616eb66558aa9517901eb0144 v7-3-1181 +fa98c2b030ed5ac8d8c8139405d20ad6c611c065 v7-3-1182 +044d23a64c177549b4b5e3183642f3a5b286d14f v7-3-1183 +9e36c6b1ebf4554a24bd879965f348b81ad5ca6a v7-3-1184 +6d935f45c489b346f06aef5b1bdd87cb98b8400b v7-3-1185 +7b8991e084f9bea2dde9ceef7a245254d656b6f9 v7-3-1186 +fefd8d33a7ea43f86d6e5a2ab30440140ada14f6 v7-3-1187 +6f7ed9b799a3db282f0fc076d8232752716a4e00 v7-3-1188 +dc78a26f6f64bb1330b9027559ce0c8fe54ba1de v7-3-1189 +25d64a4edc0b0f3f17330a7b12f3c1ca141ccfb3 v7-3-1190 +4c42efb4c0982d305ec9ee99bb3bddfaeec2cf87 v7-3-1191 +07b9c48a30e973833ee70d38633934f6fc2177d8 v7-3-1192 +8b46c37c4b843039e5a543be98978e79ff6f3d31 v7-3-1193 +91136a41f83f3716e7ccb4f2402216ea215a4acf v7-3-1194 +4837fd61be52d420c69fcde0621cd5ecc298d2b6 v7-3-1195 +56fbf60e94766a202ee71749eea19a862695c92f v7-3-1196 +2fc1f3346bfb3229f35455101a5944e6785a02af v7-3-1197 +517fa1a34c7cf1c8fb04d43976ad6c381f48cebd v7-3-1198 +be2973afe77045bd749c63c46ea02f61efa55862 v7-3-1199 +2945fe016b936c9e3a89db48692495c83f1843a1 v7-3-1200 +d8f65e6238fa2bac706f1a4868e8d38ad71ded64 v7-3-1201 +1707ddb6f5aed99b69fff8a66dc3eb8ab40d7f46 v7-3-1202 +ba328b4a990ee460cc907ec59aabee8d872b7768 v7-3-1203 +0792cc5133ce1f37ad9e1d49804100b28d0a391b v7-3-1204 +d02448031708fca0df590f46f850e33acc9f9651 v7-3-1205 +8dd2769ab75c07d88feb49d1dd489a1282854217 v7-3-1206 +6ae32a64e153d7275058d965e0c1c12d106bc7de v7-3-1207 +784e342ddcaeb260ffaab5f0dd30ec5db832842e v7-3-1208 +afb00cc8caacb8969705ffae0316bb9c01156e7f v7-3-1209 +7155782d94fb88e47e252b159dd677c31a3f14e8 v7-3-1210 +1cf02fbe6281c8efe63f866470b6c44d5835125c v7-3-1211 +81e623ff2e554695c372b7b06bd826c6298bb8b5 v7-3-1212 +ae05437a744a3b6f87d6f3304a19e5256849bb1c v7-3-1213 +bcb84438bb5bf27101b25ffb2c2267ab6ff0e946 v7-3-1214 +8bbd0ff486b3cfa711e0a7f305b4a0241bd5dd52 v7-3-1215 +b89aa3374b7fe64968421f4e20cf22cd3e95713b v7-3-1216 +613651492c1905f62cbbcbfc616d7935234badab v7-3-1217 +d10ede931224a9818a98a58bd9382f77728ced1b v7-3-1218 +eb5c3508cd7da14f8d3337ca4dfabe4122ded20c v7-3-1219 +ba7db05e1482457a36b19ed608f820275fafb9f7 v7-3-1220 +9f7b92f232d31450fd04ecec3e89b027c0f28b02 v7-3-1221 +07831d280e90a87ab9f42a9c96775ef2bc0cdedf v7-3-1222 +5cd32322154c1c5970194eb5300eec2ddb8ccc30 v7-3-1223 +0a379dea13c97df4ec2ba1487dd50c1e8ba0c912 v7-3-1224 +27b008d5b7ac5fab02c6934b87f258bc4715aed6 v7-3-1225 +b34d719b13cd9dd44485600e5cd939814b9b065f v7-3-1226 +5cee875f30961cf1adadf386b7e2764ea8aeeb64 v7-3-1227 +620d9b59d4ed9deaac614c707c71257907b1dd21 v7-3-1228 +b6e693e1f9461e5020e4cafa1c6e1de24776e11b v7-3-1229 +f5c822e5a0eba6f490d0be9f6892de929295be87 v7-3-1230 +537bbfff0c5c0bc2307a85133f59f07b00c55e41 v7-3-1231 +a594ce86b5eade96cb84415b3b027abe611c2238 v7-3-1232 +4ed713442c51625160cd0bca612d9a3417e4ba14 v7-3-1233 +f4969f8f66e974584e8e7815d0a262c5dca79638 v7-3-1234 +9ae0fe46777674504e0f372e68cfb8e0be81b2ee v7-3-1235 +39980afcf54aafdb9255424adf5808af45ab2242 v7-3-1236 +5b2c8f3b390632e1e57a3839f040146f6798a969 v7-3-1237 +048c69ebe8eecb218320030d9ea41fe4f6290848 v7-3-1238 +e130cc3d17af412971143b8420d6e7b1cbd13ff2 v7-3-1239 +bc9125136c69a4feecb4b68912fa04380f42b77f v7-3-1240 +c8747604696795a300f6ff05091813d691f9a488 v7-3-1241 +b4a2eaf28b51327b4e56b4eacf4b5d72a52560f6 v7-3-1242 +8a7d3a73adabaad5e9fe079acf6431982145c7d1 v7-3-1243 +b4a71dbdb78790ca423103ad5deb71b1df9b5b04 v7-3-1244 +43329b2b5b79ed2e1017869ee2e0b1caeaf2f0f6 v7-3-1245 +a1b41dabc682ed8f8770a12c2d3a227eb348885b v7-3-1246 +f451d60ab8ec56d02a7b5f2d5c16187566279886 v7-3-1247 +3717d569027d8ec8b62e42e33f91333ac22ce6ba v7-3-1248 +b614332f7df2f6f471bb4bd93767becd7844b90c v7-3-1249 +6aecf486bb347ac6885afe36d62ddbbf2457f898 v7-3-1250 +788f4802967766b7f3d6dce83cc027baef422f4a v7-3-1251 +875a0aeb301c3fb2be8a79f2d82e324d80caf4f3 v7-3-1252 +d6a7dea44a8667d834e463b8658cf85ea938112d v7-3-1253 +5eff37e92f03771aee77a3688d79a73e5b6107e9 v7-3-1254 +f8d307ebd74a4097f7083ea8117be0433f00c7ce v7-3-1255 +322441058afca6a8aa52d34eda9fa307608354d3 v7-3-1256 +5751284311f37399cb7a66d99fe317de4ae86ea9 v7-3-1257 +c9e2ccc53f2e119e247da7fc9111b6b9c9385d93 v7-3-1258 +7ab94cb688bebd694109442be4dd6edb6ebe3c85 v7-3-1259 +7aa4e0822dec0840770d9f41052a772a887cd213 v7-3-1260 +1cf89d38aa7628b55f1a45a5325adc83abe85dc2 v7-3-1261 +5e0b6a9282df8b9435da372cad77482f1f5b20aa v7-3-1262 +a02575cd564ade1019ea89db07c1c1d0c4b5418c v7-3-1263 +558c815e1a38d7ac2fc61c4155aabf8e81a14034 v7-3-1264 +53c1b30632df47993bc00947078dd31a226c9a97 v7-3-1265 +bbe4bd64c68c64afaa6636e8c3e9a9a6241e91cb v7-3-1266 +cabdcfe72dc398fd67bbbe02cff5e11e4dc2506e v7-3-1267 +72fcf674e545eb87bb4ea996df56e4eb7c04f6cc v7-3-1268 +350239b0e9eb063d9f84dfa4bc7a2b47d78e9afb v7-3-1269 +35b6fc57a2868b235284d914820da0815e62d54b v7-3-1270 +034abed357a1a2fabe624ed59ea49ebdec09d790 v7-3-1271 +a00cd1839ac4f3467e1e51e619b4c65ce4e0ee81 v7-3-1272 +30910831e5b0f0eb28a8eea7412f5ec9f3533ab2 v7-3-1273 +761cef8f5d1d42e315fb85765ee90857981fec06 v7-3-1274 +8875401008da99a39878478a293f833f68481ffc v7-3-1275 +d2f9f67924e77ec3d90164dd6ff2e50c5107faf0 v7-3-1276 +6a7ae677d6a1f116b685fa0f892052e20003eaad v7-3-1277 +cf52d2a8c05cd037c049abef0f58fd918146f3bb v7-3-1278 +cca600e6092839efeb3795db863916959921bb0e v7-3-1279 +1cacf785299e771ca463c493c8c870e395c09cd0 v7-3-1280 +19ed30f7cef76224ef39ceadefb64387eb986342 v7-3-1281 +22ac43fb6d30ad1097d0c7e8937b28efcb162137 v7-3-1282 +d6ceddc0be86e46a5a9a696e36c54b9d133f2203 v7-3-1283 +7b20dc8041645778eeb2f7823a4c1c647f735d24 v7-3-1284 +14e7a115d54d2c095f31ccda2d04fbcf775dacde v7-3-1285 +6ddc1785c4ff3779c18f5c313da591a052388b2d v7-3-1286 +34c629c3b4bab5fc755e83869d929f8cb322bfcd v7-3-1287 +8b7baf39a345aecf00a6116b5da211b51c6e3457 v7-3-1288 +1ed945570d47e9a60694ed1ef3a5b208243657e9 v7-3-1289 +08d4c11cdaed2c5d95e2c0be3b0df91d01f52b84 v7-3-1290 +a6ddcab6a240d22f965c4961bb93ddfea6a74c73 v7-3-1291 +cad8d29b0bc0356a49a455296e5e79eb6f38139d v7-3-1292 +18b43970fb7a796ab740e65baa4ff2ba46f929a8 v7-3-1293 +11d0c6df1d7bdc399b34a8cc70f354d6ee908661 v7-3-1294 +93cccad6a26b439728bf3c155ed5532001a2f2ab v7-3-1295 +c3a82208e143e4cd4a3b9d9b1716eb9d876bf462 v7-3-1296 +cb0a5c9c0f9bcc6c5a18ed97762206309d3e334c v7-3-1297 +dafd77a15d44cced4e405a9fcfe67fc48a02004a v7-3-1298 +f063be86b6323f396e6d3a7be73e860e636eb51d v7-3-1299 +56bc3698f8c6ac275a9a05b64ae056de619d226b v7-3-1300 +6cabac58f26fe9d8b608542d9fdbfed3fc437c90 v7-3-1301 +5569d11ef585033ef40e4402cd6a52453e4d13d9 v7-3-1302 +6e611380b4cf586f210de94d92a4f158b6900a5f v7-3-1303 +46d6318d5b965b77278ea252b25209468214dd2d v7-3-1304 +6f24376028af97c93b426cdbd46379795be7cdfd v7-3-1305 +71859e71b1f902c28b8842bc7092dd155b8c7f88 v7-3-1306 +3dafc80e781b8d5ed12d6107a2c804067aeafd90 v7-3-1307 +71e066e10a4789eeb9553aa08f9ca8e7eec96532 v7-3-1308 +a686295448918b7066bc52e3fd9748e6702c2219 v7-3-1309 +b49784c49d537fabe083cc3f8cc460629bb6957f v7-3-1310 +28e6f5f889683fe161b7bc260bd02b742157fc5b v7-3-1311 +80bab8b1a30db72b7eda880b0442ab0b0f4a1611 v7-3-1312 +afbc9dd67cea81e73d64f7ecce47dfcd35d48865 v7-3-1313 +29e57603bf6f3a2e3c178a63d332ed4d2eccfa82 v7-3-1314 +6ec6b7ff2d43842d04a8d653356d0ff3850707c0 v7-4a +0ddba00c204d855c0b3da30cb338d9bdb0ded847 v7-4a-001 +d0288faf3086e6ccd5046edc91f1baf21bf1babf v7-4a-002 +b5abda4e7c4b8b04cb823c160c47097448823ba8 v7-4a-003 +f72d49c406c48293e30d774303493e4c8d120bfb v7-4a-004 +7a6ce0c426fec6051523bb00e050b826fa664beb v7-4a-005 +6b6e1786c7dfb2d1190373dfddc3cd33e5346e18 v7-4a-006 +c624928fbc49408ab932e5c79f5f79e53327d700 v7-4a-007 +b3bd43ef012d975cafb7b2a4c41fb78486ee4cc0 v7-4a-008 +467efeee8f9e2060891bc718e6aeffaf79eab43b v7-4a-009 +a4e08386a6aa29c5e58302f1650fa2ad3f03b76b v7-4a-010 +ce587b26b8d6bec140af41712bb99c4c73c3bf99 v7-4a-011 +fca6ba0d2d66d38da8ae023e73944a69662c0d66 v7-4a-012 +42d592dbbec3706429e3f3f75c9c394db6b9c1bd v7-4a-013 +08eb573821869727e5951e6586207dfbe5fd982c v7-4a-014 +7a1b782ec64ac55052755ed72ff023093b246d96 v7-4a-015 +4104bed69ea561a105c3db590aa6c75be2a24836 v7-4a-016 +4cbff53717d4920cb64d417c7a603b45519138f1 v7-4a-017 +c6dd0c545e5ca25e0b45fc1dbd7d1cb20642830e v7-4a-018 +bea5eb942011c09a6a8805e6b21079375462a710 v7-4a-019 +fa76be660fa914de79e3856caea8261cc7ab6c5b v7-4a-020 +fc6f4a653265f9e6b3dfa82faf067329dd5044a2 v7-4a-021 +c28202427d71b4460122754884bb548f084c3d7a v7-4a-022 +45b2278e6f461689d068f138428e9f3fdb01615c v7-4a-023 +ba9a11fe25637103e1a77fefbbaed4ac2ff182f9 v7-4a-024 +1b89e3f916c59fbdfdbd31e4d8af8b22274275b2 v7-4a-025 +b3ff17862b4c9d06411bd3c854cfceb77d5b97b6 v7-4a-026 +8edba3805d787f50b51d7fd59899c5361c09a348 v7-4a-027 +7aca84c0cd37ab4eceab8897e0297e2e318b8fff v7-4a-028 +2b58913e19a5a40d169f2aa1ef9530a78c375d2e v7-4a-029 +bc4fb031746594e4e84b36e64389e78454617a86 v7-4a-030 +839ebe7c1b2fb8150714fc48ec597d2e1f1c7557 v7-4a-031 +2741b46e96bfe6c06a5e9704bcad649655f7b50f v7-4a-032 +fa024ce48542356206bf86bdc9286ecf0510ad49 v7-4a-033 +947edb6335d1e196c27e2e7e0e0a5ed8f6b78498 v7-4a-034 +4ceacc1b00548c0b21c0dc2628608515899df721 v7-4a-035 +9982ec574beb1866536f0e8a0ace3073faa3bb97 v7-4a-036 +91d478da863e0779c482c790cc96b14188f3ecaf v7-4a-037 +8f983df0299fb4f1c7359eb3b844ee93e8f7e8fb v7-4a-038 +a08fa2919f2b39be0416109d87a42fbb5880ac76 v7-4a-039 +1261caf9bc5193d304140647c08ca5b52120ce52 v7-4a-040 +74d2f3188cd0aaa0d3d7cd3df001d88b04f77f5c v7-4a-041 +1899acc5aebd40f625b9fed7bc4c1b5f67e5bc3f v7-4a-042 +6fa64615c8d38ecf464702b102538c09fe250813 v7-4a-043 +647596ab1ae2f4b36bfc20293adf4b3a43372818 v7-4a-044 +da95a7f1d5a8413ae719188cec5b706b99db4a91 v7-4a-045 +f0361e297d9ceb533a17530647b4482c3990df3c v7-4a-046 +8c6615a30951fb9f2d2b218e55626f5dfa3fa24e v7-4a-047 +09c88160095d98a0b1403e9230c76e8adbb75d59 v7-4b-000 +47a09a572ea670d0498983eaa6ded5ab4f12fd15 v7-4b-001 +2e63b6c763f7af2ef11f751d3047847652dddfe0 v7-4b-002 +ea876fe914833a69018c54d6927dbbdb42ce6ecc v7-4b-003 +3c6e2b89875f39c8417021aa369695ec1ba762df v7-4b-004 +e63e4b4be9236c2d811b5ec7bdd79e387ec8bac9 v7-4b-005 +6b7ab6a4f31a54bceb4e7d6f0f9404b5a37bdad3 v7-4b-006 +b882d4b14e00af23444fd630aae3ac32214dd097 v7-4b-007 +3059c799fcd997ea60a63ed10a2a09d73e3ed3cf v7-4b-008 +cd971e951b0626c253059d8e25859032560920a6 v7-4b-009 +585b623a1aa3baea87a1584e6064612b2183d312 v7-4b-010 +7d1f89b2710305a00e6adac35a1fa6edd47982ba v7-4b-011 +25f67b62afd8c58b6c661961cc762f00ee89e562 v7-4b-012 +1ed6fd19c36051da73f9987777002b331853f5ea v7-4b-013 +3ddec3d25bd178d4f90114bce9ce889f3889e6d2 v7-4b-014 +d96f16667cc48d89c380fae29d86286b20040d5b v7-4b-015 +ba37e955913e85700677b89a720c6e5fc8d23cc3 v7-4b-016 +8c42772f05438e9f06200bca731cf301097be8ea v7-4b-017 +7ed1ec814dafe8109a2f34302174267d31bbc924 v7-4b-018 +74a211a0d3a3135dd67329cd981f5100f5e4d064 v7-4b-019 +46cf49cc9289920704999a971f397eee1efdb3fc v7-4b-020 +059c8a4b103f6971276435127c7ad970a81b0b2c v7-4b-021 +d5d6b78cff090e87d52924179e44131b5ba7436d v7-4b-022 +359743c1f59af353454dd80a26d9f8c20ae6ee8e v7-4 +3e9107b86b68d83bfa94e43afffbf17623afe55e v7-4-001 +e29f11399ccec9215cc8cfab1f9307dea0567d70 v7-4-002 +560a6a2329503d483db019a88cacc3307e5c30b7 v7-4-003 +f6247eaf4e1d556f782321890d725663f74babe6 v7-4-004 +3640cf4c0d4b6e5687bb7a31678fab70c88ed94b v7-4-005 +2374a05efe20287d55bd824689a41becc7662505 v7-4-006 +4fe1dfc7014e57b4beb5a01c9e94357265d19a92 v7-4-007 +b04bdb2c5fce70a278d26c477debb65a388da0ca v7-4-008 +8b5d80861c5e0403ea9f54ddddce2752a463c8a5 v7-4-009 +bb358cc41d920983629ace62bcf26decbf06cab4 v7-4-010 +54e66395831c1a58b4a9804e7884e505842157e8 v7-4-011 +8e28c23e482c5b3c8296d8022271822886793456 v7-4-012 +07737d3aa81725672796cbc9a010d63414ab6fea v7-4-013 +9801d06e7b4ccdcd02cf40bee34eaaada0ca0409 v7-4-014 +a7478f9f2551e95bff138cd658f7a86ced804ab1 v7-4-015 +8d5cd0ec3e7183a289f9bac41d3981307cdc1fac v7-4-016 +c47c8cd5fe5c014c141d9fb3fa8935b268436a4e v7-4-017 +460d5be9395ef3e05f4b1397ea98a5b54d825fc5 v7-4-018 +d5eb32dc231cd870c562e7b0be96fa994b505d9f v7-4-019 +c1ae5baa41f47bbf96be81e0158707a88af48b34 v7-4-020 +c514693882b9f1c7be2e76a0307926df799da3ea v7-4-021 +965044860b7f4884657fcaa042853238c7b13e69 v7-4-022 diff --git a/Contents b/Contents index eff854ad8d..e34ae25600 100644 --- a/Contents +++ b/Contents @@ -9,10 +9,10 @@ Vim Vi IMproved. A clone of the UNIX text editor Vi. Very useful messages, shows current file name in window title, on-line help, rectangular cut/paste, etc., etc., etc... - Version 7.3. Also runs under UNIX, MSDOS and other systems. - vim73rt.tgz contains the documentation and syntax files. - vim73bin.tgz contains the binaries. - vim73src.tgz contains the sources. + Version 7.4. Also runs under UNIX, MSDOS and other systems. + vim74rt.tgz contains the documentation and syntax files. + vim74bin.tgz contains the binaries. + vim74src.tgz contains the sources. Author: Bram Moolenaar et al. diff --git a/Filelist b/Filelist index 2eac3685a9..b32493337a 100644 --- a/Filelist +++ b/Filelist @@ -57,6 +57,7 @@ SRC_ALL = \ src/popupmnu.c \ src/quickfix.c \ src/regexp.c \ + src/regexp_nfa.c \ src/regexp.h \ src/screen.c \ src/search.c \ @@ -73,6 +74,7 @@ SRC_ALL = \ src/version.c \ src/version.h \ src/vim.h \ + src/winclip.c \ src/window.c \ src/xxd/xxd.c \ src/main.aap \ @@ -82,6 +84,15 @@ SRC_ALL = \ src/testdir/test49.vim \ src/testdir/test60.vim \ src/testdir/test83-tags? \ + src/testdir/python2/*.py \ + src/testdir/python3/*.py \ + src/testdir/pythonx/*.py \ + src/testdir/pythonx/topmodule/__init__.py \ + src/testdir/pythonx/topmodule/submodule/__init__.py \ + src/testdir/pythonx/topmodule/submodule/subsubmodule/__init__.py \ + src/testdir/pythonx/topmodule/submodule/subsubmodule/subsubsubmodule.py \ + src/testdir/python_after/*.py \ + src/testdir/python_before/*.py \ src/proto.h \ src/proto/blowfish.pro \ src/proto/buffer.pro \ @@ -130,6 +141,7 @@ SRC_ALL = \ src/proto/ui.pro \ src/proto/undo.pro \ src/proto/version.pro \ + src/proto/winclip.pro \ src/proto/window.pro \ @@ -261,6 +273,7 @@ SRC_DOS = \ src/Make_mvc.mak \ src/Make_w16.mak \ src/bigvim.bat \ + src/bigvim64.bat \ src/msvcsetup.bat \ src/msvc2008.bat \ src/msvc2010.bat \ @@ -352,6 +365,7 @@ SRC_DOS_BIN = \ src/xpm/COPYRIGHT \ src/xpm/README.txt \ src/xpm/include/*.h \ + src/xpm/x64/lib/libXpm.a \ src/xpm/x64/lib/libXpm.lib \ src/xpm/x86/lib/libXpm.a \ src/xpm/x86/lib/libXpm.lib \ @@ -442,6 +456,7 @@ SRC_EXTRA = \ src/os_beos.c \ src/os_beos.h \ src/os_beos.rsrc \ + src/proto/os_beos.pro \ src/os_mint.h \ src/os_vms_fix.com \ src/toolbar.phi \ @@ -679,6 +694,7 @@ LANG_GEN = \ runtime/doc/*-fr.UTF-8.1 \ runtime/doc/*-it.1 \ runtime/doc/*-it.UTF-8.1 \ + runtime/doc/*-ja.UTF-8.1 \ runtime/doc/*-pl.1 \ runtime/doc/*-pl.UTF-8.1 \ runtime/doc/*-ru.1 \ @@ -691,9 +707,17 @@ LANG_GEN = \ runtime/tutor/Makefile \ runtime/tutor/tutor.utf-8 \ runtime/tutor/tutor.?? \ - runtime/tutor/tutor.??.* \ + runtime/tutor/tutor.??.utf-8 \ + runtime/tutor/tutor.??.euc \ + runtime/tutor/tutor.??.sjis \ + runtime/tutor/tutor.??.iso9 \ + runtime/tutor/tutor.??.big5 \ + runtime/tutor/tutor.??.cp1250 \ + runtime/tutor/tutor.??.cp1251 \ + runtime/tutor/tutor.??.cp737 \ + runtime/tutor/tutor.??_??.utf-8 \ runtime/tutor/tutor.bar \ - runtime/tutor/tutor.bar.* \ + runtime/tutor/tutor.bar.utf-8 \ runtime/spell/README.txt \ runtime/spell/??/*.diff \ runtime/spell/??/main.aap \ diff --git a/Makefile b/Makefile index a48112eca3..3565357d8a 100644 --- a/Makefile +++ b/Makefile @@ -74,14 +74,17 @@ all install uninstall tools config configure reconfig proto depend lint tags typ # Before creating an archive first delete all backup files, *.orig, etc. MAJOR = 7 -MINOR = 3 +MINOR = 4 # Uncomment this line if the Win32s version is to be included. -DOSBIN_S = dosbin_s +# DOSBIN_S = dosbin_s # Uncomment this line if the 16 bit DOS version is to be included. # DOSBIN_D16 = dosbin_d16 +# Uncomment this line if the 32 bit DOS version is to be included. +# DOSBIN_D32 = dosbin_d32 + # CHECKLIST for creating a new version: # # - Update Vim version number. For a test version in: src/version.h, Contents, @@ -89,8 +92,6 @@ DOSBIN_S = dosbin_s # runtime/doc/*.txt and nsis/gvim.nsi. Other things in README_os2.txt. For a # minor/major version: src/GvimExt/GvimExt.reg, src/vim.def, src/vim16.def, # src/gvim.exe.mnf. -# - Adjust the date and other info in src/version.h. -# - Correct included_patches[] in src/version.c. # - Compile Vim with GTK, Perl, Python, Python3, TCL, Ruby, MZscheme, Lua (if # you can make it all work), Cscope and "huge" features. Exclude workshop # and SNiFF. @@ -99,8 +100,14 @@ DOSBIN_S = dosbin_s # - With these features: "make depend" (works best with gcc). # - If you have a lint program: "make lint" and check the output (ignore GTK # warnings). -# - Enable the efence library in "src/Makefile" and run "make test". Disable -# Python and Ruby to avoid trouble with threads (efence is not threadsafe). +# - If you have valgrind, enable it in src/testdir/Makefile and run "make +# test". Enable EXITFREE, disable GUI, scheme and tcl to avoid false alarms. +# Check the valgrind output. +# - If you have the efence library, enable it in "src/Makefile" and run "make +# test". Disable Python and Ruby to avoid trouble with threads (efence is +# not threadsafe). +# - Adjust the date and other info in src/version.h. +# - Correct included_patches[] in src/version.c. # - Check for missing entries in runtime/makemenu.vim (with checkmenu script). # - Check for missing options in runtime/optwin.vim et al. (with check.vim). # - Do "make menu" to update the runtime/synmenu.vim file. @@ -108,8 +115,8 @@ DOSBIN_S = dosbin_s # - Check that runtime/doc/help.txt doesn't contain entries in "LOCAL # ADDITIONS". # - In runtime/doc run "make" and "make html" to check for errors. -# - Check if src/Makefile and src/feature.h don't contain any personal -# preferences or the GTK, Perl, etc. mentioned above. +# - Check if src/Makefile, src/testdir/Makefile and src/feature.h don't contain +# any personal preferences or the changes mentioned above. # - Check file protections to be "644" for text and "755" for executables (run # the "check" script). # - Check compiling on Amiga, MS-DOS and MS-Windows. @@ -128,36 +135,20 @@ DOSBIN_S = dosbin_s # PC: # - Run make on Unix to update the ".mo" files. # - "make dossrc" and "make dosrt". Unpack the archives on a PC. -# 16 bit DOS version: (OBSOLETE, 16 bit version doesn't build) -# - Set environment for compiling with Borland C++ 3.1. -# - "bmake -f Make_bc3.mak BOR=E:\borlandc" (compiling xxd might fail, in that -# case set environment for compiling with Borland C++ 4.0 and do -# "make -f make_bc3.mak BOR=E:\BC4 xxd/xxd.exe"). -# NOTE: this currently fails because Vim is too big. -# - "make test" and check the output. -# - Rename the executables to "vimd16.exe", "xxdd16.exe", "installd16.exe" and -# "uninstald16.exe". -# 32 bit DOS version: -# - Set environment for compiling with DJGPP; "gmake -f Make_djg.mak". -# - "rm testdir/*.out", "gmake -f Make_djg.mak test" and check the output for -# "ALL DONE". -# - Rename the executables to "vimd32.exe", "xxdd32.exe", "installd32.exe" and -# "uninstald32.exe". # Win32 console version: -# - Set environment for Visual C++ 2008, e.g.: -# "E:\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat". Or, when using the -# Visual C++ Toolkit 2003: "msvcsetup.bat" (adjust the paths when necessary). -# For Windows 98/ME the 2003 version is required, but then it won't work on -# Windows 7 and 64 bit. -# - "nmake -f Make_mvc.mak" +# - Set environment for Visual C++ 2008, e.g.: "msvc2008.bat" Or: +# "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat". +# Or, when using the Visual C++ Toolkit 2003: "msvcsetup.bat" (adjust the +# paths when necessary). +# For Windows 98/ME the 2003 version is required, but then the executable +# won't work on Windows 7 and 64 bit systems. +# - "nmake -f Make_mvc.mak" (use the same path as for vcvars32.bat) # - "rm testdir/*.out", "nmake -f Make_mvc.mak test" and check the output. -# - Rename the executables to "vimw32.exe", "xxdw32.exe". +# - Rename vim.exe to vimw32.exe, xxd/xxd.exe to xxdw32.exe. # - Rename vim.pdb to vimw32.pdb. -# - When building the Win32s version later, delete vimrun.exe, install.exe and -# uninstal.exe. Otherwise rename executables to installw32.exe and -# uninstalw32.exe. +# - Rename install.exe to installw32.exe and uninstal.exe to uninstalw32.exe. # Win32 GUI version: -# - "nmake -f Make_mvc.mak GUI=yes. +# - "nmake -f Make_mvc.mak GUI=yes" # - move "gvim.exe" to here (otherwise the OLE version will overwrite it). # - Move gvim.pdb to here. # - Delete vimrun.exe, install.exe and uninstal.exe. @@ -167,23 +158,13 @@ DOSBIN_S = dosbin_s # - Rename "gvim.exe" to "gvim_ole.exe". # - Rename gvim.pdb to "gvim_ole.pdb". # - Delete install.exe and uninstal.exe. -# - If building the Win32s version delete vimrun.exe. -# Win32s GUI version: -# - Set environment for Visual C++ 4.1 (requires a new console window): -# "vcvars32.bat" (use the path for VC 4.1 e:\msdev\bin) -# - "nmake -f Make_mvc.mak GUI=yes INTL=no clean" (use the path for VC 4.1) -# - "nmake -f Make_mvc.mak GUI=yes INTL=no" (use the path for VC 4.1) -# - Rename "gvim.exe" to "gvim_w32s.exe". -# - Rename "install.exe" to "installw32.exe" -# - Rename "uninstal.exe" to "uninstalw32.exe" -# - The produced uninstalw32.exe and vimrun.exe are used. # Create the archives: # - Copy all the "*.exe" files to where this Makefile is. # - Copy all the "*.pdb" files to where this Makefile is. # - "make dosbin". # NSIS self installing exe: # - To get NSIS see http://nsis.sourceforge.net -# - Make sure gvim_ole.exe, vimd32.exe, vimw32.exe, installw32.exe, +# - Make sure gvim_ole.exe, vimw32.exe, installw32.exe, # uninstalw32.exe and xxdw32.exe have been build as mentioned above. # - copy these files (get them from a binary archive or build them): # gvimext.dll in src/GvimExt @@ -196,7 +177,44 @@ DOSBIN_S = dosbin_s # - go to ../nsis and do "makensis gvim.nsi" (takes a few minutes). # - Copy gvim##.exe to the dist directory. # -# OS/2: (OBSOLETE, OS/2 version is no longer distributed) +# 64 bit builds (these are not in the normal distribution, the 32 bit build +# works just fine on 64 bit systems). +# Like the console and GUI version, but first run vcvars64.bat or +# "..\VC\vcvarsall.bat x86_amd64". +# - "nmake -f Make_mvc.mak" +# - "nmake -f Make_mvc.mak GUI=yes" +# Or run src/bigvim64.bat for an OLE version. +# +# OBSOLETE systems: You can build this if you have an appropriate system. +# +# 16 bit DOS version: (doesn't build anywhere) +# - Set environment for compiling with Borland C++ 3.1. +# - "bmake -f Make_bc3.mak BOR=E:\borlandc" (compiling xxd might fail, in that +# case set environment for compiling with Borland C++ 4.0 and do +# "make -f make_bc3.mak BOR=E:\BC4 xxd/xxd.exe"). +# NOTE: this currently fails because Vim is too big. +# - "make test" and check the output. +# - Rename the executables to "vimd16.exe", "xxdd16.exe", "installd16.exe" and +# "uninstald16.exe". +# +# 32 bit DOS version: (requires Windows XP or earlier) +# - Set environment for compiling with DJGPP; "gmake -f Make_djg.mak". +# - "rm testdir/*.out", "gmake -f Make_djg.mak test" and check the output for +# "ALL DONE". +# - Rename the executables to "vimd32.exe", "xxdd32.exe", "installd32.exe" and +# "uninstald32.exe". +# +# Win32s GUI version: (requires very old compiler) +# - Set environment for Visual C++ 4.1 (requires a new console window): +# "vcvars32.bat" (use the path for VC 4.1 e:\msdev\bin) +# - "nmake -f Make_mvc.mak GUI=yes INTL=no clean" (use the path for VC 4.1) +# - "nmake -f Make_mvc.mak GUI=yes INTL=no" (use the path for VC 4.1) +# - Rename "gvim.exe" to "gvim_w32s.exe". +# - Rename "install.exe" to "installw32.exe" +# - Rename "uninstal.exe" to "uninstalw32.exe" +# - The produced uninstalw32.exe and vimrun.exe are used. +# +# OS/2: (requires an OS/2 system) # - Unpack the Unix archive. # - "make -f Make_os2.mak". # - Rename the executables to vimos2.exe, xxdos2.exe and teeos2.exe and copy @@ -295,6 +313,8 @@ unixall: dist prepare $(LANG_SRC) \ | (cd dist/$(VIMRTDIR); tar xf -) # Need to use a "distclean" config.mk file +# Note: this file is not included in the repository to avoid problems, but it's +# OK to put it in the archive. cp -f src/config.mk.dist dist/$(VIMRTDIR)/src/auto/config.mk # Create an empty config.h file, make dependencies require it touch dist/$(VIMRTDIR)/src/auto/config.h @@ -450,7 +470,7 @@ runtime_unix2dos: dosrt_unix2dos cd dist/vim/$(VIMRTDIR); tar cf - * \ | (cd ../../../runtime/dos; tar xf -) -dosbin: prepare dosbin_gvim dosbin_w32 dosbin_d32 dosbin_ole $(DOSBIN_S) $(DOSBIN_D16) +dosbin: prepare dosbin_gvim dosbin_w32 $(DOSBIN_D32) dosbin_ole $(DOSBIN_S) $(DOSBIN_D16) # make Win32 gvim dosbin_gvim: dist no_title.vim dist/$(COMMENT_GVIM) diff --git a/README.txt b/README.txt index cf462db1ca..c2fc2a955a 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -README.txt for version 7.3 of Vim: Vi IMproved. +README.txt for version 7.4 of Vim: Vi IMproved. WHAT IS VIM @@ -97,10 +97,12 @@ The latest news about Vim can be found on the Vim home page: If you have problems, have a look at the Vim FAQ: http://vimdoc.sf.net/vimfaq.html -Send bug reports to: - Bram Moolenaar +If you still have problems or any other questions, use one of the mailing +lists to discuss them with Vim users and developers: + http://www.vim.org/maillist.php -There are several mailing lists for Vim, see http://www.vim.org/maillist.php. +If nothing else works, report bugs directly: + Bram Moolenaar MAIN AUTHOR diff --git a/README_ami.txt b/README_ami.txt index bfc5cc8670..03cb6e24ab 100644 --- a/README_ami.txt +++ b/README_ami.txt @@ -1,4 +1,4 @@ -README_ami.txt for version 7.3 of Vim: Vi IMproved. +README_ami.txt for version 7.4 of Vim: Vi IMproved. This file explains the installation of Vim on Amiga systems. See README.txt for general information about Vim. diff --git a/README_amibin.txt b/README_amibin.txt index b1ca624039..fbf5ba4c4d 100644 --- a/README_amibin.txt +++ b/README_amibin.txt @@ -1,4 +1,4 @@ -README_amibin.txt for version 7.3 of Vim: Vi IMproved. +README_amibin.txt for version 7.4 of Vim: Vi IMproved. See "README.txt" for general information about Vim. See "README_ami.txt" for installation instructions for the Amiga. diff --git a/README_amisrc.txt b/README_amisrc.txt index 1a787fb906..ddc58be95f 100644 --- a/README_amisrc.txt +++ b/README_amisrc.txt @@ -1,4 +1,4 @@ -README_amisrc.txt for version 7.3 of Vim: Vi IMproved. +README_amisrc.txt for version 7.4 of Vim: Vi IMproved. See "README.txt" for general information about Vim. See "README_ami.txt" for installation instructions for the Amiga. diff --git a/README_bindos.txt b/README_bindos.txt index db49d50773..03c7c19ecf 100644 --- a/README_bindos.txt +++ b/README_bindos.txt @@ -1,19 +1,16 @@ -README_bindos.txt for version 7.3 of Vim: Vi IMproved. +README_bindos.txt for version 7.4 of Vim: Vi IMproved. See "README.txt" for general information about Vim. See "README_dos.txt" for installation instructions for MS-DOS and MS-Windows. -These files are in the runtime archive (vim73rt.zip). +These files are in the runtime archive (vim74rt.zip). There are several binary distributions of Vim for the PC. You would normally pick only one of them, but it's also possible to install several. These ones are available (the version number may differ): - vim73d16.zip 16 bit DOS version - vim73d32.zip 32 bit DOS version - vim73w32.zip Windows 95/98/NT/etc. console version - gvim73.zip Windows 95/98/NT/etc. GUI version - gvim73ole.zip Windows 95/98/NT/etc. GUI version with OLE - gvim73_s.zip Windows 3.1 GUI version + vim74w32.zip Windows 95/98/NT/etc. console version + gvim74.zip Windows 95/98/NT/etc. GUI version + gvim74ole.zip Windows 95/98/NT/etc. GUI version with OLE -You MUST also get the runtime archive (vim73rt.zip). -The sources are also available (vim73src.zip). +You MUST also get the runtime archive (vim74rt.zip). +The sources are also available (vim74src.zip). diff --git a/README_dos.txt b/README_dos.txt index ca735f151a..662a7e785b 100644 --- a/README_dos.txt +++ b/README_dos.txt @@ -1,4 +1,4 @@ -README_dos.txt for version 7.3 of Vim: Vi IMproved. +README_dos.txt for version 7.4 of Vim: Vi IMproved. This file explains the installation of Vim on MS-DOS and MS-Windows systems. See "README.txt" for general information about Vim. @@ -47,13 +47,13 @@ These are the normal steps to install Vim from the .zip archives: Binary and runtime Vim archives are normally unpacked in the same location, on top of each other. -2. Unpack the zip archives. This will create a new directory "vim\vim73", +2. Unpack the zip archives. This will create a new directory "vim\vim74", in which all the distributed Vim files are placed. Since the directory name includes the version number, it is unlikely that you overwrite existing files. Examples: - pkunzip -d gvim73.zip - unzip vim73w32.zip + pkunzip -d gvim74.zip + unzip vim74w32.zip You need to unpack the runtime archive and at least one of the binary archives. When using more than one binary version, be careful not to @@ -69,7 +69,7 @@ These are the normal steps to install Vim from the .zip archives: archive and follow the instructions in the documentation. 3. Change to the new directory: - cd vim\vim73 + cd vim\vim74 Run the "install.exe" program. It will ask you a number of questions about how you would like to have your Vim setup. Among these are: - You can tell it to write a "_vimrc" file with your preferences in the @@ -80,8 +80,8 @@ These are the normal steps to install Vim from the .zip archives: console or in a shell. You can select one of the directories in your $PATH. If you skip this, you can add Vim to the search path manually: The simplest is to add a line to your autoexec.bat. Examples: - set path=%path%;C:\vim\vim73 - set path=%path%;D:\editors\vim\vim73 + set path=%path%;C:\vim\vim74 + set path=%path%;D:\editors\vim\vim74 - Create entries for Vim on the desktop and in the Start menu. That's it! @@ -93,8 +93,8 @@ Remarks: won't show a menubar. Then you need to set the $VIM environment variable to point to the top directory of your Vim files. Example: set VIM=C:\editors\vim - Vim version 7.3 will look for your vimrc file in $VIM, and for the runtime - files in $VIM/vim73. See ":help $VIM" for more information. + Vim version 7.4 will look for your vimrc file in $VIM, and for the runtime + files in $VIM/vim74. See ":help $VIM" for more information. - To avoid confusion between distributed files of different versions and your own modified vim scripts, it is recommended to use this directory layout: @@ -105,14 +105,14 @@ Remarks: C:\vim\vimfiles\ftplugin\*.vim Filetype plugins C:\vim\... Other files you made. Distributed files: - C:\vim\vim73\vim.exe The Vim version 7.3 executable. - C:\vim\vim73\doc\*.txt The version 7.3 documentation files. - C:\vim\vim73\bugreport.vim A Vim version 7.3 script. - C:\vim\vim73\... Other version 7.3 distributed files. + C:\vim\vim74\vim.exe The Vim version 7.4 executable. + C:\vim\vim74\doc\*.txt The version 7.4 documentation files. + C:\vim\vim74\bugreport.vim A Vim version 7.4 script. + C:\vim\vim74\... Other version 7.4 distributed files. In this case the $VIM environment variable would be set like this: set VIM=C:\vim - Then $VIMRUNTIME will automatically be set to "$VIM\vim73". Don't add - "vim73" to $VIM, that won't work. + Then $VIMRUNTIME will automatically be set to "$VIM\vim74". Don't add + "vim74" to $VIM, that won't work. - You can put your Vim executable anywhere else. If the executable is not with the other Vim files, you should set $VIM. The simplest is to add a line @@ -136,8 +136,8 @@ Remarks: Select Properties. 5. In the Program tab, change the "Cmdline" to add "/c" and the name of the Vim executable. Examples: - C:\command.com /c C:\vim\vim73\vim.exe - C:\command.com /c D:\editors\vim\vim73\vim.exe + C:\command.com /c C:\vim\vim74\vim.exe + C:\command.com /c D:\editors\vim\vim74\vim.exe 6. Select the font, window size, etc. that you like. If this isn't possible, select "Advanced" in the Program tab, and deselect "MS-DOS mode". diff --git a/README_extra.txt b/README_extra.txt index 3481b0d26d..f16e7c0190 100644 --- a/README_extra.txt +++ b/README_extra.txt @@ -1,4 +1,4 @@ -README_extra.txt for version 7.3 of Vim: Vi IMproved. +README_extra.txt for version 7.4 of Vim: Vi IMproved. These extra files of Vim are for special purposes. This README explains what the files are for. For general information about Vim, see the "README.txt" diff --git a/README_mac.txt b/README_mac.txt index ad8afeac29..92d0c35e12 100644 --- a/README_mac.txt +++ b/README_mac.txt @@ -1,4 +1,4 @@ -README_mac.txt for version 7.3 of Vim: Vi IMproved. +README_mac.txt for version 7.4 of Vim: Vi IMproved. This file explains the installation of MacVim. See "README.txt" for general information about Vim. diff --git a/README_ole.txt b/README_ole.txt index d7e70af88f..233c0532f4 100644 --- a/README_ole.txt +++ b/README_ole.txt @@ -1,4 +1,4 @@ -README_ole.txt for version 7.3 of Vim: Vi IMproved. +README_ole.txt for version 7.4 of Vim: Vi IMproved. This archive contains gvim.exe with OLE interface and VisVim. This version of gvim.exe can also load a number of interface dynamically (you diff --git a/README_os2.txt b/README_os2.txt index 866c7a0fa2..5602706e71 100644 --- a/README_os2.txt +++ b/README_os2.txt @@ -1,32 +1,32 @@ -README_os2.txt for version 7.3 of Vim: Vi IMproved. +README_os2.txt for version 7.4 of Vim: Vi IMproved. This file explains the installation of Vim on OS/2 systems. See "README.txt" for general information about Vim. NOTE: You will need two archives: - vim73rt.zip contains the runtime files (same as for the PC version) - vim73os2.zip contains the OS/2 executables + vim74rt.zip contains the runtime files (same as for the PC version) + vim74os2.zip contains the OS/2 executables 1. Go to the directory where you want to put the Vim files. Examples: cd C:\ cd D:\editors -2. Unpack the zip archives. This will create a new directory "vim/vim73", +2. Unpack the zip archives. This will create a new directory "vim/vim74", in which all the distributed Vim files are placed. Since the directory name includes the version number, it is unlikely that you overwrite existing files. Examples: - pkunzip -d vim73os2.zip - unzip vim73os2.zip + pkunzip -d vim74os2.zip + unzip vim74os2.zip After you unpacked the files, you can still move the whole directory tree to another location. 3. Add the directory where vim.exe is to your path. The simplest is to add a line to your autoexec.bat. Examples: - set path=%path%;C:\vim\vim73 - set path=%path%;D:\editors\vim\vim73 + set path=%path%;C:\vim\vim74 + set path=%path%;D:\editors\vim\vim74 That's it! @@ -41,10 +41,10 @@ Extra remarks: C:\vim\_viminfo Dynamic info for 'viminfo'. C:\vim\... Other files you made. Distributed files: - C:\vim\vim73\vim.exe The Vim version 7.3 executable. - C:\vim\vim73\doc\*.txt The version 7.3 documentation files. - C:\vim\vim73\bugreport.vim A Vim version 7.3 script. - C:\vim\vim73\... Other version 7.3 distributed files. + C:\vim\vim74\vim.exe The Vim version 7.4 executable. + C:\vim\vim74\doc\*.txt The version 7.4 documentation files. + C:\vim\vim74\bugreport.vim A Vim version 7.4 script. + C:\vim\vim74\... Other version 7.4 distributed files. In this case the $VIM environment variable would be set like this: set VIM=C:\vim diff --git a/README_os390.txt b/README_os390.txt index 17abc5990c..502b6f8b17 100644 --- a/README_os390.txt +++ b/README_os390.txt @@ -1,4 +1,4 @@ -README_zOS.txt for version 7.3 of Vim: Vi IMproved. +README_zOS.txt for version 7.4 of Vim: Vi IMproved. This readme explains how to build Vim on z/OS. Formerly called OS/390. See "README.txt" for general information about Vim. @@ -29,7 +29,7 @@ console version). Compiling: ========== -Vim can be compiled with or without GUI support. For 7.3 only the compilation +Vim can be compiled with or without GUI support. For 7.4 only the compilation without GUI was tested. Below is a section about compiling with X11 but this is from an earlier version of Vim. @@ -78,7 +78,7 @@ Change to the vim directory and do: With X11: --------- -WARNING: This instruction was not tested with Vim 7.3. +WARNING: This instruction was not tested with Vim 7.4. There are two ways for building VIM with X11 support. The first way is simple and results in a big executable (~13 Mb), the second needs a few additional diff --git a/README_src.txt b/README_src.txt index c2ccdc05aa..3af95f23c7 100644 --- a/README_src.txt +++ b/README_src.txt @@ -1,10 +1,8 @@ -README_src.txt for version 7.3 of Vim: Vi IMproved. +README_src.txt for version 7.4 of Vim: Vi IMproved. The source archive contains the files needed to compile Vim on Unix systems. -It is packed for Unix systems (NL line separator). It is also used for other -systems in combination with the extra archive (vim-7.3-extra.tar.gz, in the -"extra" directory of ftp.vim.org). +It is packed for Unix systems (NL line separator). For more information, see the README.txt file that comes with the runtime -archive (vim-7.3-rt.tar.gz). To be able to run Vim you MUST get the runtime +archive (vim-7.4-rt.tar.gz). To be able to run Vim you MUST get the runtime archive too! diff --git a/README_srcdos.txt b/README_srcdos.txt index 1ce563c76b..1b7cbcf5cb 100644 --- a/README_srcdos.txt +++ b/README_srcdos.txt @@ -1,8 +1,8 @@ -README_srcdos.txt for version 7.3 of Vim: Vi IMproved. +README_srcdos.txt for version 7.4 of Vim: Vi IMproved. See "README.txt" for general information about Vim. See "README_dos.txt" for installation instructions for MS-DOS and MS-Windows. -These files are in the runtime archive (vim73rt.zip). +These files are in the runtime archive (vim74rt.zip). The DOS source archive contains the files needed to compile Vim on MS-DOS or diff --git a/README_unix.txt b/README_unix.txt index 5c1e79b90b..7aff642c6c 100644 --- a/README_unix.txt +++ b/README_unix.txt @@ -1,4 +1,4 @@ -README_unix.txt for version 7.3 of Vim: Vi IMproved. +README_unix.txt for version 7.4 of Vim: Vi IMproved. This file explains the installation of Vim on Unix systems. See "README.txt" for general information about Vim. diff --git a/README_vms.txt b/README_vms.txt index 5acc92c382..53364a127e 100644 --- a/README_vms.txt +++ b/README_vms.txt @@ -1,4 +1,4 @@ -README_vms.txt for version 7.3 of Vim: Vi IMproved. +README_vms.txt for version 7.4 of Vim: Vi IMproved. This file explains the installation of Vim on VMS systems. See "README.txt" in the runtime archive for information about Vim. diff --git a/README_w32s.txt b/README_w32s.txt index 3595b183d6..0b5d1aee01 100644 --- a/README_w32s.txt +++ b/README_w32s.txt @@ -1,4 +1,4 @@ -README_w32s.txt for version 7.3 of Vim: Vi IMproved. +README_w32s.txt for version 7.4 of Vim: Vi IMproved. This archive contains the gvim.exe that was specifically compiled for use in the Win32s subsystem in MS-Windows 3.1 and 3.11. diff --git a/nsis/gvim.nsi b/nsis/gvim.nsi index a2940eb1e9..7b69e7d9cb 100644 --- a/nsis/gvim.nsi +++ b/nsis/gvim.nsi @@ -5,7 +5,7 @@ # WARNING: if you make changes to this script, look out for $0 to be valid, # because uninstall deletes most files in $0. -# Location of gvim_ole.exe, vimd32.exe, GvimExt/*, etc. +# Location of gvim_ole.exe, vimw32.exe, GvimExt/*, etc. !define VIMSRC "..\src" # Location of runtime files @@ -22,7 +22,7 @@ !define HAVE_NLS !define VER_MAJOR 7 -!define VER_MINOR 3 +!define VER_MINOR 4 # ----------- No configurable settings below this line ----------- @@ -40,7 +40,7 @@ RequestExecutionLevel highest ComponentText "This will install Vim ${VER_MAJOR}.${VER_MINOR} on your computer." DirText "Choose a directory to install Vim (must end in 'vim')" Icon icons\vim_16c.ico -# NSIS2 uses a different strategy with six diferent images in a strip... +# NSIS2 uses a different strategy with six different images in a strip... #EnabledBitmap icons\enabled.bmp #DisabledBitmap icons\disabled.bmp UninstallText "This will uninstall Vim ${VER_MAJOR}.${VER_MINOR} from your system." @@ -56,6 +56,9 @@ LicenseData ${VIMRT}\doc\uganda.nsis.txt !packhdr temp.dat "upx --best --compress-icons=1 temp.dat" !endif +SetCompressor /SOLID lzma +XPStyle on + # This adds '\vim' to the user choice automagically. The actual value is # obtained below with ReadINIStr. InstallDir "$PROGRAMFILES\Vim" @@ -247,11 +250,10 @@ Section "Vim console program (vim.exe)" ReadRegStr $R0 HKLM \ "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion IfErrors 0 lbl_winnt - # Windows 95/98/ME - File /oname=vim.exe ${VIMSRC}\vimd32.exe + # Windows 95/98/ME: not supported Goto lbl_done lbl_winnt: - # Windows NT/2000/XT + # Windows NT/2000/XP and later File /oname=vim.exe ${VIMSRC}\vimw32.exe lbl_done: StrCpy $2 "$2 vim view vimdiff" diff --git a/runtime/autoload/clojurecomplete.vim b/runtime/autoload/clojurecomplete.vim new file mode 100644 index 0000000000..704ea074cd --- /dev/null +++ b/runtime/autoload/clojurecomplete.vim @@ -0,0 +1,20 @@ +" Vim completion script +" Language: Clojure +" Maintainer: Sung Pae +" URL: https://github.com/guns/vim-clojure-static +" License: Same as Vim +" Last Change: 05 February 2013 + +" Special forms and public vars in clojure.core +" Generated from https://github.com/guns/vim-clojure-static/blob/vim-release-002/vim_clojure_static.clj +" Clojure 1.5.0-RC6 +let s:words = ["*","*'","*1","*2","*3","*agent*","*allow-unresolved-vars*","*assert*","*clojure-version*","*command-line-args*","*compile-files*","*compile-path*","*compiler-options*","*data-readers*","*default-data-reader-fn*","*e","*err*","*file*","*flush-on-newline*","*fn-loader*","*in*","*math-context*","*ns*","*out*","*print-dup*","*print-length*","*print-level*","*print-meta*","*print-readably*","*read-eval*","*read-whitelist*","*source-path*","*unchecked-math*","*use-context-classloader*","*verbose-defrecords*","*warn-on-reflection*","+","+'","-","-'","->","->>","->ArrayChunk","->Vec","->VecNode","->VecSeq","-cache-protocol-fn","-reset-methods",".","..","/","<","<=","=","==",">",">=","EMPTY-NODE","accessor","aclone","add-classpath","add-watch","agent","agent-error","agent-errors","aget","alength","alias","all-ns","alter","alter-meta!","alter-var-root","amap","ancestors","and","apply","areduce","array-map","as->","aset","aset-boolean","aset-byte","aset-char","aset-double","aset-float","aset-int","aset-long","aset-short","assert","assoc!","assoc","assoc-in","associative?","atom","await","await-for","await1","bases","bean","bigdec","bigint","biginteger","binding","bit-and","bit-and-not","bit-clear","bit-flip","bit-not","bit-or","bit-set","bit-shift-left","bit-shift-right","bit-test","bit-xor","boolean","boolean-array","booleans","bound-fn","bound-fn*","bound?","butlast","byte","byte-array","bytes","case","cast","catch","char","char-array","char-escape-string","char-name-string","char?","chars","chunk","chunk-append","chunk-buffer","chunk-cons","chunk-first","chunk-next","chunk-rest","chunked-seq?","class","class?","clear-agent-errors","clojure-version","coll?","comment","commute","comp","comparator","compare","compare-and-set!","compile","complement","concat","cond","cond->","cond->>","condp","conj!","conj","cons","constantly","construct-proxy","contains?","count","counted?","create-ns","create-struct","cycle","dec","dec'","decimal?","declare","def","default-data-readers","definline","definterface","defmacro","defmethod","defmulti","defn","defn-","defonce","defprotocol","defrecord","defstruct","deftype","delay","delay?","deliver","denominator","deref","derive","descendants","destructure","disj!","disj","dissoc!","dissoc","distinct","distinct?","do","doall","dorun","doseq","dosync","dotimes","doto","double","double-array","doubles","drop","drop-last","drop-while","empty","empty?","ensure","enumeration-seq","error-handler","error-mode","eval","even?","every-pred","every?","ex-data","ex-info","extend","extend-protocol","extend-type","extenders","extends?","false?","ffirst","file-seq","filter","filterv","finally","find","find-keyword","find-ns","find-protocol-impl","find-protocol-method","find-var","first","flatten","float","float-array","float?","floats","flush","fn","fn","fn?","fnext","fnil","for","force","format","frequencies","future","future-call","future-cancel","future-cancelled?","future-done?","future?","gen-class","gen-interface","gensym","get","get-in","get-method","get-proxy-class","get-thread-bindings","get-validator","group-by","hash","hash-combine","hash-map","hash-set","identical?","identity","if","if-let","if-not","ifn?","import","in-ns","inc","inc'","init-proxy","instance?","int","int-array","integer?","interleave","intern","interpose","into","into-array","ints","io!","isa?","iterate","iterator-seq","juxt","keep","keep-indexed","key","keys","keyword","keyword?","last","lazy-cat","lazy-seq","let","let","letfn","line-seq","list","list*","list?","load","load-file","load-reader","load-string","loaded-libs","locking","long","long-array","longs","loop","loop","macroexpand","macroexpand-1","make-array","make-hierarchy","map","map-indexed","map?","mapcat","mapv","max","max-key","memfn","memoize","merge","merge-with","meta","method-sig","methods","min","min-key","mod","monitor-enter","monitor-exit","munge","name","namespace","namespace-munge","neg?","new","newline","next","nfirst","nil?","nnext","not","not-any?","not-empty","not-every?","not=","ns","ns-aliases","ns-imports","ns-interns","ns-map","ns-name","ns-publics","ns-refers","ns-resolve","ns-unalias","ns-unmap","nth","nthnext","nthrest","num","number?","numerator","object-array","odd?","or","parents","partial","partition","partition-all","partition-by","pcalls","peek","persistent!","pmap","pop!","pop","pop-thread-bindings","pos?","pr","pr-str","prefer-method","prefers","primitives-classnames","print","print-ctor","print-dup","print-method","print-simple","print-str","printf","println","println-str","prn","prn-str","promise","proxy","proxy-call-with-super","proxy-mappings","proxy-name","proxy-super","push-thread-bindings","pvalues","quot","quote","rand","rand-int","rand-nth","range","ratio?","rational?","rationalize","re-find","re-groups","re-matcher","re-matches","re-pattern","re-seq","read","read-line","read-string","realized?","recur","reduce","reduce-kv","reduced","reduced?","reductions","ref","ref-history-count","ref-max-history","ref-min-history","ref-set","refer","refer-clojure","reify","release-pending-sends","rem","remove","remove-all-methods","remove-method","remove-ns","remove-watch","repeat","repeatedly","replace","replicate","require","reset!","reset-meta!","resolve","rest","restart-agent","resultset-seq","reverse","reversible?","rseq","rsubseq","satisfies?","second","select-keys","send","send-off","send-via","seq","seq?","seque","sequence","sequential?","set!","set","set-agent-send-executor!","set-agent-send-off-executor!","set-error-handler!","set-error-mode!","set-validator!","set?","short","short-array","shorts","shuffle","shutdown-agents","slurp","some","some->","some->>","some-fn","sort","sort-by","sorted-map","sorted-map-by","sorted-set","sorted-set-by","sorted?","special-symbol?","spit","split-at","split-with","str","string?","struct","struct-map","subs","subseq","subvec","supers","swap!","symbol","symbol?","sync","take","take-last","take-nth","take-while","test","the-ns","thread-bound?","throw","time","to-array","to-array-2d","trampoline","transient","tree-seq","true?","try","type","unchecked-add","unchecked-add-int","unchecked-byte","unchecked-char","unchecked-dec","unchecked-dec-int","unchecked-divide-int","unchecked-double","unchecked-float","unchecked-inc","unchecked-inc-int","unchecked-int","unchecked-long","unchecked-multiply","unchecked-multiply-int","unchecked-negate","unchecked-negate-int","unchecked-remainder-int","unchecked-short","unchecked-subtract","unchecked-subtract-int","underive","unquote","unquote-splicing","update-in","update-proxy","use","val","vals","var","var-get","var-set","var?","vary-meta","vec","vector","vector-of","vector?","when","when-first","when-let","when-not","while","with-bindings","with-bindings*","with-in-str","with-loading-context","with-local-vars","with-meta","with-open","with-out-str","with-precision","with-redefs","with-redefs-fn","xml-seq","zero?","zipmap"] + +" Simple word completion omnifunc +function! clojurecomplete#Complete(findstart, base) + if a:findstart + return searchpos('\<', 'bnW', line('.'))[1] - 1 + else + return { 'words': filter(copy(s:words), 'v:val =~ "\\V\\^' . a:base . '"') } + endif +endfunction diff --git a/runtime/autoload/getscript.vim b/runtime/autoload/getscript.vim index 34f5970c3e..6b74d37da9 100644 --- a/runtime/autoload/getscript.vim +++ b/runtime/autoload/getscript.vim @@ -1,8 +1,8 @@ " --------------------------------------------------------------------- " getscript.vim -" Author: Charles E. Campbell, Jr. -" Date: Jan 17, 2012 -" Version: 34 +" Author: Charles E. Campbell +" Date: Apr 17, 2013 +" Version: 35 " Installing: :help glvs-install " Usage: :help glvs " @@ -15,7 +15,7 @@ if exists("g:loaded_getscript") finish endif -let g:loaded_getscript= "v34" +let g:loaded_getscript= "v35" if &cp echoerr "GetLatestVimScripts is not vi-compatible; not loaded (you need to set nocp)" finish @@ -74,6 +74,11 @@ if !exists("g:GetLatestVimScripts_allowautoinstall") let g:GetLatestVimScripts_allowautoinstall= 1 endif +" set up default scriptaddr address +if !exists("g:GetLatestVimScripts_scriptaddr") + let g:GetLatestVimScripts_scriptaddr = 'http://vim.sourceforge.net/script.php?script_id=' +endif + "" For debugging: "let g:GetLatestVimScripts_wget = "echo" "let g:GetLatestVimScripts_options = "options" @@ -314,7 +319,7 @@ fun! getscript#GetLatestVimScripts() if &mod silent! w! endif - q + q! " restore events and current directory exe "cd ".fnameescape(substitute(origdir,'\','/','ge')) @@ -415,7 +420,7 @@ fun! s:GetOneScript(...) echo 'considering <'.aicmmnt.'> scriptid='.scriptid.' srcid='.srcid " grab a copy of the plugin's vim.sourceforge.net webpage - let scriptaddr = 'http://vim.sourceforge.net/script.php?script_id='.scriptid + let scriptaddr = g:GetLatestVimScripts_scriptaddr.scriptid let tmpfile = tempname() let v:errmsg = "" diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim index 2700a8c825..b077bb73bb 100644 --- a/runtime/autoload/netrw.vim +++ b/runtime/autoload/netrw.vim @@ -1,10 +1,10 @@ " netrw.vim: Handles file transfer and remote directory listing across " AUTOLOAD SECTION -" Date: Apr 05, 2012 -" Version: 145 -" Maintainer: Charles E Campbell, Jr +" Date: May 18, 2013 +" Version: 149 +" Maintainer: Charles E Campbell " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim -" Copyright: Copyright (C) 1999-2010 Charles E. Campbell, Jr. {{{1 +" Copyright: Copyright (C) 1999-2012 Charles E. Campbell {{{1 " Permission is hereby granted to use and distribute this code, " with or without modifications, provided that this copyright " notice is copied with it. Like anything else that's free, @@ -22,10 +22,10 @@ if &cp || exists("g:loaded_netrw") finish endif -let g:loaded_netrw = "v145" -if v:version < 702 +let g:loaded_netrw = "v149" +if v:version < 703 || (v:version == 703 && !has("patch465")) echohl WarningMsg - echo "***warning*** this version of netrw needs vim 7.2" + echo "***warning*** this version of netrw needs vim 7.3.465 or later" echohl Normal finish endif @@ -35,12 +35,6 @@ if !exists("s:NOTE") let s:ERROR = 2 endif -" sanity checks -if v:version < 700 - call netrw#ErrorMsg(s:WARNING,"you need vim version 7.0 or later for version ".g:loaded_netrw." of netrw",1) - finish -endif - let s:keepcpo= &cpo set cpo&vim "DechoTabOn @@ -55,12 +49,12 @@ set cpo&vim " 0=note = s:NOTE " 1=warning = s:WARNING " 2=error = s:ERROR -" Apr 05, 2012 : max errnum currently is 88 +" May 01, 2013 : max errnum currently is 93 fun! netrw#ErrorMsg(level,msg,errnum) " call Dfunc("netrw#ErrorMsg(level=".a:level." msg<".a:msg."> errnum=".a:errnum.") g:netrw_use_errorwindow=".g:netrw_use_errorwindow) if a:level < g:netrw_errorlvl - call Dret("netrw#ErrorMsg : suppressing level=".a:level." since g;netrw_errorlvl=".g:netrw_errorlvl) +" call Dret("netrw#ErrorMsg : suppressing level=".a:level." since g:netrw_errorlvl=".g:netrw_errorlvl) return endif @@ -97,7 +91,7 @@ fun! netrw#ErrorMsg(level,msg,errnum) sil! keepj call s:NetrwSafeOptions() setl bt=nofile keepj file NetrwMessage -" call Decho("setlocal ma noro") +" call Decho("setl ma noro") setl ma noro call setline(line("$"),level.a:msg) endif @@ -134,9 +128,12 @@ endfun " NetrwInit: initializes variables if they haven't been defined {{{2 " Loosely, varname = value. fun s:NetrwInit(varname,value) +" call Decho("varname<".a:varname."> value=".a:value) if !exists(a:varname) if type(a:value) == 0 exe "let ".a:varname."=".a:value + elseif type(a:value) == 1 && a:value =~ '^[{[]' + exe "let ".a:varname."=".a:value elseif type(a:value) == 1 exe "let ".a:varname."="."'".a:value."'" else @@ -205,7 +202,20 @@ if !exists("g:netrw_http_cmd") endif call s:NetrwInit("g:netrw_rcp_cmd" , "rcp") call s:NetrwInit("g:netrw_rsync_cmd", "rsync") -call s:NetrwInit("g:netrw_scp_cmd" , "scp -q") +if !exists("g:netrw_scp_cmd") + if executable("scp") + call s:NetrwInit("g:netrw_scp_cmd" , "scp -q") + elseif executable("pscp") + if (has("win32") || has("win95") || has("win64") || has("win16")) && filereadable('c:\private.ppk') + call s:NetrwInit("g:netrw_scp_cmd", 'pscp -i c:\private.ppk') + else + call s:NetrwInit("g:netrw_scp_cmd", 'pscp -q') + endif + else + call s:NetrwInit("g:netrw_scp_cmd" , "scp -q") + endif +endif + call s:NetrwInit("g:netrw_sftp_cmd" , "sftp") call s:NetrwInit("g:netrw_ssh_cmd" , "ssh") @@ -225,7 +235,7 @@ endif " Cygwin Detection ------- {{{3 if !exists("g:netrw_cygwin") if has("win32") || has("win95") || has("win64") || has("win16") - if &shell =~ '\%(\\|\\)\%(\.exe\)\=$' + if has("win32unix") && &shell =~ '\%(\\|\\)\%(\.exe\)\=$' let g:netrw_cygwin= 1 else let g:netrw_cygwin= 0 @@ -251,6 +261,7 @@ call s:NetrwInit("g:netrw_cursor" , 2) let s:netrw_usercul = &cursorline let s:netrw_usercuc = &cursorcolumn " Default values - d-g ---------- {{{3 +call s:NetrwInit("s:didstarstar",0) call s:NetrwInit("g:netrw_dirhist_cnt" , 0) call s:NetrwInit("g:netrw_decompress" , '{ ".gz" : "gunzip", ".bz2" : "bunzip2", ".zip" : "unzip", ".tar" : "tar -xf", ".xz" : "unxz" }') call s:NetrwInit("g:netrw_dirhistmax" , 10) @@ -280,53 +291,54 @@ if !exists("g:netrw_ignorenetrc") endif call s:NetrwInit("g:netrw_keepdir",1) if !exists("g:netrw_list_cmd") + if g:netrw_scp_cmd =~ '^pscp' && executable("pscp") - " provide a 'pscp' listing command if (has("win32") || has("win95") || has("win64") || has("win16")) && filereadable("c:\\private.ppk") + " provide a pscp-based listing command let g:netrw_scp_cmd ="pscp -i C:\\private.ppk" endif let g:netrw_list_cmd= g:netrw_scp_cmd." -ls USEPORT HOSTNAME:" + elseif executable(g:netrw_ssh_cmd) - " provide a default listing command + " provide a scp-based default listing command let g:netrw_list_cmd= g:netrw_ssh_cmd." USEPORT HOSTNAME ls -FLa" + else " call Decho(g:netrw_ssh_cmd." is not executable") let g:netrw_list_cmd= "" endif + endif call s:NetrwInit("g:netrw_list_hide","") " Default values - lh-lz ---------- {{{3 if exists("g:netrw_local_copycmd") - let g:netrw_localcopycmd= g:netrw_local_copycmd" + let g:netrw_localcopycmd= g:netrw_local_copycmd call netrw#ErrorMsg(s:NOTE,"g:netrw_local_copycmd is deprecated in favor of g:netrw_localcopycmd",84) endif +if !exists("g:netrw_localcmdshell") + let g:netrw_localcmdshell= "" +endif if !exists("g:netrw_localcopycmd") if has("win32") || has("win95") || has("win64") || has("win16") if g:netrw_cygwin let g:netrw_localcopycmd= "cp" else - let g:netrw_localcopycmd= "copy" + let g:netrw_localcopycmd= "cmd /c copy" endif elseif has("unix") || has("macunix") let g:netrw_localcopycmd= "cp" else let g:netrw_localcopycmd= "" endif - if !executable(g:netrw_localcopycmd) - call netrw#ErrorMsg(s:NOTE,"consider setting g:netrw_localcopycmd<".g:netrw_localcopycmd."> to something that works",80) - endif endif if exists("g:netrw_local_mkdir") - let g:netrw_localmkdir= g:netrw_local_mkdir" + let g:netrw_localmkdir= g:netrw_local_mkdir call netrw#ErrorMsg(s:NOTE,"g:netrw_local_mkdir is deprecated in favor of g:netrw_localmkdir",87) endif call s:NetrwInit("g:netrw_localmkdir","mkdir") -if !executable(g:netrw_localmkdir) - call netrw#ErrorMsg(s:NOTE,"consider setting g:netrw_localmkdir<".g:netrw_localmkdir."> to something that works",80) -endif call s:NetrwInit("g:netrw_remote_mkdir","mkdir") if exists("g:netrw_local_movecmd") - let g:netrw_localmovecmd= g:netrw_local_movecmd" + let g:netrw_localmovecmd= g:netrw_local_movecmd call netrw#ErrorMsg(s:NOTE,"g:netrw_local_movecmd is deprecated in favor of g:netrw_localmovecmd",88) endif if !exists("g:netrw_localmovecmd") @@ -334,25 +346,19 @@ if !exists("g:netrw_localmovecmd") if g:netrw_cygwin let g:netrw_localmovecmd= "mv" else - let g:netrw_localmovecmd= "move" + let g:netrw_localmovecmd= "cmd /c move" endif elseif has("unix") || has("macunix") let g:netrw_localmovecmd= "mv" else let g:netrw_localmovecmd= "" endif - if !executable(g:netrw_localmkdir) - call netrw#ErrorMsg(s:NOTE,"consider setting g:netrw_localmkdir<".g:netrw_localmkdir."> to something that works",81) - endif endif call s:NetrwInit("g:netrw_localrmdir", "rmdir") if exists("g:netrw_local_rmdir") - let g:netrw_localrmdir= g:netrw_local_rmdir" + let g:netrw_localrmdir= g:netrw_local_rmdir call netrw#ErrorMsg(s:NOTE,"g:netrw_local_rmdir is deprecated in favor of g:netrw_localrmdir",86) endif -if !executable(g:netrw_localrmdir) - call netrw#ErrorMsg(s:NOTE,"consider setting g:netrw_localrmdir<".g:netrw_localrmdir."> to something that works",82) -endif call s:NetrwInit("g:netrw_liststyle" , s:THINLIST) " sanity checks if g:netrw_liststyle < 0 || g:netrw_liststyle >= s:MAXLIST @@ -366,7 +372,7 @@ call s:NetrwInit("g:netrw_markfileesc" , '*./[\~') call s:NetrwInit("g:netrw_maxfilenamelen", 32) call s:NetrwInit("g:netrw_menu" , 1) call s:NetrwInit("g:netrw_mkdir_cmd" , g:netrw_ssh_cmd." USEPORT HOSTNAME mkdir") -call s:NetrwInit("g:netrw_mousemaps" , (exists("&mouse") && &mouse =~ '[anh]')) +call s:NetrwInit("g:netrw_mousemaps" , (exists("+mouse") && &mouse =~ '[anh]')) call s:NetrwInit("g:netrw_retmap" , 0) if has("unix") || (exists("g:netrw_cygwin") && g:netrw_cygwin) call s:NetrwInit("g:netrw_chgperm" , "chmod PERM FILENAME") @@ -401,7 +407,17 @@ call s:NetrwInit("g:netrw_ssh_browse_reject", '^total\s\+\d\+$') call s:NetrwInit("g:netrw_use_noswf" , 0) " Default values - t-w ---------- {{{3 call s:NetrwInit("g:netrw_timefmt","%c") -call s:NetrwInit("g:netrw_xstrlen",0) +if !exists("g:netrw_xstrlen") + if exists("g:Align_xstrlen") + let g:netrw_xstrlen= g:Align_xstrlen + elseif exists("g:drawit_xstrlen") + let g:netrw_xstrlen= g:drawit_xstrlen + elseif &enc == "latin1" || !has("multi_byte") + let g:netrw_xstrlen= 0 + else + let g:netrw_xstrlen= 1 + endif +endif call s:NetrwInit("g:NetrwTopLvlMenu","Netrw.") call s:NetrwInit("g:netrw_win95ftp",1) call s:NetrwInit("g:netrw_winsize",50) @@ -411,11 +427,11 @@ if g:netrw_winsize > 100|let g:netrw_winsize= 100|endif " Default values for netrw's script variables: {{{2 call s:NetrwInit("g:netrw_fname_escape",' ?&;%') if has("win32") || has("win95") || has("win64") || has("win16") - call s:NetrwInit("g:netrw_glob_escape",'[]*?`{$') + call s:NetrwInit("g:netrw_glob_escape",'*?`{[]$') else - call s:NetrwInit("g:netrw_glob_escape",'[]*?`{~$\') + call s:NetrwInit("g:netrw_glob_escape",'*[]?`{~$\') endif -call s:NetrwInit("g:netrw_menu_escape",'./&? \') +call s:NetrwInit("g:netrw_menu_escape",'.&? \') call s:NetrwInit("g:netrw_tmpfile_escape",' &;') call s:NetrwInit("s:netrw_map_escape","<|\n\r\\\\"") @@ -468,14 +484,14 @@ if v:version >= 700 && has("balloon_eval") && &beval == 1 && has("syntax") && ex endif " ------------------------------------------------------------------------ -" s:NetrwOptionSave: save options and set to "standard" form {{{2 +" s:NetrwOptionSave: save options prior to setting to "netrw-buffer-standard" form {{{2 " 06/08/07 : removed call to NetrwSafeOptions(), either placed " immediately after NetrwOptionSave() calls in NetRead " and NetWrite, or after the s:NetrwEnew() call in " NetrwBrowse. " vt: normally its "w:" or "s:" (a variable type) fun! s:NetrwOptionSave(vt) -" call Dfunc("s:NetrwOptionSave(vt<".a:vt.">) win#".winnr()." buf#".bufnr("%")."<".bufname(bufnr("%")).">"." winnr($)=".winnr("$")) +" call Dfunc("s:NetrwOptionSave(vt<".a:vt.">) win#".winnr()." buf#".bufnr("%")."<".bufname(bufnr("%")).">"." winnr($)=".winnr("$")." mod=".&mod." ma=".&ma) " call Decho(a:vt."netrw_optionsave".(exists("{a:vt}netrw_optionsave")? ("=".{a:vt}netrw_optionsave) : " doesn't exist")) if !exists("{a:vt}netrw_optionsave") @@ -484,7 +500,7 @@ fun! s:NetrwOptionSave(vt) " call Dret("s:NetrwOptionSave : options already saved") return endif -" call Decho("fo=".&fo.(exists("&acd")? " acd=".&acd : " acd doesn't exist")." diff=".&l:diff) +" call Decho("fo=".&fo.(exists("+acd")? " acd=".&acd : " acd doesn't exist")." diff=".&l:diff) " Save current settings and current directory " call Decho("saving current settings and current directory") @@ -496,6 +512,7 @@ fun! s:NetrwOptionSave(vt) let {a:vt}netrw_blkeep = &l:bl let {a:vt}netrw_btkeep = &l:bt let {a:vt}netrw_bombkeep = &l:bomb + let {a:vt}netrw_cedit = &cedit let {a:vt}netrw_cikeep = &l:ci let {a:vt}netrw_cinkeep = &l:cin let {a:vt}netrw_cinokeep = &l:cino @@ -561,7 +578,7 @@ fun! s:NetrwOptionRestore(vt) endif unlet {a:vt}netrw_optionsave - if exists("&acd") + if exists("+acd") if exists("{a:vt}netrw_acdkeep") " call Decho("(NetrwOptionRestore) g:netrw_keepdir=".g:netrw_keepdir.": getcwd<".getcwd()."> acd=".&acd) let curdir = getcwd() @@ -581,10 +598,13 @@ fun! s:NetrwOptionRestore(vt) endif if exists("{a:vt}netrw_aikeep") |let &l:ai = {a:vt}netrw_aikeep |unlet {a:vt}netrw_aikeep |endif if exists("{a:vt}netrw_awkeep") |let &l:aw = {a:vt}netrw_awkeep |unlet {a:vt}netrw_awkeep |endif - if exists("{a:vt}netrw_bhkeep") |let &l:bh = {a:vt}netrw_bhkeep |unlet {a:vt}netrw_bhkeep |endif + if g:netrw_liststyle != s:TREELIST + if exists("{a:vt}netrw_bhkeep") |let &l:bh = {a:vt}netrw_bhkeep |unlet {a:vt}netrw_bhkeep |endif + endif if exists("{a:vt}netrw_blkeep") |let &l:bl = {a:vt}netrw_blkeep |unlet {a:vt}netrw_blkeep |endif if exists("{a:vt}netrw_btkeep") |let &l:bt = {a:vt}netrw_btkeep |unlet {a:vt}netrw_btkeep |endif if exists("{a:vt}netrw_bombkeep") |let &l:bomb = {a:vt}netrw_bombkeep |unlet {a:vt}netrw_bombkeep |endif + if exists("{a:vt}netrw_cedit") |let &cedit = {a:vt}netrw_cedit |unlet {a:vt}netrw_cedit |endif if exists("{a:vt}netrw_cikeep") |let &l:ci = {a:vt}netrw_cikeep |unlet {a:vt}netrw_cikeep |endif if exists("{a:vt}netrw_cinkeep") |let &l:cin = {a:vt}netrw_cinkeep |unlet {a:vt}netrw_cinkeep |endif if exists("{a:vt}netrw_cinokeep") |let &l:cino = {a:vt}netrw_cinokeep |unlet {a:vt}netrw_cinokeep |endif @@ -607,7 +627,8 @@ fun! s:NetrwOptionRestore(vt) if exists("{a:vt}netrw_rokeep") |let &l:ro = {a:vt}netrw_rokeep |unlet {a:vt}netrw_rokeep |endif if exists("{a:vt}netrw_selkeep") |let &l:sel = {a:vt}netrw_selkeep |unlet {a:vt}netrw_selkeep |endif if exists("{a:vt}netrw_spellkeep")|let &l:spell = {a:vt}netrw_spellkeep |unlet {a:vt}netrw_spellkeep|endif - if exists("{a:vt}netrw_tskeep") |let &l:ts = {a:vt}netrw_tskeep |unlet {a:vt}netrw_tskeep |endif + " Problem: start with liststyle=0; press : result, following line resets l:ts. +" if exists("{a:vt}netrw_tskeep") |let &l:ts = {a:vt}netrw_tskeep |unlet {a:vt}netrw_tskeep |endif if exists("{a:vt}netrw_twkeep") |let &l:tw = {a:vt}netrw_twkeep |unlet {a:vt}netrw_twkeep |endif if exists("{a:vt}netrw_wigkeep") |let &l:wig = {a:vt}netrw_wigkeep |unlet {a:vt}netrw_wigkeep |endif if exists("{a:vt}netrw_wrapkeep") |let &l:wrap = {a:vt}netrw_wrapkeep |unlet {a:vt}netrw_wrapkeep |endif @@ -620,7 +641,7 @@ fun! s:NetrwOptionRestore(vt) " to the current directory as returned by getcwd(). let &l:directory = getcwd() sil! let &l:swf = {a:vt}netrw_swfkeep - setlocal directory= + setl directory= unlet {a:vt}netrw_swfkeep elseif &l:swf != {a:vt}netrw_swfkeep " following line causes a Press ENTER in windows -- can't seem to work around it!!! @@ -644,345 +665,1105 @@ fun! s:NetrwOptionRestore(vt) endif " call Decho("(NetrwOptionRestore) g:netrw_keepdir=".g:netrw_keepdir.": getcwd<".getcwd()."> acd=".&acd) -" call Decho("(NetrwOptionRestore) fo=".&fo.(exists("&acd")? " acd=".&acd : " acd doesn't exist")) +" call Decho("(NetrwOptionRestore) fo=".&fo.(exists("+acd")? " acd=".&acd : " acd doesn't exist")) " call Decho("(NetrwOptionRestore) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") " call Decho("(NetrwOptionRestore) diff=".&l:diff." win#".winnr()." w:netrw_diffkeep=".(exists("w:netrw_diffkeep")? w:netrw_diffkeep : "doesn't exist")) +" call Decho("(NetrwOptionRestore) ts=".&l:ts) + " Moved the filetype detect here from NetrwGetFile() because remote files + " were having their filetype detect-generated settings overwritten by + " NetrwOptionRestore. + if &ft != "netrw" +" call Decho("(NetrwOptionRestore) filetype detect (ft=".&ft.")") + filetype detect + endif " call Dret("s:NetrwOptionRestore : tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> modified=".&modified." modifiable=".&modifiable." readonly=".&readonly) endfun " --------------------------------------------------------------------- " s:NetrwSafeOptions: sets options to help netrw do its job {{{2 +" Use s:NetrwSaveOptions() to save user settings +" Use s:NetrwOptionRestore() to restore user settings fun! s:NetrwSafeOptions() " call Dfunc("s:NetrwSafeOptions() win#".winnr()." buf#".bufnr("%")."<".bufname(bufnr("%"))."> winnr($)=".winnr("$")) " call Decho("win#".winnr()."'s ft=".&ft) - if exists("&acd") | setlocal noacd | endif - setlocal noai - setlocal noaw - setlocal nobomb - setlocal noci - setlocal nocin - setlocal cino= - setlocal com= - setlocal cpo-=a - setlocal cpo-=A - setlocal fo=nroql2 - setlocal nohid - setlocal noim - setlocal isk+=@ isk+=* isk+=/ - setlocal magic - setlocal report=10000 - setlocal sel=inclusive - setlocal nospell - setlocal tw=0 - setlocal wig= + if exists("+acd") | setl noacd | endif + setl noai + setl noaw + setl nobomb + setl noci + setl nocin + if g:netrw_liststyle == s:TREELIST + setl bh=hide + endif + setl cino= + setl com= + setl cpo-=a + setl cpo-=A + setl fo=nroql2 + setl nohid + setl noim + setl isk+=@ isk+=* isk+=/ + setl magic + setl report=10000 + setl sel=inclusive + setl nospell + setl tw=0 + setl wig= + set cedit& if g:netrw_use_noswf && has("win32") && !has("win95") - setlocal noswf + setl noswf endif call s:NetrwCursor() " allow the user to override safe options " call Decho("ft<".&ft."> ei=".&ei) if &ft == "netrw" -" call Decho("do any netrw FileType autocmds") +" call Decho("do any netrw FileType autocmds (doau FileType netrw)") sil! keepalt keepj doau FileType netrw endif -" call Decho("fo=".&fo.(exists("&acd")? " acd=".&acd : " acd doesn't exist")) +" call Decho("fo=".&fo.(exists("+acd")? " acd=".&acd : " acd doesn't exist")." bh=".&l:bh) " call Dret("s:NetrwSafeOptions") endfun " --------------------------------------------------------------------- -" netrw#NetrwClean: remove netrw {{{2 -" supports :NetrwClean -- remove netrw from first directory on runtimepath -" :NetrwClean! -- remove netrw from all directories on runtimepath -fun! netrw#NetrwClean(sys) -" call Dfunc("netrw#NetrwClean(sys=".a:sys.")") - - if a:sys - let choice= confirm("Remove personal and system copies of netrw?","&Yes\n&No") - else - let choice= confirm("Remove personal copy of netrw?","&Yes\n&No") +" netrw#Explore: launch the local browser in the directory of the current file {{{2 +" indx: == -1: Nexplore +" == -2: Pexplore +" == +: this is overloaded: +" * If Nexplore/Pexplore is in use, then this refers to the +" indx'th item in the w:netrw_explore_list[] of items which +" matched the */pattern **/pattern *//pattern **//pattern +" * If Hexplore or Vexplore, then this will override +" g:netrw_winsize to specify the qty of rows or columns the +" newly split window should have. +" dosplit==0: the window will be split iff the current file has been modified +" dosplit==1: the window will be split before running the local browser +" style == 0: Explore style == 1: Explore! +" == 2: Hexplore style == 3: Hexplore! +" == 4: Vexplore style == 5: Vexplore! +" == 6: Texplore +fun! netrw#Explore(indx,dosplit,style,...) +" call Dfunc("netrw#Explore(indx=".a:indx." dosplit=".a:dosplit." style=".a:style.",a:1<".a:1.">) &modified=".&modified." modifiable=".&modifiable." a:0=".a:0." win#".winnr()." buf#".bufnr("%")) + if !exists("b:netrw_curdir") + let b:netrw_curdir= getcwd() + if !g:netrw_cygwin && (has("win32") || has("win95") || has("win64") || has("win16")) + let b:netrw_curdir= substitute(b:netrw_curdir,'\','/','g') + endif +" call Decho("(Explore) set b:netrw_curdir<".b:netrw_curdir."> (used getcwd)") endif -" call Decho("choice=".choice) - let diddel= 0 - let diddir= "" - - if choice == 1 - for dir in split(&rtp,',') - if filereadable(dir."/plugin/netrwPlugin.vim") -" call Decho("removing netrw-related files from ".dir) - if s:NetrwDelete(dir."/plugin/netrwPlugin.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/plugin/netrwPlugin.vim",55) |endif - if s:NetrwDelete(dir."/autoload/netrwFileHandlers.vim")|call netrw#ErrorMsg(1,"unable to remove ".dir."/autoload/netrwFileHandlers.vim",55)|endif - if s:NetrwDelete(dir."/autoload/netrwSettings.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/autoload/netrwSettings.vim",55) |endif - if s:NetrwDelete(dir."/autoload/netrw.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/autoload/netrw.vim",55) |endif - if s:NetrwDelete(dir."/syntax/netrw.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/syntax/netrw.vim",55) |endif - if s:NetrwDelete(dir."/syntax/netrwlist.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/syntax/netrwlist.vim",55) |endif - let diddir= dir - let diddel= diddel + 1 - if !a:sys|break|endif - endif - endfor + let curdir = simplify(b:netrw_curdir) + let curfiledir = substitute(expand("%:p"),'^\(.*[/\\]\)[^/\\]*$','\1','e') + if !exists("g:netrw_cygwin") && (has("win32") || has("win95") || has("win64") || has("win16")) + let curdir= substitute(curdir,'\','/','g') endif +" call Decho("(Explore) curdir<".curdir."> curfiledir<".curfiledir.">") - echohl WarningMsg - if diddel == 0 - echomsg "netrw is either not installed or not removable" - elseif diddel == 1 - echomsg "removed one copy of netrw from <".diddir.">" - else - echomsg "removed ".diddel." copies of netrw" - endif - echohl None + " save registers + sil! let keepregstar = @* + sil! let keepregplus = @+ + sil! let keepregslash= @/ -" call Dret("netrw#NetrwClean") -endfun + " if dosplit or file has been modified + if a:dosplit || &modified || a:style == 6 +" call Decho("(Explore) case dosplit=".a:dosplit." modified=".&modified." a:style=".a:style.": dosplit or file has been modified") + call s:SaveWinVars() + let winsz= g:netrw_winsize + if a:indx > 0 + let winsz= a:indx + endif -" --------------------------------------------------------------------- -" netrw#Nread: {{{2 -fun! netrw#Nread(mode,fname) -" call Dfunc("netrw#Nread(mode=".a:mode." fname<".a:fname.">)") - call netrw#NetrwSavePosn() - call netrw#NetRead(a:mode,a:fname) - call netrw#NetrwRestorePosn() -" call Dret("netrw#Nread") -endfun + if a:style == 0 " Explore, Sexplore +" call Decho("(Explore) style=0: Explore or Sexplore") + let winsz= (winsz > 0)? (winsz*winheight(0))/100 : -winsz + exe winsz."wincmd s" -" ------------------------------------------------------------------------ -" Netrw Transfer Functions: {{{1 -" =============================== + elseif a:style == 1 "Explore!, Sexplore! +" call Decho("(Explore) style=1: Explore! or Sexplore!") + let winsz= (winsz > 0)? (winsz*winwidth(0))/100 : -winsz + exe "keepalt ".winsz."wincmd v" -" ------------------------------------------------------------------------ -" netrw#NetRead: responsible for reading a file over the net {{{2 -" mode: =0 read remote file and insert before current line -" =1 read remote file and insert after current line -" =2 replace with remote file -" =3 obtain file, but leave in temporary format -fun! netrw#NetRead(mode,...) -" call Dfunc("netrw#NetRead(mode=".a:mode.",...) a:0=".a:0." ".g:loaded_netrw) + elseif a:style == 2 " Hexplore +" call Decho("(Explore) style=2: Hexplore") + let winsz= (winsz > 0)? (winsz*winheight(0))/100 : -winsz + exe "keepalt bel ".winsz."wincmd s" - " NetRead: save options {{{3 - call s:NetrwOptionSave("w:") - call s:NetrwSafeOptions() - call s:RestoreCursorline() + elseif a:style == 3 " Hexplore! +" call Decho("(Explore) style=3: Hexplore!") + let winsz= (winsz > 0)? (winsz*winheight(0))/100 : -winsz + exe "keepalt abo ".winsz."wincmd s" - " NetRead: interpret mode into a readcmd {{{3 - if a:mode == 0 " read remote file before current line - let readcmd = "0r" - elseif a:mode == 1 " read file after current line - let readcmd = "r" - elseif a:mode == 2 " replace with remote file - let readcmd = "%r" - elseif a:mode == 3 " skip read of file (leave as temporary) - let readcmd = "t" - else - exe a:mode - let readcmd = "r" + elseif a:style == 4 " Vexplore +" call Decho("(Explore) style=4: Vexplore") + let winsz= (winsz > 0)? (winsz*winwidth(0))/100 : -winsz + exe "keepalt lefta ".winsz."wincmd v" + + elseif a:style == 5 " Vexplore! +" call Decho("(Explore) style=5: Vexplore!") + let winsz= (winsz > 0)? (winsz*winwidth(0))/100 : -winsz + exe "keepalt rightb ".winsz."wincmd v" + + elseif a:style == 6 " Texplore + call s:SaveBufVars() +" call Decho("(Explore) style = 6: Texplore") + exe "keepalt tabnew ".fnameescape(curdir) + call s:RestoreBufVars() + endif + call s:RestoreWinVars() +" else " Decho +" call Decho("(Explore) case a:dosplit=".a:dosplit." AND modified=".&modified." AND a:style=".a:style." is not 6") endif - let ichoice = (a:0 == 0)? 0 : 1 -" call Decho("readcmd<".readcmd."> ichoice=".ichoice) + keepj norm! 0 - " NetRead: get temporary filename {{{3 - let tmpfile= s:GetTempfile("") - if tmpfile == "" -" call Dret("netrw#NetRead : unable to get a tempfile!") + if a:0 > 0 +" call Decho("(Explore) case [a:0=".a:0."] > 0: a:1<".a:1.">") + if a:1 =~ '^\~' && (has("unix") || (exists("g:netrw_cygwin") && g:netrw_cygwin)) +" call Decho("(Explore) ..case a:1<".a:1.">: starts with ~ and unix or cygwin") + let dirname= simplify(substitute(a:1,'\~',expand("$HOME"),'')) +" call Decho("(Explore) ..using dirname<".dirname."> (case: ~ && unix||cygwin)") + elseif a:1 == '.' +" call Decho("(Explore) ..case a:1<".a:1.">: matches .") + let dirname= simplify(exists("b:netrw_curdir")? b:netrw_curdir : getcwd()) + if dirname !~ '/$' + let dirname= dirname."/" + endif +" call Decho("(Explore) ..using dirname<".dirname."> (case: ".(exists("b:netrw_curdir")? "b:netrw_curdir" : "getcwd()").")") + elseif a:1 =~ '\$' +" call Decho("(Explore) ..case a:1<".a:1.">: matches ending $") + let dirname= simplify(expand(a:1)) +" call Decho("(Explore) ..using user-specified dirname<".dirname."> with $env-var") + elseif a:1 !~ '^\*\{1,2}/' && a:1 !~ '^\a\{3,}://' +" call Decho("(Explore) ..case a:1<".a:1.">: other, not pattern or filepattern") + let dirname= simplify(a:1) +" call Decho("(Explore) ..using user-specified dirname<".dirname.">") + else +" call Decho("(Explore) ..case a:1: pattern or filepattern") + let dirname= a:1 + endif + else + " clear explore +" call Decho("(Explore) case a:0=".a:0.": clearing Explore list") + call s:NetrwClearExplore() +" call Dret("netrw#Explore : cleared list") return endif - while ichoice <= a:0 +" call Decho("(Explore) dirname<".dirname.">") + if dirname =~ '\.\./\=$' + let dirname= simplify(fnamemodify(dirname,':p:h')) + elseif dirname =~ '\.\.' || dirname == '.' + let dirname= simplify(fnamemodify(dirname,':p')) + endif +" call Decho("(Explore) dirname<".dirname."> (after simplify)") - " attempt to repeat with previous host-file-etc - if exists("b:netrw_lastfile") && a:0 == 0 -" call Decho("using b:netrw_lastfile<" . b:netrw_lastfile . ">") - let choice = b:netrw_lastfile - let ichoice= ichoice + 1 + if dirname =~ '^\*//' + " starpat=1: Explore *//pattern (current directory only search for files containing pattern) +" call Decho("(Explore) case starpat=1: Explore *//pattern") + let pattern= substitute(dirname,'^\*//\(.*\)$','\1','') + let starpat= 1 +" call Decho("(Explore) ..Explore *//pat: (starpat=".starpat.") dirname<".dirname."> -> pattern<".pattern.">") + if &hls | let keepregslash= s:ExplorePatHls(pattern) | endif + + elseif dirname =~ '^\*\*//' + " starpat=2: Explore **//pattern (recursive descent search for files containing pattern) +" call Decho("(Explore) case starpat=2: Explore **//pattern") + let pattern= substitute(dirname,'^\*\*//','','') + let starpat= 2 +" call Decho("(Explore) ..Explore **//pat: (starpat=".starpat.") dirname<".dirname."> -> pattern<".pattern.">") + elseif dirname =~ '/\*\*/' + " handle .../**/.../filepat +" call Decho("(Explore) case starpat=4: Explore .../**/.../filepat") + let prefixdir= substitute(dirname,'^\(.\{-}\)\*\*.*$','\1','') + if prefixdir =~ '^/' || (prefixdir =~ '^\a:/' && (has("win32") || has("win95") || has("win64") || has("win16"))) + let b:netrw_curdir = prefixdir else - exe "let choice= a:" . ichoice -" call Decho("no lastfile: choice<" . choice . ">") + let b:netrw_curdir= getcwd().'/'.prefixdir + endif + let dirname= substitute(dirname,'^.\{-}\(\*\*/.*\)$','\1','') + let starpat= 4 +" call Decho("(Explore) ..pwd<".getcwd()."> dirname<".dirname.">") +" call Decho("(Explore) ..case Explore ../**/../filepat (starpat=".starpat.")") - if match(choice,"?") == 0 - " give help - echomsg 'NetRead Usage:' - echomsg ':Nread machine:path uses rcp' - echomsg ':Nread "machine path" uses ftp with <.netrc>' - echomsg ':Nread "machine id password path" uses ftp' - echomsg ':Nread dav://machine[:port]/path uses cadaver' - echomsg ':Nread fetch://machine/path uses fetch' - echomsg ':Nread ftp://[user@]machine[:port]/path uses ftp autodetects <.netrc>' - echomsg ':Nread http://[user@]machine/path uses http wget' - echomsg ':Nread rcp://[user@]machine/path uses rcp' - echomsg ':Nread rsync://machine[:port]/path uses rsync' - echomsg ':Nread scp://[user@]machine[[:#]port]/path uses scp' - echomsg ':Nread sftp://[user@]machine[[:#]port]/path uses sftp' - sleep 4 - break + elseif dirname =~ '^\*/' + " case starpat=3: Explore */filepat (search in current directory for filenames matching filepat) + let starpat= 3 +" call Decho("(Explore) case starpat=3: Explore */filepat (starpat=".starpat.")") - elseif match(choice,'^"') != -1 - " Reconstruct Choice if choice starts with '"' -" call Decho("reconstructing choice") - if match(choice,'"$') != -1 - " case "..." - let choice= strpart(choice,1,strlen(choice)-2) - else - " case "... ... ..." - let choice = strpart(choice,1,strlen(choice)-1) - let wholechoice = "" + elseif dirname=~ '^\*\*/' + " starpat=4: Explore **/filepat (recursive descent search for filenames matching filepat) + let starpat= 4 +" call Decho("(Explore) case starpat=4: Explore **/filepat (starpat=".starpat.")") - while match(choice,'"$') == -1 - let wholechoice = wholechoice . " " . choice - let ichoice = ichoice + 1 - if ichoice > a:0 - if !exists("g:netrw_quiet") - call netrw#ErrorMsg(s:ERROR,"Unbalanced string in filename '". wholechoice ."'",3) - endif -" call Dret("netrw#NetRead :2 getcwd<".getcwd().">") - return - endif - let choice= a:{ichoice} - endwhile - let choice= strpart(wholechoice,1,strlen(wholechoice)-1) . " " . strpart(choice,0,strlen(choice)-1) + else + let starpat= 0 +" call Decho("(Explore) case starpat=0: default") + endif + + if starpat == 0 && a:indx >= 0 + " [Explore Hexplore Vexplore Sexplore] [dirname] +" call Decho("(Explore) case starpat==0 && a:indx=".a:indx.": dirname<".dirname.">, handles Explore Hexplore Vexplore Sexplore") + if dirname == "" + let dirname= curfiledir +" call Decho("(Explore) ..empty dirname, using current file's directory<".dirname.">") + endif + if dirname =~ '^scp://' || dirname =~ '^ftp://' + call netrw#Nread(2,dirname) + "call s:NetrwBrowse(0,dirname) + else + if dirname == "" + let dirname= getcwd() + elseif (has("win32") || has("win95") || has("win64") || has("win16")) && !g:netrw_cygwin + if dirname !~ '^[a-zA-Z]:' + let dirname= b:netrw_curdir."/".dirname endif + elseif dirname !~ '^/' + let dirname= b:netrw_curdir."/".dirname endif +" call Decho("(Explore) ..calling LocalBrowseCheck(dirname<".dirname.">)") + call netrw#LocalBrowseCheck(dirname) +" call Decho("(Explore) win#".winnr()." buf#".bufnr("%")." modified=".&modified." modifiable=".&modifiable." readonly=".&readonly) endif - -" call Decho("choice<" . choice . ">") - let ichoice= ichoice + 1 - - " NetRead: Determine method of read (ftp, rcp, etc) {{{3 - call s:NetrwMethod(choice) - if !exists("b:netrw_method") || b:netrw_method < 0 -" call Dfunc("netrw#NetRead : unsupported method") - return + if exists("w:netrw_bannercnt") + " done to handle P08-Ingelrest. :Explore will _Always_ go to the line just after the banner. + " If one wants to return the same place in the netrw window, use :Rex instead. + exe w:netrw_bannercnt endif - let tmpfile= s:GetTempfile(b:netrw_fname) " apply correct suffix - " Check if NetrwBrowse() should be handling this request -" call Decho("checking if NetrwBrowse() should handle choice<".choice."> with netrw_list_cmd<".g:netrw_list_cmd.">") - if choice =~ "^.*[\/]$" && b:netrw_method != 5 && choice !~ '^https\=://' -" call Decho("yes, choice matches '^.*[\/]$'") - keepj call s:NetrwBrowse(0,choice) -" call Dret("netrw#NetRead :3 getcwd<".getcwd().">") - return - endif +" call Decho("(Explore) curdir<".curdir.">") + " --------------------------------------------------------------------- + " Jan 24, 2013: not sure why the following was present. See P08-Ingelrest +" if has("win32") || has("win95") || has("win64") || has("win16") +" keepj call search('\<'.substitute(curdir,'^.*[/\\]','','e').'\>','cW') +" else +" keepj call search('\<'.substitute(curdir,'^.*/','','e').'\>','cW') +" endif + " --------------------------------------------------------------------- - " ============ - " NetRead: Perform Protocol-Based Read {{{3 - " =========================== - if exists("g:netrw_silent") && g:netrw_silent == 0 && &ch >= 1 - echo "(netrw) Processing your read request..." + " starpat=1: Explore *//pattern (current directory only search for files containing pattern) + " starpat=2: Explore **//pattern (recursive descent search for files containing pattern) + " starpat=3: Explore */filepat (search in current directory for filenames matching filepat) + " starpat=4: Explore **/filepat (recursive descent search for filenames matching filepat) + elseif a:indx <= 0 + " Nexplore, Pexplore, Explore: handle starpat +" call Decho("(Explore) case a:indx<=0: Nexplore, Pexplore, , starpat=".starpat." a:indx=".a:indx) + if !mapcheck("","n") && !mapcheck("","n") && exists("b:netrw_curdir") +" call Decho("(Explore) ..set up and maps") + let s:didstarstar= 1 + nnoremap :Pexplore + nnoremap :Nexplore endif - "......................................... - " NetRead: (rcp) NetRead Method #1 {{{3 - if b:netrw_method == 1 " read with rcp -" call Decho("read via rcp (method #1)") - " ER: nothing done with g:netrw_uid yet? - " ER: on Win2K" rcp machine[.user]:file tmpfile - " ER: if machine contains '.' adding .user is required (use $USERNAME) - " ER: the tmpfile is full path: rcp sees C:\... as host C - if s:netrw_has_nt_rcp == 1 - if exists("g:netrw_uid") && ( g:netrw_uid != "" ) - let uid_machine = g:netrw_machine .'.'. g:netrw_uid - else - " Any way needed it machine contains a '.' - let uid_machine = g:netrw_machine .'.'. $USERNAME - endif - else - if exists("g:netrw_uid") && ( g:netrw_uid != "" ) - let uid_machine = g:netrw_uid .'@'. g:netrw_machine - else - let uid_machine = g:netrw_machine + if has("path_extra") +" call Decho("(Explore) ..starpat=".starpat.": has +path_extra") + if !exists("w:netrw_explore_indx") + let w:netrw_explore_indx= 0 endif - endif -" call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(uid_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1)) - exe s:netrw_silentxfer."!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(uid_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1) - let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) - let b:netrw_lastfile = choice - "......................................... - " NetRead: (ftp + <.netrc>) NetRead Method #2 {{{3 - elseif b:netrw_method == 2 " read with ftp + <.netrc> -" call Decho("read via ftp+.netrc (method #2)") - let netrw_fname= b:netrw_fname - keepj call s:SaveBufVars()|new|keepj call s:RestoreBufVars() - let filtbuf= bufnr("%") - setlocal ff=unix - keepj put =g:netrw_ftpmode -" call Decho("filter input: ".getline(line("$"))) - if exists("g:netrw_ftpextracmd") - keepj put =g:netrw_ftpextracmd -" call Decho("filter input: ".getline(line("$"))) - endif - call setline(line("$")+1,'get "'.netrw_fname.'" '.tmpfile) -" call Decho("filter input: ".getline(line("$"))) - if exists("g:netrw_port") && g:netrw_port != "" -" call Decho("executing: %!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1)) - exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1) - else -" call Decho("executing: %!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)) - exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1) - endif - " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) - if getline(1) !~ "^$" && !exists("g:netrw_quiet") && getline(1) !~ '^Trying ' - let debugkeep = &debug - setlocal debug=msg - keepj call netrw#ErrorMsg(s:ERROR,getline(1),4) - let &debug = debugkeep + let indx = a:indx +" call Decho("(Explore) ..starpat=".starpat.": set indx= [a:indx=".indx."]") + + if indx == -1 + " Nexplore +" call Decho("(Explore) ..case Nexplore with starpat=".starpat.": (indx=".indx.")") + if !exists("w:netrw_explore_list") " sanity check + keepj call netrw#ErrorMsg(s:WARNING,"using Nexplore or improperly; see help for netrw-starstar",40) + sil! let @* = keepregstar + sil! let @+ = keepregstar + sil! let @/ = keepregslash +" call Dret("netrw#Explore") + return endif - call s:SaveBufVars() - bd! - if bufname("%") == "" && getline("$") == "" && line('$') == 1 - " needed when one sources a file in a nolbl setting window via ftp - q! + let indx= w:netrw_explore_indx + if indx < 0 | let indx= 0 | endif + if indx >= w:netrw_explore_listlen | let indx= w:netrw_explore_listlen - 1 | endif + let curfile= w:netrw_explore_list[indx] +" call Decho("(Explore) ....indx=".indx." curfile<".curfile.">") + while indx < w:netrw_explore_listlen && curfile == w:netrw_explore_list[indx] + let indx= indx + 1 +" call Decho("(Explore) ....indx=".indx." (Nexplore while loop)") + endwhile + if indx >= w:netrw_explore_listlen | let indx= w:netrw_explore_listlen - 1 | endif +" call Decho("(Explore) ....Nexplore: indx= [w:netrw_explore_indx=".w:netrw_explore_indx."]=".indx) + + elseif indx == -2 + " Pexplore +" call Decho("(Explore) case Pexplore with starpat=".starpat.": (indx=".indx.")") + if !exists("w:netrw_explore_list") " sanity check + keepj call netrw#ErrorMsg(s:WARNING,"using Pexplore or improperly; see help for netrw-starstar",41) + sil! let @* = keepregstar + sil! let @+ = keepregstar + sil! let @/ = keepregslash +" call Dret("netrw#Explore") + return endif - call s:RestoreBufVars() - let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) - let b:netrw_lastfile = choice + let indx= w:netrw_explore_indx + if indx < 0 | let indx= 0 | endif + if indx >= w:netrw_explore_listlen | let indx= w:netrw_explore_listlen - 1 | endif + let curfile= w:netrw_explore_list[indx] +" call Decho("(Explore) ....indx=".indx." curfile<".curfile.">") + while indx >= 0 && curfile == w:netrw_explore_list[indx] + let indx= indx - 1 +" call Decho("(Explore) ....indx=".indx." (Pexplore while loop)") + endwhile + if indx < 0 | let indx= 0 | endif +" call Decho("(Explore) ....Pexplore: indx= [w:netrw_explore_indx=".w:netrw_explore_indx."]=".indx) - "......................................... - " NetRead: (ftp + machine,id,passwd,filename) NetRead Method #3 {{{3 - elseif b:netrw_method == 3 " read with ftp + machine, id, passwd, and fname - " Construct execution string (four lines) which will be passed through filter -" call Decho("read via ftp+mipf (method #3)") - let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape) - keepj call s:SaveBufVars()|new|keepj call s:RestoreBufVars() - let filtbuf= bufnr("%") - setlocal ff=unix - if exists("g:netrw_port") && g:netrw_port != "" - keepj put ='open '.g:netrw_machine.' '.g:netrw_port -" call Decho("filter input: ".getline('.')) else - keepj put ='open '.g:netrw_machine -" call Decho("filter input: ".getline('.')) - endif + " Explore -- initialize + " build list of files to Explore with Nexplore/Pexplore +" call Decho("(Explore) ..starpat=".starpat.": case Explore: initialize (indx=".indx.")") + keepj keepalt call s:NetrwClearExplore() + let w:netrw_explore_indx= 0 + if !exists("b:netrw_curdir") + let b:netrw_curdir= getcwd() + endif +" call Decho("(Explore) ....starpat=".starpat.": b:netrw_curdir<".b:netrw_curdir.">") - if exists("g:netrw_uid" && g:netrw_uid != "" - if exists("g:netrw_ftp") && g:netrw_ftp == 1 - keepj put =g:netrw_uid -" call Decho("filter input: ".getline('.')) - if exists("s:netrw_passwd") - keepj put ='\"'.s:netrw_passwd.'\"' - endif -" call Decho("filter input: ".getline('.')) - elseif exists("s:netrw_passwd") - keepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"' -" call Decho("filter input: ".getline('.')) + " switch on starpat to build the w:netrw_explore_list of files + if starpat == 1 + " starpat=1: Explore *//pattern (current directory only search for files containing pattern) +" call Decho("(Explore) ..case starpat=".starpat.": build *//pattern list (curdir-only srch for files containing pattern) &hls=".&hls) +" call Decho("(Explore) ....pattern<".pattern.">") + try + exe "keepj noautocmd vimgrep /".pattern."/gj ".fnameescape(b:netrw_curdir)."/*" + catch /^Vim\%((\a\+)\)\=:E480/ + keepalt call netrw#ErrorMsg(s:WARNING,"no match with pattern<".pattern.">",76) +" call Dret("netrw#Explore : unable to find pattern<".pattern.">") + return + endtry + let w:netrw_explore_list = s:NetrwExploreListUniq(map(getqflist(),'bufname(v:val.bufnr)')) + if &hls | let keepregslash= s:ExplorePatHls(pattern) | endif + + elseif starpat == 2 + " starpat=2: Explore **//pattern (recursive descent search for files containing pattern) +" call Decho("(Explore) ..case starpat=".starpat.": build **//pattern list (recursive descent files containing pattern)") +" call Decho("(Explore) ....pattern<".pattern.">") + try + exe "sil keepj noautocmd keepalt vimgrep /".pattern."/gj "."**/*" + catch /^Vim\%((\a\+)\)\=:E480/ + keepalt call netrw#ErrorMsg(s:WARNING,'no files matched pattern<'.pattern.'>',45) + if &hls | let keepregslash= s:ExplorePatHls(pattern) | endif + sil! let @* = keepregstar + sil! let @+ = keepregstar + sil! let @/ = keepregslash +" call Dret("netrw#Explore : no files matched pattern") + return + endtry + let s:netrw_curdir = b:netrw_curdir + let w:netrw_explore_list = getqflist() + let w:netrw_explore_list = s:NetrwExploreListUniq(map(w:netrw_explore_list,'s:netrw_curdir."/".bufname(v:val.bufnr)')) + if &hls | let keepregslash= s:ExplorePatHls(pattern) | endif + + elseif starpat == 3 + " starpat=3: Explore */filepat (search in current directory for filenames matching filepat) +" call Decho("(Explore) ..case starpat=".starpat.": build */filepat list (curdir-only srch filenames matching filepat) &hls=".&hls) + let filepat= substitute(dirname,'^\*/','','') + let filepat= substitute(filepat,'^[%#<]','\\&','') +" call Decho("(Explore) ....b:netrw_curdir<".b:netrw_curdir.">") +" call Decho("(Explore) ....filepat<".filepat.">") + let w:netrw_explore_list= s:NetrwExploreListUniq(split(expand(b:netrw_curdir."/".filepat),'\n')) + if &hls | let keepregslash= s:ExplorePatHls(filepat) | endif + + elseif starpat == 4 + " starpat=4: Explore **/filepat (recursive descent search for filenames matching filepat) +" call Decho("(Explore) ..case starpat=".starpat.": build **/filepat list (recursive descent srch filenames matching filepat) &hls=".&hls) + let w:netrw_explore_list= s:NetrwExploreListUniq(split(expand(b:netrw_curdir."/".dirname),'\n')) + if &hls | let keepregslash= s:ExplorePatHls(dirname) | endif + endif " switch on starpat to build w:netrw_explore_list + + let w:netrw_explore_listlen = len(w:netrw_explore_list) +" call Decho("(Explore) ....w:netrw_explore_list<".string(w:netrw_explore_list).">") +" call Decho("(Explore) ....w:netrw_explore_listlen=".w:netrw_explore_listlen) + + if w:netrw_explore_listlen == 0 || (w:netrw_explore_listlen == 1 && w:netrw_explore_list[0] =~ '\*\*\/') + keepalt keepj call netrw#ErrorMsg(s:WARNING,"no files matched",42) + sil! let @* = keepregstar + sil! let @+ = keepregstar + sil! let @/ = keepregslash +" call Dret("netrw#Explore : no files matched") + return endif + endif " if indx ... endif + + " NetrwStatusLine support - for exploring support + let w:netrw_explore_indx= indx +" call Decho("(Explore) ....w:netrw_explore_list<".join(w:netrw_explore_list,',')."> len=".w:netrw_explore_listlen) + + " wrap the indx around, but issue a note + if indx >= w:netrw_explore_listlen || indx < 0 +" call Decho("(Explore) ....wrap indx (indx=".indx." listlen=".w:netrw_explore_listlen.")") + let indx = (indx < 0)? ( w:netrw_explore_listlen - 1 ) : 0 + let w:netrw_explore_indx= indx + keepalt keepj call netrw#ErrorMsg(s:NOTE,"no more files match Explore pattern",43) endif - if exists("g:netrw_ftpmode") && g:netrw_ftpmode != "" - keepj put =g:netrw_ftpmode -" call Decho("filter input: ".getline('.')) + exe "let dirfile= w:netrw_explore_list[".indx."]" +" call Decho("(Explore) ....dirfile=w:netrw_explore_list[indx=".indx."]= <".dirfile.">") + let newdir= substitute(dirfile,'/[^/]*$','','e') +" call Decho("(Explore) ....newdir<".newdir.">") + +" call Decho("(Explore) ....calling LocalBrowseCheck(newdir<".newdir.">)") + call netrw#LocalBrowseCheck(newdir) + if !exists("w:netrw_liststyle") + let w:netrw_liststyle= g:netrw_liststyle endif - if exists("g:netrw_ftpextracmd") - keepj put =g:netrw_ftpextracmd -" call Decho("filter input: ".getline('.')) + if w:netrw_liststyle == s:THINLIST || w:netrw_liststyle == s:LONGLIST + keepalt keepj call search('^'.substitute(dirfile,"^.*/","","").'\>',"W") + else + keepalt keepj call search('\<'.substitute(dirfile,"^.*/","","").'\>',"w") endif - keepj put ='get \"'.netrw_fname.'\" '.tmpfile -" call Decho("filter input: ".getline('.')) + let w:netrw_explore_mtchcnt = indx + 1 + let w:netrw_explore_bufnr = bufnr("%") + let w:netrw_explore_line = line(".") + keepalt keepj call s:SetupNetrwStatusLine('%f %h%m%r%=%9*%{NetrwStatusLine()}') +" call Decho("(Explore) ....explore: mtchcnt=".w:netrw_explore_mtchcnt." bufnr=".w:netrw_explore_bufnr." line#".w:netrw_explore_line) - " perform ftp: - " -i : turns off interactive prompting from ftp + else +" call Decho("(Explore) ..your vim does not have +path_extra") + if !exists("g:netrw_quiet") + keepalt keepj call netrw#ErrorMsg(s:WARNING,"your vim needs the +path_extra feature for Exploring with **!",44) + endif + sil! let @* = keepregstar + sil! let @+ = keepregstar + sil! let @/ = keepregslash +" call Dret("netrw#Explore : missing +path_extra") + return + endif + + else +" call Decho("(Explore) ..default case: Explore newdir<".dirname.">") + if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && dirname =~ '/' + sil! unlet w:netrw_treedict + sil! unlet w:netrw_treetop + endif + let newdir= dirname + if !exists("b:netrw_curdir") + keepj call netrw#LocalBrowseCheck(getcwd()) + else + keepj call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,newdir)) + endif + endif + + " visual display of **/ **// */ Exploration files +" call Decho("(Explore) w:netrw_explore_indx=".(exists("w:netrw_explore_indx")? w:netrw_explore_indx : "doesn't exist")) +" call Decho("(Explore) b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "n/a").">") + if exists("w:netrw_explore_indx") && exists("b:netrw_curdir") +" call Decho("(Explore) s:explore_prvdir<".(exists("s:explore_prvdir")? s:explore_prvdir : "-doesn't exist-")) + if !exists("s:explore_prvdir") || s:explore_prvdir != b:netrw_curdir + " only update match list if current directory isn't the same as before +" call Decho("(Explore) only update match list if current directory not the same as before") + let s:explore_prvdir = b:netrw_curdir + let s:explore_match = "" + let dirlen = s:Strlen(b:netrw_curdir) + if b:netrw_curdir !~ '/$' + let dirlen= dirlen + 1 + endif + let prvfname= "" + for fname in w:netrw_explore_list +" call Decho("(Explore) fname<".fname.">") + if fname =~ '^'.b:netrw_curdir + if s:explore_match == "" + let s:explore_match= '\<'.escape(strpart(fname,dirlen),g:netrw_markfileesc).'\>' + else + let s:explore_match= s:explore_match.'\|\<'.escape(strpart(fname,dirlen),g:netrw_markfileesc).'\>' + endif + elseif fname !~ '^/' && fname != prvfname + if s:explore_match == "" + let s:explore_match= '\<'.escape(fname,g:netrw_markfileesc).'\>' + else + let s:explore_match= s:explore_match.'\|\<'.escape(fname,g:netrw_markfileesc).'\>' + endif + endif + let prvfname= fname + endfor +" call Decho("(Explore) explore_match<".s:explore_match.">") + exe "2match netrwMarkFile /".s:explore_match."/" + endif + echo "==Pexplore ==Nexplore" + else + 2match none + if exists("s:explore_match") | unlet s:explore_match | endif + if exists("s:explore_prvdir") | unlet s:explore_prvdir | endif + echo " " +" call Decho("(Explore) cleared explore match list") + endif + + sil! let @* = keepregstar + sil! let @+ = keepregstar + sil! let @/ = keepregslash +" call Dret("netrw#Explore : @/<".@/.">") +endfun + +" --------------------------------------------------------------------- +" netrw#NetrwMakeTgt: make a target out of the directory name provided {{{2 +fun! netrw#NetrwMakeTgt(dname) +" call Dfunc("netrw#NetrwMakeTgt(dname<".a:dname.">)") + " simplify the target (eg. /abc/def/../ghi -> /abc/ghi) + let svpos = netrw#NetrwSavePosn() + let s:netrwmftgt_islocal= (a:dname !~ '^\a\+://') +" call Decho("s:netrwmftgt_islocal=".s:netrwmftgt_islocal) + if s:netrwmftgt_islocal + let netrwmftgt= simplify(a:dname) + else + let netrwmftgt= a:dname + endif + if exists("s:netrwmftgt") && netrwmftgt == s:netrwmftgt + " re-selected target, so just clear it + unlet s:netrwmftgt s:netrwmftgt_islocal + else + let s:netrwmftgt= netrwmftgt + endif + if g:netrw_fastbrowse <= 1 + call s:NetrwRefresh((b:netrw_curdir !~ '\a\+://'),b:netrw_curdir) + endif + call netrw#NetrwRestorePosn(svpos) +" call Dret("netrw#NetrwMakeTgt") +endfun + +" --------------------------------------------------------------------- +" netrw#NetrwClean: remove netrw {{{2 +" supports :NetrwClean -- remove netrw from first directory on runtimepath +" :NetrwClean! -- remove netrw from all directories on runtimepath +fun! netrw#NetrwClean(sys) +" call Dfunc("netrw#NetrwClean(sys=".a:sys.")") + + if a:sys + let choice= confirm("Remove personal and system copies of netrw?","&Yes\n&No") + else + let choice= confirm("Remove personal copy of netrw?","&Yes\n&No") + endif +" call Decho("choice=".choice) + let diddel= 0 + let diddir= "" + + if choice == 1 + for dir in split(&rtp,',') + if filereadable(dir."/plugin/netrwPlugin.vim") +" call Decho("removing netrw-related files from ".dir) + if s:NetrwDelete(dir."/plugin/netrwPlugin.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/plugin/netrwPlugin.vim",55) |endif + if s:NetrwDelete(dir."/autoload/netrwFileHandlers.vim")|call netrw#ErrorMsg(1,"unable to remove ".dir."/autoload/netrwFileHandlers.vim",55)|endif + if s:NetrwDelete(dir."/autoload/netrwSettings.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/autoload/netrwSettings.vim",55) |endif + if s:NetrwDelete(dir."/autoload/netrw.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/autoload/netrw.vim",55) |endif + if s:NetrwDelete(dir."/syntax/netrw.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/syntax/netrw.vim",55) |endif + if s:NetrwDelete(dir."/syntax/netrwlist.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/syntax/netrwlist.vim",55) |endif + let diddir= dir + let diddel= diddel + 1 + if !a:sys|break|endif + endif + endfor + endif + + echohl WarningMsg + if diddel == 0 + echomsg "netrw is either not installed or not removable" + elseif diddel == 1 + echomsg "removed one copy of netrw from <".diddir.">" + else + echomsg "removed ".diddel." copies of netrw" + endif + echohl None + +" call Dret("netrw#NetrwClean") +endfun + +" --------------------------------------------------------------------- +" netrw#Nread: {{{2 +fun! netrw#Nread(mode,fname) +" call Dfunc("netrw#Nread(mode=".a:mode." fname<".a:fname.">)") + call netrw#NetrwSavePosn() + call netrw#NetRead(a:mode,a:fname) + call netrw#NetrwRestorePosn() +" call Dret("netrw#Nread") +endfun + +" ------------------------------------------------------------------------ +" netrw#NetrwObtain: {{{2 +" netrw#NetrwObtain(islocal,fname[,tgtdirectory]) +" islocal=0 obtain from remote source +" =1 obtain from local source +" fname : a filename or a list of filenames +" tgtdir : optional place where files are to go (not present, uses getcwd()) +fun! netrw#NetrwObtain(islocal,fname,...) +" call Dfunc("netrw#NetrwObtain(islocal=".a:islocal." fname<".((type(a:fname) == 1)? a:fname : string(a:fname)).">) a:0=".a:0) + " NetrwStatusLine support - for obtaining support + + if type(a:fname) == 1 + let fnamelist= [ a:fname ] + elseif type(a:fname) == 3 + let fnamelist= a:fname + else + call netrw#ErrorMsg(s:ERROR,"attempting to use NetrwObtain on something not a filename or a list",62) +" call Dret("netrw#NetrwObtain") + return + endif +" call Decho("fnamelist<".string(fnamelist).">") + if a:0 > 0 + let tgtdir= a:1 + else + let tgtdir= getcwd() + endif +" call Decho("tgtdir<".tgtdir.">") + + if exists("b:netrw_islocal") && b:netrw_islocal + " obtain a file from local b:netrw_curdir to (local) tgtdir +" call Decho("obtain a file from local ".b:netrw_curdir." to ".tgtdir) + if exists("b:netrw_curdir") && getcwd() != b:netrw_curdir + let topath= s:ComposePath(tgtdir,"") + if (has("win32") || has("win95") || has("win64") || has("win16")) + " transfer files one at time +" call Decho("transfer files one at a time") + for fname in fnamelist +" call Decho("system(".g:netrw_localcopycmd." ".shellescape(fname)." ".shellescape(topath).")") + call system(g:netrw_localcopycmd." ".shellescape(fname)." ".shellescape(topath)) + if v:shell_error != 0 + call netrw#ErrorMsg(s:WARNING,"consider setting g:netrw_localcopycmd<".g:netrw_localcopycmd."> to something that works",80) +" call Dret("s:NetrwObtain 0 : failed: ".g:netrw_localcopycmd." ".shellescape(fname)." ".shellescape(topath)) + return + endif + endfor + else + " transfer files with one command +" call Decho("transfer files with one command") + let filelist= join(map(deepcopy(fnamelist),"shellescape(v:val)")) +" call Decho("system(".g:netrw_localcopycmd." ".filelist." ".shellescape(topath).")") + call system(g:netrw_localcopycmd." ".filelist." ".shellescape(topath)) + if v:shell_error != 0 + call netrw#ErrorMsg(s:WARNING,"consider setting g:netrw_localcopycmd<".g:netrw_localcopycmd."> to something that works",80) +" call Dret("s:NetrwObtain 0 : failed: ".g:netrw_localcopycmd." ".filelist." ".shellescape(topath)) + return + endif + endif + elseif !exists("b:netrw_curdir") + call netrw#ErrorMsg(s:ERROR,"local browsing directory doesn't exist!",36) + else + call netrw#ErrorMsg(s:WARNING,"local browsing directory and current directory are identical",37) + endif + + else + " obtain files from remote b:netrw_curdir to local tgtdir +" call Decho("obtain a file from remote ".b:netrw_curdir." to ".tgtdir) + if type(a:fname) == 1 + call s:SetupNetrwStatusLine('%f %h%m%r%=%9*Obtaining '.a:fname) + endif + call s:NetrwMethod(b:netrw_curdir) + + if b:netrw_method == 4 + " obtain file using scp +" call Decho("obtain via scp (method#4)") + if exists("g:netrw_port") && g:netrw_port != "" + let useport= " ".g:netrw_scpport." ".g:netrw_port + else + let useport= "" + endif + if b:netrw_fname =~ '/' + let path= substitute(b:netrw_fname,'^\(.*/\).\{-}$','\1','') + else + let path= "" + endif + let filelist= join(map(deepcopy(fnamelist),'shellescape(g:netrw_machine.":".path.v:val,1)')) +" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_scp_cmd.shellescape(useport,1)." ".filelist." ".shellescape(tgtdir,1)) + exe s:netrw_silentxfer."!".g:netrw_scp_cmd.shellescape(useport,1)." ".filelist." ".shellescape(tgtdir,1) + + elseif b:netrw_method == 2 + " obtain file using ftp + .netrc +" call Decho("obtain via ftp+.netrc (method #2)") + call s:SaveBufVars()|sil keepjumps new|call s:RestoreBufVars() + let tmpbufnr= bufnr("%") + setl ff=unix + if exists("g:netrw_ftpmode") && g:netrw_ftpmode != "" + keepj put =g:netrw_ftpmode +" call Decho("filter input: ".getline('$')) + endif + + if exists("b:netrw_fname") && b:netrw_fname != "" + call setline(line("$")+1,'cd "'.b:netrw_fname.'"') +" call Decho("filter input: ".getline('$')) + endif + + if exists("g:netrw_ftpextracmd") + keepj put =g:netrw_ftpextracmd +" call Decho("filter input: ".getline('$')) + endif + for fname in fnamelist + call setline(line("$")+1,'get "'.fname.'"') +" call Decho("filter input: ".getline('$')) + endfor + if exists("g:netrw_port") && g:netrw_port != "" +" call Decho("executing: %!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1)) + exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1) + else +" call Decho("executing: %!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)) + exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1) + endif + " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) + if getline(1) !~ "^$" && !exists("g:netrw_quiet") && getline(1) !~ '^Trying ' + let debugkeep= &debug + setl debug=msg + call netrw#ErrorMsg(s:ERROR,getline(1),4) + let &debug= debugkeep + endif + + elseif b:netrw_method == 3 + " obtain with ftp + machine, id, passwd, and fname (ie. no .netrc) +" call Decho("obtain via ftp+mipf (method #3)") + call s:SaveBufVars()|sil keepjumps new|call s:RestoreBufVars() + let tmpbufnr= bufnr("%") + setl ff=unix + + if exists("g:netrw_port") && g:netrw_port != "" + keepj put ='open '.g:netrw_machine.' '.g:netrw_port +" call Decho("filter input: ".getline('$')) + else + keepj put ='open '.g:netrw_machine +" call Decho("filter input: ".getline('$')) + endif + + if exists("g:netrw_uid") && g:netrw_uid != "" + if exists("g:netrw_ftp") && g:netrw_ftp == 1 + keepj put =g:netrw_uid +" call Decho("filter input: ".getline('$')) + if exists("s:netrw_passwd") && s:netrw_passwd != "" + keepj put ='\"'.s:netrw_passwd.'\"' + endif +" call Decho("filter input: ".getline('$')) + elseif exists("s:netrw_passwd") + keepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"' +" call Decho("filter input: ".getline('$')) + endif + endif + + if exists("g:netrw_ftpmode") && g:netrw_ftpmode != "" + keepj put =g:netrw_ftpmode +" call Decho("filter input: ".getline('$')) + endif + + if exists("b:netrw_fname") && b:netrw_fname != "" + keepj call setline(line("$")+1,'cd "'.b:netrw_fname.'"') +" call Decho("filter input: ".getline('$')) + endif + + if exists("g:netrw_ftpextracmd") + keepj put =g:netrw_ftpextracmd +" call Decho("filter input: ".getline('$')) + endif + + if exists("g:netrw_ftpextracmd") + keepj put =g:netrw_ftpextracmd +" call Decho("filter input: ".getline('$')) + endif + for fname in fnamelist + keepj call setline(line("$")+1,'get "'.fname.'"') + endfor +" call Decho("filter input: ".getline('$')) + + " perform ftp: + " -i : turns off interactive prompting from ftp + " -n unix : DON'T use <.netrc>, even though it exists + " -n win32: quit being obnoxious about password + keepj norm! 1Gdd +" call Decho("executing: %!".s:netrw_ftp_cmd." ".g:netrw_ftp_options) + exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." ".g:netrw_ftp_options + " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) + if getline(1) !~ "^$" +" call Decho("error<".getline(1).">") + if !exists("g:netrw_quiet") + keepj call netrw#ErrorMsg(s:ERROR,getline(1),5) + endif + endif + elseif !exists("b:netrw_method") || b:netrw_method < 0 +" call Dfunc("netrw#NetrwObtain : unsupported method") + return + endif + + " restore status line + if type(a:fname) == 1 && exists("s:netrw_users_stl") + keepj call s:SetupNetrwStatusLine(s:netrw_users_stl) + endif + + endif + + " cleanup + if exists("tmpbufnr") + if bufnr("%") != tmpbufnr + exe tmpbufnr."bw!" + else + q! + endif + endif + +" call Dret("netrw#NetrwObtain") +endfun + +" --------------------------------------------------------------------- +" NetrwStatusLine: {{{2 +fun! NetrwStatusLine() + +" vvv NetrwStatusLine() debugging vvv +" let g:stlmsg="" +" if !exists("w:netrw_explore_bufnr") +" let g:stlmsg="!X" +" elseif w:netrw_explore_bufnr != bufnr("%") +" let g:stlmsg="explore_bufnr!=".bufnr("%") +" endif +" if !exists("w:netrw_explore_line") +" let g:stlmsg=" !X" +" elseif w:netrw_explore_line != line(".") +" let g:stlmsg=" explore_line!={line(.)<".line(".").">" +" endif +" if !exists("w:netrw_explore_list") +" let g:stlmsg=" !X" +" endif +" ^^^ NetrwStatusLine() debugging ^^^ + + if !exists("w:netrw_explore_bufnr") || w:netrw_explore_bufnr != bufnr("%") || !exists("w:netrw_explore_line") || w:netrw_explore_line != line(".") || !exists("w:netrw_explore_list") + " restore user's status line + let &stl = s:netrw_users_stl + let &laststatus = s:netrw_users_ls + if exists("w:netrw_explore_bufnr")|unlet w:netrw_explore_bufnr|endif + if exists("w:netrw_explore_line") |unlet w:netrw_explore_line |endif + return "" + else + return "Match ".w:netrw_explore_mtchcnt." of ".w:netrw_explore_listlen + endif +endfun + +" --------------------------------------------------------------------- +" Netrw Transfer Functions: {{{1 +" =============================== + +" ------------------------------------------------------------------------ +" netrw#NetRead: responsible for reading a file over the net {{{2 +" mode: =0 read remote file and insert before current line +" =1 read remote file and insert after current line +" =2 replace with remote file +" =3 obtain file, but leave in temporary format +fun! netrw#NetRead(mode,...) +" call Dfunc("netrw#NetRead(mode=".a:mode.",...) a:0=".a:0." ".g:loaded_netrw.((a:0 > 0)? " a:1<".a:1.">" : "")) + + " NetRead: save options {{{3 + call s:NetrwOptionSave("w:") + call s:NetrwSafeOptions() + call s:RestoreCursorline() + + " NetRead: interpret mode into a readcmd {{{3 + if a:mode == 0 " read remote file before current line + let readcmd = "0r" + elseif a:mode == 1 " read file after current line + let readcmd = "r" + elseif a:mode == 2 " replace with remote file + let readcmd = "%r" + elseif a:mode == 3 " skip read of file (leave as temporary) + let readcmd = "t" + else + exe a:mode + let readcmd = "r" + endif + let ichoice = (a:0 == 0)? 0 : 1 +" call Decho("readcmd<".readcmd."> ichoice=".ichoice) + + " NetRead: get temporary filename {{{3 + let tmpfile= s:GetTempfile("") + if tmpfile == "" +" call Dret("netrw#NetRead : unable to get a tempfile!") + return + endif + + while ichoice <= a:0 + + " attempt to repeat with previous host-file-etc + if exists("b:netrw_lastfile") && a:0 == 0 +" call Decho("using b:netrw_lastfile<" . b:netrw_lastfile . ">") + let choice = b:netrw_lastfile + let ichoice= ichoice + 1 + + else + exe "let choice= a:" . ichoice +" call Decho("no lastfile: choice<" . choice . ">") + + if match(choice,"?") == 0 + " give help + echomsg 'NetRead Usage:' + echomsg ':Nread machine:path uses rcp' + echomsg ':Nread "machine path" uses ftp with <.netrc>' + echomsg ':Nread "machine id password path" uses ftp' + echomsg ':Nread dav://machine[:port]/path uses cadaver' + echomsg ':Nread fetch://machine/path uses fetch' + echomsg ':Nread ftp://[user@]machine[:port]/path uses ftp autodetects <.netrc>' + echomsg ':Nread http://[user@]machine/path uses http wget' + echomsg ':Nread rcp://[user@]machine/path uses rcp' + echomsg ':Nread rsync://machine[:port]/path uses rsync' + echomsg ':Nread scp://[user@]machine[[:#]port]/path uses scp' + echomsg ':Nread sftp://[user@]machine[[:#]port]/path uses sftp' + sleep 4 + break + + elseif match(choice,'^"') != -1 + " Reconstruct Choice if choice starts with '"' +" call Decho("reconstructing choice") + if match(choice,'"$') != -1 + " case "..." + let choice= strpart(choice,1,strlen(choice)-2) + else + " case "... ... ..." + let choice = strpart(choice,1,strlen(choice)-1) + let wholechoice = "" + + while match(choice,'"$') == -1 + let wholechoice = wholechoice . " " . choice + let ichoice = ichoice + 1 + if ichoice > a:0 + if !exists("g:netrw_quiet") + call netrw#ErrorMsg(s:ERROR,"Unbalanced string in filename '". wholechoice ."'",3) + endif +" call Dret("netrw#NetRead :2 getcwd<".getcwd().">") + return + endif + let choice= a:{ichoice} + endwhile + let choice= strpart(wholechoice,1,strlen(wholechoice)-1) . " " . strpart(choice,0,strlen(choice)-1) + endif + endif + endif + +" call Decho("choice<" . choice . ">") + let ichoice= ichoice + 1 + + " NetRead: Determine method of read (ftp, rcp, etc) {{{3 + call s:NetrwMethod(choice) + if !exists("b:netrw_method") || b:netrw_method < 0 +" call Dfunc("netrw#NetRead : unsupported method") + return + endif + let tmpfile= s:GetTempfile(b:netrw_fname) " apply correct suffix + + " Check if NetrwBrowse() should be handling this request +" call Decho("checking if NetrwBrowse() should handle choice<".choice."> with netrw_list_cmd<".g:netrw_list_cmd.">") + if choice =~ "^.*[\/]$" && b:netrw_method != 5 && choice !~ '^https\=://' +" call Decho("yes, choice matches '^.*[\/]$'") + keepj call s:NetrwBrowse(0,choice) +" call Dret("netrw#NetRead :3 getcwd<".getcwd().">") + return + endif + + " ============ + " NetRead: Perform Protocol-Based Read {{{3 + " =========================== + if exists("g:netrw_silent") && g:netrw_silent == 0 && &ch >= 1 + echo "(netrw) Processing your read request..." + endif + + "......................................... + " NetRead: (rcp) NetRead Method #1 {{{3 + if b:netrw_method == 1 " read with rcp +" call Decho("read via rcp (method #1)") + " ER: nothing done with g:netrw_uid yet? + " ER: on Win2K" rcp machine[.user]:file tmpfile + " ER: if machine contains '.' adding .user is required (use $USERNAME) + " ER: the tmpfile is full path: rcp sees C:\... as host C + if s:netrw_has_nt_rcp == 1 + if exists("g:netrw_uid") && ( g:netrw_uid != "" ) + let uid_machine = g:netrw_machine .'.'. g:netrw_uid + else + " Any way needed it machine contains a '.' + let uid_machine = g:netrw_machine .'.'. $USERNAME + endif + else + if exists("g:netrw_uid") && ( g:netrw_uid != "" ) + let uid_machine = g:netrw_uid .'@'. g:netrw_machine + else + let uid_machine = g:netrw_machine + endif + endif +" call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(uid_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1)) + exe s:netrw_silentxfer."!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(uid_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1) + let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) + let b:netrw_lastfile = choice + + "......................................... + " NetRead: (ftp + <.netrc>) NetRead Method #2 {{{3 + elseif b:netrw_method == 2 " read with ftp + <.netrc> +" call Decho("read via ftp+.netrc (method #2)") + let netrw_fname= b:netrw_fname + keepj call s:SaveBufVars()|new|keepj call s:RestoreBufVars() + let filtbuf= bufnr("%") + setl ff=unix + keepj put =g:netrw_ftpmode +" call Decho("filter input: ".getline(line("$"))) + if exists("g:netrw_ftpextracmd") + keepj put =g:netrw_ftpextracmd +" call Decho("filter input: ".getline(line("$"))) + endif + call setline(line("$")+1,'get "'.netrw_fname.'" '.tmpfile) +" call Decho("filter input: ".getline(line("$"))) + if exists("g:netrw_port") && g:netrw_port != "" +" call Decho("executing: %!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1)) + exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1) + else +" call Decho("executing: %!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)) + exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1) + endif + " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) + if getline(1) !~ "^$" && !exists("g:netrw_quiet") && getline(1) !~ '^Trying ' + let debugkeep = &debug + setl debug=msg + keepj call netrw#ErrorMsg(s:ERROR,getline(1),4) + let &debug = debugkeep + endif + call s:SaveBufVars() + bd! + if bufname("%") == "" && getline("$") == "" && line('$') == 1 + " needed when one sources a file in a nolbl setting window via ftp + q! + endif + call s:RestoreBufVars() + let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) + let b:netrw_lastfile = choice + + "......................................... + " NetRead: (ftp + machine,id,passwd,filename) NetRead Method #3 {{{3 + elseif b:netrw_method == 3 " read with ftp + machine, id, passwd, and fname + " Construct execution string (four lines) which will be passed through filter +" call Decho("read via ftp+mipf (method #3)") + let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape) + keepj call s:SaveBufVars()|new|keepj call s:RestoreBufVars() + let filtbuf= bufnr("%") + setl ff=unix + if exists("g:netrw_port") && g:netrw_port != "" + keepj put ='open '.g:netrw_machine.' '.g:netrw_port +" call Decho("filter input: ".getline('.')) + else + keepj put ='open '.g:netrw_machine +" call Decho("filter input: ".getline('.')) + endif + + if exists("g:netrw_uid") && g:netrw_uid != "" + if exists("g:netrw_ftp") && g:netrw_ftp == 1 + keepj put =g:netrw_uid +" call Decho("filter input: ".getline('.')) + if exists("s:netrw_passwd") + keepj put ='\"'.s:netrw_passwd.'\"' + endif +" call Decho("filter input: ".getline('.')) + elseif exists("s:netrw_passwd") + keepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"' +" call Decho("filter input: ".getline('.')) + endif + endif + + if exists("g:netrw_ftpmode") && g:netrw_ftpmode != "" + keepj put =g:netrw_ftpmode +" call Decho("filter input: ".getline('.')) + endif + if exists("g:netrw_ftpextracmd") + keepj put =g:netrw_ftpextracmd +" call Decho("filter input: ".getline('.')) + endif + keepj put ='get \"'.netrw_fname.'\" '.tmpfile +" call Decho("filter input: ".getline('.')) + + " perform ftp: + " -i : turns off interactive prompting from ftp " -n unix : DON'T use <.netrc>, even though it exists " -n win32: quit being obnoxious about password keepj norm! 1Gdd @@ -1071,7 +1852,7 @@ fun! netrw#NetRead(mode,...) " Construct execution string (four lines) which will be passed through filter let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape) new - setlocal ff=unix + setl ff=unix if exists("g:netrw_port") && g:netrw_port != "" keepj put ='open '.g:netrw_machine.' '.g:netrw_port else @@ -1314,11 +2095,11 @@ fun! netrw#NetWrite(...) range " formerly just a "new...bd!", that changed the window sizes when equalalways. Using enew workaround instead let bhkeep = &l:bh let curbuf = bufnr("%") - setlocal bh=hide - enew + setl bh=hide + keepalt enew " call Decho("filter input window#".winnr()) - setlocal ff=unix + setl ff=unix keepj put =g:netrw_ftpmode " call Decho("filter input: ".getline('$')) if exists("g:netrw_ftpextracmd") @@ -1361,9 +2142,9 @@ fun! netrw#NetWrite(...) range " formerly just a "new...bd!", that changed the window sizes when equalalways. Using enew workaround instead let curbuf = bufnr("%") - setlocal bh=hide - enew - setlocal ff=unix + setl bh=hide + keepalt enew + setl ff=unix if exists("g:netrw_port") && g:netrw_port != "" keepj put ='open '.g:netrw_machine.' '.g:netrw_port @@ -1449,10 +2230,10 @@ fun! netrw#NetWrite(...) range " formerly just a "new...bd!", that changed the window sizes when equalalways. Using enew workaround instead let curbuf = bufnr("%") - setlocal bh=hide - enew + setl bh=hide + keepalt enew - setlocal ff=unix + setl ff=unix if exists("g:netrw_port") && g:netrw_port != "" keepj put ='open '.g:netrw_machine.' '.g:netrw_port else @@ -1487,7 +2268,7 @@ fun! netrw#NetWrite(...) range "......................................... " NetWrite: (sftp) NetWrite Method #9 {{{3 elseif b:netrw_method == 9 -" call Decho("read via sftp (method #9)") +" call Decho("write via sftp (method #9)") let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape) if exists("g:netrw_uid") && ( g:netrw_uid != "" ) let uid_machine = g:netrw_uid .'@'. g:netrw_machine @@ -1498,14 +2279,15 @@ fun! netrw#NetWrite(...) range " formerly just a "new...bd!", that changed the window sizes when equalalways. Using enew workaround instead let bhkeep = &l:bh let curbuf = bufnr("%") - setlocal bh=hide - enew + setl bh=hide + keepalt enew - setlocal ff=unix + setl ff=unix call setline(1,'put "'.escape(tmpfile,'\').'" '.netrw_fname) " call Decho("filter input: ".getline('.')) " call Decho("executing: %!".g:netrw_sftp_cmd.' '.shellescape(uid_machine,1)) - exe s:netrw_silentxfer."%!".g:netrw_sftp_cmd.' '.shellescape(uid_machine,1) + let sftpcmd= substitute(g:netrw_sftp_cmd,"%TEMPFILE%",escape(tmpfile,'\'),"g") + exe s:netrw_silentxfer."%!".sftpcmd.' '.shellescape(uid_machine,1) let filtbuf= bufnr("%") exe curbuf."b!" let &l:bh = bhkeep @@ -1647,14 +2429,13 @@ fun! s:NetrwGetFile(readcmd, tfile, method) " call Decho("exe sil! keepalt file ".fnameescape(rfile)) exe "sil! keepj keepalt file ".fnameescape(rfile) - " detect filetype of local version of remote file + " Detect filetype of local version of remote file. " Note that isk must not include a "/" for scripts.vim " to process this detection correctly. " call Decho("detect filetype of local version of remote file") - let iskkeep= &isk - set isk-=/ - filetype detect - let &isk= iskkeep + let iskkeep= &l:isk + setl isk-=/ + let &l:isk= iskkeep " call Dredir("renamed buffer back to remote filename<".rfile."> : expand(%)<".expand("%").">","ls!") let line1 = 1 let line2 = line("$") @@ -1860,8 +2641,7 @@ fun! s:NetrwMethod(choice) " call Decho("has -s: : s:netrw_ftp_cmd<".s:netrw_ftp_cmd.">") " call Decho(" g:netrw_ftp_cmd<".g:netrw_ftp_cmd.">") if g:netrw_ftp_cmd =~ '-[sS]:\S*MACHINE\>' - let machine = substitute(g:netrw_machine,'\([^.]\+\)\.\S*','\1','') - let s:netrw_ftp_cmd= substitute(g:netrw_ftp_cmd,'\',machine.".ftp",'') + let s:netrw_ftp_cmd= substitute(g:netrw_ftp_cmd,'\',g:netrw_machine,'') " call Decho("s:netrw_ftp_cmd<".s:netrw_ftp_cmd.">") endif let b:netrw_method= 2 @@ -2013,11 +2793,17 @@ fun! NetUserPass(...) endif if a:0 == 0 + " case: no input arguments + + " change host and username if not previously entered; get new password + if !exists("g:netrw_machine") + let g:netrw_machine= input('Enter hostname: ') + endif if !exists("g:netrw_uid") || g:netrw_uid == "" - " get uid via prompt + " get username (user-id) via prompt let g:netrw_uid= input('Enter username: ') endif - " get password via prompt + " get password via prompting let s:netrw_passwd= inputsecret("Enter Password: ") " set up hup database @@ -2029,8 +2815,10 @@ fun! NetUserPass(...) let s:netrw_hup[host].passwd = s:netrw_passwd elseif a:0 == 1 + " case: one input argument if a:1 =~ '^ftp:' + " get host from ftp:... url " access userid and password from hup (host-user-passwd) dictionary let host = substitute(a:1,'^ftp:','','') let host = substitute(host,'\..*','','') @@ -2043,14 +2831,22 @@ fun! NetUserPass(...) let g:netrw_uid = input("Enter UserId: ") let s:netrw_passwd = inputsecret("Enter Password: ") endif + else - " set userid, prompt for password -" call Decho("set g:netrw_uid= <".a:1.">") + " case: one input argument, not an url. Using it as a new user-id. if exists("g:netrw_machine") let host= substitute(g:netrw_machine,'\..*$','','') + else + let g:netrw_machine= input('Enter hostname: ') + endif + let g:netrw_uid = a:1 +" call Decho("set g:netrw_uid= <".g:netrw_uid.">") + if exists("g:netrw_passwd") + " ask for password if one not previously entered + let s:netrw_passwd= g:netrw_passwd + else + let s:netrw_passwd = inputsecret("Enter Password: ") endif - let g:netrw_uid = a:1 - let s:netrw_passwd = inputsecret("Enter Password: ") endif " call Decho("host<".host.">") @@ -2094,25 +2890,25 @@ fun! s:NetrwMaps(islocal) " call Dfunc("s:NetrwMaps(islocal=".a:islocal.") b:netrw_curdir<".b:netrw_curdir.">") " set up Rexplore and [ 2-leftmouse-click -or- c-leftmouse ] -" call Decho("set up Rexplore command") +" call Decho("(NetrwMaps) set up Rexplore command") com! Rexplore if exists("w:netrw_rexlocal")|call s:NetrwRexplore(w:netrw_rexlocal,exists("w:netrw_rexdir")? w:netrw_rexdir : ".")|else|call netrw#ErrorMsg(s:WARNING,"not a former netrw window",79)|endif if g:netrw_mousemaps && g:netrw_retmap -" call Decho("set up Rexplore 2-leftmouse") +" call Decho("(NetrwMaps) set up Rexplore 2-leftmouse") if !hasmapto("NetrwReturn") if maparg("<2-leftmouse>","n") == "" || maparg("<2-leftmouse>","n") =~ '^-$' -" call Decho("making map for 2-leftmouse") +" call Decho("(NetrwMaps) making map for 2-leftmouse") nmap <2-leftmouse> NetrwReturn elseif maparg("","n") == "" -" call Decho("making map for c-leftmouse") +" call Decho("(NetrwMaps) making map for c-leftmouse") nmap NetrwReturn endif endif nno NetrwReturn :Rexplore -" call Decho("made NetrwReturn map") +" call Decho("(NetrwMaps) made NetrwReturn map") endif if a:islocal -" call Decho("make local maps") +" call Decho("(NetrwMaps) make local maps") " local normal-mode maps nnoremap a :call NetrwHide(1) nnoremap % :call NetrwOpenFile(1) @@ -2134,6 +2930,7 @@ fun! s:NetrwMaps(islocal) nnoremap md :call NetrwMarkFileDiff(1) nnoremap me :call NetrwMarkFileEdit(1) nnoremap mf :call NetrwMarkFile(1,NetrwGetWord()) + nnoremap mF :call NetrwUnmarkList(bufnr("%"),b:netrw_curdir) nnoremap mg :call NetrwMarkFileGrep(1) nnoremap mh :call NetrwMarkHideSfx(1) nnoremap mm :call NetrwMarkFileMove(1) @@ -2152,15 +2949,18 @@ fun! s:NetrwMaps(islocal) nnoremap P :call NetrwPrevWinOpen(1) nnoremap qb :call NetrwBookHistHandler(2,b:netrw_curdir) nnoremap qf :call NetrwFileInfo(1,NetrwGetWord()) + nnoremap qF :call NetrwMarkFileQFEL(1,getqflist()) nnoremap r :let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'exe "norm! 0"call NetrwRefresh(1,NetrwBrowseChgDir(1,'./')) nnoremap s :call NetrwSortStyle(1) nnoremap S :call NetSortSequence(1) - nnoremap T :call NetrwSplit(4)norm! gT nnoremap t :call NetrwSplit(4) + nnoremap Tb :call NetrwSetTgt('b',v:count1) + nnoremap Th :call NetrwSetTgt('h',v:count) nnoremap u :call NetrwBookHistHandler(4,expand("%")) nnoremap U :call NetrwBookHistHandler(5,expand("%")) nnoremap v :call NetrwSplit(5) nnoremap x :call netrw#NetrwBrowseX(NetrwBrowseChgDir(1,NetrwGetWord(),0),0)" + nnoremap X :call NetrwLocalExecute(expand(""))" " local insert-mode maps inoremap a :call NetrwHide(1) inoremap c :exe "keepjumps lcd ".fnameescape(b:netrw_curdir) @@ -2198,11 +2998,13 @@ fun! s:NetrwMaps(islocal) inoremap P :call NetrwPrevWinOpen(1) inoremap qb :call NetrwBookHistHandler(2,b:netrw_curdir) inoremap qf :call NetrwFileInfo(1,NetrwGetWord()) + inoremap qF :call NetrwMarkFileQFEL(1,getqflist()) inoremap r :let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'exe "norm! 0"call NetrwRefresh(1,NetrwBrowseChgDir(1,'./')) inoremap s :call NetrwSortStyle(1) inoremap S :call NetSortSequence(1) - inoremap T :call NetrwSplit(4)norm! gT inoremap t :call NetrwSplit(4) + inoremap Tb :call NetrwSetTgt('b',v:count1) + inoremap Th :call NetrwSetTgt('h',v:count) inoremap u :call NetrwBookHistHandler(4,expand("%")) inoremap U :call NetrwBookHistHandler(5,expand("%")) inoremap v :call NetrwSplit(5) @@ -2229,6 +3031,8 @@ fun! s:NetrwMaps(islocal) if g:netrw_mousemaps == 1 nmap NetrwLeftmouse nno NetrwLeftmouse :call NetrwLeftmouse(1) + nmap NetrwRightdrag + nno NetrwRightdrag :call NetrwRightdrag(1) nmap NetrwMiddlemouse nno NetrwMiddlemouse :call NetrwPrevWinOpen(1) nmap NetrwSLeftmouse @@ -2259,7 +3063,7 @@ fun! s:NetrwMaps(islocal) nnoremap :he netrw-quickhelp else " remote -" call Decho("make remote maps") +" call Decho("(NetrwMaps) make remote maps") call s:RemotePathAnalysis(b:netrw_curdir) " remote normal-mode maps nnoremap :call NetrwBrowse(0,NetrwBrowseChgDir(0,NetrwGetWord())) @@ -2271,6 +3075,7 @@ fun! s:NetrwMaps(islocal) nnoremap md :call NetrwMarkFileDiff(0) nnoremap me :call NetrwMarkFileEdit(0) nnoremap mf :call NetrwMarkFile(0,NetrwGetWord()) + nnoremap mF :call NetrwUnmarkList(bufnr("%"),b:netrw_curdir) nnoremap mg :call NetrwMarkFileGrep(0) nnoremap mh :call NetrwMarkHideSfx(0) nnoremap mm :call NetrwMarkFileMove(0) @@ -2283,7 +3088,7 @@ fun! s:NetrwMaps(islocal) nnoremap mx :call NetrwMarkFileExe(0) nnoremap mX :call NetrwMarkFileVimCmd(0) nnoremap mz :call NetrwMarkFileCompress(0) - nnoremap gb :call NetrwBookHistHandler(1,b:netrw_cur) + nnoremap gb :call NetrwBookHistHandler(1,b:netrw_curdir) nnoremap gd :call NetrwForceChgDir(0,NetrwGetWord()) nnoremap gf :call NetrwForceFile(0,NetrwGetWord()) nnoremap gh :call NetrwHidden(0) @@ -2298,11 +3103,13 @@ fun! s:NetrwMaps(islocal) nnoremap qb :call NetrwBookHistHandler(2,b:netrw_curdir) nnoremap mB :call NetrwBookHistHandler(6,b:netrw_curdir) nnoremap qf :call NetrwFileInfo(0,NetrwGetWord()) + nnoremap qF :call NetrwMarkFileQFEL(0,getqflist()) nnoremap r :let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'exe "norm! 0"call NetrwBrowse(0,NetrwBrowseChgDir(0,'./')) nnoremap s :call NetrwSortStyle(0) nnoremap S :call NetSortSequence(0) nnoremap t :call NetrwSplit(1) - nnoremap T :call NetrwSplit(1)norm! gT + nnoremap Tb :call NetrwSetTgt('b',v:count1) + nnoremap Th :call NetrwSetTgt('h',v:count) nnoremap u :call NetrwBookHistHandler(4,b:netrw_curdir) nnoremap U :call NetrwBookHistHandler(5,b:netrw_curdir) nnoremap v :call NetrwSplit(2) @@ -2330,7 +3137,7 @@ fun! s:NetrwMaps(islocal) inoremap mx :call NetrwMarkFileExe(0) inoremap mX :call NetrwMarkFileVimCmd(0) inoremap mz :call NetrwMarkFileCompress(0) - inoremap gb :call NetrwBookHistHandler(1,b:netrw_cur) + inoremap gb :call NetrwBookHistHandler(1,b:netrw_curdir) inoremap gh :call NetrwHidden(0) inoremap gp :call NetrwChgPerm(0,b:netrw_curdir) inoremap C :let g:netrw_chgwin= winnr() @@ -2343,11 +3150,13 @@ fun! s:NetrwMaps(islocal) inoremap qb :call NetrwBookHistHandler(2,b:netrw_curdir) inoremap mB :call NetrwBookHistHandler(6,b:netrw_curdir) inoremap qf :call NetrwFileInfo(0,NetrwGetWord()) + inoremap qF :call NetrwMarkFileQFEL(0,getqflist()) inoremap r :let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'exe "norm! 0"call NetrwBrowse(0,NetrwBrowseChgDir(0,'./')) inoremap s :call NetrwSortStyle(0) inoremap S :call NetSortSequence(0) inoremap t :call NetrwSplit(1) - inoremap T :call NetrwSplit(1)norm! gT + inoremap Tb :call NetrwSetTgt('b',v:count1) + inoremap Th :call NetrwSetTgt('h',v:count) inoremap u :call NetrwBookHistHandler(4,b:netrw_curdir) inoremap U :call NetrwBookHistHandler(5,b:netrw_curdir) inoremap v :call NetrwSplit(2) @@ -2370,6 +3179,8 @@ fun! s:NetrwMaps(islocal) if g:netrw_mousemaps == 1 nmap NetrwLeftmouse nno NetrwLeftmouse :call NetrwLeftmouse(0) + nmap NetrwLeftdrag + nno NetrwLeftdrag :call NetrwLeftdrag(0) nmap NetrwMiddlemouse nno NetrwMiddlemouse :call NetrwPrevWinOpen(0) nmap NetrwSLeftmouse @@ -2430,7 +3241,12 @@ endfun " 6: (user: ) delete bookmark fun! s:NetrwBookHistHandler(chg,curdir) " call Dfunc("s:NetrwBookHistHandler(chg=".a:chg." curdir<".a:curdir.">) cnt=".v:count." histcnt=".g:netrw_dirhist_cnt." histmax=".g:netrw_dirhistmax) + if !exists("g:netrw_dirhistmax") || g:netrw_dirhistmax <= 0 +" " call Dret("s:NetrwBookHistHandler - suppressed due to g:netrw_dirhistmax") + return + endif + let ykeep= @@ if a:chg == 0 " bookmark the current directory " call Decho("(user: ) bookmark the current directory") @@ -2446,8 +3262,9 @@ fun! s:NetrwBookHistHandler(chg,curdir) elseif a:chg == 1 " change to the bookmarked directory -" call Decho("(user: <".v:count."mb>) change to the bookmarked directory") +" call Decho("(user: <".v:count."gb>) change to the bookmarked directory") if exists("g:netrw_bookmarklist[v:count-1]") +" call Decho("(user: <".v:count."gb>) bookmarklist=".string(g:netrw_bookmarklist)) exe "keepj e ".fnameescape(g:netrw_bookmarklist[v:count-1]) else echomsg "Sorry, bookmark#".v:count." doesn't exist!" @@ -2463,7 +3280,7 @@ fun! s:NetrwBookHistHandler(chg,curdir) let cnt= 1 for bmd in g:netrw_bookmarklist " call Decho("Netrw Bookmark#".cnt.": ".g:netrw_bookmarklist[cnt-1]) - echo "Netrw Bookmark#".cnt.": ".g:netrw_bookmarklist[cnt-1] + echo printf("Netrw Bookmark#%-2d: %s",cnt,g:netrw_bookmarklist[cnt-1]) let didwork = 1 let cnt = cnt + 1 endfor @@ -2476,14 +3293,14 @@ fun! s:NetrwBookHistHandler(chg,curdir) if g:netrw_dirhistmax > 0 while ( first || cnt != g:netrw_dirhist_cnt ) " call Decho("first=".first." cnt=".cnt." dirhist_cnt=".g:netrw_dirhist_cnt) - let histcnt= histcnt + 1 if exists("g:netrw_dirhist_{cnt}") " call Decho("Netrw History#".histcnt.": ".g:netrw_dirhist_{cnt}) - echo "Netrw History#".histcnt.": ".g:netrw_dirhist_{cnt} + echo printf("Netrw History#%-2d: %s",histcnt,g:netrw_dirhist_{cnt}) let didwork= 1 endif - let first = 0 - let cnt = ( cnt - 1 ) % g:netrw_dirhistmax + let histcnt = histcnt + 1 + let first = 0 + let cnt = ( cnt - 1 ) % g:netrw_dirhistmax if cnt < 0 let cnt= cnt + g:netrw_dirhistmax endif @@ -2510,7 +3327,7 @@ fun! s:NetrwBookHistHandler(chg,curdir) " u: change to the previous directory stored on the history list " call Decho("(user: ) chg to prev dir from history") if g:netrw_dirhistmax > 0 - let g:netrw_dirhist_cnt= ( g:netrw_dirhist_cnt - 1 ) % g:netrw_dirhistmax + let g:netrw_dirhist_cnt= ( g:netrw_dirhist_cnt - v:count1 ) % g:netrw_dirhistmax if g:netrw_dirhist_cnt < 0 let g:netrw_dirhist_cnt= g:netrw_dirhist_cnt + g:netrw_dirhistmax endif @@ -2531,7 +3348,7 @@ fun! s:NetrwBookHistHandler(chg,curdir) exe "keepj e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhist_cnt}) else if g:netrw_dirhistmax > 0 - let g:netrw_dirhist_cnt= ( g:netrw_dirhist_cnt + 1 ) % g:netrw_dirhistmax + let g:netrw_dirhist_cnt= ( g:netrw_dirhist_cnt + v:count1 ) % g:netrw_dirhistmax else let g:netrw_dirhist_cnt= 0 endif @@ -2573,12 +3390,18 @@ fun! s:NetrwBookHistHandler(chg,curdir) " call Decho("delete bookmark#".v:count."<".g:netrw_bookmarklist[v:count-1].">") let savefile= s:NetrwHome()."/.netrwbook" if filereadable(savefile) +" call Decho("merge bookmarks (active and file)") keepj call s:NetrwBookHistSave() " done here to merge bookmarks first +" call Decho("bookmark delete savefile<".savefile.">") keepj call delete(savefile) endif +" call Decho("remove g:netrw_bookmarklist[".(v:count-1)."]") keepj call remove(g:netrw_bookmarklist,v:count-1) +" call Decho("resulting g:netrw_bookmarklist=".string(g:netrw_bookmarklist)) endif call s:NetrwBookmarkMenu() + call s:NetrwTgtMenu() + let @@= ykeep " call Dret("s:NetrwBookHistHandler") endfun @@ -2587,23 +3410,29 @@ endfun " Sister function: s:NetrwBookHistSave() fun! s:NetrwBookHistRead() " call Dfunc("s:NetrwBookHistRead()") + if !exists("g:netrw_dirhistmax") || g:netrw_dirhistmax <= 0 +" " call Dret("s:NetrwBookHistRead - suppressed due to g:netrw_dirhistmax") + return + endif + let ykeep= @@ if !exists("s:netrw_initbookhist") let home = s:NetrwHome() let savefile= home."/.netrwbook" if filereadable(savefile) " call Decho("sourcing .netrwbook") - exe "keepj so ".savefile + exe "keepalt keepj so ".savefile endif if g:netrw_dirhistmax > 0 let savefile= home."/.netrwhist" if filereadable(savefile) " call Decho("sourcing .netrwhist") - exe "keepj so ".savefile + exe "keepalt keepj so ".savefile endif let s:netrw_initbookhist= 1 au VimLeave * call s:NetrwBookHistSave() endif endif + let @@= ykeep " call Dret("s:NetrwBookHistRead") endfun @@ -2614,7 +3443,7 @@ endfun " be unreliable for long-term storage fun! s:NetrwBookHistSave() " call Dfunc("s:NetrwBookHistSave() dirhistmax=".g:netrw_dirhistmax) - if g:netrw_dirhistmax <= 0 + if !exists("g:netrw_dirhistmax") || g:netrw_dirhistmax <= 0 " call Dret("s:NetrwBookHistSave : dirhistmax=".g:netrw_dirhistmax) return endif @@ -2622,14 +3451,14 @@ fun! s:NetrwBookHistSave() let savefile= s:NetrwHome()."/.netrwhist" 1split call s:NetrwEnew() - setlocal cino= com= cpo-=a cpo-=A fo=nroql2 tw=0 report=10000 noswf - setlocal nocin noai noci magic nospell nohid wig= noaw - setlocal ma noro write - if exists("&acd") | setlocal noacd | endif + setl cino= com= cpo-=a cpo-=A fo=nroql2 tw=0 report=10000 noswf + setl nocin noai noci magic nospell nohid wig= noaw + setl ma noro write + if exists("+acd") | setl noacd | endif sil! keepj keepalt %d " save .netrwhist -- no attempt to merge - sil! file .netrwhist + sil! keepalt file .netrwhist call setline(1,"let g:netrw_dirhistmax =".g:netrw_dirhistmax) call setline(2,"let g:netrw_dirhist_cnt =".g:netrw_dirhist_cnt) let lastline = line("$") @@ -2647,7 +3476,7 @@ fun! s:NetrwBookHistSave() if filereadable(savefile) let booklist= deepcopy(g:netrw_bookmarklist) - exe "sil keepj so ".savefile + exe "sil keepj keepalt so ".savefile for bdm in booklist if index(g:netrw_bookmarklist,bdm) == -1 call add(g:netrw_bookmarklist,bdm) @@ -2663,7 +3492,7 @@ fun! s:NetrwBookHistSave() endif let bgone= bufnr("%") q! - exe bgone."bwipe!" + exe "keepalt ".bgone."bwipe!" " call Dret("s:NetrwBookHistSave") endfun @@ -2676,13 +3505,13 @@ endfun fun! s:NetrwBrowse(islocal,dirname) if !exists("w:netrw_liststyle")|let w:netrw_liststyle= g:netrw_liststyle|endif " call Dfunc("s:NetrwBrowse(islocal=".a:islocal." dirname<".a:dirname.">) liststyle=".w:netrw_liststyle." ".g:loaded_netrw." buf#".bufnr("%")."<".bufname("%")."> win#".winnr()) -" call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")." modified=".&modified." modifiable=".&modifiable." readonly=".&readonly) -" call Dredir("ls!") +" call Decho("(NetrwBrowse) tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")." modified=".&modified." modifiable=".&modifiable." readonly=".&readonly) + " s:NetrwBrowse: initialize history {{{3 if !exists("s:netrw_initbookhist") keepj call s:NetrwBookHistRead() endif - " simplify the dirname (especially for ".."s in dirnames) + " s:NetrwBrowse: simplify the dirname (especially for ".."s in dirnames) {{{3 if a:dirname !~ '^\a\+://' let dirname= simplify(a:dirname) else @@ -2695,6 +3524,8 @@ fun! s:NetrwBrowse(islocal,dirname) " call Dret("s:NetrwBrowse : s:netrw_skipbrowse=".s:netrw_skipbrowse) return endif + + " s:NetrwBrowse: sanity checks: {{{3 if !exists("*shellescape") keepj call netrw#ErrorMsg(s:ERROR,"netrw can't run -- your vim is missing shellescape()",69) " call Dret("s:NetrwBrowse : missing shellescape()") @@ -2706,41 +3537,43 @@ fun! s:NetrwBrowse(islocal,dirname) return endif + " s:NetrwBrowse: save options: {{{3 call s:NetrwOptionSave("w:") - " re-instate any marked files + " s:NetrwBrowse: re-instate any marked files {{{3 if exists("s:netrwmarkfilelist_{bufnr('%')}") -" call Decho("clearing marked files") +" call Decho("(NetrwBrowse) clearing marked files") exe "2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/" endif if a:islocal && exists("w:netrw_acdkeep") && w:netrw_acdkeep -" call Decho("handle w:netrw_acdkeep:") -" call Decho("keepjumps lcd ".fnameescape(dirname)." (due to w:netrw_acdkeep=".w:netrw_acdkeep." - acd=".&acd.")") + " s:NetrwBrowse: set up "safe" options for local directory/file {{{3 +" call Decho("(NetrwBrowse) handle w:netrw_acdkeep:") +" call Decho("(NetrwBrowse) keepjumps lcd ".fnameescape(dirname)." (due to w:netrw_acdkeep=".w:netrw_acdkeep." - acd=".&acd.")") exe 'keepj lcd '.fnameescape(dirname) call s:NetrwSafeOptions() -" call Decho("getcwd<".getcwd().">") +" call Decho("(NetrwBrowse) getcwd<".getcwd().">") elseif !a:islocal && dirname !~ '[\/]$' && dirname !~ '^"' - " looks like a regular file, attempt transfer -" call Decho("attempt transfer as regular file<".dirname.">") + " s:NetrwBrowse: looks like a remote regular file, attempt transfer {{{3 +" call Decho("(NetrwBrowse) attempt transfer as regular file<".dirname.">") - " remove any filetype indicator from end of dirname, except for the {{{3 + " remove any filetype indicator from end of dirname, except for the " "this is a directory" indicator (/). " There shouldn't be one of those here, anyway. let path= substitute(dirname,'[*=@|]\r\=$','','e') -" call Decho("new path<".path.">") +" call Decho("(NetrwBrowse) new path<".path.">") call s:RemotePathAnalysis(dirname) - " remote-read the requested file into current buffer {{{3 + " s:NetrwBrowse: remote-read the requested file into current buffer {{{3 keepj mark ' call s:NetrwEnew(dirname) call s:NetrwSafeOptions() - setlocal ma noro -" call Decho("setlocal ma noro") + setl ma noro +" call Decho("(NetrwBrowse) setl ma noro") let b:netrw_curdir = dirname let url = s:method."://".s:user.s:machine.(s:port ? ":".s:port : "")."/".s:path -" call Decho("exe sil! keepalt file ".fnameescape(url)." (bt=".&bt.")") +" call Decho("(NetrwBrowse) exe sil! keepalt file ".fnameescape(url)." (bt=".&bt.")") exe "sil! keepj keepalt file ".fnameescape(url) exe "sil! keepj keepalt doau BufReadPre ".fnameescape(s:fname) sil call netrw#NetRead(2,url) @@ -2749,10 +3582,10 @@ fun! s:NetrwBrowse(islocal,dirname) exe "sil keepj keepalt doau BufReadPost ".fnameescape(s:fname) endif - " save certain window-oriented variables into buffer-oriented variables {{{3 + " s:NetrwBrowse: save certain window-oriented variables into buffer-oriented variables {{{3 call s:SetBufWinVars() call s:NetrwOptionRestore("w:") -" call Decho("setl ma nomod") +" call Decho("(NetrwBrowse) setl ma nomod") setl ma nomod " call Decho("(NetrwBrowse) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") @@ -2771,28 +3604,28 @@ fun! s:NetrwBrowse(islocal,dirname) " set up menu {{{3 keepj call s:NetrwMenu(1) - " set up buffer {{{3 + " get/set-up buffer {{{3 let reusing= s:NetrwGetBuffer(a:islocal,dirname) " maintain markfile highlighting if exists("s:netrwmarkfilemtch_{bufnr('%')}") && s:netrwmarkfilemtch_{bufnr("%")} != "" -" call Decho("bufnr(%)=".bufnr('%')) -" call Decho("exe 2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/") +" call Decho("(NetrwBrowse) bufnr(%)=".bufnr('%')) +" call Decho("(NetrwBrowse) exe 2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/") exe "2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/" else -" call Decho("2match none") +" call Decho("(NetrwBrowse) 2match none") 2match none endif - if reusing + if reusing && line("$") > 1 call s:NetrwOptionRestore("w:") " call Decho("(NetrwBrowse) setl noma nomod nowrap") setl noma nomod nowrap -" call Decho("(set noma nomod nowrap) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") +" call Decho("(NetrwBrowse) (set noma nomod nowrap) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") " call Dret("s:NetrwBrowse : re-using buffer") return endif " set b:netrw_curdir to the new directory name {{{3 -" call Decho("set b:netrw_curdir to the new directory name: (buf#".bufnr("%").")") +" call Decho("(NetrwBrowse) set b:netrw_curdir to the new directory name: (buf#".bufnr("%").")") let b:netrw_curdir= dirname if b:netrw_curdir =~ '[/\\]$' let b:netrw_curdir= substitute(b:netrw_curdir,'[/\\]$','','e') @@ -2810,21 +3643,21 @@ fun! s:NetrwBrowse(islocal,dirname) if !a:islocal && b:netrw_curdir !~ '/$' let b:netrw_curdir= b:netrw_curdir.'/' endif -" call Decho("b:netrw_curdir<".b:netrw_curdir.">") +" call Decho("(NetrwBrowse) b:netrw_curdir<".b:netrw_curdir.">") " ------------ " (local only) {{{3 " ------------ if a:islocal -" call Decho("local only:") +" call Decho("(NetrwBrowse) local only:") " Set up ShellCmdPost handling. Append current buffer to browselist call s:LocalFastBrowser() " handle g:netrw_keepdir: set vim's current directory to netrw's notion of the current directory {{{3 if !g:netrw_keepdir -" call Decho("handle g:netrw_keepdir=".g:netrw_keepdir.": getcwd<".getcwd()."> acd=".&acd) -" call Decho("l:acd".(exists("&l:acd")? "=".&l:acd : " doesn't exist")) +" call Decho("(NetrwBrowse) handle g:netrw_keepdir=".g:netrw_keepdir.": getcwd<".getcwd()."> acd=".&acd) +" call Decho("(NetrwBrowse) l:acd".(exists("&l:acd")? "=".&l:acd : " doesn't exist")) if !exists("&l:acd") || !&l:acd " call Decho('exe keepjumps lcd '.fnameescape(b:netrw_curdir)) try @@ -2850,23 +3683,23 @@ fun! s:NetrwBrowse(islocal,dirname) " remote handling: {{{3 " -------------------------------- else -" call Decho("remote only:") +" call Decho("(NetrwBrowse) remote only:") - " analyze dirname and g:netrw_list_cmd {{{4 -" call Decho("b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "doesn't exist")."> dirname<".dirname.">") + " analyze dirname and g:netrw_list_cmd {{{3 +" call Decho("(NetrwBrowse) b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "doesn't exist")."> dirname<".dirname.">") if dirname =~ "^NetrwTreeListing\>" let dirname= b:netrw_curdir -" call Decho("(dirname was ".dirname.") dirname<".dirname.">") +" call Decho("(NetrwBrowse) (dirname was ) dirname<".dirname.">") elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir") let dirname= substitute(b:netrw_curdir,'\\','/','g') if dirname !~ '/$' let dirname= dirname.'/' endif let b:netrw_curdir = dirname -" call Decho("(liststyle is TREELIST) dirname<".dirname.">") +" call Decho("(NetrwBrowse) (liststyle is TREELIST) dirname<".dirname.">") else let dirname = substitute(dirname,'\\','/','g') -" call Decho("(normal) dirname<".dirname.">") +" call Decho("(NetrwBrowse) (normal) dirname<".dirname.">") endif let dirpat = '^\(\w\{-}\)://\(\w\+@\)\=\([^/]\+\)/\(.*\)$' @@ -2882,7 +3715,7 @@ fun! s:NetrwBrowse(islocal,dirname) return endif let b:netrw_curdir= dirname -" call Decho("b:netrw_curdir<".b:netrw_curdir."> (remote)") +" call Decho("(NetrwBrowse) b:netrw_curdir<".b:netrw_curdir."> (remote)") endif " (additional remote handling) " ----------------------- @@ -2892,7 +3725,7 @@ fun! s:NetrwBrowse(islocal,dirname) keepj call s:PerformListing(a:islocal) if v:version >= 700 && has("balloon_eval") && &beval == 0 && &l:bexpr == "" && !exists("g:netrw_nobeval") let &l:bexpr= "netrw#NetrwBalloonHelp()" -" call Decho("set up balloon help: l:bexpr=".&l:bexpr) +" call Decho("(NetrwBrowse) set up balloon help: l:bexpr=".&l:bexpr) set beval endif call s:NetrwOptionRestore("w:") @@ -2914,6 +3747,7 @@ endfun " s:NetrwFileInfo: supports qf (query for file information) {{{2 fun! s:NetrwFileInfo(islocal,fname) " call Dfunc("s:NetrwFileInfo(islocal=".a:islocal." fname<".a:fname.">)") + let ykeep= @@ if a:islocal if (has("unix") || has("macunix")) && executable("/bin/ls") if exists("b:netrw_curdir") @@ -2943,6 +3777,7 @@ fun! s:NetrwFileInfo(islocal,fname) else echo "sorry, \"qf\" not supported yet for remote files" endif + let @@= ykeep " call Dret("s:NetrwFileInfo") endfun @@ -2952,38 +3787,40 @@ endfun " 1=re-used buffer fun! s:NetrwGetBuffer(islocal,dirname) " call Dfunc("s:NetrwGetBuffer(islocal=".a:islocal." dirname<".a:dirname.">) liststyle=".g:netrw_liststyle) +" call Decho("(NetrwGetBuffer) modiable=".&mod." modifiable=".&ma." readonly=".&ro) let dirname= a:dirname " re-use buffer if possible {{{3 -" call Decho("--re-use a buffer if possible--") +" call Decho("(NetrwGetBuffer) --re-use a buffer if possible--") if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST " find NetrwTreeList buffer if there is one -" call Decho("find NetrwTreeList buffer if there is one") +" call Decho("(NetrwGetBuffer) case liststyle=treelist: find NetrwTreeList buffer if there is one") if exists("w:netrw_treebufnr") && w:netrw_treebufnr > 0 -" call Decho(" re-use w:netrw_treebufnr=".w:netrw_treebufnr) +" call Decho("(NetrwGetBuffer) re-using w:netrw_treebufnr=".w:netrw_treebufnr) + setl mod + sil! keepj %d let eikeep= &ei set ei=all - exe "sil! b ".w:netrw_treebufnr + exe "sil! keepalt b ".w:netrw_treebufnr let &ei= eikeep -" call Dret("s:NetrwGetBuffer : bufnum#".w:netrw_treebufnr."") - return +" call Dret("s:NetrwGetBuffer 0 : bufnum#".w:netrw_treebufnr."") + return 0 endif let bufnum= -1 -" call Decho(" liststyle=TREE but w:netrw_treebufnr doesn't exist") +" call Decho("(NetrwGetBuffer) liststyle=TREE but w:netrw_treebufnr doesn't exist") else " find buffer number of buffer named precisely the same as dirname {{{3 -" call Decho("--find buffer numnber of buffer named precisely the same as dirname--") -" call Dredir("ls!") +" call Decho("(NetrwGetBuffer) case listtyle not treelist: find buffer numnber of buffer named precisely the same as dirname--") " get dirname and associated buffer number let bufnum = bufnr(escape(dirname,'\')) -" call Decho(" find buffer<".dirname.">'s number ") -" call Decho(" bufnr(dirname<".escape(dirname,'\').">)=".bufnum) +" call Decho("(NetrwGetBuffer) find buffer<".dirname.">'s number ") +" call Decho("(NetrwGetBuffer) bufnr(dirname<".escape(dirname,'\').">)=".bufnum) if bufnum < 0 && dirname !~ '/$' " try appending a trailing / -" call Decho(" try appending a trailing / to dirname<".dirname.">") +" call Decho("(NetrwGetBuffer) try appending a trailing / to dirname<".dirname.">") let bufnum= bufnr(escape(dirname.'/','\')) if bufnum > 0 let dirname= dirname.'/' @@ -2992,30 +3829,30 @@ fun! s:NetrwGetBuffer(islocal,dirname) if bufnum < 0 && dirname =~ '/$' " try removing a trailing / -" call Decho(" try removing a trailing / from dirname<".dirname.">") +" call Decho("(NetrwGetBuffer) try removing a trailing / from dirname<".dirname.">") let bufnum= bufnr(escape(substitute(dirname,'/$','',''),'\')) if bufnum > 0 let dirname= substitute(dirname,'/$','','') endif endif -" call Decho(" findbuf1: bufnum=bufnr('".dirname."')=".bufnum." bufname(".bufnum.")<".bufname(bufnum)."> (initial)") +" call Decho("(NetrwGetBuffer) findbuf1: bufnum=bufnr('".dirname."')=".bufnum." bufname(".bufnum.")<".bufname(bufnum)."> (initial)") " note: !~ was used just below, but that means using ../ to go back would match (ie. abc/def/ and abc/ matches) if bufnum > 0 && bufname(bufnum) != dirname && bufname(bufnum) != '.' " handle approximate matches -" call Decho(" handling approx match: bufnum#".bufnum."<".bufname(bufnum)."> approx-dirname<".dirname.">") +" call Decho("(NetrwGetBuffer) handling approx match: bufnum#".bufnum.">0 AND bufname<".bufname(bufnum).">!=dirname<".dirname."> AND bufname(".bufnum.")!='.'") let ibuf = 1 let buflast = bufnr("$") -" call Decho(" findbuf2: buflast=bufnr($)=".buflast) +" call Decho("(NetrwGetBuffer) findbuf2: buflast=bufnr($)=".buflast) while ibuf <= buflast let bname= substitute(bufname(ibuf),'\\','/','g') let bname= substitute(bname,'.\zs/$','','') -" call Decho(" findbuf3: while [ibuf=",ibuf."]<=[buflast=".buflast."]: dirname<".dirname."> bname=bufname(".ibuf.")<".bname.">") +" call Decho("(NetrwGetBuffer) findbuf3: while [ibuf=",ibuf."]<=[buflast=".buflast."]: dirname<".dirname."> bname=bufname(".ibuf.")<".bname.">") if bname != '' && dirname =~ '/'.bname.'/\=$' && dirname !~ '^/' " bname is not empty " dirname ends with bname, " dirname doesn't start with /, so its not a absolute path -" call Decho(" findbuf3a: passes test 1 : dirname<".dirname.'> =~ /'.bname.'/\=$ && dirname !~ ^/') +" call Decho("(NetrwGetBuffer) findbuf3a: passes test 1 : dirname<".dirname.'> =~ /'.bname.'/\=$ && dirname !~ ^/') break endif if bname =~ '^'.dirname.'/\=$' @@ -3038,74 +3875,80 @@ fun! s:NetrwGetBuffer(islocal,dirname) else let bufnum= ibuf endif -" call Decho(" findbuf4: bufnum=".bufnum." (ibuf=".ibuf." buflast=".buflast.")") +" call Decho("(NetrwGetBuffer) findbuf4: bufnum=".bufnum." (ibuf=".ibuf." buflast=".buflast.")") endif endif " get enew buffer and name it -or- re-use buffer {{{3 - sil! keepj mark ' +" call Decho("(NetrwGetBuffer) get enew buffer and name it OR re-use buffer") + sil! keepj keepalt mark ' if bufnum < 0 || !bufexists(bufnum) -" call Decho("--get enew buffer and name it (bufexists([bufnum=".bufnum."])=".bufexists(bufnum).")") +" call Decho("(NetrwGetBuffer) --get enew buffer and name it (bufnum#".bufnum."<0 OR bufexists(".bufnum.")=".bufexists(bufnum)."==0)") call s:NetrwEnew(dirname) -" call Decho(" got enew buffer#".bufnr("%")." (altbuf<".expand("#").">)") +" call Decho("(NetrwGetBuffer) got enew buffer#".bufnr("%")." (altbuf<".expand("#").">)") " name the buffer if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST " Got enew buffer; transform into a NetrwTreeListing -" call Decho("--transform enew buffer#".bufnr("%")." into a NetrwTreeListing --") +" call Decho("(NetrwGetBuffer) --transform enew buffer#".bufnr("%")." into a NetrwTreeListing --") if !exists("s:netrw_treelistnum") let s:netrw_treelistnum= 1 else let s:netrw_treelistnum= s:netrw_treelistnum + 1 endif let w:netrw_treebufnr= bufnr("%") -" call Decho(" exe sil! keepalt file NetrwTreeListing ".fnameescape(s:netrw_treelistnum)) +" call Decho("(NetrwGetBuffer) exe sil! keepalt file NetrwTreeListing ".fnameescape(s:netrw_treelistnum)) exe 'sil! keepalt file NetrwTreeListing\ '.fnameescape(s:netrw_treelistnum) set bt=nofile noswf nnoremap [ :sil call TreeListMove('[') nnoremap ] :sil call TreeListMove(']') nnoremap [[ :sil call TreeListMove('[') nnoremap ]] :sil call TreeListMove(']') -" call Decho(" tree listing#".s:netrw_treelistnum." bufnr=".w:netrw_treebufnr) +" call Decho("(NetrwGetBuffer) tree listing#".s:netrw_treelistnum." bufnr=".w:netrw_treebufnr) else " let v:errmsg= "" " Decho let escdirname= fnameescape(dirname) -" call Decho(" errmsg<".v:errmsg."> bufnr(escdirname<".escdirname.">)=".bufnr(escdirname)." bufname()<".bufname(bufnr(escdirname)).">") +" call Decho("(NetrwGetBuffer) errmsg<".v:errmsg."> bufnr(escdirname<".escdirname.">)=".bufnr(escdirname)." bufname()<".bufname(bufnr(escdirname)).">") " call Decho(' exe sil! keepalt file '.escdirname) " let v:errmsg= "" " Decho exe 'sil! keepalt file '.escdirname -" call Decho(" errmsg<".v:errmsg."> bufnr(".escdirname.")=".bufnr(escdirname)."<".bufname(bufnr(escdirname)).">") +" call Decho("(NetrwGetBuffer) errmsg<".v:errmsg."> bufnr(".escdirname.")=".bufnr(escdirname)."<".bufname(bufnr(escdirname)).">") endif -" call Decho(" named enew buffer#".bufnr("%")."<".bufname("%").">") +" call Decho("(NetrwGetBuffer) named enew buffer#".bufnr("%")."<".bufname("%").">") else " Re-use the buffer -" call Decho("--re-use buffer#".bufnum." (bufexists([bufnum=".bufnum."])=".bufexists(bufnum).")") +" call Decho("(NetrwGetBuffer) --re-use buffer#".bufnum." (bufnum#".bufnum.">=0 AND bufexists(".bufnum.")=".bufexists(bufnum)."!=0)") let eikeep= &ei set ei=all if getline(2) =~ '^" Netrw Directory Listing' -" call Decho(" re-use buffer#".bufnum."<".((bufnum > 0)? bufname(bufnum) : "")."> using: keepalt b ".bufnum) +" call Decho("(NetrwGetBuffer) getline(2)<".getline(2).'> matches "Netrw Directory Listing" : using keepalt b '.bufnum) exe "sil! keepalt b ".bufnum else -" call Decho(" reusing buffer#".bufnum."<".((bufnum > 0)? bufname(bufnum) : "")."> using: b ".bufnum) - exe "sil! b ".bufnum +" call Decho("(NetrwGetBuffer) getline(2)<".getline(2).'> does not match "Netrw Directory Listing" : using b '.bufnum) + exe "sil! keepalt b ".bufnum endif if bufname("%") == '.' -" call Decho("exe sil! keepalt file ".fnameescape(getcwd())) +" call Decho("(NetrwGetBuffer) exe sil! keepalt file ".fnameescape(getcwd())) exe "sil! keepalt file ".fnameescape(getcwd()) endif let &ei= eikeep if line("$") <= 1 keepj call s:NetrwListSettings(a:islocal) -" call Dret("s:NetrwGetBuffer 0 : re-using buffer#".bufnr("%").", but its empty, so refresh it") +" call Dret("s:NetrwGetBuffer 0 : re-using buffer#".bufnr("%").", but its empty, so refresh it") + return 0 + elseif g:netrw_fastbrowse == 0 || (a:islocal && g:netrw_fastbrowse == 1) + keepj call s:NetrwListSettings(a:islocal) + sil keepj %d +" call Dret("s:NetrwGetBuffer 0 : re-using buffer#".bufnr("%").", but refreshing due to g:netrw_fastbrowse=".g:netrw_fastbrowse) return 0 elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST -" call Decho("--re-use tree listing--") -" call Decho(" clear buffer<".expand("%")."> with :%d") +" call Decho("(NetrwGetBuffer) --re-use tree listing--") +" call Decho("(NetrwGetBuffer) clear buffer<".expand("%")."> with :%d") sil keepj %d keepj call s:NetrwListSettings(a:islocal) -" call Dret("s:NetrwGetBuffer 0 : re-using buffer#".bufnr("%").", but treelist mode always needs a refresh") +" call Dret("s:NetrwGetBuffer 0 : re-using buffer#".bufnr("%").", but treelist mode always needs a refresh") return 0 else -" call Dret("s:NetrwGetBuffer 1 : buf#".bufnr("%")) +" call Dret("s:NetrwGetBuffer 1 : buf#".bufnr("%")) return 1 endif endif @@ -3115,18 +3958,18 @@ fun! s:NetrwGetBuffer(islocal,dirname) " slow 0 D D Deleting a buffer implies it will not be re-used (slow) " med 1 D H " fast 2 H H -" call Decho("--do netrw settings: make this buffer#".bufnr("%")." not-a-file, modifiable, not line-numbered, etc--") +" call Decho("(NetrwGetBuffer) --do netrw settings: make this buffer#".bufnr("%")." not-a-file, modifiable, not line-numbered, etc--") let fname= expand("%") keepj call s:NetrwListSettings(a:islocal) -" call Decho("exe sil! keepalt file ".fnameescape(fname)) +" call Decho("(NetrwGetBuffer) exe sil! keepalt file ".fnameescape(fname)) exe "sil! keepj keepalt file ".fnameescape(fname) " delete all lines from buffer {{{3 -" call Decho("--delete all lines from buffer--") -" call Decho(" clear buffer<".expand("%")."> with :%d") +" call Decho("(NetrwGetBuffer) --delete all lines from buffer--") +" call Decho("(NetrwGetBuffer) clear buffer<".expand("%")."> with :%d") sil! keepalt keepj %d -" call Dret("s:NetrwGetBuffer 0 : tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> modified=".&modified." modifiable=".&modifiable." readonly=".&readonly) +" call Dret("s:NetrwGetBuffer 0 : tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> modified=".&modified." modifiable=".&modifiable." readonly=".&readonly) return 0 endfun @@ -3258,21 +4101,20 @@ endfun fun! s:NetrwListSettings(islocal) " call Dfunc("s:NetrwListSettings(islocal=".a:islocal.")") let fname= bufname("%") -" call Decho("setlocal bt=nofile nobl ma nonu nowrap noro") - setlocal bt=nofile nobl ma nonu nowrap noro -" call Decho("exe sil! keepalt file ".fnameescape(fname)) +" call Decho("(NetrwListSettings) setl bt=nofile nobl ma nonu nowrap noro") + setl bt=nofile nobl ma nonu nowrap noro +" call Decho("(NetrwListSettings) exe sil! keepalt file ".fnameescape(fname)) exe "sil! keepalt file ".fnameescape(fname) if g:netrw_use_noswf - setlocal noswf + setl noswf endif -" call Dredir("ls!") -" call Decho("exe setlocal ts=".g:netrw_maxfilenamelen) - exe "setlocal ts=".g:netrw_maxfilenamelen - setlocal isk+=.,~,- +" call Decho("(NetrwListSettings) exe setl ts=".(g:netrw_maxfilenamelen+1)) + exe "setl ts=".(g:netrw_maxfilenamelen+1) + setl isk+=.,~,- if g:netrw_fastbrowse > a:islocal - setlocal bh=hide + setl bh=hide else - setlocal bh=delete + setl bh=delete endif " call Dret("s:NetrwListSettings") endfun @@ -3283,6 +4125,7 @@ endfun " =1: local browsing fun! s:NetrwListStyle(islocal) " call Dfunc("NetrwListStyle(islocal=".a:islocal.") w:netrw_liststyle=".w:netrw_liststyle) + let ykeep = @@ let fname = s:NetrwGetWord() if !exists("w:netrw_liststyle")|let w:netrw_liststyle= g:netrw_liststyle|endif let w:netrw_liststyle = (w:netrw_liststyle + 1) % s:MAXLIST @@ -3315,8 +4158,8 @@ fun! s:NetrwListStyle(islocal) let w:netrw_liststyle = g:netrw_liststyle let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge') endif - setlocal ma noro -" call Decho("setlocal ma noro") + setl ma noro +" call Decho("setl ma noro") " clear buffer - this will cause NetrwBrowse/LocalBrowseCheck to do a refresh " call Decho("clear buffer<".expand("%")."> with :%d") @@ -3340,6 +4183,7 @@ fun! s:NetrwListStyle(islocal) if result <= 0 && exists("w:netrw_bannercnt") exe "sil! keepj ".w:netrw_bannercnt endif + let @@= ykeep " call Dret("NetrwListStyle".(exists("w:netrw_liststyle")? ' : w:netrw_liststyle='.w:netrw_liststyle : "")) endfun @@ -3349,6 +4193,7 @@ endfun fun! s:NetrwBannerCtrl(islocal) " call Dfunc("s:NetrwBannerCtrl(islocal=".a:islocal.") g:netrw_banner=".g:netrw_banner) + let ykeep= @@ " toggle the banner (enable/suppress) let g:netrw_banner= !g:netrw_banner @@ -3364,6 +4209,7 @@ fun! s:NetrwBannerCtrl(islocal) if result <= 0 && exists("w:netrw_bannercnt") exe "keepj ".w:netrw_bannercnt endif + let @@= ykeep " call Dret("s:NetrwBannerCtrl : g:netrw_banner=".g:netrw_banner) endfun @@ -3390,17 +4236,17 @@ fun! s:NetrwBookmarkMenu() endif " show bookmarked places - if exists("g:netrw_bookmarklist") && g:netrw_bookmarklist != [] + if exists("g:netrw_bookmarklist") && g:netrw_bookmarklist != [] && g:netrw_dirhistmax > 0 let cnt= 1 for bmd in g:netrw_bookmarklist -" call Decho('sil! menu '.g:NetrwMenuPriority.".2.".cnt." ".g:NetrwTopLvlMenu.'Bookmark.'.bmd.' :e '.bmd) - let bmd= escape(bmd,g:netrw_menu_escape) + let ebmd= escape(bmd,g:netrw_menu_escape) +" call Decho('sil! menu '.g:NetrwMenuPriority.".2.".cnt." ".g:NetrwTopLvlMenu.'Bookmark.'.ebmd.' :e '.bmd) " show bookmarks for goto menu - exe 'sil! menu '.g:NetrwMenuPriority.".2.".cnt." ".g:NetrwTopLvlMenu.'Bookmarks.'.bmd.' :e '.bmd."\" + exe 'sil! menu '.g:NetrwMenuPriority.".2.".cnt." ".g:NetrwTopLvlMenu.'Bookmarks.'.ebmd.' :e '.bmd."\" " show bookmarks for deletion menu - exe 'sil! menu '.g:NetrwMenuPriority.".8.2.".cnt." ".g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Bookmark\ Delete.'.bmd.' '.cnt."mB" + exe 'sil! menu '.g:NetrwMenuPriority.".8.2.".cnt." ".g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Bookmark\ Delete.'.ebmd.' '.cnt."mB" let cnt= cnt + 1 endfor @@ -3439,16 +4285,18 @@ endfun fun! s:NetrwBrowseChgDir(islocal,newdir,...) " call Dfunc("s:NetrwBrowseChgDir(islocal=".a:islocal."> newdir<".a:newdir.">) a:0=".a:0." curpos<".string(getpos("."))."> b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "").">") + let ykeep= @@ if !exists("b:netrw_curdir") " Don't try to change-directory: this can happen, for example, when netrw#ErrorMsg has been called " and the current window is the NetrwMessage window. + let @@= ykeep " call Decho("(NetrwBrowseChgDir) b:netrw_curdir doesn't exist!") " call Decho("(NetrwBrowseChgDir) getcwd<".getcwd().">") -" call Dredir("ls!") " call Dret("s:NetrwBrowseChgDir") return endif + " NetrwBrowseChgDir: save options and initialize {{{3 keepj call s:NetrwOptionSave("s:") keepj call s:NetrwSafeOptions() let nbcd_curpos = netrw#NetrwSavePosn() @@ -3474,19 +4322,19 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...) " apparently vim is "recognizing" that it is in a directory and " is removing the trailing "/". Bad idea, so let's put it back. let dirname= dirname.'/' -" call Decho("adjusting dirname<".dirname.">") +" call Decho("(NetrwBrowseChgDir) adjusting dirname<".dirname.">") endif if newdir !~ dirpat - " ------------ - " edit a file: - " ------------ -" call Decho('(NetrwBrowseChgDir) case "handling a file": newdir<'.newdir.'> !~ dirpat<'.dirpat.">") + " ------------------------------ + " NetrwBrowseChgDir: edit a file {{{3 + " ------------------------------ +" call Decho('(NetrwBrowseChgDir:edit-a-file) case "handling a file": newdir<'.newdir.'> !~ dirpat<'.dirpat.">") - " save position for benefit of Rexplore - let s:rexposn_{bufnr("%")}= netrw#NetrwSavePosn() + " save position for benefit of Rexplore + let s:rexposn_{bufnr("%")}= netrw#NetrwSavePosn() -" call Decho("(NetrwBrowseChgDir) setting s:rexposn_".bufnr("%")." to SavePosn") +" call Decho("(NetrwBrowseChgDir:edit-a-file) setting s:rexposn_".bufnr("%")." to SavePosn") if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") && newdir !~ '^\(/\|\a:\)' let dirname= s:NetrwTreeDir() if dirname =~ '/$' @@ -3494,43 +4342,49 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...) else let dirname= s:NetrwTreeDir()."/".newdir endif -" call Decho("(NetrwBrowseChgDir) dirname<".dirname.">") -" call Decho("(NetrwBrowseChgDir) tree listing") +" call Decho("(NetrwBrowseChgDir:edit-a-file) dirname<".dirname.">") +" call Decho("(NetrwBrowseChgDir:edit-a-file) tree listing") elseif newdir =~ '^\(/\|\a:\)' let dirname= newdir else let dirname= s:ComposePath(dirname,newdir) endif -" call Decho("(NetrwBrowseChgDir) handling a file: dirname<".dirname."> (a:0=".a:0.")") +" call Decho("(NetrwBrowseChgDir:edit-a-file) handling a file: dirname<".dirname."> (a:0=".a:0.")") " this lets NetrwBrowseX avoid the edit if a:0 < 1 -" call Decho("(NetrwBrowseChgDir) set up windows for editing<".fnameescape(dirname)."> didsplit=".(exists("s:didsplit")? s:didsplit : "doesn't exist")) +" call Decho("(NetrwBrowseChgDir:edit-a-file) set up windows for editing<".fnameescape(dirname)."> didsplit=".(exists("s:didsplit")? s:didsplit : "doesn't exist")) keepj call s:NetrwOptionRestore("s:") if !exists("s:didsplit") +" call Decho("(NetrwBrowseChgDir:edit-a-file) s:didsplit does not exist; g:netrw_browse_split=".g:netrw_browse_split." win#".winnr()) if g:netrw_browse_split == 1 - new + " horizontally splitting the window first + keepalt new if !&ea - wincmd _ + keepalt wincmd _ endif elseif g:netrw_browse_split == 2 - rightb vert new + " vertically splitting the window first + keepalt rightb vert new if !&ea - wincmd | + keepalt wincmd | endif elseif g:netrw_browse_split == 3 - tabnew + " open file in new tab + keepalt tabnew elseif g:netrw_browse_split == 4 + " act like "P" (ie. open previous window) if s:NetrwPrevWinOpen(2) == 3 + let @@= ykeep " call Dret("s:NetrwBrowseChgDir") return endif else " handling a file, didn't split, so remove menu -" call Decho("(NetrwBrowseChgDir) handling a file+didn't split, so remove menu") +" call Decho("(NetrwBrowseChgDir:edit-a-file) handling a file+didn't split, so remove menu") call s:NetrwMenu(0) " optional change to window if g:netrw_chgwin >= 1 - exe "keepjumps ".g:netrw_chgwin."wincmd w" + exe "keepj keepalt ".g:netrw_chgwin."wincmd w" endif endif endif @@ -3538,10 +4392,11 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...) " the point where netrw actually edits the (local) file " if its local only: LocalBrowseCheck() doesn't edit a file, but NetrwBrowse() will if a:islocal -" call Decho("(NetrwBrowseChgDir) edit local file: exe e! ".fnameescape(dirname)) - exe "e! ".fnameescape(dirname) +" call Decho("(NetrwBrowseChgDir:edit-a-file) edit local file: exe e! ".fnameescape(dirname)) + exe "keepj keepalt e! ".fnameescape(dirname) + call s:NetrwCursor() else -" call Decho("(NetrwBrowseChgDir) remote file: NetrwBrowse will edit it") +" call Decho("(NetrwBrowseChgDir:edit-a-file) remote file: NetrwBrowse will edit it") endif let dolockout= 1 @@ -3550,12 +4405,12 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...) " or as a list of function references. It will ignore anything that's not " a function reference. See :help Funcref for information about function references. if exists("g:Netrw_funcref") -" call Decho("(NetrwBrowseChgDir) handle optional Funcrefs") +" call Decho("(NetrwBrowseChgDir:edit-a-file) handle optional Funcrefs") if type(g:Netrw_funcref) == 2 -" call Decho("(NetrwBrowseChgDir) handling a g:Netrw_funcref") +" call Decho("(NetrwBrowseChgDir:edit-a-file) handling a g:Netrw_funcref") keepj call g:Netrw_funcref() elseif type(g:Netrw_funcref) == 3 -" call Decho("(NetrwBrowseChgDir) handling a list of g:Netrw_funcrefs") +" call Decho("(NetrwBrowseChgDir:edit-a-file) handling a list of g:Netrw_funcrefs") for Fncref in g:Netrw_funcref if type(FncRef) == 2 keepj call FncRef() @@ -3566,49 +4421,49 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...) endif elseif newdir =~ '^/' - " --------------------------------- - " just go to the new directory spec - " --------------------------------- -" call Decho('(NetrwBrowseChgDir) case "just go to new directory spec": newdir<'.newdir.'>') - let dirname= newdir + " ---------------------------------------------------- + " NetrwBrowseChgDir: just go to the new directory spec {{{3 + " ---------------------------------------------------- +" call Decho('(NetrwBrowseChgDir:goto-newdir) case "just go to new directory spec": newdir<'.newdir.'>') + let dirname = newdir keepj call s:SetRexDir(a:islocal,dirname) keepj call s:NetrwOptionRestore("s:") elseif newdir == './' - " -------------------------- - " refresh the directory list - " -------------------------- -" call Decho('(NetrwBrowseChgDir) case "refresh directory listing": newdir == "./"') + " --------------------------------------------- + " NetrwBrowseChgDir: refresh the directory list {{{3 + " --------------------------------------------- +" call Decho('(NetrwBrowseChgDir:refresh-dirlist) case "refresh directory listing": newdir == "./"') keepj call s:SetRexDir(a:islocal,dirname) elseif newdir == '../' - " ------------------- - " go up one directory - " ------------------- -" call Decho('(NetrwBrowseChgDir) case "go up one directory": newdir == "../"') + " -------------------------------------- + " NetrwBrowseChgDir: go up one directory {{{3 + " -------------------------------------- +" call Decho('(NetrwBrowseChgDir:go-up) case "go up one directory": newdir == "../"') if w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") " force a refresh -" call Decho("(NetrwBrowseChgDir) clear buffer<".expand("%")."> with :%d") -" call Decho("(NetrwBrowseChgDir) setl noro ma") +" call Decho("(NetrwBrowseChgDir:go-up) clear buffer<".expand("%")."> with :%d") +" call Decho("(NetrwBrowseChgDir:go-up) setl noro ma") setl noro ma keepj %d endif if has("amiga") " amiga -" call Decho('(NetrwBrowseChgDir) case "go up one directory": newdir == "../" and amiga') +" call Decho('(NetrwBrowseChgDir:go-up) case "go up one directory": newdir == "../" and amiga') if a:islocal let dirname= substitute(dirname,'^\(.*[/:]\)\([^/]\+$\)','\1','') let dirname= substitute(dirname,'/$','','') else let dirname= substitute(dirname,'^\(.*[/:]\)\([^/]\+/$\)','\1','') endif -" call Decho("(NetrwBrowseChgDir) amiga: dirname<".dirname."> (go up one dir)") +" call Decho("(NetrwBrowseChgDir:go-up) amiga: dirname<".dirname."> (go up one dir)") else " unix or cygwin -" call Decho('(NetrwBrowseChgDir) case "go up one directory": newdir == "../" and unix or cygwin') +" call Decho('(NetrwBrowseChgDir:go-up) case "go up one directory": newdir == "../" and unix or cygwin') if a:islocal let dirname= substitute(dirname,'^\(.*\)/\([^/]\+\)/$','\1','') if dirname == "" @@ -3617,14 +4472,17 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...) else let dirname= substitute(dirname,'^\(\a\+://.\{-}/\{1,2}\)\(.\{-}\)\([^/]\+\)/$','\1\2','') endif -" call Decho("(NetrwBrowseChgDir) unix: dirname<".dirname."> (go up one dir)") +" call Decho("(NetrwBrowseChgDir:go-up) unix: dirname<".dirname."> (go up one dir)") endif keepj call s:SetRexDir(a:islocal,dirname) elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") -" call Decho('(NetrwBrowseChgDir) case liststyle is TREELIST and w:netrw_treedict exists') + " -------------------------------------- + " NetrwBrowseChgDir: Handle Tree Listing {{{3 + " -------------------------------------- +" call Decho('(NetrwBrowseChgDir:tree-list) case liststyle is TREELIST and w:netrw_treedict exists') " force a refresh (for TREELIST, wait for NetrwTreeDir() to force the refresh) -" call Decho("(NetrwBrowseChgDir) setl noro ma") +" call Decho("(NetrwBrowseChgDir) (treelist) setl noro ma") setl noro ma if !(exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir")) " call Decho("(NetrwBrowseChgDir) clear buffer<".expand("%")."> with :%d") @@ -3633,24 +4491,24 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...) let treedir = s:NetrwTreeDir() let s:treecurpos = nbcd_curpos let haskey= 0 -" call Decho("(NetrwBrowseChgDir) w:netrw_treedict<".string(w:netrw_treedict).">") +" call Decho("(NetrwBrowseChgDir:tree-list) w:netrw_treedict<".string(w:netrw_treedict).">") " search treedict for tree dir as-is if has_key(w:netrw_treedict,treedir) -" call Decho('(NetrwBrowseChgDir) ....searched for treedir<'.treedir.'> : found it!') +" call Decho('(NetrwBrowseChgDir:tree-list) ....searched for treedir<'.treedir.'> : found it!') let haskey= 1 else -" call Decho('(NetrwBrowseChgDir) ....searched for treedir<'.treedir.'> : not found') +" call Decho('(NetrwBrowseChgDir:tree-list) ....searched for treedir<'.treedir.'> : not found') endif " search treedict for treedir with a / appended if !haskey && treedir !~ '/$' if has_key(w:netrw_treedict,treedir."/") let treedir= treedir."/" -" call Decho('(NetrwBrowseChgDir) ....searched.for treedir<'.treedir.'> found it!') +" call Decho('(NetrwBrowseChgDir:tree-list) ....searched.for treedir<'.treedir.'> found it!') let haskey = 1 else -" call Decho('(NetrwBrowseChgDir) ....searched for treedir<'.treedir.'/> : not found') +" call Decho('(NetrwBrowseChgDir:tree-list) ....searched for treedir<'.treedir.'/> : not found') endif endif @@ -3658,16 +4516,16 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...) if !haskey && treedir =~ '/$' let treedir= substitute(treedir,'/$','','') if has_key(w:netrw_treedict,treedir) -" call Decho('(NetrwBrowseChgDir) ....searched.for treedir<'.treedir.'> found it!') +" call Decho('(NetrwBrowseChgDir:tree-list) ....searched.for treedir<'.treedir.'> found it!') let haskey = 1 else -" call Decho('(NetrwBrowseChgDir) ....searched for treedir<'.treedir.'> : not found') +" call Decho('(NetrwBrowseChgDir:tree-list) ....searched for treedir<'.treedir.'> : not found') endif endif if haskey " close tree listing for selected subdirectory -" call Decho("(NetrwBrowseChgDir) closing selected subdirectory<".dirname.">") +" call Decho("(NetrwBrowseChgDir:tree-list) closing selected subdirectory<".dirname.">") call remove(w:netrw_treedict,treedir) " call Decho("(NetrwBrowseChgDir) removed entry<".treedir."> from treedict") " call Decho("(NetrwBrowseChgDir) yielding treedict<".string(w:netrw_treedict).">") @@ -3675,33 +4533,39 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...) else " go down one directory let dirname= substitute(treedir,'/*$','/','') -" call Decho("(NetrwBrowseChgDir) go down one dir: treedir<".treedir.">") +" call Decho("(NetrwBrowseChgDir:tree-list) go down one dir: treedir<".treedir.">") endif keepj call s:SetRexDir(a:islocal,dirname) let s:treeforceredraw = 1 else - " go down one directory - let dirname= s:ComposePath(dirname,newdir) -" call Decho("(NetrwBrowseChgDir) go down one dir: dirname<".dirname."> newdir<".newdir.">") + " ---------------------------------------- + " NetrwBrowseChgDir: Go down one directory {{{3 + " ---------------------------------------- + let dirname = s:ComposePath(dirname,newdir) +" call Decho("(NetrwBrowseChgDir:go-down) go down one dir: dirname<".dirname."> newdir<".newdir.">") keepj call s:SetRexDir(a:islocal,dirname) endif + " -------------------------------------- + " NetrwBrowseChgDir: Restore and Cleanup {{{3 + " -------------------------------------- keepj call s:NetrwOptionRestore("s:") if dolockout -" call Decho("(NetrwBrowseChgDir) filewritable(dirname<".dirname.">)=".filewritable(dirname)) +" call Decho("(NetrwBrowseChgDir:restore) filewritable(dirname<".dirname.">)=".filewritable(dirname)) if filewritable(dirname) -" call Decho("(NetrwBrowseChgDir) doing modification lockout settings: ma nomod noro") -" call Decho("(NetrwBrowseChgDir) setl ma nomod noro") +" call Decho("(NetrwBrowseChgDir:restore) doing modification lockout settings: ma nomod noro") +" call Decho("(NetrwBrowseChgDir:restore) setl ma nomod noro") setl ma nomod noro -" call Decho("(NetrwBrowseChgDir) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") +" call Decho("(NetrwBrowseChgDir:restore) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") else -" call Decho("(NetrwBrowseChgDir) doing modification lockout settings: ma nomod ro") -" call Decho("(NetrwBrowseChgDir) setl ma nomod noro") +" call Decho("(NetrwBrowseChgDir:restore) doing modification lockout settings: ma nomod ro") +" call Decho("(NetrwBrowseChgDir:restore) setl ma nomod noro") setl ma nomod ro -" call Decho("(NetrwBrowseChgDir) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") +" call Decho("(NetrwBrowseChgDir:restore) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") endif endif + let @@= ykeep " call Dret("s:NetrwBrowseChgDir <".dirname."> : curpos<".string(getpos(".")).">") return dirname @@ -3714,6 +4578,9 @@ endfun fun! netrw#NetrwBrowseX(fname,remote) " call Dfunc("NetrwBrowseX(fname<".a:fname."> remote=".a:remote.")") + let ykeep = @@ + let screenposn = netrw#NetrwSavePosn() + " special core dump handler if a:fname =~ '/core\(\.\d\+\)\=$' if exists("g:Netrw_corehandler") @@ -3721,7 +4588,7 @@ fun! netrw#NetrwBrowseX(fname,remote) " g:Netrw_corehandler is a function reference (see :help Funcref) " call Decho("g:Netrw_corehandler is a funcref") call g:Netrw_corehandler(a:fname) - elseif type(g:Netrw_corehandler) == 3) + elseif type(g:Netrw_corehandler) == 3 " g:Netrw_corehandler is a List of function references (see :help Funcref) " call Decho("g:Netrw_corehandler is a List") for Fncref in g:Netrw_corehandler @@ -3730,6 +4597,8 @@ fun! netrw#NetrwBrowseX(fname,remote) endif endfor endif + call netrw#NetrwRestorePosn(screenposn) + let @@= ykeep " call Dret("NetrwBrowseX : coredump handler invoked") return endif @@ -3747,7 +4616,7 @@ fun! netrw#NetrwBrowseX(fname,remote) " gnome-open's subsidiary display tools are largely absent. Kde systems " usually have "kdeinit" running, though... (tnx Mikolaj Machowski) if !exists("s:haskdeinit") - if has("unix") + if has("unix") && executable("ps") && !has("win32unix") let s:haskdeinit= system("ps -e") =~ 'kdeinit' if v:shell_error let s:haskdeinit = 0 @@ -3760,12 +4629,12 @@ fun! netrw#NetrwBrowseX(fname,remote) if a:remote == 1 " create a local copy -" call Decho("a:remote=".a:remote.": create a local copy of <".a:fname.">") - setlocal bh=delete +" call Decho("(remote) a:remote=".a:remote.": create a local copy of <".a:fname.">") + setl bh=delete call netrw#NetRead(3,a:fname) " attempt to rename tempfile let basename= substitute(a:fname,'^\(.*\)/\(.*\)\.\([^.]*\)$','\2','') - let newname= substitute(s:netrw_tmpfile,'^\(.*\)/\(.*\)\.\([^.]*\)$','\1/'.basename.'.\3','') + let newname = substitute(s:netrw_tmpfile,'^\(.*\)/\(.*\)\.\([^.]*\)$','\1/'.basename.'.\3','') " call Decho("basename<".basename.">") " call Decho("newname <".newname.">") if rename(s:netrw_tmpfile,newname) == 0 @@ -3776,6 +4645,7 @@ fun! netrw#NetrwBrowseX(fname,remote) let fname= s:netrw_tmpfile endif else +" call Decho("(local) a:remote=".a:remote.": handling local copy of <".a:fname.">") let fname= a:fname " special ~ handler for local if fname =~ '^\~' && expand("$HOME") != "" @@ -3784,603 +4654,181 @@ fun! netrw#NetrwBrowseX(fname,remote) endif endif " call Decho("fname<".fname.">") -" call Decho("exten<".exten."> "."netrwFileHandlers#NFH_".exten."():exists=".exists("*netrwFileHandlers#NFH_".exten)) - - " set up redirection - if &srr =~ "%s" - if (has("win32") || has("win95") || has("win64") || has("win16")) - let redir= substitute(&srr,"%s","nul","") - else - let redir= substitute(&srr,"%s","/dev/null","") - endif - elseif (has("win32") || has("win95") || has("win64") || has("win16")) - let redir= &srr . "nul" - else - let redir= &srr . "/dev/null" - endif -" call Decho("redir{".redir."} srr{".&srr."}") - - " extract any viewing options. Assumes that they're set apart by quotes. - if exists("g:netrw_browsex_viewer") -" call Decho("g:netrw_browsex_viewer<".g:netrw_browsex_viewer.">") - if g:netrw_browsex_viewer =~ '\s' - let viewer = substitute(g:netrw_browsex_viewer,'\s.*$','','') - let viewopt = substitute(g:netrw_browsex_viewer,'^\S\+\s*','','')." " - let oviewer = '' - let cnt = 1 - while !executable(viewer) && viewer != oviewer - let viewer = substitute(g:netrw_browsex_viewer,'^\(\(^\S\+\s\+\)\{'.cnt.'}\S\+\)\(.*\)$','\1','') - let viewopt = substitute(g:netrw_browsex_viewer,'^\(\(^\S\+\s\+\)\{'.cnt.'}\S\+\)\(.*\)$','\3','')." " - let cnt = cnt + 1 - let oviewer = viewer -" call Decho("!exe: viewer<".viewer."> viewopt<".viewopt.">") - endwhile - else - let viewer = g:netrw_browsex_viewer - let viewopt = "" - endif -" call Decho("viewer<".viewer."> viewopt<".viewopt.">") - endif - - " execute the file handler - if exists("g:netrw_browsex_viewer") && g:netrw_browsex_viewer == '-' -" call Decho("g:netrw_browsex_viewer<".g:netrw_browsex_viewer.">") - let ret= netrwFileHandlers#Invoke(exten,fname) - - elseif exists("g:netrw_browsex_viewer") && executable(viewer) -" call Decho("g:netrw_browsex_viewer<".g:netrw_browsex_viewer.">") -" call Decho("exe sil !".viewer." ".viewopt.shellescape(fname,1).redir) - exe "sil !".viewer." ".viewopt.shellescape(fname,1).redir - let ret= v:shell_error - - elseif has("win32") || has("win64") - if executable("start") -" call Decho('exe sil !start rundll32 url.dll,FileProtocolHandler '.shellescape(fname,1)) - exe 'sil !start rundll32 url.dll,FileProtocolHandler '.shellescape(fname,1) - elseif executable("rundll32") -" call Decho('exe sil !rundll32 url.dll,FileProtocolHandler '.shellescape(fname,1)) - exe 'sil !rundll32 url.dll,FileProtocolHandler '.shellescape(fname,1) - else - call netrw#ErrorMsg(s:WARNING,"rundll32 not on path",74) - endif - call inputsave()|call input("Press to continue")|call inputrestore() - let ret= v:shell_error - - elseif has("unix") && executable("gnome-open") && !s:haskdeinit -" call Decho("exe sil !gnome-open ".shellescape(fname,1)." ".redir) - exe "sil !gnome-open ".shellescape(fname,1).redir - let ret= v:shell_error - - elseif has("unix") && executable("kfmclient") && s:haskdeinit -" call Decho("exe sil !kfmclient exec ".shellescape(fname,1)." ".redir) - exe "sil !kfmclient exec ".shellescape(fname,1)." ".redir - let ret= v:shell_error - - elseif has("macunix") && executable("open") -" call Decho("exe sil !open ".shellescape(fname,1)." ".redir) - exe "sil !open ".shellescape(fname,1)." ".redir - let ret= v:shell_error - - else - " netrwFileHandlers#Invoke() always returns 0 - let ret= netrwFileHandlers#Invoke(exten,fname) - endif - - " if unsuccessful, attempt netrwFileHandlers#Invoke() - if ret - let ret= netrwFileHandlers#Invoke(exten,fname) - endif - - " restoring redraw! after external file handlers - redraw! - - " cleanup: remove temporary file, - " delete current buffer if success with handler, - " return to prior buffer (directory listing) - " Feb 12, 2008: had to de-activiate removal of - " temporary file because it wasn't getting seen. -" if a:remote == 1 && fname != a:fname -" call Decho("deleting temporary file<".fname.">") -" call s:NetrwDelete(fname) -" endif - - if a:remote == 1 - setlocal bh=delete bt=nofile - if g:netrw_use_noswf - setlocal noswf - endif - exe "sil! keepj norm! \" -" redraw! - endif - -" call Dret("NetrwBrowseX") -endfun - -" --------------------------------------------------------------------- -" s:NetrwChgPerm: (implements "gp") change file permission {{{2 -fun! s:NetrwChgPerm(islocal,curdir) -" call Dfunc("s:NetrwChgPerm(islocal=".a:islocal." curdir<".a:curdir.">)") - call inputsave() - let newperm= input("Enter new permission: ") - call inputrestore() - let chgperm= substitute(g:netrw_chgperm,'\',shellescape(expand("")),'') - let chgperm= substitute(chgperm,'\',shellescape(newperm),'') -" call Decho("chgperm<".chgperm.">") - call system(chgperm) - if v:shell_error != 0 - keepj call netrw#ErrorMsg(1,"changing permission on file<".expand("")."> seems to have failed",75) - endif - if a:islocal - keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) - endif -" call Dret("s:NetrwChgPerm") -endfun - -" --------------------------------------------------------------------- -" s:NetrwClearExplore: clear explore variables (if any) {{{2 -fun! s:NetrwClearExplore() -" call Dfunc("s:NetrwClearExplore()") - 2match none - if exists("s:explore_match") |unlet s:explore_match |endif - if exists("s:explore_indx") |unlet s:explore_indx |endif - if exists("s:netrw_explore_prvdir") |unlet s:netrw_explore_prvdir |endif - if exists("s:dirstarstar") |unlet s:dirstarstar |endif - if exists("s:explore_prvdir") |unlet s:explore_prvdir |endif - if exists("w:netrw_explore_indx") |unlet w:netrw_explore_indx |endif - if exists("w:netrw_explore_listlen")|unlet w:netrw_explore_listlen|endif - if exists("w:netrw_explore_list") |unlet w:netrw_explore_list |endif - if exists("w:netrw_explore_bufnr") |unlet w:netrw_explore_bufnr |endif -" redraw! - echo " " - echo " " -" call Dret("s:NetrwClearExplore") -endfun - -" --------------------------------------------------------------------- -" netrw#Explore: launch the local browser in the directory of the current file {{{2 -" indx: == -1: Nexplore -" == -2: Pexplore -" == +: this is overloaded: -" * If Nexplore/Pexplore is in use, then this refers to the -" indx'th item in the w:netrw_explore_list[] of items which -" matched the */pattern **/pattern *//pattern **//pattern -" * If Hexplore or Vexplore, then this will override -" g:netrw_winsize to specify the qty of rows or columns the -" newly split window should have. -" dosplit==0: the window will be split iff the current file has been modified -" dosplit==1: the window will be split before running the local browser -" style == 0: Explore style == 1: Explore! -" == 2: Hexplore style == 3: Hexplore! -" == 4: Vexplore style == 5: Vexplore! -" == 6: Texplore -fun! netrw#Explore(indx,dosplit,style,...) -" call Dfunc("netrw#Explore(indx=".a:indx." dosplit=".a:dosplit." style=".a:style.",a:1<".a:1.">) &modified=".&modified." modifiable=".&modifiable." a:0=".a:0." win#".winnr()." buf#".bufnr("%")) - if !exists("b:netrw_curdir") - let b:netrw_curdir= getcwd() -" call Decho("set b:netrw_curdir<".b:netrw_curdir."> (used getcwd)") - endif - let curdir = simplify(b:netrw_curdir) - let curfiledir = substitute(expand("%:p"),'^\(.*[/\\]\)[^/\\]*$','\1','e') -" call Decho("curdir<".curdir."> curfiledir<".curfiledir.">") - - " save registers - sil! let keepregstar = @* - sil! let keepregplus = @+ - sil! let keepregslash= @/ - - " if dosplit or file has been modified - if a:dosplit || &modified || a:style == 6 -" call Decho("case dosplit=".a:dosplit." modified=".&modified." a:style=".a:style.": dosplit or file has been modified") - call s:SaveWinVars() - let winsz= g:netrw_winsize - if a:indx > 0 - let winsz= a:indx - endif - - if a:style == 0 " Explore, Sexplore -" call Decho("style=0: Explore or Sexplore") - let winsz= (winsz > 0)? (winsz*winheight(0))/100 : -winsz - exe winsz."wincmd s" - - elseif a:style == 1 "Explore!, Sexplore! -" call Decho("style=1: Explore! or Sexplore!") - let winsz= (winsz > 0)? (winsz*winwidth(0))/100 : -winsz - exe winsz."wincmd v" - - elseif a:style == 2 " Hexplore -" call Decho("style=2: Hexplore") - let winsz= (winsz > 0)? (winsz*winheight(0))/100 : -winsz - exe "bel ".winsz."wincmd s" - - elseif a:style == 3 " Hexplore! -" call Decho("style=3: Hexplore!") - let winsz= (winsz > 0)? (winsz*winheight(0))/100 : -winsz - exe "abo ".winsz."wincmd s" - - elseif a:style == 4 " Vexplore -" call Decho("style=4: Vexplore") - let winsz= (winsz > 0)? (winsz*winwidth(0))/100 : -winsz - exe "lefta ".winsz."wincmd v" - - elseif a:style == 5 " Vexplore! -" call Decho("style=5: Vexplore!") - let winsz= (winsz > 0)? (winsz*winwidth(0))/100 : -winsz - exe "rightb ".winsz."wincmd v" - - elseif a:style == 6 " Texplore - call s:SaveBufVars() -" call Decho("style = 6: Texplore") - exe "tabnew ".fnameescape(curdir) - call s:RestoreBufVars() - endif - call s:RestoreWinVars() -" else " Decho -" call Decho("case a:dosplit=".a:dosplit." AND modified=".&modified." AND a:style=".a:style." is not 6") - endif - keepj norm! 0 - - if a:0 > 0 -" call Decho("case [a:0=".a:0."] > 0") - if a:1 =~ '^\~' && (has("unix") || (exists("g:netrw_cygwin") && g:netrw_cygwin)) -" call Decho("..case a:1<".a:1.">: starts with ~ and unix or cygwin") - let dirname= simplify(substitute(a:1,'\~',expand("$HOME"),'')) -" call Decho("..using dirname<".dirname."> (case: ~ && unix||cygwin)") - elseif a:1 == '.' -" call Decho("..case a:1<".a:1.">: matches .") - let dirname= simplify(exists("b:netrw_curdir")? b:netrw_curdir : getcwd()) - if dirname !~ '/$' - let dirname= dirname."/" - endif -" call Decho("..using dirname<".dirname."> (case: ".(exists("b:netrw_curdir")? "b:netrw_curdir" : "getcwd()").")") - elseif a:1 =~ '\$' -" call Decho("..case a:1<".a:1.">: matches ending $") - let dirname= simplify(expand(a:1)) -" call Decho("..using user-specified dirname<".dirname."> with $env-var") - elseif a:1 !~ '^\*\{1,2}/' -" call Decho("..case a:1<".a:1.">: other, not pattern or filepattern") - let dirname= simplify(a:1) -" call Decho("..using user-specified dirname<".dirname.">") - else -" call Decho("..case a:1: pattern or filepattern") - let dirname= a:1 - endif - else - " clear explore -" call Decho("case a:0=".a:0.": clearing Explore list") - call s:NetrwClearExplore() -" call Dret("netrw#Explore : cleared list") - return - endif - -" call Decho("dirname<".dirname.">") - if dirname =~ '\.\./\=$' - let dirname= simplify(fnamemodify(dirname,':p:h')) - elseif dirname =~ '\.\.' || dirname == '.' - let dirname= simplify(fnamemodify(dirname,':p')) - endif -" call Decho("dirname<".dirname."> (after simplify)") - - if dirname =~ '^\*//' - " starpat=1: Explore *//pattern (current directory only search for files containing pattern) -" call Decho("case Explore *//pattern") - let pattern= substitute(dirname,'^\*//\(.*\)$','\1','') - let starpat= 1 -" call Decho("..Explore *//pat: (starpat=".starpat.") dirname<".dirname."> -> pattern<".pattern.">") - if &hls | let keepregslash= s:ExplorePatHls(pattern) | endif - - elseif dirname =~ '^\*\*//' - " starpat=2: Explore **//pattern (recursive descent search for files containing pattern) -" call Decho("case Explore **//pattern") - let pattern= substitute(dirname,'^\*\*//','','') - let starpat= 2 -" call Decho("..Explore **//pat: (starpat=".starpat.") dirname<".dirname."> -> pattern<".pattern.">") +" call Decho("exten<".exten."> "."netrwFileHandlers#NFH_".exten."():exists=".exists("*netrwFileHandlers#NFH_".exten)) - elseif dirname =~ '/\*\*/' - " handle .../**/.../filepat -" call Decho("case Explore .../**/.../filepat") - let prefixdir= substitute(dirname,'^\(.\{-}\)\*\*.*$','\1','') - if prefixdir =~ '^/' || (prefixdir =~ '^\a:/' && (has("win32") || has("win95") || has("win64") || has("win16"))) - let b:netrw_curdir = prefixdir + " set up redirection + if &srr =~ "%s" + if (has("win32") || has("win95") || has("win64") || has("win16")) + let redir= substitute(&srr,"%s","nul","") else - let b:netrw_curdir= getcwd().'/'.prefixdir + let redir= substitute(&srr,"%s","/dev/null","") endif - let dirname= substitute(dirname,'^.\{-}\(\*\*/.*\)$','\1','') - let starpat= 4; -" call Decho("..pwd<".getcwd()."> dirname<".dirname.">") -" call Decho("..case Explore ../**/../filepat (starpat=".starpat.")") - - elseif dirname =~ '^\*/' - " starpat=3: Explore */filepat (search in current directory for filenames matching filepat) - let starpat= 3 -" call Decho("case Explore */filepat (starpat=".starpat.")") - - elseif dirname=~ '^\*\*/' - " starpat=4: Explore **/filepat (recursive descent search for filenames matching filepat) - let starpat= 4 -" call Decho("case Explore **/filepat (starpat=".starpat.")") - + elseif (has("win32") || has("win95") || has("win64") || has("win16")) + let redir= &srr . "nul" else - let starpat= 0 -" call Decho("default case: starpat=".starpat) + let redir= &srr . "/dev/null" endif +" call Decho("set up redirection: redir{".redir."} srr{".&srr."}") - if starpat == 0 && a:indx >= 0 - " [Explore Hexplore Vexplore Sexplore] [dirname] -" call Decho("case starpat==0 && a:indx=".a:indx.": dirname<".dirname."> Explore Hexplore Vexplore Sexplore") - if dirname == "" - let dirname= curfiledir -" call Decho("..empty dirname, using current file's directory<".dirname.">") - endif - if dirname =~ '^scp:' || dirname =~ '^ftp:' -" call Decho("..calling NetrwBrowse(0,dirname<".dirname.">)") - call s:NetrwBrowse(0,dirname) + " extract any viewing options. Assumes that they're set apart by quotes. +" call Decho("extract any viewing options") + if exists("g:netrw_browsex_viewer") +" call Decho("g:netrw_browsex_viewer<".g:netrw_browsex_viewer.">") + if g:netrw_browsex_viewer =~ '\s' + let viewer = substitute(g:netrw_browsex_viewer,'\s.*$','','') + let viewopt = substitute(g:netrw_browsex_viewer,'^\S\+\s*','','')." " + let oviewer = '' + let cnt = 1 + while !executable(viewer) && viewer != oviewer + let viewer = substitute(g:netrw_browsex_viewer,'^\(\(^\S\+\s\+\)\{'.cnt.'}\S\+\)\(.*\)$','\1','') + let viewopt = substitute(g:netrw_browsex_viewer,'^\(\(^\S\+\s\+\)\{'.cnt.'}\S\+\)\(.*\)$','\3','')." " + let cnt = cnt + 1 + let oviewer = viewer +" call Decho("!exe: viewer<".viewer."> viewopt<".viewopt.">") + endwhile else - if dirname == ""|let dirname= getcwd()|endif -" call Decho("..calling LocalBrowseCheck(dirname<".dirname.">)") - call netrw#LocalBrowseCheck(dirname) -" call Decho("win#".winnr()." buf#".bufnr("%")." modified=".&modified." modifiable=".&modifiable." readonly=".&readonly) + let viewer = g:netrw_browsex_viewer + let viewopt = "" endif +" call Decho("viewer<".viewer."> viewopt<".viewopt.">") + endif + + " execute the file handler +" call Decho("execute the file handler (if any)") + if exists("g:netrw_browsex_viewer") && g:netrw_browsex_viewer == '-' +" call Decho("g:netrw_browsex_viewer<".g:netrw_browsex_viewer.">") + let ret= netrwFileHandlers#Invoke(exten,fname) + + elseif exists("g:netrw_browsex_viewer") && executable(viewer) +" call Decho("g:netrw_browsex_viewer<".g:netrw_browsex_viewer.">") +" call Decho("exe sil !".viewer." ".viewopt.shellescape(fname,1).redir) + exe "sil !".viewer." ".viewopt.shellescape(fname,1).redir + let ret= v:shell_error -" call Decho("curdir<".curdir.">") - if has("win32") || has("win95") || has("win64") || has("win16") - keepj call search('\<'.substitute(curdir,'^.*[/\\]','','e').'\>','cW') + elseif has("win32") || has("win64") +" call Decho("windows") + if executable("start") +" call Decho('exe sil !start rundll32 url.dll,FileProtocolHandler '.shellescape(fname,1)) + exe 'sil !start rundll32 url.dll,FileProtocolHandler '.shellescape(fname,1) + elseif executable("rundll32") +" call Decho('exe sil !rundll32 url.dll,FileProtocolHandler '.shellescape(fname,1)) + exe 'sil !rundll32 url.dll,FileProtocolHandler '.shellescape(fname,1) else - keepj call search('\<'.substitute(curdir,'^.*/','','e').'\>','cW') + call netrw#ErrorMsg(s:WARNING,"rundll32 not on path",74) endif + call inputsave()|call input("Press to continue")|call inputrestore() + let ret= v:shell_error - " starpat=1: Explore *//pattern (current directory only search for files containing pattern) - " starpat=2: Explore **//pattern (recursive descent search for files containing pattern) - " starpat=3: Explore */filepat (search in current directory for filenames matching filepat) - " starpat=4: Explore **/filepat (recursive descent search for filenames matching filepat) - elseif a:indx <= 0 - " Nexplore, Pexplore, Explore: handle starpat -" call Decho("case a:indx<=0: Nexplore, Pexplore, , starpat=".starpat." a:indx=".a:indx) - if !mapcheck("","n") && !mapcheck("","n") && exists("b:netrw_curdir") -" call Decho("..set up and maps") - let s:didstarstar= 1 - nnoremap :Pexplore - nnoremap :Nexplore + elseif has("win32unix") + let winfname= 'c:\cygwin'.substitute(fname,'/','\\','g') +" call Decho("cygwin: winfname<".shellescape(winfname,1).">") + if executable("start") +" call Decho('exe sil !start rundll32 url.dll,FileProtocolHandler '.shellescape(winfname,1)) + exe 'sil !start rundll32 url.dll,FileProtocolHandler '.shellescape(winfname,1) + elseif executable("rundll32") +" call Decho('exe sil !rundll32 url.dll,FileProtocolHandler '.shellescape(winfname,1)) + exe 'sil !rundll32 url.dll,FileProtocolHandler '.shellescape(winfname,1) + else + call netrw#ErrorMsg(s:WARNING,"rundll32 not on path",74) endif + call inputsave()|call input("Press to continue")|call inputrestore() + let ret= v:shell_error - if has("path_extra") -" call Decho("..starpat=".starpat.": has +path_extra") - if !exists("w:netrw_explore_indx") - let w:netrw_explore_indx= 0 - endif - - let indx = a:indx -" call Decho("..starpat=".starpat.": set indx= [a:indx=".indx."]") - - if indx == -1 - " Nexplore -" call Decho("..case Nexplore with starpat=".starpat.": (indx=".indx.")") - if !exists("w:netrw_explore_list") " sanity check - keepj call netrw#ErrorMsg(s:WARNING,"using Nexplore or improperly; see help for netrw-starstar",40) - sil! let @* = keepregstar - sil! let @+ = keepregstar - sil! let @/ = keepregslash -" call Dret("netrw#Explore") - return - endif - let indx= w:netrw_explore_indx - if indx < 0 | let indx= 0 | endif - if indx >= w:netrw_explore_listlen | let indx= w:netrw_explore_listlen - 1 | endif - let curfile= w:netrw_explore_list[indx] -" call Decho("....indx=".indx." curfile<".curfile.">") - while indx < w:netrw_explore_listlen && curfile == w:netrw_explore_list[indx] - let indx= indx + 1 -" call Decho("....indx=".indx." (Nexplore while loop)") - endwhile - if indx >= w:netrw_explore_listlen | let indx= w:netrw_explore_listlen - 1 | endif -" call Decho("....Nexplore: indx= [w:netrw_explore_indx=".w:netrw_explore_indx."]=".indx) - - elseif indx == -2 - " Pexplore -" call Decho("case Pexplore with starpat=".starpat.": (indx=".indx.")") - if !exists("w:netrw_explore_list") " sanity check - keepj call netrw#ErrorMsg(s:WARNING,"using Pexplore or improperly; see help for netrw-starstar",41) - sil! let @* = keepregstar - sil! let @+ = keepregstar - sil! let @/ = keepregslash -" call Dret("netrw#Explore") - return - endif - let indx= w:netrw_explore_indx - if indx < 0 | let indx= 0 | endif - if indx >= w:netrw_explore_listlen | let indx= w:netrw_explore_listlen - 1 | endif - let curfile= w:netrw_explore_list[indx] -" call Decho("....indx=".indx." curfile<".curfile.">") - while indx >= 0 && curfile == w:netrw_explore_list[indx] - let indx= indx - 1 -" call Decho("....indx=".indx." (Pexplore while loop)") - endwhile - if indx < 0 | let indx= 0 | endif -" call Decho("....Pexplore: indx= [w:netrw_explore_indx=".w:netrw_explore_indx."]=".indx) - - else - " Explore -- initialize - " build list of files to Explore with Nexplore/Pexplore -" call Decho("..starpat=".starpat.": case Explore: initialize (indx=".indx.")") - keepj call s:NetrwClearExplore() - let w:netrw_explore_indx= 0 - if !exists("b:netrw_curdir") - let b:netrw_curdir= getcwd() - endif -" call Decho("....starpat=".starpat.": b:netrw_curdir<".b:netrw_curdir.">") - - " switch on starpat to build the w:netrw_explore_list of files - if starpat == 1 - " starpat=1: Explore *//pattern (current directory only search for files containing pattern) -" call Decho("..case starpat=".starpat.": build *//pattern list (curdir-only srch for files containing pattern) &hls=".&hls) -" call Decho("....pattern<".pattern.">") - try - exe "keepj noautocmd vimgrep /".pattern."/gj ".fnameescape(b:netrw_curdir)."/*" - catch /^Vim\%((\a\+)\)\=:E480/ - call netrw#ErrorMsg(s:WARNING,"no match with pattern<".pattern.">",76) -" call Dret("netrw#Explore : unable to find pattern<".pattern.">") - return - endtry - let w:netrw_explore_list = s:NetrwExploreListUniq(map(getqflist(),'bufname(v:val.bufnr)')) - if &hls | let keepregslash= s:ExplorePatHls(pattern) | endif - - elseif starpat == 2 - " starpat=2: Explore **//pattern (recursive descent search for files containing pattern) -" call Decho("..case starpat=".starpat.": build **//pattern list (recursive descent files containing pattern)") -" call Decho("....pattern<".pattern.">") - try - exe "sil keepj noautocmd vimgrep /".pattern."/gj "."**/*" - catch /^Vim\%((\a\+)\)\=:E480/ - call netrw#ErrorMsg(s:WARNING,'no files matched pattern<'.pattern.'>',45) - if &hls | let keepregslash= s:ExplorePatHls(pattern) | endif - sil! let @* = keepregstar - sil! let @+ = keepregstar - sil! let @/ = keepregslash -" call Dret("netrw#Explore : no files matched pattern") - return - endtry - let s:netrw_curdir = b:netrw_curdir - let w:netrw_explore_list = getqflist() - let w:netrw_explore_list = s:NetrwExploreListUniq(map(w:netrw_explore_list,'s:netrw_curdir."/".bufname(v:val.bufnr)')) - if &hls | let keepregslash= s:ExplorePatHls(pattern) | endif - - elseif starpat == 3 - " starpat=3: Explore */filepat (search in current directory for filenames matching filepat) -" call Decho("..case starpat=".starpat.": build */filepat list (curdir-only srch filenames matching filepat) &hls=".&hls) - let filepat= substitute(dirname,'^\*/','','') - let filepat= substitute(filepat,'^[%#<]','\\&','') -" call Decho("....b:netrw_curdir<".b:netrw_curdir.">") -" call Decho("....filepat<".filepat.">") - let w:netrw_explore_list= s:NetrwExploreListUniq(split(expand(b:netrw_curdir."/".filepat),'\n')) - if &hls | let keepregslash= s:ExplorePatHls(filepat) | endif - - elseif starpat == 4 - " starpat=4: Explore **/filepat (recursive descent search for filenames matching filepat) -" call Decho("..case starpat=".starpat.": build **/filepat list (recursive descent srch filenames matching filepat) &hls=".&hls) - let w:netrw_explore_list= s:NetrwExploreListUniq(split(expand(b:netrw_curdir."/".dirname),'\n')) - if &hls | let keepregslash= s:ExplorePatHls(dirname) | endif - endif " switch on starpat to build w:netrw_explore_list - - let w:netrw_explore_listlen = len(w:netrw_explore_list) -" call Decho("....w:netrw_explore_list<".string(w:netrw_explore_list).">") -" call Decho("....w:netrw_explore_listlen=".w:netrw_explore_listlen) - - if w:netrw_explore_listlen == 0 || (w:netrw_explore_listlen == 1 && w:netrw_explore_list[0] =~ '\*\*\/') - keepj call netrw#ErrorMsg(s:WARNING,"no files matched",42) - sil! let @* = keepregstar - sil! let @+ = keepregstar - sil! let @/ = keepregslash -" call Dret("netrw#Explore : no files matched") - return - endif - endif " if indx ... endif + elseif has("unix") && executable("xdg-open") && !s:haskdeinit +" call Decho("unix and xdg-open") +" call Decho("exe sil !xdg-open ".shellescape(fname,1)." ".redir) + exe "sil !xdg-open ".shellescape(fname,1).redir + let ret= v:shell_error - " NetrwStatusLine support - for exploring support - let w:netrw_explore_indx= indx -" call Decho("....w:netrw_explore_list<".join(w:netrw_explore_list,',')."> len=".w:netrw_explore_listlen) + elseif has("unix") && executable("kfmclient") && s:haskdeinit +" call Decho("unix and kfmclient") +" call Decho("exe sil !kfmclient exec ".shellescape(fname,1)." ".redir) + exe "sil !kfmclient exec ".shellescape(fname,1)." ".redir + let ret= v:shell_error - " wrap the indx around, but issue a note - if indx >= w:netrw_explore_listlen || indx < 0 -" call Decho("....wrap indx (indx=".indx." listlen=".w:netrw_explore_listlen.")") - let indx = (indx < 0)? ( w:netrw_explore_listlen - 1 ) : 0 - let w:netrw_explore_indx= indx - keepj call netrw#ErrorMsg(s:NOTE,"no more files match Explore pattern",43) - endif + elseif has("macunix") && executable("open") +" call Decho("macunix and open") +" call Decho("exe sil !open ".shellescape(fname,1)." ".redir) + exe "sil !open ".shellescape(fname,1)." ".redir + let ret= v:shell_error - exe "let dirfile= w:netrw_explore_list[".indx."]" -" call Decho("....dirfile=w:netrw_explore_list[indx=".indx."]= <".dirfile.">") - let newdir= substitute(dirfile,'/[^/]*$','','e') -" call Decho("....newdir<".newdir.">") + else + " netrwFileHandlers#Invoke() always returns 0 + let ret= netrwFileHandlers#Invoke(exten,fname) + endif -" call Decho("....calling LocalBrowseCheck(newdir<".newdir.">)") - call netrw#LocalBrowseCheck(newdir) - if !exists("w:netrw_liststyle") - let w:netrw_liststyle= g:netrw_liststyle - endif - if w:netrw_liststyle == s:THINLIST || w:netrw_liststyle == s:LONGLIST - keepj call search('^'.substitute(dirfile,"^.*/","","").'\>',"W") - else - keepj call search('\<'.substitute(dirfile,"^.*/","","").'\>',"w") - endif - let w:netrw_explore_mtchcnt = indx + 1 - let w:netrw_explore_bufnr = bufnr("%") - let w:netrw_explore_line = line(".") - keepj call s:SetupNetrwStatusLine('%f %h%m%r%=%9*%{NetrwStatusLine()}') -" call Decho("....explore: mtchcnt=".w:netrw_explore_mtchcnt." bufnr=".w:netrw_explore_bufnr." line#".w:netrw_explore_line) + " if unsuccessful, attempt netrwFileHandlers#Invoke() + if ret + let ret= netrwFileHandlers#Invoke(exten,fname) + endif - else -" call Decho("..your vim does not have +path_extra") - if !exists("g:netrw_quiet") - keepj call netrw#ErrorMsg(s:WARNING,"your vim needs the +path_extra feature for Exploring with **!",44) - endif - sil! let @* = keepregstar - sil! let @+ = keepregstar - sil! let @/ = keepregslash -" call Dret("netrw#Explore : missing +path_extra") - return - endif + " restoring redraw! after external file handlers + redraw! - else -" call Decho("..default case: Explore newdir<".dirname.">") - if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && dirname =~ '/' - sil! unlet w:netrw_treedict - sil! unlet w:netrw_treetop - endif - let newdir= dirname - if !exists("b:netrw_curdir") - keepj call netrw#LocalBrowseCheck(getcwd()) - else - keepj call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,newdir)) + " cleanup: remove temporary file, + " delete current buffer if success with handler, + " return to prior buffer (directory listing) + " Feb 12, 2008: had to de-activiate removal of + " temporary file because it wasn't getting seen. +" if a:remote == 1 && fname != a:fname +"" call Decho("deleting temporary file<".fname.">") +" call s:NetrwDelete(fname) +" endif + + if a:remote == 1 + setl bh=delete bt=nofile + if g:netrw_use_noswf + setl noswf endif + exe "sil! keepj norm! \" +" redraw! endif + call netrw#NetrwRestorePosn(screenposn) + let @@= ykeep - " visual display of **/ **// */ Exploration files -" call Decho("w:netrw_explore_indx=".(exists("w:netrw_explore_indx")? w:netrw_explore_indx : "doesn't exist")) -" call Decho("b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "n/a").">") - if exists("w:netrw_explore_indx") && exists("b:netrw_curdir") -" call Decho("s:explore_prvdir<".(exists("s:explore_prvdir")? s:explore_prvdir : "-doesn't exist-")) - if !exists("s:explore_prvdir") || s:explore_prvdir != b:netrw_curdir - " only update match list if current directory isn't the same as before -" call Decho("only update match list if current directory not the same as before") - let s:explore_prvdir = b:netrw_curdir - let s:explore_match = "" - let dirlen = s:Strlen(b:netrw_curdir) - if b:netrw_curdir !~ '/$' - let dirlen= dirlen + 1 - endif - let prvfname= "" - for fname in w:netrw_explore_list -" call Decho("fname<".fname.">") - if fname =~ '^'.b:netrw_curdir - if s:explore_match == "" - let s:explore_match= '\<'.escape(strpart(fname,dirlen),g:netrw_markfileesc).'\>' - else - let s:explore_match= s:explore_match.'\|\<'.escape(strpart(fname,dirlen),g:netrw_markfileesc).'\>' - endif - elseif fname !~ '^/' && fname != prvfname - if s:explore_match == "" - let s:explore_match= '\<'.escape(fname,g:netrw_markfileesc).'\>' - else - let s:explore_match= s:explore_match.'\|\<'.escape(fname,g:netrw_markfileesc).'\>' - endif - endif - let prvfname= fname - endfor -" call Decho("explore_match<".s:explore_match.">") - exe "2match netrwMarkFile /".s:explore_match."/" - endif - echo "==Pexplore ==Nexplore" - else - 2match none - if exists("s:explore_match") | unlet s:explore_match | endif - if exists("s:explore_prvdir") | unlet s:explore_prvdir | endif - echo " " -" call Decho("cleared explore match list") +" call Dret("NetrwBrowseX") +endfun + +" --------------------------------------------------------------------- +" s:NetrwChgPerm: (implements "gp") change file permission {{{2 +fun! s:NetrwChgPerm(islocal,curdir) +" call Dfunc("s:NetrwChgPerm(islocal=".a:islocal." curdir<".a:curdir.">)") + let ykeep = @@ + call inputsave() + let newperm= input("Enter new permission: ") + call inputrestore() + let chgperm= substitute(g:netrw_chgperm,'\',shellescape(expand("")),'') + let chgperm= substitute(chgperm,'\',shellescape(newperm),'') +" call Decho("chgperm<".chgperm.">") + call system(chgperm) + if v:shell_error != 0 + keepj call netrw#ErrorMsg(1,"changing permission on file<".expand("")."> seems to have failed",75) + endif + if a:islocal + keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) endif + let @@= ykeep +" call Dret("s:NetrwChgPerm") +endfun - sil! let @* = keepregstar - sil! let @+ = keepregstar - sil! let @/ = keepregslash -" call Dret("netrw#Explore : @/<".@/.">") +" --------------------------------------------------------------------- +" s:NetrwClearExplore: clear explore variables (if any) {{{2 +fun! s:NetrwClearExplore() +" call Dfunc("s:NetrwClearExplore()") + 2match none + if exists("s:explore_match") |unlet s:explore_match |endif + if exists("s:explore_indx") |unlet s:explore_indx |endif + if exists("s:netrw_explore_prvdir") |unlet s:netrw_explore_prvdir |endif + if exists("s:dirstarstar") |unlet s:dirstarstar |endif + if exists("s:explore_prvdir") |unlet s:explore_prvdir |endif + if exists("w:netrw_explore_indx") |unlet w:netrw_explore_indx |endif + if exists("w:netrw_explore_listlen")|unlet w:netrw_explore_listlen|endif + if exists("w:netrw_explore_list") |unlet w:netrw_explore_list |endif + if exists("w:netrw_explore_bufnr") |unlet w:netrw_explore_bufnr |endif +" redraw! + echo " " + echo " " +" call Dret("s:NetrwClearExplore") endfun " --------------------------------------------------------------------- @@ -4405,6 +4853,7 @@ endfun " s:NetrwForceChgDir: (gd support) Force treatment as a directory {{{2 fun! s:NetrwForceChgDir(islocal,newdir) " call Dfunc("s:NetrwForceChgDir(islocal=".a:islocal." newdir<".a:newdir.">)") + let ykeep= @@ if a:newdir !~ '/$' " ok, looks like force is needed to get directory-style treatment if a:newdir =~ '@$' @@ -4419,21 +4868,26 @@ fun! s:NetrwForceChgDir(islocal,newdir) " should already be getting treatment as a directory let newdir= a:newdir endif - call s:NetrwBrowseChgDir(a:islocal,newdir) + let newdir= s:NetrwBrowseChgDir(a:islocal,newdir) call s:NetrwBrowse(a:islocal,newdir) + let @@= ykeep " call Dret("s:NetrwForceChgDir") endfun " --------------------------------------------------------------------- " s:NetrwForceFile: (gf support) Force treatment as a file {{{2 fun! s:NetrwForceFile(islocal,newfile) -" " call Dfunc("s:NetrwForceFile(islocal=".a:islocal." newdir<".a:newdir.">)") +" call Dfunc("s:NetrwForceFile(islocal=".a:islocal." newdir<".a:newfile.">)") if a:newfile =~ '[/@*=|\\]$' let newfile= substitute(a:newfile,'.$','','') else let newfile= a:newfile endif - call s:NetrwBrowseChgDir(a:islocal,newfile) + if a:islocal + call s:NetrwBrowseChgDir(a:islocal,newfile) + else + call s:NetrwBrowse(a:islocal,s:NetrwBrowseChgDir(a:islocal,newfile)) + endif " call Dret("s:NetrwForceFile") endfun @@ -4446,6 +4900,7 @@ endfun " 2: show hidden files only fun! s:NetrwHide(islocal) " call Dfunc("NetrwHide(islocal=".a:islocal.") g:netrw_hide=".g:netrw_hide) + let ykeep= @@ let svpos= netrw#NetrwSavePosn() if exists("s:netrwmarkfilelist_{bufnr('%')}") @@ -4454,7 +4909,7 @@ fun! s:NetrwHide(islocal) " hide the files in the markfile list for fname in s:netrwmarkfilelist_{bufnr("%")} -" call Decho("match(g:netrw_list_hide<".g:netrw_list_hide.'> fname<\<'.fname.'\>>)='.match(g:netrw_list_hide,'\<'.fname.'\>')." isk=".&isk) +" call Decho("match(g:netrw_list_hide<".g:netrw_list_hide.'> fname<\<'.fname.'\>>)='.match(g:netrw_list_hide,'\<'.fname.'\>')." l:isk=".&l:isk) if match(g:netrw_list_hide,'\<'.fname.'\>') != -1 " remove fname from hiding list let g:netrw_list_hide= substitute(g:netrw_list_hide,'..\<'.escape(fname,g:netrw_fname_escape).'\>..','','') @@ -4481,6 +4936,7 @@ fun! s:NetrwHide(islocal) exe "keepj norm! 0" if g:netrw_hide && g:netrw_list_hide == "" keepj call netrw#ErrorMsg(s:WARNING,"your hiding list is empty!",49) + let @@= ykeep " call Dret("NetrwHide") return endif @@ -4488,6 +4944,7 @@ fun! s:NetrwHide(islocal) keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) keepj call netrw#NetrwRestorePosn(svpos) + let @@= ykeep " call Dret("NetrwHide") endfun @@ -4495,6 +4952,7 @@ endfun " s:NetrwHidden: invoked by "gh" {{{2 fun! s:NetrwHidden(islocal) " call Dfunc("s:NetrwHidden()") + let ykeep= @@ " save current position let svpos= netrw#NetrwSavePosn() @@ -4510,6 +4968,7 @@ fun! s:NetrwHidden(islocal) " refresh screen and return to saved position keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) keepj call netrw#NetrwRestorePosn(svpos) + let @@= ykeep " call Dret("s:NetrwHidden") endfun @@ -4537,7 +4996,7 @@ fun! s:NetrwHome() endif endif " insure that the home directory exists - if !isdirectory(home) + if g:netrw_dirhistmax > 0 && !isdirectory(home) if exists("g:netrw_mkdir") call system(g:netrw_mkdir." ".shellescape(home)) else @@ -4551,8 +5010,12 @@ endfun " --------------------------------------------------------------------- " s:NetrwLeftmouse: handles the when in a netrw browsing window {{{2 fun! s:NetrwLeftmouse(islocal) + if exists("s:netrwdrag") + return + endif " call Dfunc("s:NetrwLeftmouse(islocal=".a:islocal.")") + let ykeep= @@ " check if the status bar was clicked on instead of a file/directory name while getchar(0) != 0 "clear the input stream @@ -4566,10 +5029,12 @@ fun! s:NetrwLeftmouse(islocal) " call Decho("v:mouse_col =".v:mouse_col." col=".col(".")." wincol =".wincol()." winwidth =".winwidth(0)) if mouse_lnum >= wlastline + 1 || v:mouse_win != winnr() " appears to be a status bar leftmouse click + let @@= ykeep " call Dret("s:NetrwLeftmouse : detected a status bar leftmouse click") return endif if v:mouse_col != col('.') + let @@= ykeep " call Dret("s:NetrwLeftmouse : detected a vertical separator bar leftmouse click") return endif @@ -4583,14 +5048,57 @@ fun! s:NetrwLeftmouse(islocal) keepj call s:NetrwBrowse(0,s:NetrwBrowseChgDir(0,s:NetrwGetWord())) endif endif + let @@= ykeep " call Dret("s:NetrwLeftmouse") endfun +" --------------------------------------------------------------------- +" s:NetrwRightdrag: {{{2 +"DechoTabOn +fun! s:NetrwRightdrag(islocal) +" call Dfunc("s:NetrwRightdrag(islocal=".a:islocal.")") + if !exists("s:netrwdrag") + let s:netrwdrag = winnr() + call s:NetrwMarkFile(a:islocal,s:NetrwGetWord()) + if a:islocal + nno :call NetrwRightrelease(1) + else + nno :call NetrwRightrelease(0) + endif + endif +" call Dret("s:NetrwRightdrag : s:netrwdrag=".s:netrwdrag." buf#".bufnr("%")) +endfun + +" --------------------------------------------------------------------- +" s:NetrwRightrelease: {{{2 +fun! s:NetrwRightrelease(islocal) +" call Dfunc("s:NetrwRightrelease(islocal=".a:islocal.") s:netrwdrag=".s:netrwdrag." buf#".bufnr("%")) + if exists("s:netrwdrag") + nunmap + let tgt = s:NetrwGetWord() +" call Decho("target#1: ".tgt) + if tgt =~ '/$' && tgt !~ '^\./$' + let tgt = b:netrw_curdir."/".tgt + else + let tgt= b:netrw_curdir + endif +" call Decho("target#2: ".tgt) + call netrw#NetrwMakeTgt(tgt) + let curwin= winnr() + exe s:netrwdrag."wincmd w" + call s:NetrwMarkFileMove(a:islocal) + exe curwin."wincmd w" + unlet s:netrwdrag + endif +" call Dret("s:NetrwRightrelease") +endfun + " --------------------------------------------------------------------- " s:NetrwListHide: uses [range]g~...~d to delete files that match comma {{{2 " separated patterns given in g:netrw_list_hide fun! s:NetrwListHide() " call Dfunc("NetrwListHide() g:netrw_hide=".g:netrw_hide." g:netrw_list_hide<".g:netrw_list_hide.">") + let ykeep= @@ " find a character not in the "hide" string to use as a separator for :g and :v commands " How-it-works: take the hiding command, convert it into a range. Duplicate @@ -4612,21 +5120,22 @@ fun! s:NetrwListHide() " Prune the list by hiding any files which match if g:netrw_hide == 1 " call Decho("hiding<".hide."> listhide<".listhide.">") - exe 'sil keepj '.w:netrw_bannercnt.',$g'.sep.hide.sep.'d' + exe 'sil! keepj '.w:netrw_bannercnt.',$g'.sep.hide.sep.'d' elseif g:netrw_hide == 2 " call Decho("showing<".hide."> listhide<".listhide.">") - exe 'sil keepj '.w:netrw_bannercnt.',$g'.sep.hide.sep.'s@^@ /-KEEP-/ @' + exe 'sil! keepj '.w:netrw_bannercnt.',$g'.sep.hide.sep.'s@^@ /-KEEP-/ @' endif endwhile if g:netrw_hide == 2 - exe 'sil keepj '.w:netrw_bannercnt.',$v@^ /-KEEP-/ @d' - exe 'sil keepj '.w:netrw_bannercnt.',$s@^\%( /-KEEP-/ \)\+@@e' + exe 'sil! keepj '.w:netrw_bannercnt.',$v@^ /-KEEP-/ @d' + exe 'sil! keepj '.w:netrw_bannercnt.',$s@^\%( /-KEEP-/ \)\+@@e' endif " remove any blank lines that have somehow remained. " This seems to happen under Windows. exe 'sil! keepj 1,$g@^\s*$@d' + let @@= ykeep " call Dret("NetrwListHide") endfun @@ -4635,6 +5144,7 @@ endfun fun! s:NetrwHideEdit(islocal) " call Dfunc("NetrwHideEdit(islocal=".a:islocal.")") + let ykeep= @@ " save current cursor position let svpos= netrw#NetrwSavePosn() @@ -4650,6 +5160,7 @@ fun! s:NetrwHideEdit(islocal) " restore cursor position call netrw#NetrwRestorePosn(svpos) + let @@= ykeep " call Dret("NetrwHideEdit") endfun @@ -4659,6 +5170,7 @@ endfun fun! s:NetSortSequence(islocal) " call Dfunc("NetSortSequence(islocal=".a:islocal.")") + let ykeep= @@ let svpos= netrw#NetrwSavePosn() call inputsave() let newsortseq= input("Edit Sorting Sequence: ",g:netrw_sort_sequence) @@ -4668,6 +5180,7 @@ fun! s:NetSortSequence(islocal) let g:netrw_sort_sequence= newsortseq keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) keepj call netrw#NetrwRestorePosn(svpos) + let @@= ykeep " call Dret("NetSortSequence") endfun @@ -4677,6 +5190,7 @@ endfun fun! s:NetrwMakeDir(usrhost) " call Dfunc("NetrwMakeDir(usrhost<".a:usrhost.">)") + let ykeep= @@ " get name of new directory from user. A bare will skip. " if its currently a directory, also request will be skipped, but with " a message. @@ -4686,6 +5200,7 @@ fun! s:NetrwMakeDir(usrhost) " call Decho("newdirname<".newdirname.">") if newdirname == "" + let @@= ykeep " call Dret("NetrwMakeDir : user aborted with bare ") return endif @@ -4701,6 +5216,7 @@ fun! s:NetrwMakeDir(usrhost) if !exists("g:netrw_quiet") keepj call netrw#ErrorMsg(s:WARNING,"<".newdirname."> is already a directory!",24) endif + let @@= ykeep " call Dret("NetrwMakeDir : directory<".newdirname."> exists previously") return endif @@ -4708,6 +5224,7 @@ fun! s:NetrwMakeDir(usrhost) if !exists("g:netrw_quiet") keepj call netrw#ErrorMsg(s:WARNING,"<".newdirname."> is already a file!",25) endif + let @@= ykeep " call Dret("NetrwMakeDir : file<".newdirname."> exists previously") return endif @@ -4722,6 +5239,12 @@ fun! s:NetrwMakeDir(usrhost) " call Decho("netrw_origdir<".netrw_origdir.">: lcd b:netrw_curdir<".fnameescape(b:netrw_curdir).">") " call Decho("exe sil! !".g:netrw_localmkdir.' '.shellescape(newdirname,1)) exe "sil! !".g:netrw_localmkdir.' '.shellescape(newdirname,1) + if v:shell_error != 0 + let @@= ykeep + call netrw#ErrorMsg(s:ERROR,"consider setting g:netrw_localmkdir<".g:netrw_localmkdir."> to something that works",80) +" call Dret("NetrwMakeDir : failed: sil! !".g:netrw_localmkdir.' '.shellescape(newdirname,1)) + return + endif if !g:netrw_keepdir exe 'keepj lcd '.fnameescape(netrw_origdir) " call Decho("netrw_keepdir=".g:netrw_keepdir.": keepjumps lcd ".fnameescape(netrw_origdir)." getcwd<".getcwd().">") @@ -4768,6 +5291,7 @@ fun! s:NetrwMakeDir(usrhost) keepj call netrw#NetrwRestorePosn(svpos) endif + let @@= ykeep " call Dret("NetrwMakeDir") endfun @@ -4790,9 +5314,17 @@ endfun " b:netrw_islocal fun! s:NetrwMarkFile(islocal,fname) " call Dfunc("s:NetrwMarkFile(islocal=".a:islocal." fname<".a:fname.">)") + + " sanity check + if empty(a:fname) +" call Dret("s:NetrwMarkFile : emtpy fname") + return + endif + + let ykeep = @@ let curbufnr= bufnr("%") let curdir = b:netrw_curdir - let trailer = '[@=|\/\*]\=\>' + let trailer = '[@=|\/\*]\=\ze\%( \|\t\|$\)' if exists("s:netrwmarkfilelist_{curbufnr}") " markfile list pre-exists @@ -4881,6 +5413,7 @@ fun! s:NetrwMarkFile(islocal,fname) " call Decho("2match none") 2match none endif + let @@= ykeep " call Dret("s:NetrwMarkFile : s:netrwmarkfilelist_".curbufnr."<".(exists("s:netrwmarkfilelist_{curbufnr}")? string(s:netrwmarkfilelist_{curbufnr}) : " doesn't exist").">") endfun @@ -4898,34 +5431,44 @@ fun! s:NetrwMarkFileCompress(islocal) let curdir = b:netrw_curdir let curbufnr = bufnr("%") + " sanity check + if !exists("s:netrwmarkfilelist_{curbufnr}") || empty(s:netrwmarkfilelist_{curbufnr}) + keepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66) +" call Dret("s:NetrwMarkFileCompress") + return + endif +" call Decho("sanity chk passed: s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr})) + if exists("s:netrwmarkfilelist_{curbufnr}") && exists("g:netrw_compress") && exists("g:netrw_decompress") + + " for every filename in the marked list for fname in s:netrwmarkfilelist_{curbufnr} - " for every filename in the marked list - for sfx in sort(keys(g:netrw_decompress)) - if fname =~ '\'.sfx.'$' - " fname has a suffix indicating that its compressed; apply associated decompression routine - let exe= netrw#WinPath(g:netrw_decompress[sfx]) -" call Decho("fname<".fname."> is compressed so decompress with <".exe.">") - if a:islocal - if g:netrw_keepdir - let fname= shellescape(s:ComposePath(curdir,fname)) - endif - else - let fname= shellescape(b:netrw_curdir.fname,1) + let sfx= substitute(fname,'^.\{-}\(\.\a\+\)$','\1','') +" call Decho("extracted sfx<".sfx.">") + if exists("g:netrw_decompress['".sfx."']") + " fname has a suffix indicating that its compressed; apply associated decompression routine + let exe= g:netrw_decompress[sfx] +" call Decho("fname<".fname."> is compressed so decompress with <".exe.">") + let exe= netrw#WinPath(exe) + if a:islocal + if g:netrw_keepdir + let fname= shellescape(s:ComposePath(curdir,fname)) endif - if executable(exe) - if a:islocal - call system(exe." ".fname) - else - keepj call s:RemoteSystem(exe." ".fname) - endif + else + let fname= shellescape(b:netrw_curdir.fname,1) + endif + if executable(exe) + if a:islocal + call system(exe." ".fname) else - keepj call netrw#ErrorMsg(s:WARNING,"unable to apply<".exe."> to file<".fname.">",50) + keepj call s:RemoteSystem(exe." ".fname) endif - break + else + keepj call netrw#ErrorMsg(s:WARNING,"unable to apply<".exe."> to file<".fname.">",50) endif - unlet sfx - endfor + endif + unlet sfx + if exists("exe") unlet exe elseif a:islocal @@ -4935,7 +5478,8 @@ fun! s:NetrwMarkFileCompress(islocal) " fname not a compressed file, so compress it keepj call s:RemoteSystem(netrw#WinPath(g:netrw_compress)." ".shellescape(fname)) endif - endfor + endfor " for every file in the marked list + call s:NetrwUnmarkList(curbufnr,curdir) keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) keepj call netrw#NetrwRestorePosn(svpos) @@ -4950,31 +5494,99 @@ endfun " directories. Uses the local-buffer marked file list. " Returns 1=success (used by NetrwMarkFileMove()) " 0=failure -fun! s:NetrwMarkFileCopy(islocal) -" call Dfunc("s:NetrwMarkFileCopy(islocal=".a:islocal.") target<".(exists("s:netrwmftgt")? s:netrwmftgt : '---').">") +fun! s:NetrwMarkFileCopy(islocal,...) +" call Dfunc("s:NetrwMarkFileCopy(islocal=".a:islocal.") target<".(exists("s:netrwmftgt")? s:netrwmftgt : '---')."> a:0=".a:0) - " sanity checks - if !exists("s:netrwmarkfilelist_{bufnr('%')}") || empty(s:netrwmarkfilelist_{bufnr('%')}) - keepj call netrw#ErrorMsg(s:ERROR,"there are no marked files in this window (:help netrw-mf)",66) -" call Dret("s:NetrwMarkFileCopy 0") - return 0 + if !exists("b:netrw_curdir") + let b:netrw_curdir= getcwd() +" call Decho("set b:netrw_curdir<".b:netrw_curdir."> (used getcwd)") + endif + let curdir = b:netrw_curdir + let curbufnr = bufnr("%") + + " sanity check + if !exists("s:netrwmarkfilelist_{curbufnr}") || empty(s:netrwmarkfilelist_{curbufnr}) + keepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66) +" call Dret("s:NetrwMarkFileCopy") + return endif -" call Decho("sanity chk passed: s:netrwmarkfilelist_".bufnr('%')."<".string(s:netrwmarkfilelist_{bufnr('%')})) +" call Decho("sanity chk passed: s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr})) + if !exists("s:netrwmftgt") keepj call netrw#ErrorMsg(s:ERROR,"your marked file target is empty! (:help netrw-mt)",67) " call Dret("s:NetrwMarkFileCopy 0") return 0 endif " call Decho("sanity chk passed: s:netrwmftgt<".s:netrwmftgt.">") - let curdir = b:netrw_curdir - let curbufnr = bufnr("%") if a:islocal && s:netrwmftgt_islocal " Copy marked files, local directory to local directory " call Decho("copy from local to local") - let args= join(map(deepcopy(s:netrwmarkfilelist_{bufnr('%')}),"shellescape(b:netrw_curdir.\"/\".v:val)")) -" call Decho("system(".g:netrw_localcopycmd." ".args." ".shellescape(s:netrwmftgt).")") - call system(netrw#WinPath(g:netrw_localcopycmd)." ".args." ".shellescape(s:netrwmftgt)) + if !executable(g:netrw_localcopycmd) && g:netrw_localcopycmd !~ '\ not executable on your system, aborting",91) +" call Dfunc("s:NetrwMarkFileMove : g:netrw_localcopycmd<".g:netrw_localcopycmd."> n/a!") + return + endif + + " copy marked files while within the same directory (ie. allow renaming) + if simplify(s:netrwmftgt) == simplify(b:netrw_curdir) + if len(s:netrwmarkfilelist_{bufnr('%')}) == 1 + " only one marked file + let args = shellescape(b:netrw_curdir."/".s:netrwmarkfilelist_{bufnr('%')}[0]) + let oldname = s:netrwmarkfilelist_{bufnr('%')}[0] + elseif a:0 == 1 + " this happens when the next case was used to recursively call s:NetrwMarkFileCopy() + let args = shellescape(b:netrw_curdir."/".a:1) + let oldname = a:1 + else + " copy multiple marked files inside the same directory + let s:recursive= 1 + for oldname in s:netrwmarkfilelist_{bufnr("%")} + let ret= s:NetrwMarkFileCopy(a:islocal,oldname) + if ret == 0 + break + endif + endfor + unlet s:recursive + call s:NetrwUnmarkList(curbufnr,curdir) +" call Dret("s:NetrwMarkFileCopy ".ret) + return ret + endif + + call inputsave() + let newname= input("Copy ".oldname." to : ",oldname,"file") + call inputrestore() + if newname == "" +" call Dret("s:NetrwMarkFileCopy 0") + return 0 + endif + let args= shellescape(oldname) + let tgt = shellescape(s:netrwmftgt.'/'.newname) + else + let args= join(map(deepcopy(s:netrwmarkfilelist_{bufnr('%')}),"shellescape(b:netrw_curdir.\"/\".v:val)")) + let tgt = shellescape(s:netrwmftgt) + endif + if !g:netrw_cygwin && (has("win32") || has("win95") || has("win64") || has("win16")) + let args= substitute(args,'/','\\','g') + let tgt = substitute(tgt, '/','\\','g') + endif + if g:netrw_localcopycmd =~ '\s' + let copycmd = substitute(g:netrw_localcopycmd,'\s.*$','','') + let copycmdargs = substitute(g:netrw_localcopycmd,'^.\{-}\(\s.*\)$','\1','') + let copycmd = netrw#WinPath(copycmd).copycmdargs + else + let copycmd = netrw#WinPath(g:netrw_localcopycmd) + endif +" call Decho("args <".args.">") +" call Decho("tgt <".tgt.">") +" call Decho("copycmd<".copycmd.">") +" call Decho("system(".copycmd." ".args." ".tgt.")") + call system(copycmd." ".args." ".tgt) + if v:shell_error != 0 + call netrw#ErrorMsg(s:ERROR,"tried using g:netrw_localcopycmd<".g:netrw_localcopycmd.">; it doesn't work!",80) +" call Dret("s:NetrwMarkFileCopy 0 : failed: system(".g:netrw_localcopycmd." ".args." ".shellescape(s:netrwmftgt)) + return 0 + endif elseif a:islocal && !s:netrwmftgt_islocal " Copy marked files, local directory to remote directory @@ -4982,10 +5594,12 @@ fun! s:NetrwMarkFileCopy(islocal) keepj call s:NetrwUpload(s:netrwmarkfilelist_{bufnr('%')},s:netrwmftgt) elseif !a:islocal && s:netrwmftgt_islocal + " Copy marked files, remote directory to local directory " call Decho("copy from remote to local") keepj call netrw#NetrwObtain(a:islocal,s:netrwmarkfilelist_{bufnr('%')},s:netrwmftgt) elseif !a:islocal && !s:netrwmftgt_islocal + " Copy marked files, remote directory to remote directory " call Decho("copy from remote to remote") let curdir = getcwd() let tmpdir = s:GetTempfile("") @@ -4996,6 +5610,11 @@ fun! s:NetrwMarkFileCopy(islocal) call mkdir(tmpdir) else exe "sil! !".g:netrw_localmkdir.' '.shellescape(tmpdir,1) + if v:shell_error != 0 + call netrw#ErrorMsg(s:WARNING,"consider setting g:netrw_localmkdir<".g:netrw_localmkdir."> to something that works",80) +" call Dret("s:NetrwMarkFileCopy : failed: sil! !".g:netrw_localmkdir.' '.shellescape(tmpdir,1) ) + return + endif endif if isdirectory(tmpdir) exe "keepj lcd ".fnameescape(tmpdir) @@ -5008,6 +5627,11 @@ fun! s:NetrwMarkFileCopy(islocal) endfor exe "keepj lcd ".fnameescape(curdir) exe "sil !".g:netrw_localrmdir." ".shellescape(tmpdir,1) + if v:shell_error != 0 + call netrw#ErrorMsg(s:WARNING,"consider setting g:netrw_localrmdir<".g:netrw_localrmdir."> to something that works",80) +" call Dret("s:NetrwMarkFileCopy : failed: sil !".g:netrw_localrmdir." ".shellescape(tmpdir,1) ) + return + endif else exe "keepj lcd ".fnameescape(curdir) endif @@ -5017,10 +5641,11 @@ fun! s:NetrwMarkFileCopy(islocal) " ------- " cleanup " ------- -" call Decho("cleanup") - - " remove markings from local buffer - call s:NetrwUnmarkList(curbufnr,curdir) +" call Decho("cleanup") + if !exists("s:recursive") + " remove markings from local buffer + call s:NetrwUnmarkList(curbufnr,curdir) + endif " refresh buffers if !s:netrwmftgt_islocal @@ -5046,7 +5671,15 @@ fun! s:NetrwMarkFileDiff(islocal) " call Dfunc("s:NetrwMarkFileDiff(islocal=".a:islocal.") b:netrw_curdir<".b:netrw_curdir.">") let curbufnr= bufnr("%") - if exists("s:netrwmarkfilelist_{curbufnr}") + " sanity check + if !exists("s:netrwmarkfilelist_{curbufnr}") || empty(s:netrwmarkfilelist_{curbufnr}) + keepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66) +" call Dret("s:NetrwMarkFileDiff") + return + endif +" call Decho("sanity chk passed: s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr})) + + if exists("s:netrwmarkfilelist_{."curbufnr}") let cnt = 0 let curdir = b:netrw_curdir for fname in s:netrwmarkfilelist @@ -5079,6 +5712,15 @@ fun! s:NetrwMarkFileEdit(islocal) let curdir = b:netrw_curdir let curbufnr = bufnr("%") + + " sanity check + if !exists("s:netrwmarkfilelist_{curbufnr}") || empty(s:netrwmarkfilelist_{curbufnr}) + keepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66) +" call Dret("s:NetrwMarkFileEdit") + return + endif +" call Decho("sanity chk passed: s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr})) + if exists("s:netrwmarkfilelist_{curbufnr}") call s:SetRexDir(a:islocal,curdir) let flist= join(map(deepcopy(s:netrwmarkfilelist), "fnameescape(v:val)")) @@ -5088,10 +5730,42 @@ fun! s:NetrwMarkFileEdit(islocal) " call Decho("exe sil args ".flist) exe "sil args ".flist endif + echo "(use :bn, :bp to navigate files; :Rex to return)" " call Dret("s:NetrwMarkFileEdit") endfun +" --------------------------------------------------------------------- +" s:NetrwMarkFileQFEL: convert a quickfix-error list into a marked file list {{{2 +fun! s:NetrwMarkFileQFEL(islocal,qfel) +" call Dfunc("s:NetrwMarkFileQFEL(islocal=".a:islocal.",qfel)") + call s:NetrwUnmarkAll() + let curbufnr= bufnr("%") + + if !empty(a:qfel) + for entry in a:qfel + let bufnmbr= entry["bufnr"] +" call Decho("bufname(".bufnmbr.")<".bufname(bufnmbr)."> line#".entry["lnum"]." text=".entry["text"]) + if !exists("s:netrwmarkfilelist_{curbufnr}") +" call Decho("case: no marked file list") + call s:NetrwMarkFile(a:islocal,bufname(bufnmbr)) + elseif index(s:netrwmarkfilelist_{curbufnr},bufname(bufnmbr)) == -1 + " s:NetrwMarkFile will remove duplicate entries from the marked file list. + " So, this test lets two or more hits on the same pattern to be ignored. +" call Decho("case: ".bufname(bufnmbr)." not currently in marked file list") + call s:NetrwMarkFile(a:islocal,bufname(bufnmbr)) + else +" call Decho("case: ".bufname(bufnmbr)." already in marked file list") + endif + endfor + echo "(use me to edit marked files)" + else + call netrw#ErrorMsg(s:WARNING,"can't convert quickfix error list; its empty!",92) + endif + +" call Dret("s:NetrwMarkFileQFEL") +endfun + " --------------------------------------------------------------------- " s:NetrwMarkFileExe: (invoked by mx) execute arbitrary system command on marked files, one at a time {{{2 " Uses the local marked-file list. @@ -5101,6 +5775,14 @@ fun! s:NetrwMarkFileExe(islocal) let curdir = b:netrw_curdir let curbufnr = bufnr("%") + " sanity check + if !exists("s:netrwmarkfilelist_{curbufnr}") || empty(s:netrwmarkfilelist_{curbufnr}) + keepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66) +" call Dret("s:NetrwMarkFileExe") + return + endif +" call Decho("sanity chk passed: s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr})) + if exists("s:netrwmarkfilelist_{curbufnr}") " get the command call inputsave() @@ -5221,6 +5903,14 @@ fun! s:NetrwMarkFileVimCmd(islocal) let curdir = b:netrw_curdir let curbufnr = bufnr("%") + " sanity check + if !exists("s:netrwmarkfilelist_{curbufnr}") || empty(s:netrwmarkfilelist_{curbufnr}) + keepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66) +" call Dret("s:NetrwMarkFileVimCmd") + return + endif +" call Decho("sanity chk passed: s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr})) + if exists("s:netrwmarkfilelist_{curbufnr}") " get the command call inputsave() @@ -5243,7 +5933,6 @@ fun! s:NetrwMarkFileVimCmd(islocal) exe cmd exe "sil! keepalt wq!" else - " COMBAK -- not supported yet " call Decho("remote<".fname.">: exe ".cmd." : NOT SUPPORTED YET") echo "sorry, \"mX\" not supported yet for remote files" endif @@ -5331,30 +6020,47 @@ fun! s:NetrwMarkFileGrep(islocal) " call Decho("s:netrwmarkfilelist".string(s:netrwmarkfilelist).">") let netrwmarkfilelist= join(map(deepcopy(s:netrwmarkfilelist), "fnameescape(v:val)")) call s:NetrwUnmarkAll() + else +" call Decho('no marked files, using "*"') + let netrwmarkfilelist= "*" + endif - " ask user for pattern - call inputsave() - let pat= input("Enter pattern: ","") - call inputrestore() - if pat !~ '^\s' - if pat !~ '^/' - let pat= '/'.pat.'/' - endif - let pat= " ".pat - endif + " ask user for pattern + call inputsave() + let pat= input("Enter pattern: ","") + call inputrestore() + let patbang = "" + if pat =~ '^!' + let patbang = "!" + let pat= strpart(pat,2) + endif + if pat =~ '^\i' + let pat = escape(pat,'/') + let pat = '/'.pat.'/' + else + let nonisi = pat[0] + endif - " use vimgrep for both local and remote -" call Decho("exe vimgrep".pat." ".netrwmarkfilelist) - try - exe "keepj noautocmd vimgrep".pat." ".netrwmarkfilelist - catch /^Vim\%((\a\+)\)\=:E480/ - keepj call netrw#ErrorMsg(s:WARNING,"no match with pattern<".pattern.">",76) -" call Dret("s:NetrwMarkFileGrep : unable to find pattern<".pattern.">") - return - endtry + " use vimgrep for both local and remote +" call Decho("exe vimgrep".patbang." ".pat." ".netrwmarkfilelist) + try + exe "keepj noautocmd vimgrep".patbang." ".pat." ".netrwmarkfilelist + catch /^Vim\%((\a\+)\)\=:E480/ + keepj call netrw#ErrorMsg(s:WARNING,"no match with pattern<".pat.">",76) +" call Dret("s:NetrwMarkFileGrep : unable to find pattern<".pat.">") + return + endtry + echo "(use :cn, :cp to navigate, :Rex to return)" - 2match none - keepj call netrw#NetrwRestorePosn(svpos) + 2match none + keepj call netrw#NetrwRestorePosn(svpos) + + if exists("nonisi") + " original, user-supplied pattern did not begin with a character from isident +" call Decho("looking for trailing nonisi<".nonisi."> followed by a j, gj, or jg") + if pat =~ nonisi.'j$\|'.nonisi.'gj$\|'.nonisi.'jg$' + call s:NetrwMarkFileQFEL(a:islocal,getqflist()) + endif endif " call Dret("s:NetrwMarkFileGrep") @@ -5371,12 +6077,13 @@ fun! s:NetrwMarkFileMove(islocal) let curbufnr = bufnr("%") " sanity check - if !exists("s:netrwmarkfilelist_{bufnr('%')}") || empty(s:netrwmarkfilelist_{bufnr('%')}) + if !exists("s:netrwmarkfilelist_{curbufnr}") || empty(s:netrwmarkfilelist_{curbufnr}) keepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66) " call Dret("s:NetrwMarkFileMove") return endif -" call Decho("sanity chk passed: s:netrwmarkfilelist_".bufnr('%')."<".string(s:netrwmarkfilelist_{bufnr('%')})) +" call Decho("sanity chk passed: s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr})) + if !exists("s:netrwmftgt") keepj call netrw#ErrorMsg(2,"your marked file target is empty! (:help netrw-mt)",67) " call Dret("s:NetrwMarkFileCopy 0") @@ -5388,18 +6095,40 @@ fun! s:NetrwMarkFileMove(islocal) " move: local -> local " call Decho("move from local to local") " call Decho("(s:NetrwMarkFileMove) local to local move") - if executable(g:netrw_localmovecmd) - for fname in s:netrwmarkfilelist_{bufnr("%")} -" call Decho("system(".g:netrw_localmovecmd." ".shellescape(fname)." ".shellescape(s:netrwmftgt).")") - let ret= system(g:netrw_localmovecmd." ".shellescape(fname)." ".shellescape(s:netrwmftgt)) - if v:shell_error < 0 - call netrw#ErrorMsg(s:ERROR,"command<".g:netrw_localmovecmd."> failed, aborting",54) - break - endif - endfor + if !executable(g:netrw_localmovecmd) && g:netrw_localmovecmd !~ '\ not executable on your system, aborting",90) +" call Dfunc("s:NetrwMarkFileMove : g:netrw_localmovecmd<".g:netrw_localmovecmd."> n/a!") + return + endif + let tgt = shellescape(s:netrwmftgt) +" call Decho("tgt<".tgt.">") + if !g:netrw_cygwin && (has("win32") || has("win95") || has("win64") || has("win16")) + let tgt = substitute(tgt, '/','\\','g') +" call Decho("windows exception: tgt<".tgt.">") + if g:netrw_localmovecmd =~ '\s' + let movecmd = substitute(g:netrw_localmovecmd,'\s.*$','','') + let movecmdargs = substitute(g:netrw_localmovecmd,'^.\{-}\(\s.*\)$','\1','') + let movecmd = netrw#WinPath(movecmd).movecmdargs +" call Decho("windows exception: movecmd<".movecmd."> (#1: had a space)") + else + let movecmd = netrw#WinPath(movecmd) +" call Decho("windows exception: movecmd<".movecmd."> (#2: no space)") + endif else - keepj call netrw#ErrorMsg(s:ERROR,"command<".g:netrw_localmovecmd."> is not executable!",57) + let movecmd = netrw#WinPath(g:netrw_localmovecmd) +" call Decho("movecmd<".movecmd."> (#3 linux or cygwin)") endif + for fname in s:netrwmarkfilelist_{bufnr("%")} +" call Decho("system(".movecmd." ".shellescape(fname)." ".tgt.")") + if !g:netrw_cygwin && (has("win32") || has("win95") || has("win64") || has("win16")) + let fname= substitute(fname,'/','\\','g') + endif + let ret= system(g:netrw_localmovecmd." ".shellescape(fname)." ".tgt) + if v:shell_error != 0 + call netrw#ErrorMsg(s:ERROR,"tried using g:netrw_localmovecmd<".g:netrw_localmovecmd.">; it doesn't work!",54) + break + endif + endfor elseif a:islocal && !s:netrwmftgt_islocal " move: local -> remote @@ -5472,6 +6201,14 @@ endfun fun! s:NetrwMarkFilePrint(islocal) " call Dfunc("s:NetrwMarkFilePrint(islocal=".a:islocal.")") let curbufnr= bufnr("%") + + " sanity check + if !exists("s:netrwmarkfilelist_{curbufnr}") || empty(s:netrwmarkfilelist_{curbufnr}) + keepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66) +" call Dret("s:NetrwMarkFilePrint") + return + endif +" call Decho("sanity chk passed: s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr})) if exists("s:netrwmarkfilelist_{curbufnr}") let netrwmarkfilelist = s:netrwmarkfilelist_{curbufnr} let curdir = b:netrw_curdir @@ -5500,7 +6237,7 @@ endfun " --------------------------------------------------------------------- " s:NetrwMarkFileRegexp: (invoked by mr) This function is used to mark {{{2 " files when given a regexp (for which a prompt is -" issued). +" issued) (matches to name of files). fun! s:NetrwMarkFileRegexp(islocal) " call Dfunc("s:NetrwMarkFileRegexp(islocal=".a:islocal.")") @@ -5512,8 +6249,8 @@ fun! s:NetrwMarkFileRegexp(islocal) if a:islocal " get the matching list of files using local glob() " call Decho("handle local regexp") - let dirname = escape(b:netrw_curdir,g:netrw_glob_escape) - let files = glob(s:ComposePath(dirname,regexp)) + let dirname = escape(b:netrw_curdir,g:netrw_glob_escape) + let files = glob(s:ComposePath(dirname,regexp)) " call Decho("files<".files.">") let filelist= split(files,"\n") @@ -5566,6 +6303,7 @@ fun! s:NetrwMarkFileRegexp(islocal) let @a = areg let &ei = eikeep endif + echo " (use me to edit marked files)" " call Dret("s:NetrwMarkFileRegexp") endfun @@ -5576,6 +6314,14 @@ endfun fun! s:NetrwMarkFileSource(islocal) " call Dfunc("s:NetrwMarkFileSource(islocal=".a:islocal.")") let curbufnr= bufnr("%") + + " sanity check + if !exists("s:netrwmarkfilelist_{curbufnr}") || empty(s:netrwmarkfilelist_{curbufnr}) + keepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66) +" call Dret("s:NetrwMarkFileSource") + return + endif +" call Decho("sanity chk passed: s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr})) if exists("s:netrwmarkfilelist_{curbufnr}") let netrwmarkfilelist = s:netrwmarkfilelist_{bufnr("%")} let curdir = b:netrw_curdir @@ -5606,6 +6352,14 @@ fun! s:NetrwMarkFileTag(islocal) let curdir = b:netrw_curdir let curbufnr = bufnr("%") + " sanity check + if !exists("s:netrwmarkfilelist_{curbufnr}") || empty(s:netrwmarkfilelist_{curbufnr}) + keepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66) +" call Dret("s:NetrwMarkFileTag") + return + endif +" call Decho("sanity chk passed: s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr})) + if exists("s:netrwmarkfilelist") " call Decho("s:netrwmarkfilelist".string(s:netrwmarkfilelist).">") let netrwmarkfilelist= join(map(deepcopy(s:netrwmarkfilelist), "shellescape(v:val,".!a:islocal.")")) @@ -5641,9 +6395,9 @@ endfun " --------------------------------------------------------------------- " s:NetrwMarkFileTgt: (invoked by mt) This function sets up a marked file target {{{2 " Sets up two variables, -" s:netrwmftgt : holds the target directory +" s:netrwmftgt : holds the target directory " s:netrwmftgt_islocal : 0=target directory is remote -" 1=target directory is local +" 1=target directory is local fun! s:NetrwMarkFileTgt(islocal) " call Dfunc("s:NetrwMarkFileTgt(islocal=".a:islocal.")") let svpos = netrw#NetrwSavePosn() @@ -5655,9 +6409,21 @@ fun! s:NetrwMarkFileTgt(islocal) " set up target if line(".") < w:netrw_bannercnt - " if cursor in banner region, use b:netrw_curdir for the target - let s:netrwmftgt= b:netrw_curdir -" call Decho("inbanner: s:netrwmftgt<".s:netrwmftgt.">") + " if cursor in banner region, use b:netrw_curdir for the target unless its already the target + if exists("s:netrwmftgt") && exists("s:netrwmftgt_islocal") && s:netrwmftgt == b:netrw_curdir +" call Decho("cursor in banner region, and target already is <".b:netrw_curdir.">: removing target") + unlet s:netrwmftgt s:netrwmftgt_islocal + if g:netrw_fastbrowse <= 1 + call s:LocalBrowseShellCmdRefresh() + endif + call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) + call netrw#NetrwRestorePosn(svpos) +" call Dret("s:NetrwMarkFileTgt : removed target") + return + else + let s:netrwmftgt= b:netrw_curdir +" call Decho("inbanner: s:netrwmftgt<".s:netrwmftgt.">") + endif else " get word under cursor. @@ -5703,6 +6469,7 @@ endfun " s:NetrwOpenFile: query user for a filename and open it {{{2 fun! s:NetrwOpenFile(islocal) " call Dfunc("s:NetrwOpenFile(islocal=".a:islocal.")") + let ykeep= @@ call inputsave() let fname= input("Enter filename: ") call inputrestore() @@ -5726,11 +6493,14 @@ fun! s:NetrwOpenFile(islocal) else exe "e ".fnameescape(fname) endif + let @@= ykeep " call Dret("s:NetrwOpenFile") endfun " --------------------------------------------------------------------- " s:NetrwUnmarkList: delete local marked file lists and remove their contents from the global marked-file list {{{2 +" User access provided by the mapping. (see :help netrw-mu) +" Used by many MarkFile functions. fun! s:NetrwUnmarkList(curbufnr,curdir) " call Dfunc("s:NetrwUnmarkList(curbufnr=".a:curbufnr." curdir<".a:curdir.">)") @@ -5768,7 +6538,7 @@ fun! s:NetrwUnmarkAll() endfun " --------------------------------------------------------------------- -" s:NetrwUnmarkAll2: {{{2 +" s:NetrwUnmarkAll2: unmark all files from all buffers {{{2 fun! s:NetrwUnmarkAll2() " call Dfunc("s:NetrwUnmarkAll2()") redir => netrwmarkfilelist_let @@ -5821,58 +6591,74 @@ fun! s:NetrwMenu(domenu) if !exists("s:netrw_menu_enabled") && a:domenu " call Decho("initialize menu") let s:netrw_menu_enabled= 1 - exe 'sil! menu '.g:NetrwMenuPriority.'.1 '.g:NetrwTopLvlMenu.'Help ' - exe 'sil! menu '.g:NetrwMenuPriority.'.5 '.g:NetrwTopLvlMenu.'-Sep1- :' - exe 'sil! menu '.g:NetrwMenuPriority.'.6 '.g:NetrwTopLvlMenu.'Go\ Up\ Directory- -' - exe 'sil! menu '.g:NetrwMenuPriority.'.7 '.g:NetrwTopLvlMenu.'Apply\ Special\ Viewerx x' - exe 'sil! menu '.g:NetrwMenuPriority.'.8.1 '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Bookmark\ Current\ Directorymb mb' - exe 'sil! menu '.g:NetrwMenuPriority.'.8.4 '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Goto\ Prev\ Dir\ (History)u u' - exe 'sil! menu '.g:NetrwMenuPriority.'.8.5 '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Goto\ Next\ Dir\ (History)U U' - exe 'sil! menu '.g:NetrwMenuPriority.'.8.6 '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Listqb qb' - exe 'sil! menu '.g:NetrwMenuPriority.'.9.1 '.g:NetrwTopLvlMenu.'Browsing\ Control.Edit\ File\ Hiding\ List'." \'" - exe 'sil! menu '.g:NetrwMenuPriority.'.9.2 '.g:NetrwTopLvlMenu.'Browsing\ Control.Edit\ Sorting\ SequenceS S' - exe 'sil! menu '.g:NetrwMenuPriority.'.9.3 '.g:NetrwTopLvlMenu.'Browsing\ Control.Quick\ Hide/Unhide\ Dot\ Files'."gh gh" - exe 'sil! menu '.g:NetrwMenuPriority.'.9.4 '.g:NetrwTopLvlMenu.'Browsing\ Control.Refresh\ Listing'." \" - exe 'sil! menu '.g:NetrwMenuPriority.'.9.5 '.g:NetrwTopLvlMenu.'Browsing\ Control.Settings/Options:NetrwSettings '.":NetrwSettings\" - exe 'sil! menu '.g:NetrwMenuPriority.'.10 '.g:NetrwTopLvlMenu.'Delete\ File/DirectoryD D' - exe 'sil! menu '.g:NetrwMenuPriority.'.11.1 '.g:NetrwTopLvlMenu.'Edit\ File/Dir.Create\ New\ File% %' - exe 'sil! menu '.g:NetrwMenuPriority.'.11.1 '.g:NetrwTopLvlMenu.'Edit\ File/Dir.In\ Current\ Window '."\" - exe 'sil! menu '.g:NetrwMenuPriority.'.11.2 '.g:NetrwTopLvlMenu.'Edit\ File/Dir.Preview\ File/Directoryp p' - exe 'sil! menu '.g:NetrwMenuPriority.'.11.3 '.g:NetrwTopLvlMenu.'Edit\ File/Dir.In\ Previous\ WindowP P' - exe 'sil! menu '.g:NetrwMenuPriority.'.11.4 '.g:NetrwTopLvlMenu.'Edit\ File/Dir.In\ New\ Windowo o' - exe 'sil! menu '.g:NetrwMenuPriority.'.11.5 '.g:NetrwTopLvlMenu.'Edit\ File/Dir.In\ New\ Vertical\ Windowv v' - exe 'sil! menu '.g:NetrwMenuPriority.'.12.1 '.g:NetrwTopLvlMenu.'Explore.Directory\ Name :Explore ' - exe 'sil! menu '.g:NetrwMenuPriority.'.12.2 '.g:NetrwTopLvlMenu.'Explore.Filenames\ Matching\ Pattern\ (curdir\ only):Explore\ */ :Explore */' - exe 'sil! menu '.g:NetrwMenuPriority.'.12.2 '.g:NetrwTopLvlMenu.'Explore.Filenames\ Matching\ Pattern\ (+subdirs):Explore\ **/ :Explore **/' - exe 'sil! menu '.g:NetrwMenuPriority.'.12.3 '.g:NetrwTopLvlMenu.'Explore.Files\ Containing\ String\ Pattern\ (curdir\ only):Explore\ *// :Explore *//' - exe 'sil! menu '.g:NetrwMenuPriority.'.12.4 '.g:NetrwTopLvlMenu.'Explore.Files\ Containing\ String\ Pattern\ (+subdirs):Explore\ **// :Explore **//' - exe 'sil! menu '.g:NetrwMenuPriority.'.12.4 '.g:NetrwTopLvlMenu.'Explore.Next\ Match:Nexplore :Nexplore' - exe 'sil! menu '.g:NetrwMenuPriority.'.12.4 '.g:NetrwTopLvlMenu.'Explore.Prev\ Match:Pexplore :Pexplore' - exe 'sil! menu '.g:NetrwMenuPriority.'.13 '.g:NetrwTopLvlMenu.'Make\ Subdirectoryd d' - exe 'sil! menu '.g:NetrwMenuPriority.'.14.1 '.g:NetrwTopLvlMenu.'Marked\ Files.Mark\ Filemf mf' - exe 'sil! menu '.g:NetrwMenuPriority.'.14.2 '.g:NetrwTopLvlMenu.'Marked\ Files.Mark\ Files\ by\ Regexpmr mr' - exe 'sil! menu '.g:NetrwMenuPriority.'.14.3 '.g:NetrwTopLvlMenu.'Marked\ Files.Hide-Show-List\ Controla a' - exe 'sil! menu '.g:NetrwMenuPriority.'.14.4 '.g:NetrwTopLvlMenu.'Marked\ Files.Copy\ To\ Targetmc mc' - exe 'sil! menu '.g:NetrwMenuPriority.'.14.5 '.g:NetrwTopLvlMenu.'Marked\ Files.DeleteD D' - exe 'sil! menu '.g:NetrwMenuPriority.'.14.6 '.g:NetrwTopLvlMenu.'Marked\ Files.Diffmd md' - exe 'sil! menu '.g:NetrwMenuPriority.'.14.7 '.g:NetrwTopLvlMenu.'Marked\ Files.Editme me' - exe 'sil! menu '.g:NetrwMenuPriority.'.14.8 '.g:NetrwTopLvlMenu.'Marked\ Files.Exe\ Cmdmx mx' - exe 'sil! menu '.g:NetrwMenuPriority.'.14.9 '.g:NetrwTopLvlMenu.'Marked\ Files.Move\ To\ Targetmm mm' - exe 'sil! menu '.g:NetrwMenuPriority.'.14.10 '.g:NetrwTopLvlMenu.'Marked\ Files.ObtainO O' - exe 'sil! menu '.g:NetrwMenuPriority.'.14.11 '.g:NetrwTopLvlMenu.'Marked\ Files.Printmp mp' - exe 'sil! menu '.g:NetrwMenuPriority.'.14.12 '.g:NetrwTopLvlMenu.'Marked\ Files.ReplaceR R' - exe 'sil! menu '.g:NetrwMenuPriority.'.14.13 '.g:NetrwTopLvlMenu.'Marked\ Files.Set\ Targetmt mt' - exe 'sil! menu '.g:NetrwMenuPriority.'.14.14 '.g:NetrwTopLvlMenu.'Marked\ Files.TagmT mT' - exe 'sil! menu '.g:NetrwMenuPriority.'.14.15 '.g:NetrwTopLvlMenu.'Marked\ Files.Zip/Unzip/Compress/Uncompressmz mz' - exe 'sil! menu '.g:NetrwMenuPriority.'.15 '.g:NetrwTopLvlMenu.'Obtain\ FileO O' - exe 'sil! menu '.g:NetrwMenuPriority.'.16.1 '.g:NetrwTopLvlMenu.'Style.Listing\ Style\ (thin-long-wide-tree)i i' - exe 'sil! menu '.g:NetrwMenuPriority.'.16.2 '.g:NetrwTopLvlMenu.'Style.Normal-Hide-Showa a' - exe 'sil! menu '.g:NetrwMenuPriority.'.16.3 '.g:NetrwTopLvlMenu.'Style.Reverse\ Sorting\ Order'."r r" - exe 'sil! menu '.g:NetrwMenuPriority.'.16.4 '.g:NetrwTopLvlMenu.'Style.Sorting\ Method\ (name-time-size)s s' - exe 'sil! menu '.g:NetrwMenuPriority.'.17 '.g:NetrwTopLvlMenu.'Rename\ File/DirectoryR R' - exe 'sil! menu '.g:NetrwMenuPriority.'.18 '.g:NetrwTopLvlMenu.'Set\ Current\ Directoryc c' - call s:NetrwBookmarkMenu() " provide some history! uses priorities 2,3, reserves 4, 8.2.x + exe 'sil! menu '.g:NetrwMenuPriority.'.1 '.g:NetrwTopLvlMenu.'Help ' + exe 'sil! menu '.g:NetrwMenuPriority.'.5 '.g:NetrwTopLvlMenu.'-Sep1- :' + exe 'sil! menu '.g:NetrwMenuPriority.'.6 '.g:NetrwTopLvlMenu.'Go\ Up\ Directory- -' + exe 'sil! menu '.g:NetrwMenuPriority.'.7 '.g:NetrwTopLvlMenu.'Apply\ Special\ Viewerx x' + if g:netrw_dirhistmax > 0 + exe 'sil! menu '.g:NetrwMenuPriority.'.8.1 '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Bookmark\ Current\ Directorymb mb' + exe 'sil! menu '.g:NetrwMenuPriority.'.8.4 '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Goto\ Prev\ Dir\ (History)u u' + exe 'sil! menu '.g:NetrwMenuPriority.'.8.5 '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Goto\ Next\ Dir\ (History)U U' + exe 'sil! menu '.g:NetrwMenuPriority.'.8.6 '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Listqb qb' + else + exe 'sil! menu '.g:NetrwMenuPriority.'.8 '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History :echo "(disabled)"'."\" + endif + exe 'sil! menu '.g:NetrwMenuPriority.'.9.1 '.g:NetrwTopLvlMenu.'Browsing\ Control.Horizontal\ Splito o' + exe 'sil! menu '.g:NetrwMenuPriority.'.9.2 '.g:NetrwTopLvlMenu.'Browsing\ Control.Vertical\ Splitv v' + exe 'sil! menu '.g:NetrwMenuPriority.'.9.3 '.g:NetrwTopLvlMenu.'Browsing\ Control.New\ Tabt t' + exe 'sil! menu '.g:NetrwMenuPriority.'.9.4 '.g:NetrwTopLvlMenu.'Browsing\ Control.Previewp p' + exe 'sil! menu '.g:NetrwMenuPriority.'.9.5 '.g:NetrwTopLvlMenu.'Browsing\ Control.Edit\ File\ Hiding\ List'." \'" + exe 'sil! menu '.g:NetrwMenuPriority.'.9.6 '.g:NetrwTopLvlMenu.'Browsing\ Control.Edit\ Sorting\ SequenceS S' + exe 'sil! menu '.g:NetrwMenuPriority.'.9.7 '.g:NetrwTopLvlMenu.'Browsing\ Control.Quick\ Hide/Unhide\ Dot\ Files'."gh gh" + exe 'sil! menu '.g:NetrwMenuPriority.'.9.8 '.g:NetrwTopLvlMenu.'Browsing\ Control.Refresh\ Listing'." \" + exe 'sil! menu '.g:NetrwMenuPriority.'.9.9 '.g:NetrwTopLvlMenu.'Browsing\ Control.Settings/Options:NetrwSettings '.":NetrwSettings\" + exe 'sil! menu '.g:NetrwMenuPriority.'.10 '.g:NetrwTopLvlMenu.'Delete\ File/DirectoryD D' + exe 'sil! menu '.g:NetrwMenuPriority.'.11.1 '.g:NetrwTopLvlMenu.'Edit\ File/Dir.Create\ New\ File% %' + exe 'sil! menu '.g:NetrwMenuPriority.'.11.1 '.g:NetrwTopLvlMenu.'Edit\ File/Dir.In\ Current\ Window '."\" + exe 'sil! menu '.g:NetrwMenuPriority.'.11.2 '.g:NetrwTopLvlMenu.'Edit\ File/Dir.Preview\ File/Directoryp p' + exe 'sil! menu '.g:NetrwMenuPriority.'.11.3 '.g:NetrwTopLvlMenu.'Edit\ File/Dir.In\ Previous\ WindowP P' + exe 'sil! menu '.g:NetrwMenuPriority.'.11.4 '.g:NetrwTopLvlMenu.'Edit\ File/Dir.In\ New\ Windowo o' + exe 'sil! menu '.g:NetrwMenuPriority.'.11.5 '.g:NetrwTopLvlMenu.'Edit\ File/Dir.In\ New\ Vertical\ Windowv v' + exe 'sil! menu '.g:NetrwMenuPriority.'.12.1 '.g:NetrwTopLvlMenu.'Explore.Directory\ Name :Explore ' + exe 'sil! menu '.g:NetrwMenuPriority.'.12.2 '.g:NetrwTopLvlMenu.'Explore.Filenames\ Matching\ Pattern\ (curdir\ only):Explore\ */ :Explore */' + exe 'sil! menu '.g:NetrwMenuPriority.'.12.2 '.g:NetrwTopLvlMenu.'Explore.Filenames\ Matching\ Pattern\ (+subdirs):Explore\ **/ :Explore **/' + exe 'sil! menu '.g:NetrwMenuPriority.'.12.3 '.g:NetrwTopLvlMenu.'Explore.Files\ Containing\ String\ Pattern\ (curdir\ only):Explore\ *// :Explore *//' + exe 'sil! menu '.g:NetrwMenuPriority.'.12.4 '.g:NetrwTopLvlMenu.'Explore.Files\ Containing\ String\ Pattern\ (+subdirs):Explore\ **// :Explore **//' + exe 'sil! menu '.g:NetrwMenuPriority.'.12.4 '.g:NetrwTopLvlMenu.'Explore.Next\ Match:Nexplore :Nexplore' + exe 'sil! menu '.g:NetrwMenuPriority.'.12.4 '.g:NetrwTopLvlMenu.'Explore.Prev\ Match:Pexplore :Pexplore' + exe 'sil! menu '.g:NetrwMenuPriority.'.13 '.g:NetrwTopLvlMenu.'Make\ Subdirectoryd d' + exe 'sil! menu '.g:NetrwMenuPriority.'.14.1 '.g:NetrwTopLvlMenu.'Marked\ Files.Mark\ Filemf mf' + exe 'sil! menu '.g:NetrwMenuPriority.'.14.2 '.g:NetrwTopLvlMenu.'Marked\ Files.Mark\ Files\ by\ Regexpmr mr' + exe 'sil! menu '.g:NetrwMenuPriority.'.14.3 '.g:NetrwTopLvlMenu.'Marked\ Files.Hide-Show-List\ Controla a' + exe 'sil! menu '.g:NetrwMenuPriority.'.14.4 '.g:NetrwTopLvlMenu.'Marked\ Files.Copy\ To\ Targetmc mc' + exe 'sil! menu '.g:NetrwMenuPriority.'.14.5 '.g:NetrwTopLvlMenu.'Marked\ Files.DeleteD D' + exe 'sil! menu '.g:NetrwMenuPriority.'.14.6 '.g:NetrwTopLvlMenu.'Marked\ Files.Diffmd md' + exe 'sil! menu '.g:NetrwMenuPriority.'.14.7 '.g:NetrwTopLvlMenu.'Marked\ Files.Editme me' + exe 'sil! menu '.g:NetrwMenuPriority.'.14.8 '.g:NetrwTopLvlMenu.'Marked\ Files.Exe\ Cmdmx mx' + exe 'sil! menu '.g:NetrwMenuPriority.'.14.9 '.g:NetrwTopLvlMenu.'Marked\ Files.Move\ To\ Targetmm mm' + exe 'sil! menu '.g:NetrwMenuPriority.'.14.10 '.g:NetrwTopLvlMenu.'Marked\ Files.ObtainO O' + exe 'sil! menu '.g:NetrwMenuPriority.'.14.11 '.g:NetrwTopLvlMenu.'Marked\ Files.Printmp mp' + exe 'sil! menu '.g:NetrwMenuPriority.'.14.12 '.g:NetrwTopLvlMenu.'Marked\ Files.ReplaceR R' + exe 'sil! menu '.g:NetrwMenuPriority.'.14.13 '.g:NetrwTopLvlMenu.'Marked\ Files.Set\ Targetmt mt' + exe 'sil! menu '.g:NetrwMenuPriority.'.14.14 '.g:NetrwTopLvlMenu.'Marked\ Files.TagmT mT' + exe 'sil! menu '.g:NetrwMenuPriority.'.14.15 '.g:NetrwTopLvlMenu.'Marked\ Files.Zip/Unzip/Compress/Uncompressmz mz' + exe 'sil! menu '.g:NetrwMenuPriority.'.15 '.g:NetrwTopLvlMenu.'Obtain\ FileO O' + exe 'sil! menu '.g:NetrwMenuPriority.'.16.1.1 '.g:NetrwTopLvlMenu.'Style.Listing.thini :let w:netrw_liststyle=0' + exe 'sil! menu '.g:NetrwMenuPriority.'.16.1.1 '.g:NetrwTopLvlMenu.'Style.Listing.longi :let w:netrw_liststyle=1' + exe 'sil! menu '.g:NetrwMenuPriority.'.16.1.1 '.g:NetrwTopLvlMenu.'Style.Listing.widei :let w:netrw_liststyle=2' + exe 'sil! menu '.g:NetrwMenuPriority.'.16.1.1 '.g:NetrwTopLvlMenu.'Style.Listing.treei :let w:netrw_liststyle=3' + exe 'sil! menu '.g:NetrwMenuPriority.'.16.2.1 '.g:NetrwTopLvlMenu.'Style.Normal-Hide-Show.Show\ Alla :let g:netrw_hide=0' + exe 'sil! menu '.g:NetrwMenuPriority.'.16.2.3 '.g:NetrwTopLvlMenu.'Style.Normal-Hide-Show.Normala :let g:netrw_hide=1' + exe 'sil! menu '.g:NetrwMenuPriority.'.16.2.2 '.g:NetrwTopLvlMenu.'Style.Normal-Hide-Show.Hidden\ Onlya :let g:netrw_hide=2' + exe 'sil! menu '.g:NetrwMenuPriority.'.16.3 '.g:NetrwTopLvlMenu.'Style.Reverse\ Sorting\ Order'."r r" + exe 'sil! menu '.g:NetrwMenuPriority.'.16.4.1 '.g:NetrwTopLvlMenu.'Style.Sorting\ Method.Names :let g:netrw_sort_by="name"' + exe 'sil! menu '.g:NetrwMenuPriority.'.16.4.2 '.g:NetrwTopLvlMenu.'Style.Sorting\ Method.Times :let g:netrw_sort_by="time"' + exe 'sil! menu '.g:NetrwMenuPriority.'.16.4.3 '.g:NetrwTopLvlMenu.'Style.Sorting\ Method.Sizes :let g:netrw_sort_by="size"' + exe 'sil! menu '.g:NetrwMenuPriority.'.17 '.g:NetrwTopLvlMenu.'Rename\ File/DirectoryR R' + exe 'sil! menu '.g:NetrwMenuPriority.'.18 '.g:NetrwTopLvlMenu.'Set\ Current\ Directoryc c' let s:netrw_menucnt= 28 + call s:NetrwBookmarkMenu() " provide some history! uses priorities 2,3, reserves 4, 8.2.x + call s:NetrwTgtMenu() " let bookmarks and history be easy targets elseif !a:domenu let s:netrwcnt = 0 @@ -5899,6 +6685,7 @@ endfun fun! s:NetrwObtain(islocal) " call Dfunc("NetrwObtain(islocal=".a:islocal.")") + let ykeep= @@ if exists("s:netrwmarkfilelist_{bufnr('%')}") let islocal= s:netrwmarkfilelist_{bufnr('%')}[1] !~ '^\a\+://' call netrw#NetrwObtain(islocal,s:netrwmarkfilelist_{bufnr('%')}) @@ -5906,218 +6693,11 @@ fun! s:NetrwObtain(islocal) else call netrw#NetrwObtain(a:islocal,expand("")) endif + let @@= ykeep " call Dret("NetrwObtain") endfun -" --------------------------------------------------------------------- -" netrw#NetrwObtain: {{{2 -" netrw#NetrwObtain(islocal,fname[,tgtdirectory]) -" islocal=0 obtain from remote source -" =1 obtain from local source -" fname : a filename or a list of filenames -" tgtdir : optional place where files are to go (not present, uses getcwd()) -fun! netrw#NetrwObtain(islocal,fname,...) -" call Dfunc("netrw#NetrwObtain(islocal=".a:islocal." fname<".((type(a:fname) == 1)? a:fname : string(a:fname)).">) a:0=".a:0) - " NetrwStatusLine support - for obtaining support - - if type(a:fname) == 1 - let fnamelist= [ a:fname ] - elseif type(a:fname) == 3 - let fnamelist= a:fname - else - call netrw#ErrorMsg(s:ERROR,"attempting to use NetrwObtain on something not a filename or a list",62) -" call Dret("netrw#NetrwObtain") - return - endif -" call Decho("fnamelist<".string(fnamelist).">") - if a:0 > 0 - let tgtdir= a:1 - else - let tgtdir= getcwd() - endif -" call Decho("tgtdir<".tgtdir.">") - - if exists("b:netrw_islocal") && b:netrw_islocal - " obtain a file from local b:netrw_curdir to (local) tgtdir -" call Decho("obtain a file from local ".b:netrw_curdir." to ".tgtdir) - if exists("b:netrw_curdir") && getcwd() != b:netrw_curdir - let topath= s:ComposePath(tgtdir,"") - if (has("win32") || has("win95") || has("win64") || has("win16")) - " transfer files one at time -" call Decho("transfer files one at a time") - for fname in fnamelist -" call Decho("system(".g:netrw_localcopycmd." ".shellescape(fname)." ".shellescape(topath).")") - call system(g:netrw_localcopycmd." ".shellescape(fname)." ".shellescape(topath)) - endfor - else - " transfer files with one command -" call Decho("transfer files with one command") - let filelist= join(map(deepcopy(fnamelist),"shellescape(v:val)")) -" call Decho("system(".g:netrw_localcopycmd." ".filelist." ".shellescape(topath).")") - call system(g:netrw_localcopycmd." ".filelist." ".shellescape(topath)) - endif - elseif !exists("b:netrw_curdir") - call netrw#ErrorMsg(s:ERROR,"local browsing directory doesn't exist!",36) - else - call netrw#ErrorMsg(s:WARNING,"local browsing directory and current directory are identical",37) - endif - - else - " obtain files from remote b:netrw_curdir to local tgtdir -" call Decho("obtain a file from remote ".b:netrw_curdir." to ".tgtdir) - if type(a:fname) == 1 - call s:SetupNetrwStatusLine('%f %h%m%r%=%9*Obtaining '.a:fname) - endif - call s:NetrwMethod(b:netrw_curdir) - - if b:netrw_method == 4 - " obtain file using scp -" call Decho("obtain via scp (method#4)") - if exists("g:netrw_port") && g:netrw_port != "" - let useport= " ".g:netrw_scpport." ".g:netrw_port - else - let useport= "" - endif - if b:netrw_fname =~ '/' - let path= substitute(b:netrw_fname,'^\(.*/\).\{-}$','\1','') - else - let path= "" - endif - let filelist= join(map(deepcopy(fnamelist),'shellescape(g:netrw_machine.":".path.v:val,1)')) -" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_scp_cmd.shellescape(useport,1)." ".filelist." ".shellescape(tgtdir,1)) - exe s:netrw_silentxfer."!".g:netrw_scp_cmd.shellescape(useport,1)." ".filelist." ".shellescape(tgtdir,1) - - elseif b:netrw_method == 2 - " obtain file using ftp + .netrc -" call Decho("obtain via ftp+.netrc (method #2)") - call s:SaveBufVars()|sil keepjumps new|call s:RestoreBufVars() - let tmpbufnr= bufnr("%") - setlocal ff=unix - if exists("g:netrw_ftpmode") && g:netrw_ftpmode != "" - keepj put =g:netrw_ftpmode -" call Decho("filter input: ".getline('$')) - endif - - if exists("b:netrw_fname") && b:netrw_fname != "" - call setline(line("$")+1,'cd "'.b:netrw_fname.'"') -" call Decho("filter input: ".getline('$')) - endif - - if exists("g:netrw_ftpextracmd") - keepj put =g:netrw_ftpextracmd -" call Decho("filter input: ".getline('$')) - endif - for fname in fnamelist - call setline(line("$")+1,'get "'.fname.'"') -" call Decho("filter input: ".getline('$')) - endfor - if exists("g:netrw_port") && g:netrw_port != "" -" call Decho("executing: %!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1)) - exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1) - else -" call Decho("executing: %!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)) - exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1) - endif - " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) - if getline(1) !~ "^$" && !exists("g:netrw_quiet") && getline(1) !~ '^Trying ' - let debugkeep= &debug - setlocal debug=msg - call netrw#ErrorMsg(s:ERROR,getline(1),4) - let &debug= debugkeep - endif - - elseif b:netrw_method == 3 - " obtain with ftp + machine, id, passwd, and fname (ie. no .netrc) -" call Decho("obtain via ftp+mipf (method #3)") - call s:SaveBufVars()|sil keepjumps new|call s:RestoreBufVars() - let tmpbufnr= bufnr("%") - setlocal ff=unix - - if exists("g:netrw_port") && g:netrw_port != "" - keepj put ='open '.g:netrw_machine.' '.g:netrw_port -" call Decho("filter input: ".getline('$')) - else - keepj put ='open '.g:netrw_machine -" call Decho("filter input: ".getline('$')) - endif - - if exists("g:netrw_uid") && g:netrw_uid != "" - if exists("g:netrw_ftp") && g:netrw_ftp == 1 - keepj put =g:netrw_uid -" call Decho("filter input: ".getline('$')) - if exists("s:netrw_passwd") && s:netrw_passwd != "" - keepj put ='\"'.s:netrw_passwd.'\"' - endif -" call Decho("filter input: ".getline('$')) - elseif exists("s:netrw_passwd") - keepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"' -" call Decho("filter input: ".getline('$')) - endif - endif - - if exists("g:netrw_ftpmode") && g:netrw_ftpmode != "" - keepj put =g:netrw_ftpmode -" call Decho("filter input: ".getline('$')) - endif - - if exists("b:netrw_fname") && b:netrw_fname != "" - keepj call setline(line("$")+1,'cd "'.b:netrw_fname.'"') -" call Decho("filter input: ".getline('$')) - endif - - if exists("g:netrw_ftpextracmd") - keepj put =g:netrw_ftpextracmd -" call Decho("filter input: ".getline('$')) - endif - - if exists("g:netrw_ftpextracmd") - keepj put =g:netrw_ftpextracmd -" call Decho("filter input: ".getline('$')) - endif - for fname in fnamelist - keepj call setline(line("$")+1,'get "'.fname.'"') - endfor -" call Decho("filter input: ".getline('$')) - - " perform ftp: - " -i : turns off interactive prompting from ftp - " -n unix : DON'T use <.netrc>, even though it exists - " -n win32: quit being obnoxious about password - keepj norm! 1Gdd -" call Decho("executing: %!".s:netrw_ftp_cmd." ".g:netrw_ftp_options) - exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." ".g:netrw_ftp_options - " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) - if getline(1) !~ "^$" -" call Decho("error<".getline(1).">") - if !exists("g:netrw_quiet") - keepj call netrw#ErrorMsg(s:ERROR,getline(1),5) - endif - endif - elseif !exists("b:netrw_method") || b:netrw_method < 0 -" call Dfunc("netrw#NetrwObtain : unsupported method") - return - endif - - " restore status line - if type(a:fname) == 1 && exists("s:netrw_users_stl") - keepj call s:SetupNetrwStatusLine(s:netrw_users_stl) - endif - - endif - - " cleanup - if exists("tmpbufnr") - if bufnr("%") != tmpbufnr - exe tmpbufnr."bw!" - else - q! - endif - endif - -" call Dret("netrw#NetrwObtain") -endfun - " --------------------------------------------------------------------- " s:NetrwPrevWinOpen: open file/directory in previous window. {{{2 " If there's only one window, then the window will first be split. @@ -6129,6 +6709,7 @@ endfun fun! s:NetrwPrevWinOpen(islocal) " call Dfunc("NetrwPrevWinOpen(islocal=".a:islocal.")") + let ykeep= @@ " grab a copy of the b:netrw_curdir to pass it along to newly split windows let curdir = b:netrw_curdir @@ -6187,6 +6768,7 @@ fun! s:NetrwPrevWinOpen(islocal) else wincmd p endif + let @@= ykeep " call Dret("NetrwPrevWinOpen ".choice." : unable to write <".bufname.">") return choice endif @@ -6206,6 +6788,7 @@ fun! s:NetrwPrevWinOpen(islocal) else wincmd p endif + let @@= ykeep " call Dret("NetrwPrevWinOpen ".choice." : cancelled") return choice endif @@ -6222,6 +6805,7 @@ fun! s:NetrwPrevWinOpen(islocal) call s:NetrwBrowse(a:islocal,s:NetrwBrowseChgDir(a:islocal,curword)) endif endif + let @@= ykeep " call Dret("NetrwPrevWinOpen ".choice) return choice endfun @@ -6338,7 +6922,7 @@ fun! s:NetrwUpload(fname,tgt,...) let netrw_fname= b:netrw_fname keepj call s:SaveBufVars()|sil keepj new|keepj call s:RestoreBufVars() let tmpbufnr= bufnr("%") - setlocal ff=unix + setl ff=unix if exists("g:netrw_port") && g:netrw_port != "" keepj put ='open '.g:netrw_machine.' '.g:netrw_port @@ -6392,7 +6976,7 @@ fun! s:NetrwUpload(fname,tgt,...) call histdel("/",-1) if getline(1) !~ "^$" && !exists("g:netrw_quiet") && getline(1) !~ '^Trying ' let debugkeep= &debug - setlocal debug=msg + setl debug=msg call netrw#ErrorMsg(s:ERROR,getline(1),15) let &debug = debugkeep let mod = 1 @@ -6415,6 +6999,7 @@ endfun " s:NetrwPreview: {{{2 fun! s:NetrwPreview(path) range " call Dfunc("NetrwPreview(path<".a:path.">)") + let ykeep= @@ keepj call s:NetrwOptionSave("s:") keepj call s:NetrwSafeOptions() if has("quickfix") @@ -6435,6 +7020,7 @@ fun! s:NetrwPreview(path) range keepj call netrw#ErrorMsg(s:WARNING,"sorry, to preview your vim needs the quickfix feature compiled in",39) endif keepj call s:NetrwOptionRestore("s:") + let @@= ykeep " call Dret("NetrwPreview") endfun @@ -6443,18 +7029,21 @@ endfun fun! s:NetrwRefresh(islocal,dirname) " call Dfunc("NetrwRefresh(islocal<".a:islocal.">,dirname=".a:dirname.") hide=".g:netrw_hide." sortdir=".g:netrw_sort_direction) " at the current time (Mar 19, 2007) all calls to NetrwRefresh() call NetrwBrowseChgDir() first. - " NetrwBrowseChgDir() may clear the display; hence a NetrwSavePosn() may not work if its placed here. - " Also, NetrwBrowseChgDir() now does a NetrwSavePosn() itself. - setlocal ma noro -" call Decho("setlocal ma noro") + " (defunct) NetrwBrowseChgDir() may clear the display; hence a NetrwSavePosn() may not work if its placed here. + " (defunct) Also, NetrwBrowseChgDir() now does a NetrwSavePosn() itself. + setl ma noro +" call Decho("setl ma noro") " call Decho("clear buffer<".expand("%")."> with :%d") + let ykeep = @@ + let screenposn = netrw#NetrwSavePosn() +" call Decho("clearing buffer prior to refresh") sil! keepj %d if a:islocal keepj call netrw#LocalBrowseCheck(a:dirname) else keepj call s:NetrwBrowse(a:islocal,a:dirname) endif - keepj call netrw#NetrwRestorePosn() + keepj call netrw#NetrwRestorePosn(screenposn) " restore file marks if exists("s:netrwmarkfilemtch_{bufnr('%')}") && s:netrwmarkfilemtch_{bufnr("%")} != "" @@ -6465,7 +7054,8 @@ fun! s:NetrwRefresh(islocal,dirname) 2match none endif -" redraw! +" restore + let @@= ykeep " call Dret("NetrwRefresh") endfun @@ -6474,7 +7064,7 @@ endfun " Called by NetrwMarkFileCopy() " Interfaces to s:NetrwRefresh() and s:LocalBrowseShellCmdRefresh() fun! s:NetrwRefreshDir(islocal,dirname) -" call Dfunc("s:NetrwRefreshDir(islocal=".a:islocal." dirname<".a:dirname.">) fastbrowse=".g:netrw_fastbrowse) +" call Dfunc("s:NetrwRefreshDir(islocal=".a:islocal." dirname<".a:dirname.">) g:netrw_fastbrowse=".g:netrw_fastbrowse) if g:netrw_fastbrowse == 0 " slowest mode (keep buffers refreshed, local or remote) " call Decho("slowest mode: keep buffers refreshed, local or remote") @@ -6510,6 +7100,7 @@ endfun " front. An "*" pattern handles the default priority. fun! s:NetrwSetSort() " call Dfunc("SetSort() bannercnt=".w:netrw_bannercnt) + let ykeep= @@ if w:netrw_liststyle == s:LONGLIST let seqlist = substitute(g:netrw_sort_sequence,'\$','\\%(\t\\|\$\\)','ge') else @@ -6570,10 +7161,42 @@ fun! s:NetrwSetSort() " be just digits themselves. exe 'sil keepj '.w:netrw_bannercnt.',$s/^\(\d\{3}'.g:netrw_sepchr.'\)\%(\d\{3}'.g:netrw_sepchr.'\)\+\ze./\1/e' keepj call histdel("/",-1) + let @@= ykeep " call Dret("SetSort") endfun +" --------------------------------------------------------------------- +" s:NetrwSetTgt: sets the target to the specified choice index {{{2 +" Implements [count]Tb (bookhist) +" [count]Th (bookhist) +" See :help netrw-qb for how to make the choice. +fun! s:NetrwSetTgt(bookhist,choice) +" call Dfunc("s:NetrwSetTgt(bookhist<".a:bookhist."> choice#".a:choice.")") + + if a:bookhist == 'b' + " supports choosing a bookmark as a target using a qb-generated list + let choice= a:choice - 1 + if exists("g:netrw_bookmarklist[".choice."]") + call netrw#NetrwMakeTgt(g:netrw_bookmarklist[choice]) + else + echomsg "Sorry, bookmark#".a:choice." doesn't exist!" + endif + + elseif a:bookhist == 'h' + " supports choosing a history stack entry as a target using a qb-generated list + let choice= (a:choice % g:netrw_dirhistmax) + 1 + if exists("g:netrw_dirhist_".choice) + let histentry = g:netrw_dirhist_{choice} + call netrw#NetrwMakeTgt(histentry) + else + echomsg "Sorry, history#".a:choice." not available!" + endif + endif + +" call Dret("s:NetrwSetTgt") +endfun + " ===================================================================== " s:NetrwSortStyle: change sorting style (name - time - size) and refresh display {{{2 fun! s:NetrwSortStyle(islocal) @@ -6600,6 +7223,7 @@ endfun fun! s:NetrwSplit(mode) " call Dfunc("s:NetrwSplit(mode=".a:mode.") alto=".g:netrw_alto." altv=".g:netrw_altv) + let ykeep= @@ call s:SaveWinVars() if a:mode == 0 @@ -6662,46 +7286,64 @@ fun! s:NetrwSplit(mode) let s:didsplit= 1 keepj call s:RestoreWinVars() keepj call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,s:NetrwGetWord())) - unlet s:didsplit - - else - keepj call netrw#ErrorMsg(s:ERROR,"(NetrwSplit) unsupported mode=".a:mode,45) - endif - -" call Dret("s:NetrwSplit") -endfun - -" --------------------------------------------------------------------- -" NetrwStatusLine: {{{2 -fun! NetrwStatusLine() - -" vvv NetrwStatusLine() debugging vvv -" let g:stlmsg="" -" if !exists("w:netrw_explore_bufnr") -" let g:stlmsg="!X" -" elseif w:netrw_explore_bufnr != bufnr("%") -" let g:stlmsg="explore_bufnr!=".bufnr("%") -" endif -" if !exists("w:netrw_explore_line") -" let g:stlmsg=" !X" -" elseif w:netrw_explore_line != line(".") -" let g:stlmsg=" explore_line!={line(.)<".line(".").">" -" endif -" if !exists("w:netrw_explore_list") -" let g:stlmsg=" !X" -" endif -" ^^^ NetrwStatusLine() debugging ^^^ + unlet s:didsplit - if !exists("w:netrw_explore_bufnr") || w:netrw_explore_bufnr != bufnr("%") || !exists("w:netrw_explore_line") || w:netrw_explore_line != line(".") || !exists("w:netrw_explore_list") - " restore user's status line - let &stl = s:netrw_users_stl - let &laststatus = s:netrw_users_ls - if exists("w:netrw_explore_bufnr")|unlet w:netrw_explore_bufnr|endif - if exists("w:netrw_explore_line") |unlet w:netrw_explore_line |endif - return "" else - return "Match ".w:netrw_explore_mtchcnt." of ".w:netrw_explore_listlen + keepj call netrw#ErrorMsg(s:ERROR,"(NetrwSplit) unsupported mode=".a:mode,45) + endif + + let @@= ykeep +" call Dret("s:NetrwSplit") +endfun + +" --------------------------------------------------------------------- +" s:NetrwTgtMenu: {{{2 +fun! s:NetrwTgtMenu() + if !exists("s:netrw_menucnt") + return + endif +" call Dfunc("s:NetrwTgtMenu()") + + " the following test assures that gvim is running, has menus available, and has menus enabled. + if has("gui") && has("menu") && has("gui_running") && &go =~# 'm' && g:netrw_menu + if exists("g:NetrwTopLvlMenu") +" call Decho("removing ".g:NetrwTopLvlMenu."Bookmarks menu item(s)") + exe 'sil! unmenu '.g:NetrwTopLvlMenu.'Targets' + endif + if !exists("s:netrw_initbookhist") + call s:NetrwBookHistRead() + endif + + " target bookmarked places + if exists("g:netrw_bookmarklist") && g:netrw_bookmarklist != [] && g:netrw_dirhistmax > 0 +" call Decho("installing bookmarks as easy targets") + let cnt= 1 + for bmd in g:netrw_bookmarklist + let ebmd= escape(bmd,g:netrw_menu_escape) + " show bookmarks for goto menu +" call Decho("menu: Targets: ".bmd) + exe 'sil! menu '.g:NetrwMenuPriority.".19.1.".cnt." ".g:NetrwTopLvlMenu.'Targets.'.ebmd." :call netrw#NetrwMakeTgt('".bmd."')\" + let cnt= cnt + 1 + endfor + endif + + " target directory browsing history + if exists("g:netrw_dirhistmax") && g:netrw_dirhistmax > 0 +" call Decho("installing history as easy targets (histmax=".g:netrw_dirhistmax.")") + let histcnt = 1 + while histcnt <= g:netrw_dirhistmax + let priority = g:netrw_dirhist_cnt + histcnt + if exists("g:netrw_dirhist_{histcnt}") + let histentry = g:netrw_dirhist_{histcnt} + let ehistentry = escape(histentry,g:netrw_menu_escape) +" call Decho("menu: Targets: ".histentry) + exe 'sil! menu '.g:NetrwMenuPriority.".19.2.".priority." ".g:NetrwTopLvlMenu.'Targets.'.ehistentry." :call netrw#NetrwMakeTgt('".histentry."')\" + endif + let histcnt = histcnt + 1 + endwhile + endif endif +" call Dret("s:NetrwTgtMenu") endfun " --------------------------------------------------------------------- @@ -6711,12 +7353,12 @@ fun! s:NetrwTreeDir() " call Dfunc("NetrwTreeDir() curline#".line(".")."<".getline('.')."> b:netrw_curdir<".b:netrw_curdir."> tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%").">") let treedir= b:netrw_curdir -" call Decho("set initial treedir<".treedir.">") +" call Decho("(NetrwTreeDir) set initial treedir<".treedir.">") let s:treecurpos= netrw#NetrwSavePosn() if w:netrw_liststyle == s:TREELIST -" call Decho("w:netrrw_liststyle is TREELIST:") -" call Decho("line#".line(".")." getline(.)<".getline('.')."> treecurpos<".string(s:treecurpos).">") +" call Decho("(NetrwTreeDir) w:netrw_liststyle is TREELIST:") +" call Decho("(NetrwTreeDir) line#".line(".")." getline(.)<".getline('.')."> treecurpos<".string(s:treecurpos).">") " extract tree directory if on a line specifying a subdirectory (ie. ends with "/") if getline('.') =~ '/$' @@ -6724,13 +7366,13 @@ fun! s:NetrwTreeDir() else let treedir= "" endif -" call Decho("treedir<".treedir.">") +" call Decho("(NetrwTreeDir) treedir<".treedir.">") " detect user attempting to close treeroot if getline('.') !~ '|' && getline('.') != '..' " call Decho("user attempted to close treeroot") " now force a refresh -" call Decho("clear buffer<".expand("%")."> with :%d") +" call Decho("(NetrwTreeDir) clear buffer<".expand("%")."> with :%d") sil! keepj %d " call Dret("NetrwTreeDir <".treedir."> : (side effect) s:treecurpos<".string(s:treecurpos).">") return b:netrw_curdir @@ -6738,26 +7380,26 @@ fun! s:NetrwTreeDir() " elide all non-depth information let depth = substitute(getline('.'),'^\(\%(| \)*\)[^|].\{-}$','\1','e') -" call Decho("depth<".depth."> 1st subst (non-depth info removed)") +" call Decho("(NetrwTreeDir) depth<".depth."> 1st subst (non-depth info removed)") " elide first depth let depth = substitute(depth,'^| ','','') -" call Decho("depth<".depth."> 2nd subst (first depth removed)") +" call Decho("(NetrwTreeDir) depth<".depth."> 2nd subst (first depth removed)") " construct treedir by searching backwards at correct depth -" call Decho("constructing treedir<".treedir."> depth<".depth.">") +" call Decho("(NetrwTreeDir) constructing treedir<".treedir."> depth<".depth.">") while depth != "" && search('^'.depth.'[^|].\{-}/$','bW') let dirname= substitute(getline('.'),'^\(| \)*','','e') let treedir= dirname.treedir let depth = substitute(depth,'^| ','','') -" call Decho("constructing treedir<".treedir.">: dirname<".dirname."> while depth<".depth.">") +" call Decho("(NetrwTreeDir) constructing treedir<".treedir.">: dirname<".dirname."> while depth<".depth.">") endwhile if w:netrw_treetop =~ '/$' let treedir= w:netrw_treetop.treedir else let treedir= w:netrw_treetop.'/'.treedir endif -" call Decho("bufnr(.)=".bufnr("%")." line($)=".line("$")." line(.)=".line(".")) +" call Decho("(NetrwTreeDir) bufnr(.)=".bufnr("%")." line($)=".line("$")." line(.)=".line(".")) endif let treedir= substitute(treedir,'//$','/','') @@ -6771,7 +7413,7 @@ fun! s:NetrwTreeDisplay(dir,depth) " call Dfunc("NetrwTreeDisplay(dir<".a:dir."> depth<".a:depth.">)") " insure that there are no folds - setlocal nofen + setl nofen " install ../ and shortdir if a:depth == "" @@ -6875,8 +7517,8 @@ fun! s:NetrwWideListing() " cpf: characters per filename " fpl: filenames per line " fpc: filenames per column - setlocal ma noro -" call Decho("setlocal ma noro") + setl ma noro +" call Decho("setl ma noro") let b:netrw_cpf= 0 if line("$") >= w:netrw_bannercnt exe 'sil keepj '.w:netrw_bannercnt.',$g/^./if virtcol("$") > b:netrw_cpf|let b:netrw_cpf= virtcol("$")|endif' @@ -6918,11 +7560,20 @@ fun! s:NetrwWideListing() sil! let @*= keepregstar exe "sil! keepj ".w:netrw_bannercnt.',$s/\s\+$//e' keepj call histdel("/",-1) + exe "nmap w /^\\\\|\\s\\s\\zs\\S/\" + exe "nmap b ?^\\\\|\\s\\s\\zs\\S?\" " call Decho("NetrwWideListing) setl noma nomod ro") setl noma nomod ro " call Decho("(NetrwWideListing) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") " call Dret("NetrwWideListing") return + else + if hasmapto("w","n") + sil! nunmap w + endif + if hasmapto("b","n") + sil! nunmap b + endif endif endfun @@ -6933,28 +7584,28 @@ fun! s:PerformListing(islocal) " call Dfunc("s:PerformListing(islocal=".a:islocal.") bufnr(%)=".bufnr("%")."<".bufname("%").">") " set up syntax highlighting {{{3 -" call Decho("set up syntax highlighting") +" call Decho("(PerformListing) set up syntax highlighting") if has("syntax") if !exists("g:syntax_on") || !g:syntax_on -" call Decho("but g:syntax_on".(exists("g:syntax_on")? "=".g:syntax_on : "")) - setlocal ft= +" call Decho("(PerformListing) but g:syntax_on".(exists("g:syntax_on")? "=".g:syntax_on : "")) + setl ft= elseif &ft != "netrw" - setlocal ft=netrw + setl ft=netrw endif endif keepj call s:NetrwSafeOptions() - setlocal noro ma -" call Decho("setlocal noro ma") + set noro ma +" call Decho("(PerformListing) setl noro ma bh=".&bh) " if exists("g:netrw_silent") && g:netrw_silent == 0 && &ch >= 1 " Decho -" call Decho("(netrw) Processing your browsing request...") +" call Decho("(PerformListing) (netrw) Processing your browsing request...") " endif " Decho " call Decho('w:netrw_liststyle='.(exists("w:netrw_liststyle")? w:netrw_liststyle : 'n/a')) if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") " force a refresh for tree listings -" call Decho("force refresh for treelisting: clear buffer<".expand("%")."> with :%d") +" call Decho("(PerformListing) force refresh for treelisting: clear buffer<".expand("%")."> with :%d") sil! keepj %d endif @@ -6963,10 +7614,14 @@ fun! s:PerformListing(islocal) " Set up the banner {{{3 if g:netrw_banner -" call Decho("set up banner") +" call Decho("(PerformListing) set up banner") keepj call setline(1,'" ============================================================================') keepj call setline(2,'" Netrw Directory Listing (netrw '.g:loaded_netrw.')') - keepj call setline(3,'" '.b:netrw_curdir) + if exists("g:netrw_bannerbackslash") && g:netrw_bannerbackslash + keepj call setline(3,'" '.substitute(b:netrw_curdir,'/','\\','g')) + else + keepj call setline(3,'" '.b:netrw_curdir) + endif let w:netrw_bannercnt= 3 keepj exe "sil! keepj ".w:netrw_bannercnt else @@ -6981,15 +7636,15 @@ fun! s:PerformListing(islocal) " Sorted by... {{{3 if g:netrw_banner -" call Decho("handle specified sorting: g:netrw_sort_by<".g:netrw_sort_by.">") +" call Decho("(PerformListing) handle specified sorting: g:netrw_sort_by<".g:netrw_sort_by.">") if g:netrw_sort_by =~ "^n" -" call Decho("directories will be sorted by name") +" call Decho("(PerformListing) directories will be sorted by name") " sorted by name keepj put ='\" Sorted by '.sortby keepj put ='\" Sort sequence: '.g:netrw_sort_sequence let w:netrw_bannercnt= w:netrw_bannercnt + 2 else -" call Decho("directories will be sorted by size or time") +" call Decho("(PerformListing) directories will be sorted by size or time") " sorted by size or date keepj put ='\" Sorted by '.sortby let w:netrw_bannercnt= w:netrw_bannercnt + 1 @@ -7000,7 +7655,7 @@ fun! s:PerformListing(islocal) " show copy/move target, if any if g:netrw_banner if exists("s:netrwmftgt") && exists("s:netrwmftgt_islocal") -" call Decho("show copy/move target<".s:netrwmftgt.">") +" call Decho("(PerformListing) show copy/move target<".s:netrwmftgt.">") keepj put ='' if s:netrwmftgt_islocal sil! keepj call setline(line("."),'" Copy/Move Tgt: '.s:netrwmftgt.' (local)') @@ -7009,14 +7664,14 @@ fun! s:PerformListing(islocal) endif let w:netrw_bannercnt= w:netrw_bannercnt + 1 else -" call Decho("s:netrwmftgt does not exist, don't make Copy/Move Tgt") +" call Decho("(PerformListing) s:netrwmftgt does not exist, don't make Copy/Move Tgt") endif exe "sil! keepj ".w:netrw_bannercnt endif " Hiding... -or- Showing... {{{3 if g:netrw_banner -" call Decho("handle hiding/showing (g:netrw_hide=".g:netrw_list_hide." g:netrw_list_hide<".g:netrw_list_hide.">)") +" call Decho("(PerformListing) handle hiding/showing (g:netrw_hide=".g:netrw_list_hide." g:netrw_list_hide<".g:netrw_list_hide.">)") if g:netrw_list_hide != "" && g:netrw_hide if g:netrw_hide == 1 keepj put ='\" Hiding: '.g:netrw_list_hide @@ -7035,37 +7690,38 @@ fun! s:PerformListing(islocal) if g:netrw_banner let w:netrw_bannercnt= w:netrw_bannercnt + 1 exe "sil! keepj ".w:netrw_bannercnt -" call Decho("bannercnt=".w:netrw_bannercnt." (should index line just after banner) line($)=".line("$")) +" call Decho("(PerformListing) w:netrw_bannercnt=".w:netrw_bannercnt." (should index line just after banner) line($)=".line("$")) endif " get list of files -" call Decho("Get list of files - islocal=".a:islocal) +" call Decho("(PerformListing) Get list of files - islocal=".a:islocal) if a:islocal keepj call s:LocalListing() else " remote keepj call s:NetrwRemoteListing() endif -" call Decho("g:netrw_banner=".g:netrw_banner." w:netrw_bannercnt=".w:netrw_bannercnt." (banner complete)") " manipulate the directory listing (hide, sort) {{{3 if !exists("w:netrw_bannercnt") let w:netrw_bannercnt= 0 endif +" call Decho("(PerformListing) g:netrw_banner=".g:netrw_banner." w:netrw_bannercnt=".w:netrw_bannercnt." (banner complete)") + if !g:netrw_banner || line("$") >= w:netrw_bannercnt -" call Decho("manipulate directory listing (hide)") -" call Decho("g:netrw_hide=".g:netrw_hide." g:netrw_list_hide<".g:netrw_list_hide.">") +" call Decho("(PerformListing) manipulate directory listing (hide)") +" call Decho("(PerformListing) g:netrw_hide=".g:netrw_hide." g:netrw_list_hide<".g:netrw_list_hide.">") if g:netrw_hide && g:netrw_list_hide != "" keepj call s:NetrwListHide() endif if !g:netrw_banner || line("$") >= w:netrw_bannercnt -" call Decho("manipulate directory listing (sort) : g:netrw_sort_by<".g:netrw_sort_by.">") +" call Decho("(PerformListing) manipulate directory listing (sort) : g:netrw_sort_by<".g:netrw_sort_by.">") if g:netrw_sort_by =~ "^n" " sort by name keepj call s:NetrwSetSort() if !g:netrw_banner || w:netrw_bannercnt < line("$") -" call Decho("g:netrw_sort_direction=".g:netrw_sort_direction." (bannercnt=".w:netrw_bannercnt.")") +" call Decho("(PerformListing) g:netrw_sort_direction=".g:netrw_sort_direction." (bannercnt=".w:netrw_bannercnt.")") if g:netrw_sort_direction =~ 'n' " normal direction sorting exe 'sil keepj '.w:netrw_bannercnt.',$sort'.' '.g:netrw_sort_options @@ -7075,13 +7731,13 @@ fun! s:PerformListing(islocal) endif endif " remove priority pattern prefix -" call Decho("remove priority pattern prefix") +" call Decho("(PerformListing) remove priority pattern prefix") exe 'sil! keepj '.w:netrw_bannercnt.',$s/^\d\{3}'.g:netrw_sepchr.'//e' keepj call histdel("/",-1) elseif a:islocal if !g:netrw_banner || w:netrw_bannercnt < line("$") -" call Decho("g:netrw_sort_direction=".g:netrw_sort_direction) +" call Decho("(PerformListing) g:netrw_sort_direction=".g:netrw_sort_direction) if g:netrw_sort_direction =~ 'n' " call Decho('exe sil keepjumps '.w:netrw_bannercnt.',$sort') exe 'sil! keepj '.w:netrw_bannercnt.',$sort'.' '.g:netrw_sort_options @@ -7104,28 +7760,32 @@ fun! s:PerformListing(islocal) endif " convert to wide/tree listing {{{3 -" call Decho("modify display if wide/tree listing style") +" call Decho("(PerformListing) modify display if wide/tree listing style") keepj call s:NetrwWideListing() keepj call s:NetrwTreeListing(b:netrw_curdir) if exists("w:netrw_bannercnt") && (line("$") > w:netrw_bannercnt || !g:netrw_banner) " place cursor on the top-left corner of the file listing -" call Decho("place cursor on top-left corner of file listing") +" call Decho("(PerformListing) place cursor on top-left corner of file listing") exe 'sil! keepj '.w:netrw_bannercnt sil! keepj norm! 0 endif " record previous current directory let w:netrw_prvdir= b:netrw_curdir -" call Decho("record netrw_prvdir<".w:netrw_prvdir.">") +" call Decho("(PerformListing) record netrw_prvdir<".w:netrw_prvdir.">") " save certain window-oriented variables into buffer-oriented variables {{{3 keepj call s:SetBufWinVars() keepj call s:NetrwOptionRestore("w:") " set display to netrw display settings -" call Decho("set display to netrw display settings (noma nomod etc)") +" call Decho("(PerformListing) set display to netrw display settings (".g:netrw_bufsettings.")") exe "setl ".g:netrw_bufsettings + if g:netrw_liststyle == s:LONGLIST +" call Decho("(PerformListing) exe setl ts=".(g:netrw_maxfilenamelen+1)) + exe "setl ts=".(g:netrw_maxfilenamelen+1) + endif if exists("s:treecurpos") keepj call netrw#NetrwRestorePosn(s:treecurpos) @@ -7171,7 +7831,7 @@ fun! s:SetupNetrwStatusLine(statline) " insure that windows have a statusline " make sure statusline is displayed let &stl=a:statline - setlocal laststatus=2 + setl laststatus=2 " call Decho("stl=".&stl) redraw @@ -7188,10 +7848,18 @@ fun! s:NetrwRemoteListing() " call Dfunc("s:NetrwRemoteListing() b:netrw_curdir<".b:netrw_curdir.">)") call s:RemotePathAnalysis(b:netrw_curdir) +" call Decho("b:netrw_method#".(exists("b:netrw_method")? b:netrw_method : 'n/a')) +" call Decho("g:netrw_list_cmd<".(exists("g:netrw_list_cmd")? g:netrw_list_cmd : 'n/a').">") +" call Decho("ssh is ".(executable("ssh")? "" : "not ")."executable") +" call Decho("ftp is ".(executable("ftp")? "" : "not ")."executable") +" call Decho("sftp is ".(executable("sftp")? "" : "not ")."executable") " sanity check: if exists("b:netrw_method") && b:netrw_method =~ '[235]' -" call Decho("b:netrw_method=".b:netrw_method) + " b:netrw_method = 2: ftp+.netrc + " b:netrw_method = 3: ftp+machine,id,p/w,filename (ie. no .netrc) + " b:netrw_method = 5: wget (http) +" call Decho("b:netrw_method=".b:netrw_method." (for ".s:method.")") if !executable("ftp") if !exists("g:netrw_quiet") call netrw#ErrorMsg(s:ERROR,"this system doesn't support remote directory listing via ftp",18) @@ -7201,10 +7869,11 @@ fun! s:NetrwRemoteListing() return endif - elseif !exists("g:netrw_list_cmd") || g:netrw_list_cmd == '' + elseif s:method == "scp" && (!exists("g:netrw_list_cmd") || g:netrw_list_cmd == '') +" call Decho("g:netrw_list_cmd<".(exists("g:netrw_list_cmd")? g:netrw_list_cmd : 'n/a').">") if !exists("g:netrw_quiet") - if g:netrw_list_cmd == "" - keepj call netrw#ErrorMsg(s:ERROR,g:netrw_ssh_cmd." is not executable on your system",47) + if !exists("g:netrw_list_cmd") || g:netrw_list_cmd == "" + keepj call netrw#ErrorMsg(s:ERROR,"neither ssh nor ftp"." is executable on your system",47) else keepj call netrw#ErrorMsg(s:ERROR,"this system doesn't support remote directory listing via ".g:netrw_list_cmd,19) endif @@ -7216,15 +7885,15 @@ fun! s:NetrwRemoteListing() endif " (remote handling sanity check) if exists("b:netrw_method") -" call Decho("setting w:netrw_method<".b:netrw_method.">") +" call Decho("setting w:netrw_method to b:netrw_method<".b:netrw_method.">") let w:netrw_method= b:netrw_method endif if s:method == "ftp" " use ftp to get remote file listing {{{3 " call Decho("use ftp to get remote file listing") - let s:method = "ftp" - let listcmd = g:netrw_ftp_list_cmd + let s:method = "ftp" + let listcmd = g:netrw_ftp_list_cmd if g:netrw_sort_by =~ '^t' let listcmd= g:netrw_ftp_timelist_cmd elseif g:netrw_sort_by =~ '^s' @@ -7247,14 +7916,14 @@ fun! s:NetrwRemoteListing() sil! keepj %s/\r$//e keepj call histdel("/",-1) - " if there's no ../ listed, then put ./ and ../ in + " if there's no ../ listed, then put ../ in let line1= line(".") exe "sil! keepj ".w:netrw_bannercnt - let line2= search('^\.\.\/\%(\s\|$\)','cnW') + let line2= search('\.\.\/\%(\s\|$\)','cnW') +" call Decho("search(".'\.\.\/\%(\s\|$\)'."','cnW')=".line2." w:netrw_bannercnt=".w:netrw_bannercnt) if line2 == 0 -" call Decho("netrw is putting ./ and ../ into listing") +" call Decho("netrw is putting ../ into listing") sil! keepj put='../' - sil! keepj put='./' endif exe "sil! keepj ".line1 sil! keepj norm! 0 @@ -7323,13 +7992,12 @@ fun! s:NetrwRemoteListing() while getline('.') =~ g:netrw_ftp_browse_reject sil! keepj d endwhile - " if there's no ../ listed, then put ./ and ../ in + " if there's no ../ listed, then put ../ in let line1= line(".") sil! keepj 1 sil! keepj call search('^\.\.\/\%(\s\|$\)','W') let line2= line(".") if line2 == 0 - exe 'sil! keepj '.w:netrw_bannercnt."put='./'" if b:netrw_curdir != '/' exe 'sil! keepj '.w:netrw_bannercnt."put='../'" endif @@ -7471,7 +8139,6 @@ fun! s:NetrwRemoteRmFile(path,rmfile,all) endif elseif ok =~ 'q\%[uit]' " call Decho("ok==".ok) - break endif else @@ -7514,7 +8181,7 @@ fun! s:NetrwRemoteRmFile(path,rmfile,all) endif elseif ok =~ 'q\%[uit]' - break +" call Decho("ok==".ok) endif endif @@ -7528,13 +8195,22 @@ endfun " and reverse sorts will be requested of the server but not otherwise " enforced here. fun! s:NetrwRemoteFtpCmd(path,listcmd) -" call Dfunc("NetrwRemoteFtpCmd(path<".a:path."> listcmd<".a:listcmd.">) netrw_method=".w:netrw_method) -" call Decho("line($)=".line("$")." bannercnt=".w:netrw_bannercnt) +" call Dfunc("NetrwRemoteFtpCmd(path<".a:path."> listcmd<".a:listcmd.">) w:netrw_method=".(exists("w:netrw_method")? w:netrw_method : (exists("b:netrw_method")? b:netrw_method : "???"))) +" call Decho("line($)=".line("$")." w:netrw_bannercnt=".w:netrw_bannercnt) + if !exists("w:netrw_method") + if exists("b:netrw_method") + let w:netrw_method= b:netrw_method + else + call netrw#ErrorMsg(2,"(s:NetrwRemoteFtpCmd) internal netrw error",93) +" call Dret("NetrwRemoteFtpCmd") + return + endif + endif " because WinXX ftp uses unix style input let ffkeep= &ff - setlocal ma ff=unix noro -" call Decho("setlocal ma ff=unix noro") + setl ma ff=unix noro +" call Decho("setl ma ff=unix noro") " clear off any older non-banner lines " note that w:netrw_bannercnt indexes the line after the banner @@ -7564,7 +8240,7 @@ fun! s:NetrwRemoteFtpCmd(path,listcmd) "......................................... elseif w:netrw_method == 3 " ftp + machine,id,passwd,filename: Method #3 - setlocal ff=unix + setl ff=unix if exists("g:netrw_port") && g:netrw_port != "" keepj put ='open '.g:netrw_machine.' '.g:netrw_port else @@ -7720,6 +8396,56 @@ endfun " Local Directory Browsing Support: {{{1 " ========================================== +" --------------------------------------------------------------------- +" netrw#FileUrlRead: handles reading file://* files {{{2 +" Should accept: file://localhost/etc/fstab +" file:///etc/fstab +" file:///c:/WINDOWS/clock.avi +" file:///c|/WINDOWS/clock.avi +" file://localhost/c:/WINDOWS/clock.avi +" file://localhost/c|/WINDOWS/clock.avi +" file://c:/foo.txt +" file:///c:/foo.txt +" and %XX (where X is [0-9a-fA-F] is converted into a character with the given hexadecimal value +fun! netrw#FileUrlRead(fname) +" call Dfunc("netrw#FileUrlRead(fname<".a:fname.">)") + let fname = a:fname + if fname =~ '^file://localhost/' +" call Decho('converting file://localhost/ -to- file:///') + let fname= substitute(fname,'^file://localhost/','file:///','') +" call Decho("fname<".fname.">") + endif + if (has("win32") || has("win95") || has("win64") || has("win16")) + if fname =~ '^file:///\=\a[|:]/' +" call Decho('converting file:///\a|/ -to- file://\a:/') + let fname = substitute(fname,'^file:///\=\(\a\)[|:]/','file://\1:/','') +" call Decho("fname<".fname.">") + endif + endif + let fname2396 = netrw#RFC2396(fname) + let fname2396e= fnameescape(fname2396) + let plainfname= substitute(fname2396,'file://\(.*\)','\1',"") + if (has("win32") || has("win95") || has("win64") || has("win16")) +" call Decho("windows exception for plainfname") + if plainfname =~ '^/\+\a:' +" call Decho('removing leading "/"s') + let plainfname= substitute(plainfname,'^/\+\(\a:\)','\1','') + endif + endif +" call Decho("fname2396<".fname2396.">") +" call Decho("plainfname<".plainfname.">") + exe "sil doau BufReadPre ".fname2396e + exe 'keepj r '.plainfname + exe 'sil! bdelete '.plainfname + exe 'keepalt file! '.plainfname + keepj 1d +" call Decho("(FileUrlRead) setl nomod") + setl nomod +" call Decho("(FileUrlRead) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") +" call Dret("netrw#FileUrlRead") + exe "sil doau BufReadPost ".fname2396e +endfun + " --------------------------------------------------------------------- " netrw#LocalBrowseCheck: {{{2 fun! netrw#LocalBrowseCheck(dirname) @@ -7730,19 +8456,38 @@ fun! netrw#LocalBrowseCheck(dirname) " The &ft == "netrw" test was installed because the BufEnter event " would hit when re-entering netrw windows, creating unexpected " refreshes (and would do so in the middle of NetrwSaveOptions(), too) -" call Decho("netrw#LocalBrowseCheck: isdir<".a:dirname.">=".isdirectory(a:dirname).((exists("s:treeforceredraw")? " treeforceredraw" : ""))) +" call Decho("(LocalBrowseCheck) isdir<".a:dirname.">=".isdirectory(a:dirname).((exists("s:treeforceredraw")? " treeforceredraw" : ""))) " call Dredir("LocalBrowseCheck","ls!")|redraw!|sleep 3 + let ykeep= @@ if isdirectory(a:dirname) -" call Decho(" ft<".&ft."> b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : " doesn't exist")."> dirname<".a:dirname.">"." line($)=".line("$")) - if &ft != "netrw" || (exists("b:netrw_curdir") && b:netrw_curdir != a:dirname) - sil! keepj call s:NetrwBrowse(1,a:dirname) +" call Decho("(LocalBrowseCheck) is-directory ft<".&ft."> b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : " doesn't exist")."> dirname<".a:dirname.">"." line($)=".line("$")." ft<".&ft."> g:netrw_fastbrowse=".g:netrw_fastbrowse) + let svposn= netrw#NetrwSavePosn() + if &ft != "netrw" || (exists("b:netrw_curdir") && b:netrw_curdir != a:dirname) || g:netrw_fastbrowse <= 1 + sil! keepj keepalt call s:NetrwBrowse(1,a:dirname) + keepalt call netrw#NetrwRestorePosn(svposn) elseif &ft == "netrw" && line("$") == 1 - sil! keepj call s:NetrwBrowse(1,a:dirname) + sil! keepj keepalt call s:NetrwBrowse(1,a:dirname) + keepalt call netrw#NetrwRestorePosn(svposn) elseif exists("s:treeforceredraw") unlet s:treeforceredraw - sil! keepj call s:NetrwBrowse(1,a:dirname) + sil! keepj keepalt call s:NetrwBrowse(1,a:dirname) + keepalt call netrw#NetrwRestorePosn(svposn) endif endif + " following code wipes out currently unused netrw buffers + " IF g:netrw_fastbrowse is zero (ie. slow browsing selected) + " AND IF the listing style is not a tree listing + if exists("g:netrw_fastbrowse") && g:netrw_fastbrowse == 0 && g:netrw_liststyle != s:TREELIST + let ibuf = 1 + let buflast = bufnr("$") + while ibuf <= buflast + if bufwinnr(ibuf) == -1 && isdirectory(bufname(ibuf)) + exe "sil! keepalt ".ibuf."bw!" + endif + let ibuf= ibuf + 1 + endwhile + endif + let @@= ykeep " not a directory, ignore it endfun @@ -7753,69 +8498,38 @@ fun! s:LocalListing() " call Decho("(LocalListing) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") " call Decho("(LocalListing) tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> modified=".&modified." modifiable=".&modifiable." readonly=".&readonly) -" if exists("b:netrw_curdir") |call Decho('b:netrw_curdir<'.b:netrw_curdir.">") |else|call Decho("b:netrw_curdir doesn't exist") |endif -" if exists("g:netrw_sort_by")|call Decho('g:netrw_sort_by<'.g:netrw_sort_by.">")|else|call Decho("g:netrw_sort_by doesn't exist")|endif +" if exists("b:netrw_curdir") |call Decho('(LocalListing) b:netrw_curdir<'.b:netrw_curdir.">") |else|call Decho("(LocalListing) b:netrw_curdir doesn't exist") |endif +" if exists("g:netrw_sort_by")|call Decho('(LocalListing) g:netrw_sort_by<'.g:netrw_sort_by.">")|else|call Decho("(LocalListing) g:netrw_sort_by doesn't exist")|endif " get the list of files contained in the current directory let dirname = b:netrw_curdir let dirnamelen = s:Strlen(b:netrw_curdir) - let filelist = glob(s:ComposePath(fnameescape(dirname),"*")) -" call Decho("(LocalListing) glob(dirname<".dirname."/*>)=".filelist) - if filelist != "" - let filelist= filelist."\n" - endif - let filelist= filelist.glob(s:ComposePath(fnameescape(dirname),".*")) -" call Decho("(LocalListing) glob(dirname<".dirname."/.*>)=".filelist) - - " Coding choice: either elide ./ if present - " or include ./ if not present - if filelist =~ '[\\/]\.[\\/]\=\(\n\|$\)' - " elide /path/. from glob() entries if present -" call Decho("(LocalListing) elide /path/. from glob entries if present") - let filelist = substitute(filelist,'\n','\t','g') - let filelist = substitute(filelist,'^[^\t]\+[/\\]\.\t','','') - let filelist = substitute(filelist,'[^\t]\+[/\\]\.$','','') - let filelist = substitute(filelist,'\t\zs[^\t]\+[/\\]\.\t','','') - let filelist = substitute(filelist,'\t','\n','g') - endif -" call Decho("(LocalListing) filelist<".filelist.">") - if filelist !~ '[\\/]\.\.[\\/]\=\(\n\|$\)' + let filelist = glob(s:ComposePath(dirname,"*"),0,1) + let filelist = filelist + glob(s:ComposePath(dirname,".*"),0,1) +" call Decho("(LocalListing) filelist=".filelist) + + if g:netrw_cygwin == 0 && (has("win32") || has("win95") || has("win64") || has("win16")) +" call Decho("(LocalListing) filelist=".string(filelist)) + elseif index(filelist,'..') == -1 && b:netrw_curdir !~ '/' " include ../ in the glob() entry if its missing -" call Decho("(LocalListing) forcibly tacking on ..") - let filelist= filelist."\n".s:ComposePath(b:netrw_curdir,"../") -" call Decho("(LocalListing) filelist<".filelist.">") - endif - if b:netrw_curdir == '/' - " remove .. from filelist when current directory is root directory -" call Decho("(LocalListing) remove .. from filelist") - let filelist= substitute(filelist,'/\.\.\n','','') - endif - " remove multiple contiguous newlines - let filelist= substitute(filelist,'\n\{2,}','\n','ge') - if !g:netrw_cygwin && (has("win32") || has("win95") || has("win64") || has("win16")) - " change all \s to /s -" call Decho('(LocalListing) change all \s to /s') - let filelist= substitute(filelist,'\','/','g') - else - " escape all \s to \\ -" call Decho('(LocalListing) escape all \s to \\') - let filelist= substitute(filelist,'\','\\','g') +" call Decho("(LocalListing) forcibly including on \"..\"") + let filelist= filelist+[s:ComposePath(b:netrw_curdir,"../")] +" call Decho("(LocalListing) filelist=".string(filelist)) endif " call Decho("(LocalListing) (before while) dirname<".dirname.">") " call Decho("(LocalListing) (before while) dirnamelen<".dirnamelen.">") -" call Decho("(LocalListing) (before while) filelist<".filelist.">") +" call Decho("(LocalListing) (before while) filelist=".string(filelist)) - while filelist != "" - if filelist =~ '\n' - let filename = substitute(filelist,'\n.*$','','e') - let filelist = substitute(filelist,'^.\{-}\n\(.*\)$','\1','e') - else - let filename = filelist - let filelist = "" - endif -" call Decho(" ") -" call Decho("(LocalListing) (while) filelist<".filelist.">") + if get(g:, 'netrw_dynamic_maxfilenamelen', 0) + let filelistcopy = map(deepcopy(filelist),'fnamemodify(v:val, ":t")') + let g:netrw_maxfilenamelen = max(map(filelistcopy,'len(v:val)')) + 1 +" call Decho("(LocalListing) dynamic_maxfilenamelen: filenames =".string(filelistcopy)) +" call Decho("(LocalListing) dynamic_maxfilenamelen: g:netrw_maxfilenamelen=".g:netrw_maxfilenamelen) + endif + + for filename in filelist +" call Decho("(LocalListing) ") " call Decho("(LocalListing) (while) filename<".filename.">") if getftype(filename) == "link" @@ -7881,7 +8595,7 @@ fun! s:LocalListing() if g:netrw_sort_by =~ "^t" " sort by time (handles time up to 1 quintillion seconds, US) -" call Decho("getftime(".filename.")=".getftime(filename)) +" call Decho("(LocalListing) getftime(".filename.")=".getftime(filename)) let t = getftime(filename) let ft = strpart("000000000000000000",1,18-strlen(t)).t " call Decho("(LocalListing) exe keepjumps put ='".ft.'/'.filename."'") @@ -7902,14 +8616,14 @@ fun! s:LocalListing() " call Decho("(LocalListing) exe keepjumps put ='".pfile."'") sil! keepj put=pfile endif - endwhile + endfor " cleanup any windows mess at end-of-line sil! keepj g/^$/d sil! keepj %s/\r$//e call histdel("/",-1) - exe "setl ts=".g:netrw_maxfilenamelen -" call Decho("(LocalListing) setl ts=".g:netrw_maxfilenamelen) +" call Decho("(LocalListing) exe setl ts=".(g:netrw_maxfilenamelen+1)) + exe "setl ts=".(g:netrw_maxfilenamelen+1) " call Dret("s:LocalListing") endfun @@ -7938,40 +8652,206 @@ fun! s:LocalBrowseShellCmdRefresh() endif let s:locbrowseshellcmd= 0 endif - let itab = 1 - let buftablist = [] - while itab <= tabpagenr("$") - let buftablist = buftablist + tabpagebuflist() - let itab = itab + 1 - tabn - endwhile -" call Decho("buftablist".string(buftablist)) -" call Decho("s:netrw_browselist<".(exists("s:netrw_browselist")? string(s:netrw_browselist) : "").">") - " GO through all buffers on netrw_browselist (ie. just local-netrw buffers): - " | refresh any netrw window - " | wipe out any non-displaying netrw buffer - let curwin = winnr() - let ibl = 0 - for ibuf in s:netrw_browselist -" call Decho("bufwinnr(".ibuf.") index(buftablist,".ibuf.")=".index(buftablist,ibuf)) - if bufwinnr(ibuf) == -1 && index(buftablist,ibuf) == -1 - " wipe out any non-displaying netrw buffer -" call Decho("wiping buf#".ibuf,"<".bufname(ibuf).">") - exe "sil! bd ".fnameescape(ibuf) - call remove(s:netrw_browselist,ibl) -" call Decho("browselist=".string(s:netrw_browselist)) - continue - elseif index(tabpagebuflist(),ibuf) != -1 - " refresh any netrw buffer -" call Decho("refresh buf#".ibuf.'-> win#'.bufwinnr(ibuf)) - exe bufwinnr(ibuf)."wincmd w" - keepj call s:NetrwRefresh(1,s:NetrwBrowseChgDir(1,'./')) - endif - let ibl= ibl + 1 - endfor - exe curwin."wincmd w" + let itab = 1 + let buftablist = [] + let ykeep = @@ + while itab <= tabpagenr("$") + let buftablist = buftablist + tabpagebuflist() + let itab = itab + 1 + tabn + endwhile +" call Decho("(LocalBrowseShellCmdRefresh) buftablist".string(buftablist)) +" call Decho("(LocalBrowseShellCmdRefresh) s:netrw_browselist<".(exists("s:netrw_browselist")? string(s:netrw_browselist) : "").">") + " GO through all buffers on netrw_browselist (ie. just local-netrw buffers): + " | refresh any netrw window + " | wipe out any non-displaying netrw buffer + let curwin = winnr() + let ibl = 0 + for ibuf in s:netrw_browselist +" call Decho("(LocalBrowseShellCmdRefresh) bufwinnr(".ibuf.") index(buftablist,".ibuf.")=".index(buftablist,ibuf)) + if bufwinnr(ibuf) == -1 && index(buftablist,ibuf) == -1 + " wipe out any non-displaying netrw buffer +" call Decho("(LocalBrowseShellCmdRefresh) wiping buf#".ibuf,"<".bufname(ibuf).">") + exe "sil! bd ".fnameescape(ibuf) + call remove(s:netrw_browselist,ibl) +" call Decho("(LocalBrowseShellCmdRefresh) browselist=".string(s:netrw_browselist)) + continue + elseif index(tabpagebuflist(),ibuf) != -1 + " refresh any netrw buffer +" call Decho("(LocalBrowseShellCmdRefresh) refresh buf#".ibuf.'-> win#'.bufwinnr(ibuf)) + exe bufwinnr(ibuf)."wincmd w" + keepj call s:NetrwRefresh(1,s:NetrwBrowseChgDir(1,'./')) + endif + let ibl= ibl + 1 + endfor + exe curwin."wincmd w" + let @@= ykeep + +" call Dret("LocalBrowseShellCmdRefresh") +endfun + +" --------------------------------------------------------------------- +" s:LocalFastBrowser: handles setting up/taking down fast browsing for the local browser {{{2 +" +" g:netrw_ Directory Is +" fastbrowse Local Remote +" slow 0 D D D=Deleting a buffer implies it will not be re-used (slow) +" med 1 D H H=Hiding a buffer implies it may be re-used (fast) +" fast 2 H H +" +" Deleting a buffer means that it will be re-loaded when examined, hence "slow". +" Hiding a buffer means that it will be re-used when examined, hence "fast". +" (re-using a buffer may not be as accurate) +fun! s:LocalFastBrowser() +" call Dfunc("LocalFastBrowser() g:netrw_fastbrowse=".g:netrw_fastbrowse." s:netrw_browser_shellcmd ".(exists("s:netrw_browser_shellcmd")? "exists" : "does not exist")) + + " initialize browselist, a list of buffer numbers that the local browser has used + if !exists("s:netrw_browselist") +" call Decho("(LocalFastBrowser) initialize s:netrw_browselist") + let s:netrw_browselist= [] + endif + + " append current buffer to fastbrowse list + if empty(s:netrw_browselist) || bufnr("%") > s:netrw_browselist[-1] +" call Decho("(LocalFastBrowser) appendng current buffer to browselist") + call add(s:netrw_browselist,bufnr("%")) +" call Decho("(LocalFastBrowser) browselist=".string(s:netrw_browselist)) + endif + + " enable autocmd events to handle refreshing/removing local browser buffers + " If local browse buffer is currently showing: refresh it + " If local browse buffer is currently hidden : wipe it + " g:netrw_fastbrowse=0 : slow speed, never re-use directory listing + " =1 : medium speed, re-use directory listing for remote only + " =2 : fast speed, always re-use directory listing when possible + if !exists("s:netrw_browser_shellcmd") && g:netrw_fastbrowse <= 1 +" call Decho("(LocalFastBrowser) setting up local-browser shell command refresh") + let s:netrw_browser_shellcmd= 1 + augroup AuNetrwShellCmd + au! + if (has("win32") || has("win95") || has("win64") || has("win16")) +" call Decho("(LocalFastBrowser) autocmd: ShellCmdPost * call s:LocalBrowseShellCmdRefresh()") + au ShellCmdPost * call s:LocalBrowseShellCmdRefresh() + else + au ShellCmdPost,FocusGained * call s:LocalBrowseShellCmdRefresh() +" call Decho("(LocalFastBrowser) autocmd: ShellCmdPost,FocusGained * call s:LocalBrowseShellCmdRefresh()") + endif + augroup END + endif + + " user must have changed fastbrowse to its fast setting, so remove + " the associated autocmd events + if g:netrw_fastbrowse > 1 && exists("s:netrw_browser_shellcmd") +" call Decho("(LocalFastBrowser) remove AuNetrwShellCmd autcmd group") + unlet s:netrw_browser_shellcmd + augroup AuNetrwShellCmd + au! + augroup END + augroup! AuNetrwShellCmd + endif + +" call Dret("LocalFastBrowser : browselist<".string(s:netrw_browselist).">") +endfun + +" --------------------------------------------------------------------- +" s:NetrwLocalExecute: uses system() to execute command under cursor ("X" command support) {{{2 +fun! s:NetrwLocalExecute(cmd) +" call Dfunc("s:NetrwLocalExecute(cmd<".a:cmd.">)") + let ykeep= @@ + " sanity check + if !executable(a:cmd) + call netrw#ErrorMsg(s:ERROR,"the file<".a:cmd."> is not executable!",89) + let @@= ykeep +" call Dret("s:NetrwLocalExecute") + return + endif + + let optargs= input(":!".a:cmd,"","file") +" call Decho("optargs<".optargs.">") + let result= system(a:cmd.optargs) +" call Decho(result) + + " strip any ansi escape sequences off + let result = substitute(result,"\e\\[[0-9;]*m","","g") + + " show user the result(s) + echomsg result + let @@= ykeep + +" call Dret("s:NetrwLocalExecute") +endfun + +" --------------------------------------------------------------------- +" s:NetrwLocalRename: rename a remote file or directory {{{2 +fun! s:NetrwLocalRename(path) range +" call Dfunc("NetrwLocalRename(path<".a:path.">)") + + " preparation for removing multiple files/directories + let ykeep = @@ + let ctr = a:firstline + let svpos = netrw#NetrwSavePosn() + + " rename files given by the markfilelist + if exists("s:netrwmarkfilelist_{bufnr('%')}") + for oldname in s:netrwmarkfilelist_{bufnr("%")} +" call Decho("oldname<".oldname.">") + if exists("subfrom") + let newname= substitute(oldname,subfrom,subto,'') +" call Decho("subfrom<".subfrom."> subto<".subto."> newname<".newname.">") + else + call inputsave() + let newname= input("Moving ".oldname." to : ",oldname) + call inputrestore() + if newname =~ '^s/' + let subfrom = substitute(newname,'^s/\([^/]*\)/.*/$','\1','') + let subto = substitute(newname,'^s/[^/]*/\(.*\)/$','\1','') +" call Decho("subfrom<".subfrom."> subto<".subto."> newname<".newname.">") + let newname = substitute(oldname,subfrom,subto,'') + endif + endif + call rename(oldname,newname) + endfor + call s:NetrwUnmarkList(bufnr("%"),b:netrw_curdir) + + else + + " attempt to rename files/directories + while ctr <= a:lastline + exe "keepj ".ctr + + " sanity checks + if line(".") < w:netrw_bannercnt + let ctr= ctr + 1 + continue + endif + let curword= s:NetrwGetWord() + if curword == "./" || curword == "../" + let ctr= ctr + 1 + continue + endif + + keepj norm! 0 + let oldname= s:ComposePath(a:path,curword) +" call Decho("oldname<".oldname.">") + + call inputsave() + let newname= input("Moving ".oldname." to : ",substitute(oldname,'/*$','','e')) + call inputrestore() + + call rename(oldname,newname) +" call Decho("renaming <".oldname."> to <".newname.">") + + let ctr= ctr + 1 + endwhile + endif -" call Dret("LocalBrowseShellCmdRefresh") + " refresh the directory +" call Decho("refresh the directory listing") + keepj call s:NetrwRefresh(1,s:NetrwBrowseChgDir(1,'./')) + keepj call netrw#NetrwRestorePosn(svpos) + let @@= ykeep + +" call Dret("NetrwLocalRename") endfun " --------------------------------------------------------------------- @@ -7981,6 +8861,7 @@ fun! s:NetrwLocalRm(path) range " call Decho("firstline=".a:firstline." lastline=".a:lastline) " preparation for removing multiple files/directories + let ykeep = @@ let ret = 0 let all = 0 let svpos = netrw#NetrwSavePosn() @@ -8032,6 +8913,7 @@ fun! s:NetrwLocalRm(path) range keepj call s:NetrwRefresh(1,s:NetrwBrowseChgDir(1,'./')) keepj call netrw#NetrwRestorePosn(svpos) endif + let @@= ykeep " call Dret("s:NetrwLocalRm") endfun @@ -8122,188 +9004,28 @@ fun! s:NetrwLocalRmFile(path,fname,all) endfun " --------------------------------------------------------------------- -" s:NetrwLocalRename: rename a remote file or directory {{{2 -fun! s:NetrwLocalRename(path) range -" call Dfunc("NetrwLocalRename(path<".a:path.">)") - - " preparation for removing multiple files/directories - let ctr = a:firstline - let svpos= netrw#NetrwSavePosn() - - " rename files given by the markfilelist - if exists("s:netrwmarkfilelist_{bufnr('%')}") - for oldname in s:netrwmarkfilelist_{bufnr("%")} -" call Decho("oldname<".oldname.">") - if exists("subfrom") - let newname= substitute(oldname,subfrom,subto,'') -" call Decho("subfrom<".subfrom."> subto<".subto."> newname<".newname.">") - else - call inputsave() - let newname= input("Moving ".oldname." to : ",oldname) - call inputrestore() - if newname =~ '^s/' - let subfrom = substitute(newname,'^s/\([^/]*\)/.*/$','\1','') - let subto = substitute(newname,'^s/[^/]*/\(.*\)/$','\1','') -" call Decho("subfrom<".subfrom."> subto<".subto."> newname<".newname.">") - let newname = substitute(oldname,subfrom,subto,'') - endif - endif - call rename(oldname,newname) - endfor - call s:NetrwUnmarkList(bufnr("%"),b:netrw_curdir) - - else - - " attempt to rename files/directories - while ctr <= a:lastline - exe "keepj ".ctr - - " sanity checks - if line(".") < w:netrw_bannercnt - let ctr= ctr + 1 - continue - endif - let curword= s:NetrwGetWord() - if curword == "./" || curword == "../" - let ctr= ctr + 1 - continue - endif - - keepj norm! 0 - let oldname= s:ComposePath(a:path,curword) -" call Decho("oldname<".oldname.">") - - call inputsave() - let newname= input("Moving ".oldname." to : ",substitute(oldname,'/*$','','e')) - call inputrestore() - - call rename(oldname,newname) -" call Decho("renaming <".oldname."> to <".newname.">") - - let ctr= ctr + 1 - endwhile - endif - - " refresh the directory -" call Decho("refresh the directory listing") - keepj call s:NetrwRefresh(1,s:NetrwBrowseChgDir(1,'./')) - keepj call netrw#NetrwRestorePosn(svpos) - -" call Dret("NetrwLocalRename") -endfun - -" --------------------------------------------------------------------- -" s:LocalFastBrowser: handles setting up/taking down fast browsing for the local browser {{{2 -" -" g:netrw_ Directory Is -" fastbrowse Local Remote -" slow 0 D D D=Deleting a buffer implies it will not be re-used (slow) -" med 1 D H H=Hiding a buffer implies it may be re-used (fast) -" fast 2 H H -" -" Deleting a buffer means that it will be re-loaded when examined, hence "slow". -" Hiding a buffer means that it will be re-used when examined, hence "fast". -" (re-using a buffer may not be as accurate) -fun! s:LocalFastBrowser() -" call Dfunc("LocalFastBrowser() g:netrw_fastbrowse=".g:netrw_fastbrowse) - - " initialize browselist, a list of buffer numbers that the local browser has used - if !exists("s:netrw_browselist") -" call Decho("initialize s:netrw_browselist") - let s:netrw_browselist= [] - endif - - " append current buffer to fastbrowse list - if empty(s:netrw_browselist) || bufnr("%") > s:netrw_browselist[-1] -" call Decho("appendng current buffer to browselist") - call add(s:netrw_browselist,bufnr("%")) -" call Decho("browselist=".string(s:netrw_browselist)) - endif - - " enable autocmd events to handle refreshing/removing local browser buffers - " If local browse buffer is currently showing: refresh it - " If local browse buffer is currently hidden : wipe it - if !exists("s:netrw_browser_shellcmd") && g:netrw_fastbrowse <= 1 -" call Decho("setting up local-browser shell command refresh") - let s:netrw_browser_shellcmd= 1 - augroup AuNetrwShellCmd - au! - if (has("win32") || has("win95") || has("win64") || has("win16")) -" call Decho("autocmd: ShellCmdPost * call s:LocalBrowseShellCmdRefresh()") - au ShellCmdPost * call s:LocalBrowseShellCmdRefresh() - else - au ShellCmdPost,FocusGained * call s:LocalBrowseShellCmdRefresh() -" call Decho("autocmd: ShellCmdPost,FocusGained * call s:LocalBrowseShellCmdRefresh()") - endif - augroup END - endif - - " user must have changed fastbrowse to its fast setting, so remove - " the associated autocmd events - if g:netrw_fastbrowse > 1 && exists("s:netrw_browser_shellcmd") -" call Decho("remove AuNetrwShellCmd autcmd group") - unlet s:netrw_browser_shellcmd - augroup AuNetrwShellCmd - au! - augroup END - augroup! AuNetrwShellCmd - endif - -" call Dret("LocalFastBrowser : browselist<".string(s:netrw_browselist).">") -endfun +" Support Functions: {{{1 " --------------------------------------------------------------------- -" netrw#FileUrlRead: handles reading file://* files {{{2 -" Should accept: file://localhost/etc/fstab -" file:///etc/fstab -" file:///c:/WINDOWS/clock.avi -" file:///c|/WINDOWS/clock.avi -" file://localhost/c:/WINDOWS/clock.avi -" file://localhost/c|/WINDOWS/clock.avi -" file://c:/foo.txt -" file:///c:/foo.txt -" and %XX (where X is [0-9a-fA-F] is converted into a character with the given hexadecimal value -fun! netrw#FileUrlRead(fname) -" call Dfunc("netrw#FileUrlRead(fname<".a:fname.">)") - let fname = a:fname - if fname =~ '^file://localhost/' -" call Decho('converting file://localhost/ -to- file:///') - let fname= substitute(fname,'^file://localhost/','file:///','') -" call Decho("fname<".fname.">") - endif - if (has("win32") || has("win95") || has("win64") || has("win16")) - if fname =~ '^file:///\=\a[|:]/' -" call Decho('converting file:///\a|/ -to- file://\a:/') - let fname = substitute(fname,'^file:///\=\(\a\)[|:]/','file://\1:/','') -" call Decho("fname<".fname.">") - endif - endif - let fname2396 = netrw#RFC2396(fname) - let fname2396e= fnameescape(fname2396) - let plainfname= substitute(fname2396,'file://\(.*\)','\1',"") - if (has("win32") || has("win95") || has("win64") || has("win16")) -" call Decho("windows exception for plainfname") - if plainfname =~ '^/\+\a:' -" call Decho('removing leading "/"s') - let plainfname= substitute(plainfname,'^/\+\(\a:\)','\1','') - endif +" netrw#WinPath: tries to insure that the path is windows-acceptable, whether cygwin is used or not {{{2 +fun! netrw#WinPath(path) +" call Dfunc("netrw#WinPath(path<".a:path.">)") + if (!g:netrw_cygwin || &shell !~ '\%(\\|\\)\%(\.exe\)\=$') && (has("win32") || has("win95") || has("win64") || has("win16")) + " remove cygdrive prefix, if present + let path = substitute(a:path,'/cygdrive/\(.\)','\1:','') + " remove trailing slash (Win95) + let path = substitute(path, '\(\\\|/\)$', '', 'g') + " remove escaped spaces + let path = substitute(path, '\ ', ' ', 'g') + " convert slashes to backslashes + let path = substitute(path, '/', '\', 'g') + else + let path= a:path endif -" call Decho("fname2396<".fname2396.">") -" call Decho("plainfname<".plainfname.">") - exe "sil doau BufReadPre ".fname2396e - exe 'keepj r '.plainfname - exe 'file! '.plainfname - keepj 1d -" call Decho("(FileUrlRead) setl nomod") - setl nomod -" call Decho("(FileUrlRead) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") -" call Dret("netrw#FileUrlRead") - exe "sil doau BufReadPost ".fname2396e +" call Dret("netrw#WinPath <".path.">") + return path endfun -" --------------------------------------------------------------------- -" Support Functions: {{{1 - " --------------------------------------------------------------------- " netrw#NetrwRestorePosn: restores the cursor and file position as saved by NetrwSavePosn() {{{2 fun! netrw#NetrwRestorePosn(...) @@ -8311,7 +9033,9 @@ fun! netrw#NetrwRestorePosn(...) let eikeep= &ei set ei=all if expand("%") == "NetrwMessage" - exe s:winBeforeErr."wincmd w" + if exists("s:winBeforeErr") + exe s:winBeforeErr."wincmd w" + endif endif if a:0 > 0 @@ -8320,7 +9044,7 @@ fun! netrw#NetrwRestorePosn(...) " restore window if exists("w:netrw_winnr") -" call Decho("restore window: exe sil! ".w:netrw_winnr."wincmd w") +" call Decho("(NetrwRestorePosn) restore window: exe sil! ".w:netrw_winnr."wincmd w") exe "sil! ".w:netrw_winnr."wincmd w" endif if v:shell_error == 0 @@ -8331,29 +9055,29 @@ fun! netrw#NetrwRestorePosn(...) " restore top-of-screen line if exists("w:netrw_hline") -" call Decho("restore topofscreen: exe keepj norm! ".w:netrw_hline."G0z") +" call Decho("(NetrwRestorePosn) restore topofscreen: exe keepj norm! ".w:netrw_hline."G0z") exe "keepj norm! ".w:netrw_hline."G0z\" endif " restore position if exists("w:netrw_line") && exists("w:netrw_col") -" call Decho("restore posn: exe keepj norm! ".w:netrw_line."G0".w:netrw_col."|") +" call Decho("(NetrwRestorePosn) restore posn: exe keepj norm! ".w:netrw_line."G0".w:netrw_col."|") exe "keepj norm! ".w:netrw_line."G0".w:netrw_col."\" endif let &ei= eikeep -" call Dret("netrw#NetrwRestorePosn") +" call Dret("netrw#NetrwRestorePosn : line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol()) endfun " --------------------------------------------------------------------- " netrw#NetrwSavePosn: saves position of cursor on screen {{{2 fun! netrw#NetrwSavePosn() -" call Dfunc("netrw#NetrwSavePosn()") +" call Dfunc("netrw#NetrwSavePosn() line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol()) " Save current line and column let w:netrw_winnr= winnr() let w:netrw_line = line(".") let w:netrw_col = virtcol(".") -" call Decho("currently, win#".w:netrw_winnr." line#".w:netrw_line." col#".w:netrw_col) +" call Decho("(NetrwSavePosn) currently, win#".w:netrw_winnr." line#".w:netrw_line." col#".w:netrw_col) " Save top-of-screen line keepj norm! H0 @@ -8367,6 +9091,21 @@ fun! netrw#NetrwSavePosn() return ret endfun +" --------------------------------------------------------------------- +" netrw#NetrwAccess: intended to provide access to variable values for netrw's test suite {{{2 +" 0: marked file list of current buffer +" 1: marked file target +fun! netrw#NetrwAccess(ilist) + if a:ilist == 0 + if exists("s:netrwmarkfilelist_".bufnr('%')) + return s:netrwmarkfilelist_{bufnr('%')} + else + return "no-list-buf#".bufnr('%') + endif + elseif a:ilist == 1 + return s:netrwmftgt +endfun + " ------------------------------------------------------------------------ " netrw#RFC2396: converts %xx into characters {{{2 fun! netrw#RFC2396(fname) @@ -8581,11 +9320,11 @@ fun! s:NetrwCursor() " thin-long-tree: cursorline, user's cursorcolumn " wide : cursorline, cursorcolumn if w:netrw_liststyle == s:WIDELIST -" call Decho("case g:netrw_cursor==3 and wide: setlocal cul cuc") +" call Decho("case g:netrw_cursor==3 and wide: setl cul cuc") setl cursorline setl cursorcolumn else -" call Decho("case g:netrw_cursor==3 and not wide: setlocal cul (use user's cuc)") +" call Decho("case g:netrw_cursor==3 and not wide: setl cul (use user's cuc)") setl cursorline let &l:cursorcolumn = s:netrw_usercuc endif @@ -8593,7 +9332,7 @@ fun! s:NetrwCursor() elseif g:netrw_cursor == 2 " thin-long-tree: cursorline, user's cursorcolumn " wide : cursorline, user's cursorcolumn -" call Decho("case g:netrw_cursor==2: setlocal cuc (use user's cul)") +" call Decho("case g:netrw_cursor==2: setl cuc (use user's cul)") let &l:cursorcolumn = s:netrw_usercuc setl cursorline @@ -8602,7 +9341,7 @@ fun! s:NetrwCursor() " wide : cursorline, user's cursorcolumn let &l:cursorcolumn = s:netrw_usercuc if w:netrw_liststyle == s:WIDELIST -" call Decho("case g:netrw_cursor==2 and wide: setlocal cul (use user's cuc)") +" call Decho("case g:netrw_cursor==2 and wide: setl cul (use user's cuc)") set cursorline else " call Decho("case g:netrw_cursor==2 and not wide: (use user's cul,cuc)") @@ -8622,7 +9361,7 @@ endfun " --------------------------------------------------------------------- " s:RestoreCursorline: restores cursorline/cursorcolumn to original user settings {{{2 fun! s:RestoreCursorline() -" call Dfunc("s:RestoreCursorline() currently, cul=".&l:cursorline." cuc=".&l:cursorcolumn." win#".winnr()." buf#".bufnr("%")) +" call Dfunc("s:RestoreCursorline() currently, cul=".&l:cursorline." cuc=".&l:cursorcolumn." win#".winnr()." buf#".bufnr("%")." mod=".&mod) if exists("s:netrw_usercul") let &l:cursorline = s:netrw_usercul endif @@ -8644,7 +9383,7 @@ fun! s:NetrwDelete(path) if !g:netrw_cygwin && (has("win32") || has("win95") || has("win64") || has("win16")) if exists("+shellslash") let sskeep= &shellslash - setlocal noshellslash + setl noshellslash let result = delete(path) let &shellslash = sskeep else @@ -8691,11 +9430,7 @@ fun! s:NetrwEnew(...) keepj call s:NetrwOptionRestore("w:") " call Decho("generate a buffer with keepjumps keepalt enew!") let netrw_keepdiff= &l:diff - " COMBAK: Benzinger: using tree mode, vim -o Foo/ file shows Foo/ Foo/ instead. Place return here, problem goes away (beeps result, but who knows) -" call Dredir("Benzinger 1:","ls!") keepj keepalt enew! -" call Dredir("Benzinger 2:","ls!") - " COMBAK: Benzinger: using tree mode, vim -o Foo/ file shows Foo/ Foo/ instead. Place return here, problem remains. let &l:diff= netrw_keepdiff " call Decho("bufnr($)=".bufnr("$")) keepj call s:NetrwOptionSave("w:") @@ -8724,7 +9459,7 @@ fun! s:NetrwEnew(...) if b:netrw_curdir =~ '/$' if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST file NetrwTreeListing - set bt=nowrite noswf + set bt=nowrite noswf bh=hide nno [ :sil call TreeListMove('[') nno ] :sil call TreeListMove(']') else @@ -8733,13 +9468,13 @@ fun! s:NetrwEnew(...) endif endif -" call Dret("s:NetrwEnew : buf#".bufnr("%")."<".bufname("%")."> expand(%)<".expand("%")."> expand(#)<".expand("#").">") +" call Dret("s:NetrwEnew : buf#".bufnr("%")."<".bufname("%")."> expand(%)<".expand("%")."> expand(#)<".expand("#")."> bh=".&bh) endfun " --------------------------------------------------------------------- " s:NetrwInsureWinVars: insure that a netrw buffer has its w: variables in spite of a wincmd v or s {{{2 fun! s:NetrwInsureWinVars() -" call Dfunc("s:NetrwInsureWinVars()") +" call Dfunc("s:NetrwInsureWinVars() win#".winnr()) if !exists("w:netrw_liststyle") let curbuf = bufnr("%") let curwin = winnr() @@ -8753,7 +9488,7 @@ fun! s:NetrwInsureWinVars() endif let iwin= iwin + 1 endwhile - exe curbuf."wincmd w" + exe "keepalt ".curwin."wincmd w" if exists("winvars") " call Decho("copying w#".iwin." window variables to w#".curwin) for k in keys(winvars) @@ -8761,7 +9496,7 @@ fun! s:NetrwInsureWinVars() endfor endif endif -" call Dret("s:NetrwInsureWinVars") +" call Dret("s:NetrwInsureWinVars win#".winnr()) endfun " ------------------------------------------------------------------------ @@ -8881,6 +9616,9 @@ endfun " " s:nbcd_curpos_{bufnr('%')} is set up by s:NetrwBrowseChgDir() fun! s:NetrwRexplore(islocal,dirname) + if exists("s:netrwdrag") + return + endif " call Dfunc("s:NetrwRexplore() w:netrw_rexlocal=".w:netrw_rexlocal." w:netrw_rexdir<".w:netrw_rexdir.">") if !exists("w:netrw_rexlocal") " " call Dret("s:NetrwRexplore() w:netrw_rexlocal doesn't exist") @@ -8975,12 +9713,12 @@ fun! s:SetRexDir(islocal,dirname) " call Dfunc("s:SetRexDir(islocal=".a:islocal." dirname<".a:dirname.">)") let w:netrw_rexdir = a:dirname let w:netrw_rexlocal = a:islocal -" call Dret("s:SetRexDir") +" call Dret("s:SetRexDir : win#".winnr()." ".(a:islocal? "local" : "remote")." dir: ".a:dirname) endfun " --------------------------------------------------------------------- " s:Strlen: this function returns the length of a string, even if its {{{2 -" using two-byte etc characters. +" using multiple-byte characters. " Solution from Nicolai Weibull, vim docs (:help strlen()), Tony Mechelynck, " and a bit from me. " if g:netrw_xstrlen is zero (default), then the builtin strlen() function is used. @@ -9007,6 +9745,7 @@ fun! s:Strlen(x) call setline(line("."),a:x) let ret= virtcol("$") - 1 keepj d + keepj norm! k let &mod= modkeep else @@ -9110,27 +9849,7 @@ fun! s:UseBufWinVars() endfun " --------------------------------------------------------------------- -" netrw#WinPath: tries to insure that the path is windows-acceptable, whether cygwin is used or not {{{2 -fun! netrw#WinPath(path) -" call Dfunc("netrw#WinPath(path<".a:path.">)") - if (!g:netrw_cygwin || &shell !~ '\%(\\|\\)\%(\.exe\)\=$') && (has("win32") || has("win95") || has("win64") || has("win16")) - " remove cygdrive prefix, if present - let path = substitute(a:path,'/cygdrive/\(.\)','\1:','') - " remove trailing slash (Win95) - let path = substitute(path, '\(\\\|/\)$', '', 'g') - " remove escaped spaces - let path = substitute(path, '\ ', ' ', 'g') - " convert slashes to backslashes - let path = substitute(path, '/', '\', 'g') - else - let path= a:path - endif -" call Dret("netrw#WinPath <".path.">") - return path -endfun - -" --------------------------------------------------------------------- -" Settings Restoration: {{{2 +" Settings Restoration: {{{1 let &cpo= s:keepcpo unlet s:keepcpo diff --git a/runtime/autoload/netrwFileHandlers.vim b/runtime/autoload/netrwFileHandlers.vim index b11e3cfbf4..ed31e29a66 100644 --- a/runtime/autoload/netrwFileHandlers.vim +++ b/runtime/autoload/netrwFileHandlers.vim @@ -1,9 +1,9 @@ " netrwFileHandlers: contains various extension-based file handlers for " netrw's browsers' x command ("eXecute launcher") -" Author: Charles E. Campbell, Jr. -" Date: Mar 14, 2012 -" Version: 11a -" Copyright: Copyright (C) 1999-2012 Charles E. Campbell, Jr. {{{1 +" Author: Charles E. Campbell +" Date: May 03, 2013 +" Version: 11b ASTRO-ONLY +" Copyright: Copyright (C) 1999-2012 Charles E. Campbell {{{1 " Permission is hereby granted to use and distribute this code, " with or without modifications, provided that this copyright " notice is copied with it. Like anything else that's free, @@ -20,7 +20,7 @@ if exists("g:loaded_netrwFileHandlers") || &cp finish endif -let g:loaded_netrwFileHandlers= "v11a" +let g:loaded_netrwFileHandlers= "v11b" if v:version < 702 echohl WarningMsg echo "***warning*** this version of netrwFileHandlers needs vim 7.2" @@ -34,10 +34,10 @@ set cpo&vim " netrwFileHandlers#Invoke: {{{1 fun! netrwFileHandlers#Invoke(exten,fname) " call Dfunc("netrwFileHandlers#Invoke(exten<".a:exten."> fname<".a:fname.">)") - let fname= a:fname + let exten= a:exten " list of supported special characters. Consider rcs,v --- that can be " supported with a NFH_rcsCOMMAv() handler - if a:fname =~ '[@:,$!=\-+%?;~]' + if exten =~ '[@:,$!=\-+%?;~]' let specials= { \ '@' : 'AT', \ ':' : 'COLON', @@ -51,18 +51,18 @@ fun! netrwFileHandlers#Invoke(exten,fname) \ '?' : 'QUESTION', \ ';' : 'SEMICOLON', \ '~' : 'TILDE'} - let fname= substitute(a:fname,'[@:,$!=\-+%?;~]','\=specials[submatch(0)]','ge') + let exten= substitute(a:exten,'[@:,$!=\-+%?;~]','\=specials[submatch(0)]','ge') " call Decho('fname<'.fname.'> done with dictionary') endif - if a:exten != "" && exists("*NFH_".a:exten) + if a:exten != "" && exists("*NFH_".exten) " support user NFH_*() functions " call Decho("let ret= netrwFileHandlers#NFH_".a:exten.'("'.fname.'")') - exe "let ret= NFH_".a:exten.'("'.fname.'")' - elseif a:exten != "" && exists("*s:NFH_".a:exten) + exe "let ret= NFH_".exten.'("'.a:fname.'")' + elseif a:exten != "" && exists("*s:NFH_".exten) " use builtin-NFH_*() functions " call Decho("let ret= netrwFileHandlers#NFH_".a:exten.'("'.fname.'")') - exe "let ret= s:NFH_".a:exten.'("'.fname.'")' + exe "let ret= s:NFH_".a:exten.'("'.a:fname.'")' endif " call Dret("netrwFileHandlers#Invoke 0 : ret=".ret) diff --git a/runtime/autoload/netrwSettings.vim b/runtime/autoload/netrwSettings.vim index 38f7299569..ee43059285 100644 --- a/runtime/autoload/netrwSettings.vim +++ b/runtime/autoload/netrwSettings.vim @@ -1,8 +1,8 @@ " netrwSettings.vim: makes netrw settings simpler -" Date: Sep 03, 2008 -" Maintainer: Charles E Campbell, Jr -" Version: 13 -" Copyright: Copyright (C) 1999-2007 Charles E. Campbell, Jr. {{{1 +" Date: May 03, 2013 +" Maintainer: Charles E Campbell +" Version: 14a ASTRO-ONLY +" Copyright: Copyright (C) 1999-2007 Charles E. Campbell {{{1 " Permission is hereby granted to use and distribute this code, " with or without modifications, provided that this copyright " notice is copied with it. Like anything else that's free, @@ -19,7 +19,7 @@ if exists("g:loaded_netrwSettings") || &cp finish endif -let g:loaded_netrwSettings = "v13" +let g:loaded_netrwSettings = "v14a" if v:version < 700 echohl WarningMsg echo "***warning*** this version of netrwSettings needs vim 7.0" @@ -63,7 +63,7 @@ fun! netrwSettings#NetrwSettings() endif put ='+ ---------------------------------------------' - put ='+ NetrwSettings: by Charles E. Campbell, Jr.' + put ='+ NetrwSettings: by Charles E. Campbell' put ='+ Press with cursor atop any line for help' put ='+ ---------------------------------------------' let s:netrw_settings_stop= line(".") @@ -88,6 +88,7 @@ fun! netrwSettings#NetrwSettings() put = 'let g:netrw_ftpmode = '.g:netrw_ftpmode put = 'let g:netrw_ignorenetrc = '.g:netrw_ignorenetrc put = 'let g:netrw_sshport = '.g:netrw_sshport + put = 'let g:netrw_silent = '.g:netrw_silent put = 'let g:netrw_use_nt_rcp = '.g:netrw_use_nt_rcp put = 'let g:netrw_win95ftp = '.g:netrw_win95ftp let s:netrw_xfer_stop= line(".") @@ -99,51 +100,81 @@ fun! netrwSettings#NetrwSettings() put ='+ Netrw Browser Control' put = 'let g:netrw_alto = '.g:netrw_alto put = 'let g:netrw_altv = '.g:netrw_altv + put = 'let g:netrw_banner = '.g:netrw_banner + if exists("g:netrw_bannerbackslash") + put = 'let g:netrw_bannerbackslash = '.g:netrw_bannerbackslash + else + put = '\" let g:netrw_bannerbackslash = (not defined)' + endif put = 'let g:netrw_browse_split = '.g:netrw_browse_split if exists("g:netrw_browsex_viewer") - put = 'let g:netrw_browsex_viewer = '.g:netrw_browsex_viewer + put = 'let g:netrw_browsex_viewer = '.g:netrw_browsex_viewer else - put = 'let g:netrw_browsex_viewer = (not defined)' + put = '\" let g:netrw_browsex_viewer = (not defined)' endif put = 'let g:netrw_compress = '.g:netrw_compress - put = 'let g:netrw_cursorline = '.g:netrw_cursorline + if exists("g:Netrw_corehandler") + put = 'let g:Netrw_corehandler = '.g:Netrw_corehandler + else + put = '\" let g:Netrw_corehandler = (not defined)' + endif + put = 'let g:netrw_ctags = '.g:netrw_ctags + put = 'let g:netrw_cursor = '.g:netrw_cursor let decompressline= line("$") - put ='let g:netrw_decompress...' + put = 'let g:netrw_decompress = '.string(g:netrw_decompress) + if exists("g:netrw_dynamic_maxfilenamelen") + put = 'let g:netrw_dynamic_maxfilenamelen='.g:netrw_dynamic_maxfilenamelen + else + put = '\" let g:netrw_dynamic_maxfilenamelen= (not defined)' + endif put = 'let g:netrw_dirhistmax = '.g:netrw_dirhistmax + put = 'let g:netrw_errorlvl = '.g:netrw_errorlvl put = 'let g:netrw_fastbrowse = '.g:netrw_fastbrowse let fnameescline= line("$") - put = 'let g:netrw_fname_escape...' + put = 'let g:netrw_fname_escape = '.string(g:netrw_fname_escape) put = 'let g:netrw_ftp_browse_reject = '.g:netrw_ftp_browse_reject put = 'let g:netrw_ftp_list_cmd = '.g:netrw_ftp_list_cmd put = 'let g:netrw_ftp_sizelist_cmd = '.g:netrw_ftp_sizelist_cmd put = 'let g:netrw_ftp_timelist_cmd = '.g:netrw_ftp_timelist_cmd let globescline= line("$") - put ='let g:netrw_glob_escape...' + put = 'let g:netrw_glob_escape = '.string(g:netrw_glob_escape) put = 'let g:netrw_hide = '.g:netrw_hide + if exists("g:netrw_home") + put = 'let g:netrw_home = '.g:netrw_home + else + put = '\" let g:netrw_home = (not defined)' + endif put = 'let g:netrw_keepdir = '.g:netrw_keepdir put = 'let g:netrw_list_cmd = '.g:netrw_list_cmd put = 'let g:netrw_list_hide = '.g:netrw_list_hide put = 'let g:netrw_liststyle = '.g:netrw_liststyle put = 'let g:netrw_localcopycmd = '.g:netrw_localcopycmd - put = 'let g:netrw_local_mkdir = '.g:netrw_local_mkdir + put = 'let g:netrw_localmkdir = '.g:netrw_localmkdir put = 'let g:netrw_localmovecmd = '.g:netrw_localmovecmd - put = 'let g:netrw_local_rmdir = '.g:netrw_local_rmdir + put = 'let g:netrw_localrmdir = '.g:netrw_localrmdir put = 'let g:netrw_maxfilenamelen = '.g:netrw_maxfilenamelen put = 'let g:netrw_menu = '.g:netrw_menu + put = 'let g:netrw_mousemaps = '.g:netrw_mousemaps put = 'let g:netrw_mkdir_cmd = '.g:netrw_mkdir_cmd + if exists("g:netrw_nobeval") + put = 'let g:netrw_nobeval = '.g:netrw_nobeval + else + put = '\" let g:netrw_nobeval = (not defined)' + endif + put = 'let g:netrw_remote_mkdir = '.g:netrw_remote_mkdir put = 'let g:netrw_preview = '.g:netrw_preview put = 'let g:netrw_rename_cmd = '.g:netrw_rename_cmd put = 'let g:netrw_retmap = '.g:netrw_retmap put = 'let g:netrw_rm_cmd = '.g:netrw_rm_cmd put = 'let g:netrw_rmdir_cmd = '.g:netrw_rmdir_cmd put = 'let g:netrw_rmf_cmd = '.g:netrw_rmf_cmd - put = 'let g:netrw_silent = '.g:netrw_silent put = 'let g:netrw_sort_by = '.g:netrw_sort_by put = 'let g:netrw_sort_direction = '.g:netrw_sort_direction put = 'let g:netrw_sort_options = '.g:netrw_sort_options put = 'let g:netrw_sort_sequence = '.g:netrw_sort_sequence put = 'let g:netrw_special_syntax = '.g:netrw_special_syntax put = 'let g:netrw_ssh_browse_reject = '.g:netrw_ssh_browse_reject + put = 'let g:netrw_ssh_cmd = '.g:netrw_ssh_cmd put = 'let g:netrw_scpport = '.g:netrw_scpport put = 'let g:netrw_sepchr = '.g:netrw_sepchr put = 'let g:netrw_sshport = '.g:netrw_sshport diff --git a/runtime/autoload/rubycomplete.vim b/runtime/autoload/rubycomplete.vim index f89be52e99..e1064c8a58 100644 --- a/runtime/autoload/rubycomplete.vim +++ b/runtime/autoload/rubycomplete.vim @@ -1,9 +1,7 @@ " Vim completion script " Language: Ruby " Maintainer: Mark Guzman -" Last Change: 2009 Sep 28 -" URL: http://vim-ruby.rubyforge.org -" Anon CVS: See above site +" URL: https://github.com/vim-ruby/vim-ruby " Release Coordinator: Doug Kearns " Maintainer Version: 0.8.1 " ---------------------------------------------------------------------------- @@ -12,16 +10,23 @@ " ---------------------------------------------------------------------------- " {{{ requirement checks + +function! s:ErrMsg(msg) + echohl ErrorMsg + echo a:msg + echohl None +endfunction + if !has('ruby') - s:ErrMsg( "Error: Rubycomplete requires vim compiled with +ruby" ) - s:ErrMsg( "Error: falling back to syntax completion" ) + call s:ErrMsg( "Error: Rubycomplete requires vim compiled with +ruby" ) + call s:ErrMsg( "Error: falling back to syntax completion" ) " lets fall back to syntax completion setlocal omnifunc=syntaxcomplete#Complete finish endif if version < 700 - s:ErrMsg( "Error: Required vim >= 7.0" ) + call s:ErrMsg( "Error: Required vim >= 7.0" ) finish endif " }}} requirement checks @@ -51,12 +56,6 @@ endif " {{{ vim-side support functions let s:rubycomplete_debug = 0 -function! s:ErrMsg(msg) - echohl ErrorMsg - echo a:msg - echohl None -endfunction - function! s:dprint(msg) if s:rubycomplete_debug == 1 echom a:msg @@ -133,7 +132,7 @@ function! s:GetRubyVarType(v) let stopline = 1 let vtp = '' let pos = getpos('.') - let sstr = '^\s*#\s*@var\s*'.a:v.'\>\s\+[^ \t]\+\s*$' + let sstr = '^\s*#\s*@var\s*'.escape(a:v, '*').'\>\s\+[^ \t]\+\s*$' let [lnum,lcol] = searchpos(sstr,'nb',stopline) if lnum != 0 && lcol != 0 call setpos('.',pos) @@ -275,7 +274,7 @@ class VimRubyCompletion pare = /^\s*class\s*(.*)\s*<\s*(.*)\s*\n/.match( classdef ) load_buffer_class( $2 ) if pare != nil && $2 != name # load parent class if needed - mixre = /.*\n\s*include\s*(.*)\s*\n/.match( classdef ) + mixre = /.*\n\s*(include|prepend)\s*(.*)\s*\n/.match( classdef ) load_buffer_module( $2 ) if mixre != nil && $2 != name # load mixins if needed begin @@ -364,6 +363,10 @@ class VimRubyCompletion print txt if @@debug end + def escape_vim_singlequote_string(str) + str.to_s.gsub(/'/,"\\'") + end + def get_buffer_entity_list( type ) # this will be a little expensive. loading_allowed = VIM::evaluate("exists('g:rubycomplete_buffer_loading') && g:rubycomplete_buffer_loading") @@ -526,9 +529,9 @@ class VimRubyCompletion end def clean_sel(sel, msg) - sel.delete_if { |x| x == nil } - sel.uniq! - sel.grep(/^#{Regexp.quote(msg)}/) if msg != nil + ret = sel.reject{|x|x.nil?}.uniq + ret = ret.grep(/^#{Regexp.quote(msg)}/) if msg != nil + ret end def get_rails_view_methods @@ -767,10 +770,10 @@ class VimRubyCompletion constants = clean_sel( constants, message ) valid = [] - valid += methods.collect { |m| { :name => m, :type => 'm' } } - valid += variables.collect { |v| { :name => v, :type => 'v' } } - valid += classes.collect { |c| { :name => c, :type => 't' } } - valid += constants.collect { |d| { :name => d, :type => 'd' } } + valid += methods.collect { |m| { :name => m.to_s, :type => 'm' } } + valid += variables.collect { |v| { :name => v.to_s, :type => 'v' } } + valid += classes.collect { |c| { :name => c.to_s, :type => 't' } } + valid += constants.collect { |d| { :name => d.to_s, :type => 'd' } } valid.sort! { |x,y| x[:name] <=> y[:name] } outp = "" @@ -779,7 +782,7 @@ class VimRubyCompletion rg.step(150) do |x| stpos = 0+x enpos = 150+x - valid[stpos..enpos].each { |c| outp += "{'word':'%s','item':'%s','kind':'%s'}," % [ c[:name], c[:name], c[:type] ] } + valid[stpos..enpos].each { |c| outp += "{'word':'%s','item':'%s','kind':'%s'}," % [ c[:name], c[:name], c[:type] ].map{|x|escape_vim_singlequote_string(x)} } outp.sub!(/,$/, '') VIM::command("call extend(g:rubycomplete_completions, [%s])" % outp) diff --git a/runtime/autoload/sqlcomplete.vim b/runtime/autoload/sqlcomplete.vim index 360f7e6cec..9326c15bb3 100644 --- a/runtime/autoload/sqlcomplete.vim +++ b/runtime/autoload/sqlcomplete.vim @@ -1,23 +1,55 @@ " Vim OMNI completion script for SQL " Language: SQL " Maintainer: David Fishburn -" Version: 12.0 -" Last Change: 2012 Feb 08 +" Version: 15.0 +" Last Change: 2013 May 13 +" Homepage: http://www.vim.org/scripts/script.php?script_id=1572 " Usage: For detailed help " ":help sql.txt" " or ":help ft-sql-omni" " or read $VIMRUNTIME/doc/sql.txt " History -" Version 12.0 +" +" TODO +" - Jonas Enberg - if no table is found when using column completion +" look backwards to a FROM clause and find the first table +" and complete it. +" +" Version 15.0 (May 2013) +" - NF: Changed the SQL precached syntax items, omni_sql_precache_syntax_groups, +" to use regular expressions to pick up extended syntax group names. +" This requires an updated SyntaxComplete plugin version 13.0. +" If the required versions have not been installed, previous +" behaviour will not be impacted. +" +" Version 14.0 (Dec 2012) +" - BF: Added check for cpo +" +" Version 13.0 (Dec 2012) +" - NF: When completing column lists or drilling into a table +" and g:omni_sql_include_owner is enabled, the +" only the table name would be replaced with the column +" list instead of the table name and owner (if specified). +" - NF: When completing column lists using table aliases +" and g:omni_sql_include_owner is enabled, account +" for the owner name when looking up the table +" list instead of the table name and owner (if specified). +" - BF: When completing column lists or drilling into a table +" and g:omni_sql_include_owner is enabled, the +" column list could often not be found for the table. +" - BF: When OMNI popped up, possibly the wrong word +" would be replaced for column and column list options. +" +" Version 12.0 (Feb 2012) " - Partial column name completion did not work when a table " name or table alias was provided (Jonas Enberg). " - Improved the handling of column completion. First we match any " columns from a previous completion. If not matches are found, we -" consider the partial name to be a table or table alias for the +" consider the partial name to be a table or table alias for the " query and attempt to match on it. " -" Version 11.0 +" Version 11.0 (Jan 2012) " Added g:omni_sql_default_compl_type variable " - You can specify which type of completion to default to " when pressing . The entire list of available @@ -40,7 +72,7 @@ " - Prepends error message with SQLComplete so you know who issued " the error. " -" Version 9.0 +" Version 9.0 (May 2010) " This change removes some of the support for tables with spaces in their " names in order to simplify the regexes used to pull out query table " aliases for more robust table name and column name code completion. @@ -51,10 +83,10 @@ " Incorrectly re-executed the g:ftplugin_sql_omni_key_right and g:ftplugin_sql_omni_key_left " when drilling in and out of a column list for a table. " -" Version 7.0 +" Version 7.0 (Jan 2010) " Better handling of object names " -" Version 6.0 +" Version 6.0 (Apr 2008) " Supports object names with spaces "my table name" " " Set completion with CTRL-X CTRL-O to autoloaded function. @@ -71,7 +103,9 @@ endif if exists('g:loaded_sql_completion') finish endif -let g:loaded_sql_completion = 120 +let g:loaded_sql_completion = 150 +let s:keepcpo= &cpo +set cpo&vim " Maintains filename of dictionary let s:sql_file_table = "" @@ -88,12 +122,14 @@ let s:syn_value = [] " Used in conjunction with the syntaxcomplete plugin let s:save_inc = "" let s:save_exc = "" -if exists('g:omni_syntax_group_include_sql') - let s:save_inc = g:omni_syntax_group_include_sql +if !exists('g:omni_syntax_group_include_sql') + let g:omni_syntax_group_include_sql = '' endif -if exists('g:omni_syntax_group_exclude_sql') - let s:save_exc = g:omni_syntax_group_exclude_sql +if !exists('g:omni_syntax_group_exclude_sql') + let g:omni_syntax_group_exclude_sql = '' endif +let s:save_inc = g:omni_syntax_group_include_sql +let s:save_exc = g:omni_syntax_group_exclude_sql " Used with the column list let s:save_prev_table = "" @@ -105,12 +141,12 @@ endif " Default syntax items to precache if !exists('g:omni_sql_precache_syntax_groups') let g:omni_sql_precache_syntax_groups = [ - \ 'syntax', - \ 'sqlKeyword', - \ 'sqlFunction', - \ 'sqlOption', - \ 'sqlType', - \ 'sqlStatement' + \ 'syntax\w*', + \ 'sqlKeyword\w*', + \ 'sqlFunction\w*', + \ 'sqlOption\w*', + \ 'sqlType\w*', + \ 'sqlStatement\w*' \ ] endif " Set ignorecase to the ftplugin standard @@ -137,6 +173,13 @@ if !exists('g:omni_sql_default_compl_type') endif " This function is used for the 'omnifunc' option. +" It is called twice by omni and it is responsible +" for returning the completion list of items. +" But it must also determine context of what to complete +" and what to "replace" with the completion. +" The a:base, is replaced directly with what the user +" chooses from the choices. +" The s:prepend provides context for the completion. function! sqlcomplete#Complete(findstart, base) " Default to table name completion @@ -145,6 +188,7 @@ function! sqlcomplete#Complete(findstart, base) if exists('b:sql_compl_type') let compl_type = b:sql_compl_type endif + let begindot = 0 " First pass through this function determines how much of the line should " be replaced by whatever is chosen from the completion list @@ -153,7 +197,6 @@ function! sqlcomplete#Complete(findstart, base) let line = getline('.') let start = col('.') - 1 let lastword = -1 - let begindot = 0 " Check if the first character is a ".", for column completion if line[start - 1] == '.' let begindot = 1 @@ -179,7 +222,10 @@ function! sqlcomplete#Complete(findstart, base) " If lastword has already been set for column completion " break from the loop, since we do not also want to pickup " a table name if it was also supplied. + " Unless g:omni_sql_include_owner == 1, then we can + " include the ownername. if lastword != -1 && compl_type == 'column' + \ && g:omni_sql_include_owner == 0 break endif " If column completion was specified stop at the "." if @@ -191,7 +237,7 @@ function! sqlcomplete#Complete(findstart, base) " If omni_sql_include_owner = 0, do not include the table " name as part of the substitution, so break here if lastword == -1 && - \ compl_type =~ 'table\|view\|procedure\column_csv' && + \ compl_type =~ '\<\(table\|view\|procedure\|column\|column_csv\)\>' && \ g:omni_sql_include_owner == 0 let lastword = start break @@ -288,6 +334,12 @@ function! sqlcomplete#Complete(findstart, base) let table = matchstr( base, '^\(.*\.\)\?\zs.*\ze\..*' ) let column = matchstr( base, '.*\.\zs.*' ) + if g:omni_sql_include_owner == 1 && owner == '' && table != '' && column != '' + let owner = table + let table = column + let column = '' + endif + " It is pretty well impossible to determine if the user " has entered: " owner.table @@ -370,7 +422,16 @@ function! sqlcomplete#Complete(findstart, base) let list_type = 'csv' endif - let compl_list = s:SQLCGetColumns(table, list_type) + " If we are including the OWNER for the objects, then for + " table completion, if we have it, it should be included + " as there can be the same table names in a database yet + " with different owner names. + if g:omni_sql_include_owner == 1 && owner != '' && table != '' + let compl_list = s:SQLCGetColumns(owner.'.'.table, list_type) + else + let compl_list = s:SQLCGetColumns(table, list_type) + endif + if column != '' " If no column prefix has been provided and the table " name was provided, append it to each of the items @@ -393,11 +454,14 @@ function! sqlcomplete#Complete(findstart, base) endif elseif compl_type == 'resetCache' " Reset all cached items - let s:tbl_name = [] - let s:tbl_alias = [] - let s:tbl_cols = [] - let s:syn_list = [] - let s:syn_value = [] + let s:tbl_name = [] + let s:tbl_alias = [] + let s:tbl_cols = [] + let s:syn_list = [] + let s:syn_value = [] + let s:sql_file_table = "" + let s:sql_file_procedure = "" + let s:sql_file_view = "" let msg = "All SQL cached items have been removed." call s:SQLCWarningMsg(msg) @@ -423,12 +487,27 @@ function! sqlcomplete#Complete(findstart, base) " let expr = 'v:val '.(g:omni_sql_ignorecase==1?'=~?':'=~#').' "\\(^'.base.'\\|\\(\\.\\)\\?'.base.'\\)"' " let expr = 'v:val '.(g:omni_sql_ignorecase==1?'=~?':'=~#').' "\\(^'.base.'\\|\\([^.]*\\)\\?'.base.'\\)"' let compl_list = filter(deepcopy(compl_list), expr) + + if empty(compl_list) && compl_type == 'table' && base =~ '\.$' + " It is possible we could be looking for column name completion + " and the user simply hit C-X C-O to lets try it as well + " since we had no hits with the tables. + " If the base ends with a . it is hard to know if we are + " completing table names or column names. + let list_type = '' + + let compl_list = s:SQLCGetColumns(base, list_type) + endif endif if exists('b:sql_compl_savefunc') && b:sql_compl_savefunc != "" let &omnifunc = b:sql_compl_savefunc endif + if empty(compl_list) + call s:SQLCWarningMsg( 'Could not find type['.compl_type.'] using prepend[.'.s:prepended.'] base['.a:base.']' ) + endif + return compl_list endfunc @@ -556,19 +635,23 @@ function! s:SQLCGetSyntaxList(syn_group) " Return previously cached value let compl_list = s:syn_value[list_idx] else + let s:save_inc = g:omni_syntax_group_include_sql + let s:save_exc = g:omni_syntax_group_exclude_sql + let g:omni_syntax_group_include_sql = '' + let g:omni_syntax_group_exclude_sql = '' + " Request the syntax list items from the " syntax completion plugin if syn_group == 'syntax' " Handle this special case. This allows the user " to indicate they want all the syntax items available, " so do not specify a specific include list. - let g:omni_syntax_group_include_sql = '' + let syn_value = syntaxcomplete#OmniSyntaxList() else " The user has specified a specific syntax group let g:omni_syntax_group_include_sql = syn_group + let syn_value = syntaxcomplete#OmniSyntaxList(syn_group) endif - let g:omni_syntax_group_exclude_sql = '' - let syn_value = syntaxcomplete#OmniSyntaxList() let g:omni_syntax_group_include_sql = s:save_inc let g:omni_syntax_group_exclude_sql = s:save_exc " Cache these values for later use @@ -664,8 +747,26 @@ function! s:SQLCGetObjectOwner(object) endfunction function! s:SQLCGetColumns(table_name, list_type) + if a:table_name =~ '\.' + " Check if the owner/creator has been specified + let owner = matchstr( a:table_name, '^\zs.*\ze\..*\..*' ) + let table = matchstr( a:table_name, '^\(.*\.\)\?\zs.*\ze\..*' ) + let column = matchstr( a:table_name, '.*\.\zs.*' ) + + if g:omni_sql_include_owner == 1 && owner == '' && table != '' && column != '' + let owner = table + let table = column + let column = '' + endif + else + let owner = '' + let table = matchstr(a:table_name, '^["\[\]a-zA-Z0-9_ ]\+\ze\.\?') + let column = '' + endif + " Check if the table name was provided as part of the column name - let table_name = matchstr(a:table_name, '^["\[\]a-zA-Z0-9_ ]\+\ze\.\?') + " let table_name = matchstr(a:table_name, '^["\[\]a-zA-Z0-9_ ]\+\ze\.\?') + let table_name = table let table_cols = [] let table_alias = '' let move_to_top = 1 @@ -786,7 +887,12 @@ function! s:SQLCGetColumns(table_name, list_type) if table_name_new != '' let table_alias = table_name - let table_name = matchstr( table_name_new, '^\(.*\.\)\?\zs.*\ze' ) + if g:omni_sql_include_owner == 1 + let table_name = matchstr( table_name_new, '^\zs\(.\{-}\.\)\?\(.\{-}\.\)\?.*\ze' ) + else + " let table_name = matchstr( table_name_new, '^\(.*\.\)\?\zs.*\ze' ) + let table_name = matchstr( table_name_new, '^\(.\{-}\.\)\?\zs\(.\{-}\.\)\?.*\ze' ) + endif let list_idx = index(s:tbl_name, table_name, 0, &ignorecase) if list_idx > -1 @@ -828,7 +934,8 @@ function! s:SQLCGetColumns(table_name, list_type) if empty(table_cols) " Specify silent mode, no messages to the user (tbl, 1) " Specify do not comma separate (tbl, 1, 1) - let table_cols_str = DB_getListColumn(table_name, 1, 1) + " let table_cols_str = DB_getListColumn(table_name, 1, 1) + let table_cols_str = DB_getListColumn((owner!=''?owner.'.':'').table_name, 1, 1) if table_cols_str != "" let s:tbl_name = add( s:tbl_name, table_name ) @@ -854,3 +961,7 @@ function! s:SQLCGetColumns(table_name, list_type) return table_cols endfunction +" Restore: +let &cpo= s:keepcpo +unlet s:keepcpo +" vim: ts=4 fdm=marker diff --git a/runtime/autoload/syntaxcomplete.vim b/runtime/autoload/syntaxcomplete.vim index f36c6683a6..a18c3c360c 100644 --- a/runtime/autoload/syntaxcomplete.vim +++ b/runtime/autoload/syntaxcomplete.vim @@ -1,44 +1,80 @@ " Vim completion script " Language: All languages, uses existing syntax highlighting rules " Maintainer: David Fishburn -" Version: 8.0 -" Last Change: 2011 Nov 02 -" Usage: For detailed help, ":help ft-syntax-omni" +" Version: 13.0 +" Last Change: 2013 May 14 +" Usage: For detailed help, ":help ft-syntax-omni" " History " +" Version 13.0 +" - Extended the option omni_syntax_group_include_{filetype} +" to accept a comma separated list of regex's rather than +" string. For example, for the javascript filetype you could +" use: +" let g:omni_syntax_group_include_javascript = 'javascript\w\+,jquery\w\+' +" - Some syntax files (perl.vim) use the match // syntax as a mechanism +" to identify keywords. This update attempts to parse the +" match syntax and pull out syntax items which are at least +" 3 words or more. +" +" Version 12.0 +" - It is possible to have '-' as part of iskeyword, when +" checking for character ranges, tighten up the regex. +" E688: More targets than List items. +" +" Version 11.0 +" - Corrected which characters required escaping during +" substitution calls. +" +" Version 10.0 +" - Cycle through all the character ranges specified in the +" iskeyword option and build a list of valid word separators. +" Prior to this change, only actual characters were used, +" where for example ASCII "45" == "-". If "45" were used +" in iskeyword the hyphen would not be picked up. +" This introduces a new option, since the character ranges +" specified could be multibyte: +" let g:omni_syntax_use_single_byte = 1 +" - This by default will only allow single byte ASCII +" characters to be added and an additional check to ensure +" the charater is printable (see documentation for isprint). +" +" Version 9.0 +" - Add the check for cpo. +" " Version 8.0 -" Updated SyntaxCSyntaxGroupItems() +" - Updated SyntaxCSyntaxGroupItems() " - Some additional syntax items were also allowed " on nextgroup= lines which were ignored by default. " Now these lines are processed independently. " " Version 7.0 -" Updated syntaxcomplete#OmniSyntaxList() +" - Updated syntaxcomplete#OmniSyntaxList() " - Looking up the syntax groups defined from a syntax file -" looked for only 1 format of {filetype}GroupName, but some +" looked for only 1 format of {filetype}GroupName, but some " syntax writers use this format as well: " {b:current_syntax}GroupName -" OmniSyntaxList() will now check for both if the first +" - OmniSyntaxList() will now check for both if the first " method does not find a match. " " Version 6.0 -" Added syntaxcomplete#OmniSyntaxList() -" - Allows other plugins to use this for their own +" - Added syntaxcomplete#OmniSyntaxList() +" - Allows other plugins to use this for their own " purposes. " - It will return a List of all syntax items for the -" syntax group name passed in. -" - XPTemplate for SQL will use this function via the +" syntax group name passed in. +" - XPTemplate for SQL will use this function via the " sqlcomplete plugin to populate a Choose box. " " Version 5.0 -" Updated SyntaxCSyntaxGroupItems() +" - Updated SyntaxCSyntaxGroupItems() " - When processing a list of syntax groups, the final group " was missed in function SyntaxCSyntaxGroupItems. " " Set completion with CTRL-X CTRL-O to autoloaded function. " This check is in place in case this script is -" sourced directly instead of using the autoload feature. +" sourced directly instead of using the autoload feature. if exists('+omnifunc') " Do not set the option if already set since this " results in an E117 warning. @@ -48,9 +84,13 @@ if exists('+omnifunc') endif if exists('g:loaded_syntax_completion') - finish + finish endif -let g:loaded_syntax_completion = 80 +let g:loaded_syntax_completion = 130 + +" Turn on support for line continuations when creating the script +let s:cpo_save = &cpo +set cpo&vim " Set ignorecase to the ftplugin standard " This is the default setting, but if you define a buffer local @@ -67,6 +107,18 @@ if !exists('g:omni_syntax_use_iskeyword') let g:omni_syntax_use_iskeyword = 1 endif +" When using iskeyword, this setting controls whether the characters +" should be limited to single byte characters. +if !exists('g:omni_syntax_use_single_byte') + let g:omni_syntax_use_single_byte = 1 +endif + +" When using iskeyword, this setting controls whether the characters +" should be limited to single byte characters. +if !exists('g:omni_syntax_use_iskeyword_numeric') + let g:omni_syntax_use_iskeyword_numeric = 1 +endif + " Only display items in the completion window that are at least " this many characters in length. " This is the default setting, but if you define a buffer local @@ -77,7 +129,8 @@ endif " This script will build a completion list based on the syntax " elements defined by the files in $VIMRUNTIME/syntax. -let s:syn_remove_words = 'match,matchgroup=,contains,'. +" let s:syn_remove_words = 'match,matchgroup=,contains,'. +let s:syn_remove_words = 'matchgroup=,contains,'. \ 'links to,start=,end=' " \ 'links to,start=,end=,nextgroup=' @@ -158,7 +211,7 @@ endfunc function! syntaxcomplete#OmniSyntaxList(...) if a:0 > 0 let parms = [] - if 3 == type(a:1) + if 3 == type(a:1) let parms = a:1 elseif 1 == type(a:1) let parms = split(a:1, ',') @@ -172,7 +225,7 @@ endfunc function! OmniSyntaxList(...) let list_parms = [] if a:0 > 0 - if 3 == type(a:1) + if 3 == type(a:1) let list_parms = a:1 elseif 1 == type(a:1) let list_parms = split(a:1, ',') @@ -208,18 +261,18 @@ function! OmniSyntaxList(...) let saveL = @l let filetype = substitute(&filetype, '\.', '_', 'g') - + if empty(list_parms) " Default the include group to include the requested syntax group let syntax_group_include_{filetype} = '' " Check if there are any overrides specified for this filetype if exists('g:omni_syntax_group_include_'.filetype) let syntax_group_include_{filetype} = - \ substitute( g:omni_syntax_group_include_{filetype},'\s\+','','g') + \ substitute( g:omni_syntax_group_include_{filetype},'\s\+','','g') let list_parms = split(g:omni_syntax_group_include_{filetype}, ',') if syntax_group_include_{filetype} =~ '\w' - let syntax_group_include_{filetype} = - \ substitute( syntax_group_include_{filetype}, + let syntax_group_include_{filetype} = + \ substitute( syntax_group_include_{filetype}, \ '\s*,\s*', '\\|', 'g' \ ) endif @@ -229,24 +282,34 @@ function! OmniSyntaxList(...) endif " Loop through all the syntax groupnames, and build a - " syntax file which contains these names. This can + " syntax file which contains these names. This can " work generically for any filetype that does not already " have a plugin defined. " This ASSUMES the syntax groupname BEGINS with the name - " of the filetype. From my casual viewing of the vim7\syntax + " of the filetype. From my casual viewing of the vim7\syntax " directory this is true for almost all syntax definitions. " As an example, the SQL syntax groups have this pattern: " sqlType " sqlOperators " sqlKeyword ... - redir @l - silent! exec 'syntax list '.join(list_parms) - redir END + if !empty(list_parms) && empty(substitute(join(list_parms), '[a-zA-Z ]', '', 'g')) + " If list_parms only includes word characters, use it to limit + " the syntax elements. + " If using regex syntax list will fail to find those items, so + " simply grab the who syntax list. + redir @l + silent! exec 'syntax list '.join(list_parms) + redir END + else + redir @l + silent! exec 'syntax list' + redir END + endif let syntax_full = "\n".@l let @l = saveL - if syntax_full =~ 'E28' + if syntax_full =~ 'E28' \ || syntax_full =~ 'E411' \ || syntax_full =~ 'E415' \ || syntax_full =~ 'No Syntax items' @@ -256,7 +319,7 @@ function! OmniSyntaxList(...) let filetype = substitute(&filetype, '\.', '_', 'g') let list_exclude_groups = [] - if a:0 > 0 + if a:0 > 0 " Do nothing since we have specific a specific list of groups else " Default the exclude group to nothing @@ -264,93 +327,178 @@ function! OmniSyntaxList(...) " Check if there are any overrides specified for this filetype if exists('g:omni_syntax_group_exclude_'.filetype) let syntax_group_exclude_{filetype} = - \ substitute( g:omni_syntax_group_exclude_{filetype},'\s\+','','g') + \ substitute( g:omni_syntax_group_exclude_{filetype},'\s\+','','g') let list_exclude_groups = split(g:omni_syntax_group_exclude_{filetype}, ',') - if syntax_group_exclude_{filetype} =~ '\w' - let syntax_group_exclude_{filetype} = - \ substitute( syntax_group_exclude_{filetype}, + if syntax_group_exclude_{filetype} =~ '\w' + let syntax_group_exclude_{filetype} = + \ substitute( syntax_group_exclude_{filetype}, \ '\s*,\s*', '\\|', 'g' \ ) endif endif endif - " Sometimes filetypes can be composite names, like c.doxygen - " Loop through each individual part looking for the syntax - " items specific to each individual filetype. + if empty(list_parms) + let list_parms = [&filetype.'\w\+'] + endif + let syn_list = '' - let ftindex = 0 - let ftindex = match(&filetype, '\w\+', ftindex) - - while ftindex > -1 - let ft_part_name = matchstr( &filetype, '\w\+', ftindex ) - - " Syntax rules can contain items for more than just the current - " filetype. They can contain additional items added by the user - " via autocmds or their vimrc. - " Some syntax files can be combined (html, php, jsp). - " We want only items that begin with the filetype we are interested in. - let next_group_regex = '\n' . - \ '\zs'.ft_part_name.'\w\+\ze'. - \ '\s\+xxx\s\+' - let index = 0 - let index = match(syntax_full, next_group_regex, index) - - if index == -1 && exists('b:current_syntax') && ft_part_name != b:current_syntax - " There appears to be two standards when writing syntax files. - " Either items begin as: - " syn keyword {filetype}Keyword values ... - " let b:current_syntax = "sql" - " let b:current_syntax = "sqlanywhere" - " Or - " syn keyword {syntax_filename}Keyword values ... - " let b:current_syntax = "mysql" - " So, we will make the format of finding the syntax group names - " a bit more flexible and look for both if the first fails to - " find a match. + let index = 0 + for group_regex in list_parms + " Sometimes filetypes can be composite names, like c.doxygen + " Loop through each individual part looking for the syntax + " items specific to each individual filetype. + " let ftindex = 0 + " let ftindex = match(syntax_full, group_regex, ftindex) + + " while ftindex > -1 + " let ft_part_name = matchstr( syntax_full, '\w\+', ftindex ) + + " Syntax rules can contain items for more than just the current + " filetype. They can contain additional items added by the user + " via autocmds or their vimrc. + " Some syntax files can be combined (html, php, jsp). + " We want only items that begin with the filetype we are interested in. let next_group_regex = '\n' . - \ '\zs'.b:current_syntax.'\w\+\ze'. - \ '\s\+xxx\s\+' - let index = 0 + \ '\zs'.group_regex.'\ze'. + \ '\s\+xxx\s\+' let index = match(syntax_full, next_group_regex, index) - endif - - while index > -1 - let group_name = matchstr( syntax_full, '\w\+', index ) - let get_syn_list = 1 - for exclude_group_name in list_exclude_groups - if '\<'.exclude_group_name.'\>' =~ '\<'.group_name.'\>' - let get_syn_list = 0 - endif - endfor - - " This code is no longer needed in version 6.0 since we have - " augmented the syntax list command to only retrieve the syntax - " groups we are interested in. - " - " if get_syn_list == 1 - " if syntax_group_include_{filetype} != '' - " if '\<'.syntax_group_include_{filetype}.'\>' !~ '\<'.group_name.'\>' - " let get_syn_list = 0 - " endif - " endif - " endif - - if get_syn_list == 1 - " Pass in the full syntax listing, plus the group name we - " are interested in. - let extra_syn_list = s:SyntaxCSyntaxGroupItems(group_name, syntax_full) - let syn_list = syn_list . extra_syn_list . "\n" + " For the matched group name, strip off any of the regex special + " characters and see if we get a match with the current syntax + if index == -1 && exists('b:current_syntax') && substitute(group_regex, '[^a-zA-Z ]\+.*', '', 'g') !~ '^'.b:current_syntax + " There appears to be two standards when writing syntax files. + " Either items begin as: + " syn keyword {filetype}Keyword values ... + " let b:current_syntax = "sql" + " let b:current_syntax = "sqlanywhere" + " Or + " syn keyword {syntax_filename}Keyword values ... + " let b:current_syntax = "mysql" + " So, we will make the format of finding the syntax group names + " a bit more flexible and look for both if the first fails to + " find a match. + let next_group_regex = '\n' . + \ '\zs'.b:current_syntax.'\w\+\ze'. + \ '\s\+xxx\s\+' + let index = 0 + let index = match(syntax_full, next_group_regex, index) endif - let index = index + strlen(group_name) - let index = match(syntax_full, next_group_regex, index) - endwhile + while index > -1 + let group_name = matchstr( syntax_full, '\w\+', index ) + + let get_syn_list = 1 + for exclude_group_name in list_exclude_groups + if '\<'.exclude_group_name.'\>' =~ '\<'.group_name.'\>' + let get_syn_list = 0 + endif + endfor + + " This code is no longer needed in version 6.0 since we have + " augmented the syntax list command to only retrieve the syntax + " groups we are interested in. + " + " if get_syn_list == 1 + " if syntax_group_include_{filetype} != '' + " if '\<'.syntax_group_include_{filetype}.'\>' !~ '\<'.group_name.'\>' + " let get_syn_list = 0 + " endif + " endif + " endif + + if get_syn_list == 1 + " Pass in the full syntax listing, plus the group name we + " are interested in. + let extra_syn_list = s:SyntaxCSyntaxGroupItems(group_name, syntax_full) + let syn_list = syn_list . extra_syn_list . "\n" + endif - let ftindex = ftindex + len(ft_part_name) - let ftindex = match( &filetype, '\w\+', ftindex ) - endwhile + let index = index + strlen(group_name) + let index = match(syntax_full, next_group_regex, index) + endwhile + + " let ftindex = ftindex + len(ft_part_name) + " let ftindex = match( syntax_full, group_regex, ftindex ) + " endwhile + endfor + +" " Sometimes filetypes can be composite names, like c.doxygen +" " Loop through each individual part looking for the syntax +" " items specific to each individual filetype. +" let syn_list = '' +" let ftindex = 0 +" let ftindex = match(&filetype, '\w\+', ftindex) + +" while ftindex > -1 +" let ft_part_name = matchstr( &filetype, '\w\+', ftindex ) + +" " Syntax rules can contain items for more than just the current +" " filetype. They can contain additional items added by the user +" " via autocmds or their vimrc. +" " Some syntax files can be combined (html, php, jsp). +" " We want only items that begin with the filetype we are interested in. +" let next_group_regex = '\n' . +" \ '\zs'.ft_part_name.'\w\+\ze'. +" \ '\s\+xxx\s\+' +" let index = 0 +" let index = match(syntax_full, next_group_regex, index) + +" if index == -1 && exists('b:current_syntax') && ft_part_name != b:current_syntax +" " There appears to be two standards when writing syntax files. +" " Either items begin as: +" " syn keyword {filetype}Keyword values ... +" " let b:current_syntax = "sql" +" " let b:current_syntax = "sqlanywhere" +" " Or +" " syn keyword {syntax_filename}Keyword values ... +" " let b:current_syntax = "mysql" +" " So, we will make the format of finding the syntax group names +" " a bit more flexible and look for both if the first fails to +" " find a match. +" let next_group_regex = '\n' . +" \ '\zs'.b:current_syntax.'\w\+\ze'. +" \ '\s\+xxx\s\+' +" let index = 0 +" let index = match(syntax_full, next_group_regex, index) +" endif + +" while index > -1 +" let group_name = matchstr( syntax_full, '\w\+', index ) + +" let get_syn_list = 1 +" for exclude_group_name in list_exclude_groups +" if '\<'.exclude_group_name.'\>' =~ '\<'.group_name.'\>' +" let get_syn_list = 0 +" endif +" endfor + +" " This code is no longer needed in version 6.0 since we have +" " augmented the syntax list command to only retrieve the syntax +" " groups we are interested in. +" " +" " if get_syn_list == 1 +" " if syntax_group_include_{filetype} != '' +" " if '\<'.syntax_group_include_{filetype}.'\>' !~ '\<'.group_name.'\>' +" " let get_syn_list = 0 +" " endif +" " endif +" " endif + +" if get_syn_list == 1 +" " Pass in the full syntax listing, plus the group name we +" " are interested in. +" let extra_syn_list = s:SyntaxCSyntaxGroupItems(group_name, syntax_full) +" let syn_list = syn_list . extra_syn_list . "\n" +" endif + +" let index = index + strlen(group_name) +" let index = match(syntax_full, next_group_regex, index) +" endwhile + +" let ftindex = ftindex + len(ft_part_name) +" let ftindex = match( &filetype, '\w\+', ftindex ) +" endwhile " Convert the string to a List and sort it. let compl_list = sort(split(syn_list)) @@ -392,7 +540,7 @@ function! s:SyntaxCSyntaxGroupItems( group_name, syntax_full ) " \| - 2nd potential match " \%$ - matches end of the file or string " \) - end a group - let syntax_group = matchstr(a:syntax_full, + let syntax_group = matchstr(a:syntax_full, \ "\n".a:group_name.'\s\+xxx\s\+\zs.\{-}\ze\(\n\w\|\%$\)' \ ) @@ -402,42 +550,97 @@ function! s:SyntaxCSyntaxGroupItems( group_name, syntax_full ) " We only want the words for the lines begining with " containedin, but there could be other items. - + " Tried to remove all lines that do not begin with contained " but this does not work in all cases since you can have " contained nextgroup=... " So this will strip off the ending of lines with known " keywords. - let syn_list = substitute( + let syn_list = substitute( \ syntax_group, '\<\('. \ substitute( \ escape(s:syn_remove_words, '\\/.*$^~[]') \ , ',', '\\|', 'g' \ ). \ '\).\{-}\%($\|'."\n".'\)' - \ , "\n", 'g' + \ , "\n", 'g' \ ) + " Attempt to deal with lines using the match syntax + " javaScriptDocTags xxx match /@\(param\|argument\|requires\|file\)\>/ + " Though it can use any types of regex, so this plugin will attempt + " to restrict it + " 1. Only use \( or \%( constructs remove all else + " 2 Remove and []s + " 3. Account for match //constructs + " \%(\%(ms\|me\|hs\|he\|rs\|re\|lc\)\S\+\)\? + " 4. Hope for the best + " + " + let syn_list_old = syn_list + while syn_list =~ '\\s\+\/' + if syn_list =~ 'perlElseIfError' + let syn_list = syn_list + endif + " Check if the match has words at least 3 characters long + if syn_list =~ '\.\{-}\ze\\\@\ze.\{-}\\\@.\{-}\ze\/ ', "", 'g' ) + " let syn_list = substitute( syn_list, '\%(\\s\+\/' + " Problem removing the match / / tags + let syn_list = '' + endif + endwhile + + " Now strip off the newline + blank space + contained. " Also include lines with nextgroup=@someName skip_key_words syntax_element - let syn_list = substitute( - \ syn_list, '\%(^\|\n\)\@<=\s*\<\(contained\|nextgroup=\)' - \ , "", 'g' + " \ syn_list, '\%(^\|\n\)\@<=\s*\<\(contained\|nextgroup=\)' + " \ syn_list, '\%(^\|\n\)\@<=\s*\<\(contained\|nextgroup=[@a-zA-Z,]*\)' + let syn_list = substitute( + \ syn_list, '\<\(contained\|nextgroup=[@a-zA-Z,]*\)' + \ , "", 'g' \ ) " This can leave lines like this " =@vimMenuList skipwhite onoremenu " Strip the special option keywords first " :h :syn-skipwhite* - let syn_list = substitute( + let syn_list = substitute( \ syn_list, '\<\(skipwhite\|skipnl\|skipempty\)\>' - \ , "", 'g' + \ , "", 'g' \ ) " Now remove the remainder of the nextgroup=@someName lines - let syn_list = substitute( + let syn_list = substitute( \ syn_list, '\%(^\|\n\)\@<=\s*\(@\w\+\)' - \ , "", 'g' + \ , "", 'g' \ ) if b:omni_syntax_use_iskeyword == 0 @@ -446,19 +649,74 @@ function! s:SyntaxCSyntaxGroupItems( group_name, syntax_full ) " This will replace non-word characters with spaces. let syn_list = substitute( syn_list, '[^0-9A-Za-z_ ]', ' ', 'g' ) else - let accept_chars = ','.&iskeyword.',' - " Remove all character ranges - " let accept_chars = substitute(accept_chars, ',[^,]\+-[^,]\+,', ',', 'g') - let accept_chars = substitute(accept_chars, ',\@<=[^,]\+-[^,]\+,', '', 'g') - " Remove all numeric specifications - " let accept_chars = substitute(accept_chars, ',\d\{-},', ',', 'g') - let accept_chars = substitute(accept_chars, ',\@<=\d\{-},', '', 'g') - " Remove all commas - let accept_chars = substitute(accept_chars, ',', '', 'g') - " Escape special regex characters - let accept_chars = escape(accept_chars, '\\/.*$^~[]' ) - " Remove all characters that are not acceptable - let syn_list = substitute( syn_list, '[^0-9A-Za-z_ '.accept_chars.']', ' ', 'g' ) + if g:omni_syntax_use_iskeyword_numeric == 1 + " iskeyword can contain value like this + " 38,42,43,45,47-58,60-62,64-90,97-122,_,+,-,*,/,%,<,=,>,:,$,?,!,@-@,94 + " Numeric values convert to their ASCII equivalent using the + " nr2char() function. + " & 38 + " * 42 + " + 43 + " - 45 + " ^ 94 + " Iterate through all numeric specifications and convert those + " to their ascii equivalent ensuring the character is printable. + " If so, add it to the list. + let accepted_chars = '' + for item in split(&iskeyword, ',') + if item =~ '\d-\d' + " This is a character range (ie 47-58), + " cycle through each character within the range + let [b:start, b:end] = split(item, '-') + for range_item in range( b:start, b:end ) + if range_item <= 127 || g:omni_syntax_use_single_byte == 0 + if nr2char(range_item) =~ '\p' + let accepted_chars = accepted_chars . nr2char(range_item) + endif + endif + endfor + elseif item =~ '^\d\+$' + " Only numeric, translate to a character + if item < 127 || g:omni_syntax_use_single_byte == 0 + if nr2char(item) =~ '\p' + let accepted_chars = accepted_chars . nr2char(item) + endif + endif + else + if char2nr(item) < 127 || g:omni_syntax_use_single_byte == 0 + if item =~ '\p' + let accepted_chars = accepted_chars . item + endif + endif + endif + endfor + " Escape special regex characters + " Looks like the wrong chars are escaped. In a collection, + " :h /[] + " only `]', `\', `-' and `^' are special: + " let accepted_chars = escape(accepted_chars, '\\/.*$^~[]' ) + let accepted_chars = escape(accepted_chars, ']\-^' ) + " Remove all characters that are not acceptable + let syn_list = substitute( syn_list, '[^A-Za-z'.accepted_chars.']', ' ', 'g' ) + else + let accept_chars = ','.&iskeyword.',' + " Remove all character ranges + " let accept_chars = substitute(accept_chars, ',[^,]\+-[^,]\+,', ',', 'g') + let accept_chars = substitute(accept_chars, ',\@<=[^,]\+-[^,]\+,', '', 'g') + " Remove all numeric specifications + " let accept_chars = substitute(accept_chars, ',\d\{-},', ',', 'g') + let accept_chars = substitute(accept_chars, ',\@<=\d\{-},', '', 'g') + " Remove all commas + let accept_chars = substitute(accept_chars, ',', '', 'g') + " Escape special regex characters + " Looks like the wrong chars are escaped. In a collection, + " :h /[] + " only `]', `\', `-' and `^' are special: + " let accept_chars = escape(accept_chars, '\\/.*$^~[]' ) + let accept_chars = escape(accept_chars, ']\-^' ) + " Remove all characters that are not acceptable + let syn_list = substitute( syn_list, '[^0-9A-Za-z_'.accept_chars.']', ' ', 'g' ) + endif endif if b:omni_syntax_minimum_length > 0 @@ -471,3 +729,27 @@ function! s:SyntaxCSyntaxGroupItems( group_name, syntax_full ) return syn_list endfunction + +function! OmniSyntaxShowChars(spec) + let result = [] + for item in split(a:spec, ',') + if len(item) > 1 + if item == '@-@' + call add(result, char2nr(item)) + else + call extend(result, call('range', split(item, '-'))) + endif + else + if item == '@' " assume this is [A-Za-z] + for [c1, c2] in [['A', 'Z'], ['a', 'z']] + call extend(result, range(char2nr(c1), char2nr(c2))) + endfor + else + call add(result, char2nr(item)) + endif + endif + endfor + return join(map(result, 'nr2char(v:val)'), ', ') +endfunction +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/autoload/tar.vim b/runtime/autoload/tar.vim index d67212934b..5e76870cce 100644 --- a/runtime/autoload/tar.vim +++ b/runtime/autoload/tar.vim @@ -1,13 +1,13 @@ " tar.vim: Handles browsing tarfiles " AUTOLOAD PORTION -" Date: Jan 17, 2012 -" Version: 28 -" Maintainer: Charles E Campbell, Jr +" Date: Apr 17, 2013 +" Version: 29 +" Maintainer: Charles E Campbell " License: Vim License (see vim's :help license) " " Contains many ideas from Michael Toren's " -" Copyright: Copyright (C) 2005-2011 Charles E. Campbell, Jr. {{{1 +" Copyright: Copyright (C) 2005-2011 Charles E. Campbell {{{1 " Permission is hereby granted to use and distribute this code, " with or without modifications, provided that this copyright " notice is copied with it. Like anything else that's free, @@ -22,7 +22,7 @@ if &cp || exists("g:loaded_tar") finish endif -let g:loaded_tar= "v28" +let g:loaded_tar= "v29" if v:version < 702 echohl WarningMsg echo "***warning*** this version of tar needs vim 7.2" @@ -31,6 +31,7 @@ if v:version < 702 endif let s:keepcpo= &cpo set cpo&vim +"DechoTabOn "call Decho("loading autoload/tar.vim") " --------------------------------------------------------------------- @@ -80,7 +81,7 @@ endif " set up shell quoting character if !exists("g:tar_shq") - if exists("&shq") && &shq != "" + if exists("+shq") && exists("&shq") && &shq != "" let g:tar_shq= &shq elseif has("win32") || has("win95") || has("win64") || has("win16") if exists("g:netrw_cygwin") && g:netrw_cygwin @@ -147,7 +148,7 @@ fun! tar#Browse(tarfile) keepj $ let tarfile= a:tarfile - if has("win32") && executable("cygpath") + if has("win32unix") && executable("cygpath") " assuming cygwin let tarfile=substitute(system("cygpath -u ".shellescape(tarfile,0)),'\n$','','e') endif @@ -227,7 +228,7 @@ fun! s:TarBrowseSelect() " about to make a new window, need to use b:tarfile let tarfile= b:tarfile let curfile= expand("%") - if has("win32") && executable("cygpath") + if has("win32unix") && executable("cygpath") " assuming cygwin let tarfile=substitute(system("cygpath -u ".shellescape(tarfile,0)),'\n$','','e') endif @@ -239,6 +240,8 @@ fun! s:TarBrowseSelect() let s:tblfile_{winnr()}= curfile call tar#Read("tarfile:".tarfile.'::'.fname,1) filetype detect + set nomod + exe 'com! -buffer -nargs=? -complete=file TarDiff :call tar#Diff(,"'.fnameescape(fname).'")' let &report= repkeep " call Dret("TarBrowseSelect : s:tblfile_".winnr()."<".s:tblfile_{winnr()}.">") @@ -252,7 +255,7 @@ fun! tar#Read(fname,mode) set report=10 let tarfile = substitute(a:fname,'tarfile:\(.\{-}\)::.*$','\1','') let fname = substitute(a:fname,'tarfile:.\{-}::\(.*\)$','\1','') - if has("win32") && executable("cygpath") + if has("win32unix") && executable("cygpath") " assuming cygwin let tarfile=substitute(system("cygpath -u ".shellescape(tarfile,0)),'\n$','','e') endif @@ -425,7 +428,7 @@ fun! tar#Write(fname) if fname =~ '/' let dirpath = substitute(fname,'/[^/]\+$','','e') - if executable("cygpath") + if has("win32unix") && executable("cygpath") let dirpath = substitute(system("cygpath ".shellescape(dirpath, 0)),'\n','','e') endif call mkdir(dirpath,"p") @@ -445,7 +448,7 @@ fun! tar#Write(fname) let tar_secure= " " endif exe "w! ".fnameescape(fname) - if executable("cygpath") + if has("win32unix") && executable("cygpath") let tarfile = substitute(system("cygpath ".shellescape(tarfile,0)),'\n','','e') endif @@ -500,6 +503,30 @@ fun! tar#Write(fname) " call Dret("tar#Write") endfun +" --------------------------------------------------------------------- +" tar#Diff: {{{2 +fun! tar#Diff(userfname,fname) +" call Dfunc("tar#Diff(userfname<".a:userfname."> fname<".a:fname.")") + let fname= a:fname + if a:userfname != "" + let fname= a:userfname + endif + if filereadable(fname) + " sets current file (from tarball) for diff'ing + " splits window vertically + " opens original file, sets it for diff'ing + " sets up b:tardiff_otherbuf variables so each buffer knows about the other (for closing purposes) + diffthis + wincmd v + exe "e ".fnameescape(fname) + diffthis + else + redraw! + echo "***warning*** unable to read file<".fname.">" + endif +" call Dret("tar#Diff") +endfun + " --------------------------------------------------------------------- " s:Rmdir: {{{2 fun! s:Rmdir(fname) diff --git a/runtime/autoload/tohtml.vim b/runtime/autoload/tohtml.vim index 2e9021a48e..5cb23a6146 100644 --- a/runtime/autoload/tohtml.vim +++ b/runtime/autoload/tohtml.vim @@ -1,6 +1,6 @@ " Vim autoload file for the tohtml plugin. " Maintainer: Ben Fritz -" Last Change: 2012 Jun 30 +" Last Change: 2013 Jun 19 " " Additional contributors: " @@ -401,15 +401,15 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{ call add(html, '') let body_line_num = len(html) if !empty(s:settings.prevent_copy) - call add(html, "") + call add(html, "") call add(html, "") call add(html, "
0
") call add(html, "
") call add(html, "
") else - call add(html, '') + call add(html, '') endif - call add(html, "") + call add(html, "
") call add(html, '') for buf in a:win_list @@ -475,7 +475,7 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{ let temp = getline(1,'$') " clean out id on the main content container because we already set it on " the table - let temp[0] = substitute(temp[0], " id='vimCodeElement'", "", "") + let temp[0] = substitute(temp[0], " id='vimCodeElement[^']*'", "", "") " undo deletion of start and end part " so we can later save the file as valid html " TODO: restore using grabbed lines if undolevel is 1? @@ -503,6 +503,11 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{ call add(html, s:body_end_line) call add(html, '') + " The generated HTML is admittedly ugly and takes a LONG time to fold. + " Make sure the user doesn't do syntax folding when loading a generated file, + " using a modeline. + call add(html, '') + let i = 1 let name = "Diff" . (s:settings.use_xhtml ? ".xhtml" : ".html") " Find an unused file name if current file name is already in use @@ -539,14 +544,12 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{ " add required javascript in reverse order so we can just call append again " and again without adjusting {{{ - " insert script closing tag if any javascript is needed - if s:settings.dynamic_folds || !empty(s:settings.prevent_copy) - call append(style_start, [ - \ '', - \ s:settings.use_xhtml ? '//]]>' : '-->', - \ "" - \ ]) - endif + " insert script closing tag + call append(style_start, [ + \ '', + \ s:settings.use_xhtml ? '//]]>' : '-->', + \ "" + \ ]) " insert script which corrects the size of small input elements in " prevent_copy mode. See 2html.vim for details on why this is needed and how @@ -565,13 +568,62 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{ \ ' var emWidth = document.getElementById("oneEmWidth").clientWidth;', \ ' if (inputWidth > goodWidth) {', \ ' while (ratio < 100*goodWidth/emWidth && ratio < 100) {', - \ ' ratio += 5;', - \ ' }', - \ ' document.getElementById("vimCodeElement").className = "em"+ratio;', + \ ' ratio += 5;', + \ ' }', + \ ' document.getElementById("vimCodeElement'.s:settings.id_suffix.'").className = "em"+ratio;', \ ' }', \ '}' \ ]) endif + " + " insert javascript to get IDs from line numbers, and to open a fold before + " jumping to any lines contained therein + call append(style_start, [ + \ " /* Always jump to new location even if the line was hidden inside a fold, or", + \ " * we corrected the raw number to a line ID.", + \ " */", + \ " if (lineElem) {", + \ " lineElem.scrollIntoView(true);", + \ " }", + \ " return true;", + \ "}", + \ "if ('onhashchange' in window) {", + \ " window.onhashchange = JumpToLine;", + \ "}" + \ ]) + if s:settings.dynamic_folds + call append(style_start, [ + \ "", + \ " /* navigate upwards in the DOM tree to open all folds containing the line */", + \ " var node = lineElem;", + \ " while (node && node.id != 'vimCodeElement".s:settings.id_suffix."')", + \ " {", + \ " if (node.className == 'closed-fold')", + \ " {", + \ " /* toggle open the fold ID (remove window ID) */", + \ " toggleFold(node.id.substr(4));", + \ " }", + \ " node = node.parentNode;", + \ " }", + \ ]) + endif + call append(style_start, [ + \ "", + \ "/* function to open any folds containing a jumped-to line before jumping to it */", + \ "function JumpToLine()", + \ "{", + \ " var lineNum;", + \ " lineNum = window.location.hash;", + \ " lineNum = lineNum.substr(1); /* strip off '#' */", + \ "", + \ " if (lineNum.indexOf('L') == -1) {", + \ " lineNum = 'L'+lineNum;", + \ " }", + \ " if (lineNum.indexOf('W') == -1) {", + \ " lineNum = 'W1'+lineNum;", + \ " }", + \ " lineElem = document.getElementById(lineNum);" + \ ]) " Insert javascript to toggle matching folds open and closed in all windows, " if dynamic folding is active. @@ -596,12 +648,11 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{ \ ]) endif - " insert script tag if any javascript is needed - if s:settings.dynamic_folds || s:settings.prevent_copy != "" - call append(style_start, [ - \ "', 'nWb') - \ && 0 < searchpair(js, '', '', 'nW') - " we're inside javascript - if getline(lnum) !~ js && getline(a:lnum) != '' - if restore_ic == 0 - setlocal noic +func! s:CSSIndent() "{{{ + " adopted $VIMRUNTIME/indent/css.vim + if getline(v:lnum) =~ '^\s*[*}]' + return cindent(v:lnum) + endif + let minline = b:indent.blocklnr + let pnum = s:css_prevnoncomment(v:lnum - 1, minline) + if pnum <= minline + " < is to catch errors + " indent for first content line after comments + return eval(s:css1indent) + endif + let ind = indent(pnum) + s:css_countbraces(pnum, 1) * s:ShiftWidth() + let pline = getline(pnum) + if pline =~ '}\s*$' + let ind -= (s:css_countbraces(pnum, 0) - (pline =~ '^\s*}')) * s:ShiftWidth() + endif + return ind +endfunc "}}} +func! s:css_prevnoncomment(lnum, stopline) "{{{ + " caller starts from a line a:lnum-1 that is not a comment + let lnum = prevnonblank(a:lnum) + let ccol = match(getline(lnum), '\*/') + if ccol < 0 + return lnum + endif + call cursor(lnum, ccol+1) + let lnum = search('/\*', 'bW', a:stopline) + if indent(".") == virtcol(".")-1 + return prevnonblank(lnum-1) + else + return lnum + endif +endfunc "}}} +func! s:css_countbraces(lnum, count_open) "{{{ + let brs = substitute(getline(a:lnum),'[''"].\{-}[''"]\|/\*.\{-}\*/\|/\*.*$\|[^{}]','','g') + let n_open = 0 + let n_close = 0 + for brace in split(brs, '\zs') + if brace == "{" + let n_open += 1 + elseif brace == "}" + if n_open > 0 + let n_open -= 1 + else + let n_close += 1 endif - return cindent(a:lnum) endif + endfor + return a:count_open ? n_open : n_close +endfunc "}}} + +"}}} +func! s:Alien5() "{{{ + " + return -1 +endfunc "}}} + +func! HtmlIndent() "{{{ + let s:curline = tolower(getline(v:lnum)) + let indentunit = s:ShiftWidth() + + let s:newstate = {} + let s:newstate.lnum = v:lnum + + " does the line start with a closing tag? + let swendtag = match(s:curline, '^\s*= 0 + + if prevnonblank(v:lnum-1) == b:indent.lnum && s:usestate + " use state (continue from previous line) + else + " start over (know nothing) + let b:indent = s:FreshState(v:lnum) endif - if getline(lnum) =~ '\c' - " line before the current line a:lnum contains - " a closing . --> search for line before - " starting
 to restore the indent.
-	let preline = prevnonblank(search('\c
', 'bW') - 1)
-	if preline > 0
-	    if restore_ic == 0
-	      setlocal noic
+    if b:indent.block >= 2
+	" within block
+	let endtag = s:endtags[b:indent.block-2]
+	let blockend = stridx(s:curline, endtag)
+	if blockend >= 0
+	    " block ends here
+	    let s:newstate.block = 0
+	    " calc indent for REST OF LINE (may start more blocks):
+	    let s:curline = strpart(s:curline, blockend+strlen(endtag))
+	    call s:CountITags()
+	    if swendtag && b:indent.block != 5
+		let indent = b:indent.blocktagind + s:curind * indentunit
+		let s:newstate.baseindent = indent + s:nextrel * indentunit
+	    else
+		let indent = s:Alien{b:indent.block}()
+		let s:newstate.baseindent = b:indent.blocktagind + s:nextrel * indentunit
 	    endif
-	    return indent(preline)
+	    call extend(b:indent, s:newstate, "force")
+	    return indent
+	else
+	    " block continues
+	    " indent this line with alien method
+	    let indent = s:Alien{b:indent.block}()
+	    call extend(b:indent, s:newstate, "force")
+	    return indent
 	endif
+    else
+	" not within a block - within usual html
+	" if < 2 then always 0
+	let s:newstate.block = b:indent.block
+	call s:CountITags()
+	if swendtag
+	    let indent = b:indent.baseindent + s:curind * indentunit
+	    let s:newstate.baseindent = indent + s:nextrel * indentunit
+	else
+	    let indent = b:indent.baseindent
+	    let s:newstate.baseindent = indent + (s:curind + s:nextrel) * indentunit
+	endif
+	call extend(b:indent, s:newstate, "force")
+	return indent
     endif
 
-    let ind = HtmlIndentSum(lnum, -1)
-    let ind = ind + HtmlIndentSum(a:lnum, 0)
+endfunc "}}}
 
-    if restore_ic == 0
-	setlocal noic
-    endif
+" check user settings (first time), clear cpo, Modeline: {{{1
+
+" DEBUG:
+com! -nargs=* IndHtmlLocal 
 
-    return indent(lnum) + (&sw * ind)
-endfun
+call HtmlIndent_CheckUserSettings()
 
 let &cpo = s:cpo_save
 unlet s:cpo_save
 
-" [-- EOF /indent/html.vim --]
+" vim:set fdm=marker ts=8:
diff --git a/runtime/indent/liquid.vim b/runtime/indent/liquid.vim
index df43f40cc4..01e7223696 100644
--- a/runtime/indent/liquid.vim
+++ b/runtime/indent/liquid.vim
@@ -1,7 +1,7 @@
 " Vim indent file
 " Language:     Liquid
 " Maintainer:   Tim Pope 
-" Last Change:  2012 May 07
+" Last Change:	2013 May 30
 
 if exists('b:did_indent')
   finish
diff --git a/runtime/indent/ocaml.vim b/runtime/indent/ocaml.vim
index a84c992edd..3bd65c63f0 100644
--- a/runtime/indent/ocaml.vim
+++ b/runtime/indent/ocaml.vim
@@ -4,9 +4,13 @@
 "               Mike Leary           
 "               Markus Mottl         
 " URL:          http://www.ocaml.info/vim/indent/ocaml.vim
-" Last Change:  2010 Sep 04 - Added an indentation improvement by Mark Weber
+" Last Change:  2013 Jun 29
 "               2005 Jun 25 - Fixed multiple bugs due to 'else\nreturn ind' working
 "               2005 May 09 - Added an option to not indent OCaml-indents specially (MM)
+"               2013 June   - commented textwidth (Marc Weber)
+"
+" Marc Weber's comment: This file may contain a lot of (very custom) stuff
+" which eventually should be moved somewhere else ..
 
 " Only load this indent file when no other was loaded.
 if exists("b:did_indent")
@@ -19,7 +23,9 @@ setlocal indentexpr=GetOCamlIndent()
 setlocal indentkeys+=0=and,0=class,0=constraint,0=done,0=else,0=end,0=exception,0=external,0=if,0=in,0=include,0=inherit,0=initializer,0=let,0=method,0=open,0=then,0=type,0=val,0=with,0;;,0>\],0\|\],0>},0\|,0},0\],0)
 setlocal nolisp
 setlocal nosmartindent
-setlocal textwidth=80
+
+" At least Marc Weber and Markus Mottl do not like this:
+" setlocal textwidth=80
 
 " Comment formatting
 if !exists("no_ocaml_comments")
diff --git a/runtime/indent/perl.vim b/runtime/indent/perl.vim
index 1fbc4ded9e..fc4b6a30d3 100644
--- a/runtime/indent/perl.vim
+++ b/runtime/indent/perl.vim
@@ -1,8 +1,9 @@
 " Vim indent file
-" Language:     Perl 5
-" Author:       Andy Lester 
-" URL:          http://github.com/petdance/vim-perl/tree/master
-" Last Change:  June 3, 2009
+" Language:      Perl 5
+" Maintainer:    vim-perl 
+" Homepage:      http://github.com/vim-perl/vim-perl
+" Bugs/requests: http://github.com/vim-perl/vim-perl/issues
+" Last Change:   2013-07-24
 
 " Suggestions and improvements by :
 "   Aaron J. Sherman (use syntax for hints)
@@ -11,9 +12,9 @@
 " TODO things that are not or not properly indented (yet) :
 " - Continued statements
 "     print "foo",
-"	"bar";
+"       "bar";
 "     print "foo"
-"	if bar();
+"       if bar();
 " - Multiline regular expressions (m//x)
 " (The following probably needs modifying the perl syntax file)
 " - qw() lists
@@ -34,15 +35,10 @@ if !b:indent_use_syntax
     setlocal indentkeys+=0=EO
 endif
 
-" Only define the function once.
-if exists("*GetPerlIndent")
-    finish
-endif
-
 let s:cpo_save = &cpo
 set cpo-=C
 
-function GetPerlIndent()
+function! GetPerlIndent()
 
     " Get the line to be indented
     let cline = getline(v:lnum)
@@ -52,7 +48,7 @@ function GetPerlIndent()
         return 0
     endif
 
-    " Don't reindent coments on first column
+    " Don't reindent comments on first column
     if cline =~ '^#.'
         return 0
     endif
@@ -124,7 +120,12 @@ function GetPerlIndent()
     " Indent blocks enclosed by {}, (), or []
     if b:indent_use_syntax
         " Find a real opening brace
-        let bracepos = match(line, '[(){}\[\]]', matchend(line, '^\s*[)}\]]'))
+        " NOTE: Unlike Perl character classes, we do NOT need to escape the
+        " closing brackets with a backslash.  Doing so just puts a backslash
+        " in the character class and causes sorrow.  Instead, put the closing
+        " bracket as the first character in the class.
+        let braceclass = '[][(){}]'
+        let bracepos = match(line, braceclass, matchend(line, '^\s*[])}]'))
         while bracepos != -1
             let synid = synIDattr(synID(lnum, bracepos + 1, 0), "name")
             " If the brace is highlighted in one of those groups, indent it.
@@ -132,8 +133,9 @@ function GetPerlIndent()
             if synid == ""
                         \ || synid == "perlMatchStartEnd"
                         \ || synid == "perlHereDoc"
+                        \ || synid == "perlBraces"
                         \ || synid =~ "^perlFiledescStatement"
-                        \ || synid =~ '^perl\(Sub\|Block\)Fold'
+                        \ || synid =~ '^perl\(Sub\|Block\|Package\)Fold'
                 let brace = strpart(line, bracepos, 1)
                 if brace == '(' || brace == '{' || brace == '['
                     let ind = ind + &sw
@@ -141,22 +143,23 @@ function GetPerlIndent()
                     let ind = ind - &sw
                 endif
             endif
-            let bracepos = match(line, '[(){}\[\]]', bracepos + 1)
+            let bracepos = match(line, braceclass, bracepos + 1)
         endwhile
-        let bracepos = matchend(cline, '^\s*[)}\]]')
+        let bracepos = matchend(cline, '^\s*[])}]')
         if bracepos != -1
             let synid = synIDattr(synID(v:lnum, bracepos, 0), "name")
             if synid == ""
                         \ || synid == "perlMatchStartEnd"
-                        \ || synid =~ '^perl\(Sub\|Block\)Fold'
+                        \ || synid == "perlBraces"
+                        \ || synid =~ '^perl\(Sub\|Block\|Package\)Fold'
                 let ind = ind - &sw
             endif
         endif
     else
-        if line =~ '[{\[(]\s*\(#[^)}\]]*\)\=$'
+        if line =~ '[{[(]\s*\(#[^])}]*\)\=$'
             let ind = ind + &sw
         endif
-        if cline =~ '^\s*[)}\]]'
+        if cline =~ '^\s*[])}]'
             let ind = ind - &sw
         endif
     endif
diff --git a/runtime/indent/perl6.vim b/runtime/indent/perl6.vim
index 75159e3a3a..ff2a579f0a 100644
--- a/runtime/indent/perl6.vim
+++ b/runtime/indent/perl6.vim
@@ -1,12 +1,13 @@
 " Vim indent file
-" Language:     Perl 6
-" Maintainer:   Andy Lester 
-" URL:          http://github.com/petdance/vim-perl/tree/master
-" Last Change:  2009-07-04
-" Contributors: Andy Lester 
-"               Hinrik Örn Sigurðsson 
+" Language:      Perl 6
+" Maintainer:    vim-perl 
+" Homepage:      http://github.com/vim-perl/vim-perl
+" Bugs/requests: http://github.com/vim-perl/vim-perl/issues
+" Last Change:   2013-07-21
+" Contributors:  Andy Lester 
+"                Hinrik Örn Sigurðsson 
 "
-" Adapted from Perl indent file by Rafael Garcia-Suarez 
+" Adapted from indent/perl.vim by Rafael Garcia-Suarez 
 
 " Suggestions and improvements by :
 "   Aaron J. Sherman (use syntax for hints)
@@ -46,15 +47,10 @@ if !b:indent_use_syntax
     setlocal indentkeys+=0=EO
 endif
 
-" Only define the function once.
-if exists("*GetPerl6Indent")
-    finish
-endif
-
 let s:cpo_save = &cpo
 set cpo-=C
 
-function GetPerl6Indent()
+function! GetPerl6Indent()
 
     " Get the line to be indented
     let cline = getline(v:lnum)
diff --git a/runtime/indent/php.vim b/runtime/indent/php.vim
index bc196ed3c4..4902b9e630 100644
--- a/runtime/indent/php.vim
+++ b/runtime/indent/php.vim
@@ -2,21 +2,23 @@
 " Language:	PHP
 " Author:	John Wellesz 
 " URL:		http://www.2072productions.com/vim/indent/php.vim
-" Last Change:	2010 Jully 26th
-" Newsletter:	http://www.2072productions.com/?to=php-indent-for-vim-newsletter.php
-" Version:	1.33
+" Home:		https://github.com/2072/PHP-Indenting-for-VIm
+" Last Change:	2013 August 7th
+" Version:	1.39
 "
 "
-"  If you find a bug, please report it on GitHub:
-"	http://github.com/2072/PHP-Indenting-for-VIm/issues
-"  with an example of code that breaks the algorithm.
+"	Type :help php-indent for available options
 "
+"	A fully commented version of this file is available on github
 "
-"	Thanks a lot for using this script.
 "
+"  If you find a bug, please open a ticket on github.org
+"  ( https://github.com/2072/PHP-Indenting-for-VIm/issues ) with an example of
+"  code that breaks the algorithm.
 "
+
 " NOTE: This script must be used with PHP syntax ON and with the php syntax
-"	script by Lutz Eymers (http://www.ipdienste.net/data/php.vim ) or with the
+"	script by Lutz Eymers (http://www.isp.de/data/php.vim ) or with the
 "	script by Peter Hodge (http://www.vim.org/scripts/script.php?script_id=1571 )
 "	the later is bunbdled by default with Vim 7.
 "
@@ -26,7 +28,7 @@
 "	script will automatically put HereDoc end identifiers at col 1 if
 "	they are followed by a ';').
 "
-"
+
 " NOTE: If you are editing files in Unix file format and that (by accident)
 "	there are '\r' before new lines, this script won't be able to proceed
 "	correctly and will make many mistakes because it won't be able to match
@@ -38,8 +40,6 @@
 "	or simply 'let' the option PHP_removeCRwhenUnix to 1 and the script will
 "	silently remove them when VIM load this script (at each bufread).
 "
-" Options: See :help php-indent for available options.
-
 
 if exists("b:did_indent")
     finish
@@ -50,12 +50,19 @@ let b:did_indent = 1
 let php_sync_method = 0
 
 
+
 if exists("PHP_default_indenting")
     let b:PHP_default_indenting = PHP_default_indenting * &sw
 else
     let b:PHP_default_indenting = 0
 endif
 
+if exists("PHP_outdentSLComments")
+    let b:PHP_outdentSLComments = PHP_outdentSLComments * &sw
+else
+    let b:PHP_outdentSLComments = 0
+endif
+
 if exists("PHP_BracesAtCodeLevel")
     let b:PHP_BracesAtCodeLevel = PHP_BracesAtCodeLevel
 else
@@ -116,13 +123,20 @@ endif
 
 if exists("*GetPhpIndent")
     call ResetPhpOptions()
-    finish
+    finish " XXX -- comment this line for easy dev
 endif
 
 let s:endline= '\s*\%(//.*\|#.*\|/\*.*\*/\s*\)\=$'
 let s:PHP_startindenttag = '\)\@!\|]*>\%(.*<\/script>\)\@!'
 
 
+function! DebugPrintReturn(scriptLine)
+
+    echo "debug:" . a:scriptLine
+    call getchar()
+
+endfunction
+
 function! GetLastRealCodeLNum(startline) " {{{
 
     let lnum = a:startline
@@ -189,8 +203,6 @@ function! GetLastRealCodeLNum(startline) " {{{
 	let b:InPHPcode_and_script = 0
     endif
 
-
-
     return lnum
 endfunction " }}}
 
@@ -198,11 +210,11 @@ function! Skippmatch2()
 
     let line = getline(".")
 
-   if line =~ '\%(".*\)\@<=/\*\%(.*"\)\@=' || line =~ '\%(\%(//\|#\).*\)\@<=/\*'
-       return 1
-   else
-       return 0
-   endif
+    if line =~ "\\([\"']\\).*/\\*.*\\1" || line =~ '\%(//\|#\).*/\*'
+        return 1
+    else
+        return 0
+    endif
 endfun
 
 function! Skippmatch()	" {{{
@@ -291,7 +303,7 @@ function! FindTheSwitchIndent (lnum) " {{{
 
 endfunction "}}}
 
-
+let s:SynPHPMatchGroups = {'phpParent':1, 'Delimiter':1, 'Define':1, 'Storageclass':1, 'StorageClass':1, 'Structure':1, 'Exception':1}
 function! IslinePHP (lnum, tofind) " {{{
     let cline = getline(a:lnum)
 
@@ -307,14 +319,14 @@ function! IslinePHP (lnum, tofind) " {{{
 
     let synname = synIDattr(synID(a:lnum, coltotest, 0), "name")
 
-    if synname =~ '^php' || synname=="Delimiter" || synname =~? '^javaScript'
+    if get(s:SynPHPMatchGroups, synname) || synname =~ '^php' ||  synname =~? '^javaScript'
 	return synname
     else
 	return ""
     endif
 endfunction " }}}
 
-let s:notPhpHereDoc = '\%(break\|return\|continue\|exit\|else\)'
+let s:notPhpHereDoc = '\%(break\|return\|continue\|exit\|die\|else\)'
 let s:blockstart = '\%(\%(\%(}\s*\)\=else\%(\s\+\)\=\)\=if\>\|else\>\|while\>\|switch\>\|case\>\|default\>\|for\%(each\)\=\>\|declare\>\|class\>\|interface\>\|abstract\>\|try\>\|catch\>\)'
 
 let s:autoresetoptions = 0
@@ -361,14 +373,12 @@ function! GetPhpIndent()
     if !b:PHP_indentinghuge && b:PHP_lastindented > b:PHP_indentbeforelast
 	if b:PHP_indentbeforelast
 	    let b:PHP_indentinghuge = 1
-	    echom 'Large indenting detected, speed optimizations engaged (v1.33)'
 	endif
 	let b:PHP_indentbeforelast = b:PHP_lastindented
     endif
 
     if b:InPHPcode_checked && prevnonblank(v:lnum - 1) != b:PHP_lastindented
 	if b:PHP_indentinghuge
-	    echom 'Large indenting deactivated'
 	    let b:PHP_indentinghuge = 0
 	    let b:PHP_CurrentIndentLevel = b:PHP_default_indenting
 	endif
@@ -425,7 +435,7 @@ function! GetPhpIndent()
 	else
 	    let b:InPHPcode = 0
 	    let b:UserIsTypingComment = 0
-	    let b:InPHPcode_tofind = '\)\@!\|'
+	    let b:InPHPcode_tofind = s:PHP_startindenttag
 	endif
     endif "!b:InPHPcode_checked }}}
 
@@ -493,7 +503,9 @@ function! GetPhpIndent()
     endif
 
     " Indent successive // or # comment the same way the first is {{{
+    let addSpecial = 0
     if cline =~ '^\s*\%(//\|#\|/\*.*\*/\s*$\)'
+	let addSpecial = b:PHP_outdentSLComments
 	if b:PHP_LastIndentedWasComment == 1
 	    return indent(real_PHP_lastindented)
 	endif
@@ -550,7 +562,7 @@ function! GetPhpIndent()
     endif
 
     if lnum == 0
-	return b:PHP_default_indenting
+	return b:PHP_default_indenting + addSpecial
     endif
 
 
@@ -577,17 +589,17 @@ function! GetPhpIndent()
     endif
 
 
-    if last_line =~ '[;}]'.endline && last_line !~ '^)' && last_line !~# s:defaultORcase
+    if last_line =~ '[;}]'.endline && last_line !~ '^[)\]]' && last_line !~# s:defaultORcase
 	if ind==b:PHP_default_indenting
-	    return b:PHP_default_indenting
+	    return b:PHP_default_indenting + addSpecial
 	elseif b:PHP_indentinghuge && ind==b:PHP_CurrentIndentLevel && cline !~# '^\s*\%(else\|\%(case\|default\).*:\|[})];\=\)' && last_line !~# '^\s*\%(\%(}\s*\)\=else\)' && getline(GetLastRealCodeLNum(lnum - 1))=~';'.endline
-	    return b:PHP_CurrentIndentLevel
+	    return b:PHP_CurrentIndentLevel + addSpecial
 	endif
     endif
 
     let LastLineClosed = 0
 
-    let terminated = '\%(;\%(\s*?>\)\=\|<<<''\=\a\w*''\=$\|^\s*}\)'.endline
+    let terminated = '\%(;\%(\s*\%(?>\|}\)\)\=\|<<<''\=\a\w*''\=$\|^\s*}\)'.endline
 
     let unstated   = '\%(^\s*'.s:blockstart.'.*)\|\%(//.*\)\@\)'.endline
 
@@ -618,19 +630,23 @@ function! GetPhpIndent()
 	endwhile
 
     elseif last_line =~# unstated && cline !~ '^\s*);\='.endline
-	let ind = ind + &sw
-	return ind
+	let ind = ind + &sw " we indent one level further when the preceding line is not stated
+	return ind + addSpecial
 
-    elseif (ind != b:PHP_default_indenting || last_line =~ '^)' ) && last_line =~ terminated
+    elseif (ind != b:PHP_default_indenting || last_line =~ '^[)\]]' ) && last_line =~ terminated " Added || last_line =~ '^)' on 2007-12-30 (array indenting problem broke other things)
 	let previous_line = last_line
 	let last_line_num = lnum
 	let LastLineClosed = 1
 
 	while 1
-	    if previous_line =~ '^\s*}'
-		let last_line_num = FindOpenBracket(last_line_num)
+	    if previous_line =~ '^\s*}\|;\s*}'.endline " XXX
+
+		call cursor(last_line_num, 1)
+		call search('}\|;\s*}'.endline, 'W')
+		let oldLastLine = last_line_num
+		let last_line_num = searchpair('{', '', '}', 'bW', 'Skippmatch()')
 
-		if getline(last_line_num) =~ '^\s*{'
+		if oldLastLine == last_line_num || getline(last_line_num) =~ '^\s*{'
 		    let last_line_num = GetLastRealCodeLNum(last_line_num - 1)
 		endif
 
@@ -674,7 +690,7 @@ function! GetPhpIndent()
 	    let ind = indent(last_match)
 	    let b:PHP_CurrentIndentLevel = b:PHP_default_indenting
 
-	    return ind
+	    return ind + addSpecial
 	endif
     endif
 
@@ -693,7 +709,7 @@ function! GetPhpIndent()
     if !LastLineClosed
 
 
-	if last_line =~# '[{(]'.endline || last_line =~? '\h\w*\s*(.*,$' && AntepenultimateLine !~ '[,(]'.endline
+	if last_line =~# '[{(\[]'.endline || last_line =~? '\h\w*\s*(.*,$' && AntepenultimateLine !~ '[,(]'.endline
 
 	    if !b:PHP_BracesAtCodeLevel || last_line !~# '^\s*{'
 		let ind = ind + &sw
@@ -702,7 +718,7 @@ function! GetPhpIndent()
 	    if b:PHP_BracesAtCodeLevel || b:PHP_vintage_case_default_indent == 1
 		let b:PHP_CurrentIndentLevel = ind
 
-		return ind
+		return ind + addSpecial
 	    endif
 
 	elseif last_line =~ '\S\+\s*),'.endline
@@ -712,22 +728,21 @@ function! GetPhpIndent()
 	    if openedparent != lnum
 		let ind = indent(openedparent)
 	    endif
-	
+
 	elseif last_line =~ '^\s*'.s:blockstart
 	    let ind = ind + &sw
 
 
-
-	elseif AntepenultimateLine =~ '\%(;\%(\s*?>\)\=\|<<<''\=\a\w*''\=$\|^\s*}\|{\)'.endline . '\|' . s:defaultORcase
+	elseif AntepenultimateLine =~ '\%(;\%(\s*\%(?>\|}\)\)\=\|<<<''\=\a\w*''\=$\|^\s*}\|{\)'.endline . '\|' . s:defaultORcase
 	    let ind = ind + &sw
 	endif
 
     endif
 
-    if cline =~  '^\s*);\='
+    if cline =~  '^\s*[)\]];\='
 	let ind = ind - &sw
     endif
 
     let b:PHP_CurrentIndentLevel = ind
-    return ind
+    return ind + addSpecial
 endfunction
diff --git a/runtime/indent/python.vim b/runtime/indent/python.vim
index 54ed123429..4ce3c234a5 100644
--- a/runtime/indent/python.vim
+++ b/runtime/indent/python.vim
@@ -2,7 +2,7 @@
 " Language:		Python
 " Maintainer:		Bram Moolenaar 
 " Original Author:	David Bustos 
-" Last Change:		2012 May 01
+" Last Change:		2013 Jul 9
 
 " Only load this indent file when no other was loaded.
 if exists("b:did_indent")
@@ -36,7 +36,7 @@ function GetPythonIndent(lnum)
     if a:lnum > 1 && getline(a:lnum - 2) =~ '\\$'
       return indent(a:lnum - 1)
     endif
-    return indent(a:lnum - 1) + (exists("g:pyindent_continue") ? eval(g:pyindent_continue) : (&sw * 2))
+    return indent(a:lnum - 1) + (exists("g:pyindent_continue") ? eval(g:pyindent_continue) : (shiftwidth() * 2))
   endif
 
   " If the start of the line is in a string don't change the indent.
@@ -61,7 +61,7 @@ function GetPythonIndent(lnum)
   let parlnum = searchpair('(\|{\|\[', '', ')\|}\|\]', 'nbW',
 	  \ "line('.') < " . (plnum - s:maxoff) . " ? dummy :"
 	  \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')"
-	  \ . " =~ '\\(Comment\\|String\\)$'")
+	  \ . " =~ '\\(Comment\\|Todo\\|String\\)$'")
   if parlnum > 0
     let plindent = indent(parlnum)
     let plnumstart = parlnum
@@ -80,18 +80,18 @@ function GetPythonIndent(lnum)
   let p = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW',
 	  \ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :"
 	  \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')"
-	  \ . " =~ '\\(Comment\\|String\\)$'")
+	  \ . " =~ '\\(Comment\\|Todo\\|String\\)$'")
   if p > 0
     if p == plnum
       " When the start is inside parenthesis, only indent one 'shiftwidth'.
       let pp = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW',
 	  \ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :"
 	  \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')"
-	  \ . " =~ '\\(Comment\\|String\\)$'")
+	  \ . " =~ '\\(Comment\\|Todo\\|String\\)$'")
       if pp > 0
-	return indent(plnum) + (exists("g:pyindent_nested_paren") ? eval(g:pyindent_nested_paren) : &sw)
+	return indent(plnum) + (exists("g:pyindent_nested_paren") ? eval(g:pyindent_nested_paren) : shiftwidth())
       endif
-      return indent(plnum) + (exists("g:pyindent_open_paren") ? eval(g:pyindent_open_paren) : (&sw * 2))
+      return indent(plnum) + (exists("g:pyindent_open_paren") ? eval(g:pyindent_open_paren) : (shiftwidth() * 2))
     endif
     if plnumstart == p
       return indent(plnum)
@@ -108,12 +108,12 @@ function GetPythonIndent(lnum)
     " If the last character in the line is a comment, do a binary search for
     " the start of the comment.  synID() is slow, a linear search would take
     " too long on a long line.
-    if synIDattr(synID(plnum, pline_len, 1), "name") =~ "Comment$"
+    if synIDattr(synID(plnum, pline_len, 1), "name") =~ "\\(Comment\\|Todo\\)$"
       let min = 1
       let max = pline_len
       while min < max
 	let col = (min + max) / 2
-	if synIDattr(synID(plnum, col, 1), "name") =~ "Comment$"
+	if synIDattr(synID(plnum, col, 1), "name") =~ "\\(Comment\\|Todo\\)$"
 	  let max = col
 	else
 	  let min = col + 1
@@ -134,15 +134,15 @@ function GetPythonIndent(lnum)
 
   " If the previous line ended with a colon, indent this line
   if pline =~ ':\s*$'
-    return plindent + &sw
+    return plindent + shiftwidth()
   endif
 
   " If the previous line was a stop-execution statement...
   if getline(plnum) =~ '^\s*\(break\|continue\|raise\|return\|pass\)\>'
     " See if the user has already dedented
-    if indent(a:lnum) > indent(plnum) - &sw
+    if indent(a:lnum) > indent(plnum) - shiftwidth()
       " If not, recommend one dedent
-      return indent(plnum) - &sw
+      return indent(plnum) - shiftwidth()
     endif
     " Otherwise, trust the user
     return -1
@@ -173,11 +173,11 @@ function GetPythonIndent(lnum)
     endif
 
     " Or the user has already dedented
-    if indent(a:lnum) <= plindent - &sw
+    if indent(a:lnum) <= plindent - shiftwidth()
       return -1
     endif
 
-    return plindent - &sw
+    return plindent - shiftwidth()
   endif
 
   " When after a () construct we probably want to go back to the start line.
diff --git a/runtime/indent/r.vim b/runtime/indent/r.vim
index 7d28f29102..82bdc8bba4 100644
--- a/runtime/indent/r.vim
+++ b/runtime/indent/r.vim
@@ -1,14 +1,14 @@
 " Vim indent file
 " Language:	R
 " Author:	Jakson Alves de Aquino 
-" Last Change:	Fri Oct 14, 2011  09:50PM
+" Last Change:	Fri Feb 15, 2013  08:11PM
 
 
 " Only load this indent file when no other was loaded.
-if exists("b:did_r_indent")
+if exists("b:did_indent")
     finish
 endif
-let b:did_r_indent = 1
+let b:did_indent = 1
 
 setlocal indentkeys=0{,0},:,!^F,o,O,e
 setlocal indentexpr=GetRIndent()
diff --git a/runtime/indent/ruby.vim b/runtime/indent/ruby.vim
index 04d130104d..095b3a43c6 100644
--- a/runtime/indent/ruby.vim
+++ b/runtime/indent/ruby.vim
@@ -1,9 +1,7 @@
 " Vim indent file
 " Language:		Ruby
 " Maintainer:		Nikolai Weibull 
-" Last Change:		2009 Dec 17
-" URL:			http://vim-ruby.rubyforge.org
-" Anon CVS:		See above site
+" URL:			https://github.com/vim-ruby/vim-ruby
 " Release Coordinator:	Doug Kearns 
 
 " 0. Initialization {{{1
@@ -18,9 +16,9 @@ let b:did_indent = 1
 setlocal nosmartindent
 
 " Now, set up our indentation expression and keys that trigger it.
-setlocal indentexpr=GetRubyIndent()
+setlocal indentexpr=GetRubyIndent(v:lnum)
 setlocal indentkeys=0{,0},0),0],!^F,o,O,e
-setlocal indentkeys+==end,=elsif,=when,=ensure,=rescue,==begin,==end
+setlocal indentkeys+==end,=else,=elsif,=when,=ensure,=rescue,==begin,==end
 
 " Only define the function once.
 if exists("*GetRubyIndent")
@@ -33,8 +31,9 @@ set cpo&vim
 " 1. Variables {{{1
 " ============
 
-" Regex of syntax group names that are or delimit string or are comments.
-let s:syng_strcom = '\'
 
 " Regex of syntax group names that are strings.
@@ -43,7 +42,7 @@ let s:syng_string =
 
 " Regex of syntax group names that are strings or documentation.
 let s:syng_stringdoc =
-  \'\'
+      \'\'
 
 " Expression used to check whether we should skip a match with searchpair().
 let s:skip_expr =
@@ -52,45 +51,60 @@ let s:skip_expr =
 " Regex used for words that, at the start of a line, add a level of indent.
 let s:ruby_indent_keywords = '^\s*\zs\<\%(module\|class\|def\|if\|for' .
       \ '\|while\|until\|else\|elsif\|case\|when\|unless\|begin\|ensure' .
-      \ '\|rescue\)\>' .
-      \ '\|\%([*+/,=-]\|<<\|>>\|:\s\)\s*\zs' .
-      \    '\<\%(if\|for\|while\|until\|case\|unless\|begin\)\>'
+      \ '\|rescue\):\@!\>' .
+      \ '\|\%([=,*/%+-]\|<<\|>>\|:\s\)\s*\zs' .
+      \    '\<\%(if\|for\|while\|until\|case\|unless\|begin\):\@!\>'
 
 " Regex used for words that, at the start of a line, remove a level of indent.
 let s:ruby_deindent_keywords =
-      \ '^\s*\zs\<\%(ensure\|else\|rescue\|elsif\|when\|end\)\>'
+      \ '^\s*\zs\<\%(ensure\|else\|rescue\|elsif\|when\|end\):\@!\>'
 
 " Regex that defines the start-match for the 'end' keyword.
 "let s:end_start_regex = '\%(^\|[^.]\)\<\%(module\|class\|def\|if\|for\|while\|until\|case\|unless\|begin\|do\)\>'
 " TODO: the do here should be restricted somewhat (only at end of line)?
-let s:end_start_regex = '^\s*\zs\<\%(module\|class\|def\|if\|for' .
-      \ '\|while\|until\|case\|unless\|begin\)\>' .
-      \ '\|\%([*+/,=-]\|<<\|>>\|:\s\)\s*\zs' .
-      \    '\<\%(if\|for\|while\|until\|case\|unless\|begin\)\>' .
-      \ '\|\'
+let s:end_start_regex =
+      \ '\C\%(^\s*\|[=,*/%+\-|;{]\|<<\|>>\|:\s\)\s*\zs' .
+      \ '\<\%(module\|class\|def\|if\|for\|while\|until\|case\|unless\|begin\):\@!\>' .
+      \ '\|\%(^\|[^.:@$]\)\@<=\'
 
 " Regex that defines the middle-match for the 'end' keyword.
-let s:end_middle_regex = '\<\%(ensure\|else\|\%(\%(^\|;\)\s*\)\@<=\\|when\|elsif\)\>'
+let s:end_middle_regex = '\<\%(ensure\|else\|\%(\%(^\|;\)\s*\)\@<=\\|when\|elsif\):\@!\>'
 
 " Regex that defines the end-match for the 'end' keyword.
-let s:end_end_regex = '\%(^\|[^.:@$]\)\@<=\'
+let s:end_end_regex = '\%(^\|[^.:@$]\)\@<=\'
 
 " Expression used for searchpair() call for finding match for 'end' keyword.
 let s:end_skip_expr = s:skip_expr .
       \ ' || (expand("") == "do"' .
-      \ ' && getline(".") =~ "^\\s*\\<\\(while\\|until\\|for\\)\\>")'
+      \ ' && getline(".") =~ "^\\s*\\<\\(while\\|until\\|for\\):\\@!\\>")'
 
 " Regex that defines continuation lines, not including (, {, or [.
-let s:continuation_regex = '\%([\\*+/.,:]\|\%(<%\)\@\|{\)\s*\%(|\%([*@]\=\h\w*,\=\s*\)\%(,\s*[*@]\=\h\w*\)*|\)\=\s*\%(#.*\)\=$'
+      \ '\%(\\|%\@ 0
     " If we have a continuation line, or we're in a string, use line as MSL.
     " Otherwise, terminate search as we have found our MSL already.
     let line = getline(lnum)
-    let col = match(line, s:continuation_regex2) + 1
-    if (col > 0 && !s:IsInStringOrComment(lnum, col))
-	  \ || s:IsInString(lnum, strlen(line))
+
+    if s:Match(lnum, s:splat_regex)
+      " If the above line looks like the "*" of a splat, use the current one's
+      " indentation.
+      "
+      " Example:
+      "   Hash[*
+      "     method_call do
+      "       something
+      "
+      return msl
+    elseif s:Match(line, s:non_bracket_continuation_regex) &&
+          \ s:Match(msl, s:non_bracket_continuation_regex)
+      " If the current line is a non-bracket continuation and so is the
+      " previous one, keep its indent and continue looking for an MSL.
+      "
+      " Example:
+      "   method_call one,
+      "     two,
+      "     three
+      "
       let msl = lnum
+    elseif s:Match(lnum, s:non_bracket_continuation_regex) &&
+          \ (s:Match(msl, s:bracket_continuation_regex) || s:Match(msl, s:block_continuation_regex))
+      " If the current line is a bracket continuation or a block-starter, but
+      " the previous is a non-bracket one, respect the previous' indentation,
+      " and stop here.
+      "
+      " Example:
+      "   method_call one,
+      "     two {
+      "     three
+      "
+      return lnum
+    elseif s:Match(lnum, s:bracket_continuation_regex) &&
+          \ (s:Match(msl, s:bracket_continuation_regex) || s:Match(msl, s:block_continuation_regex))
+      " If both lines are bracket continuations (the current may also be a
+      " block-starter), use the current one's and stop here
+      "
+      " Example:
+      "   method_call(
+      "     other_method_call(
+      "       foo
+      return msl
+    elseif s:Match(lnum, s:block_regex) &&
+          \ !s:Match(msl, s:continuation_regex) &&
+          \ !s:Match(msl, s:block_continuation_regex)
+      " If the previous line is a block-starter and the current one is
+      " mostly ordinary, use the current one as the MSL.
+      "
+      " Example:
+      "   method_call do
+      "     something
+      "     something_else
+      return msl
     else
-      break
+      let col = match(line, s:continuation_regex) + 1
+      if (col > 0 && !s:IsInStringOrComment(lnum, col))
+            \ || s:IsInString(lnum, strlen(line))
+        let msl = lnum
+      else
+        break
+      endif
     endif
+
+    let msl_body = getline(msl)
     let lnum = s:PrevNonBlankNonString(lnum - 1)
   endwhile
   return msl
 endfunction
 
 " Check if line 'lnum' has more opening brackets than closing ones.
-function s:LineHasOpeningBrackets(lnum)
-  let open_0 = 0
-  let open_2 = 0
-  let open_4 = 0
+function s:ExtraBrackets(lnum)
+  let opening = {'parentheses': [], 'braces': [], 'brackets': []}
+  let closing = {'parentheses': [], 'braces': [], 'brackets': []}
+
   let line = getline(a:lnum)
-  let pos = match(line, '[][(){}]', 0)
+  let pos  = match(line, '[][(){}]', 0)
+
+  " Save any encountered opening brackets, and remove them once a matching
+  " closing one has been found. If a closing bracket shows up that doesn't
+  " close anything, save it for later.
   while pos != -1
     if !s:IsInStringOrComment(a:lnum, pos + 1)
-      let idx = stridx('(){}[]', line[pos])
-      if idx % 2 == 0
-	let open_{idx} = open_{idx} + 1
-      else
-	let open_{idx - 1} = open_{idx - 1} - 1
+      if line[pos] == '('
+        call add(opening.parentheses, {'type': '(', 'pos': pos})
+      elseif line[pos] == ')'
+        if empty(opening.parentheses)
+          call add(closing.parentheses, {'type': ')', 'pos': pos})
+        else
+          let opening.parentheses = opening.parentheses[0:-2]
+        endif
+      elseif line[pos] == '{'
+        call add(opening.braces, {'type': '{', 'pos': pos})
+      elseif line[pos] == '}'
+        if empty(opening.braces)
+          call add(closing.braces, {'type': '}', 'pos': pos})
+        else
+          let opening.braces = opening.braces[0:-2]
+        endif
+      elseif line[pos] == '['
+        call add(opening.brackets, {'type': '[', 'pos': pos})
+      elseif line[pos] == ']'
+        if empty(opening.brackets)
+          call add(closing.brackets, {'type': ']', 'pos': pos})
+        else
+          let opening.brackets = opening.brackets[0:-2]
+        endif
       endif
     endif
+
     let pos = match(line, '[][(){}]', pos + 1)
   endwhile
-  return (open_0 > 0) . (open_2 > 0) . (open_4 > 0)
+
+  " Find the rightmost brackets, since they're the ones that are important in
+  " both opening and closing cases
+  let rightmost_opening = {'type': '(', 'pos': -1}
+  let rightmost_closing = {'type': ')', 'pos': -1}
+
+  for opening in opening.parentheses + opening.braces + opening.brackets
+    if opening.pos > rightmost_opening.pos
+      let rightmost_opening = opening
+    endif
+  endfor
+
+  for closing in closing.parentheses + closing.braces + closing.brackets
+    if closing.pos > rightmost_closing.pos
+      let rightmost_closing = closing
+    endif
+  endfor
+
+  return [rightmost_opening, rightmost_closing]
 endfunction
 
 function s:Match(lnum, regex)
@@ -195,32 +316,35 @@ endfunction
 " 3. GetRubyIndent Function {{{1
 " =========================
 
-function GetRubyIndent()
+function GetRubyIndent(...)
   " 3.1. Setup {{{2
   " ----------
 
-  " Set up variables for restoring position in file.  Could use v:lnum here.
+  " For the current line, use the first argument if given, else v:lnum
+  let clnum = a:0 ? a:1 : v:lnum
+
+  " Set up variables for restoring position in file.  Could use clnum here.
   let vcol = col('.')
 
   " 3.2. Work on the current line {{{2
   " -----------------------------
 
   " Get the current line.
-  let line = getline(v:lnum)
+  let line = getline(clnum)
   let ind = -1
 
   " If we got a closing bracket on an empty line, find its match and indent
   " according to it.  For parentheses we indent to its column - 1, for the
   " others we indent to the containing line's MSL's level.  Return -1 if fail.
   let col = matchend(line, '^\s*[]})]')
-  if col > 0 && !s:IsInStringOrComment(v:lnum, col)
-    call cursor(v:lnum, col)
+  if col > 0 && !s:IsInStringOrComment(clnum, col)
+    call cursor(clnum, col)
     let bs = strpart('(){}[]', stridx(')}]', line[col - 1]) * 2, 2)
     if searchpair(escape(bs[0], '\['), '', bs[1], 'bW', s:skip_expr) > 0
       if line[col-1]==')' && col('.') != col('$') - 1
-	let ind = virtcol('.')-1
+        let ind = virtcol('.') - 1
       else
-	let ind = indent(s:GetMSL(line('.')))
+        let ind = indent(s:GetMSL(line('.')))
       endif
     endif
     return ind
@@ -233,35 +357,47 @@ function GetRubyIndent()
 
   " If we have a deindenting keyword, find its match and indent to its level.
   " TODO: this is messy
-  if s:Match(v:lnum, s:ruby_deindent_keywords)
-    call cursor(v:lnum, 1)
+  if s:Match(clnum, s:ruby_deindent_keywords)
+    call cursor(clnum, 1)
     if searchpair(s:end_start_regex, s:end_middle_regex, s:end_end_regex, 'bW',
-	    \ s:end_skip_expr) > 0
-      let line = getline('.')
+          \ s:end_skip_expr) > 0
+      let msl  = s:GetMSL(line('.'))
+      let line = getline(line('.'))
+
       if strpart(line, 0, col('.') - 1) =~ '=\s*$' &&
-       \ strpart(line, col('.') - 1, 2) !~ 'do'
-	let ind = virtcol('.') - 1
+            \ strpart(line, col('.') - 1, 2) !~ 'do'
+        let ind = virtcol('.') - 1
+      elseif getline(msl) =~ '=\s*\(#.*\)\=$'
+        let ind = indent(line('.'))
       else
-	let ind = indent('.')
+        let ind = indent(msl)
       endif
     endif
     return ind
   endif
 
   " If we are in a multi-line string or line-comment, don't do anything to it.
-  if s:IsInStringOrDocumentation(v:lnum, matchend(line, '^\s*') + 1)
+  if s:IsInStringOrDocumentation(clnum, matchend(line, '^\s*') + 1)
     return indent('.')
   endif
 
+  " If we are at the closing delimiter of a "<<" heredoc-style string, set the
+  " indent to 0.
+  if line =~ '^\k\+\s*$'
+        \ && s:IsInStringDelimiter(clnum, 1)
+        \ && search('\V<<'.line, 'nbW') > 0
+    return 0
+  endif
+
   " 3.3. Work on the previous line. {{{2
   " -------------------------------
 
   " Find a non-blank, non-multi-line string line above the current line.
-  let lnum = s:PrevNonBlankNonString(v:lnum - 1)
+  let lnum = s:PrevNonBlankNonString(clnum - 1)
 
   " If the line is empty and inside a string, use the previous line.
-  if line =~ '^\s*$' && lnum != prevnonblank(v:lnum - 1)
-    return indent(prevnonblank(v:lnum))
+  if line =~ '^\s*$' && lnum != prevnonblank(clnum - 1)
+    return indent(prevnonblank(clnum))
   endif
 
   " At the start of the file use zero indent.
@@ -269,7 +405,7 @@ function GetRubyIndent()
     return 0
   endif
 
-  " Set up variables for current line.
+  " Set up variables for the previous line.
   let line = getline(lnum)
   let ind = indent(lnum)
 
@@ -278,20 +414,42 @@ function GetRubyIndent()
     return indent(s:GetMSL(lnum)) + &sw
   endif
 
-  " If the previous line contained an opening bracket, and we are still in it,
-  " add indent depending on the bracket type.
-  if line =~ '[[({]'
-    let counts = s:LineHasOpeningBrackets(lnum)
-    if counts[0] == '1' && searchpair('(', '', ')', 'bW', s:skip_expr) > 0
-      if col('.') + 1 == col('$')
-	return ind + &sw
+  " If the previous line ended with the "*" of a splat, add a level of indent
+  if line =~ s:splat_regex
+    return indent(lnum) + &sw
+  endif
+
+  " If the previous line contained unclosed opening brackets and we are still
+  " in them, find the rightmost one and add indent depending on the bracket
+  " type.
+  "
+  " If it contained hanging closing brackets, find the rightmost one, find its
+  " match and indent according to that.
+  if line =~ '[[({]' || line =~ '[])}]\s*\%(#.*\)\=$'
+    let [opening, closing] = s:ExtraBrackets(lnum)
+
+    if opening.pos != -1
+      if opening.type == '(' && searchpair('(', '', ')', 'bW', s:skip_expr) > 0
+        if col('.') + 1 == col('$')
+          return ind + &sw
+        else
+          return virtcol('.')
+        endif
       else
-	return virtcol('.')
+        let nonspace = matchend(line, '\S', opening.pos + 1) - 1
+        return nonspace > 0 ? nonspace : ind + &sw
+      endif
+    elseif closing.pos != -1
+      call cursor(lnum, closing.pos + 1)
+      normal! %
+
+      if s:Match(line('.'), s:ruby_indent_keywords)
+        return indent('.') + &sw
+      else
+        return indent('.')
       endif
-    elseif counts[1] == '1' || counts[2] == '1'
-      return ind + &sw
     else
-      call cursor(v:lnum, vcol)
+      call cursor(clnum, vcol)
     end
   endif
 
@@ -301,12 +459,12 @@ function GetRubyIndent()
   if col > 0
     call cursor(lnum, col)
     if searchpair(s:end_start_regex, '', s:end_end_regex, 'bW',
-		\ s:end_skip_expr) > 0
+          \ s:end_skip_expr) > 0
       let n = line('.')
       let ind = indent('.')
       let msl = s:GetMSL(n)
       if msl != n
-	let ind = indent(msl)
+        let ind = indent(msl)
       end
       return ind
     endif
@@ -316,7 +474,6 @@ function GetRubyIndent()
   if col > 0
     call cursor(lnum, col)
     let ind = virtcol('.') - 1 + &sw
-"    let ind = indent(lnum) + &sw
     " TODO: make this better (we need to count them) (or, if a searchpair
     " fails, we know that something is lacking an end and thus we indent a
     " level
@@ -336,7 +493,7 @@ function GetRubyIndent()
   " If the previous line wasn't a MSL and is continuation return its indent.
   " TODO: the || s:IsInString() thing worries me a bit.
   if p_lnum != lnum
-    if s:Match(p_lnum,s:continuation_regex)||s:IsInString(p_lnum,strlen(line))
+    if s:Match(p_lnum, s:non_bracket_continuation_regex) || s:IsInString(p_lnum,strlen(line))
       return ind
     endif
   endif
@@ -356,13 +513,15 @@ function GetRubyIndent()
     return ind
   endif
 
-  " If the previous line ended with [*+/.-=], indent one extra level.
-  if s:Match(lnum, s:continuation_regex)
+  " If the previous line ended with [*+/.,-=], but wasn't a block ending or a
+  " closing bracket, indent one extra level.
+  if s:Match(lnum, s:non_bracket_continuation_regex) && !s:Match(lnum, '^\s*\([\])}]\|end\)')
     if lnum == p_lnum
       let ind = msl_ind + &sw
     else
       let ind = msl_ind
     endif
+    return ind
   endif
 
   " }}}2
@@ -375,4 +534,4 @@ endfunction
 let &cpo = s:cpo_save
 unlet s:cpo_save
 
-" vim:set sw=2 sts=2 ts=8 noet:
+" vim:set sw=2 sts=2 ts=8 et:
diff --git a/runtime/indent/sass.vim b/runtime/indent/sass.vim
index 4622f00ff8..b6e2e66e8a 100644
--- a/runtime/indent/sass.vim
+++ b/runtime/indent/sass.vim
@@ -1,7 +1,7 @@
 " Vim indent file
 " Language:	Sass
 " Maintainer:	Tim Pope 
-" Last Change:	2010 May 21
+" Last Change:	2013 May 30
 
 if exists("b:did_indent")
   finish
@@ -17,7 +17,8 @@ if exists("*GetSassIndent")
   finish
 endif
 
-let s:property = '^\s*:\|^\s*[[:alnum:]-]\+\%(:\|\s*=\)'
+let s:property = '^\s*:\|^\s*[[:alnum:]#{}-]\+\%(:\|\s*=\)'
+let s:extend = '^\s*\%(@extend\|@include\|+\)'
 
 function! GetSassIndent()
   let lnum = prevnonblank(v:lnum-1)
@@ -27,7 +28,7 @@ function! GetSassIndent()
   let line = substitute(line,'^\s\+','','')
   let indent = indent(lnum)
   let cindent = indent(v:lnum)
-  if line !~ s:property && cline =~ s:property
+  if line !~ s:property && line !~ s:extend && cline =~ s:property
     return indent + &sw
   "elseif line =~ s:property && cline !~ s:property
     "return indent - &sw
diff --git a/runtime/indent/sdl.vim b/runtime/indent/sdl.vim
index b5e535eeac..ba03f2d3f4 100644
--- a/runtime/indent/sdl.vim
+++ b/runtime/indent/sdl.vim
@@ -73,7 +73,7 @@ function! GetSDLIndent()
 
   " Systems and packages are always in column 0
   if getline(v:lnum) =~? '^\s*\(\(end\)\=system\|\(end\)\=package\)'
-    return 0;
+    return 0
   endif
 
   " Put each end* where the corresponding begin was
diff --git a/runtime/indent/sqlanywhere.vim b/runtime/indent/sqlanywhere.vim
index afc312f8e0..d11c54b5af 100644
--- a/runtime/indent/sqlanywhere.vim
+++ b/runtime/indent/sqlanywhere.vim
@@ -1,8 +1,8 @@
 " Vim indent file
 " Language:    SQL
-" Maintainer:  David Fishburn 
-" Last Change: Mon Apr 02 2007 9:13:47 AM
-" Version:     1.5
+" Maintainer:  David Fishburn 
+" Last Change: 2012 Dec 06
+" Version:     3.0
 " Download:    http://vim.sourceforge.net/script.php?script_id=495
 
 " Notes:
@@ -18,6 +18,17 @@
 " Known Issues:
 "    The Oracle MERGE statement does not have an end tag associated with
 "    it, this can leave the indent hanging to the right one too many.
+"
+" History:
+"    3.0 (Dec 2012)
+"        Added cpo check
+"
+"    2.0
+"        Added the FOR keyword to SQLBlockStart to handle (Alec Tica):
+"            for i in 1..100 loop
+"              |<-- I expect to have indentation here
+"            end loop;
+"
 
 " Only load this indent file when no other was loaded.
 if exists("b:did_indent")
@@ -56,8 +67,8 @@ set cpo&vim
 " IS is excluded, since it is difficult to determine when the
 " ending block is (especially for procedures/functions).
 let s:SQLBlockStart = '^\s*\%('.
-            \ 'if\|else\|elseif\|elsif\|'.
-                \ 'while\|loop\|do\|'.
+                \ 'if\|else\|elseif\|elsif\|'.
+                \ 'while\|loop\|do\|for\|'.
                 \ 'begin\|'.
                 \ 'case\|when\|merge\|exception'.
                 \ '\)\>'
@@ -66,7 +77,7 @@ let s:SQLBlockEnd = '^\s*\(end\)\>'
 " The indent level is also based on unmatched paranethesis
 " If a line has an extra "(" increase the indent
 " If a line has an extra ")" decrease the indent
-function s:CountUnbalancedParan( line, paran_to_check )
+function! s:CountUnbalancedParan( line, paran_to_check )
     let l = a:line
     let lp = substitute(l, '[^(]', '', 'g')
     let l = a:line
@@ -88,7 +99,7 @@ function s:CountUnbalancedParan( line, paran_to_check )
 endfunction
 
 " Unindent commands based on previous indent level
-function s:CheckToIgnoreRightParan( prev_lnum, num_levels )
+function! s:CheckToIgnoreRightParan( prev_lnum, num_levels )
     let lnum = a:prev_lnum
     let line = getline(lnum)
     let ends = 0
@@ -151,7 +162,7 @@ endfunction
 "         something;
 "    WHEN ...
 " Should return indent level of exception.
-function s:GetStmtStarterIndent( keyword, curr_lnum )
+function! s:GetStmtStarterIndent( keyword, curr_lnum )
     let lnum  = a:curr_lnum
 
     " Default - reduce indent by 1
@@ -193,7 +204,7 @@ endfunction
 
 
 " Check if the line is a comment
-function s:IsLineComment(lnum)
+function! s:IsLineComment(lnum)
     let rc = synIDattr(
                 \ synID(a:lnum,
                 \     match(getline(a:lnum), '\S')+1, 0)
@@ -205,7 +216,7 @@ endfunction
 
 
 " Check if the column is a comment
-function s:IsColComment(lnum, cnum)
+function! s:IsColComment(lnum, cnum)
     let rc = synIDattr(synID(a:lnum, a:cnum, 0), "name")
                 \           =~? "comment"
 
@@ -215,7 +226,7 @@ endfunction
 
 " Instead of returning a column position, return
 " an appropriate value as a factor of shiftwidth.
-function s:ModuloIndent(ind)
+function! s:ModuloIndent(ind)
     let ind = a:ind
 
     if ind > 0
@@ -231,7 +242,7 @@ endfunction
 
 
 " Find correct indent of a new line based upon the previous line
-function GetSQLIndent()
+function! GetSQLIndent()
     let lnum = v:lnum
     let ind = indent(lnum)
 
@@ -242,35 +253,27 @@ function GetSQLIndent()
     "     return ind
     " endif
 
-    " while 1
-        " Get previous non-blank line
-        let prevlnum = prevnonblank(lnum - 1)
-        if prevlnum <= 0
-            return ind
-        endif
+    " Get previous non-blank line
+    let prevlnum = prevnonblank(lnum - 1)
+    if prevlnum <= 0
+        return ind
+    endif
 
-        if s:IsLineComment(prevlnum) == 1
-            if getline(v:lnum) =~ '^\s*\*'
-                let ind = s:ModuloIndent(indent(prevlnum))
-                return ind + 1
-            endif
-            " If the previous line is a comment, then return -1
-            " to tell Vim to use the formatoptions setting to determine
-            " the indent to use
-            " But only if the next line is blank.  This would be true if
-            " the user is typing, but it would not be true if the user
-            " is reindenting the file
-            if getline(v:lnum) =~ '^\s*$'
-                return -1
-            endif
+    if s:IsLineComment(prevlnum) == 1
+        if getline(v:lnum) =~ '^\s*\*'
+            let ind = s:ModuloIndent(indent(prevlnum))
+            return ind + 1
         endif
-
-    "     let prevline = getline(prevlnum)
-    "     if prevline !~ '^\s*$'
-    "         " echom 'previous non blank - break: ' . prevline
-    "         break
-    "     endif
-    " endwhile
+        " If the previous line is a comment, then return -1
+        " to tell Vim to use the formatoptions setting to determine
+        " the indent to use
+        " But only if the next line is blank.  This would be true if
+        " the user is typing, but it would not be true if the user
+        " is reindenting the file
+        if getline(v:lnum) =~ '^\s*$'
+            return -1
+        endif
+    endif
 
     " echom 'PREVIOUS INDENT: ' . indent(prevlnum) . '  LINE: ' . getline(prevlnum)
 
@@ -384,7 +387,7 @@ function GetSQLIndent()
     return s:ModuloIndent(ind)
 endfunction
 
-let &cpo = s:keepcpo
+"  Restore:
+let &cpo= s:keepcpo
 unlet s:keepcpo
-
-" vim:sw=4:
+" vim: ts=4 fdm=marker sw=4
diff --git a/runtime/indent/tex.vim b/runtime/indent/tex.vim
index 8e2a5daa8c..7e3a351083 100644
--- a/runtime/indent/tex.vim
+++ b/runtime/indent/tex.vim
@@ -1,6 +1,6 @@
 " Vim indent file
 " Language:     LaTeX
-" Maintainer:   Zhou YiChao 
+" Maintainer:   YiChao Zhou 
 " Created:      Sat, 16 Feb 2002 16:50:19 +0100
 " Last Change:	2012 Mar 18 19:19:50
 " Version: 0.7
@@ -46,6 +46,9 @@
 "               (*) Modify indentkeys.
 "               2012/03/18 by Zhou Yichao 
 "               (*) Add &cpo
+"               2013/05/02 by Zhou Yichao 
+"               (*) Fix problem about GetTeXIndent checker. Thank Albert Netymk
+"                   for reporting this.
 " }}}
 
 " Document: {{{
@@ -106,10 +109,6 @@
 " }}} 
 
 " Only define the function once
-if exists("*GetTeXIndent")
-    finish
-endif
-
 if exists("b:did_indent")
     finish
 endif
@@ -158,7 +157,7 @@ exec 'setlocal indentkeys+=[,(,{,),},],\&' . substitute(g:tex_items, '^\|\(\\|\)
 let g:tex_items = '^\s*' . substitute(g:tex_items, '^\(\^\\s\*\)*', '', '')
 " }}}
 
-function GetTeXIndent() " {{{
+function! GetTeXIndent() " {{{
     " Find a non-blank line above the current line.
     let lnum = prevnonblank(v:lnum - 1)
 
diff --git a/runtime/indent/yaml.vim b/runtime/indent/yaml.vim
new file mode 100644
index 0000000000..1d03715773
--- /dev/null
+++ b/runtime/indent/yaml.vim
@@ -0,0 +1,132 @@
+" Vim indent file
+" Language:         YAML
+" Maintainer:       Nikolai Pavlov 
+
+" Only load this indent file when no other was loaded.
+if exists('b:did_indent')
+  finish
+endif
+
+let s:save_cpo = &cpo
+set cpo&vim
+
+let b:did_indent = 1
+
+setlocal indentexpr=GetYAMLIndent(v:lnum)
+setlocal indentkeys=!^F,o,O,0#,0},0],<:>,-
+setlocal nosmartindent
+
+let b:undo_indent = 'setlocal indentexpr< indentkeys< smartindent<'
+
+" Only define the function once.
+if exists('*GetYAMLIndent')
+    finish
+endif
+
+if exists('*shiftwidth')
+    let s:shiftwidth = function('shiftwidth')
+else
+    function s:shiftwidth()
+        return &shiftwidth
+    endfunction
+endif
+
+function s:FindPrevLessIndentedLine(lnum, ...)
+    let prevlnum = prevnonblank(a:lnum-1)
+    let curindent = a:0 ? a:1 : indent(a:lnum)
+    while           prevlnum
+                \&&  indent(prevlnum) >=  curindent
+                \&& getline(prevlnum) !~# '^\s*#'
+        let prevlnum = prevnonblank(prevlnum-1)
+    endwhile
+    return prevlnum
+endfunction
+
+function s:FindPrevLEIndentedLineMatchingRegex(lnum, regex)
+    let plilnum = s:FindPrevLessIndentedLine(a:lnum, indent(a:lnum)+1)
+    while plilnum && getline(plilnum) !~# a:regex
+        let plilnum = s:FindPrevLessIndentedLine(plilnum)
+    endwhile
+    return plilnum
+endfunction
+
+let s:mapkeyregex='\v^\s*%(\''%([^'']|'''')*\'''.
+                \        '|\"%([^"\\]|\\.)*\"'.
+                \        '|%(%(\:\ )@!.)*)\:%(\ |$)'
+let s:liststartregex='\v^\s*%(\-%(\ |$))'
+
+function GetYAMLIndent(lnum)
+    if a:lnum == 1 || !prevnonblank(a:lnum-1)
+        return 0
+    endif
+
+    let prevlnum = prevnonblank(a:lnum-1)
+    let previndent = indent(prevlnum)
+
+    let line = getline(a:lnum)
+    if line =~# '^\s*#' && getline(a:lnum-1) =~# '^\s*#'
+        " Comment blocks should have identical indent
+        return previndent
+    elseif line =~# '^\s*[\]}]'
+        " Lines containing only closing braces should have previous indent
+        return indent(s:FindPrevLessIndentedLine(a:lnum))
+    endif
+
+    " Ignore comment lines when calculating indent
+    while getline(prevlnum) =~# '^\s*#'
+        let prevlnum = prevnonblank(prevlnum-1)
+        if !prevlnum
+            return previndent
+        endif
+    endwhile
+
+    let prevline = getline(prevlnum)
+    let previndent = indent(prevlnum)
+
+    " Any examples below assume that shiftwidth=2
+    if prevline =~# '\v[{[:]$|[:-]\ [|>][+\-]?%(\s+\#.*|\s*)$'
+        " Mapping key:
+        "     nested mapping: ...
+        "
+        " - {
+        "     key: [
+        "         list value
+        "     ]
+        " }
+        "
+        " - |-
+        "     Block scalar without indentation indicator
+        return previndent+s:shiftwidth()
+    elseif prevline =~# '\v[:-]\ [|>]%(\d+[+\-]?|[+\-]?\d+)%(\#.*|\s*)$'
+        " - |+2
+        "   block scalar with indentation indicator
+        "#^^ indent+2, not indent+shiftwidth
+        return previndent + str2nr(matchstr(prevline,
+                    \'\v([:-]\ [|>])@<=[+\-]?\d+%([+\-]?%(\s+\#.*|\s*)$)@='))
+    elseif prevline =~# '\v\"%([^"\\]|\\.)*\\$'
+        "    "Multiline string \
+        "     with escaped end"
+        let qidx = match(prevline, '\v\"%([^"\\]|\\.)*\\')
+        return virtcol([prevlnum, qidx+1])
+    elseif line =~# s:liststartregex
+        " List line should have indent equal to previous list line unless it was 
+        " caught by one of the previous rules
+        return indent(s:FindPrevLEIndentedLineMatchingRegex(a:lnum,
+                    \                                       s:liststartregex))
+    elseif line =~# s:mapkeyregex
+        " Same for line containing mapping key
+        return indent(s:FindPrevLEIndentedLineMatchingRegex(a:lnum,
+                    \                                       s:mapkeyregex))
+    elseif prevline =~# '^\s*- '
+        " - List with
+        "   multiline scalar
+        return previndent+2
+    elseif prevline =~# s:mapkeyregex
+        " Mapping with: value
+        "     that is multiline scalar
+        return previndent+s:shiftwidth()
+    endif
+    return previndent
+endfunction
+
+let &cpo = s:save_cpo
diff --git a/runtime/indent/zimbu.vim b/runtime/indent/zimbu.vim
index 8df0eebe6f..9565b10843 100644
--- a/runtime/indent/zimbu.vim
+++ b/runtime/indent/zimbu.vim
@@ -1,7 +1,7 @@
 " Vim indent file
 " Language:	Zimbu
 " Maintainer:	Bram Moolenaar 
-" Last Change:	2011 Jun 19
+" Last Change:	2012 Sep 08
 
 " Only load this indent file when no other was loaded.
 if exists("b:did_indent")
@@ -101,7 +101,7 @@ func GetZimbuIndent(lnum)
     endwhile
   endif
 
-  if prevline =~ '^\s*\(IF\|\|ELSEIF\|ELSE\|GENERATE_IF\|\|GENERATE_ELSEIF\|GENERATE_ELSE\|WHILE\|REPEAT\|TRY\|CATCH\|FINALLY\|FOR\|DO\|SWITCH\|CASE\|DEFAULT\|FUNC\|VIRTUAL\|ABSTRACT\|DEFINE\|REPLACE\|FINAL\|PROC\|MAIN\|NEW\|ENUM\|CLASS\|BITS\|MODULE\|SHARED\)\>'
+  if prevline =~ '^\s*\(IF\|\|ELSEIF\|ELSE\|GENERATE_IF\|\|GENERATE_ELSEIF\|GENERATE_ELSE\|WHILE\|REPEAT\|TRY\|CATCH\|FINALLY\|FOR\|DO\|SWITCH\|CASE\|DEFAULT\|FUNC\|VIRTUAL\|ABSTRACT\|DEFINE\|REPLACE\|FINAL\|PROC\|MAIN\|NEW\|ENUM\|CLASS\|INTERFACE\|BITS\|MODULE\|SHARED\)\>'
     let plindent += &sw
   endif
   if thisline =~ '^\s*\(}\|ELSEIF\>\|ELSE\>\|CATCH\|FINALLY\|GENERATE_ELSEIF\>\|GENERATE_ELSE\>\|UNTIL\>\)'
diff --git a/runtime/lang/menu_cs_cz.iso_8859-2.vim b/runtime/lang/menu_cs_cz.iso_8859-2.vim
index 88cf7e2528..410d548ee1 100644
--- a/runtime/lang/menu_cs_cz.iso_8859-2.vim
+++ b/runtime/lang/menu_cs_cz.iso_8859-2.vim
@@ -1,32 +1,38 @@
-" Menu Translations:	Czech for ISO-8859-2
-" Maintainer:		Jiri Brezina 
-" vim:set foldmethod=marker:
-" $Revision: 1.3 $
-" $Date: 2005/12/19 22:08:24 $
+" Menu Translations:    Czech (ISO-8859-2)
+" Maintainer:           Jiri Sedlak 
+" Previous maintainer:  Jiri Brezina
+" Based on:             menu.vim (2012-10-21)
 
 " Quit when menu translations have already been done.
 if exists("did_menu_trans")
-  finish
+   finish
 endif
+
 let did_menu_trans = 1
 let s:keepcpo= &cpo
 set cpo&vim
 
-scriptencoding ISO-8859-2
+scriptencoding iso-8859-2
 
 " {{{ File menu
 menutrans &File				&Soubor
 menutrans &Open\.\.\.:e		&Otevøít\.\.\.:e
 menutrans Sp&lit-Open\.\.\.:sp	Otevøít\ v\ no&vém\ oknì\.\.\.:sp
+menutrans Open\ Tab\.\.\.:tabnew	Otevøít\ tab\.\.\.:tabnew
 menutrans &New:enew		&Nový:enew
 menutrans &Close:close		&Zavøít:close
 menutrans &Save:w			&Ulo¾it:w
 menutrans Save\ &As\.\.\.:sav	Ulo¾it\ &jako\.\.\.:sav
-menutrans Split\ &Diff\ with\.\.\.	Rozdìlit\ okno\ -\ &Diff\.\.\.
-menutrans Split\ Patched\ &By\.\.\.	Rozdìlit\ okno\ -\ &Patch\.\.\.
-menutrans &Print			&Tisk
-menutrans Sa&ve-Exit:wqa		U&lo¾it\ -\ Konec:wqa
-menutrans E&xit:qa			&Konec:qa
+if has("printer") || has("unix")
+   menutrans &Print			&Tisk
+endif
+menutrans Sa&ve-Exit:wqa		U&lo¾it\ a\ ukonèit:wqa
+menutrans E&xit:qa			&Ukonèit:qa
+
+if has("diff")
+   menutrans Split\ &Diff\ with\.\.\.	Rozdìlit\ okno\ -\ &Diff\.\.\.
+   menutrans Split\ Patched\ &By\.\.\.	Rozdìlit\ okno\ -\ &Patch\.\.\.
+endif
 " }}}
 
 " {{{ Edit menu
@@ -39,24 +45,32 @@ menutrans &Copy"+y			&Kop
 menutrans &Paste"+gP		V&lo¾it"+gP
 menutrans Put\ &Before[p		Vlo¾it\ &pøed[p
 menutrans Put\ &After]p		Vlo¾i&t\ za]p
-menutrans &Deletex			&Smazatx
+if has("win32") || has("win16")
+   menutrans &Deletex			&Smazatx
+endif
 menutrans &Select\ AllggVG		Vy&brat\ v¹eggVG
-menutrans &Find\.\.\.			&Hledat\.\.\.
-menutrans Find\ and\ Rep&lace\.\.\.	&Nahradit\.\.\.
-menutrans Options\.\.\.			Volb&y\.\.\.
+if has("win32")  || has("win16") || has("gui_gtk") || has("gui_kde") || has("gui_motif")
+   menutrans &Find\.\.\.			&Hledat\.\.\.
+   menutrans Find\ and\ Rep&lace\.\.\.	&Nahradit\.\.\.
+else
+   menutrans Find/ &Hledat/
+   menutrans Find\ and\ Rep&lace:%s  &Nahradit:%s
+   menutrans Find\ and\ Rep&lace:s   &Nahradit:s
+endif
 menutrans Settings\ &Window		Nastav&ení\ okna
-	" {{{2 Edit -1
+" {{{2 Edit -1
+menutrans Startup\ &Settings  Poèáteèní\ &nastavení
 menutrans &Global\ Settings				&Globální\ nastavení
 menutrans Toggle\ Pattern\ &Highlight:set\ hls!	&Pøepnout\ zvýraznìní\ vzoru:set\ hls!
 menutrans Toggle\ &Ignore-case:set\ ic!		Pøepnout\ ignorování\ &VERZÁLEK:set\ ic!
 menutrans Toggle\ &Showmatch:set\ sm!		Pøepnout\ &Showmatch\ \{\(\[\])\}:set\ sm!
 menutrans &Context\ lines				Zobrazit\ konte&xt\ kurzoru
 menutrans &Virtual\ Edit				Virtuální\ p&ozice\ kurzoru
-	menutrans Never						Nikdy
-	menutrans Block\ Selection				Výbìr\ Bloku
-	menutrans Insert\ mode					Insert\ mód
-	menutrans Block\ and\ Insert				Blok\ a\ Insert
-	menutrans Always					V¾dycky
+menutrans Never						Nikdy
+menutrans Block\ Selection				Výbìr\ Bloku
+menutrans Insert\ mode					Insert\ mód
+menutrans Block\ and\ Insert				Blok\ a\ Insert
+menutrans Always					V¾dycky
 menutrans Toggle\ Insert\ &Mode:set\ im!		Pøepnout\ Insert\ mó&d:set\ im!
 menutrans Toggle\ Vi\ C&ompatible:set\ cp!		Pøepnout\ kompatibilní\ re¾im\ s\ 'vi':set\ cp!
 menutrans Search\ &Path\.\.\.				Nastavit\ &cestu\ k\ prohledávání\.\.\.
@@ -65,9 +79,10 @@ menutrans Toggle\ &Toolbar				P
 menutrans Toggle\ &Bottom\ Scrollbar			Pø&epnout\ dolní\ rolovací\ li¹tu
 menutrans Toggle\ &Left\ Scrollbar			Pøepnout\ &levou\ rolovací\ li¹tu
 menutrans Toggle\ &Right\ Scrollbar			Pøepnout\ p&ravou\ rolovací\ li¹tu
-	" {{{2 Edit -2
+" {{{2 Edit -2
 menutrans F&ile\ Settings				Nastavení\ so&uboru
 menutrans Toggle\ Line\ &Numbering:set\ nu!	Pøepnout\ èíslování\ øá&dkù:set\ nu!
+menutrans Toggle\ relati&ve\ Line\ Numbering:set\ rnu! Pøepnout\ relativní\ èíslování\ øá&dkù:set\ rnu!
 menutrans Toggle\ &List\ Mode:set\ list!		Pøepnout\ &List\ mód:set\ list!
 menutrans Toggle\ Line\ &Wrap:set\ wrap!		Pøepnout\ zala&mování\ øádkù:set\ wrap!
 menutrans Toggle\ W&rap\ at\ word:set\ lbr!	Pøepnout\ zl&om\ ve\ slovì:set\ lbr!
@@ -78,10 +93,12 @@ menutrans &Shiftwidth					Nastav&it\ 
 menutrans Soft\ &Tabstop				Nastavit\ Soft\ &Tabstop
 menutrans Te&xt\ Width\.\.\.				©íøka\ te&xtu\.\.\.
 menutrans &File\ Format\.\.\.				&Formát\ souboru\.\.\.
-	" {{{2 Edit -3
+" {{{2 Edit -3
 menutrans C&olor\ Scheme		Barevné\ s&chéma
 menutrans &Keymap			Klávesová\ m&apa
-menutrans Select\ Fo&nt\.\.\.		Vybrat\ pís&mo\.\.\.
+if has("win32") || has("win16") || has("gui_motif") || has("gui_gtk") || has("gui_kde") || has("gui_photon") || has("gui_mac")
+   menutrans Select\ Fo&nt\.\.\.		Vybrat\ pís&mo\.\.\.
+endif
 " }}}1
 
 " {{{ Programming menu
@@ -90,46 +107,52 @@ menutrans &Jump\ to\ this\ tagg^]	&Sko
 menutrans Jump\ &back^T		Skoèit\ &zpìt^T
 menutrans Build\ &Tags\ File		&Vytvoøit\ soubor\ tagù
 
-menutrans &Spelling			&Kontrola\ pravopisu
-menutrans &Spell\ Check\ On		Kontrola\ pravopisu\ &zapnuta
-menutrans Spell\ Check\ &Off		Kontrola\ pravopisu\ &vypnuta
-menutrans To\ Next\ error]s	&Dal¹í\ chyba]s
-menutrans To\ Previous\ error[s	&Pøedchozí\ chyba[s
-menutrans Suggest\ Correctionsz?	&Návrh\ opravz?
-menutrans Repeat\ correction:spellrepall	Zopakovat\ &opravu:spellrepall
-menutrans Set\ language\ to\ "en"	Nastav\ jazyk\ na\ "en"
-menutrans Set\ language\ to\ "en_au"	Nastav\ jazyk\ na\ "en_au"
-menutrans Set\ language\ to\ "en_ca"	Nastav\ jazyk\ na\ "en_ca"
-menutrans Set\ language\ to\ "en_gb"	Nastav\ jazyk\ na\ "en_gb"
-menutrans Set\ language\ to\ "en_nz"	Nastav\ jazyk\ na\ "en_nz"
-menutrans Set\ language\ to\ "en_us"	Nastav\ jazyk\ na\ "en_us"
-menutrans Set\ language\ to\ "cz"	Nastav\ jazyk\ na\ "cz"
-menutrans Set\ language\ to\ "cs_cz"	Nastav\ jazyk\ na\ "cs_cz"
-menutrans &Find\ More\ Languages	Nalézt\ dal¹í\ &jazyky
+if has("spell")
+   menutrans &Spelling			&Kontrola\ pravopisu
+   menutrans &Spell\ Check\ On		&Zapnout\ kontrolu\ pravopisu
+   menutrans Spell\ Check\ &Off		&Vypnout \kontrolu\ pravopisu
+   menutrans To\ &Next\ error]s	&Dal¹í\ chyba]s
+   menutrans To\ &Previous\ error[s	&Pøedchozí\ chyba[s
+   menutrans Suggest\ &Correctionsz=	&Navrhnout\ opravyz=
+   menutrans &Repeat\ correction:spellrepall	Zopakovat\ &opravu:spellrepall
+   menutrans Set\ language\ to\ "en"	Nastavit\ jazyk\ na\ "en"
+   menutrans Set\ language\ to\ "en_au"	Nastavit\ jazyk\ na\ "en_au"
+   menutrans Set\ language\ to\ "en_ca"	Nastavit\ jazyk\ na\ "en_ca"
+   menutrans Set\ language\ to\ "en_gb"	Nastavit\ jazyk\ na\ "en_gb"
+   menutrans Set\ language\ to\ "en_nz"	Nastavit\ jazyk\ na\ "en_nz"
+   menutrans Set\ language\ to\ "en_us"	Nastavit\ jazyk\ na\ "en_us"
+   menutrans &Find\ More\ Languages	Nalézt\ dal¹í\ &jazyky
+   let g:menutrans_set_lang_to = "Nastavit jazyk na"
+endif
 
-menutrans &Folding			&Foldy
-menutrans &Enable/Disable\ foldszi &Ano/Nezi
-menutrans &View\ Cursor\ Linezv	&Zobrazit\ øádek\ kurzoruzv
-menutrans Vie&w\ Cursor\ Line\ onlyzMzx		Zo&brazit\ pouze\ øádek\ kurzoru\ zMzx
-menutrans C&lose\ more\ foldszm	&Vyjmout\ jednu\ úroveò\ foldùzm
-menutrans &Close\ all\ foldszM	Zavøí&t\ v¹echny\ foldyzM
-menutrans O&pen\ more\ foldszr	Pøidat\ jedn&u\ úroveò\ foldùzr
-menutrans &Open\ all\ foldszR	&Otevøít\ v¹echny\ foldyzR
-menutrans Fold\ Met&hod			Metoda\ &skládání
-	"menutrans M&anual			&Ruènì
-	"menutrans I&ndent			&Odsazení
-	"menutrans E&xpression			&Výraz
-	"menutrans S&yntax			&Syntax
-	"menutrans &Diff			&Diff
-	"menutrans Ma&rker			Ma&rker
-menutrans Create\ &Foldzf		Vytvoøit\ &foldzf
-menutrans &Delete\ Foldzd		Vymazat\ fol&dzd
-menutrans Delete\ &All\ FoldszD	V&ymazat\ v¹echny\ foldyzD
-menutrans Fold\ col&umn\ width		Sloupec\ zob&razení\ foldù
+if has("Folding")   
+   menutrans &Folding			&Skládání
+   menutrans &Enable/Disable\ foldszi &Ano/Nezi
+   menutrans &View\ Cursor\ Linezv	Zobrazit\ øádek\ &kurzoruzv
+   menutrans Vie&w\ Cursor\ Line\ onlyzMzx		Zobrazit\ &pouze\ øádek\ kurzoru\ zMzx
+   menutrans C&lose\ more\ foldszm	Slo¾it\ &jednu\ úroveò\ skladùzm
+   menutrans &Close\ all\ foldszM	Slo¾it\ v¹echny\ skladyzM
+   menutrans O&pen\ more\ foldszr	Pøidat\ jednu\ úroveò\ skladùzr
+   menutrans &Open\ all\ foldszR	&Otevøít\ v¹echny\ skladyzR
+   menutrans Fold\ Met&hod			&Metoda\ skládání
+   menutrans M&anual			&Ruènì
+   menutrans I&ndent			&Odsazení
+   menutrans E&xpression	&Výraz
+   menutrans S&yntax			&Syntaxe
+   menutrans &Diff			&Rozdíly
+   menutrans Ma&rker			&Znaèky
+   menutrans Create\ &Foldzf		Vytvoøit\ &skladzf
+   menutrans &Delete\ Foldzd		Vymazat\ skla&dzd
+   menutrans Delete\ &All\ FoldszD	Vymazat\ v¹echny\ skladyzD
+   menutrans Fold\ col&umn\ width		Sloupec\ zob&razení\ skladù
+endif
+
+if has("diff")
+   menutrans &Update			&Obnovit
+   menutrans &Get\ Block			&Sejmout\ Blok
+   menutrans &Put\ Block			&Vlo¾it\ Blok
+endif
 
-menutrans &Update			&Obnovit
-menutrans &Get\ Block			&Sejmout\ Blok
-menutrans &Put\ Block			&Vlo¾it\ Blok
 menutrans &Make:make		&Make:make
 menutrans &List\ Errors:cl		Výpis\ &chyb:cl
 menutrans L&ist\ Messages:cl!	Výp&is\ zpráv:cl!
@@ -142,7 +165,7 @@ menutrans SeT\ Compiler			Nas&taven
 menutrans &Update:cwin		O&bnovit:cwin
 menutrans &Open:copen		&Otevøít:copen
 menutrans &Close:cclose		&Zavøít:cclose
-menutrans &Set\ Compiler		N&astavit\ kompilátor
+menutrans Se&T\ Compiler		N&astavit\ kompilátor
 
 menutrans &Convert\ to\ HEX:%!xxd	Pøevést\ do\ ¹estnáctkového\ formát&u:%!xxd
 menutrans Conve&rt\ back:%!xxd\ -r Pø&evést\ zpìt:%!xxd\ -r
@@ -170,7 +193,6 @@ menutrans &Delete		Z&ru
 menutrans &Alternate		&Zmìnit
 menutrans &Next			&Dal¹í
 menutrans &Previous		&Pøedchozí
-menutrans [No\ File]		[®ádný\ soubor]
 " }}}
 
 " {{{ Menu Window
@@ -221,6 +243,8 @@ menutrans &Paste		&Vlo
 menutrans &Delete		&Smazat
 menutrans Select\ Blockwise	Vybrat\ blokovì
 menutrans Select\ &Word		Vybrat\ &slovo
+menutrans Select\ Pa&ragraph Vybrat\ &odstavec
+menutrans Select\ &Sentence   Vybrat\ vì&tu
 menutrans Select\ &Line		Vybrat\ &øádek
 menutrans Select\ &Block	Vybrat\ &blok
 menutrans Select\ &All		Vybrat\ &v¹e
@@ -228,42 +252,57 @@ menutrans Select\ &All		Vybrat\ &v
 
 " {{{ The GUI toolbar
 if has("toolbar")
-  if exists("*Do_toolbar_tmenu")
-    delfun Do_toolbar_tmenu
-  endif
-  fun Do_toolbar_tmenu()
-    tmenu ToolBar.Open		Otevøít soubor
-    tmenu ToolBar.Save		Ulo¾it soubor
-    tmenu ToolBar.SaveAll		Ulo¾it v¹echny soubory
-    tmenu ToolBar.Print		Tisk
-    tmenu ToolBar.Undo		Zpìt
-    tmenu ToolBar.Redo		Zru¹it vrácení
-    tmenu ToolBar.Cut		Vyøíznout
-    tmenu ToolBar.Copy		Kopírovat
-    tmenu ToolBar.Paste		Vlo¾it
-    tmenu ToolBar.Find		Hledat...
-    tmenu ToolBar.FindNext	Hledat dal¹í
-    tmenu ToolBar.FindPrev	Hledat pøedchozí
-    tmenu ToolBar.Replace		Nahradit...
-    if 0	" disabled; These are in the Windows menu
-      tmenu ToolBar.New		Nové okno
-      tmenu ToolBar.WinSplit	Rozdìlit okno
-      tmenu ToolBar.WinMax		Maximalizovat okno
-      tmenu ToolBar.WinMin		Minimalizovat okno
-      tmenu ToolBar.WinClose	Zavøít okno
-    endif
-    tmenu ToolBar.LoadSesn	Naèíst sezení
-    tmenu ToolBar.SaveSesn	Ulo¾it sezení
-    tmenu ToolBar.RunScript	Spustit skript
-    tmenu ToolBar.Make		Spustit make
-    tmenu ToolBar.Shell		Spustit shell
-    tmenu ToolBar.RunCtags	Spustit ctags
-    tmenu ToolBar.TagJump		Skoèit na tag pod kurzorem
-    tmenu ToolBar.Help		Nápovìda
-    tmenu ToolBar.FindHelp	Hledat nápovìdu k...
-  endfun
+   if exists("*Do_toolbar_tmenu")
+      delfun Do_toolbar_tmenu
+   endif
+   fun Do_toolbar_tmenu()
+      tmenu ToolBar.Open		Otevøít soubor
+      tmenu ToolBar.Save		Ulo¾it soubor
+      tmenu ToolBar.SaveAll		Ulo¾it v¹echny soubory
+      if has("printer") || has("unix")
+         tmenu ToolBar.Print		Tisk
+      endif
+      tmenu ToolBar.Undo		Zpìt
+      tmenu ToolBar.Redo		Zru¹it vrácení
+      tmenu ToolBar.Cut		Vyøíznout
+      tmenu ToolBar.Copy		Kopírovat
+      tmenu ToolBar.Paste		Vlo¾it
+      tmenu ToolBar.Find		Hledat...
+      tmenu ToolBar.FindNext	Hledat dal¹í
+      tmenu ToolBar.FindPrev	Hledat pøedchozí
+      tmenu ToolBar.Replace		Nahradit...
+      if 0	" disabled; These are in the Windows menu
+         tmenu ToolBar.New		Nové okno
+         tmenu ToolBar.WinSplit	Rozdìlit okno
+         tmenu ToolBar.WinMax		Maximalizovat okno
+         tmenu ToolBar.WinMin		Minimalizovat okno
+         tmenu ToolBar.WinClose	Zavøít okno
+      endif
+      tmenu ToolBar.LoadSesn	Naèíst sezení
+      tmenu ToolBar.SaveSesn	Ulo¾it sezení
+      tmenu ToolBar.RunScript	Spustit skript
+      tmenu ToolBar.Make		Spustit make
+      tmenu ToolBar.Shell		Spustit shell
+      tmenu ToolBar.RunCtags	Spustit ctags
+      tmenu ToolBar.TagJump		Skoèit na tag pod kurzorem
+      tmenu ToolBar.Help		Nápovìda
+      tmenu ToolBar.FindHelp	Hledat nápovìdu k...
+   endfun
 endif
 " }}}
 
+" {{{ DIALOG TEXTS
+let g:menutrans_no_file = "[®ádný soubor]"
+let g:menutrans_help_dialog = "Zadejte hledaný pøíkaz nebo slovo:\n\n\tPøidejte i_ pro pøíkazy vkládacího re¾imu (napø. i_CTRL-X)\n\tPøidejte c_ pro pøíkazy pøíkazové øádky (napø. c_)\n\tPøidejte ' pro jméno volby (napø. 'shiftwidth')"
+let g:menutrans_path_dialog = "Zadejte cesty pro vyhledávání souborù. Jednotlivé cesty oddìlte èárkou"
+let g:menutrans_tags_dialog = "Zadejte jména souborù s tagy. Jména oddìlte èárkami."
+let g:menutrans_textwidth_dialog = "Zadejte délku øádku (0 pro zakázání formátování):"
+let g:menutrans_fileformat_dialog = "Vyberte typ konce øádkù"
+" }}}" 
+
 let &cpo = s:keepcpo
 unlet s:keepcpo
+
+
+
+" vim:set foldmethod=marker expandtab tabstop=3 shiftwidth=3:
diff --git a/runtime/lang/menu_cs_cz.latin1.vim b/runtime/lang/menu_cs_cz.latin1.vim
index efb28a0037..3bf608de81 100644
--- a/runtime/lang/menu_cs_cz.latin1.vim
+++ b/runtime/lang/menu_cs_cz.latin1.vim
@@ -1,3 +1,3 @@
 " Menu Translations:	Czech
 
-source :p:h/menu_czech_czech_republic.1252.vim
+source :p:h/menu_czech_czech_republic.ascii.vim
diff --git a/runtime/lang/menu_cs_cz.utf-8.vim b/runtime/lang/menu_cs_cz.utf-8.vim
new file mode 100644
index 0000000000..91a8eccd46
--- /dev/null
+++ b/runtime/lang/menu_cs_cz.utf-8.vim
@@ -0,0 +1,308 @@
+" Menu Translations:    Czech (UTF-8)
+" Maintainer:           Jiri Sedlak 
+" Previous maintainer:  Jiri Brezina
+" Based on:             menu.vim (2012-10-21)
+
+" Quit when menu translations have already been done.
+if exists("did_menu_trans")
+   finish
+endif
+
+let did_menu_trans = 1
+let s:keepcpo= &cpo
+set cpo&vim
+
+scriptencoding utf-8
+
+" {{{ File menu
+menutrans &File				&Soubor
+menutrans &Open\.\.\.:e		&Otevřít\.\.\.:e
+menutrans Sp&lit-Open\.\.\.:sp	Otevřít\ v\ no&vém\ okně\.\.\.:sp
+menutrans Open\ Tab\.\.\.:tabnew	Otevřít\ tab\.\.\.:tabnew
+menutrans &New:enew		&Nový:enew
+menutrans &Close:close		&Zavřít:close
+menutrans &Save:w			&Uložit:w
+menutrans Save\ &As\.\.\.:sav	Uložit\ &jako\.\.\.:sav
+if has("printer") || has("unix")
+   menutrans &Print			&Tisk
+endif
+menutrans Sa&ve-Exit:wqa		U&ložit\ a\ ukonÄit:wqa
+menutrans E&xit:qa			&UkonÄit:qa
+
+if has("diff")
+   menutrans Split\ &Diff\ with\.\.\.	Rozdělit\ okno\ -\ &Diff\.\.\.
+   menutrans Split\ Patched\ &By\.\.\.	Rozdělit\ okno\ -\ &Patch\.\.\.
+endif
+" }}}
+
+" {{{ Edit menu
+menutrans &Edit				Úpr&avy
+menutrans &Undou			&Zpětu
+menutrans &Redo^R			Z&rušit\ vrácení^R
+menutrans Rep&eat\.		&Opakovat\.
+menutrans Cu&t"+x			&Vyříznout"+x
+menutrans &Copy"+y			&Kopírovat"+y
+menutrans &Paste"+gP		V&ložit"+gP
+menutrans Put\ &Before[p		Vložit\ &před[p
+menutrans Put\ &After]p		Vloži&t\ za]p
+if has("win32") || has("win16")
+   menutrans &Deletex			&Smazatx
+endif
+menutrans &Select\ AllggVG		Vy&brat\ všeggVG
+if has("win32")  || has("win16") || has("gui_gtk") || has("gui_kde") || has("gui_motif")
+   menutrans &Find\.\.\.			&Hledat\.\.\.
+   menutrans Find\ and\ Rep&lace\.\.\.	&Nahradit\.\.\.
+else
+   menutrans Find/ &Hledat/
+   menutrans Find\ and\ Rep&lace:%s  &Nahradit:%s
+   menutrans Find\ and\ Rep&lace:s   &Nahradit:s
+endif
+menutrans Settings\ &Window		Nastav&ení\ okna
+" {{{2 Edit -1
+menutrans Startup\ &Settings  PoÄáteÄní\ &nastavení
+menutrans &Global\ Settings				&Globální\ nastavení
+menutrans Toggle\ Pattern\ &Highlight:set\ hls!	&Přepnout\ zvýraznění\ vzoru:set\ hls!
+menutrans Toggle\ &Ignore-case:set\ ic!		PÅ™epnout\ ignorování\ &VERZÃLEK:set\ ic!
+menutrans Toggle\ &Showmatch:set\ sm!		Přepnout\ &Showmatch\ \{\(\[\])\}:set\ sm!
+menutrans &Context\ lines				Zobrazit\ konte&xt\ kurzoru
+menutrans &Virtual\ Edit				Virtuální\ p&ozice\ kurzoru
+menutrans Never						Nikdy
+menutrans Block\ Selection				Výběr\ Bloku
+menutrans Insert\ mode					Insert\ mód
+menutrans Block\ and\ Insert				Blok\ a\ Insert
+menutrans Always					Vždycky
+menutrans Toggle\ Insert\ &Mode:set\ im!		Přepnout\ Insert\ mó&d:set\ im!
+menutrans Toggle\ Vi\ C&ompatible:set\ cp!		Přepnout\ kompatibilní\ režim\ s\ 'vi':set\ cp!
+menutrans Search\ &Path\.\.\.				Nastavit\ &cestu\ k\ prohledávání\.\.\.
+menutrans Ta&g\ Files\.\.\.				Ta&g\ soubory\.\.\.
+menutrans Toggle\ &Toolbar				Přepnout\ &Toolbar
+menutrans Toggle\ &Bottom\ Scrollbar			Př&epnout\ dolní\ rolovací\ lištu
+menutrans Toggle\ &Left\ Scrollbar			Přepnout\ &levou\ rolovací\ lištu
+menutrans Toggle\ &Right\ Scrollbar			Přepnout\ p&ravou\ rolovací\ lištu
+" {{{2 Edit -2
+menutrans F&ile\ Settings				Nastavení\ so&uboru
+menutrans Toggle\ Line\ &Numbering:set\ nu!	PÅ™epnout\ Äíslování\ řá&dků:set\ nu!
+menutrans Toggle\ relati&ve\ Line\ Numbering:set\ rnu! PÅ™epnout\ relativní\ Äíslování\ řá&dků:set\ rnu!
+menutrans Toggle\ &List\ Mode:set\ list!		Přepnout\ &List\ mód:set\ list!
+menutrans Toggle\ Line\ &Wrap:set\ wrap!		Přepnout\ zala&mování\ řádků:set\ wrap!
+menutrans Toggle\ W&rap\ at\ word:set\ lbr!	Přepnout\ zl&om\ ve\ slově:set\ lbr!
+menutrans Toggle\ &expand-tab:set\ et!		Přepnout\ &expand-tab:set\ et!
+menutrans Toggle\ &auto-indent:set\ ai!		Přepnout\ &auto-indent:set\ ai!
+menutrans Toggle\ &C-indenting:set\ cin!		Přepnout\ &C-indenting:set\ cin!
+menutrans &Shiftwidth					Nastav&it\ šířku\ od&sazení
+menutrans Soft\ &Tabstop				Nastavit\ Soft\ &Tabstop
+menutrans Te&xt\ Width\.\.\.				Šířka\ te&xtu\.\.\.
+menutrans &File\ Format\.\.\.				&Formát\ souboru\.\.\.
+" {{{2 Edit -3
+menutrans C&olor\ Scheme		Barevné\ s&chéma
+menutrans &Keymap			Klávesová\ m&apa
+if has("win32") || has("win16") || has("gui_motif") || has("gui_gtk") || has("gui_kde") || has("gui_photon") || has("gui_mac")
+   menutrans Select\ Fo&nt\.\.\.		Vybrat\ pís&mo\.\.\.
+endif
+" }}}1
+
+" {{{ Programming menu
+menutrans &Tools			Nást&roje
+menutrans &Jump\ to\ this\ tagg^]	&SkoÄit\ na\ tagg^]
+menutrans Jump\ &back^T		SkoÄit\ &zpÄ›t^T
+menutrans Build\ &Tags\ File		&Vytvořit\ soubor\ tagů
+
+if has("spell")
+   menutrans &Spelling			&Kontrola\ pravopisu
+   menutrans &Spell\ Check\ On		&Zapnout\ kontrolu\ pravopisu
+   menutrans Spell\ Check\ &Off		&Vypnout \kontrolu\ pravopisu
+   menutrans To\ &Next\ error]s	&Další\ chyba]s
+   menutrans To\ &Previous\ error[s	&Předchozí\ chyba[s
+   menutrans Suggest\ &Correctionsz=	&Navrhnout\ opravyz=
+   menutrans &Repeat\ correction:spellrepall	Zopakovat\ &opravu:spellrepall
+   menutrans Set\ language\ to\ "en"	Nastavit\ jazyk\ na\ "en"
+   menutrans Set\ language\ to\ "en_au"	Nastavit\ jazyk\ na\ "en_au"
+   menutrans Set\ language\ to\ "en_ca"	Nastavit\ jazyk\ na\ "en_ca"
+   menutrans Set\ language\ to\ "en_gb"	Nastavit\ jazyk\ na\ "en_gb"
+   menutrans Set\ language\ to\ "en_nz"	Nastavit\ jazyk\ na\ "en_nz"
+   menutrans Set\ language\ to\ "en_us"	Nastavit\ jazyk\ na\ "en_us"
+   menutrans &Find\ More\ Languages	Nalézt\ další\ &jazyky
+   let g:menutrans_set_lang_to = "Nastavit jazyk na"
+endif
+
+if has("Folding")   
+   menutrans &Folding			&Skládání
+   menutrans &Enable/Disable\ foldszi &Ano/Nezi
+   menutrans &View\ Cursor\ Linezv	Zobrazit\ řádek\ &kurzoruzv
+   menutrans Vie&w\ Cursor\ Line\ onlyzMzx		Zobrazit\ &pouze\ řádek\ kurzoru\ zMzx
+   menutrans C&lose\ more\ foldszm	Složit\ &jednu\ úroveň\ skladůzm
+   menutrans &Close\ all\ foldszM	Složit\ všechny\ skladyzM
+   menutrans O&pen\ more\ foldszr	Přidat\ jednu\ úroveň\ skladůzr
+   menutrans &Open\ all\ foldszR	&Otevřít\ všechny\ skladyzR
+   menutrans Fold\ Met&hod			&Metoda\ skládání
+   menutrans M&anual			&RuÄnÄ›
+   menutrans I&ndent			&Odsazení
+   menutrans E&xpression	&Výraz
+   menutrans S&yntax			&Syntaxe
+   menutrans &Diff			&Rozdíly
+   menutrans Ma&rker			&ZnaÄky
+   menutrans Create\ &Foldzf		Vytvořit\ &skladzf
+   menutrans &Delete\ Foldzd		Vymazat\ skla&dzd
+   menutrans Delete\ &All\ FoldszD	Vymazat\ všechny\ skladyzD
+   menutrans Fold\ col&umn\ width		Sloupec\ zob&razení\ skladů
+endif
+
+if has("diff")
+   menutrans &Update			&Obnovit
+   menutrans &Get\ Block			&Sejmout\ Blok
+   menutrans &Put\ Block			&Vložit\ Blok
+endif
+
+menutrans &Make:make		&Make:make
+menutrans &List\ Errors:cl		Výpis\ &chyb:cl
+menutrans L&ist\ Messages:cl!	Výp&is\ zpráv:cl!
+menutrans &Next\ Error:cn		Další\ ch&yba:cn
+menutrans &Previous\ Error:cp	&Předchozí\ chyba:cp
+menutrans &Older\ List:cold	Sta&rší\ seznam:cold
+menutrans N&ewer\ List:cnew	N&ovější\ seznam:cnew
+menutrans Error\ &Window		Chybové\ o&kno
+menutrans SeT\ Compiler			Nas&tavení\ kompilátoru
+menutrans &Update:cwin		O&bnovit:cwin
+menutrans &Open:copen		&Otevřít:copen
+menutrans &Close:cclose		&Zavřít:cclose
+menutrans Se&T\ Compiler		N&astavit\ kompilátor
+
+menutrans &Convert\ to\ HEX:%!xxd	Převést\ do\ šestnáctkového\ formát&u:%!xxd
+menutrans Conve&rt\ back:%!xxd\ -r Př&evést\ zpět:%!xxd\ -r
+" }}}
+
+" {{{ Syntax menu
+menutrans &Syntax		Synta&xe
+menutrans Set\ '&syntax'\ only	Nastavit\ pouze\ 'synta&x'
+menutrans Set\ '&filetype'\ too	Nastavit\ také\ '&filetype'
+menutrans &Off			&Vypnout
+menutrans &Manual		&RuÄnÄ›
+menutrans A&utomatic		A&utomaticky
+menutrans on/off\ for\ &This\ file	&Přepnout\ (pro\ tento\ soubor)
+menutrans o&ff\ (this\ file)	vyp&nout\ (pro\ tento\ soubor)
+menutrans Co&lor\ test		Test\ &barev
+menutrans &Highlight\ test	&Test\ zvýrazňování
+menutrans &Convert\ to\ HTML	Převést\ &do\ HTML
+menutrans &Show\ filetypes\ in\ menu	&Zobrazit\ výběr\ možností
+" }}}
+
+" {{{ Menu Buffers
+menutrans &Buffers		&Buffery
+menutrans &Refresh\ menu	&Obnovit\ menu
+menutrans &Delete		Z&rušit
+menutrans &Alternate		&Změnit
+menutrans &Next			&Další
+menutrans &Previous		&Předchozí
+" }}}
+
+" {{{ Menu Window
+menutrans &Window			&Okna
+menutrans &New^Wn			&Nové^Wn
+menutrans S&plit^Ws		&Rozdělit^Ws
+menutrans Sp&lit\ To\ #^W^^	Ro&zdělit\ na\ #^W^^
+menutrans Split\ &Vertically^Wv	Rozdělit\ &vertikálně^Wv
+menutrans Split\ File\ E&xplorer	Rozdělit\ -\ File\ E&xplorer
+menutrans Move\ &To			&Přesun
+menutrans &Top^WK			&Nahoru^WK
+menutrans &Bottom^WJ		&Dolu^WJ
+menutrans &Left\ side^WH		&Vlevo^WH
+menutrans &Right\ side^WL		Vp&ravo^WL
+
+menutrans &Close^Wc		Zavří&t^Wc
+menutrans Close\ &Other(s)^Wo	Zavřít\ &ostatní^Wo
+menutrans Ne&xt^Ww			&Další^Ww
+menutrans P&revious^WW		&Předchozí^WW
+menutrans &Equal\ Size^W=		&Stejná\ výška^W=
+menutrans &Max\ Height^W_		Maximální\ výš&ka^W_
+menutrans M&in\ Height^W1_		M&inimální\ výška^W1_
+menutrans Max\ &Width^W\|		&Maximální\ šířka^W\|
+menutrans Min\ Widt&h^W1\|		Minimální\ šířk&a^W1\|
+menutrans Rotate\ &Up^WR		Rotovat\ na&horu^WR
+menutrans Rotate\ &Down^Wr		Rotovat\ &dolů^Wr
+
+" {{{ Help menu
+menutrans &Help			&Nápověda
+menutrans &Overview	&Přehled
+menutrans &User\ Manual		&Uživatelský\ Manuál
+menutrans &How-to\ links	Ho&wto
+menutrans &GUI			&Grafické\ rozhraní
+menutrans &Credits		&Autoři
+menutrans Co&pying		&LicenÄní\ politika
+menutrans &Sponsor/Register	Sponzorování/&Registrace
+menutrans &Find\.\.\.		&Hledat\.\.\.
+menutrans O&rphans		O&siřelé\ děti
+menutrans &Version		&Verze
+menutrans &About		&O\ aplikaci
+" }}}
+
+" {{{ The popup menu
+menutrans &Undo			&Zpět
+menutrans Cu&t			&Vyříznout
+menutrans &Copy			&Kopírovat
+menutrans &Paste		&Vložit
+menutrans &Delete		&Smazat
+menutrans Select\ Blockwise	Vybrat\ blokovÄ›
+menutrans Select\ &Word		Vybrat\ &slovo
+menutrans Select\ Pa&ragraph Vybrat\ &odstavec
+menutrans Select\ &Sentence   Vybrat\ vÄ›&tu
+menutrans Select\ &Line		Vybrat\ &řádek
+menutrans Select\ &Block	Vybrat\ &blok
+menutrans Select\ &All		Vybrat\ &vše
+" }}}
+
+" {{{ The GUI toolbar
+if has("toolbar")
+   if exists("*Do_toolbar_tmenu")
+      delfun Do_toolbar_tmenu
+   endif
+   fun Do_toolbar_tmenu()
+      tmenu ToolBar.Open		Otevřít soubor
+      tmenu ToolBar.Save		Uložit soubor
+      tmenu ToolBar.SaveAll		Uložit všechny soubory
+      if has("printer") || has("unix")
+         tmenu ToolBar.Print		Tisk
+      endif
+      tmenu ToolBar.Undo		Zpět
+      tmenu ToolBar.Redo		Zrušit vrácení
+      tmenu ToolBar.Cut		Vyříznout
+      tmenu ToolBar.Copy		Kopírovat
+      tmenu ToolBar.Paste		Vložit
+      tmenu ToolBar.Find		Hledat...
+      tmenu ToolBar.FindNext	Hledat další
+      tmenu ToolBar.FindPrev	Hledat předchozí
+      tmenu ToolBar.Replace		Nahradit...
+      if 0	" disabled; These are in the Windows menu
+         tmenu ToolBar.New		Nové okno
+         tmenu ToolBar.WinSplit	Rozdělit okno
+         tmenu ToolBar.WinMax		Maximalizovat okno
+         tmenu ToolBar.WinMin		Minimalizovat okno
+         tmenu ToolBar.WinClose	Zavřít okno
+      endif
+      tmenu ToolBar.LoadSesn	NaÄíst sezení
+      tmenu ToolBar.SaveSesn	Uložit sezení
+      tmenu ToolBar.RunScript	Spustit skript
+      tmenu ToolBar.Make		Spustit make
+      tmenu ToolBar.Shell		Spustit shell
+      tmenu ToolBar.RunCtags	Spustit ctags
+      tmenu ToolBar.TagJump		SkoÄit na tag pod kurzorem
+      tmenu ToolBar.Help		Nápověda
+      tmenu ToolBar.FindHelp	Hledat nápovědu k...
+   endfun
+endif
+" }}}
+
+" {{{ DIALOG TEXTS
+let g:menutrans_no_file = "[Žádný soubor]"
+let g:menutrans_help_dialog = "Zadejte hledaný příkaz nebo slovo:\n\n\tPřidejte i_ pro příkazy vkládacího režimu (např. i_CTRL-X)\n\tPřidejte c_ pro příkazy příkazové řádky (např. c_)\n\tPřidejte ' pro jméno volby (např. 'shiftwidth')"
+let g:menutrans_path_dialog = "Zadejte cesty pro vyhledávání souborů. Jednotlivé cesty oddÄ›lte Äárkou"
+let g:menutrans_tags_dialog = "Zadejte jména souborů s tagy. Jména oddÄ›lte Äárkami."
+let g:menutrans_textwidth_dialog = "Zadejte délku řádku (0 pro zakázání formátování):"
+let g:menutrans_fileformat_dialog = "Vyberte typ konce řádků"
+" }}}" 
+
+let &cpo = s:keepcpo
+unlet s:keepcpo
+
+
+
+" vim:set foldmethod=marker expandtab tabstop=3 shiftwidth=3:
diff --git a/runtime/lang/menu_czech_czech_republic.1250.vim b/runtime/lang/menu_czech_czech_republic.1250.vim
index ebaab9b679..f9c85d038a 100644
--- a/runtime/lang/menu_czech_czech_republic.1250.vim
+++ b/runtime/lang/menu_czech_czech_republic.1250.vim
@@ -1,13 +1,13 @@
-" Menu Translations:	Czech for MS-Windows
-" Maintainer:		Jiri Brezina 
-" vim:set foldmethod=marker:
-" $Revision: 1.3 $
-" $Date: 2005/12/19 22:13:30 $
+" Menu Translations:    Czech (CP1250)
+" Maintainer:           Jiri Sedlak 
+" Previous maintainer:  Jiri Brezina
+" Based on:             menu.vim (2012-10-21)
 
 " Quit when menu translations have already been done.
 if exists("did_menu_trans")
-  finish
+   finish
 endif
+
 let did_menu_trans = 1
 let s:keepcpo= &cpo
 set cpo&vim
@@ -18,15 +18,21 @@ scriptencoding cp1250
 menutrans &File				&Soubor
 menutrans &Open\.\.\.:e		&Otevøít\.\.\.:e
 menutrans Sp&lit-Open\.\.\.:sp	Otevøít\ v\ no&vém\ oknì\.\.\.:sp
+menutrans Open\ Tab\.\.\.:tabnew	Otevøít\ tab\.\.\.:tabnew
 menutrans &New:enew		&Nový:enew
 menutrans &Close:close		&Zavøít:close
 menutrans &Save:w			&Uložit:w
 menutrans Save\ &As\.\.\.:sav	Uložit\ &jako\.\.\.:sav
-menutrans Split\ &Diff\ with\.\.\.	Rozdìlit\ okno\ -\ &Diff\.\.\.
-menutrans Split\ Patched\ &By\.\.\.	Rozdìlit\ okno\ -\ &Patch\.\.\.
-menutrans &Print			&Tisk
-menutrans Sa&ve-Exit:wqa		U&ložit\ -\ Konec:wqa
-menutrans E&xit:qa			&Konec:qa
+if has("printer") || has("unix")
+   menutrans &Print			&Tisk
+endif
+menutrans Sa&ve-Exit:wqa		U&ložit\ a\ ukonèit:wqa
+menutrans E&xit:qa			&Ukonèit:qa
+
+if has("diff")
+   menutrans Split\ &Diff\ with\.\.\.	Rozdìlit\ okno\ -\ &Diff\.\.\.
+   menutrans Split\ Patched\ &By\.\.\.	Rozdìlit\ okno\ -\ &Patch\.\.\.
+endif
 " }}}
 
 " {{{ Edit menu
@@ -39,24 +45,32 @@ menutrans &Copy"+y			&Kop
 menutrans &Paste"+gP		V&ložit"+gP
 menutrans Put\ &Before[p		Vložit\ &pøed[p
 menutrans Put\ &After]p		Vloži&t\ za]p
-menutrans &Deletex			&Smazatx
+if has("win32") || has("win16")
+   menutrans &Deletex			&Smazatx
+endif
 menutrans &Select\ AllggVG		Vy&brat\ všeggVG
-menutrans &Find\.\.\.			&Hledat\.\.\.
-menutrans Find\ and\ Rep&lace\.\.\.	&Nahradit\.\.\.
-menutrans Options\.\.\.			Volb&y\.\.\.
+if has("win32")  || has("win16") || has("gui_gtk") || has("gui_kde") || has("gui_motif")
+   menutrans &Find\.\.\.			&Hledat\.\.\.
+   menutrans Find\ and\ Rep&lace\.\.\.	&Nahradit\.\.\.
+else
+   menutrans Find/ &Hledat/
+   menutrans Find\ and\ Rep&lace:%s  &Nahradit:%s
+   menutrans Find\ and\ Rep&lace:s   &Nahradit:s
+endif
 menutrans Settings\ &Window		Nastav&ení\ okna
-	" {{{2 Edit -1
+" {{{2 Edit -1
+menutrans Startup\ &Settings  Poèáteèní\ &nastavení
 menutrans &Global\ Settings				&Globální\ nastavení
 menutrans Toggle\ Pattern\ &Highlight:set\ hls!	&Pøepnout\ zvýraznìní\ vzoru:set\ hls!
 menutrans Toggle\ &Ignore-case:set\ ic!		Pøepnout\ ignorování\ &VERZÁLEK:set\ ic!
 menutrans Toggle\ &Showmatch:set\ sm!		Pøepnout\ &Showmatch\ \{\(\[\])\}:set\ sm!
 menutrans &Context\ lines				Zobrazit\ konte&xt\ kurzoru
 menutrans &Virtual\ Edit				Virtuální\ p&ozice\ kurzoru
-	menutrans Never						Nikdy
-	menutrans Block\ Selection				Výbìr\ Bloku
-	menutrans Insert\ mode					Insert\ mód
-	menutrans Block\ and\ Insert				Blok\ a\ Insert
-	menutrans Always					Vždycky
+menutrans Never						Nikdy
+menutrans Block\ Selection				Výbìr\ Bloku
+menutrans Insert\ mode					Insert\ mód
+menutrans Block\ and\ Insert				Blok\ a\ Insert
+menutrans Always					Vždycky
 menutrans Toggle\ Insert\ &Mode:set\ im!		Pøepnout\ Insert\ mó&d:set\ im!
 menutrans Toggle\ Vi\ C&ompatible:set\ cp!		Pøepnout\ kompatibilní\ režim\ s\ 'vi':set\ cp!
 menutrans Search\ &Path\.\.\.				Nastavit\ &cestu\ k\ prohledávání\.\.\.
@@ -65,9 +79,10 @@ menutrans Toggle\ &Toolbar				P
 menutrans Toggle\ &Bottom\ Scrollbar			Pø&epnout\ dolní\ rolovací\ lištu
 menutrans Toggle\ &Left\ Scrollbar			Pøepnout\ &levou\ rolovací\ lištu
 menutrans Toggle\ &Right\ Scrollbar			Pøepnout\ p&ravou\ rolovací\ lištu
-	" {{{2 Edit -2
+" {{{2 Edit -2
 menutrans F&ile\ Settings				Nastavení\ so&uboru
 menutrans Toggle\ Line\ &Numbering:set\ nu!	Pøepnout\ èíslování\ øá&dkù:set\ nu!
+menutrans Toggle\ relati&ve\ Line\ Numbering:set\ rnu! Pøepnout\ relativní\ èíslování\ øá&dkù:set\ rnu!
 menutrans Toggle\ &List\ Mode:set\ list!		Pøepnout\ &List\ mód:set\ list!
 menutrans Toggle\ Line\ &Wrap:set\ wrap!		Pøepnout\ zala&mování\ øádkù:set\ wrap!
 menutrans Toggle\ W&rap\ at\ word:set\ lbr!	Pøepnout\ zl&om\ ve\ slovì:set\ lbr!
@@ -78,10 +93,12 @@ menutrans &Shiftwidth					Nastav&it\ 
 menutrans Soft\ &Tabstop				Nastavit\ Soft\ &Tabstop
 menutrans Te&xt\ Width\.\.\.				Šíøka\ te&xtu\.\.\.
 menutrans &File\ Format\.\.\.				&Formát\ souboru\.\.\.
-	" {{{2 Edit -3
+" {{{2 Edit -3
 menutrans C&olor\ Scheme		Barevné\ s&chéma
 menutrans &Keymap			Klávesová\ m&apa
-menutrans Select\ Fo&nt\.\.\.		Vybrat\ pís&mo\.\.\.
+if has("win32") || has("win16") || has("gui_motif") || has("gui_gtk") || has("gui_kde") || has("gui_photon") || has("gui_mac")
+   menutrans Select\ Fo&nt\.\.\.		Vybrat\ pís&mo\.\.\.
+endif
 " }}}1
 
 " {{{ Programming menu
@@ -90,46 +107,52 @@ menutrans &Jump\ to\ this\ tagg^]	&Sko
 menutrans Jump\ &back^T		Skoèit\ &zpìt^T
 menutrans Build\ &Tags\ File		&Vytvoøit\ soubor\ tagù
 
-menutrans &Spelling			&Kontrola\ pravopisu
-menutrans &Spell\ Check\ On		Kontrola\ pravopisu\ &zapnuta
-menutrans Spell\ Check\ &Off		Kontrola\ pravopisu\ &vypnuta
-menutrans To\ Next\ error]s	&Další\ chyba]s
-menutrans To\ Previous\ error[s	&Pøedchozí\ chyba[s
-menutrans Suggest\ Correctionsz?	&Návrh\ opravz?
-menutrans Repeat\ correction:spellrepall	Zopakovat\ &opravu:spellrepall
-menutrans Set\ language\ to\ "en"	Nastav\ jazyk\ na\ "en"
-menutrans Set\ language\ to\ "en_au"	Nastav\ jazyk\ na\ "en_au"
-menutrans Set\ language\ to\ "en_ca"	Nastav\ jazyk\ na\ "en_ca"
-menutrans Set\ language\ to\ "en_gb"	Nastav\ jazyk\ na\ "en_gb"
-menutrans Set\ language\ to\ "en_nz"	Nastav\ jazyk\ na\ "en_nz"
-menutrans Set\ language\ to\ "en_us"	Nastav\ jazyk\ na\ "en_us"
-menutrans Set\ language\ to\ "cz"	Nastav\ jazyk\ na\ "cz"
-menutrans Set\ language\ to\ "cs_cz"	Nastav\ jazyk\ na\ "cs_cz"
-menutrans &Find\ More\ Languages	Nalézt\ další\ &jazyky
+if has("spell")
+   menutrans &Spelling			&Kontrola\ pravopisu
+   menutrans &Spell\ Check\ On		&Zapnout\ kontrolu\ pravopisu
+   menutrans Spell\ Check\ &Off		&Vypnout \kontrolu\ pravopisu
+   menutrans To\ &Next\ error]s	&Další\ chyba]s
+   menutrans To\ &Previous\ error[s	&Pøedchozí\ chyba[s
+   menutrans Suggest\ &Correctionsz=	&Navrhnout\ opravyz=
+   menutrans &Repeat\ correction:spellrepall	Zopakovat\ &opravu:spellrepall
+   menutrans Set\ language\ to\ "en"	Nastavit\ jazyk\ na\ "en"
+   menutrans Set\ language\ to\ "en_au"	Nastavit\ jazyk\ na\ "en_au"
+   menutrans Set\ language\ to\ "en_ca"	Nastavit\ jazyk\ na\ "en_ca"
+   menutrans Set\ language\ to\ "en_gb"	Nastavit\ jazyk\ na\ "en_gb"
+   menutrans Set\ language\ to\ "en_nz"	Nastavit\ jazyk\ na\ "en_nz"
+   menutrans Set\ language\ to\ "en_us"	Nastavit\ jazyk\ na\ "en_us"
+   menutrans &Find\ More\ Languages	Nalézt\ další\ &jazyky
+   let g:menutrans_set_lang_to = "Nastavit jazyk na"
+endif
 
-menutrans &Folding			&Foldy
-menutrans &Enable/Disable\ foldszi &Ano/Nezi
-menutrans &View\ Cursor\ Linezv	&Zobrazit\ øádek\ kurzoruzv
-menutrans Vie&w\ Cursor\ Line\ onlyzMzx		Zo&brazit\ pouze\ øádek\ kurzoru\ zMzx
-menutrans C&lose\ more\ foldszm	&Vyjmout\ jednu\ úroveò\ foldùzm
-menutrans &Close\ all\ foldszM	Zavøí&t\ všechny\ foldyzM
-menutrans O&pen\ more\ foldszr	Pøidat\ jedn&u\ úroveò\ foldùzr
-menutrans &Open\ all\ foldszR	&Otevøít\ všechny\ foldyzR
-menutrans Fold\ Met&hod			Metoda\ &skládání
-	"menutrans M&anual			&Ruènì
-	"menutrans I&ndent			&Odsazení
-	"menutrans E&xpression			&Výraz
-	"menutrans S&yntax			&Syntax
-	"menutrans &Diff			&Diff
-	"menutrans Ma&rker			Ma&rker
-menutrans Create\ &Foldzf		Vytvoøit\ &foldzf
-menutrans &Delete\ Foldzd		Vymazat\ fol&dzd
-menutrans Delete\ &All\ FoldszD	V&ymazat\ všechny\ foldyzD
-menutrans Fold\ col&umn\ width		Sloupec\ zob&razení\ foldù
+if has("Folding")   
+   menutrans &Folding			&Skládání
+   menutrans &Enable/Disable\ foldszi &Ano/Nezi
+   menutrans &View\ Cursor\ Linezv	Zobrazit\ øádek\ &kurzoruzv
+   menutrans Vie&w\ Cursor\ Line\ onlyzMzx		Zobrazit\ &pouze\ øádek\ kurzoru\ zMzx
+   menutrans C&lose\ more\ foldszm	Složit\ &jednu\ úroveò\ skladùzm
+   menutrans &Close\ all\ foldszM	Složit\ všechny\ skladyzM
+   menutrans O&pen\ more\ foldszr	Pøidat\ jednu\ úroveò\ skladùzr
+   menutrans &Open\ all\ foldszR	&Otevøít\ všechny\ skladyzR
+   menutrans Fold\ Met&hod			&Metoda\ skládání
+   menutrans M&anual			&Ruènì
+   menutrans I&ndent			&Odsazení
+   menutrans E&xpression	&Výraz
+   menutrans S&yntax			&Syntaxe
+   menutrans &Diff			&Rozdíly
+   menutrans Ma&rker			&Znaèky
+   menutrans Create\ &Foldzf		Vytvoøit\ &skladzf
+   menutrans &Delete\ Foldzd		Vymazat\ skla&dzd
+   menutrans Delete\ &All\ FoldszD	Vymazat\ všechny\ skladyzD
+   menutrans Fold\ col&umn\ width		Sloupec\ zob&razení\ skladù
+endif
+
+if has("diff")
+   menutrans &Update			&Obnovit
+   menutrans &Get\ Block			&Sejmout\ Blok
+   menutrans &Put\ Block			&Vložit\ Blok
+endif
 
-menutrans &Update			&Obnovit
-menutrans &Get\ Block			&Sejmout\ Blok
-menutrans &Put\ Block			&Vložit\ Blok
 menutrans &Make:make		&Make:make
 menutrans &List\ Errors:cl		Výpis\ &chyb:cl
 menutrans L&ist\ Messages:cl!	Výp&is\ zpráv:cl!
@@ -142,7 +165,7 @@ menutrans SeT\ Compiler			Nas&taven
 menutrans &Update:cwin		O&bnovit:cwin
 menutrans &Open:copen		&Otevøít:copen
 menutrans &Close:cclose		&Zavøít:cclose
-menutrans &Set\ Compiler		N&astavit\ kompilátor
+menutrans Se&T\ Compiler		N&astavit\ kompilátor
 
 menutrans &Convert\ to\ HEX:%!xxd	Pøevést\ do\ šestnáctkového\ formát&u:%!xxd
 menutrans Conve&rt\ back:%!xxd\ -r Pø&evést\ zpìt:%!xxd\ -r
@@ -170,7 +193,6 @@ menutrans &Delete		Z&ru
 menutrans &Alternate		&Zmìnit
 menutrans &Next			&Další
 menutrans &Previous		&Pøedchozí
-menutrans [No\ File]		[Žádný\ soubor]
 " }}}
 
 " {{{ Menu Window
@@ -221,6 +243,8 @@ menutrans &Paste		&Vlo
 menutrans &Delete		&Smazat
 menutrans Select\ Blockwise	Vybrat\ blokovì
 menutrans Select\ &Word		Vybrat\ &slovo
+menutrans Select\ Pa&ragraph Vybrat\ &odstavec
+menutrans Select\ &Sentence   Vybrat\ vì&tu
 menutrans Select\ &Line		Vybrat\ &øádek
 menutrans Select\ &Block	Vybrat\ &blok
 menutrans Select\ &All		Vybrat\ &vše
@@ -228,42 +252,57 @@ menutrans Select\ &All		Vybrat\ &v
 
 " {{{ The GUI toolbar
 if has("toolbar")
-  if exists("*Do_toolbar_tmenu")
-    delfun Do_toolbar_tmenu
-  endif
-  fun Do_toolbar_tmenu()
-    tmenu ToolBar.Open		Otevøít soubor
-    tmenu ToolBar.Save		Uložit soubor
-    tmenu ToolBar.SaveAll		Uložit všechny soubory
-    tmenu ToolBar.Print		Tisk
-    tmenu ToolBar.Undo		Zpìt
-    tmenu ToolBar.Redo		Zrušit vrácení
-    tmenu ToolBar.Cut		Vyøíznout
-    tmenu ToolBar.Copy		Kopírovat
-    tmenu ToolBar.Paste		Vložit
-    tmenu ToolBar.Find		Hledat...
-    tmenu ToolBar.FindNext	Hledat další
-    tmenu ToolBar.FindPrev	Hledat pøedchozí
-    tmenu ToolBar.Replace		Nahradit...
-    if 0	" disabled; These are in the Windows menu
-      tmenu ToolBar.New		Nové okno
-      tmenu ToolBar.WinSplit	Rozdìlit okno
-      tmenu ToolBar.WinMax		Maximalizovat okno
-      tmenu ToolBar.WinMin		Minimalizovat okno
-      tmenu ToolBar.WinClose	Zavøít okno
-    endif
-    tmenu ToolBar.LoadSesn	Naèíst sezení
-    tmenu ToolBar.SaveSesn	Uložit sezení
-    tmenu ToolBar.RunScript	Spustit skript
-    tmenu ToolBar.Make		Spustit make
-    tmenu ToolBar.Shell		Spustit shell
-    tmenu ToolBar.RunCtags	Spustit ctags
-    tmenu ToolBar.TagJump		Skoèit na tag pod kurzorem
-    tmenu ToolBar.Help		Nápovìda
-    tmenu ToolBar.FindHelp	Hledat nápovìdu k...
-  endfun
+   if exists("*Do_toolbar_tmenu")
+      delfun Do_toolbar_tmenu
+   endif
+   fun Do_toolbar_tmenu()
+      tmenu ToolBar.Open		Otevøít soubor
+      tmenu ToolBar.Save		Uložit soubor
+      tmenu ToolBar.SaveAll		Uložit všechny soubory
+      if has("printer") || has("unix")
+         tmenu ToolBar.Print		Tisk
+      endif
+      tmenu ToolBar.Undo		Zpìt
+      tmenu ToolBar.Redo		Zrušit vrácení
+      tmenu ToolBar.Cut		Vyøíznout
+      tmenu ToolBar.Copy		Kopírovat
+      tmenu ToolBar.Paste		Vložit
+      tmenu ToolBar.Find		Hledat...
+      tmenu ToolBar.FindNext	Hledat další
+      tmenu ToolBar.FindPrev	Hledat pøedchozí
+      tmenu ToolBar.Replace		Nahradit...
+      if 0	" disabled; These are in the Windows menu
+         tmenu ToolBar.New		Nové okno
+         tmenu ToolBar.WinSplit	Rozdìlit okno
+         tmenu ToolBar.WinMax		Maximalizovat okno
+         tmenu ToolBar.WinMin		Minimalizovat okno
+         tmenu ToolBar.WinClose	Zavøít okno
+      endif
+      tmenu ToolBar.LoadSesn	Naèíst sezení
+      tmenu ToolBar.SaveSesn	Uložit sezení
+      tmenu ToolBar.RunScript	Spustit skript
+      tmenu ToolBar.Make		Spustit make
+      tmenu ToolBar.Shell		Spustit shell
+      tmenu ToolBar.RunCtags	Spustit ctags
+      tmenu ToolBar.TagJump		Skoèit na tag pod kurzorem
+      tmenu ToolBar.Help		Nápovìda
+      tmenu ToolBar.FindHelp	Hledat nápovìdu k...
+   endfun
 endif
 " }}}
 
+" {{{ DIALOG TEXTS
+let g:menutrans_no_file = "[Žádný soubor]"
+let g:menutrans_help_dialog = "Zadejte hledaný pøíkaz nebo slovo:\n\n\tPøidejte i_ pro pøíkazy vkládacího režimu (napø. i_CTRL-X)\n\tPøidejte c_ pro pøíkazy pøíkazové øádky (napø. c_)\n\tPøidejte ' pro jméno volby (napø. 'shiftwidth')"
+let g:menutrans_path_dialog = "Zadejte cesty pro vyhledávání souborù. Jednotlivé cesty oddìlte èárkou"
+let g:menutrans_tags_dialog = "Zadejte jména souborù s tagy. Jména oddìlte èárkami."
+let g:menutrans_textwidth_dialog = "Zadejte délku øádku (0 pro zakázání formátování):"
+let g:menutrans_fileformat_dialog = "Vyberte typ konce øádkù"
+" }}}" 
+
 let &cpo = s:keepcpo
 unlet s:keepcpo
+
+
+
+" vim:set foldmethod=marker expandtab tabstop=3 shiftwidth=3:
diff --git a/runtime/lang/menu_czech_czech_republic.ascii.vim b/runtime/lang/menu_czech_czech_republic.ascii.vim
index 7ac8c34e04..1c4fb3ed8f 100644
--- a/runtime/lang/menu_czech_czech_republic.ascii.vim
+++ b/runtime/lang/menu_czech_czech_republic.ascii.vim
@@ -1,30 +1,38 @@
-" Menu Translations:	Czech for systems without localization
-" Maintainer:		Jiri Brezina 
-" vim:set foldmethod=marker:
-" $Revision: 1.3 $
-" $Date: 2005/12/19 22:06:56 $
+" Menu Translations:    Czech (latin1 - w/o diacritics)
+" Maintainer:           Jiri Sedlak 
+" Previous maintainer:  Jiri Brezina
+" Based on:             menu.vim (2012-10-21)
 
 " Quit when menu translations have already been done.
 if exists("did_menu_trans")
-  finish
+   finish
 endif
+
 let did_menu_trans = 1
 let s:keepcpo= &cpo
 set cpo&vim
 
+scriptencoding latin1
+
 " {{{ File menu
 menutrans &File				&Soubor
 menutrans &Open\.\.\.:e		&Otevrit\.\.\.:e
 menutrans Sp&lit-Open\.\.\.:sp	Otevrit\ v\ no&vem\ okne\.\.\.:sp
+menutrans Open\ Tab\.\.\.:tabnew	Otevrit\ tab\.\.\.:tabnew
 menutrans &New:enew		&Novy:enew
 menutrans &Close:close		&Zavrit:close
 menutrans &Save:w			&Ulozit:w
 menutrans Save\ &As\.\.\.:sav	Ulozit\ &jako\.\.\.:sav
-menutrans Split\ &Diff\ with\.\.\.	Rozdelit\ okno\ -\ &Diff\.\.\.
-menutrans Split\ Patched\ &By\.\.\.	Rozdelit\ okno\ -\ &Patch\.\.\.
-menutrans &Print			&Tisk
-menutrans Sa&ve-Exit:wqa		U&lozit\ -\ Konec:wqa
-menutrans E&xit:qa			&Konec:qa
+if has("printer") || has("unix")
+   menutrans &Print			&Tisk
+endif
+menutrans Sa&ve-Exit:wqa		U&lozit\ a\ ukoncit:wqa
+menutrans E&xit:qa			&Ukoncit:qa
+
+if has("diff")
+   menutrans Split\ &Diff\ with\.\.\.	Rozdelit\ okno\ -\ &Diff\.\.\.
+   menutrans Split\ Patched\ &By\.\.\.	Rozdelit\ okno\ -\ &Patch\.\.\.
+endif
 " }}}
 
 " {{{ Edit menu
@@ -37,24 +45,32 @@ menutrans &Copy"+y			&Kopirovat"+y
 menutrans &Paste"+gP		V&lozit"+gP
 menutrans Put\ &Before[p		Vlozit\ &pred[p
 menutrans Put\ &After]p		Vlozi&t\ za]p
-menutrans &Deletex			&Smazatx
+if has("win32") || has("win16")
+   menutrans &Deletex			&Smazatx
+endif
 menutrans &Select\ AllggVG		Vy&brat\ vseggVG
-menutrans &Find\.\.\.			&Hledat\.\.\.
-menutrans Find\ and\ Rep&lace\.\.\.	&Nahradit\.\.\.
-menutrans Options\.\.\.			Volb&y\.\.\.
+if has("win32")  || has("win16") || has("gui_gtk") || has("gui_kde") || has("gui_motif")
+   menutrans &Find\.\.\.			&Hledat\.\.\.
+   menutrans Find\ and\ Rep&lace\.\.\.	&Nahradit\.\.\.
+else
+   menutrans Find/ &Hledat/
+   menutrans Find\ and\ Rep&lace:%s  &Nahradit:%s
+   menutrans Find\ and\ Rep&lace:s   &Nahradit:s
+endif
 menutrans Settings\ &Window		Nastav&eni\ okna
-	" {{{2 Edit -1
+" {{{2 Edit -1
+menutrans Startup\ &Settings  Pocatecni\ &nastaveni
 menutrans &Global\ Settings				&Globalni\ nastaveni
 menutrans Toggle\ Pattern\ &Highlight:set\ hls!	&Prepnout\ zvyrazneni\ vzoru:set\ hls!
 menutrans Toggle\ &Ignore-case:set\ ic!		Prepnout\ ignorovani\ &VERZALEK:set\ ic!
 menutrans Toggle\ &Showmatch:set\ sm!		Prepnout\ &Showmatch\ \{\(\[\])\}:set\ sm!
 menutrans &Context\ lines				Zobrazit\ konte&xt\ kurzoru
 menutrans &Virtual\ Edit				Virtualni\ p&ozice\ kurzoru
-	menutrans Never						Nikdy
-	menutrans Block\ Selection				Vyber\ Bloku
-	menutrans Insert\ mode					Insert\ mod
-	menutrans Block\ and\ Insert				Blok\ a\ Insert
-	menutrans Always					Vzdycky
+menutrans Never						Nikdy
+menutrans Block\ Selection				Vyber\ Bloku
+menutrans Insert\ mode					Insert\ mod
+menutrans Block\ and\ Insert				Blok\ a\ Insert
+menutrans Always					Vzdycky
 menutrans Toggle\ Insert\ &Mode:set\ im!		Prepnout\ Insert\ mo&d:set\ im!
 menutrans Toggle\ Vi\ C&ompatible:set\ cp!		Prepnout\ kompatibilni\ rezim\ s\ 'vi':set\ cp!
 menutrans Search\ &Path\.\.\.				Nastavit\ &cestu\ k\ prohledavani\.\.\.
@@ -63,9 +79,10 @@ menutrans Toggle\ &Toolbar				Prepnout\ &Toolbar
 menutrans Toggle\ &Bottom\ Scrollbar			Pr&epnout\ dolni\ rolovaci\ listu
 menutrans Toggle\ &Left\ Scrollbar			Prepnout\ &levou\ rolovaci\ listu
 menutrans Toggle\ &Right\ Scrollbar			Prepnout\ p&ravou\ rolovaci\ listu
-	" {{{2 Edit -2
+" {{{2 Edit -2
 menutrans F&ile\ Settings				Nastaveni\ so&uboru
 menutrans Toggle\ Line\ &Numbering:set\ nu!	Prepnout\ cislovani\ ra&dku:set\ nu!
+menutrans Toggle\ relati&ve\ Line\ Numbering:set\ rnu! Prepnout\ relativni\ cislovani\ ra&dku:set\ rnu!
 menutrans Toggle\ &List\ Mode:set\ list!		Prepnout\ &List\ mod:set\ list!
 menutrans Toggle\ Line\ &Wrap:set\ wrap!		Prepnout\ zala&movani\ radku:set\ wrap!
 menutrans Toggle\ W&rap\ at\ word:set\ lbr!	Prepnout\ zl&om\ ve\ slove:set\ lbr!
@@ -76,10 +93,12 @@ menutrans &Shiftwidth					Nastav&it\ sirku\ od&sazeni
 menutrans Soft\ &Tabstop				Nastavit\ Soft\ &Tabstop
 menutrans Te&xt\ Width\.\.\.				Sirka\ te&xtu\.\.\.
 menutrans &File\ Format\.\.\.				&Format\ souboru\.\.\.
-	" {{{2 Edit -3
+" {{{2 Edit -3
 menutrans C&olor\ Scheme		Barevne\ s&chema
 menutrans &Keymap			Klavesova\ m&apa
-menutrans Select\ Fo&nt\.\.\.		Vybrat\ pis&mo\.\.\.
+if has("win32") || has("win16") || has("gui_motif") || has("gui_gtk") || has("gui_kde") || has("gui_photon") || has("gui_mac")
+   menutrans Select\ Fo&nt\.\.\.		Vybrat\ pis&mo\.\.\.
+endif
 " }}}1
 
 " {{{ Programming menu
@@ -88,46 +107,52 @@ menutrans &Jump\ to\ this\ tagg^]	&Skocit\ na\ tagg^]
 menutrans Jump\ &back^T		Skocit\ &zpet^T
 menutrans Build\ &Tags\ File		&Vytvorit\ soubor\ tagu
 
-menutrans &Spelling			&Kontrola\ pravopisu
-menutrans &Spell\ Check\ On		Kontrola\ pravopisu\ &zapnuta
-menutrans Spell\ Check\ &Off		Kontrola\ pravopisu\ &vypnuta
-menutrans To\ Next\ error]s	&Dalsi\ chyba]s
-menutrans To\ Previous\ error[s	&Predchozi\ chyba[s
-menutrans Suggest\ Correctionsz?	&Navrh\ opravz?
-menutrans Repeat\ correction:spellrepall	Zopakovat\ &opravu:spellrepall
-menutrans Set\ language\ to\ "en"	Nastav\ jazyk\ na\ "en"
-menutrans Set\ language\ to\ "en_au"	Nastav\ jazyk\ na\ "en_au"
-menutrans Set\ language\ to\ "en_ca"	Nastav\ jazyk\ na\ "en_ca"
-menutrans Set\ language\ to\ "en_gb"	Nastav\ jazyk\ na\ "en_gb"
-menutrans Set\ language\ to\ "en_nz"	Nastav\ jazyk\ na\ "en_nz"
-menutrans Set\ language\ to\ "en_us"	Nastav\ jazyk\ na\ "en_us"
-menutrans Set\ language\ to\ "cz"	Nastav\ jazyk\ na\ "cz"
-menutrans Set\ language\ to\ "cs_cz"	Nastav\ jazyk\ na\ "cs_cz"
-menutrans &Find\ More\ Languages	Nalezt\ dalsi\ &jazyky
+if has("spell")
+   menutrans &Spelling			&Kontrola\ pravopisu
+   menutrans &Spell\ Check\ On		&Zapnout\ kontrolu\ pravopisu
+   menutrans Spell\ Check\ &Off		&Vypnout \kontrolu\ pravopisu
+   menutrans To\ &Next\ error]s	&Dalsi\ chyba]s
+   menutrans To\ &Previous\ error[s	&Predchozi\ chyba[s
+   menutrans Suggest\ &Correctionsz=	&Navrhnout\ opravyz=
+   menutrans &Repeat\ correction:spellrepall	Zopakovat\ &opravu:spellrepall
+   menutrans Set\ language\ to\ "en"	Nastavit\ jazyk\ na\ "en"
+   menutrans Set\ language\ to\ "en_au"	Nastavit\ jazyk\ na\ "en_au"
+   menutrans Set\ language\ to\ "en_ca"	Nastavit\ jazyk\ na\ "en_ca"
+   menutrans Set\ language\ to\ "en_gb"	Nastavit\ jazyk\ na\ "en_gb"
+   menutrans Set\ language\ to\ "en_nz"	Nastavit\ jazyk\ na\ "en_nz"
+   menutrans Set\ language\ to\ "en_us"	Nastavit\ jazyk\ na\ "en_us"
+   menutrans &Find\ More\ Languages	Nalezt\ dalsi\ &jazyky
+   let g:menutrans_set_lang_to = "Nastavit jazyk na"
+endif
+
+if has("Folding")   
+   menutrans &Folding			&Skladani
+   menutrans &Enable/Disable\ foldszi &Ano/Nezi
+   menutrans &View\ Cursor\ Linezv	Zobrazit\ radek\ &kurzoruzv
+   menutrans Vie&w\ Cursor\ Line\ onlyzMzx		Zobrazit\ &pouze\ radek\ kurzoru\ zMzx
+   menutrans C&lose\ more\ foldszm	Slozit\ &jednu\ uroven\ skladuzm
+   menutrans &Close\ all\ foldszM	Slozit\ vsechny\ skladyzM
+   menutrans O&pen\ more\ foldszr	Pridat\ jednu\ uroven\ skladuzr
+   menutrans &Open\ all\ foldszR	&Otevrit\ vsechny\ skladyzR
+   menutrans Fold\ Met&hod			&Metoda\ skladani
+   menutrans M&anual			&Rucne
+   menutrans I&ndent			&Odsazeni
+   menutrans E&xpression	&Vyraz
+   menutrans S&yntax			&Syntaxe
+   menutrans &Diff			&Rozdily
+   menutrans Ma&rker			&Znacky
+   menutrans Create\ &Foldzf		Vytvorit\ &skladzf
+   menutrans &Delete\ Foldzd		Vymazat\ skla&dzd
+   menutrans Delete\ &All\ FoldszD	Vymazat\ vsechny\ skladyzD
+   menutrans Fold\ col&umn\ width		Sloupec\ zob&razeni\ skladu
+endif
 
-menutrans &Folding			&Foldy
-menutrans &Enable/Disable\ foldszi &Ano/Nezi
-menutrans &View\ Cursor\ Linezv	&Zobrazit\ radek\ kurzoruzv
-menutrans Vie&w\ Cursor\ Line\ onlyzMzx		Zo&brazit\ pouze\ radek\ kurzoru\ zMzx
-menutrans C&lose\ more\ foldszm	&Vyjmout\ jednu\ uroven\ folduzm
-menutrans &Close\ all\ foldszM	Zavri&t\ vsechny\ foldyzM
-menutrans O&pen\ more\ foldszr	Pridat\ jedn&u\ uroven\ folduzr
-menutrans &Open\ all\ foldszR	&Otevrit\ vsechny\ foldyzR
-menutrans Fold\ Met&hod			Metoda\ &skladani
-	"menutrans M&anual			&Rucne
-	"menutrans I&ndent			&Odsazeni
-	"menutrans E&xpression			&Vyraz
-	"menutrans S&yntax			&Syntax
-	"menutrans &Diff			&Diff
-	"menutrans Ma&rker			Ma&rker
-menutrans Create\ &Foldzf		Vytvorit\ &foldzf
-menutrans &Delete\ Foldzd		Vymazat\ fol&dzd
-menutrans Delete\ &All\ FoldszD	V&ymazat\ vsechny\ foldyzD
-menutrans Fold\ col&umn\ width		Sloupec\ zob&razeni\ foldu
+if has("diff")
+   menutrans &Update			&Obnovit
+   menutrans &Get\ Block			&Sejmout\ Blok
+   menutrans &Put\ Block			&Vlozit\ Blok
+endif
 
-menutrans &Update			&Obnovit
-menutrans &Get\ Block			&Sejmout\ Blok
-menutrans &Put\ Block			&Vlozit\ Blok
 menutrans &Make:make		&Make:make
 menutrans &List\ Errors:cl		Vypis\ &chyb:cl
 menutrans L&ist\ Messages:cl!	Vyp&is\ zprav:cl!
@@ -140,7 +165,7 @@ menutrans SeT\ Compiler			Nas&taveni\ kompilatoru
 menutrans &Update:cwin		O&bnovit:cwin
 menutrans &Open:copen		&Otevrit:copen
 menutrans &Close:cclose		&Zavrit:cclose
-menutrans &Set\ Compiler		N&astavit\ kompilator
+menutrans Se&T\ Compiler		N&astavit\ kompilator
 
 menutrans &Convert\ to\ HEX:%!xxd	Prevest\ do\ sestnactkoveho\ format&u:%!xxd
 menutrans Conve&rt\ back:%!xxd\ -r Pr&evest\ zpet:%!xxd\ -r
@@ -168,7 +193,6 @@ menutrans &Delete		Z&rusit
 menutrans &Alternate		&Zmenit
 menutrans &Next			&Dalsi
 menutrans &Previous		&Predchozi
-menutrans [No\ File]		[Zadny\ soubor]
 " }}}
 
 " {{{ Menu Window
@@ -219,6 +243,8 @@ menutrans &Paste		&Vlozit
 menutrans &Delete		&Smazat
 menutrans Select\ Blockwise	Vybrat\ blokove
 menutrans Select\ &Word		Vybrat\ &slovo
+menutrans Select\ Pa&ragraph Vybrat\ &odstavec
+menutrans Select\ &Sentence   Vybrat\ ve&tu
 menutrans Select\ &Line		Vybrat\ &radek
 menutrans Select\ &Block	Vybrat\ &blok
 menutrans Select\ &All		Vybrat\ &vse
@@ -226,42 +252,57 @@ menutrans Select\ &All		Vybrat\ &vse
 
 " {{{ The GUI toolbar
 if has("toolbar")
-  if exists("*Do_toolbar_tmenu")
-    delfun Do_toolbar_tmenu
-  endif
-  fun Do_toolbar_tmenu()
-    tmenu ToolBar.Open		Otevrit soubor
-    tmenu ToolBar.Save		Ulozit soubor
-    tmenu ToolBar.SaveAll		Ulozit vsechny soubory
-    tmenu ToolBar.Print		Tisk
-    tmenu ToolBar.Undo		Zpet
-    tmenu ToolBar.Redo		Zrusit vraceni
-    tmenu ToolBar.Cut		Vyriznout
-    tmenu ToolBar.Copy		Kopirovat
-    tmenu ToolBar.Paste		Vlozit
-    tmenu ToolBar.Find		Hledat...
-    tmenu ToolBar.FindNext	Hledat dalsi
-    tmenu ToolBar.FindPrev	Hledat predchozi
-    tmenu ToolBar.Replace		Nahradit...
-    if 0	" disabled; These are in the Windows menu
-      tmenu ToolBar.New		Nove okno
-      tmenu ToolBar.WinSplit	Rozdelit okno
-      tmenu ToolBar.WinMax		Maximalizovat okno
-      tmenu ToolBar.WinMin		Minimalizovat okno
-      tmenu ToolBar.WinClose	Zavrit okno
-    endif
-    tmenu ToolBar.LoadSesn	Nacist sezeni
-    tmenu ToolBar.SaveSesn	Ulozit sezeni
-    tmenu ToolBar.RunScript	Spustit skript
-    tmenu ToolBar.Make		Spustit make
-    tmenu ToolBar.Shell		Spustit shell
-    tmenu ToolBar.RunCtags	Spustit ctags
-    tmenu ToolBar.TagJump		Skocit na tag pod kurzorem
-    tmenu ToolBar.Help		Napoveda
-    tmenu ToolBar.FindHelp	Hledat napovedu k...
-  endfun
+   if exists("*Do_toolbar_tmenu")
+      delfun Do_toolbar_tmenu
+   endif
+   fun Do_toolbar_tmenu()
+      tmenu ToolBar.Open		Otevrit soubor
+      tmenu ToolBar.Save		Ulozit soubor
+      tmenu ToolBar.SaveAll		Ulozit vsechny soubory
+      if has("printer") || has("unix")
+         tmenu ToolBar.Print		Tisk
+      endif
+      tmenu ToolBar.Undo		Zpet
+      tmenu ToolBar.Redo		Zrusit vraceni
+      tmenu ToolBar.Cut		Vyriznout
+      tmenu ToolBar.Copy		Kopirovat
+      tmenu ToolBar.Paste		Vlozit
+      tmenu ToolBar.Find		Hledat...
+      tmenu ToolBar.FindNext	Hledat dalsi
+      tmenu ToolBar.FindPrev	Hledat predchozi
+      tmenu ToolBar.Replace		Nahradit...
+      if 0	" disabled; These are in the Windows menu
+         tmenu ToolBar.New		Nove okno
+         tmenu ToolBar.WinSplit	Rozdelit okno
+         tmenu ToolBar.WinMax		Maximalizovat okno
+         tmenu ToolBar.WinMin		Minimalizovat okno
+         tmenu ToolBar.WinClose	Zavrit okno
+      endif
+      tmenu ToolBar.LoadSesn	Nacist sezeni
+      tmenu ToolBar.SaveSesn	Ulozit sezeni
+      tmenu ToolBar.RunScript	Spustit skript
+      tmenu ToolBar.Make		Spustit make
+      tmenu ToolBar.Shell		Spustit shell
+      tmenu ToolBar.RunCtags	Spustit ctags
+      tmenu ToolBar.TagJump		Skocit na tag pod kurzorem
+      tmenu ToolBar.Help		Napoveda
+      tmenu ToolBar.FindHelp	Hledat napovedu k...
+   endfun
 endif
 " }}}
 
+" {{{ DIALOG TEXTS
+let g:menutrans_no_file = "[Zadny soubor]"
+let g:menutrans_help_dialog = "Zadejte hledany prikaz nebo slovo:\n\n\tPridejte i_ pro prikazy vkladaciho rezimu (napr. i_CTRL-X)\n\tPridejte c_ pro prikazy prikazove radky (napr. c_)\n\tPridejte ' pro jmeno volby (napr. 'shiftwidth')"
+let g:menutrans_path_dialog = "Zadejte cesty pro vyhledavani souboru. Jednotlive cesty oddelte carkou"
+let g:menutrans_tags_dialog = "Zadejte jmena souboru s tagy. Jmena oddelte carkami."
+let g:menutrans_textwidth_dialog = "Zadejte delku radku (0 pro zakazani formatovani):"
+let g:menutrans_fileformat_dialog = "Vyberte typ konce radku"
+" }}}" 
+
 let &cpo = s:keepcpo
 unlet s:keepcpo
+
+
+
+" vim:set foldmethod=marker expandtab tabstop=3 shiftwidth=3:
diff --git a/runtime/lang/menu_ja_jp.euc-jp.vim b/runtime/lang/menu_ja_jp.euc-jp.vim
index 23a00930bc..ba622a6a3e 100644
--- a/runtime/lang/menu_ja_jp.euc-jp.vim
+++ b/runtime/lang/menu_ja_jp.euc-jp.vim
@@ -2,9 +2,9 @@
 "
 " Menu Translations:	Japanese (EUC-JP)
 " Translated By:	MURAOKA Taro  
-" Last Change:		15-Jun-2012.
+" Last Change:		12-May-2013.
 "
-" Copyright (C) 2001-12 MURAOKA Taro 
+" Copyright (C) 2001-13 MURAOKA Taro 
 " THIS FILE IS DISTRIBUTED UNDER THE VIM LICENSE.
 
 " Quit when menu translations have already been done.
@@ -241,6 +241,8 @@ menutrans &Paste		Ž
 menutrans &Delete		ºï½ü(&D)
 menutrans Select\ Blockwise	¶ë·Á¥Ö¥í¥Ã¥¯ÁªÂò
 menutrans Select\ &Word		ñ¸ìÁªÂò(&W)
+menutrans Select\ &Sentence	ʸÁªÂò(&S)
+menutrans Select\ Pa&ragraph	ÃÊÍîÁªÂò(&R)
 menutrans Select\ &Line		¹ÔÁªÂò(&L)
 menutrans Select\ &Block	¥Ö¥í¥Ã¥¯ÁªÂò(&B)
 menutrans Select\ &All		¤¹¤Ù¤ÆÁªÂò(&A)
@@ -297,48 +299,6 @@ menutrans Co&lor\ test		
 menutrans &Highlight\ test	¥Ï¥¤¥é¥¤¥È¥Æ¥¹¥È(&H)
 menutrans &Convert\ to\ HTML	HTML¤Ø¥³¥ó¥Ð¡¼¥È(&C)
 
-" Japanese specific menu
-" À®ÈݤÏiconv¼¡Â衢ɬ¤º¤·¤â»ØÄꤷ¤¿¥¨¥ó¥³¡¼¥É¤Ë¤Ê¤ë¤ï¤±¤Ç¤Ï¤Ê¤¤¤³¤È¤ËÃí°Õ
-if has('iconv')
-  " iconv¤Î¥Ð¡¼¥¸¥ç¥óȽÄê
-  let support_jisx0213 = (iconv("\x87\x64\x87\x6a", 'cp932', 'euc-jisx0213') ==# "\xad\xc5\xad\xcb") ? 1 : 0
-  "
-  " Æɤ߹þ¤ß
-  an 10.395 &File.-SEPICONV- 
-  an 10.396.100.100 &File.¥¨¥ó¥³¡¼¥É»ØÄê(&E)\.\.\..³«¤¯(&O)\.\.\..SJIS(&S)fenc=cp932 :browse confirm e ++enc=cp932
-  if !support_jisx0213
-    an 10.396.100.110 &File.¥¨¥ó¥³¡¼¥É»ØÄê(&E)\.\.\..³«¤¯(&O)\.\.\..EUC(&E)fenc=euc-jp :browse confirm e ++enc=euc-jp
-    an 10.396.100.120 &File.¥¨¥ó¥³¡¼¥É»ØÄê(&E)\.\.\..³«¤¯(&O)\.\.\..JIS(&J)fenc=iso-2022-jp :browse confirm e ++enc=iso-2022-jp
-  else
-    an 10.396.100.110 &File.¥¨¥ó¥³¡¼¥É»ØÄê(&E)\.\.\..³«¤¯(&O)\.\.\..EUC(&E)fenc=euc-jisx0213 :browse confirm e ++enc=euc-jisx0213
-    an 10.396.100.120 &File.¥¨¥ó¥³¡¼¥É»ØÄê(&E)\.\.\..³«¤¯(&O)\.\.\..JIS(&J)fenc=iso-2022-jp-3 :browse confirm e ++enc=iso-2022-jp-3
-  endif
-  an 10.396.100.130 &File.¥¨¥ó¥³¡¼¥É»ØÄê(&E)\.\.\..³«¤¯(&O)\.\.\..UTF-8(&8)fenc=utf-8 :browse confirm e ++enc=utf-8
-
-  " ºÆÆɹþ
-  an 10.396.110.100 &File.¥¨¥ó¥³¡¼¥É»ØÄê(&E)\.\.\..ºÆÆɹþ(&R)\.\.\..SJIS(&S)fenc=cp932 :e ++enc=cp932
-  if !support_jisx0213
-    an 10.396.110.110 &File.¥¨¥ó¥³¡¼¥É»ØÄê(&E)\.\.\..ºÆÆɹþ(&R)\.\.\..EUC(&E)fenc=euc-jp :e ++enc=euc-jp
-    an 10.396.110.120 &File.¥¨¥ó¥³¡¼¥É»ØÄê(&E)\.\.\..ºÆÆɹþ(&R)\.\.\..JIS(&J)fenc=iso-2022-jp :e ++enc=iso-2022-jp
-  else
-    an 10.396.110.110 &File.¥¨¥ó¥³¡¼¥É»ØÄê(&E)\.\.\..ºÆÆɹþ(&R)\.\.\..EUC(&E)fenc=euc-jisx0213 :e ++enc=euc-jisx0213
-    an 10.396.110.120 &File.¥¨¥ó¥³¡¼¥É»ØÄê(&E)\.\.\..ºÆÆɹþ(&R)\.\.\..JIS(&J)fenc=iso-2022-jp-3 :e ++enc=iso-2022-jp-3
-  endif
-  an 10.396.110.130 &File.¥¨¥ó¥³¡¼¥É»ØÄê(&E)\.\.\..ºÆÆɹþ(&R)\.\.\..UTF-8(&8)fenc=utf-8 :e ++enc=utf-8
-
-  " Êݸ
-  an 10.396.115 &File.¥¨¥ó¥³¡¼¥É»ØÄê(&E)\.\.\..-SEP1- 
-  an 10.396.120.100 &File.¥¨¥ó¥³¡¼¥É»ØÄê(&E)\.\.\..Êݸ(&S)\.\.\..SJIS(&S)fenc=cp932 :set fenc=cp932 \| w
-  if !support_jisx0213
-    an 10.396.120.110 &File.¥¨¥ó¥³¡¼¥É»ØÄê(&E)\.\.\..Êݸ(&S)\.\.\..EUC(&E)fenc=euc-jp :set fenc=euc-jp \| w
-    an 10.396.120.120 &File.¥¨¥ó¥³¡¼¥É»ØÄê(&E)\.\.\..Êݸ(&S)\.\.\..JIS(&J)fenc=iso-2022-jp :set fenc=iso-2022-jp \| w
-  else
-    an 10.396.120.110 &File.¥¨¥ó¥³¡¼¥É»ØÄê(&E)\.\.\..Êݸ(&S)\.\.\..EUC(&E)fenc=euc-jisx0213 :set fenc=euc-jisx0213 \| w
-    an 10.396.120.120 &File.¥¨¥ó¥³¡¼¥É»ØÄê(&E)\.\.\..Êݸ(&S)\.\.\..JIS(&J)fenc=iso-2022-jp-3 :set fenc=iso-2022-jp-3 \| w
-  endif
-  an 10.396.120.130 &File.¥¨¥ó¥³¡¼¥É»ØÄê(&E)\.\.\..Êݸ(&S)\.\.\..UTF-8(&8)fenc=utf-8 :set fenc=utf-8 \| w
-endif
-
 let &cpo = s:keepcpo
 unlet s:keepcpo
 
diff --git a/runtime/lang/menu_ja_jp.utf-8.vim b/runtime/lang/menu_ja_jp.utf-8.vim
index 2638c3c1b1..7c3431d0f3 100644
--- a/runtime/lang/menu_ja_jp.utf-8.vim
+++ b/runtime/lang/menu_ja_jp.utf-8.vim
@@ -2,9 +2,9 @@
 "
 " Menu Translations:	Japanese (UTF-8)
 " Translated By:	MURAOKA Taro  
-" Last Change:		15-Jun-2012.
+" Last Change:		12-May-2013.
 "
-" Copyright (C) 2001-12 MURAOKA Taro 
+" Copyright (C) 2001-13 MURAOKA Taro 
 " THIS FILE IS DISTRIBUTED UNDER THE VIM LICENSE.
 
 " Quit when menu translations have already been done.
@@ -241,6 +241,8 @@ menutrans &Paste		貼り付ã‘(&P)
 menutrans &Delete		削除(&D)
 menutrans Select\ Blockwise	矩形ブロックé¸æŠž
 menutrans Select\ &Word		å˜èªžé¸æŠž(&W)
+menutrans Select\ &Sentence	æ–‡é¸æŠž(&S)
+menutrans Select\ Pa&ragraph	段è½é¸æŠž(&R)
 menutrans Select\ &Line		è¡Œé¸æŠž(&L)
 menutrans Select\ &Block	ブロックé¸æŠž(&B)
 menutrans Select\ &All		ã™ã¹ã¦é¸æŠž(&A)
@@ -297,48 +299,6 @@ menutrans Co&lor\ test		カラーテスト(&L)
 menutrans &Highlight\ test	ãƒã‚¤ãƒ©ã‚¤ãƒˆãƒ†ã‚¹ãƒˆ(&H)
 menutrans &Convert\ to\ HTML	HTMLã¸ã‚³ãƒ³ãƒãƒ¼ãƒˆ(&C)
 
-" Japanese specific menu
-" æˆå¦ã¯iconv次第ã€å¿…ãšã—も指定ã—ãŸã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã«ãªã‚‹ã‚ã‘ã§ã¯ãªã„ã“ã¨ã«æ³¨æ„
-if has('iconv')
-  " iconvã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³åˆ¤å®š
-  let support_jisx0213 = (iconv("\x87\x64\x87\x6a", 'cp932', 'euc-jisx0213') ==# "\xad\xc5\xad\xcb") ? 1 : 0
-  "
-  " 読ã¿è¾¼ã¿
-  an 10.395 &File.-SEPICONV- 
-  an 10.396.100.100 &File.エンコード指定(&E)\.\.\..é–‹ã(&O)\.\.\..SJIS(&S)fenc=cp932 :browse confirm e ++enc=cp932
-  if !support_jisx0213
-    an 10.396.100.110 &File.エンコード指定(&E)\.\.\..é–‹ã(&O)\.\.\..EUC(&E)fenc=euc-jp :browse confirm e ++enc=euc-jp
-    an 10.396.100.120 &File.エンコード指定(&E)\.\.\..é–‹ã(&O)\.\.\..JIS(&J)fenc=iso-2022-jp :browse confirm e ++enc=iso-2022-jp
-  else
-    an 10.396.100.110 &File.エンコード指定(&E)\.\.\..é–‹ã(&O)\.\.\..EUC(&E)fenc=euc-jisx0213 :browse confirm e ++enc=euc-jisx0213
-    an 10.396.100.120 &File.エンコード指定(&E)\.\.\..é–‹ã(&O)\.\.\..JIS(&J)fenc=iso-2022-jp-3 :browse confirm e ++enc=iso-2022-jp-3
-  endif
-  an 10.396.100.130 &File.エンコード指定(&E)\.\.\..é–‹ã(&O)\.\.\..UTF-8(&8)fenc=utf-8 :browse confirm e ++enc=utf-8
-
-  " å†èª­è¾¼
-  an 10.396.110.100 &File.エンコード指定(&E)\.\.\..å†èª­è¾¼(&R)\.\.\..SJIS(&S)fenc=cp932 :e ++enc=cp932
-  if !support_jisx0213
-    an 10.396.110.110 &File.エンコード指定(&E)\.\.\..å†èª­è¾¼(&R)\.\.\..EUC(&E)fenc=euc-jp :e ++enc=euc-jp
-    an 10.396.110.120 &File.エンコード指定(&E)\.\.\..å†èª­è¾¼(&R)\.\.\..JIS(&J)fenc=iso-2022-jp :e ++enc=iso-2022-jp
-  else
-    an 10.396.110.110 &File.エンコード指定(&E)\.\.\..å†èª­è¾¼(&R)\.\.\..EUC(&E)fenc=euc-jisx0213 :e ++enc=euc-jisx0213
-    an 10.396.110.120 &File.エンコード指定(&E)\.\.\..å†èª­è¾¼(&R)\.\.\..JIS(&J)fenc=iso-2022-jp-3 :e ++enc=iso-2022-jp-3
-  endif
-  an 10.396.110.130 &File.エンコード指定(&E)\.\.\..å†èª­è¾¼(&R)\.\.\..UTF-8(&8)fenc=utf-8 :e ++enc=utf-8
-
-  " ä¿å­˜
-  an 10.396.115 &File.エンコード指定(&E)\.\.\..-SEP1- 
-  an 10.396.120.100 &File.エンコード指定(&E)\.\.\..ä¿å­˜(&S)\.\.\..SJIS(&S)fenc=cp932 :set fenc=cp932 \| w
-  if !support_jisx0213
-    an 10.396.120.110 &File.エンコード指定(&E)\.\.\..ä¿å­˜(&S)\.\.\..EUC(&E)fenc=euc-jp :set fenc=euc-jp \| w
-    an 10.396.120.120 &File.エンコード指定(&E)\.\.\..ä¿å­˜(&S)\.\.\..JIS(&J)fenc=iso-2022-jp :set fenc=iso-2022-jp \| w
-  else
-    an 10.396.120.110 &File.エンコード指定(&E)\.\.\..ä¿å­˜(&S)\.\.\..EUC(&E)fenc=euc-jisx0213 :set fenc=euc-jisx0213 \| w
-    an 10.396.120.120 &File.エンコード指定(&E)\.\.\..ä¿å­˜(&S)\.\.\..JIS(&J)fenc=iso-2022-jp-3 :set fenc=iso-2022-jp-3 \| w
-  endif
-  an 10.396.120.130 &File.エンコード指定(&E)\.\.\..ä¿å­˜(&S)\.\.\..UTF-8(&8)fenc=utf-8 :set fenc=utf-8 \| w
-endif
-
 let &cpo = s:keepcpo
 unlet s:keepcpo
 
diff --git a/runtime/lang/menu_japanese_japan.932.vim b/runtime/lang/menu_japanese_japan.932.vim
index fc030134e5..7b775cb2cc 100644
--- a/runtime/lang/menu_japanese_japan.932.vim
+++ b/runtime/lang/menu_japanese_japan.932.vim
@@ -2,9 +2,9 @@
 "
 " Menu Translations:	Japanese (CP932)
 " Translated By:	MURAOKA Taro  
-" Last Change:		15-Jun-2012.
+" Last Change:		12-May-2013.
 "
-" Copyright (C) 2001-12 MURAOKA Taro 
+" Copyright (C) 2001-13 MURAOKA Taro 
 " THIS FILE IS DISTRIBUTED UNDER THE VIM LICENSE.
 
 " Quit when menu translations have already been done.
@@ -241,6 +241,8 @@ menutrans &Paste		
 menutrans &Delete		íœ(&D)
 menutrans Select\ Blockwise	‹éŒ`ƒuƒƒbƒN‘I‘ð
 menutrans Select\ &Word		’PŒê‘I‘ð(&W)
+menutrans Select\ &Sentence	•¶‘I‘ð(&S)
+menutrans Select\ Pa&ragraph	’i—Ž‘I‘ð(&R)
 menutrans Select\ &Line		s‘I‘ð(&L)
 menutrans Select\ &Block	ƒuƒƒbƒN‘I‘ð(&B)
 menutrans Select\ &All		‚·‚ׂđI‘ð(&A)
@@ -297,48 +299,6 @@ menutrans Co&lor\ test		
 menutrans &Highlight\ test	ƒnƒCƒ‰ƒCƒgƒeƒXƒg(&H)
 menutrans &Convert\ to\ HTML	HTML‚ÖƒRƒ“ƒo[ƒg(&C)
 
-" Japanese specific menu
-" ¬”Û‚ÍiconvŽŸ‘æA•K‚¸‚µ‚àŽw’肵‚½ƒGƒ“ƒR[ƒh‚É‚È‚é‚킯‚Å‚Í‚È‚¢‚±‚Æ‚É’ˆÓ
-if has('iconv')
-  " iconv‚̃o[ƒWƒ‡ƒ“”»’è
-  let support_jisx0213 = (iconv("\x87\x64\x87\x6a", 'cp932', 'euc-jisx0213') ==# "\xad\xc5\xad\xcb") ? 1 : 0
-  "
-  " “Ç‚Ýž‚Ý
-  an 10.395 &File.-SEPICONV- 
-  an 10.396.100.100 &File.ƒGƒ“ƒR[ƒhŽw’è(&E)\.\.\..ŠJ‚­(&O)\.\.\..SJIS(&S)fenc=cp932 :browse confirm e ++enc=cp932
-  if !support_jisx0213
-    an 10.396.100.110 &File.ƒGƒ“ƒR[ƒhŽw’è(&E)\.\.\..ŠJ‚­(&O)\.\.\..EUC(&E)fenc=euc-jp :browse confirm e ++enc=euc-jp
-    an 10.396.100.120 &File.ƒGƒ“ƒR[ƒhŽw’è(&E)\.\.\..ŠJ‚­(&O)\.\.\..JIS(&J)fenc=iso-2022-jp :browse confirm e ++enc=iso-2022-jp
-  else
-    an 10.396.100.110 &File.ƒGƒ“ƒR[ƒhŽw’è(&E)\.\.\..ŠJ‚­(&O)\.\.\..EUC(&E)fenc=euc-jisx0213 :browse confirm e ++enc=euc-jisx0213
-    an 10.396.100.120 &File.ƒGƒ“ƒR[ƒhŽw’è(&E)\.\.\..ŠJ‚­(&O)\.\.\..JIS(&J)fenc=iso-2022-jp-3 :browse confirm e ++enc=iso-2022-jp-3
-  endif
-  an 10.396.100.130 &File.ƒGƒ“ƒR[ƒhŽw’è(&E)\.\.\..ŠJ‚­(&O)\.\.\..UTF-8(&8)fenc=utf-8 :browse confirm e ++enc=utf-8
-
-  " Ä“Çž
-  an 10.396.110.100 &File.ƒGƒ“ƒR[ƒhŽw’è(&E)\.\.\..Ä“Çž(&R)\.\.\..SJIS(&S)fenc=cp932 :e ++enc=cp932
-  if !support_jisx0213
-    an 10.396.110.110 &File.ƒGƒ“ƒR[ƒhŽw’è(&E)\.\.\..Ä“Çž(&R)\.\.\..EUC(&E)fenc=euc-jp :e ++enc=euc-jp
-    an 10.396.110.120 &File.ƒGƒ“ƒR[ƒhŽw’è(&E)\.\.\..Ä“Çž(&R)\.\.\..JIS(&J)fenc=iso-2022-jp :e ++enc=iso-2022-jp
-  else
-    an 10.396.110.110 &File.ƒGƒ“ƒR[ƒhŽw’è(&E)\.\.\..Ä“Çž(&R)\.\.\..EUC(&E)fenc=euc-jisx0213 :e ++enc=euc-jisx0213
-    an 10.396.110.120 &File.ƒGƒ“ƒR[ƒhŽw’è(&E)\.\.\..Ä“Çž(&R)\.\.\..JIS(&J)fenc=iso-2022-jp-3 :e ++enc=iso-2022-jp-3
-  endif
-  an 10.396.110.130 &File.ƒGƒ“ƒR[ƒhŽw’è(&E)\.\.\..Ä“Çž(&R)\.\.\..UTF-8(&8)fenc=utf-8 :e ++enc=utf-8
-
-  " •Û‘¶
-  an 10.396.115 &File.ƒGƒ“ƒR[ƒhŽw’è(&E)\.\.\..-SEP1- 
-  an 10.396.120.100 &File.ƒGƒ“ƒR[ƒhŽw’è(&E)\.\.\..•Û‘¶(&S)\.\.\..SJIS(&S)fenc=cp932 :set fenc=cp932 \| w
-  if !support_jisx0213
-    an 10.396.120.110 &File.ƒGƒ“ƒR[ƒhŽw’è(&E)\.\.\..•Û‘¶(&S)\.\.\..EUC(&E)fenc=euc-jp :set fenc=euc-jp \| w
-    an 10.396.120.120 &File.ƒGƒ“ƒR[ƒhŽw’è(&E)\.\.\..•Û‘¶(&S)\.\.\..JIS(&J)fenc=iso-2022-jp :set fenc=iso-2022-jp \| w
-  else
-    an 10.396.120.110 &File.ƒGƒ“ƒR[ƒhŽw’è(&E)\.\.\..•Û‘¶(&S)\.\.\..EUC(&E)fenc=euc-jisx0213 :set fenc=euc-jisx0213 \| w
-    an 10.396.120.120 &File.ƒGƒ“ƒR[ƒhŽw’è(&E)\.\.\..•Û‘¶(&S)\.\.\..JIS(&J)fenc=iso-2022-jp-3 :set fenc=iso-2022-jp-3 \| w
-  endif
-  an 10.396.120.130 &File.ƒGƒ“ƒR[ƒhŽw’è(&E)\.\.\..•Û‘¶(&S)\.\.\..UTF-8(&8)fenc=utf-8 :set fenc=utf-8 \| w
-endif
-
 let &cpo = s:keepcpo
 unlet s:keepcpo
 
diff --git a/runtime/lang/menu_ru_ru.koi8-r.vim b/runtime/lang/menu_ru_ru.koi8-r.vim
index 0d4fbaa2ab..e66b728e7d 100644
--- a/runtime/lang/menu_ru_ru.koi8-r.vim
+++ b/runtime/lang/menu_ru_ru.koi8-r.vim
@@ -1,9 +1,10 @@
 " Menu Translations:	Russian
-" Maintainer:		vassily ragosin 
-" Last Change:		26 Apr 2004
+" Maintainer:		Sergey Alyoshin 
+" Previous Maintainer:	vassily ragosin 
+" Last Change:		29 May 2013
 " URL:			cvs://cvs.sf.net:/cvsroot/ruvim/extras/menu/menu_ru_ru.vim
 "
-" $Id: menu_ru_ru.koi8-r.vim,v 1.2 2004/06/16 11:19:21 vimboss Exp $
+" $Id: menu_ru_ru.vim,v 1.1 2004/06/13 16:09:10 vimboss Exp $
 "
 " Adopted for RuVim project by Vassily Ragosin.
 " First translation: Tim Alexeevsky ,
@@ -50,6 +51,7 @@ menutrans &About			&
 " File menu
 menutrans &Open\.\.\.:e		&ïÔËÒÙÔØ\.\.\.:e
 menutrans Sp&lit-Open\.\.\.:sp	ðÏ&ÄÅÌÉÔØ\ ÏËÎÏ\.\.\.:sp
+menutrans Open\ Tab\.\.\.:tabnew	ïÔËÒÙÔØ\ ×&ËÌÁÄËÕ\.\.\.:tabnew
 menutrans &New:enew		&îÏ×ÙÊ:enew
 menutrans &Close:close		&úÁËÒÙÔØ:close
 "--------------------
@@ -77,51 +79,57 @@ menutrans Put\ &After]p		
 menutrans &Deletex			&õÄÁÌÉÔØx
 menutrans &Select\ AllggVG		÷&ÙÄÅÌÉÔØ\ ×Ó£ggVG
 "--------------------
+" Athena GUI only
+menutrans &Find/			&ðÏÉÓË/
+menutrans Find\ and\ Rep&lace:%s	ðÏÉÓË\ É\ &ÚÁÍÅÎÁ:%s
+" End Athena GUI only
 menutrans &Find\.\.\./		&ðÏÉÓË\.\.\./
 menutrans Find\ and\ Rep&lace\.\.\.	ðÏÉÓË\ É\ &ÚÁÍÅÎÁ\.\.\.
 menutrans Find\ and\ Rep&lace\.\.\.:%s	ðÏÉÓË\ É\ &ÚÁÍÅÎÁ\.\.\.:%s
-menutrans Find\ and\ Rep&lace\.\.\.:s     ðÏÉÓË\ É\ &ÚÁÍÅÎÁ\.\.\.:s
+menutrans Find\ and\ Rep&lace\.\.\.:s	ðÏÉÓË\ É\ &ÚÁÍÅÎÁ\.\.\.:s
 "--------------------
 menutrans Settings\ &Window		ïËÎÏ\ ÎÁÓÔÒÏÊËÉ\ &ÏÐÃÉÊ
+menutrans Startup\ &Settings		îÁÓÔÒÏÊËÉ\ ÚÁÐÕÓ&ËÁ
 menutrans &Global\ Settings		&çÌÏÂÁÌØÎÙÅ\ ÎÁÓÔÒÏÊËÉ
 menutrans F&ile\ Settings		îÁÓÔÒÏÊËÉ\ &ÆÁÊÌÏ×
 menutrans C&olor\ Scheme		&ã×ÅÔÏ×ÁÑ\ ÓÈÅÍÁ
 menutrans &Keymap			òÁÓËÌÁÄËÁ\ ËÌ&Á×ÉÁÔÕÒÙ
 menutrans Select\ Fo&nt\.\.\.		÷ÙÂÏÒ\ &ÛÒÉÆÔÁ\.\.\.
 ">>>----------------- Edit/Global settings
-menutrans Toggle\ Pattern\ &Highlight:set\ hls!	 ðÏÄÓ×ÅÔËÁ\ &ÎÁÊÄÅÎÎÙÈ\ ÓÏÏÔ×ÅÔÓÔ×ÉÊ:set\ hls!
-menutrans Toggle\ &Ignore-case:set\ ic!		 &òÅÇÉÓÔÒÏÎÅÚÁ×ÉÓÉÍÙÊ\ ÐÏÉÓË:set\ ic!
-menutrans Toggle\ &Showmatch:set\ sm!		 ðÏËÁÚÙ×ÁÔØ\ ÐÁÒÎÙÅ\ &ÜÌÅÍÅÎÔÙ:set\ sm!
-menutrans &Context\ lines				 óÔÒ&ÏË\ ×ÏËÒÕÇ\ ËÕÒÓÏÒÁ
-menutrans &Virtual\ Edit				 ÷ÉÒ&ÔÕÁÌØÎÏÅ\ ÒÅÄÁËÔÉÒÏ×ÁÎÉÅ
-menutrans Toggle\ Insert\ &Mode:set\ im!		 òÅÖÉÍ\ &÷ÓÔÁ×ËÉ:set\ im!
-menutrans Toggle\ Vi\ C&ompatible:set\ cp!		 &óÏ×ÍÅÓÔÉÍÏÓÔØ\ Ó\ Vi:set\ cp!
-menutrans Search\ &Path\.\.\.				 &ðÕÔØ\ ÄÌÑ\ ÐÏÉÓËÁ\ ÆÁÊÌÏ×\.\.\.
-menutrans Ta&g\ Files\.\.\.				 æÁÊÌÙ\ &ÍÅÔÏË\.\.\.
-"
-menutrans Toggle\ &Toolbar				 &éÎÓÔÒÕÍÅÎÔÁÌØÎÁÑ\ ÐÁÎÅÌØ
-menutrans Toggle\ &Bottom\ Scrollbar			 ðÏÌÏÓÁ\ ÐÒÏËÒÕÔËÉ\ ×ÎÉ&ÚÕ
-menutrans Toggle\ &Left\ Scrollbar			 ðÏÌÏÓÁ\ ÐÒÏËÒÕÔËÉ\ Ó&ÌÅ×Á
-menutrans Toggle\ &Right\ Scrollbar			 ðÏÌÏÓÁ\ ÐÒÏËÒÕÔËÉ\ ÓÐÒ&Á×Á
+menutrans Toggle\ Pattern\ &Highlight:set\ hls!	ðÏÄÓ×ÅÔËÁ\ &ÎÁÊÄÅÎÎÙÈ\ ÓÏÏÔ×ÅÔÓÔ×ÉÊ:set\ hls!
+menutrans Toggle\ &Ignore-case:set\ ic!		&òÅÇÉÓÔÒÏÎÅÚÁ×ÉÓÉÍÙÊ\ ÐÏÉÓË:set\ ic!
+menutrans Toggle\ &Showmatch:set\ sm!		ðÏËÁÚÙ×ÁÔØ\ ÐÁÒÎÙÅ\ &ÜÌÅÍÅÎÔÙ:set\ sm!
+menutrans &Context\ lines				óÔÒ&ÏË\ ×ÏËÒÕÇ\ ËÕÒÓÏÒÁ
+menutrans &Virtual\ Edit				÷ÉÒ&ÔÕÁÌØÎÏÅ\ ÒÅÄÁËÔÉÒÏ×ÁÎÉÅ
+menutrans Toggle\ Insert\ &Mode:set\ im!		òÅÖÉÍ\ &÷ÓÔÁ×ËÉ:set\ im!
+menutrans Toggle\ Vi\ C&ompatible:set\ cp!		&óÏ×ÍÅÓÔÉÍÏÓÔØ\ Ó\ Vi:set\ cp!
+menutrans Search\ &Path\.\.\.				&ðÕÔØ\ ÄÌÑ\ ÐÏÉÓËÁ\ ÆÁÊÌÏ×\.\.\.
+menutrans Ta&g\ Files\.\.\.				æÁÊÌÙ\ &ÍÅÔÏË\.\.\.
+"
+menutrans Toggle\ &Toolbar				&éÎÓÔÒÕÍÅÎÔÁÌØÎÁÑ\ ÐÁÎÅÌØ
+menutrans Toggle\ &Bottom\ Scrollbar			ðÏÌÏÓÁ\ ÐÒÏËÒÕÔËÉ\ ×ÎÉ&ÚÕ
+menutrans Toggle\ &Left\ Scrollbar			ðÏÌÏÓÁ\ ÐÒÏËÒÕÔËÉ\ Ó&ÌÅ×Á
+menutrans Toggle\ &Right\ Scrollbar			ðÏÌÏÓÁ\ ÐÒÏËÒÕÔËÉ\ ÓÐÒ&Á×Á
 ">>>->>>------------- Edit/Global settings/Virtual edit
-menutrans Never						 ÷ÙËÌÀÞÅÎÏ
-menutrans Block\ Selection				 ðÒÉ\ ×ÙÄÅÌÅÎÉÉ\ ÂÌÏËÁ
-menutrans Insert\ mode					 ÷\ ÒÅÖÉÍÅ\ ÷ÓÔÁ×ËÉ
-menutrans Block\ and\ Insert				 ðÒÉ\ ×ÙÄÅÌÅÎÉÉ\ ÂÌÏËÁ\ É\ ×\ ÒÅÖÉÍÅ\ ÷ÓÔÁ×ËÉ
-menutrans Always					 ÷ËÌÀÞÅÎÏ\ ×ÓÅÇÄÁ
+menutrans Never						÷ÙËÌÀÞÅÎÏ
+menutrans Block\ Selection				ðÒÉ\ ×ÙÄÅÌÅÎÉÉ\ ÂÌÏËÁ
+menutrans Insert\ mode					÷\ ÒÅÖÉÍÅ\ ÷ÓÔÁ×ËÉ
+menutrans Block\ and\ Insert				ðÒÉ\ ×ÙÄÅÌÅÎÉÉ\ ÂÌÏËÁ\ É\ ×\ ÒÅÖÉÍÅ\ ÷ÓÔÁ×ËÉ
+menutrans Always					÷ËÌÀÞÅÎÏ\ ×ÓÅÇÄÁ
 ">>>----------------- Edit/File settings
-menutrans Toggle\ Line\ &Numbering:set\ nu!	 &îÕÍÅÒÁÃÉÑ\ ÓÔÒÏË:set\ nu!
-menutrans Toggle\ &List\ Mode:set\ list!		 ïÔÏÂÒÁ&ÖÅÎÉÅ\ ÎÅ×ÉÄÉÍÙÈ\ ÓÉÍ×ÏÌÏ×:set\ list!
-menutrans Toggle\ Line\ &Wrap:set\ wrap!		 &ðÅÒÅÎÏÓ\ ÄÌÉÎÎÙÈ\ ÓÔÒÏË:set\ wrap!
-menutrans Toggle\ W&rap\ at\ word:set\ lbr!	 ðÅÒÅÎÏÓ\ &ÃÅÌÙÈ\ ÓÌÏ×:set\ lbr!
-menutrans Toggle\ &expand-tab:set\ et!		 ðÒÏ&ÂÅÌÙ\ ×ÍÅÓÔÏ\ ÔÁÂÕÌÑÃÉÉ:set\ et!
-menutrans Toggle\ &auto-indent:set\ ai!		 á×ÔÏÍÁÔÉÞÅÓËÏÅ\ ÆÏÒÍÁÔÉÒÏ×ÁÎÉÅ\ &ÏÔÓÔÕÐÏ×:set\ ai!
-menutrans Toggle\ &C-indenting:set\ cin!		 æÏÒÍÁÔÉÒÏ×ÁÎÉÅ\ ÏÔÓÔÕÐÏ×\ ×\ &ÓÔÉÌÅ\ C:set\ cin!
+menutrans Toggle\ Line\ &Numbering:set\ nu!	&îÕÍÅÒÁÃÉÑ\ ÓÔÒÏË:set\ nu!
+menutrans Toggle\ relati&ve\ Line\ Numbering:set\ rnu!	ïÔÎÏÓÉÔÅ&ÌØÎÁÑ\ ÎÕÍÅÒÁÃÉÑ\ ÓÔÒÏË:set\ nru!
+menutrans Toggle\ &List\ Mode:set\ list!		ïÔÏÂÒÁ&ÖÅÎÉÅ\ ÎÅ×ÉÄÉÍÙÈ\ ÓÉÍ×ÏÌÏ×:set\ list!
+menutrans Toggle\ Line\ &Wrap:set\ wrap!		&ðÅÒÅÎÏÓ\ ÄÌÉÎÎÙÈ\ ÓÔÒÏË:set\ wrap!
+menutrans Toggle\ W&rap\ at\ word:set\ lbr!	ðÅÒÅÎÏÓ\ &ÃÅÌÙÈ\ ÓÌÏ×:set\ lbr!
+menutrans Toggle\ &expand-tab:set\ et!		ðÒÏ&ÂÅÌÙ\ ×ÍÅÓÔÏ\ ÔÁÂÕÌÑÃÉÉ:set\ et!
+menutrans Toggle\ &auto-indent:set\ ai!		á×ÔÏÍÁÔÉÞÅÓËÏÅ\ ÆÏÒÍÁÔÉÒÏ×ÁÎÉÅ\ &ÏÔÓÔÕÐÏ×:set\ ai!
+menutrans Toggle\ &C-indenting:set\ cin!		æÏÒÍÁÔÉÒÏ×ÁÎÉÅ\ ÏÔÓÔÕÐÏ×\ ×\ &ÓÔÉÌÅ\ C:set\ cin!
 ">>>---
-menutrans &Shiftwidth					 ÷ÅÌÉ&ÞÉÎÁ\ ÏÔÓÔÕÐÁ
-menutrans Soft\ &Tabstop				 ûÉÒÉÎÁ\ &ÔÁÂÕÌÑÃÉÉ
-menutrans Te&xt\ Width\.\.\.				 &ûÉÒÉÎÁ\ ÔÅËÓÔÁ\.\.\.
-menutrans &File\ Format\.\.\.				 &æÏÒÍÁÔ\ ÆÁÊÌÁ\.\.\.
+menutrans &Shiftwidth					÷ÅÌÉ&ÞÉÎÁ\ ÏÔÓÔÕÐÁ
+menutrans Soft\ &Tabstop				ûÉÒÉÎÁ\ &ÔÁÂÕÌÑÃÉÉ
+menutrans Te&xt\ Width\.\.\.				&ûÉÒÉÎÁ\ ÔÅËÓÔÁ\.\.\.
+menutrans &File\ Format\.\.\.				&æÏÒÍÁÔ\ ÆÁÊÌÁ\.\.\.
 "
 "
 "
@@ -131,6 +139,7 @@ menutrans Jump\ &back^T				&
 menutrans Build\ &Tags\ File				óÏÚÄÁÔØ\ &ÆÁÊÌ\ ÍÅÔÏË
 "-------------------
 menutrans &Folding					òÁÂÏÔÁ\ ÓÏ\ &ÓËÌÁÄËÁÍÉ
+menutrans &Spelling					ðÒ&Á×ÏÐÉÓÁÎÉÅ
 menutrans &Diff						&ïÔÌÉÞÉÑ\ (diff)
 "-------------------
 menutrans &Make:make				ëÏ&ÍÐÉÌÑÃÉÑ:make
@@ -141,10 +150,26 @@ menutrans &Previous\ Error:cp			
 menutrans &Older\ List:cold			âÏÌÅÅ\ ÓÔÁÒ&ÙÊ\ ÓÐÉÓÏË\ ÏÛÉÂÏË:cold
 menutrans N&ewer\ List:cnew			âÏÌÅÅ\ Ó×Å&ÖÉÊ\ ÓÐÉÓÏË\ ÏÛÉÂÏË:cnew
 menutrans Error\ &Window				ïË&ÎÏ\ ÏÛÉÂÏË
-menutrans &Set\ Compiler				÷ÙÂÏÒ\ &ËÏÍÐÉÌÑÔÏÒÁ
+menutrans Se&T\ Compiler				÷ÙÂÏÒ\ &ËÏÍÐÉÌÑÔÏÒÁ
 "-------------------
 menutrans &Convert\ to\ HEX:%!xxd			ð&ÅÒÅ×ÅÓÔÉ\ ×\ HEX:%!xxd
 menutrans Conve&rt\ back:%!xxd\ -r			ðÅÒÅ×ÅÓÔÉ\ É&Ú\ HEX:%!xxd\ -r
+">>>---------------- Tools/Spelling
+menutrans &Spell\ Check\ On				&÷ËÌ\ ÐÒÏ×ÅÒËÕ\ ÐÒÁ×ÏÐÉÓÁÎÉÑ
+menutrans Spell\ Check\ &Off				÷Ù&ËÌ\ ÐÒÏ×ÅÒËÕ\ ÐÒÁ×ÏÐÉÓÁÎÉÑ
+menutrans To\ &Next\ error]s			&óÌÅÄÕÀÝÁÑ\ ÏÛÉÂËÁ
+menutrans To\ &Previous\ error[s			&ðÒÅÄÙÄÕÝÁÑ\ ÏÛÉÂËÁ
+menutrans Suggest\ &Correctionsz=			ðÒÅÄÌÏÖÉÔØ\ ÉÓÐ&ÒÁ×ÌÅÎÉÑ
+menutrans &Repeat\ correction:spellrepall		ðÏ×&ÔÏÒÉÔØ\ ÉÓÐÒÁ×ÌÅÎÉÅ\ ÄÌÑ\ ×ÓÅÈ
+"-------------------
+menutrans Set\ language\ to\ "en"			õÓÔÁÎÏ×ÉÔØ\ ÑÚÙË\ "en"
+menutrans Set\ language\ to\ "en_au"			õÓÔÁÎÏ×ÉÔØ\ ÑÚÙË\ "en_au"
+menutrans Set\ language\ to\ "en_ca"			õÓÔÁÎÏ×ÉÔØ\ ÑÚÙË\ "en_ca"
+menutrans Set\ language\ to\ "en_gb"			õÓÔÁÎÏ×ÉÔØ\ ÑÚÙË\ "en_gb"
+menutrans Set\ language\ to\ "en_nz"			õÓÔÁÎÏ×ÉÔØ\ ÑÚÙË\ "en_nz"
+menutrans Set\ language\ to\ "en_us"			õÓÔÁÎÏ×ÉÔØ\ ÑÚÙË\ "en_us"
+menutrans &Find\ More\ Languages			&îÁÊÔÉ\ ÂÏÌØÛÅ\ ÑÚÙËÏ×
+let g:menutrans_set_lang_to =				'õÓÔÁÎÏ×ÉÔØ ÑÚÙË'
 ">>>---------------- Folds
 menutrans &Enable/Disable\ foldszi			÷ËÌ/×ÙËÌ\ &ÓËÌÁÄËÉzi
 menutrans &View\ Cursor\ Linezv			ïÔËÒÙÔØ\ ÓÔÒÏËÕ\ Ó\ &ËÕÒÓÏÒÏÍzv
@@ -219,7 +244,7 @@ menutrans M&in\ Height^W1_				
 menutrans Max\ &Width^W\|				íÁËÓÉÍÁÌØÎÁÑ\ &ÛÉÒÉÎÁ^W\|
 menutrans Min\ Widt&h^W1\|				íÉÎÉÍÁÌ&ØÎÁÑ\ ÛÉÒÉÎÁ^W1\|
 ">>>----------------- Window/Move To
-menutrans &Top^WK					îÁ&×ÅÒÈ^WK
+menutrans &Top^WK					÷&×ÅÒÈ^WK
 menutrans &Bottom^WJ				÷&ÎÉÚ^WJ
 menutrans &Left\ side^WH				÷&ÌÅ×Ï^WH
 menutrans &Right\ side^WL				÷&ÐÒÁ×Ï^WL
diff --git a/runtime/lang/menu_ru_ru.vim b/runtime/lang/menu_ru_ru.vim
index 23a111ab75..69616083b0 100644
--- a/runtime/lang/menu_ru_ru.vim
+++ b/runtime/lang/menu_ru_ru.vim
@@ -1,6 +1,7 @@
 " Menu Translations:	Russian
-" Maintainer:		vassily ragosin 
-" Last Change:		26 Apr 2004
+" Maintainer:		Sergey Alyoshin 
+" Previous Maintainer:	vassily ragosin 
+" Last Change:		29 May 2013
 " URL:			cvs://cvs.sf.net:/cvsroot/ruvim/extras/menu/menu_ru_ru.vim
 "
 " $Id: menu_ru_ru.vim,v 1.1 2004/06/13 16:09:10 vimboss Exp $
@@ -50,6 +51,7 @@ menutrans &About			&ЗаÑтавка
 " File menu
 menutrans &Open\.\.\.:e		&Открыть\.\.\.:e
 menutrans Sp&lit-Open\.\.\.:sp	По&делить\ окно\.\.\.:sp
+menutrans Open\ Tab\.\.\.:tabnew	Открыть\ в&кладку\.\.\.:tabnew
 menutrans &New:enew		&Ðовый:enew
 menutrans &Close:close		&Закрыть:close
 "--------------------
@@ -77,51 +79,57 @@ menutrans Put\ &After]p		Вклеить\ по&Ñле]p
 menutrans &Deletex			&Удалитьx
 menutrans &Select\ AllggVG		Ð’&ыделить\ вÑÑ‘ggVG
 "--------------------
+" Athena GUI only
+menutrans &Find/			&ПоиÑк/
+menutrans Find\ and\ Rep&lace:%s	ПоиÑк\ и\ &замена:%s
+" End Athena GUI only
 menutrans &Find\.\.\./		&ПоиÑк\.\.\./
-menutrans Find\ and\ Rep&lace\.\.\.     ПоиÑк\ и\ &замена\.\.\.
-menutrans Find\ and\ Rep&lace\.\.\.:%s     ПоиÑк\ и\ &замена\.\.\.:%s
-menutrans Find\ and\ Rep&lace\.\.\.:s     ПоиÑк\ и\ &замена\.\.\.:s
+menutrans Find\ and\ Rep&lace\.\.\.	ПоиÑк\ и\ &замена\.\.\.
+menutrans Find\ and\ Rep&lace\.\.\.:%s	ПоиÑк\ и\ &замена\.\.\.:%s
+menutrans Find\ and\ Rep&lace\.\.\.:s	ПоиÑк\ и\ &замена\.\.\.:s
 "--------------------
 menutrans Settings\ &Window		Окно\ наÑтройки\ &опций
+menutrans Startup\ &Settings		ÐаÑтройки\ запуÑ&ка
 menutrans &Global\ Settings		&Глобальные\ наÑтройки
 menutrans F&ile\ Settings		ÐаÑтройки\ &файлов
 menutrans C&olor\ Scheme		&ЦветоваÑ\ Ñхема
 menutrans &Keymap			РаÑкладка\ кл&авиатуры
 menutrans Select\ Fo&nt\.\.\.		Выбор\ &шрифта\.\.\.
 ">>>----------------- Edit/Global settings
-menutrans Toggle\ Pattern\ &Highlight:set\ hls!     ПодÑветка\ &найденных\ ÑоответÑтвий:set\ hls!
-menutrans Toggle\ &Ignore-case:set\ ic!		 &РегиÑтронезавиÑимый\ поиÑк:set\ ic!
-menutrans Toggle\ &Showmatch:set\ sm!		 Показывать\ парные\ &Ñлементы:set\ sm!
-menutrans &Context\ lines				 Стр&ок\ вокруг\ курÑора
-menutrans &Virtual\ Edit				 Вир&туальное\ редактирование
-menutrans Toggle\ Insert\ &Mode:set\ im!		 Режим\ &Ð’Ñтавки:set\ im!
-menutrans Toggle\ Vi\ C&ompatible:set\ cp!		 &СовмеÑтимоÑÑ‚ÑŒ\ Ñ\ Vi:set\ cp!
-menutrans Search\ &Path\.\.\.				 &Путь\ длÑ\ поиÑка\ файлов\.\.\.
-menutrans Ta&g\ Files\.\.\.				 Файлы\ &меток\.\.\.
-"
-menutrans Toggle\ &Toolbar				 &ИнÑтрументальнаÑ\ панель
-menutrans Toggle\ &Bottom\ Scrollbar			 ПолоÑа\ прокрутки\ вни&зу
-menutrans Toggle\ &Left\ Scrollbar			 ПолоÑа\ прокрутки\ Ñ&лева
-menutrans Toggle\ &Right\ Scrollbar			 ПолоÑа\ прокрутки\ Ñпр&ава
+menutrans Toggle\ Pattern\ &Highlight:set\ hls!	ПодÑветка\ &найденных\ ÑоответÑтвий:set\ hls!
+menutrans Toggle\ &Ignore-case:set\ ic!		&РегиÑтронезавиÑимый\ поиÑк:set\ ic!
+menutrans Toggle\ &Showmatch:set\ sm!		Показывать\ парные\ &Ñлементы:set\ sm!
+menutrans &Context\ lines				Стр&ок\ вокруг\ курÑора
+menutrans &Virtual\ Edit				Вир&туальное\ редактирование
+menutrans Toggle\ Insert\ &Mode:set\ im!		Режим\ &Ð’Ñтавки:set\ im!
+menutrans Toggle\ Vi\ C&ompatible:set\ cp!		&СовмеÑтимоÑÑ‚ÑŒ\ Ñ\ Vi:set\ cp!
+menutrans Search\ &Path\.\.\.				&Путь\ длÑ\ поиÑка\ файлов\.\.\.
+menutrans Ta&g\ Files\.\.\.				Файлы\ &меток\.\.\.
+"
+menutrans Toggle\ &Toolbar				&ИнÑтрументальнаÑ\ панель
+menutrans Toggle\ &Bottom\ Scrollbar			ПолоÑа\ прокрутки\ вни&зу
+menutrans Toggle\ &Left\ Scrollbar			ПолоÑа\ прокрутки\ Ñ&лева
+menutrans Toggle\ &Right\ Scrollbar			ПолоÑа\ прокрутки\ Ñпр&ава
 ">>>->>>------------- Edit/Global settings/Virtual edit
-menutrans Never						 Выключено
-menutrans Block\ Selection				 При\ выделении\ блока
-menutrans Insert\ mode					 Ð’\ режиме\ Ð’Ñтавки
-menutrans Block\ and\ Insert				 При\ выделении\ блока\ и\ в\ режиме\ Ð’Ñтавки
-menutrans Always					 Включено\ вÑегда
+menutrans Never						Выключено
+menutrans Block\ Selection				При\ выделении\ блока
+menutrans Insert\ mode					Ð’\ режиме\ Ð’Ñтавки
+menutrans Block\ and\ Insert				При\ выделении\ блока\ и\ в\ режиме\ Ð’Ñтавки
+menutrans Always					Включено\ вÑегда
 ">>>----------------- Edit/File settings
-menutrans Toggle\ Line\ &Numbering:set\ nu!	 &ÐумерациÑ\ Ñтрок:set\ nu!
-menutrans Toggle\ &List\ Mode:set\ list!		 Отобра&жение\ невидимых\ Ñимволов:set\ list!
-menutrans Toggle\ Line\ &Wrap:set\ wrap!		 &ПереноÑ\ длинных\ Ñтрок:set\ wrap!
-menutrans Toggle\ W&rap\ at\ word:set\ lbr!	 ПереноÑ\ &целых\ Ñлов:set\ lbr!
-menutrans Toggle\ &expand-tab:set\ et!		 Про&белы\ вмеÑто\ табулÑции:set\ et!
-menutrans Toggle\ &auto-indent:set\ ai!		 ÐвтоматичеÑкое\ форматирование\ &отÑтупов:set\ ai!
-menutrans Toggle\ &C-indenting:set\ cin!		 Форматирование\ отÑтупов\ в\ &Ñтиле\ C:set\ cin!
+menutrans Toggle\ Line\ &Numbering:set\ nu!	&ÐумерациÑ\ Ñтрок:set\ nu!
+menutrans Toggle\ relati&ve\ Line\ Numbering:set\ rnu!	ОтноÑите&льнаÑ\ нумерациÑ\ Ñтрок:set\ nru!
+menutrans Toggle\ &List\ Mode:set\ list!		Отобра&жение\ невидимых\ Ñимволов:set\ list!
+menutrans Toggle\ Line\ &Wrap:set\ wrap!		&ПереноÑ\ длинных\ Ñтрок:set\ wrap!
+menutrans Toggle\ W&rap\ at\ word:set\ lbr!	ПереноÑ\ &целых\ Ñлов:set\ lbr!
+menutrans Toggle\ &expand-tab:set\ et!		Про&белы\ вмеÑто\ табулÑции:set\ et!
+menutrans Toggle\ &auto-indent:set\ ai!		ÐвтоматичеÑкое\ форматирование\ &отÑтупов:set\ ai!
+menutrans Toggle\ &C-indenting:set\ cin!		Форматирование\ отÑтупов\ в\ &Ñтиле\ C:set\ cin!
 ">>>---
-menutrans &Shiftwidth					 Вели&чина\ отÑтупа
-menutrans Soft\ &Tabstop				 Ширина\ &табулÑции
-menutrans Te&xt\ Width\.\.\.				 &Ширина\ текÑта\.\.\.
-menutrans &File\ Format\.\.\.				 &Формат\ файла\.\.\.
+menutrans &Shiftwidth					Вели&чина\ отÑтупа
+menutrans Soft\ &Tabstop				Ширина\ &табулÑции
+menutrans Te&xt\ Width\.\.\.				&Ширина\ текÑта\.\.\.
+menutrans &File\ Format\.\.\.				&Формат\ файла\.\.\.
 "
 "
 "
@@ -131,6 +139,7 @@ menutrans Jump\ &back^T				&ВернутьÑÑ\ назад^T
 menutrans Build\ &Tags\ File				Создать\ &файл\ меток
 "-------------------
 menutrans &Folding					Работа\ Ñо\ &Ñкладками
+menutrans &Spelling					Пр&авопиÑание
 menutrans &Diff						&ОтличиÑ\ (diff)
 "-------------------
 menutrans &Make:make				Ко&мпилÑциÑ:make
@@ -141,10 +150,26 @@ menutrans &Previous\ Error:cp			П&редыдущаÑ\ ошибка:cp
 menutrans &Older\ List:cold			Более\ Ñтар&ый\ ÑпиÑок\ ошибок:cold
 menutrans N&ewer\ List:cnew			Более\ Ñве&жий\ ÑпиÑок\ ошибок:cnew
 menutrans Error\ &Window				Ок&но\ ошибок
-menutrans &Set\ Compiler				Выбор\ &компилÑтора
+menutrans Se&T\ Compiler				Выбор\ &компилÑтора
 "-------------------
 menutrans &Convert\ to\ HEX:%!xxd			П&еревеÑти\ в\ HEX:%!xxd
 menutrans Conve&rt\ back:%!xxd\ -r			ПеревеÑти\ и&з\ HEX:%!xxd\ -r
+">>>---------------- Tools/Spelling
+menutrans &Spell\ Check\ On				&Вкл\ проверку\ правопиÑаниÑ
+menutrans Spell\ Check\ &Off				Ð’Ñ‹&кл\ проверку\ правопиÑаниÑ
+menutrans To\ &Next\ error]s			&СледующаÑ\ ошибка
+menutrans To\ &Previous\ error[s			&ПредыдущаÑ\ ошибка
+menutrans Suggest\ &Correctionsz=			Предложить\ иÑп&равлениÑ
+menutrans &Repeat\ correction:spellrepall		Пов&торить\ иÑправление\ длÑ\ вÑех
+"-------------------
+menutrans Set\ language\ to\ "en"			УÑтановить\ Ñзык\ "en"
+menutrans Set\ language\ to\ "en_au"			УÑтановить\ Ñзык\ "en_au"
+menutrans Set\ language\ to\ "en_ca"			УÑтановить\ Ñзык\ "en_ca"
+menutrans Set\ language\ to\ "en_gb"			УÑтановить\ Ñзык\ "en_gb"
+menutrans Set\ language\ to\ "en_nz"			УÑтановить\ Ñзык\ "en_nz"
+menutrans Set\ language\ to\ "en_us"			УÑтановить\ Ñзык\ "en_us"
+menutrans &Find\ More\ Languages			&Ðайти\ больше\ Ñзыков
+let g:menutrans_set_lang_to =				'УÑтановить Ñзык'
 ">>>---------------- Folds
 menutrans &Enable/Disable\ foldszi			Вкл/выкл\ &Ñкладкиzi
 menutrans &View\ Cursor\ Linezv			Открыть\ Ñтроку\ Ñ\ &курÑоромzv
@@ -219,7 +244,7 @@ menutrans M&in\ Height^W1_				МинимальнаÑ\ выÑо&та^W1
 menutrans Max\ &Width^W\|				МакÑимальнаÑ\ &ширина^W\|
 menutrans Min\ Widt&h^W1\|				Минимал&ьнаÑ\ ширина^W1\|
 ">>>----------------- Window/Move To
-menutrans &Top^WK					Ðа&верх^WK
+menutrans &Top^WK					В&верх^WK
 menutrans &Bottom^WJ				В&низ^WJ
 menutrans &Left\ side^WH				В&лево^WH
 menutrans &Right\ side^WL				В&право^WL
diff --git a/runtime/macros/editexisting.vim b/runtime/macros/editexisting.vim
index 07c55f675e..c18f22569f 100644
--- a/runtime/macros/editexisting.vim
+++ b/runtime/macros/editexisting.vim
@@ -1,6 +1,6 @@
 " Vim Plugin:	Edit the file with an existing Vim if possible
 " Maintainer:	Bram Moolenaar
-" Last Change:	2008 May 29
+" Last Change:	2013 Feb 24
 
 " This is a plugin, drop it in your (Unix) ~/.vim/plugin or (Win32)
 " $VIM/vimfiles/plugin directory.  Or make a symbolic link, so that you
@@ -98,7 +98,7 @@ func! EditExisting(fname, command)
 	" Make this tab page the current one and find the window number.
 	exe 'tabnext ' . (i + 1)
 	let winnr = bufwinnr(a:fname)
-	break;
+	break
       endif
     endfor
   endif
diff --git a/runtime/macros/justify.vim b/runtime/macros/justify.vim
index aa4a9ca585..4ef3bf95fa 100644
--- a/runtime/macros/justify.vim
+++ b/runtime/macros/justify.vim
@@ -1,4 +1,4 @@
-" Function to left and rigt align text.
+" Function to left and right align text.
 "
 " Written by:	Preben "Peppe" Guldberg 
 " Created:	980806 14:13 (or around that time anyway)
@@ -256,18 +256,17 @@ function! Justify(...) range
 	let str = substitute(str, '\s\+$', '', '')
 	let str = substitute(str, '^\s\+', '', '')
 	let str = substitute(str, '\s\+', ' ', 'g')
-	" Use substitute() hack to get strlen in characters instead of bytes
-	let str_n = strlen(substitute(str, '.', 'x', 'g'))
+	let str_n = strdisplaywidth(str)
 
 	" Possible addition of space after punctuation
 	if exists("join_str")
 	    let str = substitute(str, join_str, '\1 ', 'g')
 	endif
-	let join_n = strlen(substitute(str, '.', 'x', 'g')) - str_n
+	let join_n = strdisplaywidth(str) - str_n
 
 	" Can extraspaces be added?
 	" Note that str_n may be less than strlen(str) [joinspaces above]
-	if strlen(substitute(str, '.', 'x', 'g')) < tw - indent_n && str_n > 0
+	if strdisplaywidth(str) <= tw - indent_n && str_n > 0
 	    " How many spaces should be added
 	    let s_add = tw - str_n - indent_n - join_n
 	    let s_nr  = strlen(substitute(str, '\S', '', 'g') ) - join_n
diff --git a/runtime/macros/matchit.vim b/runtime/macros/matchit.vim
index 03dae6a2f7..74c1a1eb92 100644
--- a/runtime/macros/matchit.vim
+++ b/runtime/macros/matchit.vim
@@ -131,7 +131,7 @@ function! s:Match_wrapper(word, forward, mode) range
     " let default = substitute(escape(&mps, '[$^.*~\\/?]'), '[,:]\+',
     "  \ '\\|', 'g').'\|\/\*\|\*\/\|#if\>\|#ifdef\>\|#else\>\|#elif\>\|#endif\>'
     let default = escape(&mps, '[$^.*~\\/?]') . (strlen(&mps) ? "," : "") .
-      \ '\/\*:\*\/,#if\%(def\)\=:#else\>:#elif\>:#endif\>'
+      \ '\/\*:\*\/,#\s*if\%(def\)\=:#\s*else\>:#\s*elif\>:#\s*endif\>'
     " s:all = pattern with all the keywords
     let match_words = match_words . (strlen(match_words) ? "," : "") . default
     if match_words !~ s:notslash . '\\\d'
@@ -649,7 +649,7 @@ fun! s:MultiMatch(spflag, mode)
   "   s:all	regexp based on s:pat and the default groups
   " This part is copied and slightly modified from s:Match_wrapper().
   let default = escape(&mps, '[$^.*~\\/?]') . (strlen(&mps) ? "," : "") .
-    \ '\/\*:\*\/,#if\%(def\)\=:#else\>:#elif\>:#endif\>'
+    \ '\/\*:\*\/,#\s*if\%(def\)\=:#\s*else\>:#\s*elif\>:#\s*endif\>'
   " Allow b:match_words = "GetVimMatchWords()" .
   if b:match_words =~ ":"
     let match_words = b:match_words
diff --git a/runtime/makemenu.vim b/runtime/makemenu.vim
index c4d8bc204b..b78fdfd601 100644
--- a/runtime/makemenu.vim
+++ b/runtime/makemenu.vim
@@ -1,6 +1,6 @@
 " Script to define the syntax menu in synmenu.vim
 " Maintainer:	Bram Moolenaar 
-" Last Change:	2010 Aug 04
+" Last Change:	2013 Jul 28
 
 " This is used by "make menu" in the src directory.
 edit :p:h/synmenu.vim
@@ -66,9 +66,11 @@ SynMenu AB.ANTLR:antlr
 SynMenu AB.Apache\ config:apache
 SynMenu AB.Apache-style\ config:apachestyle
 SynMenu AB.Applix\ ELF:elf
+SynMenu AB.APT\ config:aptconf
 SynMenu AB.Arc\ Macro\ Language:aml
 SynMenu AB.Arch\ inventory:arch
 SynMenu AB.ART:art
+SynMenu AB.Ascii\ Doc:asciidoc
 SynMenu AB.ASP\ with\ VBScript:aspvbs
 SynMenu AB.ASP\ with\ Perl:aspperl
 SynMenu AB.Assembly.680x0:asm68k
@@ -128,6 +130,7 @@ SynMenu C.ChordPro:chordpro
 SynMenu C.Clean:clean
 SynMenu C.Clever:cl
 SynMenu C.Clipper:clipper
+SynMenu C.Clojure:clojure
 SynMenu C.Cmake:cmake
 SynMenu C.Cmusrc:cmusrc
 SynMenu C.Cobol:cobol
@@ -139,6 +142,7 @@ SynMenu C.Config.Configure\.in:config
 SynMenu C.Config.Generic\ Config\ file:conf
 SynMenu C.CRM114:crm
 SynMenu C.Crontab:crontab
+SynMenu C.CSDL:csdl
 SynMenu C.CSP:csp
 SynMenu C.Ctrl-H:ctrlh
 SynMenu C.Cucumber:cucumber
@@ -164,6 +168,7 @@ SynMenu DE.Digital\ Command\ Lang:dcl
 SynMenu DE.Dircolors:dircolors
 SynMenu DE.Django\ template:django
 SynMenu DE.DNS/BIND\ zone:bindzone
+SynMenu DE.Dnsmasq\ config:dnsmasq
 SynMenu DE.DocBook.auto-detect:docbk
 SynMenu DE.DocBook.SGML:docbksgml
 SynMenu DE.DocBook.XML:docbkxml
@@ -177,6 +182,7 @@ SynMenu DE.DSSSL:dsl
 SynMenu DE.DTD:dtd
 SynMenu DE.DTML\ (Zope):dtml
 SynMenu DE.DTrace:dtrace
+SynMenu DE.Dts/dtsi:dts
 SynMenu DE.Dylan.Dylan:dylan
 SynMenu DE.Dylan.Dylan\ interface:dylanintr
 SynMenu DE.Dylan.Dylan\ lid:dylanlid
@@ -197,6 +203,7 @@ SynMenu DE.Exim\ conf:exim
 SynMenu DE.Expect:expect
 SynMenu DE.Exports:exports
 
+SynMenu FG.Falcon:falcon
 SynMenu FG.Fantom:fan
 SynMenu FG.Fetchmail:fetchmail
 SynMenu FG.FlexWiki:flexwiki
@@ -220,9 +227,12 @@ SynMenu FG.Git.Commit:gitcommit
 SynMenu FG.Git.Config:gitconfig
 SynMenu FG.Git.Rebase:gitrebase
 SynMenu FG.Git.Send\ Email:gitsendemail
+SynMenu FG.Gitolite:gitolite
 SynMenu FG.Gkrellmrc:gkrellmrc
+SynMenu FG.Gnash:gnash
 SynMenu FG.GP:gp
 SynMenu FG.GPG:gpg
+SynMenu FG.Grof:gprof
 SynMenu FG.Group\ file:group
 SynMenu FG.Grub:grub
 SynMenu FG.GNU\ Server\ Pages:gsp
@@ -243,6 +253,7 @@ SynMenu HIJK.HASTE\ preproc:hastepreproc
 SynMenu HIJK.Hercules:hercules
 SynMenu HIJK.Hex\ dump.XXD:xxd
 SynMenu HIJK.Hex\ dump.Intel\ MCS51:hex
+SynMenu HIJK.Hg\ commit:hgcommit
 SynMenu HIJK.HTML.HTML:html
 SynMenu HIJK.HTML.HTML\ with\ M4:htmlm4
 SynMenu HIJK.HTML.HTML\ with\ Ruby\ (eRuby):eruby
@@ -251,6 +262,7 @@ SynMenu HIJK.HTML.Django\ HTML\ template:htmldjango
 SynMenu HIJK.HTML.HTML/OS:htmlos
 SynMenu HIJK.HTML.XHTML:xhtml
 SynMenu HIJK.Host\.conf:hostconf
+SynMenu HIJK.Hosts\ access:hostsaccess
 SynMenu HIJK.Hyper\ Builder:hb
 SynMenu HIJK.Icewm\ menu:icemenu
 SynMenu HIJK.Icon:icon
@@ -262,6 +274,11 @@ SynMenu HIJK.Informix\ 4GL:fgl
 SynMenu HIJK.Initng:initng
 SynMenu HIJK.Inittab:inittab
 SynMenu HIJK.Inno\ setup:iss
+SynMenu HIJK.Innovation\ Data\ Processing.Upstream\ dat:upstreamdat
+SynMenu HIJK.Innovation\ Data\ Processing.Upstream\ log:upstreamlog
+SynMenu HIJK.Innovation\ Data\ Processing.Upstream\ Install\ log:upstreaminstalllog
+SynMenu HIJK.Innovation\ Data\ Processing.Usserver\ log:usserverlog
+SynMenu HIJK.Innovation\ Data\ Processing.USW2KAgt\ log:usw2kagtlog
 SynMenu HIJK.InstallShield\ script:ishd
 SynMenu HIJK.Interactive\ Data\ Lang:idlang
 SynMenu HIJK.IPfilter:ipfilter
@@ -275,6 +292,7 @@ SynMenu HIJK.Java.Java\ Properties:jproperties
 SynMenu HIJK.JavaScript:javascript
 SynMenu HIJK.Jess:jess
 SynMenu HIJK.Jgraph:jgraph
+SynMenu HIJK.Jovial:jovial
 SynMenu HIJK.Kconfig:kconfig
 SynMenu HIJK.KDE\ script:kscript
 SynMenu HIJK.Kimwitu++:kwt
@@ -314,6 +332,7 @@ SynMenu M.MaGic\ Point:mgp
 SynMenu M.Mail:mail
 SynMenu M.Mail\ aliases:mailaliases
 SynMenu M.Mailcap:mailcap
+SynMenu M.Mallard:mallard
 SynMenu M.Makefile:make
 SynMenu M.MakeIndex:ist
 SynMenu M.Man\ page:man
@@ -355,6 +374,7 @@ SynMenu NO.Nanorc:nanorc
 SynMenu NO.Nastran\ input/DMAP:nastran
 SynMenu NO.Natural:natural
 SynMenu NO.Netrc:netrc
+SynMenu NO.Ninja:ninja
 SynMenu NO.Novell\ NCF\ batch:ncf
 SynMenu NO.Not\ Quite\ C\ (LEGO):nqc
 SynMenu NO.Nroff:nroff
@@ -381,6 +401,9 @@ SynMenu PQ.Perl.Perl:perl
 SynMenu PQ.Perl.Perl\ 6:perl6
 SynMenu PQ.Perl.Perl\ POD:pod
 SynMenu PQ.Perl.Perl\ XS:xs
+SynMenu PQ.Perl.Template\ toolkit:tt2
+SynMenu PQ.Perl.Template\ toolkit\ Html:tt2html
+SynMenu PQ.Perl.Template\ toolkit\ JS:tt2js
 SynMenu PQ.PHP.PHP\ 3-4:php
 SynMenu PQ.PHP.Phtml\ (PHP\ 2):phtml
 SynMenu PQ.Pike:pike
@@ -388,6 +411,7 @@ SynMenu PQ.Pine\ RC:pine
 SynMenu PQ.Pinfo\ RC:pinfo
 SynMenu PQ.PL/M:plm
 SynMenu PQ.PL/SQL:plsql
+SynMenu PQ.Pli:pli
 SynMenu PQ.PLP:plp
 SynMenu PQ.PO\ (GNU\ gettext):po
 SynMenu PQ.Postfix\ main\ config:pfmain
@@ -404,6 +428,7 @@ SynMenu PQ.Product\ Spec\ File:psf
 SynMenu PQ.Progress:progress
 SynMenu PQ.Prolog:prolog
 SynMenu PQ.ProMeLa:promela
+SynMenu PQ.Proto:proto
 SynMenu PQ.Protocols:protocols
 SynMenu PQ.Purify\ log:purifylog
 SynMenu PQ.Pyrex:pyrex
@@ -421,6 +446,8 @@ SynMenu R.RCS.RCS\ log\ output:rcslog
 SynMenu R.RCS.RCS\ file:rcs
 SynMenu R.Readline\ config:readline
 SynMenu R.Rebol:rebol
+SynMenu R.ReDIF:redif
+SynMenu R.Relax\ NG:rng
 SynMenu R.Remind:remind
 SynMenu R.Relax\ NG\ compact:rnc
 SynMenu R.Renderman.Renderman\ Shader\ Lang:sl
@@ -494,6 +521,7 @@ SynMenu Sn-Sy.Spyce:spyce
 SynMenu Sn-Sy.Speedup:spup
 SynMenu Sn-Sy.Splint:splint
 SynMenu Sn-Sy.Squid\ config:squid
+SynMenu Sn-Sy.SQL.SAP\ HANA:sqlhana
 SynMenu Sn-Sy.SQL.ESQL-C:esqlc
 SynMenu Sn-Sy.SQL.MySQL:mysql
 SynMenu Sn-Sy.SQL.PL/SQL:plsql
@@ -523,6 +551,7 @@ SynMenu T.Tags:tags
 SynMenu T.TAK.TAK\ compare:takcmp
 SynMenu T.TAK.TAK\ input:tak
 SynMenu T.TAK.TAK\ output:takout
+SynMenu T.Tar\ listing:tar
 SynMenu T.Task\ data:taskdata
 SynMenu T.Task\ 42\ edit:taskedit
 SynMenu T.Tcl/Tk:tcl
@@ -532,6 +561,7 @@ SynMenu T.Termcap/Printcap:ptcap
 SynMenu T.Terminfo:terminfo
 SynMenu T.TeX.TeX/LaTeX:tex
 SynMenu T.TeX.plain\ TeX:plaintex
+SynMenu T.TeX.Initex:initex
 SynMenu T.TeX.ConTeXt:context
 SynMenu T.TeX.TeX\ configuration:texmf
 SynMenu T.TeX.Texinfo:texinfo
@@ -540,6 +570,7 @@ SynMenu T.Tidy\ configuration:tidy
 SynMenu T.Tilde:tilde
 SynMenu T.TPP:tpp
 SynMenu T.Trasys\ input:trasys
+SynMenu T.Treetop:treetop
 SynMenu T.Trustees:trustees
 SynMenu T.TSS.Command\ Line:tsscl
 SynMenu T.TSS.Geometry:tssgm
@@ -551,6 +582,7 @@ SynMenu UV.Udev\ rules:udevrules
 SynMenu UV.UIT/UIL:uil
 SynMenu UV.UnrealScript:uc
 SynMenu UV.Updatedb\.conf:updatedb
+SynMenu UV.Upstart:upstart
 SynMenu UV.Valgrind:valgrind
 SynMenu UV.Vera:vera
 SynMenu UV.Verilog-AMS\ HDL:verilogams
@@ -594,6 +626,7 @@ SynMenu WXYZ.Xslt:xslt
 SynMenu WXYZ.XFree86\ Config:xf86conf
 SynMenu WXYZ.YAML:yaml
 SynMenu WXYZ.Yacc:yacc
+SynMenu WXYZ.Zimbu:zimbu
 
 call append(s:lnum, "")
 
diff --git a/runtime/menu.vim b/runtime/menu.vim
index 82d7c1f2eb..550e1a4e3f 100644
--- a/runtime/menu.vim
+++ b/runtime/menu.vim
@@ -2,7 +2,7 @@
 " You can also use this as a start for your own set of menus.
 "
 " Maintainer:	Bram Moolenaar 
-" Last Change:	2011 Mar 22
+" Last Change:	2013 May 17
 
 " Note that ":an" (short for ":anoremenu") is often used to make a menu work
 " in all modes and avoid side effects from mappings defined by the user.
@@ -171,7 +171,7 @@ if !has("gui_macvim")
 endif
 
 func! SelectAll()
-  exe "norm gg" . (&slm == "" ? "VG" : "gH\G")
+  exe "norm! gg" . (&slm == "" ? "VG" : "gH\G")
 endfunc
 
 func! s:FnameEscape(fname)
@@ -354,8 +354,10 @@ fun! s:TextWidth()
   endif
   let n = inputdialog(g:menutrans_textwidth_dialog, &tw)
   if n != ""
-    " remove leading zeros to avoid it being used as an octal number
-    let &tw = substitute(n, "^0*", "", "")
+    " Remove leading zeros to avoid it being used as an octal number.
+    " But keep a zero by itself.
+    let tw = substitute(n, "^0*", "", "")
+    let &tw = tw == '' ? 0 : tw 
   endif
 endfun
 
@@ -487,6 +489,10 @@ if has("spell")
       let enc = &enc
     endif
 
+    if !exists("g:menutrans_set_lang_to")
+      let g:menutrans_set_lang_to = 'Set language to'
+    endif
+
     let found = 0
     let s = globpath(&rtp, "spell/*." . enc . ".spl")
     if s != ""
@@ -494,8 +500,9 @@ if has("spell")
       for f in split(s, "\n")
 	let nm = substitute(f, '.*spell[/\\]\(..\)\.[^/\\]*\.spl', '\1', "")
 	if nm != "en" && nm !~ '/'
+          let _nm = nm
 	  let found += 1
-	  let menuname = '&Tools.&Spelling.Set\ language\ to\ "' . nm . '"'
+	  let menuname = '&Tools.&Spelling.' . escape(g:menutrans_set_lang_to, "\\. \t|") . '\ "' . nm . '"'
 	  exe 'an 40.335.' . n . ' ' . menuname . ' :set spl=' . nm . ' spell'
 	  let s:undo_spellang += ['aun ' . menuname]
 	endif
@@ -505,7 +512,7 @@ if has("spell")
     if found == 0
       echomsg "Could not find other spell files"
     elseif found == 1
-      echomsg "Found spell file " . nm
+      echomsg "Found spell file " . _nm
     else
       echomsg "Found " . found . " more spell files"
     endif
diff --git a/runtime/optwin.vim b/runtime/optwin.vim
index 9bdb5a81f9..3bd6322199 100644
--- a/runtime/optwin.vim
+++ b/runtime/optwin.vim
@@ -1,7 +1,7 @@
 " These commands create the option window.
 "
 " Maintainer:	Bram Moolenaar 
-" Last Change:	2012 Feb 22
+" Last Change:	2013 Jun 29
 
 " If there already is an option window, jump to that one.
 if bufwinnr("option-window") > 0
@@ -258,6 +258,8 @@ call append("$", "incsearch\tshow match for partly typed search command")
 call BinOptionG("is", &is)
 call append("$", "magic\tchange the way backslashes are used in search patterns")
 call BinOptionG("magic", &magic)
+call append("$", "regexpengine\tselect the default regexp engine used")
+call OptionG("re", &re)
 call append("$", "ignorecase\tignore case when using a search pattern")
 call BinOptionG("ic", &ic)
 call append("$", "smartcase\toverride 'ignorecase' when pattern has upper case characters")
@@ -1046,6 +1048,8 @@ if has("wildignore")
   call append("$", "wildignore\tlist of patterns to ignore files for file name completion")
   call OptionG("wig", &wig)
 endif
+call append("$", "fileignorecase\tignore case when using file names")
+call BinOptionG("fic", &fic)
 call append("$", "wildignorecase\tignore case when completing file names")
 call BinOptionG("wic", &wic)
 if has("wildmenu")
@@ -1205,6 +1209,10 @@ call OptionL("ims")
 if has("xim")
   call append("$", "imcmdline\twhen set always use IM when starting to edit a command line")
   call BinOptionG("imc", &imc)
+  call append("$", "imstatusfunc\tfunction to obtain IME status")
+  call OptionG("imsf", &imsf)
+  call append("$", "imactivatefunc\tfunction to enable/disable IME")
+  call OptionG("imaf", &imaf)
 endif
 
 
diff --git a/runtime/plugin/getscriptPlugin.vim b/runtime/plugin/getscriptPlugin.vim
index 2697cdbc33..45c858aac8 100644
--- a/runtime/plugin/getscriptPlugin.vim
+++ b/runtime/plugin/getscriptPlugin.vim
@@ -1,6 +1,6 @@
 " ---------------------------------------------------------------------
 " getscriptPlugin.vim
-"  Author:	Charles E. Campbell, Jr.
+"  Author:	Charles E. Campbell
 "  Date:	Jan 07, 2008
 "  Installing:	:help glvs-install
 "  Usage:	:help glvs
@@ -19,7 +19,7 @@ if &cp || exists("g:loaded_getscriptPlugin")
  endif
  finish
 endif
-let g:loaded_getscriptPlugin = "v34"
+let g:loaded_getscriptPlugin = "v35"
 let s:keepcpo                = &cpo
 set cpo&vim
 
diff --git a/runtime/plugin/matchparen.vim b/runtime/plugin/matchparen.vim
index 03a428d6a8..0fdfef164a 100644
--- a/runtime/plugin/matchparen.vim
+++ b/runtime/plugin/matchparen.vim
@@ -1,19 +1,29 @@
 " Vim plugin for showing matching parens
 " Maintainer:  Bram Moolenaar 
-" Last Change: 2011 Aug 27
+" Last Change: 2013 May 08
 
 " Exit quickly when:
 " - this plugin was already loaded (or disabled)
 " - when 'compatible' is set
-" - the "CursorMoved" autocmd event is not availble.
+" - the "CursorMoved" autocmd event is not available.
 if exists("g:loaded_matchparen") || &cp || !exists("##CursorMoved")
   finish
 endif
 let g:loaded_matchparen = 1
 
+if !exists("g:matchparen_timeout")
+  let g:matchparen_timeout = 300
+endif
+if !exists("g:matchparen_insert_timeout")
+  let g:matchparen_insert_timeout = 60
+endif
+
 augroup matchparen
   " Replace all matchparen autocommands
   autocmd! CursorMoved,CursorMovedI,WinEnter * call s:Highlight_Matching_Pair()
+  if exists('##TextChanged')
+    autocmd! TextChanged,TextChangedI * call s:Highlight_Matching_Pair()
+  endif
 augroup END
 
 " Skip the rest if it was already done.
@@ -96,10 +106,15 @@ function! s:Highlight_Matching_Pair()
     let stopline = stoplinetop
   endif
 
+  " Limit the search time to 300 msec to avoid a hang on very long lines.
+  " This fails when a timeout is not supported.
+  if mode() == 'i' || mode() == 'R'
+    let timeout = exists("b:matchparen_insert_timeout") ? b:matchparen_insert_timeout : g:matchparen_insert_timeout
+  else
+    let timeout = exists("b:matchparen_timeout") ? b:matchparen_timeout : g:matchparen_timeout
+  endif
   try
-    " Limit the search time to 300 msec to avoid a hang on very long lines.
-    " This fails when a timeout is not supported.
-    let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, 300)
+    let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, timeout)
   catch /E118/
     " Can't use the timeout, restrict the stopline a bit more to avoid taking
     " a long time on closed folds and long lines.
diff --git a/runtime/plugin/netrwPlugin.vim b/runtime/plugin/netrwPlugin.vim
index 8a66c840d1..718bb663e7 100644
--- a/runtime/plugin/netrwPlugin.vim
+++ b/runtime/plugin/netrwPlugin.vim
@@ -1,9 +1,9 @@
 " netrwPlugin.vim: Handles file transfer and remote directory listing across a network
 "            PLUGIN SECTION
-" Date:		Aug 24, 2011
-" Maintainer:	Charles E Campbell, Jr 
+" Date:		Apr 30, 2013
+" Maintainer:	Charles E Campbell 
 " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
-" Copyright:    Copyright (C) 1999-2008 Charles E. Campbell, Jr. {{{1
+" Copyright:    Copyright (C) 1999-2012 Charles E. Campbell {{{1
 "               Permission is hereby granted to use and distribute this code,
 "               with or without modifications, provided that this copyright
 "               notice is copied with it. Like anything else that's free,
@@ -20,13 +20,15 @@
 if &cp || exists("g:loaded_netrwPlugin")
  finish
 endif
-let g:loaded_netrwPlugin = "v145"
+"DechoTabOn
+let g:loaded_netrwPlugin = "v149"
 if v:version < 702
  echohl WarningMsg | echo "***netrw*** you need vim version 7.2 for this version of netrw" | echohl None
  finish
 endif
 let s:keepcpo = &cpo
 set cpo&vim
+"DechoTabOn
 
 " ---------------------------------------------------------------------
 " Public Interface: {{{1
@@ -34,9 +36,7 @@ set cpo&vim
 " Local Browsing: {{{2
 augroup FileExplorer
  au!
-" au BufReadCmd *[/\\]	sil! call s:LocalBrowse(expand("")) 
-" au BufEnter *[^/\\]	sil! call s:LocalBrowse(expand(""))
-" au VimEnter *[^/\\]	sil! call s:VimEnter(expand(""))
+ " SEE Benzinger problem...
  au BufEnter *	sil! call s:LocalBrowse(expand(""))
  au VimEnter *	sil! call s:VimEnter(expand(""))
  if has("win32") || has("win95") || has("win64") || has("win16")
@@ -47,11 +47,11 @@ augroup END
 " Network Browsing Reading Writing: {{{2
 augroup Network
  au!
- au BufReadCmd   file://*		call netrw#FileUrlRead(expand(""))
- au BufReadCmd   ftp://*,rcp://*,scp://*,http://*,https://*,dav://*,davs://*,rsync://*,sftp://*	exe "silent doau BufReadPre ".fnameescape(expand(""))|call netrw#Nread(2,expand(""))|exe "silent doau BufReadPost ".fnameescape(expand(""))
- au FileReadCmd  ftp://*,rcp://*,scp://*,http://*,https://*,dav://*,davs://*,rsync://*,sftp://*	exe "silent doau FileReadPre ".fnameescape(expand(""))|call netrw#Nread(1,expand(""))|exe "silent doau FileReadPost ".fnameescape(expand(""))
- au BufWriteCmd  ftp://*,rcp://*,scp://*,dav://*,davs://*,rsync://*,sftp://*			exe "silent doau BufWritePre ".fnameescape(expand(""))|exe 'Nwrite '.fnameescape(expand(""))|exe "silent doau BufWritePost ".fnameescape(expand(""))
- au FileWriteCmd ftp://*,rcp://*,scp://*,dav://*,davs://*,rsync://*,sftp://*			exe "silent doau FileWritePre ".fnameescape(expand(""))|exe "'[,']".'Nwrite '.fnameescape(expand(""))|exe "silent doau FileWritePost ".fnameescape(expand(""))
+ au BufReadCmd   file://*									call netrw#FileUrlRead(expand(""))
+ au BufReadCmd   ftp://*,rcp://*,scp://*,http://*,https://*,dav://*,davs://*,rsync://*,sftp://*	exe "sil doau BufReadPre ".fnameescape(expand(""))|call netrw#Nread(2,expand(""))|exe "sil doau BufReadPost ".fnameescape(expand(""))
+ au FileReadCmd  ftp://*,rcp://*,scp://*,http://*,https://*,dav://*,davs://*,rsync://*,sftp://*	exe "sil doau FileReadPre ".fnameescape(expand(""))|call netrw#Nread(1,expand(""))|exe "sil doau FileReadPost ".fnameescape(expand(""))
+ au BufWriteCmd  ftp://*,rcp://*,scp://*,dav://*,davs://*,rsync://*,sftp://*			exe "sil doau BufWritePre ".fnameescape(expand(""))|exe 'Nwrite '.fnameescape(expand(""))|exe "sil doau BufWritePost ".fnameescape(expand(""))
+ au FileWriteCmd ftp://*,rcp://*,scp://*,dav://*,davs://*,rsync://*,sftp://*			exe "sil doau FileWritePre ".fnameescape(expand(""))|exe "'[,']".'Nwrite '.fnameescape(expand(""))|exe "sil doau FileWritePost ".fnameescape(expand(""))
  try
   au SourceCmd   ftp://*,rcp://*,scp://*,http://*,https://*,dav://*,davs://*,rsync://*,sftp://*	exe 'Nsource '.fnameescape(expand(""))
  catch /^Vim\%((\a\+)\)\=:E216/
@@ -92,27 +92,37 @@ fun! s:LocalBrowse(dirname)
   " unfortunate interaction -- debugging calls can't be used here;
   " the BufEnter event causes triggering when attempts to write to
   " the DBG buffer are made.
+  if !exists("s:vimentered")
+   return
+  endif
+"  call Decho("s:LocalBrowse(dirname<".a:dirname.">){")
 "  echomsg "dirname<".a:dirname.">"
   if has("amiga")
    " The check against '' is made for the Amiga, where the empty
    " string is the current directory and not checking would break
    " things such as the help command.
+"   call Decho("(LocalBrowse) dirname<".a:dirname.">  (amiga)")
    if a:dirname != '' && isdirectory(a:dirname)
     sil! call netrw#LocalBrowseCheck(a:dirname)
    endif
   elseif isdirectory(a:dirname)
 "   echomsg "dirname<".dirname."> isdir"
+"   call Decho("(LocalBrowse) dirname<".a:dirname.">  (not amiga)")
    sil! call netrw#LocalBrowseCheck(a:dirname)
   endif
   " not a directory, ignore it
+"  call Decho("|return s:LocalBrowse }")
 endfun
 
 " ---------------------------------------------------------------------
 " s:VimEnter: {{{2
 fun! s:VimEnter(dirname)
-  let curwin= winnr()
+"  call Decho("VimEnter(dirname<".a:dirname.">){")
+  let curwin       = winnr()
+  let s:vimentered = 1
   windo if a:dirname != expand("%")|call s:LocalBrowse(expand("%:p"))|endif
   exe curwin."wincmd w"
+"  call Decho("|return VimEnter }")
 endfun
 
 " ---------------------------------------------------------------------
diff --git a/runtime/plugin/tarPlugin.vim b/runtime/plugin/tarPlugin.vim
index 01ddd48df0..034cbe225a 100644
--- a/runtime/plugin/tarPlugin.vim
+++ b/runtime/plugin/tarPlugin.vim
@@ -1,6 +1,6 @@
 " tarPlugin.vim -- a Vim plugin for browsing tarfiles
 " Original was copyright (c) 2002, Michael C. Toren 
-" Modified by Charles E. Campbell, Jr.
+" Modified by Charles E. Campbell
 " Distributed under the GNU General Public License.
 "
 " Updates are available from .  If you
@@ -14,7 +14,7 @@
 if &cp || exists("g:loaded_tarPlugin")
  finish
 endif
-let g:loaded_tarPlugin = "v28"
+let g:loaded_tarPlugin = "v29"
 let s:keepcpo          = &cpo
 set cpo&vim
 
diff --git a/runtime/plugin/tohtml.vim b/runtime/plugin/tohtml.vim
index 0ae6c81dfa..eb47b1a7c3 100644
--- a/runtime/plugin/tohtml.vim
+++ b/runtime/plugin/tohtml.vim
@@ -1,24 +1,37 @@
 " Vim plugin for converting a syntax highlighted file to HTML.
 " Maintainer: Ben Fritz 
-" Last Change: 2012 Jul 12
+" Last Change: 2013 Jul 08
 "
 " The core of the code is in $VIMRUNTIME/autoload/tohtml.vim and
 " $VIMRUNTIME/syntax/2html.vim
 "
 " TODO: {{{
+"   * Options for generating the CSS in external style sheets. New :TOcss
+"     command to convert the current color scheme into a (mostly) generic CSS
+"     stylesheet which can be re-used. Alternate stylesheet support? Good start
+"     by Erik Falor
+"     ( https://groups.google.com/d/topic/vim_use/7XTmC4D22dU/discussion ).
+"   * Add optional argument to :TOhtml command to specify mode (gui, cterm,
+"     term) to use for the styling. Suggestion by "nacitar".
+"   * Add way to override or specify which RGB colors map to the color numbers
+"     in cterm. Get better defaults than just guessing? Suggestion by "nacitar".
+"   * Disable filetype detection until after all processing is done.
+"   * Add option for not generating the hyperlink on stuff that looks like a
+"     URL? Or just color the link to fit with the colorscheme (and only special
+"     when hovering)?
+"   * Bug: Opera does not allow printing more than one page if uncopyable
+"     regions is turned on. Possible solution: Add normal text line numbers with
+"     display:none, set to display:inline for print style sheets, and hide
+"      elements for print, to allow Opera printing multiple pages (and
+"     other uncopyable areas?). May need to make the new text invisible to IE
+"     with conditional comments to prevent copying it, IE for some reason likes
+"     to copy hidden text. Other browsers too?
 "   * Bug: still a 1px gap throughout the fold column when html_prevent_copy is
 "     "fn" in some browsers. Specifically, in Chromium on Ubuntu (but not Chrome
 "     on Windows). Perhaps it is font related?
 "   * Bug: still some gaps in the fold column when html_prevent_copy contains
 "     'd' and showing the whole diff (observed in multiple browsers). Only gaps
 "     on diff lines though.
-"   * anchors on each line so you can do file.html#1234 to get to line 1234
-"   * add a modeline to the generated html to set nofoldenable or fdm=manual
-"     because syntax folding takes a terribly long time to work with the weird
-"     formatting the script does.
-"   * Options for generating the CSS in external style sheets. New :TOcss
-"     command to convert the current color scheme into a (mostly) generic CSS
-"     stylesheet which can be re-used. Alternate stylesheet support?
 "   * Undercurl support via CSS3, with fallback to dotted or something:
 "	https://groups.google.com/d/topic/vim_use/BzXA6He1pHg/discussion
 "   * Redo updates for modified default foldtext (v11) when/if the patch is
@@ -26,10 +39,7 @@
 "   * Test case +diff_one_file-dynamic_folds+expand_tabs-hover_unfold
 "		+ignore_conceal-ignore_folding+no_foldcolumn+no_pre+no_progress
 "		+number_lines-pre_wrap-use_css+use_xhtml+whole_filler.xhtml
-"     does not show the whole diff filler as it is supposed to.
-"   * Add option for not generating the hyperlink on stuff that looks like a
-"     URL? Or just color the link to fit with the colorscheme (and only special
-"     when hovering)?
+"     does not show the whole diff filler as it is supposed to?
 "   * Bug: when 'isprint' is wrong for the current encoding, will generate
 "     invalid content. Can/should anything be done about this? Maybe a separate
 "     plugin to correct 'isprint' based on encoding?
@@ -43,7 +53,6 @@
 "	- listchars support
 "	- full-line background highlight
 "	- other?
-"   * Explicitly trigger IE8+ Standards Mode? Doesn't seem necessary yet.
 "   * Make it so deleted lines in a diff don't create side-scrolling (get it
 "     free with full-line background highlight above).
 "   * Restore open/closed folds and cursor position after processing each file
@@ -58,92 +67,112 @@
 if exists('g:loaded_2html_plugin')
   finish
 endif
-let g:loaded_2html_plugin = 'vim7.3_v12'
+let g:loaded_2html_plugin = 'vim7.4_v1'
 
 "
 " Changelog: {{{
+"   7.4_v1  (this version): Fix modeline mangling for new "Vim:" format, and
+"			    also for version-specific modelines like "vim>703:".
 "
-"   7.3_v12 (this version): Fix modeline mangling to also work for when multiple
-"                           highlight groups make up the start-of-modeline text.
-"                           Improve render time of page with uncopyable regions
-"                           by not using one-input-per-char. Change name of
-"                           uncopyable option from html_unselectable to
-"                           html_prevent_copy. Added html_no_invalid option and
-"                           default to inserting invalid markup for uncopyable
-"                           regions to prevent MS Word from pasting undeletable
-"                            elements. Fix 'cpo' handling (Thilo Six).
-"                7.3_v12b1: Add html_unselectable option. Rework logic to
-"                           eliminate post-processing substitute commands in
-"                           favor of doing the work up front. Remove unnecessary
-"                           special treatment of 'LineNr' highlight group. Minor
-"                           speed improvements. Fix modeline mangling in
-"                           generated output so it works for text in the first
-"                           column. Fix missing line number and fold column in
-"                           diff filler lines. Fix that some fonts have a 1px
-"                           gap (using a dirty hack, improvements welcome). Add
-"                           "colorscheme" meta tag. Does NOT include support for
-"                           the new default foldtext added in v11, as the patch
-"                           adding it has not yet been included in Vim.
+"   7.3 updates: {{{
+"   7.3_v14 (ad6996a23e3e): Allow suppressing line number anchors using
+"			    g:html_line_ids=0. Allow customizing
+"			    important IDs (like line IDs and fold IDs) using
+"			    g:html_id_expr evalutated when the buffer conversion
+"			    is started.
+"   7.3_v13 (2eb30f341e8d): Keep foldmethod at manual in the generated file and
+"			    insert modeline to set it to manual.
+"			    Fix bug: diff mode with 2 unsaved buffers creates a
+"			    duplicate of one buffer instead of including both.
+"			    Add anchors to each line so you can put '#L123'
+"			    or '#123' at the end of the URL to jump to line 123
+"			    (idea by Andy Spencer). Add javascript to open folds
+"			    to show the anchor being jumped to if it is hidden.
+"			    Fix XML validation error: &nsbp; not part of XML.
+"			    Allow TOhtml to chain together with other commands
+"			    using |.
+"   7.3_v12 (9910cbff5f16): Fix modeline mangling to also work for when multiple
+"			    highlight groups make up the start-of-modeline text.
+"			    Improve render time of page with uncopyable regions
+"			    by not using one-input-per-char. Change name of
+"			    uncopyable option from html_unselectable to
+"			    html_prevent_copy. Added html_no_invalid option and
+"			    default to inserting invalid markup for uncopyable
+"			    regions to prevent MS Word from pasting undeletable
+"			     elements. Fix 'cpo' handling (Thilo Six).
+"		 7.3_v12b1: Add html_unselectable option. Rework logic to
+"			    eliminate post-processing substitute commands in
+"			    favor of doing the work up front. Remove unnecessary
+"			    special treatment of 'LineNr' highlight group. Minor
+"			    speed improvements. Fix modeline mangling in
+"			    generated output so it works for text in the first
+"			    column. Fix missing line number and fold column in
+"			    diff filler lines. Fix that some fonts have a 1px
+"			    gap (using a dirty hack, improvements welcome). Add
+"			    "colorscheme" meta tag. Does NOT include support for
+"			    the new default foldtext added in v11, as the patch
+"			    adding it has not yet been included in Vim.
 "   7.3_v11 ( unreleased ): Support new default foldtext from patch by Christian
-"                           Brabandt in
-"                           http://groups.google.com/d/topic/vim_dev/B6FSGfq9VoI/discussion.
-"                           This patch has not yet been included in Vim, thus
-"                           these changes are removed in the next version.
+"			    Brabandt in
+"			    http://groups.google.com/d/topic/vim_dev/B6FSGfq9VoI/discussion.
+"			    This patch has not yet been included in Vim, thus
+"			    these changes are removed in the next version.
 "   7.3_v10 (fd09a9c8468e): Fix error E684 when converting a range wholly inside
-"                           multiple nested folds with dynamic folding on.
-"                           Also fix problem with foldtext in this situation.
+"			    multiple nested folds with dynamic folding on.
+"			    Also fix problem with foldtext in this situation.
 "   7.3_v9  (0877b8d6370e): Add html_pre_wrap option active with html_use_css
-"                           and without html_no_pre, default value same as
-"                           'wrap' option, (Andy Spencer). Don't use
-"                           'fileencoding' for converted document encoding if
-"                           'buftype' indicates a special buffer which isn't
-"                           written.
+"			    and without html_no_pre, default value same as
+"			    'wrap' option, (Andy Spencer). Don't use
+"			    'fileencoding' for converted document encoding if
+"			    'buftype' indicates a special buffer which isn't
+"			    written.
 "   7.3_v8  (85c5a72551e2): Add html_expand_tabs option to allow leaving tab
-"                           characters in generated output (Andy Spencer).
-"                           Escape text that looks like a modeline so Vim
-"                           doesn't use anything in the converted HTML as a
-"                           modeline. Bugfixes: Fix folding when a fold starts
-"                           before the conversion range. Remove fold column when
-"                           there are no folds.
+"			    characters in generated output (Andy Spencer).
+"			    Escape text that looks like a modeline so Vim
+"			    doesn't use anything in the converted HTML as a
+"			    modeline. Bugfixes: Fix folding when a fold starts
+"			    before the conversion range. Remove fold column when
+"			    there are no folds.
 "   7.3_v7  (840c3cadb842): see betas released on vim_dev below:
-"                 7.3_v7b3: Fixed bug, convert Unicode to UTF-8 all the way.
-"                 7.3_v7b2: Remove automatic detection of encodings that are not
-"                           supported by all major browsers according to
-"                           http://wiki.whatwg.org/wiki/Web_Encodings and
-"                           convert to UTF-8 for all Unicode encodings. Make
-"                           HTML encoding to Vim encoding detection be
-"                           case-insensitive for built-in pairs.
-"                 7.3_v7b1: Remove use of setwinvar() function which cannot be
-"                           called in restricted mode (Andy Spencer). Use
-"                           'fencoding' instead of 'encoding' to determine by
-"                           charset, and make sure the 'fenc' of the generated
-"                           file matches its indicated charset. Add charsets for
-"                           all of Vim's natively supported encodings.
+"		  7.3_v7b3: Fixed bug, convert Unicode to UTF-8 all the way.
+"		  7.3_v7b2: Remove automatic detection of encodings that are not
+"			    supported by all major browsers according to
+"			    http://wiki.whatwg.org/wiki/Web_Encodings and
+"			    convert to UTF-8 for all Unicode encodings. Make
+"			    HTML encoding to Vim encoding detection be
+"			    case-insensitive for built-in pairs.
+"		  7.3_v7b1: Remove use of setwinvar() function which cannot be
+"			    called in restricted mode (Andy Spencer). Use
+"			    'fencoding' instead of 'encoding' to determine by
+"			    charset, and make sure the 'fenc' of the generated
+"			    file matches its indicated charset. Add charsets for
+"			    all of Vim's natively supported encodings.
 "   7.3_v6  (0d3f0e3d289b): Really fix bug with 'nowrapscan', 'magic' and other
-"                           user settings interfering with diff mode generation,
-"                           trailing whitespace (e.g. line number column) when
-"                           using html_no_pre, and bugs when using
-"                           html_hover_unfold.
+"			    user settings interfering with diff mode generation,
+"			    trailing whitespace (e.g. line number column) when
+"			    using html_no_pre, and bugs when using
+"			    html_hover_unfold.
 "   7.3_v5  ( unreleased ): Fix bug with 'nowrapscan' and also with out-of-sync
-"                           folds in diff mode when first line was folded.
+"			    folds in diff mode when first line was folded.
 "   7.3_v4  (7e008c174cc3): Bugfixes, especially for xhtml markup, and diff mode
 "   7.3_v3  (a29075150aee): Refactor option handling and make html_use_css
-"                           default to true when not set to anything. Use strict
-"                           doctypes where possible. Rename use_xhtml option to
-"                           html_use_xhtml for consistency. Use .xhtml extension
-"                           when using this option. Add meta tag for settings.
+"			    default to true when not set to anything. Use strict
+"			    doctypes where possible. Rename use_xhtml option to
+"			    html_use_xhtml for consistency. Use .xhtml extension
+"			    when using this option. Add meta tag for settings.
 "   7.3_v2  (80229a724a11): Fix syntax highlighting in diff mode to use both the
-"                           diff colors and the normal syntax colors
+"			    diff colors and the normal syntax colors
 "   7.3_v1  (e7751177126b): Add conceal support and meta tags in output
 "   Pre-v1 baseline: Mercurial changeset 3c9324c0800e
 "}}}
+"}}}
 
 " Define the :TOhtml command when:
 " - 'compatible' is not set
 " - this plugin was not already loaded
 " - user commands are available. {{{
 if !&cp && !exists(":TOhtml") && has("user_commands")
-  command -range=% TOhtml :call tohtml#Convert2HTML(, )
+  command -range=% -bar TOhtml :call tohtml#Convert2HTML(, )
 endif "}}}
 
 " Make sure any patches will probably use consistent indent
diff --git a/runtime/plugin/zipPlugin.vim b/runtime/plugin/zipPlugin.vim
index ebb6427f53..e9bd0dc4bd 100644
--- a/runtime/plugin/zipPlugin.vim
+++ b/runtime/plugin/zipPlugin.vim
@@ -1,9 +1,9 @@
 " zipPlugin.vim: Handles browsing zipfiles
 "            PLUGIN PORTION
-" Date:			Aug 15, 2011
-" Maintainer:	Charles E Campbell, Jr 
+" Date:			Jun 07, 2013
+" Maintainer:	Charles E Campbell 
 " License:		Vim License  (see vim's :help license)
-" Copyright:    Copyright (C) 2005-2011 Charles E. Campbell, Jr. {{{1
+" Copyright:    Copyright (C) 2005-2013 Charles E. Campbell {{{1
 "               Permission is hereby granted to use and distribute this code,
 "               with or without modifications, provided that this copyright
 "               notice is copied with it. Like anything else that's free,
@@ -20,10 +20,16 @@
 if &cp || exists("g:loaded_zipPlugin")
  finish
 endif
-let g:loaded_zipPlugin = "v25"
+let g:loaded_zipPlugin = "v27"
 let s:keepcpo          = &cpo
 set cpo&vim
 
+" ---------------------------------------------------------------------
+" Options: {{{1
+if !exists("g:zipPlugin_ext")
+ let g:zipPlugin_ext= '*.zip,*.jar,*.xpi,*.ja,*.war,*.ear,*.celzip,*.oxt,*.kmz,*.wsz,*.xap,*.docx,*.docm,*.dotx,*.dotm,*.potx,*.potm,*.ppsx,*.ppsm,*.pptx,*.pptm,*.ppam,*.sldx,*.thmx,*.xlam,*.xlsx,*.xlsm,*.xlsb,*.xltx,*.xltm,*.xlam,*.crtx,*.vdw,*.glox,*.gcsx,*.gqsx'
+endif
+
 " ---------------------------------------------------------------------
 " Public Interface: {{{1
 augroup zip
@@ -40,7 +46,7 @@ augroup zip
   au FileWriteCmd zipfile:*/*	call zip#Write(expand(""))
  endif
 
- au BufReadCmd   *.zip,*.jar,*.xpi,*.war,*.ear,*.celzip,*.oxt		call zip#Browse(expand(""))
+ exe "au BufReadCmd ".g:zipPlugin_ext.' call zip#Browse(expand(""))'
 augroup END
 
 " ---------------------------------------------------------------------
diff --git a/runtime/scripts.vim b/runtime/scripts.vim
index 75275785fb..251e4c8f08 100644
--- a/runtime/scripts.vim
+++ b/runtime/scripts.vim
@@ -1,7 +1,7 @@
 " Vim support file to detect file types in scripts
 "
 " Maintainer:	Bram Moolenaar 
-" Last change:	2010 Sep 22
+" Last change:	2013 May 24
 
 " This file is called by an autocommand for every file that has just been
 " loaded into a buffer.  It checks if the type of file can be recognized by
@@ -152,6 +152,10 @@ if s:line1 =~ "^#!"
   elseif s:name =~ 'cfengine'
     set ft=cfengine
 
+    " Erlang scripts
+  elseif s:name =~ 'escript'
+    set ft=erlang
+
   endif
   unlet s:name
 
@@ -198,7 +202,8 @@ else
     " - "=== ", line of "=", "---", "+++ " (SVK diff)
     " - "=== ", "--- ", "+++ " (bzr diff, common case)
     " - "=== (removed|added|renamed|modified)" (bzr diff, alternative)
-  elseif s:line1 =~ '^\(diff\>\|Only in \|\d\+\(,\d\+\)\=[cda]\d\+\>\|# It was generated by makepatch \|Index:\s\+\f\+\r\=$\|===== \f\+ \d\+\.\d\+ vs edited\|==== //\f\+#\d\+\)'
+    " - "# HG changeset patch" in first line (Mercurial export format)
+  elseif s:line1 =~ '^\(diff\>\|Only in \|\d\+\(,\d\+\)\=[cda]\d\+\>\|# It was generated by makepatch \|Index:\s\+\f\+\r\=$\|===== \f\+ \d\+\.\d\+ vs edited\|==== //\f\+#\d\+\|# HG changeset patch\)'
 	\ || (s:line1 =~ '^--- ' && s:line2 =~ '^+++ ')
 	\ || (s:line1 =~ '^\* looking for ' && s:line2 =~ '^\* comparing to ')
 	\ || (s:line1 =~ '^\*\*\* ' && s:line2 =~ '^--- ')
@@ -326,6 +331,17 @@ else
   elseif s:line1 =~ '^\(commit\|tree\|object\) \x\{40\}\>\|^tag \S\+$'
     set ft=git
 
+   " Gprof (gnu profiler)
+   elseif s:line1 == 'Flat profile:'
+     \ && s:line2 == ''
+     \ && s:line3 =~ '^Each sample counts as .* seconds.$'
+     set ft=gprof
+
+  " Erlang terms
+  " (See also: http://www.gnu.org/software/emacs/manual/html_node/emacs/Choosing-Modes.html#Choosing-Modes)
+  elseif s:line1 =~? '-\*-.*erlang.*-\*-'
+    set ft=erlang
+
   " CVS diff
   else
     let s:lnum = 1
diff --git a/runtime/spell/br/br_FR.diff b/runtime/spell/br/br_FR.diff
index 4c890dfa58..e69de29bb2 100644
--- a/runtime/spell/br/br_FR.diff
+++ b/runtime/spell/br/br_FR.diff
@@ -1,23 +0,0 @@
-*** br_FR.aff.orig	2012-08-01 22:40:24.000000000 +0200
---- br_FR.aff	2012-08-01 22:46:03.028851510 +0200
-***************
-*** 13,20 ****
-  SET UTF-8
-  TRY esiaùnñrtolcdugmphbyfvkwzESIAÙNÑRTOLCDUGMPHBYFVKWZ'
-  
-  # Permet à l'utilitaire en ligne de commande hunspell de fonctionner avec les mots contenant des quotes (lec'hienn, ...)
-! WORDCHARS '
-  
-  FLAG long
-  
---- 13,22 ----
-  SET UTF-8
-  TRY esiaùnñrtolcdugmphbyfvkwzESIAÙNÑRTOLCDUGMPHBYFVKWZ'
-  
-+ MIDWORD '
-+ 
-  # Permet à l'utilitaire en ligne de commande hunspell de fonctionner avec les mots contenant des quotes (lec'hienn, ...)
-! WORDCHARS '-
-  
-  FLAG long
-  
diff --git a/runtime/spell/br/main.aap b/runtime/spell/br/main.aap
index 255dac7b53..75035be037 100644
--- a/runtime/spell/br/main.aap
+++ b/runtime/spell/br/main.aap
@@ -25,16 +25,16 @@ $SPELLDIR/br.utf-8.spl : $FILES
 #
 # Fetching the files from OpenOffice.org.
 #
-OODIR = http://extensions.services.openoffice.org/e-files/2207/6
-:attr {fetch = $OODIR/%file%} dict-br_0.8.oxt
+OODIR = http://extensions.libreoffice.org/extension-center/an-drouizig-breton-spellchecker/releases/0.11/
+:attr {fetch = $OODIR/%file%} dict-br-0.11.oxt
 
 # The files don't depend on the .zip file so that we can delete it.
 # Only download the zip file if the targets don't exist.
 br_FR.aff br_FR.dic: {buildcheck=}
         :assertpkg unzip patch
-        :fetch dict-br_0.8.oxt
-        :sys $UNZIP dict-br_0.8.oxt
-        :delete dict-br_0.8.oxt
+        :fetch dict-br-0.11.oxt
+        :sys $UNZIP dict-br-0.11.oxt
+        :delete dict-br-0.11.oxt
         :copy dictionaries/br_FR.aff br_FR.aff
         :copy dictionaries/br_FR.dic br_FR.dic
         # The br_FR.aff file contains a BOM, remove it.
@@ -65,12 +65,12 @@ diff:
 
 check:
         :assertpkg unzip diff
-        :fetch dict-br_0.8.oxt
+        :fetch dict-br-0.11.oxt
         :mkdir tmp
         :cd tmp
         @try:
             @import stat
-            :sys $UNZIP ../dict-br_0.8.oxt
+            :sys $UNZIP ../dict-br-0.11.oxt
             :sys {force} diff ../dictionaries/br_FR.aff br_FR.aff >d
             @if os.stat('d')[stat.ST_SIZE] > 0:
                 :copy br_FR.aff ../br_FR.new.aff
@@ -80,7 +80,7 @@ check:
         @finally:
             :cd ..
             :delete {r}{f}{q} tmp
-            :delete dict-br_0.8.oxt
+            :delete dict-br-0.11.oxt
 
 
 # vim: set sts=4 sw=4 :
diff --git a/runtime/synmenu.vim b/runtime/synmenu.vim
index 92678d149c..be88f1c539 100644
--- a/runtime/synmenu.vim
+++ b/runtime/synmenu.vim
@@ -2,7 +2,7 @@
 " This file is normally sourced from menu.vim.
 "
 " Maintainer:	Bram Moolenaar 
-" Last Change:	2010 Jul 26
+" Last Change:	2013 Jun 24
 
 " Define the SetSyn function, used for the Syntax menu entries.
 " Set 'filetype' and also 'syntax' if it is manually selected.
@@ -53,47 +53,49 @@ an 50.10.240 &Syntax.AB.ANTLR :cal SetSyn("antlr")
 an 50.10.250 &Syntax.AB.Apache\ config :cal SetSyn("apache")
 an 50.10.260 &Syntax.AB.Apache-style\ config :cal SetSyn("apachestyle")
 an 50.10.270 &Syntax.AB.Applix\ ELF :cal SetSyn("elf")
-an 50.10.280 &Syntax.AB.Arc\ Macro\ Language :cal SetSyn("aml")
-an 50.10.290 &Syntax.AB.Arch\ inventory :cal SetSyn("arch")
-an 50.10.300 &Syntax.AB.ART :cal SetSyn("art")
-an 50.10.310 &Syntax.AB.ASP\ with\ VBScript :cal SetSyn("aspvbs")
-an 50.10.320 &Syntax.AB.ASP\ with\ Perl :cal SetSyn("aspperl")
-an 50.10.330 &Syntax.AB.Assembly.680x0 :cal SetSyn("asm68k")
-an 50.10.340 &Syntax.AB.Assembly.Flat :cal SetSyn("fasm")
-an 50.10.350 &Syntax.AB.Assembly.GNU :cal SetSyn("asm")
-an 50.10.360 &Syntax.AB.Assembly.GNU\ H-8300 :cal SetSyn("asmh8300")
-an 50.10.370 &Syntax.AB.Assembly.Intel\ IA-64 :cal SetSyn("ia64")
-an 50.10.380 &Syntax.AB.Assembly.Microsoft :cal SetSyn("masm")
-an 50.10.390 &Syntax.AB.Assembly.Netwide :cal SetSyn("nasm")
-an 50.10.400 &Syntax.AB.Assembly.PIC :cal SetSyn("pic")
-an 50.10.410 &Syntax.AB.Assembly.Turbo :cal SetSyn("tasm")
-an 50.10.420 &Syntax.AB.Assembly.VAX\ Macro\ Assembly :cal SetSyn("vmasm")
-an 50.10.430 &Syntax.AB.Assembly.Z-80 :cal SetSyn("z8a")
-an 50.10.440 &Syntax.AB.Assembly.xa\ 6502\ cross\ assember :cal SetSyn("a65")
-an 50.10.450 &Syntax.AB.ASN\.1 :cal SetSyn("asn")
-an 50.10.460 &Syntax.AB.Asterisk\ config :cal SetSyn("asterisk")
-an 50.10.470 &Syntax.AB.Asterisk\ voicemail\ config :cal SetSyn("asteriskvm")
-an 50.10.480 &Syntax.AB.Atlas :cal SetSyn("atlas")
-an 50.10.490 &Syntax.AB.AutoHotKey :cal SetSyn("autohotkey")
-an 50.10.500 &Syntax.AB.AutoIt :cal SetSyn("autoit")
-an 50.10.510 &Syntax.AB.Automake :cal SetSyn("automake")
-an 50.10.520 &Syntax.AB.Avenue :cal SetSyn("ave")
-an 50.10.530 &Syntax.AB.Awk :cal SetSyn("awk")
-an 50.10.540 &Syntax.AB.AYacc :cal SetSyn("ayacc")
-an 50.10.560 &Syntax.AB.B :cal SetSyn("b")
-an 50.10.570 &Syntax.AB.Baan :cal SetSyn("baan")
-an 50.10.580 &Syntax.AB.Basic.FreeBasic :cal SetSyn("freebasic")
-an 50.10.590 &Syntax.AB.Basic.IBasic :cal SetSyn("ibasic")
-an 50.10.600 &Syntax.AB.Basic.QBasic :cal SetSyn("basic")
-an 50.10.610 &Syntax.AB.Basic.Visual\ Basic :cal SetSyn("vb")
-an 50.10.620 &Syntax.AB.Bazaar\ commit\ file :cal SetSyn("bzr")
-an 50.10.630 &Syntax.AB.BC\ calculator :cal SetSyn("bc")
-an 50.10.640 &Syntax.AB.BDF\ font :cal SetSyn("bdf")
-an 50.10.650 &Syntax.AB.BibTeX.Bibliography\ database :cal SetSyn("bib")
-an 50.10.660 &Syntax.AB.BibTeX.Bibliography\ Style :cal SetSyn("bst")
-an 50.10.670 &Syntax.AB.BIND.BIND\ config :cal SetSyn("named")
-an 50.10.680 &Syntax.AB.BIND.BIND\ zone :cal SetSyn("bindzone")
-an 50.10.690 &Syntax.AB.Blank :cal SetSyn("blank")
+an 50.10.280 &Syntax.AB.APT\ config :cal SetSyn("aptconf")
+an 50.10.290 &Syntax.AB.Arc\ Macro\ Language :cal SetSyn("aml")
+an 50.10.300 &Syntax.AB.Arch\ inventory :cal SetSyn("arch")
+an 50.10.310 &Syntax.AB.ART :cal SetSyn("art")
+an 50.10.320 &Syntax.AB.Ascii\ Doc :cal SetSyn("asciidoc")
+an 50.10.330 &Syntax.AB.ASP\ with\ VBScript :cal SetSyn("aspvbs")
+an 50.10.340 &Syntax.AB.ASP\ with\ Perl :cal SetSyn("aspperl")
+an 50.10.350 &Syntax.AB.Assembly.680x0 :cal SetSyn("asm68k")
+an 50.10.360 &Syntax.AB.Assembly.Flat :cal SetSyn("fasm")
+an 50.10.370 &Syntax.AB.Assembly.GNU :cal SetSyn("asm")
+an 50.10.380 &Syntax.AB.Assembly.GNU\ H-8300 :cal SetSyn("asmh8300")
+an 50.10.390 &Syntax.AB.Assembly.Intel\ IA-64 :cal SetSyn("ia64")
+an 50.10.400 &Syntax.AB.Assembly.Microsoft :cal SetSyn("masm")
+an 50.10.410 &Syntax.AB.Assembly.Netwide :cal SetSyn("nasm")
+an 50.10.420 &Syntax.AB.Assembly.PIC :cal SetSyn("pic")
+an 50.10.430 &Syntax.AB.Assembly.Turbo :cal SetSyn("tasm")
+an 50.10.440 &Syntax.AB.Assembly.VAX\ Macro\ Assembly :cal SetSyn("vmasm")
+an 50.10.450 &Syntax.AB.Assembly.Z-80 :cal SetSyn("z8a")
+an 50.10.460 &Syntax.AB.Assembly.xa\ 6502\ cross\ assember :cal SetSyn("a65")
+an 50.10.470 &Syntax.AB.ASN\.1 :cal SetSyn("asn")
+an 50.10.480 &Syntax.AB.Asterisk\ config :cal SetSyn("asterisk")
+an 50.10.490 &Syntax.AB.Asterisk\ voicemail\ config :cal SetSyn("asteriskvm")
+an 50.10.500 &Syntax.AB.Atlas :cal SetSyn("atlas")
+an 50.10.510 &Syntax.AB.AutoHotKey :cal SetSyn("autohotkey")
+an 50.10.520 &Syntax.AB.AutoIt :cal SetSyn("autoit")
+an 50.10.530 &Syntax.AB.Automake :cal SetSyn("automake")
+an 50.10.540 &Syntax.AB.Avenue :cal SetSyn("ave")
+an 50.10.550 &Syntax.AB.Awk :cal SetSyn("awk")
+an 50.10.560 &Syntax.AB.AYacc :cal SetSyn("ayacc")
+an 50.10.580 &Syntax.AB.B :cal SetSyn("b")
+an 50.10.590 &Syntax.AB.Baan :cal SetSyn("baan")
+an 50.10.600 &Syntax.AB.Basic.FreeBasic :cal SetSyn("freebasic")
+an 50.10.610 &Syntax.AB.Basic.IBasic :cal SetSyn("ibasic")
+an 50.10.620 &Syntax.AB.Basic.QBasic :cal SetSyn("basic")
+an 50.10.630 &Syntax.AB.Basic.Visual\ Basic :cal SetSyn("vb")
+an 50.10.640 &Syntax.AB.Bazaar\ commit\ file :cal SetSyn("bzr")
+an 50.10.650 &Syntax.AB.BC\ calculator :cal SetSyn("bc")
+an 50.10.660 &Syntax.AB.BDF\ font :cal SetSyn("bdf")
+an 50.10.670 &Syntax.AB.BibTeX.Bibliography\ database :cal SetSyn("bib")
+an 50.10.680 &Syntax.AB.BibTeX.Bibliography\ Style :cal SetSyn("bst")
+an 50.10.690 &Syntax.AB.BIND.BIND\ config :cal SetSyn("named")
+an 50.10.700 &Syntax.AB.BIND.BIND\ zone :cal SetSyn("bindzone")
+an 50.10.710 &Syntax.AB.Blank :cal SetSyn("blank")
 an 50.20.100 &Syntax.C.C :cal SetSyn("c")
 an 50.20.110 &Syntax.C.C++ :cal SetSyn("cpp")
 an 50.20.120 &Syntax.C.C# :cal SetSyn("cs")
@@ -113,27 +115,29 @@ an 50.20.250 &Syntax.C.ChordPro :cal SetSyn("chordpro")
 an 50.20.260 &Syntax.C.Clean :cal SetSyn("clean")
 an 50.20.270 &Syntax.C.Clever :cal SetSyn("cl")
 an 50.20.280 &Syntax.C.Clipper :cal SetSyn("clipper")
-an 50.20.290 &Syntax.C.Cmake :cal SetSyn("cmake")
-an 50.20.300 &Syntax.C.Cmusrc :cal SetSyn("cmusrc")
-an 50.20.310 &Syntax.C.Cobol :cal SetSyn("cobol")
-an 50.20.320 &Syntax.C.Coco/R :cal SetSyn("coco")
-an 50.20.330 &Syntax.C.Cold\ Fusion :cal SetSyn("cf")
-an 50.20.340 &Syntax.C.Conary\ Recipe :cal SetSyn("conaryrecipe")
-an 50.20.350 &Syntax.C.Config.Cfg\ Config\ file :cal SetSyn("cfg")
-an 50.20.360 &Syntax.C.Config.Configure\.in :cal SetSyn("config")
-an 50.20.370 &Syntax.C.Config.Generic\ Config\ file :cal SetSyn("conf")
-an 50.20.380 &Syntax.C.CRM114 :cal SetSyn("crm")
-an 50.20.390 &Syntax.C.Crontab :cal SetSyn("crontab")
-an 50.20.400 &Syntax.C.CSP :cal SetSyn("csp")
-an 50.20.410 &Syntax.C.Ctrl-H :cal SetSyn("ctrlh")
-an 50.20.420 &Syntax.C.Cucumber :cal SetSyn("cucumber")
-an 50.20.430 &Syntax.C.CUDA :cal SetSyn("cuda")
-an 50.20.440 &Syntax.C.CUPL.CUPL :cal SetSyn("cupl")
-an 50.20.450 &Syntax.C.CUPL.Simulation :cal SetSyn("cuplsim")
-an 50.20.460 &Syntax.C.CVS.commit\ file :cal SetSyn("cvs")
-an 50.20.470 &Syntax.C.CVS.cvsrc :cal SetSyn("cvsrc")
-an 50.20.480 &Syntax.C.Cyn++ :cal SetSyn("cynpp")
-an 50.20.490 &Syntax.C.Cynlib :cal SetSyn("cynlib")
+an 50.20.290 &Syntax.C.Clojure :cal SetSyn("clojure")
+an 50.20.300 &Syntax.C.Cmake :cal SetSyn("cmake")
+an 50.20.310 &Syntax.C.Cmusrc :cal SetSyn("cmusrc")
+an 50.20.320 &Syntax.C.Cobol :cal SetSyn("cobol")
+an 50.20.330 &Syntax.C.Coco/R :cal SetSyn("coco")
+an 50.20.340 &Syntax.C.Cold\ Fusion :cal SetSyn("cf")
+an 50.20.350 &Syntax.C.Conary\ Recipe :cal SetSyn("conaryrecipe")
+an 50.20.360 &Syntax.C.Config.Cfg\ Config\ file :cal SetSyn("cfg")
+an 50.20.370 &Syntax.C.Config.Configure\.in :cal SetSyn("config")
+an 50.20.380 &Syntax.C.Config.Generic\ Config\ file :cal SetSyn("conf")
+an 50.20.390 &Syntax.C.CRM114 :cal SetSyn("crm")
+an 50.20.400 &Syntax.C.Crontab :cal SetSyn("crontab")
+an 50.20.410 &Syntax.C.CSDL :cal SetSyn("csdl")
+an 50.20.420 &Syntax.C.CSP :cal SetSyn("csp")
+an 50.20.430 &Syntax.C.Ctrl-H :cal SetSyn("ctrlh")
+an 50.20.440 &Syntax.C.Cucumber :cal SetSyn("cucumber")
+an 50.20.450 &Syntax.C.CUDA :cal SetSyn("cuda")
+an 50.20.460 &Syntax.C.CUPL.CUPL :cal SetSyn("cupl")
+an 50.20.470 &Syntax.C.CUPL.Simulation :cal SetSyn("cuplsim")
+an 50.20.480 &Syntax.C.CVS.commit\ file :cal SetSyn("cvs")
+an 50.20.490 &Syntax.C.CVS.cvsrc :cal SetSyn("cvsrc")
+an 50.20.500 &Syntax.C.Cyn++ :cal SetSyn("cynpp")
+an 50.20.510 &Syntax.C.Cynlib :cal SetSyn("cynlib")
 an 50.30.100 &Syntax.DE.D :cal SetSyn("d")
 an 50.30.110 &Syntax.DE.Datascript :cal SetSyn("datascript")
 an 50.30.120 &Syntax.DE.Debian.Debian\ ChangeLog :cal SetSyn("debchangelog")
@@ -148,71 +152,77 @@ an 50.30.200 &Syntax.DE.Digital\ Command\ Lang :cal SetSyn("dcl")
 an 50.30.210 &Syntax.DE.Dircolors :cal SetSyn("dircolors")
 an 50.30.220 &Syntax.DE.Django\ template :cal SetSyn("django")
 an 50.30.230 &Syntax.DE.DNS/BIND\ zone :cal SetSyn("bindzone")
-an 50.30.240 &Syntax.DE.DocBook.auto-detect :cal SetSyn("docbk")
-an 50.30.250 &Syntax.DE.DocBook.SGML :cal SetSyn("docbksgml")
-an 50.30.260 &Syntax.DE.DocBook.XML :cal SetSyn("docbkxml")
-an 50.30.270 &Syntax.DE.Dot :cal SetSyn("dot")
-an 50.30.280 &Syntax.DE.Doxygen.C\ with\ doxygen :cal SetSyn("c.doxygen")
-an 50.30.290 &Syntax.DE.Doxygen.C++\ with\ doxygen :cal SetSyn("cpp.doxygen")
-an 50.30.300 &Syntax.DE.Doxygen.IDL\ with\ doxygen :cal SetSyn("idl.doxygen")
-an 50.30.310 &Syntax.DE.Doxygen.Java\ with\ doxygen :cal SetSyn("java.doxygen")
-an 50.30.320 &Syntax.DE.Dracula :cal SetSyn("dracula")
-an 50.30.330 &Syntax.DE.DSSSL :cal SetSyn("dsl")
-an 50.30.340 &Syntax.DE.DTD :cal SetSyn("dtd")
-an 50.30.350 &Syntax.DE.DTML\ (Zope) :cal SetSyn("dtml")
-an 50.30.360 &Syntax.DE.DTrace :cal SetSyn("dtrace")
-an 50.30.370 &Syntax.DE.Dylan.Dylan :cal SetSyn("dylan")
-an 50.30.380 &Syntax.DE.Dylan.Dylan\ interface :cal SetSyn("dylanintr")
-an 50.30.390 &Syntax.DE.Dylan.Dylan\ lid :cal SetSyn("dylanlid")
-an 50.30.410 &Syntax.DE.EDIF :cal SetSyn("edif")
-an 50.30.420 &Syntax.DE.Eiffel :cal SetSyn("eiffel")
-an 50.30.430 &Syntax.DE.Elinks\ config :cal SetSyn("elinks")
-an 50.30.440 &Syntax.DE.Elm\ filter\ rules :cal SetSyn("elmfilt")
-an 50.30.450 &Syntax.DE.Embedix\ Component\ Description :cal SetSyn("ecd")
-an 50.30.460 &Syntax.DE.ERicsson\ LANGuage :cal SetSyn("erlang")
-an 50.30.470 &Syntax.DE.ESMTP\ rc :cal SetSyn("esmtprc")
-an 50.30.480 &Syntax.DE.ESQL-C :cal SetSyn("esqlc")
-an 50.30.490 &Syntax.DE.Essbase\ script :cal SetSyn("csc")
-an 50.30.500 &Syntax.DE.Esterel :cal SetSyn("esterel")
-an 50.30.510 &Syntax.DE.Eterm\ config :cal SetSyn("eterm")
-an 50.30.520 &Syntax.DE.Eviews :cal SetSyn("eviews")
-an 50.30.530 &Syntax.DE.Exim\ conf :cal SetSyn("exim")
-an 50.30.540 &Syntax.DE.Expect :cal SetSyn("expect")
-an 50.30.550 &Syntax.DE.Exports :cal SetSyn("exports")
-an 50.40.100 &Syntax.FG.Fantom :cal SetSyn("fan")
-an 50.40.110 &Syntax.FG.Fetchmail :cal SetSyn("fetchmail")
-an 50.40.120 &Syntax.FG.FlexWiki :cal SetSyn("flexwiki")
-an 50.40.130 &Syntax.FG.Focus\ Executable :cal SetSyn("focexec")
-an 50.40.140 &Syntax.FG.Focus\ Master :cal SetSyn("master")
-an 50.40.150 &Syntax.FG.FORM :cal SetSyn("form")
-an 50.40.160 &Syntax.FG.Forth :cal SetSyn("forth")
-an 50.40.170 &Syntax.FG.Fortran :cal SetSyn("fortran")
-an 50.40.180 &Syntax.FG.FoxPro :cal SetSyn("foxpro")
-an 50.40.190 &Syntax.FG.FrameScript :cal SetSyn("framescript")
-an 50.40.200 &Syntax.FG.Fstab :cal SetSyn("fstab")
-an 50.40.210 &Syntax.FG.Fvwm.Fvwm\ configuration :cal SetSyn("fvwm1")
-an 50.40.220 &Syntax.FG.Fvwm.Fvwm2\ configuration :cal SetSyn("fvwm2")
-an 50.40.230 &Syntax.FG.Fvwm.Fvwm2\ configuration\ with\ M4 :cal SetSyn("fvwm2m4")
-an 50.40.250 &Syntax.FG.GDB\ command\ file :cal SetSyn("gdb")
-an 50.40.260 &Syntax.FG.GDMO :cal SetSyn("gdmo")
-an 50.40.270 &Syntax.FG.Gedcom :cal SetSyn("gedcom")
-an 50.40.280 &Syntax.FG.Git.Output :cal SetSyn("git")
-an 50.40.290 &Syntax.FG.Git.Commit :cal SetSyn("gitcommit")
-an 50.40.300 &Syntax.FG.Git.Config :cal SetSyn("gitconfig")
-an 50.40.310 &Syntax.FG.Git.Rebase :cal SetSyn("gitrebase")
-an 50.40.320 &Syntax.FG.Git.Send\ Email :cal SetSyn("gitsendemail")
-an 50.40.330 &Syntax.FG.Gkrellmrc :cal SetSyn("gkrellmrc")
-an 50.40.340 &Syntax.FG.GP :cal SetSyn("gp")
-an 50.40.350 &Syntax.FG.GPG :cal SetSyn("gpg")
-an 50.40.360 &Syntax.FG.Group\ file :cal SetSyn("group")
-an 50.40.370 &Syntax.FG.Grub :cal SetSyn("grub")
-an 50.40.380 &Syntax.FG.GNU\ Server\ Pages :cal SetSyn("gsp")
-an 50.40.390 &Syntax.FG.GNUplot :cal SetSyn("gnuplot")
-an 50.40.400 &Syntax.FG.GrADS\ scripts :cal SetSyn("grads")
-an 50.40.410 &Syntax.FG.Gretl :cal SetSyn("gretl")
-an 50.40.420 &Syntax.FG.Groff :cal SetSyn("groff")
-an 50.40.430 &Syntax.FG.Groovy :cal SetSyn("groovy")
-an 50.40.440 &Syntax.FG.GTKrc :cal SetSyn("gtkrc")
+an 50.30.240 &Syntax.DE.Dnsmasq\ config :cal SetSyn("dnsmasq")
+an 50.30.250 &Syntax.DE.DocBook.auto-detect :cal SetSyn("docbk")
+an 50.30.260 &Syntax.DE.DocBook.SGML :cal SetSyn("docbksgml")
+an 50.30.270 &Syntax.DE.DocBook.XML :cal SetSyn("docbkxml")
+an 50.30.280 &Syntax.DE.Dot :cal SetSyn("dot")
+an 50.30.290 &Syntax.DE.Doxygen.C\ with\ doxygen :cal SetSyn("c.doxygen")
+an 50.30.300 &Syntax.DE.Doxygen.C++\ with\ doxygen :cal SetSyn("cpp.doxygen")
+an 50.30.310 &Syntax.DE.Doxygen.IDL\ with\ doxygen :cal SetSyn("idl.doxygen")
+an 50.30.320 &Syntax.DE.Doxygen.Java\ with\ doxygen :cal SetSyn("java.doxygen")
+an 50.30.330 &Syntax.DE.Dracula :cal SetSyn("dracula")
+an 50.30.340 &Syntax.DE.DSSSL :cal SetSyn("dsl")
+an 50.30.350 &Syntax.DE.DTD :cal SetSyn("dtd")
+an 50.30.360 &Syntax.DE.DTML\ (Zope) :cal SetSyn("dtml")
+an 50.30.370 &Syntax.DE.DTrace :cal SetSyn("dtrace")
+an 50.30.380 &Syntax.DE.Dts/dtsi :cal SetSyn("dts")
+an 50.30.390 &Syntax.DE.Dylan.Dylan :cal SetSyn("dylan")
+an 50.30.400 &Syntax.DE.Dylan.Dylan\ interface :cal SetSyn("dylanintr")
+an 50.30.410 &Syntax.DE.Dylan.Dylan\ lid :cal SetSyn("dylanlid")
+an 50.30.430 &Syntax.DE.EDIF :cal SetSyn("edif")
+an 50.30.440 &Syntax.DE.Eiffel :cal SetSyn("eiffel")
+an 50.30.450 &Syntax.DE.Elinks\ config :cal SetSyn("elinks")
+an 50.30.460 &Syntax.DE.Elm\ filter\ rules :cal SetSyn("elmfilt")
+an 50.30.470 &Syntax.DE.Embedix\ Component\ Description :cal SetSyn("ecd")
+an 50.30.480 &Syntax.DE.ERicsson\ LANGuage :cal SetSyn("erlang")
+an 50.30.490 &Syntax.DE.ESMTP\ rc :cal SetSyn("esmtprc")
+an 50.30.500 &Syntax.DE.ESQL-C :cal SetSyn("esqlc")
+an 50.30.510 &Syntax.DE.Essbase\ script :cal SetSyn("csc")
+an 50.30.520 &Syntax.DE.Esterel :cal SetSyn("esterel")
+an 50.30.530 &Syntax.DE.Eterm\ config :cal SetSyn("eterm")
+an 50.30.540 &Syntax.DE.Eviews :cal SetSyn("eviews")
+an 50.30.550 &Syntax.DE.Exim\ conf :cal SetSyn("exim")
+an 50.30.560 &Syntax.DE.Expect :cal SetSyn("expect")
+an 50.30.570 &Syntax.DE.Exports :cal SetSyn("exports")
+an 50.40.100 &Syntax.FG.Falcon :cal SetSyn("falcon")
+an 50.40.110 &Syntax.FG.Fantom :cal SetSyn("fan")
+an 50.40.120 &Syntax.FG.Fetchmail :cal SetSyn("fetchmail")
+an 50.40.130 &Syntax.FG.FlexWiki :cal SetSyn("flexwiki")
+an 50.40.140 &Syntax.FG.Focus\ Executable :cal SetSyn("focexec")
+an 50.40.150 &Syntax.FG.Focus\ Master :cal SetSyn("master")
+an 50.40.160 &Syntax.FG.FORM :cal SetSyn("form")
+an 50.40.170 &Syntax.FG.Forth :cal SetSyn("forth")
+an 50.40.180 &Syntax.FG.Fortran :cal SetSyn("fortran")
+an 50.40.190 &Syntax.FG.FoxPro :cal SetSyn("foxpro")
+an 50.40.200 &Syntax.FG.FrameScript :cal SetSyn("framescript")
+an 50.40.210 &Syntax.FG.Fstab :cal SetSyn("fstab")
+an 50.40.220 &Syntax.FG.Fvwm.Fvwm\ configuration :cal SetSyn("fvwm1")
+an 50.40.230 &Syntax.FG.Fvwm.Fvwm2\ configuration :cal SetSyn("fvwm2")
+an 50.40.240 &Syntax.FG.Fvwm.Fvwm2\ configuration\ with\ M4 :cal SetSyn("fvwm2m4")
+an 50.40.260 &Syntax.FG.GDB\ command\ file :cal SetSyn("gdb")
+an 50.40.270 &Syntax.FG.GDMO :cal SetSyn("gdmo")
+an 50.40.280 &Syntax.FG.Gedcom :cal SetSyn("gedcom")
+an 50.40.290 &Syntax.FG.Git.Output :cal SetSyn("git")
+an 50.40.300 &Syntax.FG.Git.Commit :cal SetSyn("gitcommit")
+an 50.40.310 &Syntax.FG.Git.Config :cal SetSyn("gitconfig")
+an 50.40.320 &Syntax.FG.Git.Rebase :cal SetSyn("gitrebase")
+an 50.40.330 &Syntax.FG.Git.Send\ Email :cal SetSyn("gitsendemail")
+an 50.40.340 &Syntax.FG.Gitolite :cal SetSyn("gitolite")
+an 50.40.350 &Syntax.FG.Gkrellmrc :cal SetSyn("gkrellmrc")
+an 50.40.360 &Syntax.FG.Gnash :cal SetSyn("gnash")
+an 50.40.370 &Syntax.FG.GP :cal SetSyn("gp")
+an 50.40.380 &Syntax.FG.GPG :cal SetSyn("gpg")
+an 50.40.390 &Syntax.FG.Grof :cal SetSyn("gprof")
+an 50.40.400 &Syntax.FG.Group\ file :cal SetSyn("group")
+an 50.40.410 &Syntax.FG.Grub :cal SetSyn("grub")
+an 50.40.420 &Syntax.FG.GNU\ Server\ Pages :cal SetSyn("gsp")
+an 50.40.430 &Syntax.FG.GNUplot :cal SetSyn("gnuplot")
+an 50.40.440 &Syntax.FG.GrADS\ scripts :cal SetSyn("grads")
+an 50.40.450 &Syntax.FG.Gretl :cal SetSyn("gretl")
+an 50.40.460 &Syntax.FG.Groff :cal SetSyn("groff")
+an 50.40.470 &Syntax.FG.Groovy :cal SetSyn("groovy")
+an 50.40.480 &Syntax.FG.GTKrc :cal SetSyn("gtkrc")
 an 50.50.100 &Syntax.HIJK.Haml :cal SetSyn("haml")
 an 50.50.110 &Syntax.HIJK.Hamster :cal SetSyn("hamster")
 an 50.50.120 &Syntax.HIJK.Haskell.Haskell :cal SetSyn("haskell")
@@ -223,42 +233,50 @@ an 50.50.160 &Syntax.HIJK.HASTE\ preproc :cal SetSyn("hastepreproc")
 an 50.50.170 &Syntax.HIJK.Hercules :cal SetSyn("hercules")
 an 50.50.180 &Syntax.HIJK.Hex\ dump.XXD :cal SetSyn("xxd")
 an 50.50.190 &Syntax.HIJK.Hex\ dump.Intel\ MCS51 :cal SetSyn("hex")
-an 50.50.200 &Syntax.HIJK.HTML.HTML :cal SetSyn("html")
-an 50.50.210 &Syntax.HIJK.HTML.HTML\ with\ M4 :cal SetSyn("htmlm4")
-an 50.50.220 &Syntax.HIJK.HTML.HTML\ with\ Ruby\ (eRuby) :cal SetSyn("eruby")
-an 50.50.230 &Syntax.HIJK.HTML.Cheetah\ HTML\ template :cal SetSyn("htmlcheetah")
-an 50.50.240 &Syntax.HIJK.HTML.Django\ HTML\ template :cal SetSyn("htmldjango")
-an 50.50.250 &Syntax.HIJK.HTML.HTML/OS :cal SetSyn("htmlos")
-an 50.50.260 &Syntax.HIJK.HTML.XHTML :cal SetSyn("xhtml")
-an 50.50.270 &Syntax.HIJK.Host\.conf :cal SetSyn("hostconf")
-an 50.50.280 &Syntax.HIJK.Hyper\ Builder :cal SetSyn("hb")
-an 50.50.300 &Syntax.HIJK.Icewm\ menu :cal SetSyn("icemenu")
-an 50.50.310 &Syntax.HIJK.Icon :cal SetSyn("icon")
-an 50.50.320 &Syntax.HIJK.IDL\Generic\ IDL :cal SetSyn("idl")
-an 50.50.330 &Syntax.HIJK.IDL\Microsoft\ IDL :cal SetSyn("msidl")
-an 50.50.340 &Syntax.HIJK.Indent\ profile :cal SetSyn("indent")
-an 50.50.350 &Syntax.HIJK.Inform :cal SetSyn("inform")
-an 50.50.360 &Syntax.HIJK.Informix\ 4GL :cal SetSyn("fgl")
-an 50.50.370 &Syntax.HIJK.Initng :cal SetSyn("initng")
-an 50.50.380 &Syntax.HIJK.Inittab :cal SetSyn("inittab")
-an 50.50.390 &Syntax.HIJK.Inno\ setup :cal SetSyn("iss")
-an 50.50.400 &Syntax.HIJK.InstallShield\ script :cal SetSyn("ishd")
-an 50.50.410 &Syntax.HIJK.Interactive\ Data\ Lang :cal SetSyn("idlang")
-an 50.50.420 &Syntax.HIJK.IPfilter :cal SetSyn("ipfilter")
-an 50.50.440 &Syntax.HIJK.JAL :cal SetSyn("jal")
-an 50.50.450 &Syntax.HIJK.JAM :cal SetSyn("jam")
-an 50.50.460 &Syntax.HIJK.Jargon :cal SetSyn("jargon")
-an 50.50.470 &Syntax.HIJK.Java.Java :cal SetSyn("java")
-an 50.50.480 &Syntax.HIJK.Java.JavaCC :cal SetSyn("javacc")
-an 50.50.490 &Syntax.HIJK.Java.Java\ Server\ Pages :cal SetSyn("jsp")
-an 50.50.500 &Syntax.HIJK.Java.Java\ Properties :cal SetSyn("jproperties")
-an 50.50.510 &Syntax.HIJK.JavaScript :cal SetSyn("javascript")
-an 50.50.520 &Syntax.HIJK.Jess :cal SetSyn("jess")
-an 50.50.530 &Syntax.HIJK.Jgraph :cal SetSyn("jgraph")
-an 50.50.550 &Syntax.HIJK.Kconfig :cal SetSyn("kconfig")
-an 50.50.560 &Syntax.HIJK.KDE\ script :cal SetSyn("kscript")
-an 50.50.570 &Syntax.HIJK.Kimwitu++ :cal SetSyn("kwt")
-an 50.50.580 &Syntax.HIJK.KixTart :cal SetSyn("kix")
+an 50.50.200 &Syntax.HIJK.Hg\ commit :cal SetSyn("hgcommit")
+an 50.50.210 &Syntax.HIJK.HTML.HTML :cal SetSyn("html")
+an 50.50.220 &Syntax.HIJK.HTML.HTML\ with\ M4 :cal SetSyn("htmlm4")
+an 50.50.230 &Syntax.HIJK.HTML.HTML\ with\ Ruby\ (eRuby) :cal SetSyn("eruby")
+an 50.50.240 &Syntax.HIJK.HTML.Cheetah\ HTML\ template :cal SetSyn("htmlcheetah")
+an 50.50.250 &Syntax.HIJK.HTML.Django\ HTML\ template :cal SetSyn("htmldjango")
+an 50.50.260 &Syntax.HIJK.HTML.HTML/OS :cal SetSyn("htmlos")
+an 50.50.270 &Syntax.HIJK.HTML.XHTML :cal SetSyn("xhtml")
+an 50.50.280 &Syntax.HIJK.Host\.conf :cal SetSyn("hostconf")
+an 50.50.290 &Syntax.HIJK.Hosts\ access :cal SetSyn("hostsaccess")
+an 50.50.300 &Syntax.HIJK.Hyper\ Builder :cal SetSyn("hb")
+an 50.50.320 &Syntax.HIJK.Icewm\ menu :cal SetSyn("icemenu")
+an 50.50.330 &Syntax.HIJK.Icon :cal SetSyn("icon")
+an 50.50.340 &Syntax.HIJK.IDL\Generic\ IDL :cal SetSyn("idl")
+an 50.50.350 &Syntax.HIJK.IDL\Microsoft\ IDL :cal SetSyn("msidl")
+an 50.50.360 &Syntax.HIJK.Indent\ profile :cal SetSyn("indent")
+an 50.50.370 &Syntax.HIJK.Inform :cal SetSyn("inform")
+an 50.50.380 &Syntax.HIJK.Informix\ 4GL :cal SetSyn("fgl")
+an 50.50.390 &Syntax.HIJK.Initng :cal SetSyn("initng")
+an 50.50.400 &Syntax.HIJK.Inittab :cal SetSyn("inittab")
+an 50.50.410 &Syntax.HIJK.Inno\ setup :cal SetSyn("iss")
+an 50.50.420 &Syntax.HIJK.Innovation\ Data\ Processing.Upstream\ dat :cal SetSyn("upstreamdat")
+an 50.50.430 &Syntax.HIJK.Innovation\ Data\ Processing.Upstream\ log :cal SetSyn("upstreamlog")
+an 50.50.440 &Syntax.HIJK.Innovation\ Data\ Processing.Upstream\ Install\ log :cal SetSyn("upstreaminstalllog")
+an 50.50.450 &Syntax.HIJK.Innovation\ Data\ Processing.Usserver\ log :cal SetSyn("usserverlog")
+an 50.50.460 &Syntax.HIJK.Innovation\ Data\ Processing.USW2KAgt\ log :cal SetSyn("usw2kagtlog")
+an 50.50.470 &Syntax.HIJK.InstallShield\ script :cal SetSyn("ishd")
+an 50.50.480 &Syntax.HIJK.Interactive\ Data\ Lang :cal SetSyn("idlang")
+an 50.50.490 &Syntax.HIJK.IPfilter :cal SetSyn("ipfilter")
+an 50.50.510 &Syntax.HIJK.JAL :cal SetSyn("jal")
+an 50.50.520 &Syntax.HIJK.JAM :cal SetSyn("jam")
+an 50.50.530 &Syntax.HIJK.Jargon :cal SetSyn("jargon")
+an 50.50.540 &Syntax.HIJK.Java.Java :cal SetSyn("java")
+an 50.50.550 &Syntax.HIJK.Java.JavaCC :cal SetSyn("javacc")
+an 50.50.560 &Syntax.HIJK.Java.Java\ Server\ Pages :cal SetSyn("jsp")
+an 50.50.570 &Syntax.HIJK.Java.Java\ Properties :cal SetSyn("jproperties")
+an 50.50.580 &Syntax.HIJK.JavaScript :cal SetSyn("javascript")
+an 50.50.590 &Syntax.HIJK.Jess :cal SetSyn("jess")
+an 50.50.600 &Syntax.HIJK.Jgraph :cal SetSyn("jgraph")
+an 50.50.610 &Syntax.HIJK.Jovial :cal SetSyn("jovial")
+an 50.50.630 &Syntax.HIJK.Kconfig :cal SetSyn("kconfig")
+an 50.50.640 &Syntax.HIJK.KDE\ script :cal SetSyn("kscript")
+an 50.50.650 &Syntax.HIJK.Kimwitu++ :cal SetSyn("kwt")
+an 50.50.660 &Syntax.HIJK.KixTart :cal SetSyn("kix")
 an 50.60.100 &Syntax.L.Lace :cal SetSyn("lace")
 an 50.60.110 &Syntax.L.LamdaProlog :cal SetSyn("lprolog")
 an 50.60.120 &Syntax.L.Latte :cal SetSyn("latte")
@@ -292,59 +310,61 @@ an 50.70.110 &Syntax.M.MaGic\ Point :cal SetSyn("mgp")
 an 50.70.120 &Syntax.M.Mail :cal SetSyn("mail")
 an 50.70.130 &Syntax.M.Mail\ aliases :cal SetSyn("mailaliases")
 an 50.70.140 &Syntax.M.Mailcap :cal SetSyn("mailcap")
-an 50.70.150 &Syntax.M.Makefile :cal SetSyn("make")
-an 50.70.160 &Syntax.M.MakeIndex :cal SetSyn("ist")
-an 50.70.170 &Syntax.M.Man\ page :cal SetSyn("man")
-an 50.70.180 &Syntax.M.Man\.conf :cal SetSyn("manconf")
-an 50.70.190 &Syntax.M.Maple\ V :cal SetSyn("maple")
-an 50.70.200 &Syntax.M.Markdown :cal SetSyn("markdown")
-an 50.70.210 &Syntax.M.Mason :cal SetSyn("mason")
-an 50.70.220 &Syntax.M.Mathematica :cal SetSyn("mma")
-an 50.70.230 &Syntax.M.Matlab :cal SetSyn("matlab")
-an 50.70.240 &Syntax.M.Maxima :cal SetSyn("maxima")
-an 50.70.250 &Syntax.M.MEL\ (for\ Maya) :cal SetSyn("mel")
-an 50.70.260 &Syntax.M.Messages\ (/var/log) :cal SetSyn("messages")
-an 50.70.270 &Syntax.M.Metafont :cal SetSyn("mf")
-an 50.70.280 &Syntax.M.MetaPost :cal SetSyn("mp")
-an 50.70.290 &Syntax.M.MGL :cal SetSyn("mgl")
-an 50.70.300 &Syntax.M.MMIX :cal SetSyn("mmix")
-an 50.70.310 &Syntax.M.Modconf :cal SetSyn("modconf")
-an 50.70.320 &Syntax.M.Model :cal SetSyn("model")
-an 50.70.330 &Syntax.M.Modsim\ III :cal SetSyn("modsim3")
-an 50.70.340 &Syntax.M.Modula\ 2 :cal SetSyn("modula2")
-an 50.70.350 &Syntax.M.Modula\ 3 :cal SetSyn("modula3")
-an 50.70.360 &Syntax.M.Monk :cal SetSyn("monk")
-an 50.70.370 &Syntax.M.Mplayer\ config :cal SetSyn("mplayerconf")
-an 50.70.380 &Syntax.M.MOO :cal SetSyn("moo")
-an 50.70.390 &Syntax.M.Mrxvtrc :cal SetSyn("mrxvtrc")
-an 50.70.400 &Syntax.M.MS-DOS/Windows.4DOS\ \.bat\ file :cal SetSyn("btm")
-an 50.70.410 &Syntax.M.MS-DOS/Windows.\.bat\/\.cmd\ file :cal SetSyn("dosbatch")
-an 50.70.420 &Syntax.M.MS-DOS/Windows.\.ini\ file :cal SetSyn("dosini")
-an 50.70.430 &Syntax.M.MS-DOS/Windows.Message\ text :cal SetSyn("msmessages")
-an 50.70.440 &Syntax.M.MS-DOS/Windows.Module\ Definition :cal SetSyn("def")
-an 50.70.450 &Syntax.M.MS-DOS/Windows.Registry :cal SetSyn("registry")
-an 50.70.460 &Syntax.M.MS-DOS/Windows.Resource\ file :cal SetSyn("rc")
-an 50.70.470 &Syntax.M.Msql :cal SetSyn("msql")
-an 50.70.480 &Syntax.M.MuPAD :cal SetSyn("mupad")
-an 50.70.490 &Syntax.M.MUSHcode :cal SetSyn("mush")
-an 50.70.500 &Syntax.M.Muttrc :cal SetSyn("muttrc")
+an 50.70.150 &Syntax.M.Mallard :cal SetSyn("mallard")
+an 50.70.160 &Syntax.M.Makefile :cal SetSyn("make")
+an 50.70.170 &Syntax.M.MakeIndex :cal SetSyn("ist")
+an 50.70.180 &Syntax.M.Man\ page :cal SetSyn("man")
+an 50.70.190 &Syntax.M.Man\.conf :cal SetSyn("manconf")
+an 50.70.200 &Syntax.M.Maple\ V :cal SetSyn("maple")
+an 50.70.210 &Syntax.M.Markdown :cal SetSyn("markdown")
+an 50.70.220 &Syntax.M.Mason :cal SetSyn("mason")
+an 50.70.230 &Syntax.M.Mathematica :cal SetSyn("mma")
+an 50.70.240 &Syntax.M.Matlab :cal SetSyn("matlab")
+an 50.70.250 &Syntax.M.Maxima :cal SetSyn("maxima")
+an 50.70.260 &Syntax.M.MEL\ (for\ Maya) :cal SetSyn("mel")
+an 50.70.270 &Syntax.M.Messages\ (/var/log) :cal SetSyn("messages")
+an 50.70.280 &Syntax.M.Metafont :cal SetSyn("mf")
+an 50.70.290 &Syntax.M.MetaPost :cal SetSyn("mp")
+an 50.70.300 &Syntax.M.MGL :cal SetSyn("mgl")
+an 50.70.310 &Syntax.M.MMIX :cal SetSyn("mmix")
+an 50.70.320 &Syntax.M.Modconf :cal SetSyn("modconf")
+an 50.70.330 &Syntax.M.Model :cal SetSyn("model")
+an 50.70.340 &Syntax.M.Modsim\ III :cal SetSyn("modsim3")
+an 50.70.350 &Syntax.M.Modula\ 2 :cal SetSyn("modula2")
+an 50.70.360 &Syntax.M.Modula\ 3 :cal SetSyn("modula3")
+an 50.70.370 &Syntax.M.Monk :cal SetSyn("monk")
+an 50.70.380 &Syntax.M.Mplayer\ config :cal SetSyn("mplayerconf")
+an 50.70.390 &Syntax.M.MOO :cal SetSyn("moo")
+an 50.70.400 &Syntax.M.Mrxvtrc :cal SetSyn("mrxvtrc")
+an 50.70.410 &Syntax.M.MS-DOS/Windows.4DOS\ \.bat\ file :cal SetSyn("btm")
+an 50.70.420 &Syntax.M.MS-DOS/Windows.\.bat\/\.cmd\ file :cal SetSyn("dosbatch")
+an 50.70.430 &Syntax.M.MS-DOS/Windows.\.ini\ file :cal SetSyn("dosini")
+an 50.70.440 &Syntax.M.MS-DOS/Windows.Message\ text :cal SetSyn("msmessages")
+an 50.70.450 &Syntax.M.MS-DOS/Windows.Module\ Definition :cal SetSyn("def")
+an 50.70.460 &Syntax.M.MS-DOS/Windows.Registry :cal SetSyn("registry")
+an 50.70.470 &Syntax.M.MS-DOS/Windows.Resource\ file :cal SetSyn("rc")
+an 50.70.480 &Syntax.M.Msql :cal SetSyn("msql")
+an 50.70.490 &Syntax.M.MuPAD :cal SetSyn("mupad")
+an 50.70.500 &Syntax.M.MUSHcode :cal SetSyn("mush")
+an 50.70.510 &Syntax.M.Muttrc :cal SetSyn("muttrc")
 an 50.80.100 &Syntax.NO.Nanorc :cal SetSyn("nanorc")
 an 50.80.110 &Syntax.NO.Nastran\ input/DMAP :cal SetSyn("nastran")
 an 50.80.120 &Syntax.NO.Natural :cal SetSyn("natural")
 an 50.80.130 &Syntax.NO.Netrc :cal SetSyn("netrc")
-an 50.80.140 &Syntax.NO.Novell\ NCF\ batch :cal SetSyn("ncf")
-an 50.80.150 &Syntax.NO.Not\ Quite\ C\ (LEGO) :cal SetSyn("nqc")
-an 50.80.160 &Syntax.NO.Nroff :cal SetSyn("nroff")
-an 50.80.170 &Syntax.NO.NSIS\ script :cal SetSyn("nsis")
-an 50.80.190 &Syntax.NO.Obj\ 3D\ wavefront :cal SetSyn("obj")
-an 50.80.200 &Syntax.NO.Objective\ C :cal SetSyn("objc")
-an 50.80.210 &Syntax.NO.Objective\ C++ :cal SetSyn("objcpp")
-an 50.80.220 &Syntax.NO.OCAML :cal SetSyn("ocaml")
-an 50.80.230 &Syntax.NO.Occam :cal SetSyn("occam")
-an 50.80.240 &Syntax.NO.Omnimark :cal SetSyn("omnimark")
-an 50.80.250 &Syntax.NO.OpenROAD :cal SetSyn("openroad")
-an 50.80.260 &Syntax.NO.Open\ Psion\ Lang :cal SetSyn("opl")
-an 50.80.270 &Syntax.NO.Oracle\ config :cal SetSyn("ora")
+an 50.80.140 &Syntax.NO.Ninja :cal SetSyn("ninja")
+an 50.80.150 &Syntax.NO.Novell\ NCF\ batch :cal SetSyn("ncf")
+an 50.80.160 &Syntax.NO.Not\ Quite\ C\ (LEGO) :cal SetSyn("nqc")
+an 50.80.170 &Syntax.NO.Nroff :cal SetSyn("nroff")
+an 50.80.180 &Syntax.NO.NSIS\ script :cal SetSyn("nsis")
+an 50.80.200 &Syntax.NO.Obj\ 3D\ wavefront :cal SetSyn("obj")
+an 50.80.210 &Syntax.NO.Objective\ C :cal SetSyn("objc")
+an 50.80.220 &Syntax.NO.Objective\ C++ :cal SetSyn("objcpp")
+an 50.80.230 &Syntax.NO.OCAML :cal SetSyn("ocaml")
+an 50.80.240 &Syntax.NO.Occam :cal SetSyn("occam")
+an 50.80.250 &Syntax.NO.Omnimark :cal SetSyn("omnimark")
+an 50.80.260 &Syntax.NO.OpenROAD :cal SetSyn("openroad")
+an 50.80.270 &Syntax.NO.Open\ Psion\ Lang :cal SetSyn("opl")
+an 50.80.280 &Syntax.NO.Oracle\ config :cal SetSyn("ora")
 an 50.90.100 &Syntax.PQ.Packet\ filter\ conf :cal SetSyn("pf")
 an 50.90.110 &Syntax.PQ.Palm\ resource\ compiler :cal SetSyn("pilrc")
 an 50.90.120 &Syntax.PQ.Pam\ config :cal SetSyn("pamconf")
@@ -357,35 +377,40 @@ an 50.90.180 &Syntax.PQ.Perl.Perl :cal SetSyn("perl")
 an 50.90.190 &Syntax.PQ.Perl.Perl\ 6 :cal SetSyn("perl6")
 an 50.90.200 &Syntax.PQ.Perl.Perl\ POD :cal SetSyn("pod")
 an 50.90.210 &Syntax.PQ.Perl.Perl\ XS :cal SetSyn("xs")
-an 50.90.220 &Syntax.PQ.PHP.PHP\ 3-4 :cal SetSyn("php")
-an 50.90.230 &Syntax.PQ.PHP.Phtml\ (PHP\ 2) :cal SetSyn("phtml")
-an 50.90.240 &Syntax.PQ.Pike :cal SetSyn("pike")
-an 50.90.250 &Syntax.PQ.Pine\ RC :cal SetSyn("pine")
-an 50.90.260 &Syntax.PQ.Pinfo\ RC :cal SetSyn("pinfo")
-an 50.90.270 &Syntax.PQ.PL/M :cal SetSyn("plm")
-an 50.90.280 &Syntax.PQ.PL/SQL :cal SetSyn("plsql")
-an 50.90.290 &Syntax.PQ.PLP :cal SetSyn("plp")
-an 50.90.300 &Syntax.PQ.PO\ (GNU\ gettext) :cal SetSyn("po")
-an 50.90.310 &Syntax.PQ.Postfix\ main\ config :cal SetSyn("pfmain")
-an 50.90.320 &Syntax.PQ.PostScript.PostScript :cal SetSyn("postscr")
-an 50.90.330 &Syntax.PQ.PostScript.PostScript\ Printer\ Description :cal SetSyn("ppd")
-an 50.90.340 &Syntax.PQ.Povray.Povray\ scene\ descr :cal SetSyn("pov")
-an 50.90.350 &Syntax.PQ.Povray.Povray\ configuration :cal SetSyn("povini")
-an 50.90.360 &Syntax.PQ.PPWizard :cal SetSyn("ppwiz")
-an 50.90.370 &Syntax.PQ.Prescribe\ (Kyocera) :cal SetSyn("prescribe")
-an 50.90.380 &Syntax.PQ.Printcap :cal SetSyn("pcap")
-an 50.90.390 &Syntax.PQ.Privoxy :cal SetSyn("privoxy")
-an 50.90.400 &Syntax.PQ.Procmail :cal SetSyn("procmail")
-an 50.90.410 &Syntax.PQ.Product\ Spec\ File :cal SetSyn("psf")
-an 50.90.420 &Syntax.PQ.Progress :cal SetSyn("progress")
-an 50.90.430 &Syntax.PQ.Prolog :cal SetSyn("prolog")
-an 50.90.440 &Syntax.PQ.ProMeLa :cal SetSyn("promela")
-an 50.90.450 &Syntax.PQ.Protocols :cal SetSyn("protocols")
-an 50.90.460 &Syntax.PQ.Purify\ log :cal SetSyn("purifylog")
-an 50.90.470 &Syntax.PQ.Pyrex :cal SetSyn("pyrex")
-an 50.90.480 &Syntax.PQ.Python :cal SetSyn("python")
-an 50.90.500 &Syntax.PQ.Quake :cal SetSyn("quake")
-an 50.90.510 &Syntax.PQ.Quickfix\ window :cal SetSyn("qf")
+an 50.90.220 &Syntax.PQ.Perl.Template\ toolkit :cal SetSyn("tt2")
+an 50.90.230 &Syntax.PQ.Perl.Template\ toolkit\ Html :cal SetSyn("tt2html")
+an 50.90.240 &Syntax.PQ.Perl.Template\ toolkit\ JS :cal SetSyn("tt2js")
+an 50.90.250 &Syntax.PQ.PHP.PHP\ 3-4 :cal SetSyn("php")
+an 50.90.260 &Syntax.PQ.PHP.Phtml\ (PHP\ 2) :cal SetSyn("phtml")
+an 50.90.270 &Syntax.PQ.Pike :cal SetSyn("pike")
+an 50.90.280 &Syntax.PQ.Pine\ RC :cal SetSyn("pine")
+an 50.90.290 &Syntax.PQ.Pinfo\ RC :cal SetSyn("pinfo")
+an 50.90.300 &Syntax.PQ.PL/M :cal SetSyn("plm")
+an 50.90.310 &Syntax.PQ.PL/SQL :cal SetSyn("plsql")
+an 50.90.320 &Syntax.PQ.Pli :cal SetSyn("pli")
+an 50.90.330 &Syntax.PQ.PLP :cal SetSyn("plp")
+an 50.90.340 &Syntax.PQ.PO\ (GNU\ gettext) :cal SetSyn("po")
+an 50.90.350 &Syntax.PQ.Postfix\ main\ config :cal SetSyn("pfmain")
+an 50.90.360 &Syntax.PQ.PostScript.PostScript :cal SetSyn("postscr")
+an 50.90.370 &Syntax.PQ.PostScript.PostScript\ Printer\ Description :cal SetSyn("ppd")
+an 50.90.380 &Syntax.PQ.Povray.Povray\ scene\ descr :cal SetSyn("pov")
+an 50.90.390 &Syntax.PQ.Povray.Povray\ configuration :cal SetSyn("povini")
+an 50.90.400 &Syntax.PQ.PPWizard :cal SetSyn("ppwiz")
+an 50.90.410 &Syntax.PQ.Prescribe\ (Kyocera) :cal SetSyn("prescribe")
+an 50.90.420 &Syntax.PQ.Printcap :cal SetSyn("pcap")
+an 50.90.430 &Syntax.PQ.Privoxy :cal SetSyn("privoxy")
+an 50.90.440 &Syntax.PQ.Procmail :cal SetSyn("procmail")
+an 50.90.450 &Syntax.PQ.Product\ Spec\ File :cal SetSyn("psf")
+an 50.90.460 &Syntax.PQ.Progress :cal SetSyn("progress")
+an 50.90.470 &Syntax.PQ.Prolog :cal SetSyn("prolog")
+an 50.90.480 &Syntax.PQ.ProMeLa :cal SetSyn("promela")
+an 50.90.490 &Syntax.PQ.Proto :cal SetSyn("proto")
+an 50.90.500 &Syntax.PQ.Protocols :cal SetSyn("protocols")
+an 50.90.510 &Syntax.PQ.Purify\ log :cal SetSyn("purifylog")
+an 50.90.520 &Syntax.PQ.Pyrex :cal SetSyn("pyrex")
+an 50.90.530 &Syntax.PQ.Python :cal SetSyn("python")
+an 50.90.550 &Syntax.PQ.Quake :cal SetSyn("quake")
+an 50.90.560 &Syntax.PQ.Quickfix\ window :cal SetSyn("qf")
 an 50.100.100 &Syntax.R.R.R :cal SetSyn("r")
 an 50.100.110 &Syntax.R.R.R\ help :cal SetSyn("rhelp")
 an 50.100.120 &Syntax.R.R.R\ noweb :cal SetSyn("rnoweb")
@@ -396,20 +421,22 @@ an 50.100.160 &Syntax.R.RCS.RCS\ log\ output :cal SetSyn("rcslog")
 an 50.100.170 &Syntax.R.RCS.RCS\ file :cal SetSyn("rcs")
 an 50.100.180 &Syntax.R.Readline\ config :cal SetSyn("readline")
 an 50.100.190 &Syntax.R.Rebol :cal SetSyn("rebol")
-an 50.100.200 &Syntax.R.Remind :cal SetSyn("remind")
-an 50.100.210 &Syntax.R.Relax\ NG\ compact :cal SetSyn("rnc")
-an 50.100.220 &Syntax.R.Renderman.Renderman\ Shader\ Lang :cal SetSyn("sl")
-an 50.100.230 &Syntax.R.Renderman.Renderman\ Interface\ Bytestream :cal SetSyn("rib")
-an 50.100.240 &Syntax.R.Resolv\.conf :cal SetSyn("resolv")
-an 50.100.250 &Syntax.R.Reva\ Forth :cal SetSyn("reva")
-an 50.100.260 &Syntax.R.Rexx :cal SetSyn("rexx")
-an 50.100.270 &Syntax.R.Robots\.txt :cal SetSyn("robots")
-an 50.100.280 &Syntax.R.RockLinux\ package\ desc\. :cal SetSyn("desc")
-an 50.100.290 &Syntax.R.Rpcgen :cal SetSyn("rpcgen")
-an 50.100.300 &Syntax.R.RPL/2 :cal SetSyn("rpl")
-an 50.100.310 &Syntax.R.ReStructuredText :cal SetSyn("rst")
-an 50.100.320 &Syntax.R.RTF :cal SetSyn("rtf")
-an 50.100.330 &Syntax.R.Ruby :cal SetSyn("ruby")
+an 50.100.200 &Syntax.R.ReDIF :cal SetSyn("redif")
+an 50.100.210 &Syntax.R.Relax\ NG :cal SetSyn("rng")
+an 50.100.220 &Syntax.R.Remind :cal SetSyn("remind")
+an 50.100.230 &Syntax.R.Relax\ NG\ compact :cal SetSyn("rnc")
+an 50.100.240 &Syntax.R.Renderman.Renderman\ Shader\ Lang :cal SetSyn("sl")
+an 50.100.250 &Syntax.R.Renderman.Renderman\ Interface\ Bytestream :cal SetSyn("rib")
+an 50.100.260 &Syntax.R.Resolv\.conf :cal SetSyn("resolv")
+an 50.100.270 &Syntax.R.Reva\ Forth :cal SetSyn("reva")
+an 50.100.280 &Syntax.R.Rexx :cal SetSyn("rexx")
+an 50.100.290 &Syntax.R.Robots\.txt :cal SetSyn("robots")
+an 50.100.300 &Syntax.R.RockLinux\ package\ desc\. :cal SetSyn("desc")
+an 50.100.310 &Syntax.R.Rpcgen :cal SetSyn("rpcgen")
+an 50.100.320 &Syntax.R.RPL/2 :cal SetSyn("rpl")
+an 50.100.330 &Syntax.R.ReStructuredText :cal SetSyn("rst")
+an 50.100.340 &Syntax.R.RTF :cal SetSyn("rtf")
+an 50.100.350 &Syntax.R.Ruby :cal SetSyn("ruby")
 an 50.110.100 &Syntax.S-Sm.S-Lang :cal SetSyn("slang")
 an 50.110.110 &Syntax.S-Sm.Samba\ config :cal SetSyn("samba")
 an 50.110.120 &Syntax.S-Sm.SAS :cal SetSyn("sas")
@@ -467,75 +494,80 @@ an 50.120.190 &Syntax.Sn-Sy.Spyce :cal SetSyn("spyce")
 an 50.120.200 &Syntax.Sn-Sy.Speedup :cal SetSyn("spup")
 an 50.120.210 &Syntax.Sn-Sy.Splint :cal SetSyn("splint")
 an 50.120.220 &Syntax.Sn-Sy.Squid\ config :cal SetSyn("squid")
-an 50.120.230 &Syntax.Sn-Sy.SQL.ESQL-C :cal SetSyn("esqlc")
-an 50.120.240 &Syntax.Sn-Sy.SQL.MySQL :cal SetSyn("mysql")
-an 50.120.250 &Syntax.Sn-Sy.SQL.PL/SQL :cal SetSyn("plsql")
-an 50.120.260 &Syntax.Sn-Sy.SQL.SQL\ Anywhere :cal SetSyn("sqlanywhere")
-an 50.120.270 &Syntax.Sn-Sy.SQL.SQL\ (automatic) :cal SetSyn("sql")
-an 50.120.280 &Syntax.Sn-Sy.SQL.SQL\ (Oracle) :cal SetSyn("sqloracle")
-an 50.120.290 &Syntax.Sn-Sy.SQL.SQL\ Forms :cal SetSyn("sqlforms")
-an 50.120.300 &Syntax.Sn-Sy.SQL.SQLJ :cal SetSyn("sqlj")
-an 50.120.310 &Syntax.Sn-Sy.SQL.SQL-Informix :cal SetSyn("sqlinformix")
-an 50.120.320 &Syntax.Sn-Sy.SQR :cal SetSyn("sqr")
-an 50.120.330 &Syntax.Sn-Sy.Ssh.ssh_config :cal SetSyn("sshconfig")
-an 50.120.340 &Syntax.Sn-Sy.Ssh.sshd_config :cal SetSyn("sshdconfig")
-an 50.120.350 &Syntax.Sn-Sy.Standard\ ML :cal SetSyn("sml")
-an 50.120.360 &Syntax.Sn-Sy.Stata.SMCL :cal SetSyn("smcl")
-an 50.120.370 &Syntax.Sn-Sy.Stata.Stata :cal SetSyn("stata")
-an 50.120.380 &Syntax.Sn-Sy.Stored\ Procedures :cal SetSyn("stp")
-an 50.120.390 &Syntax.Sn-Sy.Strace :cal SetSyn("strace")
-an 50.120.400 &Syntax.Sn-Sy.Streaming\ descriptor\ file :cal SetSyn("sd")
-an 50.120.410 &Syntax.Sn-Sy.Subversion\ commit :cal SetSyn("svn")
-an 50.120.420 &Syntax.Sn-Sy.Sudoers :cal SetSyn("sudoers")
-an 50.120.430 &Syntax.Sn-Sy.SVG :cal SetSyn("svg")
-an 50.120.440 &Syntax.Sn-Sy.Symbian\ meta-makefile :cal SetSyn("mmp")
-an 50.120.450 &Syntax.Sn-Sy.Sysctl\.conf :cal SetSyn("sysctl")
+an 50.120.230 &Syntax.Sn-Sy.SQL.SAP\ HANA :cal SetSyn("sqlhana")
+an 50.120.240 &Syntax.Sn-Sy.SQL.ESQL-C :cal SetSyn("esqlc")
+an 50.120.250 &Syntax.Sn-Sy.SQL.MySQL :cal SetSyn("mysql")
+an 50.120.260 &Syntax.Sn-Sy.SQL.PL/SQL :cal SetSyn("plsql")
+an 50.120.270 &Syntax.Sn-Sy.SQL.SQL\ Anywhere :cal SetSyn("sqlanywhere")
+an 50.120.280 &Syntax.Sn-Sy.SQL.SQL\ (automatic) :cal SetSyn("sql")
+an 50.120.290 &Syntax.Sn-Sy.SQL.SQL\ (Oracle) :cal SetSyn("sqloracle")
+an 50.120.300 &Syntax.Sn-Sy.SQL.SQL\ Forms :cal SetSyn("sqlforms")
+an 50.120.310 &Syntax.Sn-Sy.SQL.SQLJ :cal SetSyn("sqlj")
+an 50.120.320 &Syntax.Sn-Sy.SQL.SQL-Informix :cal SetSyn("sqlinformix")
+an 50.120.330 &Syntax.Sn-Sy.SQR :cal SetSyn("sqr")
+an 50.120.340 &Syntax.Sn-Sy.Ssh.ssh_config :cal SetSyn("sshconfig")
+an 50.120.350 &Syntax.Sn-Sy.Ssh.sshd_config :cal SetSyn("sshdconfig")
+an 50.120.360 &Syntax.Sn-Sy.Standard\ ML :cal SetSyn("sml")
+an 50.120.370 &Syntax.Sn-Sy.Stata.SMCL :cal SetSyn("smcl")
+an 50.120.380 &Syntax.Sn-Sy.Stata.Stata :cal SetSyn("stata")
+an 50.120.390 &Syntax.Sn-Sy.Stored\ Procedures :cal SetSyn("stp")
+an 50.120.400 &Syntax.Sn-Sy.Strace :cal SetSyn("strace")
+an 50.120.410 &Syntax.Sn-Sy.Streaming\ descriptor\ file :cal SetSyn("sd")
+an 50.120.420 &Syntax.Sn-Sy.Subversion\ commit :cal SetSyn("svn")
+an 50.120.430 &Syntax.Sn-Sy.Sudoers :cal SetSyn("sudoers")
+an 50.120.440 &Syntax.Sn-Sy.SVG :cal SetSyn("svg")
+an 50.120.450 &Syntax.Sn-Sy.Symbian\ meta-makefile :cal SetSyn("mmp")
+an 50.120.460 &Syntax.Sn-Sy.Sysctl\.conf :cal SetSyn("sysctl")
 an 50.130.100 &Syntax.T.TADS :cal SetSyn("tads")
 an 50.130.110 &Syntax.T.Tags :cal SetSyn("tags")
 an 50.130.120 &Syntax.T.TAK.TAK\ compare :cal SetSyn("takcmp")
 an 50.130.130 &Syntax.T.TAK.TAK\ input :cal SetSyn("tak")
 an 50.130.140 &Syntax.T.TAK.TAK\ output :cal SetSyn("takout")
-an 50.130.150 &Syntax.T.Task\ data :cal SetSyn("taskdata")
-an 50.130.160 &Syntax.T.Task\ 42\ edit :cal SetSyn("taskedit")
-an 50.130.170 &Syntax.T.Tcl/Tk :cal SetSyn("tcl")
-an 50.130.180 &Syntax.T.TealInfo :cal SetSyn("tli")
-an 50.130.190 &Syntax.T.Telix\ Salt :cal SetSyn("tsalt")
-an 50.130.200 &Syntax.T.Termcap/Printcap :cal SetSyn("ptcap")
-an 50.130.210 &Syntax.T.Terminfo :cal SetSyn("terminfo")
-an 50.130.220 &Syntax.T.TeX.TeX/LaTeX :cal SetSyn("tex")
-an 50.130.230 &Syntax.T.TeX.plain\ TeX :cal SetSyn("plaintex")
-an 50.130.240 &Syntax.T.TeX.ConTeXt :cal SetSyn("context")
-an 50.130.250 &Syntax.T.TeX.TeX\ configuration :cal SetSyn("texmf")
-an 50.130.260 &Syntax.T.TeX.Texinfo :cal SetSyn("texinfo")
-an 50.130.270 &Syntax.T.TF\ mud\ client :cal SetSyn("tf")
-an 50.130.280 &Syntax.T.Tidy\ configuration :cal SetSyn("tidy")
-an 50.130.290 &Syntax.T.Tilde :cal SetSyn("tilde")
-an 50.130.300 &Syntax.T.TPP :cal SetSyn("tpp")
-an 50.130.310 &Syntax.T.Trasys\ input :cal SetSyn("trasys")
-an 50.130.320 &Syntax.T.Trustees :cal SetSyn("trustees")
-an 50.130.330 &Syntax.T.TSS.Command\ Line :cal SetSyn("tsscl")
-an 50.130.340 &Syntax.T.TSS.Geometry :cal SetSyn("tssgm")
-an 50.130.350 &Syntax.T.TSS.Optics :cal SetSyn("tssop")
+an 50.130.150 &Syntax.T.Tar\ listing :cal SetSyn("tar")
+an 50.130.160 &Syntax.T.Task\ data :cal SetSyn("taskdata")
+an 50.130.170 &Syntax.T.Task\ 42\ edit :cal SetSyn("taskedit")
+an 50.130.180 &Syntax.T.Tcl/Tk :cal SetSyn("tcl")
+an 50.130.190 &Syntax.T.TealInfo :cal SetSyn("tli")
+an 50.130.200 &Syntax.T.Telix\ Salt :cal SetSyn("tsalt")
+an 50.130.210 &Syntax.T.Termcap/Printcap :cal SetSyn("ptcap")
+an 50.130.220 &Syntax.T.Terminfo :cal SetSyn("terminfo")
+an 50.130.230 &Syntax.T.TeX.TeX/LaTeX :cal SetSyn("tex")
+an 50.130.240 &Syntax.T.TeX.plain\ TeX :cal SetSyn("plaintex")
+an 50.130.250 &Syntax.T.TeX.Initex :cal SetSyn("initex")
+an 50.130.260 &Syntax.T.TeX.ConTeXt :cal SetSyn("context")
+an 50.130.270 &Syntax.T.TeX.TeX\ configuration :cal SetSyn("texmf")
+an 50.130.280 &Syntax.T.TeX.Texinfo :cal SetSyn("texinfo")
+an 50.130.290 &Syntax.T.TF\ mud\ client :cal SetSyn("tf")
+an 50.130.300 &Syntax.T.Tidy\ configuration :cal SetSyn("tidy")
+an 50.130.310 &Syntax.T.Tilde :cal SetSyn("tilde")
+an 50.130.320 &Syntax.T.TPP :cal SetSyn("tpp")
+an 50.130.330 &Syntax.T.Trasys\ input :cal SetSyn("trasys")
+an 50.130.340 &Syntax.T.Treetop :cal SetSyn("treetop")
+an 50.130.350 &Syntax.T.Trustees :cal SetSyn("trustees")
+an 50.130.360 &Syntax.T.TSS.Command\ Line :cal SetSyn("tsscl")
+an 50.130.370 &Syntax.T.TSS.Geometry :cal SetSyn("tssgm")
+an 50.130.380 &Syntax.T.TSS.Optics :cal SetSyn("tssop")
 an 50.140.100 &Syntax.UV.Udev\ config :cal SetSyn("udevconf")
 an 50.140.110 &Syntax.UV.Udev\ permissions :cal SetSyn("udevperm")
 an 50.140.120 &Syntax.UV.Udev\ rules :cal SetSyn("udevrules")
 an 50.140.130 &Syntax.UV.UIT/UIL :cal SetSyn("uil")
 an 50.140.140 &Syntax.UV.UnrealScript :cal SetSyn("uc")
 an 50.140.150 &Syntax.UV.Updatedb\.conf :cal SetSyn("updatedb")
-an 50.140.170 &Syntax.UV.Valgrind :cal SetSyn("valgrind")
-an 50.140.180 &Syntax.UV.Vera :cal SetSyn("vera")
-an 50.140.190 &Syntax.UV.Verilog-AMS\ HDL :cal SetSyn("verilogams")
-an 50.140.200 &Syntax.UV.Verilog\ HDL :cal SetSyn("verilog")
-an 50.140.210 &Syntax.UV.Vgrindefs :cal SetSyn("vgrindefs")
-an 50.140.220 &Syntax.UV.VHDL :cal SetSyn("vhdl")
-an 50.140.230 &Syntax.UV.Vim.Vim\ help\ file :cal SetSyn("help")
-an 50.140.240 &Syntax.UV.Vim.Vim\ script :cal SetSyn("vim")
-an 50.140.250 &Syntax.UV.Vim.Viminfo\ file :cal SetSyn("viminfo")
-an 50.140.260 &Syntax.UV.Virata\ config :cal SetSyn("virata")
-an 50.140.270 &Syntax.UV.Visual\ Basic :cal SetSyn("vb")
-an 50.140.280 &Syntax.UV.VOS\ CM\ macro :cal SetSyn("voscm")
-an 50.140.290 &Syntax.UV.VRML :cal SetSyn("vrml")
-an 50.140.300 &Syntax.UV.VSE\ JCL :cal SetSyn("vsejcl")
+an 50.140.160 &Syntax.UV.Upstart :cal SetSyn("upstart")
+an 50.140.180 &Syntax.UV.Valgrind :cal SetSyn("valgrind")
+an 50.140.190 &Syntax.UV.Vera :cal SetSyn("vera")
+an 50.140.200 &Syntax.UV.Verilog-AMS\ HDL :cal SetSyn("verilogams")
+an 50.140.210 &Syntax.UV.Verilog\ HDL :cal SetSyn("verilog")
+an 50.140.220 &Syntax.UV.Vgrindefs :cal SetSyn("vgrindefs")
+an 50.140.230 &Syntax.UV.VHDL :cal SetSyn("vhdl")
+an 50.140.240 &Syntax.UV.Vim.Vim\ help\ file :cal SetSyn("help")
+an 50.140.250 &Syntax.UV.Vim.Vim\ script :cal SetSyn("vim")
+an 50.140.260 &Syntax.UV.Vim.Viminfo\ file :cal SetSyn("viminfo")
+an 50.140.270 &Syntax.UV.Virata\ config :cal SetSyn("virata")
+an 50.140.280 &Syntax.UV.Visual\ Basic :cal SetSyn("vb")
+an 50.140.290 &Syntax.UV.VOS\ CM\ macro :cal SetSyn("voscm")
+an 50.140.300 &Syntax.UV.VRML :cal SetSyn("vrml")
+an 50.140.310 &Syntax.UV.VSE\ JCL :cal SetSyn("vsejcl")
 an 50.150.100 &Syntax.WXYZ.WEB.CWEB :cal SetSyn("cweb")
 an 50.150.110 &Syntax.WXYZ.WEB.WEB :cal SetSyn("web")
 an 50.150.120 &Syntax.WXYZ.WEB.WEB\ Changes :cal SetSyn("change")
@@ -564,6 +596,7 @@ an 50.150.370 &Syntax.WXYZ.Xslt :cal SetSyn("xslt")
 an 50.150.380 &Syntax.WXYZ.XFree86\ Config :cal SetSyn("xf86conf")
 an 50.150.400 &Syntax.WXYZ.YAML :cal SetSyn("yaml")
 an 50.150.410 &Syntax.WXYZ.Yacc :cal SetSyn("yacc")
+an 50.150.430 &Syntax.WXYZ.Zimbu :cal SetSyn("zimbu")
 
 " The End Of The Syntax Menu
 
diff --git a/runtime/syntax/2html.vim b/runtime/syntax/2html.vim
index fdee1eaf10..187b1be1b0 100644
--- a/runtime/syntax/2html.vim
+++ b/runtime/syntax/2html.vim
@@ -1,6 +1,6 @@
 " Vim syntax support file
 " Maintainer: Ben Fritz 
-" Last Change: 2012 Jun 30
+" Last Change: 2013 Jul 08
 "
 " Additional contributors:
 "
@@ -214,17 +214,21 @@ endif
 
 if !s:settings.use_css
   " Return opening HTML tag for given highlight id
-  function! s:HtmlOpening(id)
+  function! s:HtmlOpening(id, extra_attrs)
     let a = ""
     if synIDattr(a:id, "inverse")
       " For inverse, we always must set both colors (and exchange them)
       let x = s:HtmlColor(synIDattr(a:id, "fg#", s:whatterm))
-      let a = a . ''
+      let a = a . ''
       let x = s:HtmlColor(synIDattr(a:id, "bg#", s:whatterm))
       let a = a . ''
     else
       let x = s:HtmlColor(synIDattr(a:id, "bg#", s:whatterm))
-      if x != "" | let a = a . '' | endif
+      if x != ""
+	let a = a . ''
+      elseif !empty(a:extra_attrs)
+	let a = a . ''
+      endif
       let x = s:HtmlColor(synIDattr(a:id, "fg#", s:whatterm))
       if x != "" | let a = a . '' | endif
     endif
@@ -235,7 +239,7 @@ if !s:settings.use_css
   endfun
 
   " Return closing HTML tag for given highlight id
-  function! s:HtmlClosing(id)
+  function! s:HtmlClosing(id, has_extra_attrs)
     let a = ""
     if synIDattr(a:id, "underline") | let a = a . "" | endif
     if synIDattr(a:id, "italic") | let a = a . "" | endif
@@ -246,7 +250,7 @@ if !s:settings.use_css
       let x = s:HtmlColor(synIDattr(a:id, "fg#", s:whatterm))
       if x != "" | let a = a . '' | endif
       let x = s:HtmlColor(synIDattr(a:id, "bg#", s:whatterm))
-      if x != "" | let a = a . '' | endif
+      if x != "" || a:has_extra_attrs | let a = a . '' | endif
     endif
     return a
   endfun
@@ -265,7 +269,7 @@ if s:settings.use_css
 
   " first, get the style names we need
   let wrapperfunc_lines = [
-	\ 'function! s:BuildStyleWrapper(style_id, diff_style_id, text, make_unselectable, unformatted)',
+	\ 'function! s:BuildStyleWrapper(style_id, diff_style_id, extra_attrs, text, make_unselectable, unformatted)',
 	\ '',
 	\ '  let l:style_name = synIDattr(a:style_id, "name", s:whatterm)'
 	\ ]
@@ -308,7 +312,7 @@ if s:settings.use_css
 
   let wrapperfunc_lines += [
 	\ '',
-	\ '  if l:saved_style == ""'
+	\ '  if l:saved_style == "" && empty(a:extra_attrs)'
 	\ ]
   if &diff
     let wrapperfunc_lines += [
@@ -340,7 +344,7 @@ if s:settings.use_css
 	  \        : "")
   if s:settings.prevent_copy == ""
     let wrapperfunc_lines += [
-	  \ '    return "".a:text.""'
+	  \ '    return "".a:text.""'
 	  \ ]
   else
 
@@ -362,7 +366,7 @@ if s:settings.use_css
     " uses the number of unique codepoints for its limit.
     let wrapperfunc_lines += [
 	  \ '    if a:make_unselectable',
-	  \ '      return "'.
+	  \ '      return "'.
 	  \                '"',
 	  \ '    else',
-	  \ '      return "".a:text.""'
+	  \ '      return "".a:text.""'
 	  \ ]
   endif
-  " close off tag for non-empty primary style
-  if s:settings.prevent_copy == ""
-    let wrapperfunc_lines[-1] .=
-	  \ '                     "\">".a:text.""'
-  else
-    let wrapperfunc_lines[-1] .=
-	  \ '                     "\">".a:text.""'
-  endif
   let wrapperfunc_lines += [
 	\ '  endif',
 	\ 'endfun'
@@ -394,16 +390,16 @@ else
   " no styles exist.
   if &diff
     let wrapperfunc_lines = [
-	  \ 'function! s:BuildStyleWrapper(style_id, diff_style_id, text, unusedarg, unusedarg2)',
-	  \ '  return s:HtmlOpening(a:style_id).(a:diff_style_id <= 0 ? "" :'.
-	  \                                     's:HtmlOpening(a:diff_style_id)).a:text.'.
-	  \   '(a:diff_style_id <= 0 ? "" : s:HtmlClosing(a:diff_style_id)).s:HtmlClosing(a:style_id)',
+	  \ 'function! s:BuildStyleWrapper(style_id, diff_style_id, extra_attrs, text, unusedarg, unusedarg2)',
+	  \ '  return s:HtmlOpening(a:style_id, a:extra_attrs).(a:diff_style_id <= 0 ? "" :'.
+	  \                                     's:HtmlOpening(a:diff_style_id, "")).a:text.'.
+	  \   '(a:diff_style_id <= 0 ? "" : s:HtmlClosing(a:diff_style_id, 0)).s:HtmlClosing(a:style_id, !empty(a:extra_attrs))',
 	  \ 'endfun'
 	  \ ]
   else
     let wrapperfunc_lines = [
-	  \ 'function! s:BuildStyleWrapper(style_id, diff_style_id, text, unusedarg, unusedarg2)',
-	  \ '  return s:HtmlOpening(a:style_id).a:text.s:HtmlClosing(a:style_id)',
+	  \ 'function! s:BuildStyleWrapper(style_id, diff_style_id, extra_attrs, text, unusedarg, unusedarg2)',
+	  \ '  return s:HtmlOpening(a:style_id, a:extra_attrs).a:text.s:HtmlClosing(a:style_id, !empty(a:extra_attrs))',
 	  \ 'endfun'
 	  \ ]
   endif
@@ -418,7 +414,7 @@ let s:diff_mode = &diff
 " unprintable characters expanded and double spaces replaced as necessary.
 "
 " TODO: eliminate unneeded logic like done for BuildStyleWrapper
-function! s:HtmlFormat(text, style_id, diff_style_id, make_unselectable)
+function! s:HtmlFormat(text, style_id, diff_style_id, extra_attrs, make_unselectable)
   " Replace unprintable characters
   let unformatted = strtrans(a:text)
 
@@ -447,27 +443,57 @@ function! s:HtmlFormat(text, style_id, diff_style_id, make_unselectable)
   endif
 
   " Enclose in the correct format
-  return s:BuildStyleWrapper(a:style_id, a:diff_style_id, formatted, a:make_unselectable, unformatted)
+  return s:BuildStyleWrapper(a:style_id, a:diff_style_id, a:extra_attrs, formatted, a:make_unselectable, unformatted)
 endfun
 
 " set up functions to call HtmlFormat in certain ways based on whether the
 " element is supposed to be unselectable or not
 if s:settings.prevent_copy =~# 'n'
-  function! s:HtmlFormat_n(text, style_id, diff_style_id)
-    return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, 1)
-  endfun
+  if s:settings.number_lines
+    if s:settings.line_ids
+      function! s:HtmlFormat_n(text, style_id, diff_style_id, lnr)
+	if a:lnr > 0
+	  return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, 'id="'.(exists('g:html_diff_win_num') ? 'W'.g:html_diff_win_num : "").'L'.a:lnr.s:settings.id_suffix.'" ', 1)
+	else
+	  return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, "", 1)
+	endif
+      endfun
+    else
+      function! s:HtmlFormat_n(text, style_id, diff_style_id, lnr)
+	return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, "", 1)
+      endfun
+    endif
+  elseif s:settings.line_ids
+    " if lines are not being numbered the only reason this function gets called
+    " is to put the line IDs on each line; "text" will be emtpy but lnr will
+    " always be non-zero, however we don't want to use the  because that
+    " won't work as nice for empty text
+    function! s:HtmlFormat_n(text, style_id, diff_style_id, lnr)
+      return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, 'id="'.(exists('g:html_diff_win_num') ? 'W'.g:html_diff_win_num : "").'L'.a:lnr.s:settings.id_suffix.'" ', 0)
+    endfun
+  endif
 else
-  function! s:HtmlFormat_n(text, style_id, diff_style_id)
-    return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, 0)
-  endfun
+  if s:settings.line_ids
+    function! s:HtmlFormat_n(text, style_id, diff_style_id, lnr)
+      if a:lnr > 0
+	return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, 'id="'.(exists('g:html_diff_win_num') ? 'W'.g:html_diff_win_num : "").'L'.a:lnr.s:settings.id_suffix.'" ', 0)
+      else
+	return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, "", 0)
+      endif
+    endfun
+  else
+    function! s:HtmlFormat_n(text, style_id, diff_style_id, lnr)
+      return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, "", 0)
+    endfun
+  endif
 endif
 if s:settings.prevent_copy =~# 'd'
   function! s:HtmlFormat_d(text, style_id, diff_style_id)
-    return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, 1)
+    return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, "", 1)
   endfun
 else
   function! s:HtmlFormat_d(text, style_id, diff_style_id)
-    return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, 0)
+    return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, "", 0)
   endfun
 endif
 if s:settings.prevent_copy =~# 'f'
@@ -501,7 +527,7 @@ else
 	  \ ""
   endfun
   function! s:FoldColumn_fill()
-    return s:HtmlFormat(repeat(' ', s:foldcolumn), s:FOLD_C_ID, 0, 0)
+    return s:HtmlFormat(repeat(' ', s:foldcolumn), s:FOLD_C_ID, 0, "", 0)
   endfun
 endif
 if s:settings.prevent_copy =~# 't'
@@ -512,17 +538,17 @@ if s:settings.prevent_copy =~# 't'
   " substitute later?
   if s:settings.dynamic_folds
     function! s:HtmlFormat_t(text, style_id, diff_style_id)
-      return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, 1) .
-	    \ s:HtmlFormat("", a:style_id, 0, 0)
+      return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, "", 1) .
+	    \ s:HtmlFormat("", a:style_id, 0, "", 0)
     endfun
   else
     function! s:HtmlFormat_t(text, style_id, diff_style_id)
-      return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, 1)
+      return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, "", 1)
     endfun
   endif
 else
   function! s:HtmlFormat_t(text, style_id, diff_style_id)
-    return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, 0)
+    return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, "", 0)
   endfun
 endif
 
@@ -607,7 +633,11 @@ endif
 let s:orgbufnr = winbufnr(0)
 let s:origwin_stl = &l:stl
 if expand("%") == ""
-  exec 'new Untitled.'.(s:settings.use_xhtml ? 'x' : '').'html'
+  if exists('g:html_diff_win_num')
+    exec 'new Untitled_win'.g:html_diff_win_num.'.'.(s:settings.use_xhtml ? 'x' : '').'html'
+  else
+    exec 'new Untitled.'.(s:settings.use_xhtml ? 'x' : '').'html'
+  endif
 else
   exec 'new %.'.(s:settings.use_xhtml ? 'x' : '').'html'
 endif
@@ -625,7 +655,6 @@ setlocal winfixheight
 let s:newwin_stl = &l:stl
 
 " on the new window, set the least time-consuming fold method
-let s:old_fdm = &foldmethod
 let s:old_fen = &foldenable
 setlocal foldmethod=manual
 setlocal nofoldenable
@@ -671,7 +700,7 @@ let s:LeadingSpace = ' '
 let s:HtmlEndline = ''
 if s:settings.no_pre
   let s:HtmlEndline = '",
-	\ s:settings.use_xhtml ? '//",
+      \ s:settings.use_xhtml ? '// goodWidth) {',
 	\ '    while (ratio < 100*goodWidth/emWidth && ratio < 100) {',
-	\ '    ratio += 5;',
-	\ '  }',
-	\ '  document.getElementById("vimCodeElement").className = "em"+ratio;',
+	\ '      ratio += 5;',
+	\ '    }',
+	\ '    document.getElementById("vimCodeElement'.s:settings.id_suffix.'").className = "em"+ratio;',
 	\ '  }',
 	\ '}'
 	\ ])
 endif
 
-" insert script closing tag if any javascript is needed
-if s:settings.dynamic_folds || s:settings.prevent_copy != ""
-  call extend(s:lines, [
-	\ '',
-	\ s:settings.use_xhtml ? '//]]>' : '-->',
-	\ ""
-	\ ])
-endif
+" insert script closing tag
+call extend(s:lines, [
+      \ '',
+      \ s:settings.use_xhtml ? '//]]>' : '-->',
+      \ ""
+      \ ])
 
 call extend(s:lines, [""])
 if !empty(s:settings.prevent_copy)
   call extend(s:lines,
-	\ ["",
+	\ ["",
 	\ "",
 	\ "
0
", \ "
", \ "
" \ ]) else - call extend(s:lines, [""]) + call extend(s:lines, [""]) endif if s:settings.no_pre " if we're not using CSS we use a font tag which can't have a div inside if s:settings.use_css - call extend(s:lines, ["
"]) + call extend(s:lines, ["
"]) endif else - call extend(s:lines, ["
"])
+  call extend(s:lines, ["
"])
 endif
 
 exe s:orgwin . "wincmd w"
@@ -1242,7 +1315,7 @@ while s:lnum <= s:end
       if s:settings.number_lines
 	" Indent if line numbering is on. Indent gets style of line number
 	" column.
-	let s:new = s:HtmlFormat_n(repeat(' ', s:margin), s:LINENR_ID, 0) . s:new
+	let s:new = s:HtmlFormat_n(repeat(' ', s:margin), s:LINENR_ID, 0, 0) . s:new
       endif
       if s:settings.dynamic_folds && !s:settings.no_foldcolumn && s:foldcolumn > 0
 	" Indent for foldcolumn if there is one. Assume it's empty, there should
@@ -1274,7 +1347,7 @@ while s:lnum <= s:end
     endif
 
     " put numcol in a separate group for sake of unselectable text
-    let s:new = (s:settings.number_lines ? s:HtmlFormat_n(s:numcol, s:FOLDED_ID, 0): "") . s:HtmlFormat_t(s:new, s:FOLDED_ID, 0)
+    let s:new = (s:settings.number_lines ? s:HtmlFormat_n(s:numcol, s:FOLDED_ID, 0, s:lnum): "") . s:HtmlFormat_t(s:new, s:FOLDED_ID, 0)
 
     " Skip to the end of the fold
     let s:new_lnum = foldclosedend(s:lnum)
@@ -1305,7 +1378,7 @@ while s:lnum <= s:end
 	let s:foldId = s:foldId + 1
 	let s:new .= ""
+	let s:new .= "fold".s:foldId.s:settings.id_suffix."' class='".s:allfolds[0].type."'>"
 
 
 	" Unless disabled, add a fold column for the opening line of a fold.
@@ -1317,19 +1390,19 @@ while s:lnum <= s:end
 	  " add fold column that can open the new fold
 	  if s:allfolds[0].level > 1 && s:firstfold
 	    let s:new = s:new . s:FoldColumn_build('|', s:allfolds[0].level - 1, 0, "",
-		  \ 'toggle-open FoldColumn','javascript:toggleFold("fold'.s:foldstack[0].id.'");')
+		  \ 'toggle-open FoldColumn','javascript:toggleFold("fold'.s:foldstack[0].id.s:settings.id_suffix.'");')
 	  endif
 	  " add the filler spaces separately from the '+' char so that it can be
 	  " shown/hidden separately during a hover unfold
 	  let s:new = s:new . s:FoldColumn_build("+", 1, 0, "",
-		\ 'toggle-open FoldColumn', 'javascript:toggleFold("fold'.s:foldId.'");')
+		\ 'toggle-open FoldColumn', 'javascript:toggleFold("fold'.s:foldId.s:settings.id_suffix.'");')
 	  " If this is not the last fold we're opening on this line, we need
 	  " to keep the filler spaces hidden if the fold is opened by mouse
 	  " hover. If it is the last fold to open in the line, we shouldn't hide
 	  " them, so don't apply the toggle-filler class.
 	  let s:new = s:new . s:FoldColumn_build(" ", 1, s:foldcolumn - s:allfolds[0].level - 1, "",
 		\ 'toggle-open FoldColumn'. (get(s:allfolds, 1, {'firstline': 0}).firstline == s:lnum ?" toggle-filler" :""),
-		\ 'javascript:toggleFold("fold'.s:foldId.'");')
+		\ 'javascript:toggleFold("fold'.s:foldId.s:settings.id_suffix.'");')
 
 	  " add fold column that can close the new fold
 	  " only add extra blank space if we aren't opening another fold on the
@@ -1343,11 +1416,11 @@ while s:lnum <= s:end
 	    " the first fold in a line has '|' characters from folds opened in
 	    " previous lines, before the '-' for this fold
 	    let s:new .= s:FoldColumn_build('|', s:allfolds[0].level - 1, s:extra_space, '-',
-		  \ 'toggle-closed FoldColumn', 'javascript:toggleFold("fold'.s:foldId.'");')
+		  \ 'toggle-closed FoldColumn', 'javascript:toggleFold("fold'.s:foldId.s:settings.id_suffix.'");')
 	  else
 	    " any subsequent folds in the line only add a single '-'
 	    let s:new = s:new . s:FoldColumn_build("-", 1, s:extra_space, "",
-		  \ 'toggle-closed FoldColumn', 'javascript:toggleFold("fold'.s:foldId.'");')
+		  \ 'toggle-closed FoldColumn', 'javascript:toggleFold("fold'.s:foldId.s:settings.id_suffix.'");')
 	  endif
 	  let s:firstfold = 0
 	endif
@@ -1355,7 +1428,7 @@ while s:lnum <= s:end
 	" Add fold text, moving the span ending to the next line so collapsing
 	" of folds works correctly.
 	" Put numcol in a separate group for sake of unselectable text.
-	let s:new = s:new . (s:settings.number_lines ? s:HtmlFormat_n(s:numcol, s:FOLDED_ID, 0) : "") . substitute(s:HtmlFormat_t(foldtextresult(s:lnum), s:FOLDED_ID, 0), '', s:HtmlEndline.'\n\0', '')
+	let s:new = s:new . (s:settings.number_lines ? s:HtmlFormat_n(s:numcol, s:FOLDED_ID, 0, 0) : "") . substitute(s:HtmlFormat_t(foldtextresult(s:lnum), s:FOLDED_ID, 0), '', s:HtmlEndline.'\n\0', '')
 	let s:new = s:new . ""
 
 	" open the fold now that we have the fold text to allow retrieval of
@@ -1381,7 +1454,7 @@ while s:lnum <= s:end
 	  " add the fold column for folds not on the opening line
 	  if get(s:foldstack, 0).firstline < s:lnum
 	    let s:new = s:new . s:FoldColumn_build('|', s:foldstack[0].level, s:foldcolumn - s:foldstack[0].level, "",
-		  \ 'FoldColumn', 'javascript:toggleFold("fold'.s:foldstack[0].id.'");')
+		  \ 'FoldColumn', 'javascript:toggleFold("fold'.s:foldstack[0].id.s:settings.id_suffix.'");')
 	  endif
 	endif
       endif
@@ -1389,7 +1462,9 @@ while s:lnum <= s:end
 
     " Now continue with the unfolded line text
     if s:settings.number_lines
-      let s:new = s:new . s:HtmlFormat_n(s:numcol, s:LINENR_ID, 0)
+      let s:new = s:new . s:HtmlFormat_n(s:numcol, s:LINENR_ID, 0, s:lnum)
+    elseif s:settings.line_ids
+      let s:new = s:new . s:HtmlFormat_n("", s:LINENR_ID, 0, s:lnum)
     endif
 
     " Get the diff attribute, if any.
@@ -1479,7 +1554,7 @@ while s:lnum <= s:end
       " Output the text with the same synID, with class set to the highlight ID
       " name, unless it has been concealed completely.
       if strlen(s:expandedtab) > 0
-	let s:new = s:new . s:HtmlFormat(s:expandedtab,  s:id, s:diff_id, 0)
+	let s:new = s:new . s:HtmlFormat(s:expandedtab,  s:id, s:diff_id, "", 0)
       endif
     endwhile
   endif
@@ -1529,7 +1604,12 @@ unlet s:lines
 " this file in the future; need to do this after generating all the text in case
 " the modeline text has different highlight groups which all turn out to be
 " stripped from the final output.
-%s!\v(%(^|\s+)%(vim?|ex)):!\1\:!ge
+%s!\v(%(^|\s+)%([Vv]i%(m%([<=>]?\d+)?)?|ex)):!\1\:!ge
+
+" The generated HTML is admittedly ugly and takes a LONG time to fold.
+" Make sure the user doesn't do syntax folding when loading a generated file,
+" using a modeline.
+call append(line('$'), "")
 
 " Now, when we finally know which, we define the colors and styles
 if s:settings.use_css
@@ -1616,7 +1696,7 @@ if s:settings.use_css
     endif
   endif
 else
-  execute '%s::\r'
+  execute '%s:]*\):\r
-" Last Change: 2006 Apr 13
+"    Revision: 2.1
+"  Maintainer: Marius Piedallu van Wyk 
+" Last Change: 2013 Jun 13
+"     Comment: Thanks to EPI-USE Labs for all your assistance. :)
 
 " For version  < 6.0: Clear all syntax items
 " For version >= 6.0: Quit when a syntax file was already loaded
@@ -15,101 +16,153 @@ endif
 " Always ignore case
 syn case ignore
 
-" Symbol Operators
-syn match   abapSymbolOperator  "[+\-/=<>$]"
-syn match   abapSymbolOperator  "\*"
-syn match   abapSymbolOperator  "[<>]="
-syn match   abapSymbolOperator  "<>"
-syn match   abapSymbolOperator  "\*\*"
-syn match   abapSymbolOperator  "[()]"
-syn match   abapSymbolOperator  "[:,\.]"
+" Symbol Operators (space delimited)
+syn match   abapSymbolOperator  "\W+\W"
+syn match   abapSymbolOperator  "\W-\W"
+syn match   abapSymbolOperator  "\W/\W"
+syn match   abapSymbolOperator  "\W%\W"
+syn match   abapSymbolOperator  "\W=\W"
+syn match   abapSymbolOperator  "\W<\W"
+syn match   abapSymbolOperator  "\W>\W"
+syn match   abapSymbolOperator  "\W\*\W"
+syn match   abapSymbolOperator  "\W[<>]=\W"
+syn match   abapSymbolOperator  "\W<>\W"
+syn match   abapSymbolOperator  "\W\*\*\W"
+syn match   abapSymbolOperator  "\[\]"
+syn match   abapSymbolOperator  "->\*\?"
+syn match   abapSymbolOperator  "=>"
+syn match   abapSymbolOperator  "[()~:,\.&$]"
 
 " Literals
-syn region  abapString matchgroup=abapString start="'" end="'" contains=abapStringEscape
-syn match   abapStringEscape contained "''"
+syn region  abapCharString matchgroup=abapCharString start="'" end="'" contains=abapCharStringEscape
+syn match   abapCharStringEscape contained "''"
 
-syn match   abapNumber  "-\=\<\d\+\>"
+syn region  abapString matchgroup=abapString start="`" end="`" contains=abapStringEscape
+syn match   abapStringEscape contained "``"
+
+syn match   abapNumber  "\-\=\<\d\+\>"
 syn region  abapHex     matchgroup=abapHex start="X'" end="'"
 
 if version >= 600
-  setlocal iskeyword=-,48-57,_,A-Z,a-z
+  setlocal iskeyword=48-57,_,A-Z,a-z,/
 else
-  set iskeyword=-,48-57,_,A-Z,a-z
+  set iskeyword=48-57,_,A-Z,a-z,/
 endif
 
+syn match   abapNamespace        "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\<\(EXIT\W\+FROM\W\+STEP\W\+LOOP\|EXIT\)\>"
+syn match   abapComplexStatement "\<\(BEGIN\W\+OF\W\+\(BLOCK\|LINE\)\|BEGIN\W\+OF\)\>"
+syn match   abapComplexStatement "\<\(END\W\+OF\W\+\(BLOCK\|LINE\)\|END\W\+OF\)\>"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\<\(PUBLIC\|PRIVATE\|PROTECTED\)\(\W\+SECTION\)\?\>"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\<\(ALL\W\+OCCURRENCES\)\|\(\(FIRST\|LAST\)\W\+OCCURRENCE\)\>"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\<\(UP\W\+\)\?TO\>"
+
+" hyphenated-word statements
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+syn match   abapComplexStatement "\"
+
 " ABAP statements
-syn keyword abapStatement ADD ADD-CORRESPONDING ASSIGN AT AUTHORITY-CHECK
-syn keyword abapStatement BACK BREAK-POINT
-syn keyword abapStatement CALL CASE CHECK CLEAR CLOSE CNT COLLECT COMMIT COMMUNICATION COMPUTE CONCATENATE CONDENSE CONSTANTS CONTINUE CONTROLS CONVERT CREATE CURRENCY
-syn keyword abapStatement DATA DEFINE DELETE DESCRIBE DETAIL DIVIDE DIVIDE-CORRESPONDING DO
-syn keyword abapStatement EDITOR-CALL ELSE ELSEIF END-OF-DEFINITION END-OF-PAGE END-OF-SELECTION ENDAT ENDCASE ENDDO ENDEXEC ENDFORM ENDFUNCTION ENDIF ENDIFEND ENDLOOP ENDMODULE ENDON ENDPROVIDE ENDSELECT ENDWHILE EXEC EXPORT EXPORTING EXTRACT
-syn keyword abapStatement FETCH FIELD-GROUPS FIELD-SYMBOLS FIELDS FORM FORMAT FREE FUNCTION FUNCTION-POOL
+syn keyword abapStatement ADD ALIAS ALIASES ASSERT ASSIGN ASSIGNING AT
+syn keyword abapStatement BACK
+syn keyword abapStatement CALL CASE CATCH CHECK CLASS CLEAR CLOSE CNT COLLECT COMMIT COMMUNICATION COMPUTE CONCATENATE CONDENSE CONSTANTS CONTINUE CONTROLS CONVERT CREATE CURRENCY
+syn keyword abapStatement DATA DEFINE DEFINITION DEFERRED DELETE DESCRIBE DETAIL DIVIDE DO
+syn keyword abapStatement ELSE ELSEIF ENDAT ENDCASE ENDCLASS ENDDO ENDEXEC ENDFORM ENDFUNCTION ENDIF ENDIFEND ENDINTERFACE ENDLOOP ENDMETHOD ENDMODULE ENDON ENDPROVIDE ENDSELECT ENDTRY ENDWHILE EVENT EVENTS EXEC EXIT EXPORT EXPORTING EXTRACT
+syn keyword abapStatement FETCH FIELDS FORM FORMAT FREE FROM FUNCTION
 syn keyword abapStatement GENERATE GET
 syn keyword abapStatement HIDE
-syn keyword abapStatement IF IMPORT IMPORTING INDEX INFOTYPES INITIALIZATION INPUT INSERT
-syn keyword abapStatement LEAVE LIKE LOAD LOCAL LOOP
-syn keyword abapStatement MESSAGE MODIFY MODULE MOVE MOVE-CORRESPONDING MULTIPLY MULTIPLY-CORRESPONDING
-syn keyword abapStatement NEW-LINE NEW-PAGE NEW-SECTION
-syn keyword abapStatement ON OVERLAY
-syn keyword abapStatement PACK PARAMETERS PERFORM POSITION PRINT-CONTROL PROGRAM PROVIDE PUT
-syn keyword abapStatement RAISE RANGES READ RECEIVE REFRESH REJECT REPLACE REPORT RESERVE RESTORE ROLLBACK RP-PROVIDE-FROM-LAST
-syn keyword abapStatement SCAN SCROLL SEARCH SELECT SELECT-OPTIONS SELECTION-SCREEN SET SHIFT SKIP SORT SPLIT START-OF-SELECTION STATICS STOP SUBMIT SUBTRACT SUBTRACT-CORRESPONDING SUM SUMMARY SUPPRESS SYNTAX-CHECK SYNTAX-TRACE
-syn keyword abapStatement TABLES TOP-OF-PAGE TRANSFER TRANSLATE TYPE TYPE-POOL TYPE-POOLS TYPES
-syn keyword abapStatement UNPACK UPDATE
+syn keyword abapStatement IF IMPORT IMPORTING INDEX INFOTYPES INITIALIZATION INTERFACE INTERFACES INPUT INSERT IMPLEMENTATION 
+syn keyword abapStatement LEAVE LIKE LINE LOAD LOCAL LOOP
+syn keyword abapStatement MESSAGE METHOD METHODS MODIFY MODULE MOVE MULTIPLY
+syn keyword abapStatement ON OVERLAY OPTIONAL OTHERS
+syn keyword abapStatement PACK PARAMETERS PERFORM POSITION PROGRAM PROVIDE PUT
+syn keyword abapStatement RAISE RANGES RECEIVE RECEIVING REDEFINITION REFERENCE REFRESH REJECT REPLACE REPORT RESERVE RESTORE RETURNING ROLLBACK
+syn keyword abapStatement SCAN SCROLL SEARCH SELECT SET SHIFT SKIP SORT SORTED SPLIT STANDARD STATICS STEP STOP SUBMIT SUBTRACT SUM SUMMARY SUPPRESS
+syn keyword abapStatement TABLES TIMES TRANSFER TRANSLATE TRY TYPE TYPES
+syn keyword abapStatement UNASSIGN ULINE UNPACK UPDATE
 syn keyword abapStatement WHEN WHILE WINDOW WRITE
 
 " More statemets
+syn keyword abapStatement LINES
+syn keyword abapStatement INTO GROUP BY HAVING ORDER BY SINGLE
+syn keyword abapStatement APPENDING CORRESPONDING FIELDS OF TABLE
+syn keyword abapStatement LEFT RIGHT OUTER INNER JOIN AS CLIENT SPECIFIED BYPASSING BUFFER ROWS CONNECTING
 syn keyword abapStatement OCCURS STRUCTURE OBJECT PROPERTY
 syn keyword abapStatement CASTING APPEND RAISING VALUE COLOR
-syn keyword abapStatement LINE-SIZE LINE-COUNT MESSAGE-ID
-syn keyword abapStatement CHANGING EXCEPTIONS DEFAULT CHECKBOX COMMENT
-syn keyword abapStatement ID NUMBER FOR DISPLAY-MODE TITLE OUTPUT
-
-" More multi-word statements
-syn match   abapStatement "\(\W\|^\)\(WITH\W\+\(HEADER\W\+LINE\|FRAME\|KEY\)\|WITH\)\(\W\|$\)"ms=s+1,me=e-1
-syn match   abapStatement "\(\W\|^\)NO\W\+STANDARD\W\+PAGE\W\+HEADING\(\W\|$\)"ms=s+1,me=e-1
-syn match   abapStatement "\(\W\|^\)\(EXIT\W\+FROM\W\+STEP\W\+LOOP\|EXIT\)\(\W\|$\)"ms=s+1,me=e-1
-syn match   abapStatement "\(\W\|^\)\(BEGIN\W\+OF\W\+\(BLOCK\|LINE\)\|BEGIN\W\+OF\)\(\W\|$\)"ms=s+1,me=e-1
-syn match   abapStatement "\(\W\|^\)\(END\W\+OF\W\+\(BLOCK\|LINE\)\|END\W\+OF\)\(\W\|$\)"ms=s+1,me=e-1
-syn match   abapStatement "\(\W\|^\)IS\W\+INITIAL\(\W\|$\)"ms=s+1,me=e-1
-syn match   abapStatement "\(\W\|^\)NO\W\+INTERVALS\(\W\|$\)"ms=s+1,me=e-1
-syn match   abapStatement "\(\W\|^\)SEPARATED\W\+BY\(\W\|$\)"ms=s+1,me=e-1
-syn match   abapStatement "\(\W\|^\)\(USING\W\+\(EDIT\W\+MASK\)\|USING\)\(\W\|$\)"ms=s+1,me=e-1
-syn match   abapStatement "\(\W\|^\)\(WHERE\W\+\(LINE\)\)\(\W\|$\)"ms=s+1,me=e-1
-syn match   abapStatement "\(\W\|^\)RADIOBUTTON\W\+GROUP\(\W\|$\)"ms=s+1,me=e-1
-syn match   abapStatement "\(\W\|^\)REF\W\+TO\(\W\|$\)"ms=s+1,me=e-1
+syn keyword abapStatement CHANGING EXCEPTION EXCEPTIONS DEFAULT CHECKBOX COMMENT
+syn keyword abapStatement ID NUMBER FOR TITLE OUTPUT
 
 " Special ABAP specific tables:
-syn match   abapSpecial       "\(\W\|^\)\(sy\|\(p\|pa\)\d\d\d\d\|t\d\d\d.\|innnn\)\(\W\|$\)"ms=s+1,me=e-1
-syn match   abapSpecialTables "\(sy\|\(p\|pa\)\d\d\d\d\|t\d\d\d.\|innnn\)-"me=e-1 contained
-syn match   abapSpecial       "\(\W\|^\)\w\+-\(\w\+-\w\+\|\w\+\)"ms=s+1 contains=abapSpecialTables
+syn match   abapSpecialTables "\<\(sy\|\(hrp\|p\|pa\)\d\d\d\d\|t\d\d\d.\|innnn\)-"me=e-1 contained
+syn match   abapStructure     "\<\w\+-[^\>]"me=e-2 contains=abapSpecialTables,abapStatement,abapComplexStatement
+syn match   abapField         "-\w\+"ms=s+1
 
 " Pointer
 syn match   abapSpecial  "<\w\+>"
 
-" Abap constants:
+" Abap common constants:
 syn keyword abapSpecial  TRUE FALSE NULL SPACE
 
 " Includes
 syn region abapInclude   start="include" end="." contains=abapComment
 
 " Types
-syn keyword abapTypes    c n i p f d t x
+syn keyword abapTypes    c n i p f d t x string xstring decfloat16 decfloat34
 
 " Atritmitic operators
 syn keyword abapOperator abs sign ceil floor trunc frac acos asin atan cos sin tan
 syn keyword abapOperator cosh sinh tanh exp log log10 sqrt
 
 " String operators
-syn keyword abapOperator strlen xstrlen charlen numofchar dbmaxlen
-
-" Table operators
-syn keyword abapOperator lines
+syn keyword abapStatement strlen xstrlen charlen numofchar dbmaxlen
 
-" Table operators (SELECT operators)
-syn keyword abapOperator INTO FROM WHERE GROUP BY HAVING ORDER BY SINGLE
-syn keyword abapOperator APPENDING CORRESPONDING FIELDS OF TABLE
-syn keyword abapOperator LEFT RIGHT OUTER INNER JOIN AS CLIENT SPECIFIED BYPASSING BUFFER UP TO ROWS CONNECTING
 syn keyword abapOperator EQ NE LT LE GT GE NOT AND OR XOR IN LIKE BETWEEN
 
 " An error? Not strictly... but cannot think of reason this is intended.
@@ -119,6 +172,7 @@ syn match   abapError    "\.\."
 syn region  abapComment  start="^\*" end="$" contains=abapTodo
 syn match   abapComment  "\".*" contains=abapTodo
 syn keyword abapTodo     contained TODO NOTE
+syn match   abapTodo     "\#EC\W\+\w\+"
 
 " Define the default highlighting.
 " For version 5.7 and earlier: only when not done already
@@ -134,13 +188,20 @@ if version >= 508 || !exists("did_abap_syntax_inits")
   HiLink abapError          Error
   HiLink abapComment        Comment
   HiLink abapInclude        Include
+  HiLink abapStatement      Statement
+  HiLink abapComplexStatement      Statement
   HiLink abapSpecial        Special
-  HiLink abapSpecialTables  PreProc
+  HiLink abapNamespace      Special
+  HiLink abapSpecialTables  Special
   HiLink abapSymbolOperator abapOperator
   HiLink abapOperator       Operator
-  HiLink abapStatement      Statement
+  HiLink abapCharString     String
   HiLink abapString         String
   HiLink abapFloat          Float
+  HiLink abapTypes          Type
+  HiLink abapSymbol         Structure
+  HiLink abapStructure      Structure
+  HiLink abapField          Variable
   HiLink abapNumber         Number
   HiLink abapHex            Number
 
diff --git a/runtime/syntax/aptconf.vim b/runtime/syntax/aptconf.vim
new file mode 100644
index 0000000000..0607ca10f5
--- /dev/null
+++ b/runtime/syntax/aptconf.vim
@@ -0,0 +1,512 @@
+" Vim syntax file
+" Language:	APT config file
+" Maintainer:	Yann Amar 
+" Last Change:	2013 Apr 12
+
+" For version 5.x: Clear all syntax items
+" For version 6.x and 7.x: Quit when a syntax file was already loaded
+if !exists("main_syntax")
+  if version < 600
+    syntax clear
+  elseif exists("b:current_syntax")
+    finish
+  endif
+  let main_syntax = 'aptconf'
+endif
+
+let s:cpo_save = &cpo
+set cpo&vim
+
+" Errors:
+" Catch all that is not overridden by next rules/items:
+syn match	aptconfError		display '[^[:blank:]]'
+syn match	aptconfError		display '^[^[:blank:]][^:{]*'
+
+" Options:
+" Define a general regular expression for the options that are not defined
+" later as keywords. Following apt.conf(5), we know that options are case
+" insensitive, and can contain alphanumeric characters and '/-:._+'; we
+" assume that there can not be consecutive colons (::) which is used as
+" syntax operator; we also assume that an option name can not start or end
+" by a colon.
+syn case	ignore
+syn match	aptconfRegexpOpt	'[-[:alnum:]/.+_]\+\(:[-[:alnum:]/.+_]\+\)*' contained display
+
+" Keywords:
+setlocal iskeyword+=/,-,.,_,+
+"setlocal iskeyword+=: is problematic, because of the '::' separator
+
+" Incomplete keywords will be treated differently than completely bad strings:
+syn keyword	aptconfGroupIncomplete
+	\ a[cquire] a[ptitude] d[ebtags] d[ebug] d[ir] d[pkg] d[select]
+	\ o[rderlist] p[ackagemanager] p[kgcachegen] q[uiet] r[pm]
+	\ u[nattended-upgrade]
+
+" Only the following keywords can be used at toplevel (to begin an option):
+syn keyword	aptconfGroup
+	\ acquire apt aptitude debtags debug dir dpkg dselect
+	\ orderlist packagemanager pkgcachegen quiet rpm
+	\ unattended-upgrade
+
+" Possible options for each group:
+" Acquire: {{{
+syn keyword	aptconfAcquire contained
+	\ cdrom Check-Valid-Until CompressionTypes ForceHash ftp gpgv
+	\ GzipIndexes http https Languages Max-ValidTime Min-ValidTime PDiffs
+	\ Queue-Mode Retries Source-Symlinks
+
+syn keyword	aptconfAcquireCDROM contained
+	\ AutoDetect CdromOnly Mount UMount
+
+syn keyword	aptconfAcquireCompressionTypes contained
+	\ bz2 lzma gz Order
+
+syn keyword	aptconfAcquireFTP contained
+	\ Passive Proxy ProxyLogin Timeout
+
+syn keyword	aptconfAcquireHTTP contained
+	\ AllowRedirect Dl-Limit Max-Age No-Cache No-Store Pipeline-Depth
+	\ Proxy Timeout User-Agent
+
+syn keyword	aptconfAcquireHTTPS contained
+	\ CaInfo CaPath CrlFile IssuerCert SslCert SslForceVersion SslKey
+	\ Verify-Host Verify-Peer
+
+syn keyword	aptconfAcquireMaxValidTime contained
+	\ Debian Debian-Security
+
+syn keyword	aptconfAcquirePDiffs contained
+	\ FileLimit SizeLimit
+
+syn cluster	aptconfAcquire_ contains=aptconfAcquire,
+	\ aptconfAcquireCDROM,aptconfAcquireCompressionTypes,aptconfAcquireFTP,
+	\ aptconfAcquireHTTP,aptconfAcquireHTTPS,aptconfAcquireMaxValidTime,
+	\ aptconfAcquirePDiffs
+" }}}
+" Apt: {{{
+syn keyword	aptconfApt contained
+	\ Architecture Architectures Archive Authentication AutoRemove
+	\ Build-Essential Cache Cache-Grow Cache-Limit Cache-Start CDROM
+	\ Changelogs Clean-Installed Compressor Default-Release
+	\ Force-LoopBreak Get Ignore-Hold Immediate-Configure
+	\ Install-Recommends Install-Suggests Keep-Fds List-Cleanup
+	\ NeverAutoRemove Never-MarkAuto-Sections Periodic Status-Fd Update
+
+syn keyword	aptconfAptAuthentication contained
+	\ TrustCDROM
+
+syn keyword	aptconfAptAutoRemove contained
+	\ RecommendsImportant SuggestsImportant
+
+syn keyword	aptconfAptCache contained
+	\ AllNames AllVersions Generate GivenOnly Important Installed NamesOnly
+	\ RecurseDepends ShowFull
+
+syn keyword	aptconfAptCDROM contained
+	\ Fast NoAct NoMount Rename
+
+syn keyword	aptconfAptChangelogs contained
+	\ Server
+
+syn keyword	aptconfAptCompressor contained
+	\ bzip2 gzip lzma xz
+
+syn keyword	aptconfAptCompressorAll contained
+	\ Binary CompressArg Cost Extension Name UncompressArg
+
+syn keyword	aptconfAptGet contained
+	\ AllowUnauthenticated Arch-Only Assume-No Assume-Yes AutomaticRemove
+	\ Build-Dep-Automatic Compile Diff-Only Download Download-Only Dsc-Only
+	\ Fix-Broken Fix-Missing Force-Yes HideAutoRemove Host-Architecture
+	\ List-Cleanup Only-Source Print-URIs Purge ReInstall Remove
+	\ Show-Upgraded Show-User-Simulation-Note Show-Versions Simulate
+	\ Tar-Only Trivial-Only Upgrade
+
+syn keyword	aptconfAptPeriodic contained
+	\ AutocleanInterval BackupArchiveInterval BackupLevel
+	\ Download-Upgradeable-Packages MaxAge MaxSize MinAge
+	\ Unattended-Upgrade Update-Package-Lists Verbose
+
+syn keyword	aptconfAptUpdate contained
+	\ Pre-Invoke Post-Invoke Post-Invoke-Success
+
+syn cluster	aptconfApt_ contains=aptconfApt,
+	\ aptconfAptAuthentication,aptconfAptAutoRemove,aptconfAptCache,
+	\ aptconfAptCDROM,aptconfAptChangelogs,aptconfAptCompressor,
+	\ aptconfAptCompressorAll,aptconfAptGet,aptconfAptPeriodic,
+	\ aptconfAptUpdate
+" }}}
+" Aptitude: {{{
+syn keyword	aptconfAptitude contained
+	\ Allow-Null-Upgrade Always-Use-Safe-Resolver Autoclean-After-Update
+	\ Auto-Install Auto-Fix-Broken Cmdline Debtags-Binary
+	\ Debtags-Update-Options Delete-Unused Delete-Unused-Pattern
+	\ Display-Planned-Action Forget-New-On-Install Forget-New-On-Update
+	\ Get-Root-Command Ignore-Old-Tmp Ignore-Recommends-Important
+	\ Keep-Recommends Keep-Suggests Keep-Unused-Pattern LockFile Log
+	\ Logging Parse-Description-Bullets Pkg-Display-Limit ProblemResolver
+	\ Purge-Unused Recommends-Important Safe-Resolver Screenshot Sections
+	\ Simulate Spin-Interval Suggests-Important Suppress-Read-Only-Warning
+	\ Theme Track-Dselect-State UI Warn-Not-Root
+
+syn keyword	aptconfAptitudeCmdline contained
+	\ Always-Prompt Assume-Yes Disable-Columns Download-Only Fix-Broken
+	\ Ignore-Trust-Violations Package-Display-Format Package-Display-Width
+	\ Progress Request-Strictness Resolver-Debug Resolver-Dump
+	\ Resolver-Show-Steps Safe-Upgrade Show-Deps Show-Size-Changes
+	\ Show-Versions Show-Why Simulate Verbose Version-Display-Format
+	\ Versions-Group-By Versions-Show-Package-Names Visual-Preview
+	\ Why-Display-Mode
+
+syn keyword	aptconfAptitudeCmdlineProgress contained
+	\ Percent-On-Right Retain-Completed
+
+syn keyword	aptconfAptitudeCmdlineSafeUpgrade contained
+	\ No-New-Installs
+
+syn keyword	aptconfAptitudeLogging contained
+	\ File Levels
+
+syn keyword	aptconfAptitudeProblemResolver contained
+	\ Allow-Break-Holds BreakHoldScore Break-Hold-Level BrokenScore
+	\ DefaultResolutionScore Discard-Null-Solution
+	\ EssentialRemoveScore ExtraScore FullReplacementScore FutureHorizon
+	\ Hints ImportantScore Infinity InstallScore Keep-All-Level KeepScore
+	\ NonDefaultScore Non-Default-Level OptionalScore PreserveAutoScore
+	\ PreserveManualScore RemoveScore Remove-Essential-Level Remove-Level
+	\ RequiredScore ResolutionScore Safe-Level SolutionCost StandardScore
+	\ StepLimit StepScore Trace-Directory Trace-File
+	\ UndoFullReplacementScore UnfixedSoftScore UpgradeScore
+
+syn keyword	aptconfAptitudeSafeResolver contained
+	\ No-New-Installs No-New-Upgrades Show-Resolver-Actions
+
+syn keyword	aptconfAptitudeScreenshot contained
+	\ Cache-Max IncrementalLoadLimit
+
+syn keyword	aptconfAptitudeSections contained
+	\ Descriptions Top-Sections
+
+syn keyword	aptconfAptitudeUI contained
+	\ Advance-On-Action Auto-Show-Reasons Default-Grouping
+	\ Default-Package-View Default-Preview-Grouping Default-Sorting
+	\ Description-Visible-By-Default Exit-On-Last-Close Fill-Text
+	\ Flat-View-As-First-View HelpBar Incremental-Search InfoAreaTabs
+	\ KeyBindings MenuBar-Autohide Minibuf-Download-Bar Minibuf-Prompts
+	\ New-package-Commands Package-Display-Format Package-Header-Format
+	\ Package-Status-Format Pause-After-Download Preview-Limit
+	\ Prompt-On-Exit Styles ViewTabs
+
+syn keyword	aptconfAptitudeUIKeyBindings contained
+	\ ApplySolution Begin BugReport Cancel Changelog ChangePkgTreeGrouping
+	\ ChangePkgTreeLimit ChangePkgTreeSorting ClearAuto CollapseAll
+	\ CollapseTree Commit Confirm Cycle CycleNext CycleOrder CyclePrev
+	\ DelBOL DelBack DelEOL DelForward Dependencies DescriptionCycle
+	\ DescriptionDown DescriptionUp DoInstallRun Down DpkgReconfigure
+	\ DumpResolver EditHier End ExamineSolution ExpandAll ExpandTree
+	\ FirstSolution ForbidUpgrade ForgetNewPackages Help HistoryNext
+	\ HistoryPrev Hold Install InstallSingle Keep LastSolution Left
+	\ LevelDown LevelUp MarkUpgradable MineFlagSquare MineLoadGame
+	\ MineSaveGame MineSweepSquare MineUncoverSquare MineUncoverSweepSquare
+	\ NextPage NextSolution No Parent PrevPage PrevSolution Purge
+	\ PushButton Quit QuitProgram RejectBreakHolds Refresh Remove
+	\ ReInstall RepeatSearchBack ReSearch ReverseDependencies Right
+	\ SaveHier Search SearchBack SearchBroken SetAuto ShowHideDescription
+	\ SolutionActionApprove SolutionActionReject ToggleExpanded
+	\ ToggleMenuActive Undo Up UpdatePackageList Versions Yes
+
+syn keyword	aptconfAptitudeUIStyles contained
+	\ Bullet ChangeLogNewerVersion Default DepBroken DisabledMenuEntry
+	\ DownloadHit DownloadProgress EditLine Error Header HighlightedMenuBar
+	\ HighlightedMenuEntry MediaChange MenuBar MenuBorder MenuEntry
+	\ MineBomb MineBorder MineFlag MineNumber1 MineNumber2 MineNumber3
+	\ MineNumber4 MineNumber5 MineNumber6 MineNumber7 MineNumber8
+	\ MultiplexTab MultiplexTabHighlighted PkgBroken PkgBrokenHighlighted
+	\ PkgIsInstalled PkgIsInstalledHighlighted PkgNotInstalled
+	\ PkgNotInstalledHighlighted PkgToDowngrade PkgToDowngradeHighlighted
+	\ PkgToHold PkgToHoldHighlighted PkgToInstall PkgToInstallHighlighted
+	\ PkgToRemove PkgToRemoveHighlighted PkgToUpgrade
+	\ PkgToUpgradeHighlighted Progress SolutionActionApproved
+	\ SolutionActionRejected Status TreeBackground TrustWarning
+
+syn keyword	aptconfAptitudeUIStylesElements contained
+	\ bg clear fg flip set
+
+syn cluster	aptconfAptitude_ contains=aptconfAptitude,
+	\ aptconfAptitudeCmdline,aptconfAptitudeCmdlineProgress,
+	\ aptconfAptitudeCmdlineSafeUpgrade,aptconfAptitudeLogging,
+	\ aptconfAptitudeProblemResolver,aptconfAptitudeSafeResolver,
+	\ aptconfAptitudeScreenshot,aptconfAptitudeSections,aptconfAptitudeUI,
+	\ aptconfAptitudeUIKeyBindings,aptconfAptitudeUIStyles,
+	\ aptconfAptitudeUIStylesElements
+" }}}
+" DebTags: {{{
+syn keyword	aptconfDebTags contained
+	\ Vocabulary
+
+syn cluster	aptconfDebTags_ contains=aptconfDebTags
+" }}}
+" Debug: {{{
+syn keyword	aptconfDebug contained
+	\ Acquire aptcdrom BuildDeps Hashes IdentCdrom Nolocking
+	\ pkgAcquire pkgAutoRemove pkgCacheGen pkgDepCache pkgDPkgPM
+	\ pkgDPkgProgressReporting pkgInitialize pkgOrderList
+	\ pkgPackageManager pkgPolicy pkgProblemResolver sourceList
+
+syn keyword	aptconfDebugAcquire contained
+	\ cdrom Ftp gpgv Http Https netrc
+
+syn keyword	aptconfDebugPkgAcquire contained
+	\ Auth Diffs RRed Worker
+
+syn keyword	aptconfDebugPkgDepCache contained
+	\ AutoInstall Marker
+
+syn keyword	aptconfDebugPkgProblemResolver contained
+	\ ShowScores
+
+syn cluster	aptconfDebug_ contains=aptconfDebug,
+	\ aptconfDebugAcquire,aptconfDebugPkgAcquire,aptconfDebugPkgDepCache,
+	\ aptconfDebugPkgProblemResolver
+" }}}
+" Dir: {{{
+syn keyword	aptconfDir contained
+	\ Aptitude Bin Cache Etc Ignore-Files-Silently Log Media Parts RootDir
+	\ State
+
+syn keyword	aptconfDirAptitude contained
+	\ state
+
+syn keyword	aptconfDirBin contained
+	\ apt-get apt-cache dpkg dpkg-buildpackage dpkg-source gpg gzip Methods
+	\ solvers
+
+syn keyword	aptconfDirCache contained
+	\ Archives Backup pkgcache srcpkgcache
+
+syn keyword	aptconfDirEtc contained
+	\ Main Netrc Parts Preferences PreferencesParts SourceList SourceParts
+	\ VendorList VendorParts Trusted TrustedParts
+
+syn keyword	aptconfDirLog contained
+	\ History Terminal
+
+syn keyword	aptconfDirMedia contained
+	\ MountPath
+
+syn keyword	aptconfDirState contained
+	\ cdroms extended_states Lists mirrors status
+
+syn cluster	aptconfDir_ contains=aptconfDir,
+	\ aptconfDirAptitude,aptconfDirBin,aptconfDirCache,aptconfDirEtc,
+	\ aptconfDirLog,aptconfDirMedia,aptconfDirState
+" }}}
+" DPkg: {{{
+syn keyword	aptconfDPkg contained
+	\ Build-Options Chroot-Directory ConfigurePending FlushSTDIN MaxArgs
+	\ MaxBytes NoTriggers options Pre-Install-Pkgs Pre-Invoke Post-Invoke
+	\ Run-Directory StopOnError Tools TriggersPending
+
+syn keyword	aptconfDPkgTools contained
+	\ Options Version
+
+syn cluster	aptconfDPkg_ contains=aptconfDPkg,
+	\ aptconfDPkgOrderList,aptconfDPkgOrderListScore,aptconfDPkgTools
+" }}}
+" DSelect: {{{
+syn keyword	aptconfDSelect contained
+	\ CheckDir Clean Options PromptAfterUpdate UpdateOptions
+
+syn cluster	aptconfDSelect_ contains=aptconfDSelect
+" }}}
+" OrderList: {{{
+syn keyword	aptconfOrderList contained
+	\ Score
+
+syn keyword	aptconfOrderListScore contained
+	\ Delete Essential Immediate PreDepends
+
+syn cluster	aptconfOrderList_ contains=aptconfOrderList,
+	\ aptconfOrderListScore
+" }}}
+" PackageManager: {{{
+syn keyword	aptconfPackageManager contained
+	\ Configure
+
+syn cluster	aptconfPackageManager_ contains=aptconfPackageManager
+" }}}
+" PkgCacheGen: {{{
+syn keyword	aptconfPkgCacheGen contained
+	\ Essential
+
+syn cluster	aptconfPkgCacheGen_ contains=aptconfPkgCacheGen
+" }}}
+" Quiet: {{{
+syn keyword	aptconfQuiet contained
+	\ NoUpdate
+
+syn cluster	aptconfQuiet_ contains=aptconfQuiet
+" }}}
+" Rpm: {{{
+syn keyword	aptconfRpm contained
+	\ Post-Invoke Pre-Invoke
+
+syn cluster	aptconfRpm_ contains=aptconfRpm
+" }}}
+" Unattened Upgrade: {{{
+syn keyword	aptconfUnattendedUpgrade contained
+	\ AutoFixInterruptedDpkg Automatic-Reboot InstallOnShutdown Mail
+	\ MailOnlyOnError MinimalSteps Origins-Pattern Package-Blacklist
+	\ Remove-Unused-Dependencies
+
+syn cluster	aptconfUnattendedUpgrade_ contains=aptconfUnattendedUpgrade
+" }}}
+
+syn case	match
+
+" Now put all the keywords (and 'valid' options) in a single cluster:
+syn cluster	aptconfOptions contains=aptconfRegexpOpt,
+	\ @aptconfAcquire_,@aptconfApt_,@aptconfAptitude_,@aptconfDebTags_,
+	\ @aptconfDebug_,@aptconfDir_,@aptconfDPkg_,@aptconfDSelect_,
+	\ @aptconfOrderList_,@aptconfPackageManager_,@aptconfPkgCacheGen_,
+	\ @aptconfQuiet_,@aptconfRpm_,@aptconfUnattendedUpgrade_
+
+" Syntax:
+syn match	aptconfSemiColon	';'
+syn match	aptconfDoubleColon	'::'
+syn match	aptconfCurlyBraces	'[{}]'
+syn region	aptconfValue		start='"' end='"' oneline display
+syn region	aptconfInclude		matchgroup=aptconfOperator start='{' end='}' contains=ALLBUT,aptconfGroup,aptconfGroupIncomplete,@aptconfCommentSpecial
+syn region	aptconfInclude		matchgroup=aptconfOperator start='::' end='{'me=s-1 contains=@aptconfOptions,aptconfError display
+syn region	aptconfInclude		matchgroup=aptconfOperator start='::' end='::\|\s'me=s-1 oneline contains=@aptconfOptions,aptconfError display
+
+" Basic Syntax Errors: XXX avoid to generate false positives !!!
+"
+" * Invalid comment format (seems to not cause errors, but...):
+syn match	aptconfAsError		display '^#.*'
+"
+" * When a semicolon is missing after a double-quoted string:
+" There are some cases (for example in the Dir group of options, but not only)
+" where this syntax is valid. So we don't treat it as a strict error.
+syn match	aptconfAsError		display '"[^"]*"[^;]'me=e-1
+syn match	aptconfAsError		display '"[^"]*"$'
+"
+" * When double quotes are missing around a value (before a semicolon):
+" This omission has no effect if the value is a single string (without blank
+" characters). But apt.conf(5) says that quotes are required, and this item
+" avoids to match unquoted keywords.
+syn match	aptconfAsError		display '\s[^"[:blank:]]*[^}"];'me=e-1
+"
+" * When only one double quote is missing around a value (before a semicolon):
+" No comment for that: it must be highly visible.
+syn match	aptconfError		display '\(\s\|;\)"[^"[:blank:]]\+;'me=e-1
+syn match	aptconfError		display '\(\s\|;\)[^"[:blank:]]\+";'me=e-1
+"
+" * When space is missing between option and (quoted) value:
+" TODO (partially implemented)
+syn match	aptconfError		display '::[^[:blank:]]*"'
+
+" Special Actions:
+syn match	aptconfAction		'^#\(clear\|include\)\>'
+syn region	aptconfAction		matchgroup=aptconfAction start='^#clear\>' end=';'me=s-1 oneline contains=aptconfGroup,aptconfDoubleColon,@aptconfOptions
+syn region	aptconfAction		matchgroup=aptconfAction start='^#include\>' end=';'me=s-1 oneline contains=aptconfRegexpOpt
+
+" Comments:
+syn keyword	aptconfTodo		TODO FIXME NOTE XXX contained
+syn cluster	aptconfCommentSpecial	contains=@Spell,aptconfTodo
+syn match	aptconfComment		'//.*' contains=@aptconfCommentSpecial
+syn region	aptconfComment		start='/\*' end='\*/' contains=@aptconfCommentSpecial
+
+" Highlight Definitions:
+hi def link aptconfTodo				Todo
+hi def link aptconfError			Error
+hi def link aptconfComment			Comment
+hi def link aptconfOperator			Operator
+
+hi def link aptconfAction			PreProc
+hi def link aptconfOption			Type
+hi def link aptconfValue			String
+hi def link aptconfRegexpOpt			Normal
+hi def link aptconfAsError			Special
+
+hi def link aptconfSemiColon			aptconfOperator
+hi def link aptconfDoubleColon			aptconfOperator
+hi def link aptconfCurlyBraces			aptconfOperator
+
+hi def link aptconfGroupIncomplete		Special
+hi def link aptconfGroup			aptconfOption
+
+hi def link aptconfAcquire			aptconfOption
+hi def link aptconfAcquireCDROM			aptconfOption
+hi def link aptconfAcquireCompressionTypes	aptconfOption
+hi def link aptconfAcquireFTP			aptconfOption
+hi def link aptconfAcquireHTTP			aptconfOption
+hi def link aptconfAcquireHTTPS			aptconfOption
+hi def link aptconfAcquireMaxValidTime		aptconfOption
+hi def link aptconfAcquirePDiffs		aptconfOption
+
+hi def link aptconfApt				aptconfOption
+hi def link aptconfAptAuthentication		aptconfOption
+hi def link aptconfAptAutoRemove		aptconfOption
+hi def link aptconfAptCache			aptconfOption
+hi def link aptconfAptCDROM			aptconfOption
+hi def link aptconfAptChangelogs		aptconfOption
+hi def link aptconfAptCompressor		aptconfOption
+hi def link aptconfAptCompressorAll		aptconfOption
+hi def link aptconfAptGet			aptconfOption
+hi def link aptconfAptPeriodic			aptconfOption
+hi def link aptconfAptUpdate			aptconfOption
+
+hi def link aptconfAptitude			aptconfOption
+hi def link aptconfAptitudeCmdline		aptconfOption
+hi def link aptconfAptitudeCmdlineProgress	aptconfOption
+hi def link aptconfAptitudeCmdlineSafeUpgrade	aptconfOption
+hi def link aptconfAptitudeLogging		aptconfOption
+hi def link aptconfAptitudeProblemResolver	aptconfOption
+hi def link aptconfAptitudeSafeResolver		aptconfOption
+hi def link aptconfAptitudeScreenshot		aptconfOption
+hi def link aptconfAptitudeSections		aptconfOption
+hi def link aptconfAptitudeUI			aptconfOption
+hi def link aptconfAptitudeUIKeyBindings	aptconfOption
+hi def link aptconfAptitudeUIStyles		aptconfOption
+hi def link aptconfAptitudeUIStylesElements	aptconfOption
+
+hi def link aptconfDebTags			aptconfOption
+
+hi def link aptconfDebug			aptconfOption
+hi def link aptconfDebugAcquire			aptconfOption
+hi def link aptconfDebugPkgAcquire		aptconfOption
+hi def link aptconfDebugPkgDepCache		aptconfOption
+hi def link aptconfDebugPkgProblemResolver	aptconfOption
+
+hi def link aptconfDir				aptconfOption
+hi def link aptconfDirAptitude			aptconfOption
+hi def link aptconfDirBin			aptconfOption
+hi def link aptconfDirCache			aptconfOption
+hi def link aptconfDirEtc			aptconfOption
+hi def link aptconfDirLog			aptconfOption
+hi def link aptconfDirMedia			aptconfOption
+hi def link aptconfDirState			aptconfOption
+
+hi def link aptconfDPkg				aptconfOption
+hi def link aptconfDPkgTools			aptconfOption
+
+hi def link aptconfDSelect			aptconfOption
+
+hi def link aptconfOrderList			aptconfOption
+hi def link aptconfOrderListScore		aptconfOption
+
+hi def link aptconfPackageManager		aptconfOption
+
+hi def link aptconfPkgCacheGen			aptconfOption
+
+hi def link aptconfQuiet			aptconfOption
+
+hi def link aptconfRpm				aptconfOption
+
+hi def link aptconfUnattendedUpgrade		aptconfOption
+
+let b:current_syntax = "aptconf"
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/syntax/asciidoc.vim b/runtime/syntax/asciidoc.vim
new file mode 100644
index 0000000000..1303db7cf2
--- /dev/null
+++ b/runtime/syntax/asciidoc.vim
@@ -0,0 +1,183 @@
+" Vim syntax file
+" Language:     AsciiDoc
+" Author:       Stuart Rackham  (inspired by Felix
+"               Obenhuber's original asciidoc.vim script).
+" URL:          http://asciidoc.org/
+" Licence:      GPL (http://www.gnu.org)
+" Remarks:      Vim 6 or greater
+" Limitations:
+" 
+" - Nested quoted text formatting is highlighted according to the outer
+"   format.
+" - If a closing Example Block delimiter may be mistaken for a title
+"   underline. A workaround is to insert a blank line before the closing
+"   delimiter.
+" - Lines within a paragraph starting with equals characters are
+"   highlighted as single-line titles.
+" - Lines within a paragraph beginning with a period are highlighted as
+"   block titles.
+
+
+if exists("b:current_syntax")
+  finish
+endif
+
+syn clear
+syn sync fromstart
+syn sync linebreaks=100
+
+" Run :help syn-priority to review syntax matching priority.
+syn keyword asciidocToDo TODO FIXME CHECK TEST XXX ZZZ DEPRECATED
+syn match asciidocBackslash /\\/
+syn region asciidocIdMarker start=/^\$Id:\s/ end=/\s\$$/
+syn match asciidocCallout /\\\@/
+syn match asciidocOpenBlockDelimiter /^--$/
+syn match asciidocLineBreak /[ \t]+$/ containedin=asciidocList
+syn match asciidocRuler /^'\{3,}$/
+syn match asciidocPagebreak /^<\{3,}$/
+syn match asciidocEntityRef /\\\@\?[0-9A-Za-z_]\@!/
+syn match asciidocAttributeRef /\\\@.]\{,3}\)\?\([a-z]\)\?\)\?|/ containedin=asciidocTableBlock contained
+syn region asciidocTableBlock matchgroup=asciidocTableDelimiter start=/^|=\{3,}$/ end=/^|=\{3,}$/ keepend contains=ALL
+syn match asciidocTablePrefix /\(\S\@.]\{,3}\)\?\([a-z]\)\?\)\?!/ containedin=asciidocTableBlock contained
+syn region asciidocTableBlock2 matchgroup=asciidocTableDelimiter2 start=/^!=\{3,}$/ end=/^!=\{3,}$/ keepend contains=ALL
+
+syn match asciidocListContinuation /^+$/
+syn region asciidocLiteralBlock start=/^\.\{4,}$/ end=/^\.\{4,}$/ contains=asciidocCallout,asciidocToDo keepend
+syn region asciidocListingBlock start=/^-\{4,}$/ end=/^-\{4,}$/ contains=asciidocCallout,asciidocToDo keepend
+syn region asciidocCommentBlock start="^/\{4,}$" end="^/\{4,}$" contains=asciidocToDo
+syn region asciidocPassthroughBlock start="^+\{4,}$" end="^+\{4,}$"
+
+" Allowing leading \w characters in the filter delimiter is to accomodate
+" the pre version 8.2.7 syntax and may be removed in future releases.
+syn region asciidocFilterBlock start=/^\w*\~\{4,}$/ end=/^\w*\~\{4,}$/
+
+syn region asciidocMacroAttributes matchgroup=asciidocRefMacro start=/\\\@>\)\|^$/ contains=asciidocQuoted.* keepend
+syn region asciidocMacroAttributes matchgroup=asciidocAnchorMacro start=/\\\@
 " URL:		http://www.fleiner.com/vim/syntax/asn.vim
-" Last Change:	2001 Apr 26
+" Last Change:	2012 Oct 05
 
 " For version 5.x: Clear all syntax items
 " For version 6.x: Quit when a syntax file was already loaded
@@ -12,6 +12,9 @@ elseif exists("b:current_syntax")
   finish
 endif
 
+let s:cpo_save = &cpo
+set cpo&vim
+
 " keyword definitions
 syn keyword asnExternal		DEFINITIONS BEGIN END IMPORTS EXPORTS FROM
 syn match   asnExternal		"\"
@@ -76,6 +79,8 @@ if version >= 508 || !exists("did_asn_syn_inits")
   delcommand HiLink
 endif
 
+let &cpo = s:cpo_save
+unlet s:cpo_save
 let b:current_syntax = "asn"
 
 " vim: ts=8
diff --git a/runtime/syntax/c.vim b/runtime/syntax/c.vim
index 6f99004e3c..7a58ae712d 100644
--- a/runtime/syntax/c.vim
+++ b/runtime/syntax/c.vim
@@ -1,7 +1,7 @@
 " Vim syntax file
 " Language:	C
 " Maintainer:	Bram Moolenaar 
-" Last Change:	2012 May 03
+" Last Change:	2013 Jul 05
 
 " Quit when a (custom) syntax file was already loaded
 if exists("b:current_syntax")
@@ -11,6 +11,8 @@ endif
 let s:cpo_save = &cpo
 set cpo&vim
 
+let s:ft = matchstr(&ft, '^\([^.]\)\+')
+
 " A bunch of useful C keywords
 syn keyword	cStatement	goto break return continue asm
 syn keyword	cLabel		case default
@@ -21,7 +23,7 @@ syn keyword	cTodo		contained TODO FIXME XXX
 
 " It's easy to accidentally add a space after a backslash that was intended
 " for line continuation.  Some compilers allow it, which makes it
-" unpredicatable and should be avoided.
+" unpredictable and should be avoided.
 syn match	cBadContinuation contained "\\\s\+$"
 
 " cCommentGroup allows adding matches for special things in comments
@@ -36,7 +38,13 @@ endif
 if exists("c_no_cformat")
   syn region	cString		start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,@Spell extend
   " cCppString: same as cString, but ends at end of line
-  syn region	cCppString	start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,@Spell
+  if !exists("cpp_no_cpp11") " ISO C++11
+    syn region cCppString	start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell
+  else
+    syn region cCppString	start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell
+  endif
+  syn region	cCppOut2	contained start="0" end="^\s*\(%:\|#\)\s*\(endif\>\|else\>\|elif\>\)" contains=cSpaceError,cCppSkip
+  syn region	cCppSkip	contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppSkip
 else
   if !exists("c_no_c99") " ISO C99
     syn match	cFormat		display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlLjzt]\|ll\|hh\)\=\([aAbdiuoxXDOUfFeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained
@@ -93,41 +101,68 @@ endif
 
 " This should be before cErrInParen to avoid problems with #define ({ xxx })
 if exists("c_curly_error")
-  syntax match cCurlyError "}"
-  syntax region	cBlock		start="{" end="}" contains=ALLBUT,cBadBlock,cCurlyError,@cParenGroup,cErrInParen,cCppParen,cErrInBracket,cCppBracket,cCppString,@Spell fold
+  syn match cCurlyError "}"
+  syn region	cBlock		start="{" end="}" contains=ALLBUT,cBadBlock,cCurlyError,@cParenGroup,cErrInParen,cCppParen,cErrInBracket,cCppBracket,cCppString,@Spell fold
 else
-  syntax region	cBlock		start="{" end="}" transparent fold
+  syn region	cBlock		start="{" end="}" transparent fold
 endif
 
 "catch errors caused by wrong parenthesis and brackets
 " also accept <% for {, %> for }, <: for [ and :> for ] (C99)
 " But avoid matching <::.
-syn cluster	cParenGroup	contains=cParenError,cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserCont,cUserLabel,cBitField,cOctalZero,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom
+syn cluster	cParenGroup	contains=cParenError,cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserLabel,cBitField,cOctalZero,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom
 if exists("c_no_curly_error")
-  syn region	cParen		transparent start='(' end=')' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cCppParen,cCppString,@Spell
-  " cCppParen: same as cParen but ends at end-of-line; used in cDefine
-  syn region	cCppParen	transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell
-  syn match	cParenError	display ")"
-  syn match	cErrInParen	display contained "^[{}]\|^<%\|^%>"
+  if s:ft ==# 'cpp' && !exists("cpp_no_cpp11")
+    syn region	cParen		transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,cCppString,@Spell
+    " cCppParen: same as cParen but ends at end-of-line; used in cDefine
+    syn region	cCppParen	transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell
+    syn match	cParenError	display ")"
+    syn match	cErrInParen	display contained "^^<%\|^%>"
+  else
+    syn region	cParen		transparent start='(' end=')' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cCppParen,cCppString,@Spell
+    " cCppParen: same as cParen but ends at end-of-line; used in cDefine
+    syn region	cCppParen	transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell
+    syn match	cParenError	display ")"
+    syn match	cErrInParen	display contained "^[{}]\|^<%\|^%>"
+  endif
 elseif exists("c_no_bracket_error")
-  syn region	cParen		transparent start='(' end=')' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cCppParen,cCppString,@Spell
-  " cCppParen: same as cParen but ends at end-of-line; used in cDefine
-  syn region	cCppParen	transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell
-  syn match	cParenError	display ")"
-  syn match	cErrInParen	display contained "[{}]\|<%\|%>"
+  if s:ft ==# 'cpp' && !exists("cpp_no_cpp11")
+    syn region	cParen		transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,cCppString,@Spell
+    " cCppParen: same as cParen but ends at end-of-line; used in cDefine
+    syn region	cCppParen	transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell
+    syn match	cParenError	display ")"
+    syn match	cErrInParen	display contained "<%\|%>"
+  else
+    syn region	cParen		transparent start='(' end=')' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cCppParen,cCppString,@Spell
+    " cCppParen: same as cParen but ends at end-of-line; used in cDefine
+    syn region	cCppParen	transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell
+    syn match	cParenError	display ")"
+    syn match	cErrInParen	display contained "[{}]\|<%\|%>"
+  endif
 else
-  syn region	cParen		transparent start='(' end=')' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cCppParen,cErrInBracket,cCppBracket,cCppString,@Spell
-  " cCppParen: same as cParen but ends at end-of-line; used in cDefine
-  syn region	cCppParen	transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cErrInBracket,cParen,cBracket,cString,@Spell
-  syn match	cParenError	display "[\])]"
-  syn match	cErrInParen	display contained "[\]{}]\|<%\|%>"
-  syn region	cBracket	transparent start='\[\|<::\@!' end=']\|:>' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cErrInParen,cCppParen,cCppBracket,cCppString,@Spell
+  if s:ft ==# 'cpp' && !exists("cpp_no_cpp11")
+    syn region	cParen		transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,cErrInBracket,cCppBracket,cCppString,@Spell
+    " cCppParen: same as cParen but ends at end-of-line; used in cDefine
+    syn region	cCppParen	transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cErrInBracket,cParen,cBracket,cString,@Spell
+    syn match	cParenError	display "[\])]"
+    syn match	cErrInParen	display contained "<%\|%>"
+    syn region	cBracket	transparent start='\[\|<::\@!' end=']\|:>' contains=ALLBUT,@cParenGroup,cErrInParen,cCppParen,cCppBracket,cCppString,@Spell
+  else
+    syn region	cParen		transparent start='(' end=')' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cCppParen,cErrInBracket,cCppBracket,cCppString,@Spell
+    " cCppParen: same as cParen but ends at end-of-line; used in cDefine
+    syn region	cCppParen	transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cErrInBracket,cParen,cBracket,cString,@Spell
+    syn match	cParenError	display "[\])]"
+    syn match	cErrInParen	display contained "[\]{}]\|<%\|%>"
+    syn region	cBracket	transparent start='\[\|<::\@!' end=']\|:>' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cErrInParen,cCppParen,cCppBracket,cCppString,@Spell
+  endif
   " cCppBracket: same as cParen but ends at end-of-line; used in cDefine
   syn region	cCppBracket	transparent start='\[\|<::\@!' skip='\\$' excludenl end=']\|:>' end='$' contained contains=ALLBUT,@cParenGroup,cErrInParen,cParen,cBracket,cString,@Spell
   syn match	cErrInBracket	display contained "[);{}]\|<%\|%>"
 endif
 
-syntax region	cBadBlock	keepend start="{" end="}" contained containedin=cParen,cBracket,cBadBlock transparent fold
+if s:ft ==# 'c' || exists("cpp_no_cpp11")
+  syn region	cBadBlock	keepend start="{" end="}" contained containedin=cParen,cBracket,cBadBlock transparent fold
+endif
 
 "integer number, or floating point number without a dot and with "f".
 syn case ignore
@@ -164,16 +199,16 @@ if exists("c_comment_strings")
   " need to use a special type of cString: cCommentString, which also ends on
   " "*/", and sees a "*" at the start of the line as comment again.
   " Unfortunately this doesn't very well work for // type of comments :-(
-  syntax match	cCommentSkip	contained "^\s*\*\($\|\s\+\)"
-  syntax region cCommentString	contained start=+L\=\\\@" skip
 syn match	cPreConditMatch	display "^\s*\(%:\|#\)\s*\(else\|endif\)\>"
 if !exists("c_no_if0")
   syn cluster	cCppOutInGroup	contains=cCppInIf,cCppInElse,cCppInElse2,cCppOutIf,cCppOutIf2,cCppOutElse,cCppInSkip,cCppOutSkip
-  syn region	cCppOutWrapper	start="^\s*\(%:\|#\)\s*if\s\+0\+\s*\($\|//\|/\*\|&\)" end=".\@=\|$" contains=cCppOutIf,cCppOutElse fold
+  syn region	cCppOutWrapper	start="^\s*\(%:\|#\)\s*if\s\+0\+\s*\($\|//\|/\*\|&\)" end=".\@=\|$" contains=cCppOutIf,cCppOutElse,@NoSpell fold
   syn region	cCppOutIf	contained start="0\+" matchgroup=cCppOutWrapper end="^\s*\(%:\|#\)\s*endif\>" contains=cCppOutIf2,cCppOutElse
   if !exists("c_no_if0_fold")
-    syn region	cCppOutIf2	contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip fold
+    syn region	cCppOutIf2	contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell fold
   else
-    syn region	cCppOutIf2	contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip
+    syn region	cCppOutIf2	contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
   endif
   syn region	cCppOutElse	contained matchgroup=cCppOutWrapper start="^\s*\(%:\|#\)\s*\(else\|elif\)" end="^\s*\(%:\|#\)\s*endif\>"me=s-1 contains=TOP,cPreCondit
   syn region	cCppInWrapper	start="^\s*\(%:\|#\)\s*if\s\+0*[1-9]\d*\s*\($\|//\|/\*\||\)" end=".\@=\|$" contains=cCppInIf,cCppInElse fold
@@ -323,7 +358,7 @@ if !exists("c_no_if0")
   else
     syn region	cCppInElse	contained start="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2
   endif
-  syn region	cCppInElse2	contained matchgroup=cCppInWrapper start="^\s*\(%:\|#\)\s*\(else\|elif\)\([^/]\|/[^/*]\)*" end="^\s*\(%:\|#\)\s*endif\>"me=s-1 contains=cSpaceError,cCppOutSkip
+  syn region	cCppInElse2	contained matchgroup=cCppInWrapper start="^\s*\(%:\|#\)\s*\(else\|elif\)\([^/]\|/[^/*]\)*" end="^\s*\(%:\|#\)\s*endif\>"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
   syn region	cCppOutSkip	contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppOutSkip
   syn region	cCppInSkip	contained matchgroup=cCppInWrapper start="^\s*\(%:\|#\)\s*\(if\s\+\(\d\+\s*\($\|//\|/\*\||\|&\)\)\@!\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" containedin=cCppOutElse,cCppInIf,cCppInSkip contains=TOP,cPreProc
 endif
@@ -337,7 +372,9 @@ syn region	cPreProc	start="^\s*\(%:\|#\)\s*\(pragma\>\|line\>\|warning\>\|warn\>
 
 " Highlight User Labels
 syn cluster	cMultiGroup	contains=cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserCont,cUserLabel,cBitField,cOctalZero,cCppOutWrapper,cCppInWrapper,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cCppParen,cCppBracket,cCppString
-syn region	cMulti		transparent start='?' skip='::' end=':' contains=ALLBUT,@cMultiGroup,@Spell
+if s:ft ==# 'c' || exists("cpp_no_cpp11")
+  syn region	cMulti		transparent start='?' skip='::' end=':' contains=ALLBUT,@cMultiGroup,@Spell
+endif
 " Avoid matching foo::bar() in C++ by requiring that the next char is not ':'
 syn cluster	cLabelGroup	contains=cUserLabel
 syn match	cUserCont	display "^\s*\I\i*\s*:$" contains=@cLabelGroup
@@ -422,6 +459,8 @@ hi def link cCppOut		Comment
 
 let b:current_syntax = "c"
 
+unlet s:ft
+
 let &cpo = s:cpo_save
 unlet s:cpo_save
 " vim: ts=8
diff --git a/runtime/syntax/cl.vim b/runtime/syntax/cl.vim
index 343d2601d1..41c045fb09 100644
--- a/runtime/syntax/cl.vim
+++ b/runtime/syntax/cl.vim
@@ -1,25 +1,27 @@
 " Vim syntax file
 " Language:		CL
-"			(pronounced alphabetically, and NOT known as Clever)
-"			(CL was created by Multibase, http://www.mbase.com.au)
+" 			(pronounced alphabetically: "Cee-El".
+" 			CL stands for Clever Language,
+" 			but the language is CL, not "Clever".
+" 			CL was created by Multibase, http://www.mbase.com.au)
 " Filename extensions:	*.ent
 "			*.eni
 " Maintainer:		Philip Uren	 Remove SPAX spam block
-" Version:              4
-" Last Change:		May 11 2012
+" Version:              6
+" Last Change:		Mar 06 2013
 
 " For version 5.x: Clear all syntax items
 " For version 6.x: Quit when a syntax file was already loaded
 if version < 600
-    syntax clear
+	syntax clear
 elseif exists("b:current_syntax")
-    finish
+	finish
 endif
 
 if version >= 600
-    setlocal iskeyword=@,48-57,_,-,
+	setlocal iskeyword=@,48-57,_,-
 else
-    set iskeyword=@,48-57,_,-,
+	set iskeyword=@,48-57,_,-
 endif
 
 syn case ignore
@@ -27,87 +29,87 @@ syn case ignore
 syn sync lines=300
 
 "If/else/elsif/endif and while/wend mismatch errors
-syn match   clifError	    "\"
-syn match   clifError	    "\"
-syn match   clifError	    "\"
-syn match   clifError	    "\"
+syn match	clifError	"\"
+syn match	clifError	"\"
+syn match	clifError	"\"
+syn match	clifError	"\"
 
-syn match   clSpaceError    "\s\+$"
+syn match	clSpaceError	"\s\+$"
 
 " If and while regions
-syn region  clLoop	transparent matchgroup=clWhile start="\" matchgroup=clWhile end="\" contains=ALLBUT,clBreak,clProcedure
-syn region  clIf	transparent matchgroup=clConditional start="\" matchgroup=clConditional end="\"   contains=ALLBUT,clBreak,clProcedure
+syn region	clLoop		transparent matchgroup=clWhile start="\" matchgroup=clWhile end="\" contains=ALLBUT,clBreak,clProcedure
+syn region	clIf		transparent matchgroup=clConditional start="\" matchgroup=clConditional end="\"   contains=ALLBUT,clBreak,clProcedure
 
 " Make those TODO notes and debugging stand out!
-syn keyword clTodo	contained   TODO BUG DEBUG FIX
-syn match   clNeedsWork	contained   "NEED[S]*\s\s*WORK"
-syn keyword clDebug	contained   debug
+syn keyword	clTodo		contained	TODO BUG DEBUG FIX
+syn match	clNeedsWork	contained	"NEED[S]*\s\s*WORK"
+syn keyword	clDebug		contained	debug
 
-syn match   clComment	"#.*$"	    contains=clTodo,clNeedsWork
-syn region  clProcedure	oneline	    start="^\s*[{}]" end="$"
-syn match   clInclude	"^\s*include\s.*"
+syn match	clComment	"#.*$"		contains=clTodo,clNeedsWork,@Spell
+syn region	clProcedure	oneline		start="^\s*[{}]" end="$"
+syn match	clInclude	"^\s*include\s.*"
 
 " We don't put "debug" in the clSetOptions;
 " we contain it in clSet so we can make it stand out.
-syn keyword clSetOptions    transparent aauto abort align convert E fill fnum goback hangup justify null_exit output rauto rawprint rawdisplay repeat skip tab trim
-syn match   clSet	"^\s*set\s.*" contains=clSetOptions,clDebug
+syn keyword	clSetOptions	transparent aauto abort align convert E fill fnum goback hangup justify null_exit output rauto rawprint rawdisplay repeat skip tab trim
+syn match	clSet		"^\s*set\s.*" contains=clSetOptions,clDebug
 
-syn match   clPreProc	"^\s*#P.*"
+syn match	clPreProc	"^\s*#P.*"
 
-syn keyword clConditional   else elsif
-syn keyword clWhile	continue endloop
+syn keyword	clConditional	else elsif
+syn keyword	clWhile		continue endloop
 " 'break' needs to be a region so we can sync on it above.
-syn region  clBreak	oneline start="^\s*break" end="$"
+syn region	clBreak		oneline start="^\s*break" end="$"
 
-syn match   clOperator	"[!;|)(:.><+*=-]"
+syn match	clOperator	"[!;|)(:.><+*=-]"
 
-syn match   clNumber	"\<\d\+\(u\=l\=\|lu\|f\)\>"
+syn match	clNumber	"\<\d\+\(u\=l\=\|lu\|f\)\>"
 
-syn region  clString	matchgroup=clQuote  start=+"+ end=+"+	skip=+\\"+
-syn region  clString	matchgroup=clQuote  start=+'+ end=+'+	skip=+\\'+
+syn region	clString	matchgroup=clQuote	start=+"+ end=+"+	skip=+\\"+ contains=@Spell
+syn region	clString	matchgroup=clQuote	start=+'+ end=+'+	skip=+\\'+ contains=@Spell
 
-syn keyword clReserved	ERROR EXIT INTERRUPT LOCKED LREPLY MODE MCOL MLINE MREPLY NULL REPLY V1 V2 V3 V4 V5 V6 V7 V8 V9 ZERO BYPASS GOING_BACK AAUTO ABORT ABORT ALIGN BIGE CONVERT FNUM GOBACK HANGUP JUSTIFY NEXIT OUTPUT RAUTO RAWDISPLAY RAWPRINT REPEAT SKIP TAB TRIM LCOUNT PCOUNT PLINES SLINES SCOLS MATCH LMATCH
+syn keyword	clReserved	ERROR EXIT INTERRUPT LOCKED LREPLY MODE MCOL MLINE MREPLY NULL REPLY V1 V2 V3 V4 V5 V6 V7 V8 V9 ZERO BYPASS GOING_BACK AAUTO ABORT ABORT ALIGN BIGE CONVERT FNUM GOBACK HANGUP JUSTIFY NEXIT OUTPUT RAUTO RAWDISPLAY RAWPRINT REPEAT SKIP TAB TRIM LCOUNT PCOUNT PLINES SLINES SCOLS MATCH LMATCH
 
-syn keyword clFunction	asc asize chr name random slen srandom day getarg getcgi getenv lcase scat sconv sdel skey smult srep substr sword trim ucase match
+syn keyword	clFunction	asc asize chr name random slen srandom day getarg getcgi getenv lcase scat sconv sdel skey smult srep substr sword trim ucase match
 
-syn keyword clStatement	clear clear_eol clear_eos close copy create unique with where empty define define ldefine delay_form delete escape exit_block exit_do exit_process field fork format get getfile getnext getprev goto head join maintain message no_join on_eop on_key on_exit on_delete openin openout openapp pause popenin popenout popenio print put range read redisplay refresh restart_block screen select sleep text unlock write and not or do
+syn keyword	clStatement	clear clear_eol clear_eos close copy create unique with where empty define define ldefine delay_form delete escape exit_block exit_do exit_process field fork format get getfile getnext getprev goto head join maintain message no_join on_eop on_key on_exit on_delete openin openout openapp pause popenin popenout popenio print put range read redisplay refresh restart_block screen select sleep text unlock write and not or do
 
 " 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_cl_syntax_inits")
-    if	version < 508
-	let did_cl_syntax_inits = 1
-	command -nargs=+ HiLink hi link 
-    else
-	command -nargs=+ HiLink hi def link 
-    endif
-
-    HiLink clifError	Error
-    HiLink clSpaceError	Error
-    HiLink clWhile	Repeat
-    HiLink clConditional    Conditional
-    HiLink clDebug	Debug
-    HiLink clNeedsWork	Todo
-    HiLink clTodo	Todo
-    HiLink clComment	Comment
-    HiLink clProcedure	Procedure
-    HiLink clBreak	Procedure
-    HiLink clInclude	Include
-    HiLink clSetOption	Statement
-    HiLink clSet	Identifier
-    HiLink clPreProc	PreProc
-    HiLink clOperator	Operator
-    HiLink clNumber	Number
-    HiLink clString	String
-    HiLink clQuote	Delimiter
-    HiLink clReserved	Identifier
-    HiLink clFunction	Function
-    HiLink clStatement	Statement
-
-    delcommand HiLink
+if	version >= 508 || !exists("did_cl_syntax_inits")
+	if	version < 508
+		let did_cl_syntax_inits = 1
+		command -nargs=+ HiLink hi link 
+	else
+		command -nargs=+ HiLink hi def link 
+	endif
+
+	HiLink clifError	Error
+	HiLink clSpaceError	Error
+	HiLink clWhile		Repeat
+	HiLink clConditional	Conditional
+	HiLink clDebug		Debug
+	HiLink clNeedsWork	Todo
+	HiLink clTodo		Todo
+	HiLink clComment	Comment
+	HiLink clProcedure	Procedure
+	HiLink clBreak		Procedure
+	HiLink clInclude	Include
+	HiLink clSetOption	Statement
+	HiLink clSet		Identifier
+	HiLink clPreProc	PreProc
+	HiLink clOperator	Operator
+	HiLink clNumber		Number
+	HiLink clString		String
+	HiLink clQuote		Delimiter
+	HiLink clReserved	Identifier
+	HiLink clFunction	Function
+	HiLink clStatement	Statement
+
+	delcommand HiLink
 endif
 
 let b:current_syntax = "cl"
 
-" vim: ts=8 sw=4
+" vim: ts=8 sw=8
diff --git a/runtime/syntax/clean.vim b/runtime/syntax/clean.vim
index 10dc9cab39..11aa028b71 100644
--- a/runtime/syntax/clean.vim
+++ b/runtime/syntax/clean.vim
@@ -2,7 +2,7 @@
 " Language:		Clean
 " Author:		Pieter van Engelen 
 " Co-Author:	Arthur van Leeuwen 
-" Last Change:	2011 Dec 25 by Thilo Six
+" Last Change:	2013 Jun 19 by Jurriën Stutterheim
 
 " For version 5.x: Clear all syntax items
 " For version 6.x: Quit when a syntax file was already loaded
@@ -18,7 +18,6 @@ set cpo&vim
 " Some Clean-keywords
 syn keyword cleanConditional if case
 syn keyword cleanLabel let! with where in of
-syn keyword cleanInclude from import
 syn keyword cleanSpecial Start
 syn keyword cleanKeyword infixl infixr infix
 syn keyword cleanBasicType Int Real Char Bool String
@@ -26,6 +25,10 @@ syn keyword cleanSpecialType World ProcId Void Files File
 syn keyword cleanModuleSystem module implementation definition system
 syn keyword cleanTypeClass class instance export
 
+" Import highlighting
+syn region cleanIncludeRegion start="^\s*\(from\|import\|\s\+\(as\|qualified\)\)" end="\n" contains=cleanIncludeKeyword keepend
+syn keyword cleanIncludeKeyword contained from import as qualified
+
 " To do some Denotation Highlighting
 syn keyword cleanBoolDenot True False
 syn region  cleanStringDenot start=+"+ end=+"+
@@ -74,7 +77,7 @@ if version >= 508 || !exists("did_clean_syntax_init")
    HiLink cleanLabel		Label
    HiLink cleanKeyword      Keyword
    " Generic Preprocessing
-   HiLink cleanInclude      Include
+   HiLink cleanIncludeKeyword      Include
    HiLink cleanModuleSystem PreProc
    " Type
    HiLink cleanBasicType    Type
diff --git a/runtime/syntax/clojure.vim b/runtime/syntax/clojure.vim
new file mode 100644
index 0000000000..3108148ff6
--- /dev/null
+++ b/runtime/syntax/clojure.vim
@@ -0,0 +1,134 @@
+" Vim syntax file
+" Language:     Clojure
+" Authors:      Toralf Wittner 
+"               modified by Meikel Brandmeyer 
+" URL:          http://kotka.de/projects/clojure/vimclojure.html
+"
+" Maintainer:   Sung Pae 
+" URL:          https://github.com/guns/vim-clojure-static
+" License:      Same as Vim
+" Last Change:  05 February 2013
+
+if version < 600
+    syntax clear
+elseif exists("b:current_syntax")
+    finish
+endif
+
+setlocal iskeyword+=?,-,*,!,+,/,=,<,>,.,:,$
+
+" Generated from https://github.com/guns/vim-clojure-static/blob/vim-release-002/vim_clojure_static.clj
+" Clojure 1.5.0-RC6
+syntax keyword clojureConstant nil
+syntax keyword clojureBoolean false true
+syntax keyword clojureSpecial . catch clojure.core/fn clojure.core/let clojure.core/loop def do finally fn if let loop monitor-enter monitor-exit new quote recur set! throw try var
+syntax keyword clojureException catch finally throw try
+syntax keyword clojureCond case clojure.core/case clojure.core/cond clojure.core/cond-> clojure.core/cond->> clojure.core/condp clojure.core/if-let clojure.core/if-not clojure.core/when clojure.core/when-first clojure.core/when-let clojure.core/when-not cond cond-> cond->> condp if-let if-not when when-first when-let when-not
+syntax keyword clojureRepeat clojure.core/doall clojure.core/dorun clojure.core/doseq clojure.core/dotimes clojure.core/while doall dorun doseq dotimes while
+syntax keyword clojureDefine clojure.core/definline clojure.core/definterface clojure.core/defmacro clojure.core/defmethod clojure.core/defmulti clojure.core/defn clojure.core/defn- clojure.core/defonce clojure.core/defprotocol clojure.core/defrecord clojure.core/defstruct clojure.core/deftype definline definterface defmacro defmethod defmulti defn defn- defonce defprotocol defrecord defstruct deftype
+syntax keyword clojureMacro -> ->> .. amap and areduce as-> assert binding bound-fn clojure.core/-> clojure.core/->> clojure.core/.. clojure.core/amap clojure.core/and clojure.core/areduce clojure.core/as-> clojure.core/assert clojure.core/binding clojure.core/bound-fn clojure.core/comment clojure.core/declare clojure.core/delay clojure.core/dosync clojure.core/doto clojure.core/extend-protocol clojure.core/extend-type clojure.core/for clojure.core/future clojure.core/gen-class clojure.core/gen-interface clojure.core/import clojure.core/io! clojure.core/lazy-cat clojure.core/lazy-seq clojure.core/letfn clojure.core/locking clojure.core/memfn clojure.core/ns clojure.core/or clojure.core/proxy clojure.core/proxy-super clojure.core/pvalues clojure.core/refer-clojure clojure.core/reify clojure.core/some-> clojure.core/some->> clojure.core/sync clojure.core/time clojure.core/with-bindings clojure.core/with-in-str clojure.core/with-loading-context clojure.core/with-local-vars clojure.core/with-open clojure.core/with-out-str clojure.core/with-precision clojure.core/with-redefs comment declare delay dosync doto extend-protocol extend-type for future gen-class gen-interface import io! lazy-cat lazy-seq letfn locking memfn ns or proxy proxy-super pvalues refer-clojure reify some-> some->> sync time with-bindings with-in-str with-loading-context with-local-vars with-open with-out-str with-precision with-redefs
+syntax keyword clojureFunc * *' + +' - -' ->ArrayChunk ->Vec ->VecNode ->VecSeq -cache-protocol-fn -reset-methods / < <= = == > >= accessor aclone add-classpath add-watch agent agent-error agent-errors aget alength alias all-ns alter alter-meta! alter-var-root ancestors apply array-map aset aset-boolean aset-byte aset-char aset-double aset-float aset-int aset-long aset-short assoc assoc! assoc-in associative? atom await await-for await1 bases bean bigdec bigint biginteger bit-and bit-and-not bit-clear bit-flip bit-not bit-or bit-set bit-shift-left bit-shift-right bit-test bit-xor boolean boolean-array booleans bound-fn* bound? butlast byte byte-array bytes cast char char-array char? chars chunk chunk-append chunk-buffer chunk-cons chunk-first chunk-next chunk-rest chunked-seq? class class? clear-agent-errors clojure-version clojure.core/* clojure.core/*' clojure.core/+ clojure.core/+' clojure.core/- clojure.core/-' clojure.core/->ArrayChunk clojure.core/->Vec clojure.core/->VecNode clojure.core/->VecSeq clojure.core/-cache-protocol-fn clojure.core/-reset-methods clojure.core// clojure.core/< clojure.core/<= clojure.core/= clojure.core/== clojure.core/> clojure.core/>= clojure.core/accessor clojure.core/aclone clojure.core/add-classpath clojure.core/add-watch clojure.core/agent clojure.core/agent-error clojure.core/agent-errors clojure.core/aget clojure.core/alength clojure.core/alias clojure.core/all-ns clojure.core/alter clojure.core/alter-meta! clojure.core/alter-var-root clojure.core/ancestors clojure.core/apply clojure.core/array-map clojure.core/aset clojure.core/aset-boolean clojure.core/aset-byte clojure.core/aset-char clojure.core/aset-double clojure.core/aset-float clojure.core/aset-int clojure.core/aset-long clojure.core/aset-short clojure.core/assoc clojure.core/assoc! clojure.core/assoc-in clojure.core/associative? clojure.core/atom clojure.core/await clojure.core/await-for clojure.core/await1 clojure.core/bases clojure.core/bean clojure.core/bigdec clojure.core/bigint clojure.core/biginteger clojure.core/bit-and clojure.core/bit-and-not clojure.core/bit-clear clojure.core/bit-flip clojure.core/bit-not clojure.core/bit-or clojure.core/bit-set clojure.core/bit-shift-left clojure.core/bit-shift-right clojure.core/bit-test clojure.core/bit-xor clojure.core/boolean clojure.core/boolean-array clojure.core/booleans clojure.core/bound-fn* clojure.core/bound? clojure.core/butlast clojure.core/byte clojure.core/byte-array clojure.core/bytes clojure.core/cast clojure.core/char clojure.core/char-array clojure.core/char? clojure.core/chars clojure.core/chunk clojure.core/chunk-append clojure.core/chunk-buffer clojure.core/chunk-cons clojure.core/chunk-first clojure.core/chunk-next clojure.core/chunk-rest clojure.core/chunked-seq? clojure.core/class clojure.core/class? clojure.core/clear-agent-errors clojure.core/clojure-version clojure.core/coll? clojure.core/commute clojure.core/comp clojure.core/comparator clojure.core/compare clojure.core/compare-and-set! clojure.core/compile clojure.core/complement clojure.core/concat clojure.core/conj clojure.core/conj! clojure.core/cons clojure.core/constantly clojure.core/construct-proxy clojure.core/contains? clojure.core/count clojure.core/counted? clojure.core/create-ns clojure.core/create-struct clojure.core/cycle clojure.core/dec clojure.core/dec' clojure.core/decimal? clojure.core/delay? clojure.core/deliver clojure.core/denominator clojure.core/deref clojure.core/derive clojure.core/descendants clojure.core/destructure clojure.core/disj clojure.core/disj! clojure.core/dissoc clojure.core/dissoc! clojure.core/distinct clojure.core/distinct? clojure.core/double clojure.core/double-array clojure.core/doubles clojure.core/drop clojure.core/drop-last clojure.core/drop-while clojure.core/empty clojure.core/empty? clojure.core/ensure clojure.core/enumeration-seq clojure.core/error-handler clojure.core/error-mode clojure.core/eval clojure.core/even? clojure.core/every-pred clojure.core/every? clojure.core/ex-data clojure.core/ex-info clojure.core/extend clojure.core/extenders clojure.core/extends? clojure.core/false? clojure.core/ffirst clojure.core/file-seq clojure.core/filter clojure.core/filterv clojure.core/find clojure.core/find-keyword clojure.core/find-ns clojure.core/find-protocol-impl clojure.core/find-protocol-method clojure.core/find-var clojure.core/first clojure.core/flatten clojure.core/float clojure.core/float-array clojure.core/float? clojure.core/floats clojure.core/flush clojure.core/fn? clojure.core/fnext clojure.core/fnil clojure.core/force clojure.core/format clojure.core/frequencies clojure.core/future-call clojure.core/future-cancel clojure.core/future-cancelled? clojure.core/future-done? clojure.core/future? clojure.core/gensym clojure.core/get clojure.core/get-in clojure.core/get-method clojure.core/get-proxy-class clojure.core/get-thread-bindings clojure.core/get-validator clojure.core/group-by clojure.core/hash clojure.core/hash-combine clojure.core/hash-map clojure.core/hash-set clojure.core/identical? clojure.core/identity clojure.core/ifn? clojure.core/in-ns clojure.core/inc clojure.core/inc' clojure.core/init-proxy clojure.core/instance? clojure.core/int clojure.core/int-array clojure.core/integer? clojure.core/interleave clojure.core/intern clojure.core/interpose clojure.core/into clojure.core/into-array clojure.core/ints clojure.core/isa? clojure.core/iterate clojure.core/iterator-seq clojure.core/juxt clojure.core/keep clojure.core/keep-indexed clojure.core/key clojure.core/keys clojure.core/keyword clojure.core/keyword? clojure.core/last clojure.core/line-seq clojure.core/list clojure.core/list* clojure.core/list? clojure.core/load clojure.core/load-file clojure.core/load-reader clojure.core/load-string clojure.core/loaded-libs clojure.core/long clojure.core/long-array clojure.core/longs clojure.core/macroexpand clojure.core/macroexpand-1 clojure.core/make-array clojure.core/make-hierarchy clojure.core/map clojure.core/map-indexed clojure.core/map? clojure.core/mapcat clojure.core/mapv clojure.core/max clojure.core/max-key clojure.core/memoize clojure.core/merge clojure.core/merge-with clojure.core/meta clojure.core/method-sig clojure.core/methods clojure.core/min clojure.core/min-key clojure.core/mod clojure.core/munge clojure.core/name clojure.core/namespace clojure.core/namespace-munge clojure.core/neg? clojure.core/newline clojure.core/next clojure.core/nfirst clojure.core/nil? clojure.core/nnext clojure.core/not clojure.core/not-any? clojure.core/not-empty clojure.core/not-every? clojure.core/not= clojure.core/ns-aliases clojure.core/ns-imports clojure.core/ns-interns clojure.core/ns-map clojure.core/ns-name clojure.core/ns-publics clojure.core/ns-refers clojure.core/ns-resolve clojure.core/ns-unalias clojure.core/ns-unmap clojure.core/nth clojure.core/nthnext clojure.core/nthrest clojure.core/num clojure.core/number? clojure.core/numerator clojure.core/object-array clojure.core/odd? clojure.core/parents clojure.core/partial clojure.core/partition clojure.core/partition-all clojure.core/partition-by clojure.core/pcalls clojure.core/peek clojure.core/persistent! clojure.core/pmap clojure.core/pop clojure.core/pop! clojure.core/pop-thread-bindings clojure.core/pos? clojure.core/pr clojure.core/pr-str clojure.core/prefer-method clojure.core/prefers clojure.core/print clojure.core/print-ctor clojure.core/print-simple clojure.core/print-str clojure.core/printf clojure.core/println clojure.core/println-str clojure.core/prn clojure.core/prn-str clojure.core/promise clojure.core/proxy-call-with-super clojure.core/proxy-mappings clojure.core/proxy-name clojure.core/push-thread-bindings clojure.core/quot clojure.core/rand clojure.core/rand-int clojure.core/rand-nth clojure.core/range clojure.core/ratio? clojure.core/rational? clojure.core/rationalize clojure.core/re-find clojure.core/re-groups clojure.core/re-matcher clojure.core/re-matches clojure.core/re-pattern clojure.core/re-seq clojure.core/read clojure.core/read-line clojure.core/read-string clojure.core/realized? clojure.core/reduce clojure.core/reduce-kv clojure.core/reduced clojure.core/reduced? clojure.core/reductions clojure.core/ref clojure.core/ref-history-count clojure.core/ref-max-history clojure.core/ref-min-history clojure.core/ref-set clojure.core/refer clojure.core/release-pending-sends clojure.core/rem clojure.core/remove clojure.core/remove-all-methods clojure.core/remove-method clojure.core/remove-ns clojure.core/remove-watch clojure.core/repeat clojure.core/repeatedly clojure.core/replace clojure.core/replicate clojure.core/require clojure.core/reset! clojure.core/reset-meta! clojure.core/resolve clojure.core/rest clojure.core/restart-agent clojure.core/resultset-seq clojure.core/reverse clojure.core/reversible? clojure.core/rseq clojure.core/rsubseq clojure.core/satisfies? clojure.core/second clojure.core/select-keys clojure.core/send clojure.core/send-off clojure.core/send-via clojure.core/seq clojure.core/seq? clojure.core/seque clojure.core/sequence clojure.core/sequential? clojure.core/set clojure.core/set-agent-send-executor! clojure.core/set-agent-send-off-executor! clojure.core/set-error-handler! clojure.core/set-error-mode! clojure.core/set-validator! clojure.core/set? clojure.core/short clojure.core/short-array clojure.core/shorts clojure.core/shuffle clojure.core/shutdown-agents clojure.core/slurp clojure.core/some clojure.core/some-fn clojure.core/sort clojure.core/sort-by clojure.core/sorted-map clojure.core/sorted-map-by clojure.core/sorted-set clojure.core/sorted-set-by clojure.core/sorted? clojure.core/special-symbol? clojure.core/spit clojure.core/split-at clojure.core/split-with clojure.core/str clojure.core/string? clojure.core/struct clojure.core/struct-map clojure.core/subs clojure.core/subseq clojure.core/subvec clojure.core/supers clojure.core/swap! clojure.core/symbol clojure.core/symbol? clojure.core/take clojure.core/take-last clojure.core/take-nth clojure.core/take-while clojure.core/test clojure.core/the-ns clojure.core/thread-bound? clojure.core/to-array clojure.core/to-array-2d clojure.core/trampoline clojure.core/transient clojure.core/tree-seq clojure.core/true? clojure.core/type clojure.core/unchecked-add clojure.core/unchecked-add-int clojure.core/unchecked-byte clojure.core/unchecked-char clojure.core/unchecked-dec clojure.core/unchecked-dec-int clojure.core/unchecked-divide-int clojure.core/unchecked-double clojure.core/unchecked-float clojure.core/unchecked-inc clojure.core/unchecked-inc-int clojure.core/unchecked-int clojure.core/unchecked-long clojure.core/unchecked-multiply clojure.core/unchecked-multiply-int clojure.core/unchecked-negate clojure.core/unchecked-negate-int clojure.core/unchecked-remainder-int clojure.core/unchecked-short clojure.core/unchecked-subtract clojure.core/unchecked-subtract-int clojure.core/underive clojure.core/update-in clojure.core/update-proxy clojure.core/use clojure.core/val clojure.core/vals clojure.core/var-get clojure.core/var-set clojure.core/var? clojure.core/vary-meta clojure.core/vec clojure.core/vector clojure.core/vector-of clojure.core/vector? clojure.core/with-bindings* clojure.core/with-meta clojure.core/with-redefs-fn clojure.core/xml-seq clojure.core/zero? clojure.core/zipmap coll? commute comp comparator compare compare-and-set! compile complement concat conj conj! cons constantly construct-proxy contains? count counted? create-ns create-struct cycle dec dec' decimal? delay? deliver denominator deref derive descendants destructure disj disj! dissoc dissoc! distinct distinct? double double-array doubles drop drop-last drop-while empty empty? ensure enumeration-seq error-handler error-mode eval even? every-pred every? ex-data ex-info extend extenders extends? false? ffirst file-seq filter filterv find find-keyword find-ns find-protocol-impl find-protocol-method find-var first flatten float float-array float? floats flush fn? fnext fnil force format frequencies future-call future-cancel future-cancelled? future-done? future? gensym get get-in get-method get-proxy-class get-thread-bindings get-validator group-by hash hash-combine hash-map hash-set identical? identity ifn? in-ns inc inc' init-proxy instance? int int-array integer? interleave intern interpose into into-array ints isa? iterate iterator-seq juxt keep keep-indexed key keys keyword keyword? last line-seq list list* list? load load-file load-reader load-string loaded-libs long long-array longs macroexpand macroexpand-1 make-array make-hierarchy map map-indexed map? mapcat mapv max max-key memoize merge merge-with meta method-sig methods min min-key mod munge name namespace namespace-munge neg? newline next nfirst nil? nnext not not-any? not-empty not-every? not= ns-aliases ns-imports ns-interns ns-map ns-name ns-publics ns-refers ns-resolve ns-unalias ns-unmap nth nthnext nthrest num number? numerator object-array odd? parents partial partition partition-all partition-by pcalls peek persistent! pmap pop pop! pop-thread-bindings pos? pr pr-str prefer-method prefers print print-ctor print-simple print-str printf println println-str prn prn-str promise proxy-call-with-super proxy-mappings proxy-name push-thread-bindings quot rand rand-int rand-nth range ratio? rational? rationalize re-find re-groups re-matcher re-matches re-pattern re-seq read read-line read-string realized? reduce reduce-kv reduced reduced? reductions ref ref-history-count ref-max-history ref-min-history ref-set refer release-pending-sends rem remove remove-all-methods remove-method remove-ns remove-watch repeat repeatedly replace replicate require reset! reset-meta! resolve rest restart-agent resultset-seq reverse reversible? rseq rsubseq satisfies? second select-keys send send-off send-via seq seq? seque sequence sequential? set set-agent-send-executor! set-agent-send-off-executor! set-error-handler! set-error-mode! set-validator! set? short short-array shorts shuffle shutdown-agents slurp some some-fn sort sort-by sorted-map sorted-map-by sorted-set sorted-set-by sorted? special-symbol? spit split-at split-with str string? struct struct-map subs subseq subvec supers swap! symbol symbol? take take-last take-nth take-while test the-ns thread-bound? to-array to-array-2d trampoline transient tree-seq true? type unchecked-add unchecked-add-int unchecked-byte unchecked-char unchecked-dec unchecked-dec-int unchecked-divide-int unchecked-double unchecked-float unchecked-inc unchecked-inc-int unchecked-int unchecked-long unchecked-multiply unchecked-multiply-int unchecked-negate unchecked-negate-int unchecked-remainder-int unchecked-short unchecked-subtract unchecked-subtract-int underive update-in update-proxy use val vals var-get var-set var? vary-meta vec vector vector-of vector? with-bindings* with-meta with-redefs-fn xml-seq zero? zipmap
+syntax keyword clojureVariable *1 *2 *3 *agent* *allow-unresolved-vars* *assert* *clojure-version* *command-line-args* *compile-files* *compile-path* *compiler-options* *data-readers* *default-data-reader-fn* *e *err* *file* *flush-on-newline* *fn-loader* *in* *math-context* *ns* *out* *print-dup* *print-length* *print-level* *print-meta* *print-readably* *read-eval* *read-whitelist* *source-path* *unchecked-math* *use-context-classloader* *verbose-defrecords* *warn-on-reflection* EMPTY-NODE char-escape-string char-name-string clojure.core/*1 clojure.core/*2 clojure.core/*3 clojure.core/*agent* clojure.core/*allow-unresolved-vars* clojure.core/*assert* clojure.core/*clojure-version* clojure.core/*command-line-args* clojure.core/*compile-files* clojure.core/*compile-path* clojure.core/*compiler-options* clojure.core/*data-readers* clojure.core/*default-data-reader-fn* clojure.core/*e clojure.core/*err* clojure.core/*file* clojure.core/*flush-on-newline* clojure.core/*fn-loader* clojure.core/*in* clojure.core/*math-context* clojure.core/*ns* clojure.core/*out* clojure.core/*print-dup* clojure.core/*print-length* clojure.core/*print-level* clojure.core/*print-meta* clojure.core/*print-readably* clojure.core/*read-eval* clojure.core/*read-whitelist* clojure.core/*source-path* clojure.core/*unchecked-math* clojure.core/*use-context-classloader* clojure.core/*verbose-defrecords* clojure.core/*warn-on-reflection* clojure.core/EMPTY-NODE clojure.core/char-escape-string clojure.core/char-name-string clojure.core/default-data-readers clojure.core/primitives-classnames clojure.core/print-dup clojure.core/print-method clojure.core/unquote clojure.core/unquote-splicing default-data-readers primitives-classnames print-dup print-method unquote unquote-splicing
+
+" Keywords are symbols:
+"   static Pattern symbolPat = Pattern.compile("[:]?([\\D&&[^/]].*/)?([\\D&&[^/]][^/]*)");
+" But they:
+"   * Must not end in a : or /
+"   * Must not have two adjacent colons except at the beginning
+"   * Must not contain any reader metacharacters except for ' and #
+syntax match clojureKeyword "\v:{1,2}%([^ \n\r\t()\[\]{}";@^`~\\%/]+/)*[^ \n\r\t()\[\]{}";@^`~\\%/]+:@"'
+endfor
+unlet! s:radixChars s:radix
+
+syntax match clojureNumber "\<-\=[0-9]\+\(\.[0-9]*\)\=\(M\|\([eE][-+]\?[0-9]\+\)\)\?\>"
+syntax match clojureNumber "\<-\=[0-9]\+N\?\>"
+syntax match clojureNumber "\<-\=0x[0-9a-fA-F]\+\>"
+syntax match clojureNumber "\<-\=[0-9]\+/[0-9]\+\>"
+
+syntax match clojureVarArg "&"
+
+syntax match clojureQuote "'"
+syntax match clojureQuote "`"
+syntax match clojureUnquote "\~"
+syntax match clojureUnquote "\~@"
+syntax match clojureMeta "\^"
+syntax match clojureDeref "@"
+syntax match clojureAnonArg "%\(\d\|&\)\?"
+syntax match clojureDispatch "\v#[\^\'\=\<]?"
+
+syntax region clojureRegexp start=/L\=\#"/ skip=/\\\\\|\\"/ end=/"/
+
+syntax match clojureComment ";.*$" contains=clojureTodo,@Spell
+syntax match clojureComment "#!.*$"
+syntax match clojureComment "#_"
+
+syntax keyword clojureTodo contained FIXME XXX TODO FIXME: XXX: TODO:
+
+syntax region clojureSexp   matchgroup=clojureParen start="("  matchgroup=clojureParen end=")"  contains=TOP,@Spell
+syntax region clojureVector matchgroup=clojureParen start="\[" matchgroup=clojureParen end="\]" contains=TOP,@Spell
+syntax region clojureMap    matchgroup=clojureParen start="{"  matchgroup=clojureParen end="}"  contains=TOP,@Spell
+
+" Highlight superfluous closing parens, brackets and braces.
+syntax match clojureError "]\|}\|)"
+
+syntax sync fromstart
+
+if version >= 600
+    command -nargs=+ HiLink highlight default link 
+else
+    command -nargs=+ HiLink highlight link 
+endif
+
+HiLink clojureConstant  Constant
+HiLink clojureBoolean   Boolean
+HiLink clojureCharacter Character
+HiLink clojureKeyword   Keyword
+HiLink clojureNumber    Number
+HiLink clojureString    String
+HiLink clojureRegexp    Constant
+
+HiLink clojureVariable  Identifier
+HiLink clojureCond      Conditional
+HiLink clojureDefine    Define
+HiLink clojureException Exception
+HiLink clojureFunc      Function
+HiLink clojureMacro     Macro
+HiLink clojureRepeat    Repeat
+
+HiLink clojureSpecial   Special
+HiLink clojureVarArg    Special
+HiLink clojureQuote     SpecialChar
+HiLink clojureUnquote   SpecialChar
+HiLink clojureMeta      SpecialChar
+HiLink clojureDeref     SpecialChar
+HiLink clojureAnonArg   SpecialChar
+HiLink clojureDispatch  SpecialChar
+
+HiLink clojureComment   Comment
+HiLink clojureTodo      Todo
+
+HiLink clojureError     Error
+
+HiLink clojureParen     Delimiter
+
+delcommand HiLink
+
+let b:current_syntax = "clojure"
+
+" vim:sts=4 sw=4 et:
diff --git a/runtime/syntax/cpp.vim b/runtime/syntax/cpp.vim
index feb89ee614..ec95020e22 100644
--- a/runtime/syntax/cpp.vim
+++ b/runtime/syntax/cpp.vim
@@ -1,7 +1,8 @@
 " Vim syntax file
 " Language:	C++
-" Maintainer:	Ken Shan 
-" Last Change:	2002 Jul 15
+" Current Maintainer:	vim-jp (https://github.com/vim-jp/cpp-vim)
+" Previous Maintainer:	Ken Shan 
+" Last Change:	2012 Jun 14
 
 " For version 5.x: Clear all syntax items
 " For version 6.x: Quit when a syntax file was already loaded
@@ -19,7 +20,7 @@ else
   unlet b:current_syntax
 endif
 
-" C++ extentions
+" C++ extensions
 syn keyword cppStatement	new delete this friend using
 syn keyword cppAccess		public protected private
 syn keyword cppType		inline virtual explicit export bool wchar_t
@@ -30,9 +31,16 @@ syn match cppCast		"\<\(const\|static\|dynamic\|reinterpret\)_cast\s*<"me=e-1
 syn match cppCast		"\<\(const\|static\|dynamic\|reinterpret\)_cast\s*$"
 syn keyword cppStorageClass	mutable
 syn keyword cppStructure	class typename template namespace
-syn keyword cppNumber		NPOS
 syn keyword cppBoolean		true false
 
+" C++ 11 extensions
+if !exists("cpp_no_cpp11")
+  syn keyword cppType		override final
+  syn keyword cppExceptions	noexcept
+  syn keyword cppStorageClass	constexpr decltype
+  syn keyword cppConstant	nullptr
+endif
+
 " The minimum and maximum operators in GNU C++
 syn match cppMinMax "[<>]?"
 
@@ -52,8 +60,8 @@ if version >= 508 || !exists("did_cpp_syntax_inits")
   HiLink cppType		Type
   HiLink cppStorageClass	StorageClass
   HiLink cppStructure		Structure
-  HiLink cppNumber		Number
   HiLink cppBoolean		Boolean
+  HiLink cppConstant		Constant
   delcommand HiLink
 endif
 
diff --git a/runtime/syntax/csdl.vim b/runtime/syntax/csdl.vim
new file mode 100644
index 0000000000..f7d30f1646
--- /dev/null
+++ b/runtime/syntax/csdl.vim
@@ -0,0 +1,536 @@
+" Vim syntax file
+" Language: Curated Stream Definition Language (CSDL)
+" Maintainer: Jacek Artymiak
+" Latest Revision: 25 February 2013
+
+if exists("b:current_syntax")
+  finish
+endif
+
+setlocal iskeyword=.,@,48-57,_,192-255
+syn case ignore 
+
+syn match csdlKeyword "tag "
+syn match csdlKeyword "stream "
+syn match csdlKeyword "return "
+
+syn keyword csdlOperator contains
+syn match csdlOperator "cs contains"
+syn keyword csdlOperator substr
+syn match csdlOperator "cs substr"
+syn keyword csdlOperator contains_any
+syn match csdlOperator "cs contains_any"
+syn keyword csdlOperator any
+syn match csdlOperator "cs any"
+syn keyword csdlOperator contains_near
+syn match csdlOperator "cs contains_near"
+syn keyword csdlOperator exists
+syn keyword csdlOperator in
+syn keyword csdlOperator url_in
+syn match csdlOperator "=="
+syn match csdlOperator "!="
+syn match csdlOperator "cs =="
+syn match csdlOperator "cs !="
+syn match csdlOperator ">"
+syn match csdlOperator ">="
+syn match csdlOperator "<"
+syn match csdlOperator "<="
+syn keyword csdlOperator regex_partial
+syn keyword csdlOperator regex_exact
+syn keyword csdlOperator geo_box
+syn keyword csdlOperator geo_radius
+syn keyword csdlOperator geo_polygon
+
+syn keyword csdlLogicalOperator and
+syn keyword csdlLogicalOperator or
+syn keyword csdlLogicalOperator not
+
+syn match csdlTarget 'reddit\.title'
+syn match csdlTarget 'reddit\.content'
+syn match csdlTarget 'reddit\.contenttype'
+syn match csdlTarget 'reddit\.link'
+syn match csdlTarget 'reddit\.author\.name'
+syn match csdlTarget 'reddit\.author\.link'
+syn match csdlTarget 'reddit\.type'
+syn match csdlTarget 'reddit\.thread'
+syn match csdlTarget 'interaction\.type'
+syn match csdlTarget 'interaction\.title'
+syn match csdlTarget 'interaction\.content'
+syn match csdlTarget 'interaction\.source'
+syn match csdlTarget 'interaction\.geo'
+syn match csdlTarget 'interaction\.link'
+syn match csdlTarget 'interaction\.author\.username'
+syn match csdlTarget 'interaction\.author\.name'
+syn match csdlTarget 'interaction\.author\.id'
+syn match csdlTarget 'interaction\.author\.avatar'
+syn match csdlTarget 'interaction\.author\.link'
+syn match csdlTarget 'interaction\.sample'
+syn match csdlTarget 'links\.title'
+syn match csdlTarget 'links\.url'
+syn keyword csdlTarget links.normalized_url
+syn match csdlTarget 'links\.hops'
+syn match csdlTarget 'links\.code'
+syn match csdlTarget 'links\.domain'
+syn keyword csdlTarget links.retweet_count
+syn match csdlTarget 'links\.age'
+syn keyword csdlTarget links.meta.content_type
+syn match csdlTarget 'links\.meta\.charset'
+syn match csdlTarget 'links\.meta\.lang'
+syn match csdlTarget 'links\.meta\.keywords'
+syn match csdlTarget 'links\.meta\.description'
+syn match csdlTarget 'links\.meta\.newskeywords'
+syn match csdlTarget 'links\.meta\.standout'
+syn match csdlTarget 'links\.meta\.opengraph\.type'
+syn match csdlTarget 'links\.meta\.opengraph\.title'
+syn match csdlTarget 'links\.meta\.opengraph\.image'
+syn match csdlTarget 'links\.meta\.opengraph\.url'
+syn match csdlTarget 'links\.meta\.opengraph\.description'
+syn keyword csdlTarget links.meta.opengraph.site_name
+syn match csdlTarget 'links\.meta\.opengraph\.email'
+syn keyword csdlTarget links.meta.opengraph.phone_number
+syn keyword csdlTarget links.meta.opengraph.fax_number
+syn match csdlTarget 'links\.meta\.opengraph\.geo'
+syn keyword csdlTarget links.meta.opengraph.street_address
+syn match csdlTarget 'links\.meta\.opengraph\.locality'
+syn match csdlTarget 'links\.meta\.opengraph\.region'
+syn keyword csdlTarget links.meta.opengraph.postal_code
+syn match csdlTarget 'links\.meta\.opengraph\.activity'
+syn match csdlTarget 'links\.meta\.opengraph\.sport'
+syn match csdlTarget 'links\.meta\.opengraph\.bar'
+syn match csdlTarget 'links\.meta\.opengraph\.company'
+syn match csdlTarget 'links\.meta\.opengraph\.cafe'
+syn match csdlTarget 'links\.meta\.opengraph\.hotel'
+syn match csdlTarget 'links\.meta\.opengraph\.restaurant'
+syn match csdlTarget 'links\.meta\.opengraph\.cause'
+syn keyword csdlTarget links.meta.opengraph.sports_league
+syn keyword csdlTarget links.meta.opengraph.sports_team
+syn match csdlTarget 'links\.meta\.opengraph\.band'
+syn match csdlTarget 'links\.meta\.opengraph\.government'
+syn keyword csdlTarget links.meta.opengraph.non_profit
+syn match csdlTarget 'links\.meta\.opengraph\.school'
+syn match csdlTarget 'links\.meta\.opengraph\.university'
+syn match csdlTarget 'links\.meta\.opengraph\.actor'
+syn match csdlTarget 'links\.meta\.opengraph\.athlete'
+syn match csdlTarget 'links\.meta\.opengraph\.author'
+syn match csdlTarget 'links\.meta\.opengraph\.director'
+syn match csdlTarget 'links\.meta\.opengraph\.musician'
+syn match csdlTarget 'links\.meta\.opengraph\.politician'
+syn keyword csdlTarget links.meta.opengraph.public_figure
+syn match csdlTarget 'links\.meta\.opengraph\.city'
+syn match csdlTarget 'links\.meta\.opengraph\.country'
+syn match csdlTarget 'links\.meta\.opengraph\.landmark'
+syn keyword csdlTarget links.meta.opengraph.state_province
+syn match csdlTarget 'links\.meta\.opengraph\.album'
+syn match csdlTarget 'links\.meta\.opengraph\.book'
+syn match csdlTarget 'links\.meta\.opengraph\.drink'
+syn match csdlTarget 'links\.meta\.opengraph\.food'
+syn match csdlTarget 'links\.meta\.opengraph\.game'
+syn match csdlTarget 'links\.meta\.opengraph\.movie'
+syn match csdlTarget 'links\.meta\.opengraph\.product'
+syn match csdlTarget 'links\.meta\.opengraph\.song'
+syn keyword csdlTarget links.meta.opengraph.tv_show
+syn match csdlTarget 'links\.meta\.opengraph\.blog'
+syn match csdlTarget 'links\.meta\.opengraph\.website'
+syn match csdlTarget 'links\.meta\.opengraph\.article'
+syn match csdlTarget 'links\.meta\.twitter\.card'
+syn match csdlTarget 'links\.meta\.twitter\.site'
+syn keyword csdlTarget links.meta.twitter.site_id
+syn match csdlTarget 'links\.meta\.twitter\.creator'
+syn keyword csdlTarget links.meta.twitter.creator_id
+syn match csdlTarget 'links\.meta\.twitter\.url'
+syn match csdlTarget 'links\.meta\.twitter\.description'
+syn match csdlTarget 'links\.meta\.twitter\.title'
+syn match csdlTarget 'links\.meta\.twitter\.image'
+syn keyword csdlTarget links.meta.twitter.image_width
+syn keyword csdlTarget links.meta.twitter.image_height
+syn match csdlTarget 'links\.meta\.twitter\.player'
+syn keyword csdlTarget links.meta.twitter.player_width
+syn keyword csdlTarget links.meta.twitter.player_height
+syn keyword csdlTarget links.meta.twitter.player_stream
+syn keyword csdlTarget links.meta.twitter.player_stream_content_type
+syn match csdlTarget 'myspace\.link'
+syn match csdlTarget 'myspace\.content'
+syn match csdlTarget 'myspace\.contenttype'
+syn match csdlTarget 'myspace\.category'
+syn match csdlTarget 'myspace\.author\.username'
+syn match csdlTarget 'myspace\.author\.name'
+syn match csdlTarget 'myspace\.author\.id'
+syn match csdlTarget 'myspace\.author\.link'
+syn match csdlTarget 'myspace\.author\.avatar'
+syn match csdlTarget 'myspace\.geo'
+syn match csdlTarget 'myspace\.verb'
+syn match csdlTarget 'newscred\.type'
+syn match csdlTarget 'newscred\.article\.domain'
+syn match csdlTarget 'newscred\.video\.domain'
+syn match csdlTarget 'newscred\.article\.topics'
+syn match csdlTarget 'newscred\.video\.topics'
+syn match csdlTarget 'newscred\.article\.category'
+syn match csdlTarget 'newscred\.video\.category'
+syn match csdlTarget 'newscred\.article\.title'
+syn match csdlTarget 'newscred\.video\.title'
+syn match csdlTarget 'newscred\.article\.content'
+syn match csdlTarget 'newscred\.article\.fulltext'
+syn match csdlTarget 'newscred\.article\.authors'
+syn match csdlTarget 'newscred\.image\.caption'
+syn match csdlTarget 'newscred\.video\.caption'
+syn match csdlTarget 'newscred\.image\.attribution\.text'
+syn match csdlTarget 'newscred\.image\.attribution\.link'
+syn match csdlTarget 'newscred\.source\.name'
+syn match csdlTarget 'newscred\.source\.link'
+syn match csdlTarget 'newscred\.source\.domain'
+syn keyword csdlTarget newscred.source.media_type
+syn keyword csdlTarget newscred.source.company_type
+syn match csdlTarget 'newscred\.source\.country'
+syn match csdlTarget 'newscred\.source\.circulation'
+syn match csdlTarget 'newscred\.source\.founded'
+syn match csdlTarget 'imdb\.title'
+syn match csdlTarget 'imdb\.content'
+syn match csdlTarget 'imdb\.contenttype'
+syn match csdlTarget 'imdb\.link'
+syn match csdlTarget 'imdb\.author\.name'
+syn match csdlTarget 'imdb\.author\.link'
+syn match csdlTarget 'imdb\.type'
+syn match csdlTarget 'imdb\.thread'
+syn match csdlTarget 'amazon\.title'
+syn match csdlTarget 'amazon\.content'
+syn match csdlTarget 'amazon\.contenttype'
+syn match csdlTarget 'amazon\.link'
+syn match csdlTarget 'amazon\.author\.name'
+syn match csdlTarget 'amazon\.author\.link'
+syn match csdlTarget 'amazon\.type'
+syn match csdlTarget 'amazon\.thread'
+syn match csdlTarget 'salience\.content\.sentiment'
+syn match csdlTarget 'salience\.content\.topics'
+syn match csdlTarget 'salience\.title\.sentiment'
+syn match csdlTarget 'salience\.title\.topics'
+syn match csdlTarget 'salience\.content\.entities\.name'
+syn match csdlTarget 'salience\.content\.entities\.type'
+syn match csdlTarget 'salience\.title\.entities\.name'
+syn match csdlTarget 'salience\.title\.entities\.type'
+syn match csdlTarget 'klout\.score'
+syn match csdlTarget 'klout\.network'
+syn match csdlTarget 'klout\.amplification'
+syn keyword csdlTarget klout.true_reach
+syn match csdlTarget 'klout\.topics'
+syn match csdlTarget 'wikipedia\.author\.talk'
+syn match csdlTarget 'wikipedia\.author\.contributions'
+syn match csdlTarget 'wikipedia\.author\.username'
+syn match csdlTarget 'wikipedia\.body'
+syn match csdlTarget 'wikipedia\.title'
+syn match csdlTarget 'wikipedia\.images'
+syn match csdlTarget 'wikipedia\.categories'
+syn match csdlTarget 'wikipedia\.externallinks'
+syn match csdlTarget 'wikipedia\.ns'
+syn match csdlTarget 'wikipedia\.namespace'
+syn match csdlTarget 'wikipedia\.pageid'
+syn match csdlTarget 'wikipedia\.parentid'
+syn match csdlTarget 'wikipedia\.oldlen'
+syn match csdlTarget 'wikipedia\.newlen'
+syn match csdlTarget 'wikipedia\.changetype'
+syn match csdlTarget 'wikipedia\.diff\.from'
+syn match csdlTarget 'wikipedia\.diff\.to'
+syn match csdlTarget 'wikipedia\.diff\.changes\.added'
+syn match csdlTarget 'wikipedia\.diff\.changes\.removed'
+syn keyword csdlTarget demographic.twitter_activity
+syn match csdlTarget 'demographic\.location\.country'
+syn keyword csdlTarget demographic.location.us_state
+syn match csdlTarget 'demographic\.location\.city'
+syn match csdlTarget 'demographic\.type'
+syn match csdlTarget 'demographic\.sex'
+syn match csdlTarget 'demographic\.status\.relationship'
+syn match csdlTarget 'demographic\.status\.work'
+syn keyword csdlTarget demographic.likes_and_interests
+syn keyword csdlTarget demographic.first_language
+syn match csdlTarget 'demographic\.professions'
+syn match csdlTarget 'demographic\.services'
+syn keyword csdlTarget demographic.large_accounts_followed
+syn keyword csdlTarget demographic.age_range.start
+syn keyword csdlTarget demographic.age_range.end
+syn match csdlTarget 'demographic\.income\.start'
+syn match csdlTarget 'demographic\.income\.end'
+syn keyword csdlTarget demographic.main_street.dressed_by
+syn keyword csdlTarget demographic.main_street.shop_at
+syn keyword csdlTarget demographic.main_street.eat_and_drink_at
+syn match csdlTarget 'demographic\.accounts\.categories'
+syn match csdlTarget 'tumblr\.activity'
+syn match csdlTarget 'tumblr\.source\.blogid'
+syn match csdlTarget 'tumblr\.dest\.blogid'
+syn match csdlTarget 'tumblr\.dest\.postid'
+syn match csdlTarget 'tumblr\.root\.blogid'
+syn match csdlTarget 'tumblr\.root\.postid'
+syn match csdlTarget 'tumblr\.blogid'
+syn keyword csdlTarget tumblr.blog_name
+syn match csdlTarget 'tumblr\.type'
+syn match csdlTarget 'tumblr\.title'
+syn match csdlTarget 'tumblr\.body'
+syn match csdlTarget 'tumblr\.text'
+syn match csdlTarget 'tumblr\.tags'
+syn keyword csdlTarget tumblr.track_name
+syn match csdlTarget 'tumblr\.album'
+syn match csdlTarget 'tumblr\.link'
+syn match csdlTarget 'tumblr\.meta\.url'
+syn match csdlTarget 'tumblr\.meta\.type'
+syn match csdlTarget 'tumblr\.meta\.description'
+syn keyword csdlTarget tumblr.meta.likes_local
+syn keyword csdlTarget tumblr.meta.likes_global
+syn keyword csdlTarget tumblr.meta.reblogged_global
+syn match csdlTarget 'demographic\.gender'
+syn match csdlTarget 'flickr\.title'
+syn match csdlTarget 'flickr\.content'
+syn match csdlTarget 'flickr\.contenttype'
+syn match csdlTarget 'flickr\.link'
+syn match csdlTarget 'flickr\.author\.name'
+syn match csdlTarget 'flickr\.author\.link'
+syn match csdlTarget 'flickr\.author\.username'
+syn match csdlTarget 'flickr\.type'
+syn match csdlTarget 'flickr\.thread'
+syn match csdlTarget 'twitter\.text'
+syn match csdlTarget 'twitter\.source'
+syn match csdlTarget 'twitter\.mentions'
+syn keyword csdlTarget twitter.mention_ids
+syn match csdlTarget 'twitter\.links'
+syn match csdlTarget 'twitter\.domains'
+syn keyword csdlTarget twitter.in_reply_to_screen_name
+syn keyword csdlTarget twitter.in_reply_to_user_id
+syn keyword csdlTarget twitter.in_reply_to_status_id
+syn keyword csdlTarget twitter.filter_level
+syn match csdlTarget 'twitter\.lang'
+syn match csdlTarget 'twitter\.geo'
+syn match csdlTarget 'twitter\.user\.description'
+syn match csdlTarget 'twitter\.user\.location'
+syn keyword csdlTarget twitter.user.statuses_count
+syn keyword csdlTarget twitter.user.followers_count
+syn keyword csdlTarget twitter.user.follower_ratio
+syn keyword csdlTarget twitter.user.profile_age
+syn keyword csdlTarget twitter.user.friends_count
+syn keyword csdlTarget twitter.user.screen_name
+syn match csdlTarget 'twitter\.user\.lang'
+syn keyword csdlTarget twitter.user.time_zone
+syn match csdlTarget 'twitter\.user\.name'
+syn match csdlTarget 'twitter\.user\.id'
+syn keyword csdlTarget twitter.user.listed_count
+syn match csdlTarget 'twitter\.user\.url'
+syn match csdlTarget 'twitter\.user\.verified'
+syn keyword csdlTarget twitter.place.place_type
+syn match csdlTarget 'twitter\.place\.country'
+syn keyword csdlTarget twitter.place.country_code
+syn keyword csdlTarget twitter.place.full_name
+syn match csdlTarget 'twitter\.place\.name'
+syn match csdlTarget 'twitter\.place\.url'
+syn match csdlTarget 'twitter\.place\.attributes\.locality'
+syn match csdlTarget 'twitter\.place\.attributes\.region'
+syn keyword csdlTarget twitter.place.attributes.street_address
+syn match csdlTarget 'twitter\.status'
+syn match csdlTarget 'twitter\.retweet\.text'
+syn match csdlTarget 'twitter\.retweet\.elapsed'
+syn match csdlTarget 'twitter\.retweet\.source'
+syn keyword csdlTarget twitter.retweet.filter_level
+syn match csdlTarget 'twitter\.retweet\.lang'
+syn match csdlTarget 'twitter\.retweet\.user\.description'
+syn match csdlTarget 'twitter\.retweet\.user\.location'
+syn keyword csdlTarget twitter.retweet.user.statuses_count
+syn keyword csdlTarget twitter.retweet.user.followers_count
+syn keyword csdlTarget twitter.retweet.user.follower_ratio
+syn keyword csdlTarget twitter.retweet.user.profile_age
+syn keyword csdlTarget twitter.retweet.user.friends_count
+syn keyword csdlTarget twitter.retweet.user.screen_name
+syn match csdlTarget 'twitter\.retweet\.user\.lang'
+syn keyword csdlTarget twitter.retweet.user.time_zone
+syn match csdlTarget 'twitter\.retweet\.user\.name'
+syn match csdlTarget 'twitter\.retweet\.user\.id'
+syn keyword csdlTarget twitter.retweet.user.listed_count
+syn match csdlTarget 'twitter\.retweet\.user\.url'
+syn match csdlTarget 'twitter\.retweet\.user\.verified'
+syn match csdlTarget 'twitter\.retweeted\.id'
+syn match csdlTarget 'twitter\.retweeted\.source'
+syn keyword csdlTarget twitter.retweeted.in_reply_to_screen_name
+syn keyword csdlTarget twitter.retweeted.in_reply_to_user_id_str
+syn keyword csdlTarget twitter.retweeted.in_reply_to_status_id
+syn match csdlTarget 'twitter\.retweet\.count'
+syn match csdlTarget 'twitter\.retweet\.mentions'
+syn keyword csdlTarget twitter.retweet.mention_ids
+syn match csdlTarget 'twitter\.retweet\.links'
+syn match csdlTarget 'twitter\.retweet\.domains'
+syn match csdlTarget 'twitter\.retweeted\.user\.description'
+syn match csdlTarget 'twitter\.retweeted\.user\.location'
+syn keyword csdlTarget twitter.retweeted.user.statuses_count
+syn keyword csdlTarget twitter.retweeted.user.followers_count
+syn keyword csdlTarget twitter.retweeted.user.follower_ratio
+syn keyword csdlTarget twitter.retweeted.user.profile_age
+syn keyword csdlTarget twitter.retweeted.user.friends_count
+syn keyword csdlTarget twitter.retweeted.user.screen_name
+syn match csdlTarget 'twitter\.retweeted\.user\.lang'
+syn keyword csdlTarget twitter.retweeted.user.time_zone
+syn match csdlTarget 'twitter\.retweeted\.user\.name'
+syn match csdlTarget 'twitter\.retweeted\.user\.id'
+syn keyword csdlTarget twitter.retweeted.user.listed_count
+syn match csdlTarget 'twitter\.retweeted\.user\.url'
+syn match csdlTarget 'twitter\.retweeted\.user\.verified'
+syn match csdlTarget 'twitter\.retweeted\.geo'
+syn keyword csdlTarget twitter.retweeted.place.place_type
+syn match csdlTarget 'twitter\.retweeted\.place\.country'
+syn keyword csdlTarget twitter.retweeted.place.country_code
+syn keyword csdlTarget twitter.retweeted.place.full_name
+syn match csdlTarget 'twitter\.retweeted\.place\.name'
+syn match csdlTarget 'twitter\.retweeted\.place\.url'
+syn match csdlTarget 'twitter\.retweeted\.place\.attributes'
+syn match csdlTarget 'twitter\.hashtags'
+syn match csdlTarget 'twitter\.retweet\.hashtags'
+syn match csdlTarget 'twitter\.media\.type'
+syn keyword csdlTarget twitter.media.media_url
+syn keyword csdlTarget twitter.media.display_url
+syn match csdlTarget 'twitter\.retweet\.media\.type'
+syn keyword csdlTarget twitter.retweet.media.media_url
+syn keyword csdlTarget twitter.retweet.media.display_url
+syn match csdlTarget 'blog\.title'
+syn match csdlTarget 'blog\.content'
+syn match csdlTarget 'blog\.contenttype'
+syn match csdlTarget 'blog\.link'
+syn match csdlTarget 'blog\.domain'
+syn match csdlTarget 'blog\.author\.name'
+syn match csdlTarget 'blog\.author\.link'
+syn match csdlTarget 'blog\.author\.avatar'
+syn match csdlTarget 'blog\.author\.username'
+syn match csdlTarget 'blog\.type'
+syn match csdlTarget 'blog\.post\.link'
+syn match csdlTarget 'blog\.post\.title'
+syn match csdlTarget 'facebook\.author\.name'
+syn match csdlTarget 'facebook\.author\.link'
+syn match csdlTarget 'facebook\.author\.id'
+syn match csdlTarget 'facebook\.author\.avatar'
+syn match csdlTarget 'facebook\.message'
+syn match csdlTarget 'facebook\.description'
+syn match csdlTarget 'facebook\.caption'
+syn match csdlTarget 'facebook\.type'
+syn match csdlTarget 'facebook\.application'
+syn match csdlTarget 'facebook\.source'
+syn match csdlTarget 'facebook\.link'
+syn match csdlTarget 'facebook\.name'
+syn match csdlTarget 'facebook\.to\.names'
+syn match csdlTarget 'facebook\.to\.ids'
+syn match csdlTarget 'facebook\.og\.title'
+syn match csdlTarget 'facebook\.og\.location'
+syn match csdlTarget 'facebook\.og\.photos'
+syn match csdlTarget 'facebook\.og\.by'
+syn match csdlTarget 'facebook\.og\.description'
+syn match csdlTarget 'facebook\.og\.type'
+syn match csdlTarget 'facebook\.og\.length'
+syn match csdlTarget 'facebook\.likes\.count'
+syn match csdlTarget 'facebook\.likes\.names'
+syn match csdlTarget 'facebook\.likes\.ids'
+syn match csdlTarget 'topix\.title'
+syn match csdlTarget 'topix\.content'
+syn match csdlTarget 'topix\.contenttype'
+syn match csdlTarget 'topix\.link'
+syn match csdlTarget 'topix\.author\.name'
+syn match csdlTarget 'topix\.type'
+syn match csdlTarget 'topix\.thread'
+syn match csdlTarget 'topix\.author\.location'
+syn match csdlTarget 'bitly\.user\.agent'
+syn keyword csdlTarget bitly.url_hash
+syn match csdlTarget 'bitly\.share\.hash'
+syn match csdlTarget 'bitly\.cname'
+syn keyword csdlTarget bitly.referring_url
+syn keyword csdlTarget bitly.referring_domain
+syn match csdlTarget 'bitly\.url'
+syn match csdlTarget 'bitly\.domain'
+syn keyword csdlTarget bitly.country_code
+syn keyword csdlTarget bitly.geo_region_code
+syn match csdlTarget 'bitly\.country'
+syn keyword csdlTarget bitly.geo_region
+syn keyword csdlTarget bitly.geo_city
+syn match csdlTarget 'bitly\.geo'
+syn match csdlTarget 'bitly\.timezone'
+syn match csdlTarget 'trends\.type'
+syn match csdlTarget 'trends\.content'
+syn match csdlTarget 'trends\.source'
+syn match csdlTarget 'board\.title'
+syn match csdlTarget 'board\.content'
+syn match csdlTarget 'board\.contenttype'
+syn match csdlTarget 'board\.link'
+syn match csdlTarget 'board\.domain'
+syn match csdlTarget 'board\.author\.name'
+syn match csdlTarget 'board\.author\.link'
+syn match csdlTarget 'board\.author\.avatar'
+syn match csdlTarget 'board\.author\.username'
+syn match csdlTarget 'board\.type'
+syn match csdlTarget 'board\.thread'
+syn match csdlTarget 'board\.author\.location'
+syn match csdlTarget 'board\.author\.signature'
+syn match csdlTarget 'board\.author\.registered'
+syn match csdlTarget 'board\.author\.age'
+syn match csdlTarget 'board\.author\.gender'
+syn match csdlTarget 'video\.title'
+syn match csdlTarget 'video\.content'
+syn match csdlTarget 'video\.contenttype'
+syn match csdlTarget 'video\.domain'
+syn match csdlTarget 'video\.author\.name'
+syn match csdlTarget 'video\.author\.link'
+syn match csdlTarget 'video\.author\.avatar'
+syn match csdlTarget 'video\.author\.username'
+syn match csdlTarget 'video\.type'
+syn match csdlTarget 'video\.videolink'
+syn match csdlTarget 'video\.commentslink'
+syn match csdlTarget 'video\.duration'
+syn match csdlTarget 'video\.thumbnail'
+syn match csdlTarget 'video\.category'
+syn match csdlTarget 'video\.tags'
+syn match csdlTarget '2ch\.title'
+syn match csdlTarget '2ch\.content'
+syn match csdlTarget '2ch\.contenttype'
+syn match csdlTarget '2ch\.link'
+syn match csdlTarget '2ch\.author\.name'
+syn match csdlTarget '2ch\.type'
+syn match csdlTarget '2ch\.thread'
+syn match csdlTarget 'dailymotion\.title'
+syn match csdlTarget 'dailymotion\.content'
+syn match csdlTarget 'dailymotion\.contenttype'
+syn match csdlTarget 'dailymotion\.author\.link'
+syn match csdlTarget 'dailymotion\.author\.username'
+syn match csdlTarget 'dailymotion\.videolink'
+syn match csdlTarget 'dailymotion\.duration'
+syn match csdlTarget 'dailymotion\.thumbnail'
+syn match csdlTarget 'dailymotion\.category'
+syn match csdlTarget 'dailymotion\.tags'
+syn match csdlTarget 'language\.tag'
+syn match csdlTarget 'language\.confidence'
+syn match csdlTarget 'digg\.type'
+syn match csdlTarget 'digg\.user\.name'
+syn match csdlTarget 'digg\.user\.fullname'
+syn match csdlTarget 'digg\.user\.registered'
+syn match csdlTarget 'digg\.user\.profileviews'
+syn match csdlTarget 'digg\.user\.icon'
+syn match csdlTarget 'digg\.user\.links'
+syn match csdlTarget 'digg\.item\.status'
+syn match csdlTarget 'digg\.item\.description'
+syn match csdlTarget 'digg\.item\.title'
+syn match csdlTarget 'digg\.item\.diggs'
+syn match csdlTarget 'digg\.item\.comments'
+syn match csdlTarget 'digg\.item\.topic'
+syn match csdlTarget 'digg\.comment\.buries'
+syn match csdlTarget 'digg\.comment\.diggs'
+syn match csdlTarget 'digg\.comment\.text'
+syn match csdlTarget 'youtube\.title'
+syn match csdlTarget 'youtube\.content'
+syn match csdlTarget 'youtube\.contenttype'
+syn match csdlTarget 'youtube\.author\.name'
+syn match csdlTarget 'youtube\.author\.link'
+syn match csdlTarget 'youtube\.type'
+syn match csdlTarget 'youtube\.videolink'
+syn match csdlTarget 'youtube\.commentslink'
+syn match csdlTarget 'youtube\.duration'
+syn match csdlTarget 'youtube\.thumbnail'
+syn match csdlTarget 'youtube\.category'
+syn match csdlTarget 'youtube\.tags'
+
+syn match csdlComment "^\/\/.*$"
+syn match csdlComment "^\/\*.*$"
+syn match csdlComment "^.*\*\/$"
+
+highlight link csdlKeyword Statement
+highlight link csdlOperator Operator
+highlight link csdlLogicalOperator Operator
+highlight link csdlTarget Constant
+highlight link csdlComment Comment
+"
+let b:current_syntax = "csdl"
diff --git a/runtime/syntax/css.vim b/runtime/syntax/css.vim
index c2c83570ab..8b36b72322 100644
--- a/runtime/syntax/css.vim
+++ b/runtime/syntax/css.vim
@@ -1,10 +1,12 @@
 " Vim syntax file
-" Language:	Cascading Style Sheets
-" Maintainer:	Claudio Fleiner 
-" URL:		http://www.fleiner.com/vim/syntax/css.vim
-" Last Change:	2011 Dec 14
-" CSS2 by Nikolai Weibull
-" Full CSS2, HTML4 support by Yeti
+" Language:     Cascading Style Sheets
+" Previous Contributor List:
+"               Claudio Fleiner  (Maintainer)
+"               Yeti            (Add full CSS2, HTML4 support)
+"               Nikolai Weibull (Add CSS2 support)
+" Maintainer:   Jules Wang      
+" URL:          https://github.com/JulesWang/css.vim
+" Last Change:  2013 Jul 23
 
 " For version 5.x: Clear all syntax items
 " For version 6.x: Quit when a syntax file was already loaded
@@ -12,13 +14,19 @@ if !exists("main_syntax")
   if version < 600
     syntax clear
   elseif exists("b:current_syntax")
-  finish
-endif
+    finish
+  endif
   let main_syntax = 'css'
+elseif exists("b:current_syntax") && b:current_syntax == "css"
+  finish
 endif
 
+let s:cpo_save = &cpo
+set cpo&vim
+
 syn case ignore
 
+" All HTML4 tags
 syn keyword cssTagName abbr acronym address applet area a b base
 syn keyword cssTagName basefont bdo big blockquote body br button
 syn keyword cssTagName caption center cite code col colgroup dd del
@@ -27,32 +35,51 @@ syn keyword cssTagName frameset h1 h2 h3 h4 h5 h6 head hr html img i
 syn keyword cssTagName iframe img input ins isindex kbd label legend li
 syn keyword cssTagName link map menu meta noframes noscript ol optgroup
 syn keyword cssTagName option p param pre q s samp script select small
-syn keyword cssTagName span strike strong style sub sup tbody td
+syn keyword cssTagName span strike strong style sub sup table tbody td
 syn keyword cssTagName textarea tfoot th thead title tr tt ul u var
-syn match cssTagName "\"
-syn match cssTagName "\*"
+syn keyword cssTagName object
 
-syn match cssTagName "@page\>" nextgroup=cssDefinition
+" HTML5 new tags 5*6=30
+syn keyword cssTagName article aside audio bdi canvas command
+syn keyword cssTagName datalist details embed figcaption figure footer
+syn keyword cssTagName header hgroup keygen mark meter nav
+syn keyword cssTagName output progress rt rp ruby section
+syn keyword cssTagName source summary time track video wbr
 
-syn match cssSelectorOp "[+>.]"
-syn match cssSelectorOp2 "[~|]\?=" contained
+" Tags not supported in HTML5
+syn keyword cssDeprecated acronym applet basefont big center dir
+syn keyword cssDeprecated font frame frameset noframes strike tt
+
+"syn match cssTagName "\"
+syn match cssTagName "\*"
+
+" selectors
+syn match cssSelectorOp "[,>+]"
+syn match cssSelectorOp2 "[~|^$*]\?=" contained
+" FIXME: add HTML5 attribute
 syn region cssAttributeSelector matchgroup=cssSelectorOp start="\[" end="]" transparent contains=cssUnicodeEscape,cssSelectorOp2,cssStringQ,cssStringQQ
 
+" .class and #id
+syn match cssClassName "\.[A-Za-z][A-Za-z0-9_-]\+"
+
 try
 syn match cssIdentifier "#[A-Za-zÀ-ÿ_@][A-Za-zÀ-ÿ0-9_@-]*"
 catch /^.*/
 syn match cssIdentifier "#[A-Za-z_@][A-Za-z0-9_@-]*"
 endtry
 
+syn match cssTagName "@page\>" nextgroup=cssDefinition
+" FIXME: use cssVendor here
+syn match cssTagName "@\(-\(webkit\|moz\|o\|ms\)-\)\=keyframes\>" nextgroup=cssDefinition
 
 syn match cssMedia "@media\>" nextgroup=cssMediaType skipwhite skipnl
 syn keyword cssMediaType contained screen print aural braile embosed handheld projection ty tv all nextgroup=cssMediaComma,cssMediaBlock skipwhite skipnl
-syn match cssMediaComma "," nextgroup=cssMediaType skipwhite skipnl
+"syn match cssMediaComma "," nextgroup=cssMediaType skipwhite skipnl
 syn region cssMediaBlock transparent matchgroup=cssBraces start='{' end='}' contains=cssTagName,cssError,cssComment,cssDefinition,cssURL,cssUnicodeEscape,cssIdentifier
 
 syn match cssValueInteger contained "[-+]\=\d\+"
 syn match cssValueNumber contained "[-+]\=\d\+\(\.\d*\)\="
-syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=\(%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\)"
+syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=\(%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\|rem\)"
 syn match cssValueAngle contained "[-+]\=\d\+\(\.\d*\)\=\(deg\|grad\|rad\)"
 syn match cssValueTime contained "+\=\d\+\(\.\d*\)\=\(ms\|s\)"
 syn match cssValueFrequency contained "+\=\d\+\(\.\d*\)\=\(Hz\|kHz\)"
@@ -66,27 +93,115 @@ syn region cssFontDescriptorFunction contained matchgroup=cssFunctionName start=
 syn match cssUnicodeRange contained "U+[0-9A-Fa-f?]\+"
 syn match cssUnicodeRange contained "U+\x\+-\x\+"
 
+" The 16 basic color names
 syn keyword cssColor contained aqua black blue fuchsia gray green lime maroon navy olive purple red silver teal yellow
+
+" 130 more color names
+syn keyword cssColor contained aliceblue antiquewhite aquamarine azure
+syn keyword cssColor contained beige bisque blanchedalmond blueviolet brown burlywood
+syn keyword cssColor contained cadetblue chartreuse chocolate coral cornflowerblue cornsilk crimson cyan
+syn match cssColor contained /dark\(blue\|cyan\|goldenrod\|gray\|green\|grey\|khaki\)/
+syn match cssColor contained /dark\(magenta\|olivegreen\|orange\|orchid\|red\|salmon\|seagreen\)/
+syn match cssColor contained /darkslate\(blue\|gray\|grey\)/
+syn match cssColor contained /dark\(turquoise\|violet\)/
+syn keyword cssColor contained deeppink deepskyblue dimgray dimgrey dodgerblue firebrick
+syn keyword cssColor contained floralwhite forestgreen gainsboro ghostwhite gold
+syn keyword cssColor contained goldenrod greenyellow grey honeydew hotpink
+syn keyword cssColor contained indianred indigo ivory khaki lavender lavenderblush lawngreen
+syn keyword cssColor contained lemonchiffon limegreen linen magenta
+syn match cssColor contained /light\(blue\|coral\|cyan\|goldenrodyellow\|gray\|green\)/
+syn match cssColor contained /light\(grey\|pink\|salmon\|seagreen\|skyblue\|yellow\)/
+syn match cssColor contained /light\(slategray\|slategrey\|steelblue\)/
+syn match cssColor contained /medium\(aquamarine\|blue\|orchid\|purple\|seagreen\)/
+syn match cssColor contained /medium\(slateblue\|springgreen\|turquoise\|violetred\)/
+syn keyword cssColor contained midnightblue mintcream mistyrose moccasin navajowhite
+syn keyword cssColor contained oldlace olivedrab orange orangered orchid
+syn match cssColor contained /pale\(goldenrod\|green\|turquoise\|violetred\)/
+syn keyword cssColor contained papayawhip peachpuff peru pink plum powderblue
+syn keyword cssColor contained rosybrown royalblue saddlebrown salmon sandybrown
+syn keyword cssColor contained seagreen seashell sienna skyblue slateblue
+syn keyword cssColor contained slategray slategrey snow springgreen steelblue tan
+syn keyword cssColor contained thistle tomato turquoise violet wheat
+syn keyword cssColor contained whitesmoke yellowgreen
+
 " FIXME: These are actually case-insentivie too, but (a) specs recommend using
 " mixed-case (b) it's hard to highlight the word `Background' correctly in
 " all situations
 syn case match
 syn keyword cssColor contained ActiveBorder ActiveCaption AppWorkspace ButtonFace ButtonHighlight ButtonShadow ButtonText CaptionText GrayText Highlight HighlightText InactiveBorder InactiveCaption InactiveCaptionText InfoBackground InfoText Menu MenuText Scrollbar ThreeDDarkShadow ThreeDFace ThreeDHighlight ThreeDLightShadow ThreeDShadow Window WindowFrame WindowText Background
 syn case ignore
+
+syn match cssImportant contained "!\s*important\>"
+
 syn match cssColor contained "\"
 syn match cssColor contained "\"
 syn match cssColor contained "#[0-9A-Fa-f]\{3\}\>"
 syn match cssColor contained "#[0-9A-Fa-f]\{6\}\>"
-"syn match cssColor contained "\"
-
-syn keyword cssCommonAttr contained auto none inherit
+syn region cssURL contained matchgroup=cssFunctionName start="\"
+
+
+syn keyword cssAnimationAttr contained infinite alternate paused running
+" bugfix: escape linear-gradient
+syn match cssAnimationAttr contained "\"
+syn match cssAnimationAttr contained "\"
+
+syn match cssBackgroundProp contained "\"
+syn keyword cssBackgroundAttr contained center fixed over contain
+syn match cssBackgroundAttr contained "\"
+syn match cssBackgroundAttr contained "\"
+syn match cssBackgroundAttr contained "\<\(border\|content\|padding\)-box\>"
+
+
+syn match cssBorderOutlineProp contained "\"
+syn match cssBorderOutlineProp contained "\"
+syn match cssBorderOutlineProp contained "\"
+syn match cssBorderOutlineProp contained "\"
+syn match cssBorderOutlineProp contained "\"
+syn keyword cssBorderOutlineAttr contained thin thick medium
+syn keyword cssBorderOutlineAttr contained dotted dashed solid double groove ridge inset outset
+syn keyword cssBorderOutlineAttr contained hidden visible scroll collapse
+syn keyword cssBorderOutlineAttr contained stretch round
+
+
+syn match cssBoxProp contained "\"
+syn match cssBoxProp contained "\"
+syn keyword cssBoxAttr contained visible hidden scroll auto
+syn match cssBoxAttr contained "\"
+
+syn keyword cssColorProp contained opacity
+syn match cssColorProp contained "\"
+syn match cssColorProp contained "\"
+
+
+syn match cssDimensionProp contained "\<\(min\|max\)-\(width\|height\)\>"
+syn keyword cssDimensionProp contained height
+syn keyword cssDimensionProp contained width
+
+" shadow and sizing are in other property groups
+syn match cssFlexibleBoxProp contained "\"
+syn keyword cssFlexibleBoxAttr contained start end center baseline stretch
+syn keyword cssFlexibleBoxAttr contained normal reverse
+syn keyword cssFlexibleBoxAttr contained single mulitple
+syn keyword cssFlexibleBoxAttr contained horizontal
+" bugfix: escape vertial-align
+syn match cssFlexibleBoxAttr contained "\"
+syn match cssFlexibleBoxAttr contained "\<\(inline\|block\)-axis\>"
+
+
 syn match cssFontProp contained "\"
 syn match cssFontAttr contained "\<\(sans-\)\=\"
 syn match cssFontAttr contained "\"
@@ -95,67 +210,92 @@ syn match cssFontAttr contained "\"
 syn match cssFontAttr contained "\"
 syn match cssFontAttr contained "\<\(\(ultra\|extra\|semi\|status-bar\)-\)\=\(condensed\|expanded\)\>"
 syn keyword cssFontAttr contained cursive fantasy monospace italic oblique
-syn keyword cssFontAttr contained bold bolder lighter larger smaller
-syn keyword cssFontAttr contained icon menu
-syn match cssFontAttr contained "\"
-syn keyword cssFontAttr contained large smaller larger
-syn keyword cssFontAttr contained narrower wider
-
-syn keyword cssColorProp contained color
-syn match cssColorProp contained "\"
-syn keyword cssColorAttr contained center scroll fixed
-syn match cssColorAttr contained "\"
-syn match cssColorAttr contained "\"
+syn keyword cssFontAttr contained bold bolder light lighter larger smaller
+syn keyword cssFontAttr contained icon menu caption
+syn keyword cssFontAttr contained large smaller larger narrower wider
+syn keyword cssFontAttr contained Courier Arial Georgia Times
 
-syn match cssTextProp "\<\(\(word\|letter\)-spacing\|text\(-\(decoration\|transform\|align\|index\|shadow\)\)\=\|vertical-align\|unicode-bidi\|line-height\)\>"
-syn match cssTextAttr contained "\"
-syn match cssTextAttr contained "\"
-syn match cssTextAttr contained "\<\(text-\)\=\(top\|bottom\)\>"
-syn keyword cssTextAttr contained underline overline blink sub super middle
-syn keyword cssTextAttr contained capitalize uppercase lowercase center justify baseline sub super
-
-syn match cssBoxProp contained "\<\(margin\|padding\|border\)\(-\(top\|right\|bottom\|left\)\)\=\>"
-syn match cssBoxProp contained "\"
-syn match cssBoxProp contained "\<\(width\|z-index\)\>"
-syn match cssBoxProp contained "\<\(min\|max\)-\(width\|height\)\>"
-syn keyword cssBoxProp contained width height float clear overflow clip visibility
-syn keyword cssBoxAttr contained thin thick both
-syn keyword cssBoxAttr contained dotted dashed solid double groove ridge inset outset
-syn keyword cssBoxAttr contained hidden visible scroll collapse
-
-syn keyword cssGeneratedContentProp contained content quotes
+
+syn keyword cssGeneratedContentProp contained content quotes crop
 syn match cssGeneratedContentProp contained "\"
-syn match cssGeneratedContentProp contained "\"
+syn match cssGeneratedContentProp contained "\"
+syn match cssGeneratedContentProp contained "\"
 syn match cssGeneratedContentAttr contained "\<\(no-\)\=\(open\|close\)-quote\>"
-syn match cssAuralAttr contained "\"
-syn match cssGeneratedContentAttr contained "\<\(lower\|upper\)-\(roman\|alpha\|greek\|latin\)\>"
-syn match cssGeneratedContentAttr contained "\<\(hiragana\|katakana\)\(-iroha\)\=\>"
-syn match cssGeneratedContentAttr contained "\<\(decimal\(-leading-zero\)\=\|cjk-ideographic\)\>"
-syn keyword cssGeneratedContentAttr contained disc circle square hebrew armenian georgian
-syn keyword cssGeneratedContentAttr contained inside outside
 
-syn match cssPagingProp contained "\"
-syn keyword cssPagingProp contained size marks inside orphans widows
-syn keyword cssPagingAttr contained landscape portrait crop cross always avoid
 
-syn keyword cssUIProp contained cursor
-syn match cssUIProp contained "\"
-syn match cssUIAttr contained "\<[ns]\=[ew]\=-resize\>"
-syn keyword cssUIAttr contained default crosshair pointer move wait help
-syn keyword cssUIAttr contained thin thick
-syn keyword cssUIAttr contained dotted dashed solid double groove ridge inset outset
-syn keyword cssUIAttr contained invert
-
-syn match cssRenderAttr contained "\"
-syn match cssRenderProp contained "\<\(display\|marker-offset\|unicode-bidi\|white-space\|list-item\|run-in\|inline-table\)\>"
-syn keyword cssRenderProp contained position top bottom direction
-syn match cssRenderProp contained "\<\(left\|right\)\>"
-syn keyword cssRenderAttr contained block inline compact
-syn match cssRenderAttr contained "\"
-syn keyword cssRenderAttr contained static relative absolute fixed
-syn keyword cssRenderAttr contained ltr rtl embed bidi-override pre nowrap
-syn match cssRenderAttr contained "\"
+syn match cssGridProp contained "\"
+
+syn match cssHyerlinkProp contained "\"
+
+syn match cssListProp contained "\"
+syn match cssListAttr contained "\<\(lower\|upper\)-\(roman\|alpha\|greek\|latin\)\>"
+syn match cssListAttr contained "\<\(hiragana\|katakana\)\(-iroha\)\=\>"
+syn match cssListAttr contained "\<\(decimal\(-leading-zero\)\=\|cjk-ideographic\)\>"
+syn keyword cssListAttr contained disc circle square hebrew armenian georgian
+syn keyword cssListAttr contained inside outside
+
 
+syn match cssMarginProp contained "\"
+
+syn match cssMultiColumnProp contained "\"
+
+
+syn match cssPaddingProp contained "\"
+
+syn keyword cssPositioningProp contained bottom clear clip display float left
+syn keyword cssPositioningProp contained position right top visibility
+syn match cssPositioningProp contained "\"
+syn keyword cssPositioningAttr contained block inline compact
+syn match cssPositioningAttr contained "\"
+syn keyword cssPositioningAttr contained left right both
+syn match cssPositioningAttr contained "\"
+syn match cssPositioningAttr contained "\"
+syn keyword cssPositioningAttr contained static relative absolute fixed
+
+syn match cssPrintProp contained "\"
+syn keyword cssPrintProp contained orphans widows
+syn keyword cssPrintAttr contained landscape portrait crop cross always avoid
+
+syn match cssTableProp contained "\<\(caption-side\|table-layout\|border-collapse\|border-spacing\|empty-cells\)\>"
+syn keyword cssTableAttr contained fixed collapse separate show hide once always
+
+
+syn keyword cssTextProp contained color direction
+syn match cssTextProp "\<\(\(word\|letter\)-spacing\|text\(-\(decoration\|transform\|align\|index\|shadow\)\)\=\|vertical-align\|unicode-bidi\|line-height\)\>"
+syn match cssTextProp contained "\"
+syn match cssTextProp contained "\"
+syn match cssTextProp contained "\"
+syn match cssTextProp contained "\"
+syn match cssTextProp contained "\"
+syn match cssTextAttr contained "\"
+syn match cssTextAttr contained "\"
+syn match cssTextAttr contained "\<\(text-\)\=\(top\|bottom\)\>"
+syn keyword cssTextAttr contained ltr rtl embed nowrap
+syn keyword cssTextAttr contained underline overline blink sub super middle
+syn keyword cssTextAttr contained capitalize uppercase lowercase
+syn keyword cssTextAttr contained center justify baseline sub super
+syn match cssTextAttr contained "\"
+syn match cssTextAttr contained "\<\(allow\|force\)-end\>"
+syn keyword cssTextAttr contained start end adjacent
+syn match cssTextAttr contained "\"
+syn keyword cssTextAttr contained distribute kashida first last
+syn keyword cssTextAttr contained clip ellipsis unrestricted suppress
+syn match cssTextAttr contained "\"
+syn match cssTextAttr contained "\"
+syn keyword cssTextAttr contained hyphenate
+
+
+syn match cssTransformProp contained "\"
+syn match cssTransformProp contained "\"
+syn match cssTransformProp contained "\"
+
+syn match cssTransitionProp contained "\"
+
+syn match cssUIProp contained "\"
+syn match cssUIProp contained "\"
+syn match cssUIProp contained "\"
+syn keyword cssUIProp contained appearance icon resize
+syn keyword cssUIAttr contained window button menu field
 
 syn match cssAuralProp contained "\<\(pause\|cue\)\(-\(before\|after\)\)\=\>"
 syn match cssAuralProp contained "\<\(play-during\|speech-rate\|voice-family\|pitch\(-range\)\=\|speak\(-\(punctuation\|numerals\)\)\=\)\>"
@@ -171,30 +311,54 @@ syn keyword cssAuralAttr contained below level above higher
 syn match cssAuralAttr contained "\<\(x-\)\=\(slow\|fast\)\>"
 syn keyword cssAuralAttr contained faster slower
 syn keyword cssAuralAttr contained male female child code digits continuous
+syn match cssAuralAttr contained "\"
+
+" cursor
+syn keyword cssUIProp contained cursor
+syn match cssUIAttr contained "\<[ns]\=[ew]\=-resize\>"
+syn keyword cssUIAttr contained crosshair default help move pointer
+syn keyword cssUIAttr contained progress wait
+
+" FIXME: I could not find them in reference
+syn keyword cssUIAttr contained invert maker size zoom
+syn match cssRenderAttr contained "\"
+syn match cssRenderAttr contained "\"
+syn match cssRenderAttr contained "\"
+syn match cssRenderProp contained "\"
+syn match cssRenderAttr contained "\"
 
-syn match cssTableProp contained "\<\(caption-side\|table-layout\|border-collapse\|border-spacing\|empty-cells\|speak-header\)\>"
-syn keyword cssTableAttr contained fixed collapse separate show hide once always
 
 " FIXME: This allows cssMediaBlock before the semicolon, which is wrong.
 syn region cssInclude start="@import" end=";" contains=cssComment,cssURL,cssUnicodeEscape,cssMediaType
 syn match cssBraces contained "[{}]"
 syn match cssError contained "{@<>"
-syn region cssDefinition transparent matchgroup=cssBraces start='{' end='}' contains=css.*Attr,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape
+syn region cssDefinition transparent matchgroup=cssBraces start='{' end='}' contains=css.*Attr,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssVendor,cssDefinition
 syn match cssBraceError "}"
 
+" Pseudo class
 syn match cssPseudoClass ":[A-Za-z0-9_-]*" contains=cssPseudoClassId,cssUnicodeEscape
-syn keyword cssPseudoClassId contained link visited active hover focus before after left right
+syn keyword cssPseudoClassId link visited active hover focus before after left right lang
 syn match cssPseudoClassId contained "\"
-syn region cssPseudoClassLang matchgroup=cssPseudoClassId start=":lang(" end=")" oneline
-
+" FIXME: handle functions.
+"syn region cssPseudoClassLang matchgroup=cssPseudoClassId start="lang(" end=")"
+syn match cssPseudoClassId contained "\<\(last\|only\|nth\|nth-last\)-child\>"
+syn match cssPseudoClassId contained "\<\(first\|last\|only\|nth\|nth-last\)-of-type\>"
+syn keyword cssPseudoClassId root empty target enable disabled checked not invalid
+syn match cssPseudoClassId contained  "::\(-moz-\)\=selection"
+
+" Comment
 syn region cssComment start="/\*" end="\*/" contains=@Spell
+syn region cssComment start="//" skip="\\$" end="$" keepend contains=@Spell
 
 syn match cssUnicodeEscape "\\\x\{1,6}\s\?"
 syn match cssSpecialCharQQ +\\"+ contained
 syn match cssSpecialCharQ +\\'+ contained
 syn region cssStringQQ start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=cssUnicodeEscape,cssSpecialCharQQ
 syn region cssStringQ start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=cssUnicodeEscape,cssSpecialCharQ
-syn match cssClassName "\.[A-Za-z][A-Za-z0-9_-]\+"
+
+" Vendor Prefix
+syn match cssVendor contained "\(-\(webkit\|moz\|o\|ms\)-\)"
+
 
 if main_syntax == "css"
   syn sync minlines=10
@@ -212,31 +376,75 @@ if version >= 508 || !exists("did_css_syn_inits")
   endif
 
   HiLink cssComment Comment
+  HiLink cssVendor Comment
   HiLink cssTagName Statement
+  HiLink cssDeprecated Error
   HiLink cssSelectorOp Special
   HiLink cssSelectorOp2 Special
-  HiLink cssFontProp StorageClass
-  HiLink cssColorProp StorageClass
-  HiLink cssTextProp StorageClass
+
+  HiLink cssAnimationProp StorageClass
+  HiLink cssBackgroundProp StorageClass
+  HiLink cssBorderOutlineProp StorageClass
   HiLink cssBoxProp StorageClass
-  HiLink cssRenderProp StorageClass
-  HiLink cssAuralProp StorageClass
-  HiLink cssRenderProp StorageClass
+  HiLink cssColorProp StorageClass
+  HiLink cssContentForPagedMediaProp StorageClass
+  HiLink cssDimensionProp StorageClass
+  HiLink cssFlexibleBoxProp StorageClass
+  HiLink cssFontProp StorageClass
   HiLink cssGeneratedContentProp StorageClass
-  HiLink cssPagingProp StorageClass
+  HiLink cssGridProp StorageClass
+  HiLink cssHyerlinkProp StorageClass
+  HiLink cssLineboxProp StorageClass
+  HiLink cssListProp StorageClass
+  HiLink cssMarginProp StorageClass
+  HiLink cssMarqueeProp StorageClass
+  HiLink cssMultiColumnProp StorageClass
+  HiLink cssPaddingProp StorageClass
+  HiLink cssPagedMediaProp StorageClass
+  HiLink cssPositioningProp StorageClass
+  HiLink cssPrintProp StorageClass
+  HiLink cssRubyProp StorageClass
+  HiLink cssSpeechProp StorageClass
   HiLink cssTableProp StorageClass
+  HiLink cssTextProp StorageClass
+  HiLink cssTransformProp StorageClass
+  HiLink cssTransitionProp StorageClass
   HiLink cssUIProp StorageClass
-  HiLink cssFontAttr Type
-  HiLink cssColorAttr Type
-  HiLink cssTextAttr Type
+  HiLink cssAuralProp StorageClass
+  HiLink cssRenderProp StorageClass
+
+  HiLink cssAnimationAttr Type
+  HiLink cssBackgroundAttr Type
+  HiLink cssBorderOutlineAttr Type
   HiLink cssBoxAttr Type
-  HiLink cssRenderAttr Type
-  HiLink cssAuralAttr Type
+  HiLink cssColorAttr Type
+  HiLink cssContentForPagedMediaAttr Type
+  HiLink cssDimensionAttr Type
+  HiLink cssFlexibleBoxAttr Type
+  HiLink cssFontAttr Type
   HiLink cssGeneratedContentAttr Type
-  HiLink cssPagingAttr Type
+  HiLink cssGridAttr Type
+  HiLink cssHyerlinkAttr Type
+  HiLink cssLineboxAttr Type
+  HiLink cssListAttr Type
+  HiLink cssMarginAttr Type
+  HiLink cssMarqueeAttr Type
+  HiLink cssMultiColumnAttr Type
+  HiLink cssPaddingAttr Type
+  HiLink cssPagedMediaAttr Type
+  HiLink cssPositioningAttr Type
+  HiLink cssPrintAttr Type
+  HiLink cssRubyAttr Type
+  HiLink cssSpeechAttr Type
   HiLink cssTableAttr Type
+  HiLink cssTextAttr Type
+  HiLink cssTransformAttr Type
+  HiLink cssTransitionAttr Type
   HiLink cssUIAttr Type
+  HiLink cssAuralAttr Type
+  HiLink cssRenderAttr Type
   HiLink cssCommonAttr Type
+
   HiLink cssPseudoClassId PreProc
   HiLink cssPseudoClassLang Constant
   HiLink cssValueLength Number
@@ -277,6 +485,7 @@ if main_syntax == 'css'
   unlet main_syntax
 endif
 
-
+let &cpo = s:cpo_save
+unlet s:cpo_save
 " vim: ts=8
 
diff --git a/runtime/syntax/cucumber.vim b/runtime/syntax/cucumber.vim
index 9e7a9d35b0..f1ef2992ec 100644
--- a/runtime/syntax/cucumber.vim
+++ b/runtime/syntax/cucumber.vim
@@ -2,7 +2,7 @@
 " Language:     Cucumber
 " Maintainer:   Tim Pope 
 " Filenames:    *.feature
-" Last Change:	2012 Apr 30
+" Last Change:	2013 May 30
 
 if exists("b:current_syntax")
     finish
@@ -14,50 +14,60 @@ syn case match
 syn sync minlines=20
 
 let g:cucumber_languages = {
-      \"en": {"and": "And\\>", "background": "Background\\>", "but": "But\\>", "examples": "Scenarios\\>\\|Examples\\>", "feature": "Feature\\>", "given": "Given\\>", "scenario": "Scenario\\>", "scenario_outline": "Scenario Outline\\>", "then": "Then\\>", "when": "When\\>"},
+      \"en": {"and": "And\\>", "background": "Background\\>", "but": "But\\>", "examples": "Scenarios\\>\\|Examples\\>", "feature": "Business Need\\>\\|Feature\\>\\|Ability\\>", "given": "Given\\>", "scenario": "Scenario\\>", "scenario_outline": "Scenario Template\\>\\|Scenario Outline\\>", "then": "Then\\>", "when": "When\\>"},
       \"ar": {"and": "\\%u0648\\>", "background": "\\%u0627\\%u0644\\%u062e\\%u0644\\%u0641\\%u064a\\%u0629\\>", "but": "\\%u0644\\%u0643\\%u0646\\>", "examples": "\\%u0627\\%u0645\\%u062b\\%u0644\\%u0629\\>", "feature": "\\%u062e\\%u0627\\%u0635\\%u064a\\%u0629\\>", "given": "\\%u0628\\%u0641\\%u0631\\%u0636\\>", "scenario": "\\%u0633\\%u064a\\%u0646\\%u0627\\%u0631\\%u064a\\%u0648\\>", "scenario_outline": "\\%u0633\\%u064a\\%u0646\\%u0627\\%u0631\\%u064a\\%u0648 \\%u0645\\%u062e\\%u0637\\%u0637\\>", "then": "\\%u0627\\%u0630\\%u0627\\%u064b\\>\\|\\%u062b\\%u0645\\>", "when": "\\%u0639\\%u0646\\%u062f\\%u0645\\%u0627\\>\\|\\%u0645\\%u062a\\%u0649\\>"},
       \"bg": {"and": "\\%u0418\\>", "background": "\\%u041f\\%u0440\\%u0435\\%u0434\\%u0438\\%u0441\\%u0442\\%u043e\\%u0440\\%u0438\\%u044f\\>", "but": "\\%u041d\\%u043e\\>", "examples": "\\%u041f\\%u0440\\%u0438\\%u043c\\%u0435\\%u0440\\%u0438\\>", "feature": "\\%u0424\\%u0443\\%u043d\\%u043a\\%u0446\\%u0438\\%u043e\\%u043d\\%u0430\\%u043b\\%u043d\\%u043e\\%u0441\\%u0442\\>", "given": "\\%u0414\\%u0430\\%u0434\\%u0435\\%u043d\\%u043e\\>", "scenario": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0439\\>", "scenario_outline": "\\%u0420\\%u0430\\%u043c\\%u043a\\%u0430 \\%u043d\\%u0430 \\%u0441\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0439\\>", "then": "\\%u0422\\%u043e\\>", "when": "\\%u041a\\%u043e\\%u0433\\%u0430\\%u0442\\%u043e\\>"},
+      \"bm": {"and": "Dan\\>", "background": "Latar Belakang\\>", "but": "Tetapi\\>", "examples": "Contoh \\>", "feature": "Fungsi\\>", "given": "Bagi\\>", "scenario": "Senario\\>", "scenario_outline": "Menggariskan Senario \\>", "then": "Kemudian\\>", "when": "Apabila\\>"},
       \"ca": {"and": "I\\>", "background": "Antecedents\\>\\|Rerefons\\>", "but": "Per\\%u00f2\\>", "examples": "Exemples\\>", "feature": "Caracter\\%u00edstica\\>\\|Funcionalitat\\>", "given": "At\\%u00e8s\\>\\|Donada\\>\\|Donat\\>\\|Atesa\\>", "scenario": "Escenari\\>", "scenario_outline": "Esquema de l'escenari\\>", "then": "Aleshores\\>\\|Cal\\>", "when": "Quan\\>"},
-      \"cs": {"and": "A tak\\%u00e9\\>\\|A\\>", "background": "Pozad\\%u00ed\\>\\|Kontext\\>", "but": "Ale\\>", "examples": "P\\%u0159\\%u00edklady\\>", "feature": "Po\\%u017eadavek\\>", "given": "Pokud\\>", "scenario": "Sc\\%u00e9n\\%u00e1\\%u0159\\>", "scenario_outline": "N\\%u00e1\\%u010drt Sc\\%u00e9n\\%u00e1\\%u0159e\\>\\|Osnova sc\\%u00e9n\\%u00e1\\%u0159e\\>", "then": "Pak\\>", "when": "Kdy\\%u017e\\>"},
+      \"cs": {"and": "A tak\\%u00e9\\>\\|A\\>", "background": "Pozad\\%u00ed\\>\\|Kontext\\>", "but": "Ale\\>", "examples": "P\\%u0159\\%u00edklady\\>", "feature": "Po\\%u017eadavek\\>", "given": "Za p\\%u0159edpokladu\\>\\|Pokud\\>", "scenario": "Sc\\%u00e9n\\%u00e1\\%u0159\\>", "scenario_outline": "N\\%u00e1\\%u010drt Sc\\%u00e9n\\%u00e1\\%u0159e\\>\\|Osnova sc\\%u00e9n\\%u00e1\\%u0159e\\>", "then": "Pak\\>", "when": "Kdy\\%u017e\\>"},
       \"cy-GB": {"and": "A\\>", "background": "Cefndir\\>", "but": "Ond\\>", "examples": "Enghreifftiau\\>", "feature": "Arwedd\\>", "given": "Anrhegedig a\\>", "scenario": "Scenario\\>", "scenario_outline": "Scenario Amlinellol\\>", "then": "Yna\\>", "when": "Pryd\\>"},
       \"da": {"and": "Og\\>", "background": "Baggrund\\>", "but": "Men\\>", "examples": "Eksempler\\>", "feature": "Egenskab\\>", "given": "Givet\\>", "scenario": "Scenarie\\>", "scenario_outline": "Abstrakt Scenario\\>", "then": "S\\%u00e5\\>", "when": "N\\%u00e5r\\>"},
       \"de": {"and": "Und\\>", "background": "Grundlage\\>", "but": "Aber\\>", "examples": "Beispiele\\>", "feature": "Funktionalit\\%u00e4t\\>", "given": "Gegeben sei\\>\\|Angenommen\\>", "scenario": "Szenario\\>", "scenario_outline": "Szenariogrundriss\\>", "then": "Dann\\>", "when": "Wenn\\>"},
+      \"el": {"and": "\\%u039a\\%u03b1\\%u03b9\\>", "background": "\\%u03a5\\%u03c0\\%u03cc\\%u03b2\\%u03b1\\%u03b8\\%u03c1\\%u03bf\\>", "but": "\\%u0391\\%u03bb\\%u03bb\\%u03ac\\>", "examples": "\\%u03a0\\%u03b1\\%u03c1\\%u03b1\\%u03b4\\%u03b5\\%u03af\\%u03b3\\%u03bc\\%u03b1\\%u03c4\\%u03b1\\>\\|\\%u03a3\\%u03b5\\%u03bd\\%u03ac\\%u03c1\\%u03b9\\%u03b1\\>", "feature": "\\%u0394\\%u03c5\\%u03bd\\%u03b1\\%u03c4\\%u03cc\\%u03c4\\%u03b7\\%u03c4\\%u03b1\\>\\|\\%u039b\\%u03b5\\%u03b9\\%u03c4\\%u03bf\\%u03c5\\%u03c1\\%u03b3\\%u03af\\%u03b1\\>", "given": "\\%u0394\\%u03b5\\%u03b4\\%u03bf\\%u03bc\\%u03ad\\%u03bd\\%u03bf\\%u03c5 \\%u03cc\\%u03c4\\%u03b9\\>\\|\\%u0394\\%u03b5\\%u03b4\\%u03bf\\%u03bc\\%u03ad\\%u03bd\\%u03bf\\%u03c5\\>", "scenario": "\\%u03a3\\%u03b5\\%u03bd\\%u03ac\\%u03c1\\%u03b9\\%u03bf\\>", "scenario_outline": "\\%u03a0\\%u03b5\\%u03c1\\%u03b9\\%u03b3\\%u03c1\\%u03b1\\%u03c6\\%u03ae \\%u03a3\\%u03b5\\%u03bd\\%u03b1\\%u03c1\\%u03af\\%u03bf\\%u03c5\\>", "then": "\\%u03a4\\%u03cc\\%u03c4\\%u03b5\\>", "when": "\\%u038c\\%u03c4\\%u03b1\\%u03bd\\>"},
       \"en-Scouse": {"and": "An\\>", "background": "Dis is what went down\\>", "but": "Buh\\>", "examples": "Examples\\>", "feature": "Feature\\>", "given": "Youse know when youse got\\>\\|Givun\\>", "scenario": "The thing of it is\\>", "scenario_outline": "Wharrimean is\\>", "then": "Den youse gotta\\>\\|Dun\\>", "when": "Youse know like when\\>\\|Wun\\>"},
-      \"en-au": {"and": "N\\>", "background": "Background\\>", "but": "Cept\\>", "examples": "Cobber\\>", "feature": "Crikey\\>", "given": "Ya know how\\>", "scenario": "Mate\\>", "scenario_outline": "Blokes\\>", "then": "Ya gotta\\>", "when": "When\\>"},
+      \"en-au": {"and": "Too right\\>", "background": "First off\\>", "but": "Yeah nah\\>", "examples": "You'll wanna\\>", "feature": "Pretty much\\>", "given": "Y'know\\>", "scenario": "Awww, look mate\\>", "scenario_outline": "Reckon it's like\\>", "then": "But at the end of the day I reckon\\>", "when": "It's just unbelievable\\>"},
       \"en-lol": {"and": "AN\\>", "background": "B4\\>", "but": "BUT\\>", "examples": "EXAMPLZ\\>", "feature": "OH HAI\\>", "given": "I CAN HAZ\\>", "scenario": "MISHUN\\>", "scenario_outline": "MISHUN SRSLY\\>", "then": "DEN\\>", "when": "WEN\\>"},
+      \"en-old": {"and": "Ond\\>\\|7\\>", "background": "\\%u00c6r\\>\\|Aer\\>", "but": "Ac\\>", "examples": "Se \\%u00f0e\\>\\|Se \\%u00fee\\>\\|Se the\\>", "feature": "Hw\\%u00e6t\\>\\|Hwaet\\>", "given": "\\%u00d0urh\\>\\|\\%u00deurh\\>\\|Thurh\\>", "scenario": "Swa\\>", "scenario_outline": "Swa hw\\%u00e6r swa\\>\\|Swa hwaer swa\\>", "then": "\\%u00d0a \\%u00f0e\\>\\|\\%u00dea \\%u00fee\\>\\|\\%u00dea\\>\\|\\%u00d0a\\>\\|Tha the\\>\\|Tha\\>", "when": "\\%u00d0a\\>\\|\\%u00dea\\>\\|Tha\\>"},
+      \"en-pirate": {"and": "Aye\\>", "background": "Yo-ho-ho\\>", "but": "Avast!\\>", "examples": "Dead men tell no tales\\>", "feature": "Ahoy matey!\\>", "given": "Gangway!\\>", "scenario": "Heave to\\>", "scenario_outline": "Shiver me timbers\\>", "then": "Let go and haul\\>", "when": "Blimey!\\>"},
       \"en-tx": {"and": "And y'all\\>", "background": "Background\\>", "but": "But y'all\\>", "examples": "Examples\\>", "feature": "Feature\\>", "given": "Given y'all\\>", "scenario": "Scenario\\>", "scenario_outline": "All y'all\\>", "then": "Then y'all\\>", "when": "When y'all\\>"},
       \"eo": {"and": "Kaj\\>", "background": "Fono\\>", "but": "Sed\\>", "examples": "Ekzemploj\\>", "feature": "Trajto\\>", "given": "Donita\\%u0135o\\>", "scenario": "Scenaro\\>", "scenario_outline": "Konturo de la scenaro\\>", "then": "Do\\>", "when": "Se\\>"},
-      \"es": {"and": "Y\\>", "background": "Antecedentes\\>", "but": "Pero\\>", "examples": "Ejemplos\\>", "feature": "Caracter\\%u00edstica\\>", "given": "Dado\\>", "scenario": "Escenario\\>", "scenario_outline": "Esquema del escenario\\>", "then": "Entonces\\>", "when": "Cuando\\>"},
+      \"es": {"and": "Y\\>", "background": "Antecedentes\\>", "but": "Pero\\>", "examples": "Ejemplos\\>", "feature": "Caracter\\%u00edstica\\>", "given": "Dadas\\>\\|Dados\\>\\|Dada\\>\\|Dado\\>", "scenario": "Escenario\\>", "scenario_outline": "Esquema del escenario\\>", "then": "Entonces\\>", "when": "Cuando\\>"},
       \"et": {"and": "Ja\\>", "background": "Taust\\>", "but": "Kuid\\>", "examples": "Juhtumid\\>", "feature": "Omadus\\>", "given": "Eeldades\\>", "scenario": "Stsenaarium\\>", "scenario_outline": "Raamstsenaarium\\>", "then": "Siis\\>", "when": "Kui\\>"},
+      \"fa": {"and": "\\%u0648\\>", "background": "\\%u0632\\%u0645\\%u06cc\\%u0646\\%u0647\\>", "but": "\\%u0627\\%u0645\\%u0627\\>", "examples": "\\%u0646\\%u0645\\%u0648\\%u0646\\%u0647 \\%u0647\\%u0627\\>", "feature": "\\%u0648\\%u0650\\%u06cc\\%u0698\\%u06af\\%u06cc\\>", "given": "\\%u0628\\%u0627 \\%u0641\\%u0631\\%u0636\\>", "scenario": "\\%u0633\\%u0646\\%u0627\\%u0631\\%u06cc\\%u0648\\>", "scenario_outline": "\\%u0627\\%u0644\\%u06af\\%u0648\\%u06cc \\%u0633\\%u0646\\%u0627\\%u0631\\%u06cc\\%u0648\\>", "then": "\\%u0622\\%u0646\\%u06af\\%u0627\\%u0647\\>", "when": "\\%u0647\\%u0646\\%u06af\\%u0627\\%u0645\\%u06cc\\>"},
       \"fi": {"and": "Ja\\>", "background": "Tausta\\>", "but": "Mutta\\>", "examples": "Tapaukset\\>", "feature": "Ominaisuus\\>", "given": "Oletetaan\\>", "scenario": "Tapaus\\>", "scenario_outline": "Tapausaihio\\>", "then": "Niin\\>", "when": "Kun\\>"},
-      \"fr": {"and": "Et\\>", "background": "Contexte\\>", "but": "Mais\\>", "examples": "Exemples\\>", "feature": "Fonctionnalit\\%u00e9\\>", "given": "Etant donn\\%u00e9\\>\\|Soit\\>", "scenario": "Sc\\%u00e9nario\\>", "scenario_outline": "Plan du sc\\%u00e9nario\\>\\|Plan du Sc\\%u00e9nario\\>", "then": "Alors\\>", "when": "Lorsqu'\\|Lorsque\\>\\|Quand\\>"},
+      \"fr": {"and": "Et\\>", "background": "Contexte\\>", "but": "Mais\\>", "examples": "Exemples\\>", "feature": "Fonctionnalit\\%u00e9\\>", "given": "\\%u00c9tant donn\\%u00e9es\\>\\|\\%u00c9tant donn\\%u00e9s\\>\\|\\%u00c9tant donn\\%u00e9e\\>\\|\\%u00c9tant donn\\%u00e9\\>\\|Etant donn\\%u00e9es\\>\\|Etant donn\\%u00e9s\\>\\|Etant donn\\%u00e9e\\>\\|Etant donn\\%u00e9\\>\\|Soit\\>", "scenario": "Sc\\%u00e9nario\\>", "scenario_outline": "Plan du sc\\%u00e9nario\\>\\|Plan du Sc\\%u00e9nario\\>", "then": "Alors\\>", "when": "Lorsqu'\\|Lorsque\\>\\|Quand\\>"},
+      \"gl": {"and": "E\\>", "background": "Contexto\\>", "but": "Mais\\>\\|Pero\\>", "examples": "Exemplos\\>", "feature": "Caracter\\%u00edstica\\>", "given": "Dadas\\>\\|Dados\\>\\|Dada\\>\\|Dado\\>", "scenario": "Escenario\\>", "scenario_outline": "Esbozo do escenario\\>", "then": "Ent\\%u00f3n\\>\\|Logo\\>", "when": "Cando\\>"},
       \"he": {"and": "\\%u05d5\\%u05d2\\%u05dd\\>", "background": "\\%u05e8\\%u05e7\\%u05e2\\>", "but": "\\%u05d0\\%u05d1\\%u05dc\\>", "examples": "\\%u05d3\\%u05d5\\%u05d2\\%u05de\\%u05d0\\%u05d5\\%u05ea\\>", "feature": "\\%u05ea\\%u05db\\%u05d5\\%u05e0\\%u05d4\\>", "given": "\\%u05d1\\%u05d4\\%u05d9\\%u05e0\\%u05ea\\%u05df\\>", "scenario": "\\%u05ea\\%u05e8\\%u05d7\\%u05d9\\%u05e9\\>", "scenario_outline": "\\%u05ea\\%u05d1\\%u05e0\\%u05d9\\%u05ea \\%u05ea\\%u05e8\\%u05d7\\%u05d9\\%u05e9\\>", "then": "\\%u05d0\\%u05d6\\%u05d9\\>\\|\\%u05d0\\%u05d6\\>", "when": "\\%u05db\\%u05d0\\%u05e9\\%u05e8\\>"},
+      \"hi": {"and": "\\%u0924\\%u0925\\%u093e\\>\\|\\%u0914\\%u0930\\>", "background": "\\%u092a\\%u0943\\%u0937\\%u094d\\%u0920\\%u092d\\%u0942\\%u092e\\%u093f\\>", "but": "\\%u092a\\%u0930\\>", "examples": "\\%u0909\\%u0926\\%u093e\\%u0939\\%u0930\\%u0923\\>", "feature": "\\%u0930\\%u0942\\%u092a \\%u0932\\%u0947\\%u0916\\>", "given": "\\%u091a\\%u0942\\%u0902\\%u0915\\%u093f\\>\\|\\%u092f\\%u0926\\%u093f\\>\\|\\%u0905\\%u0917\\%u0930\\>", "scenario": "\\%u092a\\%u0930\\%u093f\\%u0926\\%u0943\\%u0936\\%u094d\\%u092f\\>", "scenario_outline": "\\%u092a\\%u0930\\%u093f\\%u0926\\%u0943\\%u0936\\%u094d\\%u092f \\%u0930\\%u0942\\%u092a\\%u0930\\%u0947\\%u0916\\%u093e\\>", "then": "\\%u0924\\%u092c\\>", "when": "\\%u091c\\%u092c\\>"},
       \"hr": {"and": "I\\>", "background": "Pozadina\\>", "but": "Ali\\>", "examples": "Scenariji\\>\\|Primjeri\\>", "feature": "Mogu\\%u0107nost\\>\\|Mogucnost\\>\\|Osobina\\>", "given": "Zadano\\>\\|Zadani\\>\\|Zadan\\>", "scenario": "Scenarij\\>", "scenario_outline": "Koncept\\>\\|Skica\\>", "then": "Onda\\>", "when": "Kada\\>\\|Kad\\>"},
-      \"hu": {"and": "\\%u00c9s\\>", "background": "H\\%u00e1tt\\%u00e9r\\>", "but": "De\\>", "examples": "P\\%u00e9ld\\%u00e1k\\>", "feature": "Jellemz\\%u0151\\>", "given": "Ha\\>", "scenario": "Forgat\\%u00f3k\\%u00f6nyv\\>", "scenario_outline": "Forgat\\%u00f3k\\%u00f6nyv v\\%u00e1zlat\\>", "then": "Akkor\\>", "when": "Majd\\>"},
+      \"hu": {"and": "\\%u00c9s\\>", "background": "H\\%u00e1tt\\%u00e9r\\>", "but": "De\\>", "examples": "P\\%u00e9ld\\%u00e1k\\>", "feature": "Jellemz\\%u0151\\>", "given": "Amennyiben\\>\\|Adott\\>", "scenario": "Forgat\\%u00f3k\\%u00f6nyv\\>", "scenario_outline": "Forgat\\%u00f3k\\%u00f6nyv v\\%u00e1zlat\\>", "then": "Akkor\\>", "when": "Amikor\\>\\|Majd\\>\\|Ha\\>"},
       \"id": {"and": "Dan\\>", "background": "Dasar\\>", "but": "Tapi\\>", "examples": "Contoh\\>", "feature": "Fitur\\>", "given": "Dengan\\>", "scenario": "Skenario\\>", "scenario_outline": "Skenario konsep\\>", "then": "Maka\\>", "when": "Ketika\\>"},
-      \"it": {"and": "E\\>", "background": "Contesto\\>", "but": "Ma\\>", "examples": "Esempi\\>", "feature": "Funzionalit\\%u00e0\\>", "given": "Dato\\>", "scenario": "Scenario\\>", "scenario_outline": "Schema dello scenario\\>", "then": "Allora\\>", "when": "Quando\\>"},
+      \"is": {"and": "Og\\>", "background": "Bakgrunnur\\>", "but": "En\\>", "examples": "Atbur\\%u00f0ar\\%u00e1sir\\>\\|D\\%u00e6mi\\>", "feature": "Eiginleiki\\>", "given": "Ef\\>", "scenario": "Atbur\\%u00f0ar\\%u00e1s\\>", "scenario_outline": "L\\%u00fdsing Atbur\\%u00f0ar\\%u00e1sar\\>\\|L\\%u00fdsing D\\%u00e6ma\\>", "then": "\\%u00de\\%u00e1\\>", "when": "\\%u00deegar\\>"},
+      \"it": {"and": "E\\>", "background": "Contesto\\>", "but": "Ma\\>", "examples": "Esempi\\>", "feature": "Funzionalit\\%u00e0\\>", "given": "Dato\\>\\|Data\\>\\|Dati\\>\\|Date\\>", "scenario": "Scenario\\>", "scenario_outline": "Schema dello scenario\\>", "then": "Allora\\>", "when": "Quando\\>"},
       \"ja": {"and": "\\%u304b\\%u3064", "background": "\\%u80cc\\%u666f\\>", "but": "\\%u3057\\%u304b\\%u3057\\|\\%u305f\\%u3060\\%u3057\\|\\%u4f46\\%u3057", "examples": "\\%u30b5\\%u30f3\\%u30d7\\%u30eb\\>\\|\\%u4f8b\\>", "feature": "\\%u30d5\\%u30a3\\%u30fc\\%u30c1\\%u30e3\\>\\|\\%u6a5f\\%u80fd\\>", "given": "\\%u524d\\%u63d0", "scenario": "\\%u30b7\\%u30ca\\%u30ea\\%u30aa\\>", "scenario_outline": "\\%u30b7\\%u30ca\\%u30ea\\%u30aa\\%u30a2\\%u30a6\\%u30c8\\%u30e9\\%u30a4\\%u30f3\\>\\|\\%u30b7\\%u30ca\\%u30ea\\%u30aa\\%u30c6\\%u30f3\\%u30d7\\%u30ec\\%u30fc\\%u30c8\\>\\|\\%u30b7\\%u30ca\\%u30ea\\%u30aa\\%u30c6\\%u30f3\\%u30d7\\%u30ec\\>\\|\\%u30c6\\%u30f3\\%u30d7\\%u30ec\\>", "then": "\\%u306a\\%u3089\\%u3070", "when": "\\%u3082\\%u3057"},
       \"ko": {"and": "\\%uadf8\\%ub9ac\\%uace0", "background": "\\%ubc30\\%uacbd\\>", "but": "\\%ud558\\%uc9c0\\%ub9cc\\|\\%ub2e8", "examples": "\\%uc608\\>", "feature": "\\%uae30\\%ub2a5\\>", "given": "\\%uc870\\%uac74\\|\\%uba3c\\%uc800", "scenario": "\\%uc2dc\\%ub098\\%ub9ac\\%uc624\\>", "scenario_outline": "\\%uc2dc\\%ub098\\%ub9ac\\%uc624 \\%uac1c\\%uc694\\>", "then": "\\%uadf8\\%ub7ec\\%uba74", "when": "\\%ub9cc\\%uc77c\\|\\%ub9cc\\%uc57d"},
       \"lt": {"and": "Ir\\>", "background": "Kontekstas\\>", "but": "Bet\\>", "examples": "Pavyzd\\%u017eiai\\>\\|Scenarijai\\>\\|Variantai\\>", "feature": "Savyb\\%u0117\\>", "given": "Duota\\>", "scenario": "Scenarijus\\>", "scenario_outline": "Scenarijaus \\%u0161ablonas\\>", "then": "Tada\\>", "when": "Kai\\>"},
       \"lu": {"and": "an\\>\\|a\\>", "background": "Hannergrond\\>", "but": "m\\%u00e4\\>\\|awer\\>", "examples": "Beispiller\\>", "feature": "Funktionalit\\%u00e9it\\>", "given": "ugeholl\\>", "scenario": "Szenario\\>", "scenario_outline": "Plang vum Szenario\\>", "then": "dann\\>", "when": "wann\\>"},
       \"lv": {"and": "Un\\>", "background": "Situ\\%u0101cija\\>\\|Konteksts\\>", "but": "Bet\\>", "examples": "Piem\\%u0113ri\\>\\|Paraugs\\>", "feature": "Funkcionalit\\%u0101te\\>\\|F\\%u012b\\%u010da\\>", "given": "Kad\\>", "scenario": "Scen\\%u0101rijs\\>", "scenario_outline": "Scen\\%u0101rijs p\\%u0113c parauga\\>", "then": "Tad\\>", "when": "Ja\\>"},
       \"nl": {"and": "En\\>", "background": "Achtergrond\\>", "but": "Maar\\>", "examples": "Voorbeelden\\>", "feature": "Functionaliteit\\>", "given": "Gegeven\\>\\|Stel\\>", "scenario": "Scenario\\>", "scenario_outline": "Abstract Scenario\\>", "then": "Dan\\>", "when": "Als\\>"},
-      \"no": {"and": "Og\\>", "background": "Bakgrunn\\>", "but": "Men\\>", "examples": "Eksempler\\>", "feature": "Egenskap\\>", "given": "Gitt\\>", "scenario": "Scenario\\>", "scenario_outline": "Abstrakt Scenario\\>", "then": "S\\%u00e5\\>", "when": "N\\%u00e5r\\>"},
-      \"pl": {"and": "Oraz\\>", "background": "Za\\%u0142o\\%u017cenia\\>", "but": "Ale\\>", "examples": "Przyk\\%u0142ady\\>", "feature": "W\\%u0142a\\%u015bciwo\\%u015b\\%u0107\\>", "given": "Zak\\%u0142adaj\\%u0105c\\>", "scenario": "Scenariusz\\>", "scenario_outline": "Szablon scenariusza\\>", "then": "Wtedy\\>", "when": "Je\\%u017celi\\>"},
-      \"pt": {"and": "E\\>", "background": "Contexto\\>", "but": "Mas\\>", "examples": "Exemplos\\>", "feature": "Funcionalidade\\>", "given": "Dado\\>", "scenario": "Cen\\%u00e1rio\\>\\|Cenario\\>", "scenario_outline": "Esquema do Cen\\%u00e1rio\\>\\|Esquema do Cenario\\>", "then": "Ent\\%u00e3o\\>\\|Entao\\>", "when": "Quando\\>"},
-      \"ro": {"and": "Si\\>", "background": "Conditii\\>", "but": "Dar\\>", "examples": "Exemplele\\>", "feature": "Functionalitate\\>", "given": "Daca\\>", "scenario": "Scenariu\\>", "scenario_outline": "Scenariul de sablon\\>", "then": "Atunci\\>", "when": "Cand\\>"},
-      \"ro-RO": {"and": "\\%u0218i\\>", "background": "Condi\\%u0163ii\\>", "but": "Dar\\>", "examples": "Exemplele\\>", "feature": "Func\\%u021bionalitate\\>", "given": "Dac\\%u0103\\>", "scenario": "Scenariu\\>", "scenario_outline": "Scenariul de \\%u015fablon\\>", "then": "Atunci\\>", "when": "C\\%u00e2nd\\>"},
-      \"ru": {"and": "\\%u041a \\%u0442\\%u043e\\%u043c\\%u0443 \\%u0436\\%u0435\\>\\|\\%u0418\\>", "background": "\\%u041f\\%u0440\\%u0435\\%u0434\\%u044b\\%u0441\\%u0442\\%u043e\\%u0440\\%u0438\\%u044f\\>", "but": "\\%u041d\\%u043e\\>\\|\\%u0410\\>", "examples": "\\%u0417\\%u043d\\%u0430\\%u0447\\%u0435\\%u043d\\%u0438\\%u044f\\>", "feature": "\\%u0424\\%u0443\\%u043d\\%u043a\\%u0446\\%u0438\\%u043e\\%u043d\\%u0430\\%u043b\\>\\|\\%u0424\\%u0438\\%u0447\\%u0430\\>", "given": "\\%u0414\\%u043e\\%u043f\\%u0443\\%u0441\\%u0442\\%u0438\\%u043c\\>", "scenario": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0439\\>", "scenario_outline": "\\%u0421\\%u0442\\%u0440\\%u0443\\%u043a\\%u0442\\%u0443\\%u0440\\%u0430 \\%u0441\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u044f\\>", "then": "\\%u0422\\%u043e\\>", "when": "\\%u0415\\%u0441\\%u043b\\%u0438\\>"},
-      \"sk": {"and": "A\\>", "background": "Pozadie\\>", "but": "Ale\\>", "examples": "Pr\\%u00edklady\\>", "feature": "Po\\%u017eiadavka\\>", "given": "Pokia\\%u013e\\>", "scenario": "Scen\\%u00e1r\\>", "scenario_outline": "N\\%u00e1\\%u010drt Scen\\%u00e1ru\\>", "then": "Tak\\>", "when": "Ke\\%u010f\\>"},
+      \"no": {"and": "Og\\>", "background": "Bakgrunn\\>", "but": "Men\\>", "examples": "Eksempler\\>", "feature": "Egenskap\\>", "given": "Gitt\\>", "scenario": "Scenario\\>", "scenario_outline": "Abstrakt Scenario\\>\\|Scenariomal\\>", "then": "S\\%u00e5\\>", "when": "N\\%u00e5r\\>"},
+      \"pl": {"and": "Oraz\\>\\|I\\>", "background": "Za\\%u0142o\\%u017cenia\\>", "but": "Ale\\>", "examples": "Przyk\\%u0142ady\\>", "feature": "W\\%u0142a\\%u015bciwo\\%u015b\\%u0107\\>\\|Potrzeba biznesowa\\>\\|Funkcja\\>\\|Aspekt\\>", "given": "Zak\\%u0142adaj\\%u0105c\\>\\|Maj\\%u0105c\\>", "scenario": "Scenariusz\\>", "scenario_outline": "Szablon scenariusza\\>", "then": "Wtedy\\>", "when": "Je\\%u017celi\\>\\|Je\\%u015bli\\>\\|Kiedy\\>\\|Gdy\\>"},
+      \"pt": {"and": "E\\>", "background": "Cen\\%u00e1rio de Fundo\\>\\|Cenario de Fundo\\>\\|Contexto\\>\\|Fundo\\>", "but": "Mas\\>", "examples": "Cen\\%u00e1rios\\>\\|Exemplos\\>\\|Cenarios\\>", "feature": "Caracter\\%u00edstica\\>\\|Funcionalidade\\>\\|Caracteristica\\>", "given": "Dadas\\>\\|Dados\\>\\|Dada\\>\\|Dado\\>", "scenario": "Cen\\%u00e1rio\\>\\|Cenario\\>", "scenario_outline": "Delinea\\%u00e7\\%u00e3o do Cen\\%u00e1rio\\>\\|Esquema do Cen\\%u00e1rio\\>\\|Delineacao do Cenario\\>\\|Esquema do Cenario\\>", "then": "Ent\\%u00e3o\\>\\|Entao\\>", "when": "Quando\\>"},
+      \"ro": {"and": "\\%u015ei\\>\\|\\%u0218i\\>\\|Si\\>", "background": "Context\\>", "but": "Dar\\>", "examples": "Exemple\\>", "feature": "Func\\%u0163ionalitate\\>\\|Func\\%u021bionalitate\\>\\|Functionalitate\\>", "given": "Da\\%u0163i fiind\\>\\|Da\\%u021bi fiind\\>\\|Dati fiind\\>\\|Date fiind\\>\\|Dat fiind\\>", "scenario": "Scenariu\\>", "scenario_outline": "Structur\\%u0103 scenariu\\>\\|Structura scenariu\\>", "then": "Atunci\\>", "when": "C\\%u00e2nd\\>\\|Cand\\>"},
+      \"ru": {"and": "\\%u041a \\%u0442\\%u043e\\%u043c\\%u0443 \\%u0436\\%u0435\\>\\|\\%u0422\\%u0430\\%u043a\\%u0436\\%u0435\\>\\|\\%u0418\\>", "background": "\\%u041f\\%u0440\\%u0435\\%u0434\\%u044b\\%u0441\\%u0442\\%u043e\\%u0440\\%u0438\\%u044f\\>\\|\\%u041a\\%u043e\\%u043d\\%u0442\\%u0435\\%u043a\\%u0441\\%u0442\\>", "but": "\\%u041d\\%u043e\\>\\|\\%u0410\\>", "examples": "\\%u041f\\%u0440\\%u0438\\%u043c\\%u0435\\%u0440\\%u044b\\>", "feature": "\\%u0424\\%u0443\\%u043d\\%u043a\\%u0446\\%u0438\\%u043e\\%u043d\\%u0430\\%u043b\\>\\|\\%u0421\\%u0432\\%u043e\\%u0439\\%u0441\\%u0442\\%u0432\\%u043e\\>\\|\\%u0424\\%u0443\\%u043d\\%u043a\\%u0446\\%u0438\\%u044f\\>", "given": "\\%u0414\\%u043e\\%u043f\\%u0443\\%u0441\\%u0442\\%u0438\\%u043c\\>\\|\\%u041f\\%u0443\\%u0441\\%u0442\\%u044c\\>\\|\\%u0414\\%u0430\\%u043d\\%u043e\\>", "scenario": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0439\\>", "scenario_outline": "\\%u0421\\%u0442\\%u0440\\%u0443\\%u043a\\%u0442\\%u0443\\%u0440\\%u0430 \\%u0441\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u044f\\>", "then": "\\%u0422\\%u043e\\%u0433\\%u0434\\%u0430\\>\\|\\%u0422\\%u043e\\>", "when": "\\%u041a\\%u043e\\%u0433\\%u0434\\%u0430\\>\\|\\%u0415\\%u0441\\%u043b\\%u0438\\>"},
+      \"sk": {"and": "A z\\%u00e1rove\\%u0148\\>\\|A taktie\\%u017e\\>\\|A tie\\%u017e\\>\\|A\\>", "background": "Pozadie\\>", "but": "Ale\\>", "examples": "Pr\\%u00edklady\\>", "feature": "Po\\%u017eiadavka\\>\\|Vlastnos\\%u0165\\>\\|Funkcia\\>", "given": "Za predpokladu\\>\\|Pokia\\%u013e\\>", "scenario": "Scen\\%u00e1r\\>", "scenario_outline": "N\\%u00e1\\%u010drt Scen\\%u00e1ru\\>\\|N\\%u00e1\\%u010drt Scen\\%u00e1ra\\>\\|Osnova Scen\\%u00e1ra\\>", "then": "Potom\\>\\|Tak\\>", "when": "Ke\\%u010f\\>\\|Ak\\>"},
       \"sr-Cyrl": {"and": "\\%u0418\\>", "background": "\\%u041a\\%u043e\\%u043d\\%u0442\\%u0435\\%u043a\\%u0441\\%u0442\\>\\|\\%u041f\\%u043e\\%u0437\\%u0430\\%u0434\\%u0438\\%u043d\\%u0430\\>\\|\\%u041e\\%u0441\\%u043d\\%u043e\\%u0432\\%u0430\\>", "but": "\\%u0410\\%u043b\\%u0438\\>", "examples": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0458\\%u0438\\>\\|\\%u041f\\%u0440\\%u0438\\%u043c\\%u0435\\%u0440\\%u0438\\>", "feature": "\\%u0424\\%u0443\\%u043d\\%u043a\\%u0446\\%u0438\\%u043e\\%u043d\\%u0430\\%u043b\\%u043d\\%u043e\\%u0441\\%u0442\\>\\|\\%u041c\\%u043e\\%u0433\\%u0443\\%u045b\\%u043d\\%u043e\\%u0441\\%u0442\\>\\|\\%u041e\\%u0441\\%u043e\\%u0431\\%u0438\\%u043d\\%u0430\\>", "given": "\\%u0417\\%u0430\\%u0434\\%u0430\\%u0442\\%u043e\\>\\|\\%u0417\\%u0430\\%u0434\\%u0430\\%u0442\\%u0435\\>\\|\\%u0417\\%u0430\\%u0434\\%u0430\\%u0442\\%u0438\\>", "scenario": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u043e\\>\\|\\%u041f\\%u0440\\%u0438\\%u043c\\%u0435\\%u0440\\>", "scenario_outline": "\\%u0421\\%u0442\\%u0440\\%u0443\\%u043a\\%u0442\\%u0443\\%u0440\\%u0430 \\%u0441\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0458\\%u0430\\>\\|\\%u041a\\%u043e\\%u043d\\%u0446\\%u0435\\%u043f\\%u0442\\>\\|\\%u0421\\%u043a\\%u0438\\%u0446\\%u0430\\>", "then": "\\%u041e\\%u043d\\%u0434\\%u0430\\>", "when": "\\%u041a\\%u0430\\%u0434\\%u0430\\>\\|\\%u041a\\%u0430\\%u0434\\>"},
       \"sr-Latn": {"and": "I\\>", "background": "Kontekst\\>\\|Pozadina\\>\\|Osnova\\>", "but": "Ali\\>", "examples": "Scenariji\\>\\|Primeri\\>", "feature": "Mogu\\%u0107nost\\>\\|Funkcionalnost\\>\\|Mogucnost\\>\\|Osobina\\>", "given": "Zadato\\>\\|Zadate\\>\\|Zatati\\>", "scenario": "Scenario\\>\\|Primer\\>", "scenario_outline": "Struktura scenarija\\>\\|Koncept\\>\\|Skica\\>", "then": "Onda\\>", "when": "Kada\\>\\|Kad\\>"},
-      \"sv": {"and": "Och\\>", "background": "Bakgrund\\>", "but": "Men\\>", "examples": "Exempel\\>", "feature": "Egenskap\\>", "given": "Givet\\>", "scenario": "Scenario\\>", "scenario_outline": "Abstrakt Scenario\\>", "then": "S\\%u00e5\\>", "when": "N\\%u00e4r\\>"},
+      \"sv": {"and": "Och\\>", "background": "Bakgrund\\>", "but": "Men\\>", "examples": "Exempel\\>", "feature": "Egenskap\\>", "given": "Givet\\>", "scenario": "Scenario\\>", "scenario_outline": "Abstrakt Scenario\\>\\|Scenariomall\\>", "then": "S\\%u00e5\\>", "when": "N\\%u00e4r\\>"},
+      \"th": {"and": "\\%u0e41\\%u0e25\\%u0e30\\>", "background": "\\%u0e41\\%u0e19\\%u0e27\\%u0e04\\%u0e34\\%u0e14\\>", "but": "\\%u0e41\\%u0e15\\%u0e48\\>", "examples": "\\%u0e0a\\%u0e38\\%u0e14\\%u0e02\\%u0e2d\\%u0e07\\%u0e40\\%u0e2b\\%u0e15\\%u0e38\\%u0e01\\%u0e32\\%u0e23\\%u0e13\\%u0e4c\\>\\|\\%u0e0a\\%u0e38\\%u0e14\\%u0e02\\%u0e2d\\%u0e07\\%u0e15\\%u0e31\\%u0e27\\%u0e2d\\%u0e22\\%u0e48\\%u0e32\\%u0e07\\>", "feature": "\\%u0e04\\%u0e27\\%u0e32\\%u0e21\\%u0e15\\%u0e49\\%u0e2d\\%u0e07\\%u0e01\\%u0e32\\%u0e23\\%u0e17\\%u0e32\\%u0e07\\%u0e18\\%u0e38\\%u0e23\\%u0e01\\%u0e34\\%u0e08\\>\\|\\%u0e04\\%u0e27\\%u0e32\\%u0e21\\%u0e2a\\%u0e32\\%u0e21\\%u0e32\\%u0e23\\%u0e16\\>\\|\\%u0e42\\%u0e04\\%u0e23\\%u0e07\\%u0e2b\\%u0e25\\%u0e31\\%u0e01\\>", "given": "\\%u0e01\\%u0e33\\%u0e2b\\%u0e19\\%u0e14\\%u0e43\\%u0e2b\\%u0e49\\>", "scenario": "\\%u0e40\\%u0e2b\\%u0e15\\%u0e38\\%u0e01\\%u0e32\\%u0e23\\%u0e13\\%u0e4c\\>", "scenario_outline": "\\%u0e42\\%u0e04\\%u0e23\\%u0e07\\%u0e2a\\%u0e23\\%u0e49\\%u0e32\\%u0e07\\%u0e02\\%u0e2d\\%u0e07\\%u0e40\\%u0e2b\\%u0e15\\%u0e38\\%u0e01\\%u0e32\\%u0e23\\%u0e13\\%u0e4c\\>\\|\\%u0e2a\\%u0e23\\%u0e38\\%u0e1b\\%u0e40\\%u0e2b\\%u0e15\\%u0e38\\%u0e01\\%u0e32\\%u0e23\\%u0e13\\%u0e4c\\>", "then": "\\%u0e14\\%u0e31\\%u0e07\\%u0e19\\%u0e31\\%u0e49\\%u0e19\\>", "when": "\\%u0e40\\%u0e21\\%u0e37\\%u0e48\\%u0e2d\\>"},
+      \"tl": {"and": "\\%u0c2e\\%u0c30\\%u0c3f\\%u0c2f\\%u0c41\\>", "background": "\\%u0c28\\%u0c47\\%u0c2a\\%u0c25\\%u0c4d\\%u0c2f\\%u0c02\\>", "but": "\\%u0c15\\%u0c3e\\%u0c28\\%u0c3f\\>", "examples": "\\%u0c09\\%u0c26\\%u0c3e\\%u0c39\\%u0c30\\%u0c23\\%u0c32\\%u0c41\\>", "feature": "\\%u0c17\\%u0c41\\%u0c23\\%u0c2e\\%u0c41\\>", "given": "\\%u0c1a\\%u0c46\\%u0c2a\\%u0c4d\\%u0c2a\\%u0c2c\\%u0c21\\%u0c3f\\%u0c28\\%u0c26\\%u0c3f\\>", "scenario": "\\%u0c38\\%u0c28\\%u0c4d\\%u0c28\\%u0c3f\\%u0c35\\%u0c47\\%u0c36\\%u0c02\\>", "scenario_outline": "\\%u0c15\\%u0c25\\%u0c28\\%u0c02\\>", "then": "\\%u0c05\\%u0c2a\\%u0c4d\\%u0c2a\\%u0c41\\%u0c21\\%u0c41\\>", "when": "\\%u0c08 \\%u0c2a\\%u0c30\\%u0c3f\\%u0c38\\%u0c4d\\%u0c25\\%u0c3f\\%u0c24\\%u0c3f\\%u0c32\\%u0c4b\\>"},
       \"tr": {"and": "Ve\\>", "background": "Ge\\%u00e7mi\\%u015f\\>", "but": "Fakat\\>\\|Ama\\>", "examples": "\\%u00d6rnekler\\>", "feature": "\\%u00d6zellik\\>", "given": "Diyelim ki\\>", "scenario": "Senaryo\\>", "scenario_outline": "Senaryo tasla\\%u011f\\%u0131\\>", "then": "O zaman\\>", "when": "E\\%u011fer ki\\>"},
-      \"uk": {"and": "\\%u0406\\>", "background": "\\%u041f\\%u0435\\%u0440\\%u0435\\%u0434\\%u0443\\%u043c\\%u043e\\%u0432\\%u0430\\>", "but": "\\%u0410\\%u043b\\%u0435\\>", "examples": "\\%u041f\\%u0440\\%u0438\\%u043a\\%u043b\\%u0430\\%u0434\\%u0438\\>", "feature": "\\%u0424\\%u0443\\%u043d\\%u043a\\%u0446\\%u0456\\%u043e\\%u043d\\%u0430\\%u043b\\>", "given": "\\%u041f\\%u0440\\%u0438\\%u043f\\%u0443\\%u0441\\%u0442\\%u0438\\%u043c\\%u043e, \\%u0449\\%u043e\\>\\|\\%u041f\\%u0440\\%u0438\\%u043f\\%u0443\\%u0441\\%u0442\\%u0438\\%u043c\\%u043e\\>\\|\\%u041d\\%u0435\\%u0445\\%u0430\\%u0439\\>", "scenario": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0456\\%u0439\\>", "scenario_outline": "\\%u0421\\%u0442\\%u0440\\%u0443\\%u043a\\%u0442\\%u0443\\%u0440\\%u0430 \\%u0441\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0456\\%u044e\\>", "then": "\\%u0422\\%u043e\\>", "when": "\\%u042f\\%u043a\\%u0449\\%u043e\\>"},
+      \"tt": {"and": "\\%u04ba\\%u04d9\\%u043c\\>\\|\\%u0412\\%u04d9\\>", "background": "\\%u041a\\%u0435\\%u0440\\%u0435\\%u0448\\>", "but": "\\%u041b\\%u04d9\\%u043a\\%u0438\\%u043d\\>\\|\\%u04d8\\%u043c\\%u043c\\%u0430\\>", "examples": "\\%u04ae\\%u0440\\%u043d\\%u04d9\\%u043a\\%u043b\\%u04d9\\%u0440\\>\\|\\%u041c\\%u0438\\%u0441\\%u0430\\%u043b\\%u043b\\%u0430\\%u0440\\>", "feature": "\\%u04ae\\%u0437\\%u0435\\%u043d\\%u0447\\%u04d9\\%u043b\\%u0435\\%u043a\\%u043b\\%u0435\\%u043b\\%u0435\\%u043a\\>\\|\\%u041c\\%u04e9\\%u043c\\%u043a\\%u0438\\%u043d\\%u043b\\%u0435\\%u043a\\>", "given": "\\%u04d8\\%u0439\\%u0442\\%u0438\\%u043a\\>", "scenario": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0439\\>", "scenario_outline": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0439\\%u043d\\%u044b\\%u04a3 \\%u0442\\%u04e9\\%u0437\\%u0435\\%u043b\\%u0435\\%u0448\\%u0435\\>", "then": "\\%u041d\\%u04d9\\%u0442\\%u0438\\%u0497\\%u04d9\\%u0434\\%u04d9\\>", "when": "\\%u04d8\\%u0433\\%u04d9\\%u0440\\>"},
+      \"uk": {"and": "\\%u0410 \\%u0442\\%u0430\\%u043a\\%u043e\\%u0436\\>\\|\\%u0422\\%u0430\\>\\|\\%u0406\\>", "background": "\\%u041f\\%u0435\\%u0440\\%u0435\\%u0434\\%u0443\\%u043c\\%u043e\\%u0432\\%u0430\\>", "but": "\\%u0410\\%u043b\\%u0435\\>", "examples": "\\%u041f\\%u0440\\%u0438\\%u043a\\%u043b\\%u0430\\%u0434\\%u0438\\>", "feature": "\\%u0424\\%u0443\\%u043d\\%u043a\\%u0446\\%u0456\\%u043e\\%u043d\\%u0430\\%u043b\\>", "given": "\\%u041f\\%u0440\\%u0438\\%u043f\\%u0443\\%u0441\\%u0442\\%u0438\\%u043c\\%u043e, \\%u0449\\%u043e\\>\\|\\%u041f\\%u0440\\%u0438\\%u043f\\%u0443\\%u0441\\%u0442\\%u0438\\%u043c\\%u043e\\>\\|\\%u041d\\%u0435\\%u0445\\%u0430\\%u0439\\>\\|\\%u0414\\%u0430\\%u043d\\%u043e\\>", "scenario": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0456\\%u0439\\>", "scenario_outline": "\\%u0421\\%u0442\\%u0440\\%u0443\\%u043a\\%u0442\\%u0443\\%u0440\\%u0430 \\%u0441\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0456\\%u044e\\>", "then": "\\%u0422\\%u043e\\%u0434\\%u0456\\>\\|\\%u0422\\%u043e\\>", "when": "\\%u042f\\%u043a\\%u0449\\%u043e\\>\\|\\%u041a\\%u043e\\%u043b\\%u0438\\>"},
       \"uz": {"and": "\\%u0412\\%u0430\\>", "background": "\\%u0422\\%u0430\\%u0440\\%u0438\\%u0445\\>", "but": "\\%u041b\\%u0435\\%u043a\\%u0438\\%u043d\\>\\|\\%u0411\\%u0438\\%u0440\\%u043e\\%u043a\\>\\|\\%u0410\\%u043c\\%u043c\\%u043e\\>", "examples": "\\%u041c\\%u0438\\%u0441\\%u043e\\%u043b\\%u043b\\%u0430\\%u0440\\>", "feature": "\\%u0424\\%u0443\\%u043d\\%u043a\\%u0446\\%u0438\\%u043e\\%u043d\\%u0430\\%u043b\\>", "given": "\\%u0410\\%u0433\\%u0430\\%u0440\\>", "scenario": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0439\\>", "scenario_outline": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0439 \\%u0441\\%u0442\\%u0440\\%u0443\\%u043a\\%u0442\\%u0443\\%u0440\\%u0430\\%u0441\\%u0438\\>", "then": "\\%u0423\\%u043d\\%u0434\\%u0430\\>", "when": "\\%u0410\\%u0433\\%u0430\\%u0440\\>"},
       \"vi": {"and": "V\\%u00e0\\>", "background": "B\\%u1ed1i c\\%u1ea3nh\\>", "but": "Nh\\%u01b0ng\\>", "examples": "D\\%u1eef li\\%u1ec7u\\>", "feature": "T\\%u00ednh n\\%u0103ng\\>", "given": "Bi\\%u1ebft\\>\\|Cho\\>", "scenario": "T\\%u00ecnh hu\\%u1ed1ng\\>\\|K\\%u1ecbch b\\%u1ea3n\\>", "scenario_outline": "Khung t\\%u00ecnh hu\\%u1ed1ng\\>\\|Khung k\\%u1ecbch b\\%u1ea3n\\>", "then": "Th\\%u00ec\\>", "when": "Khi\\>"},
-      \"zh-CN": {"and": "\\%u800c\\%u4e14", "background": "\\%u80cc\\%u666f\\>", "but": "\\%u4f46\\%u662f", "examples": "\\%u4f8b\\%u5b50\\>", "feature": "\\%u529f\\%u80fd\\>", "given": "\\%u5047\\%u5982", "scenario": "\\%u573a\\%u666f\\>", "scenario_outline": "\\%u573a\\%u666f\\%u5927\\%u7eb2\\>", "then": "\\%u90a3\\%u4e48", "when": "\\%u5f53"},
-      \"zh-TW": {"and": "\\%u800c\\%u4e14\\|\\%u4e26\\%u4e14", "background": "\\%u80cc\\%u666f\\>", "but": "\\%u4f46\\%u662f", "examples": "\\%u4f8b\\%u5b50\\>", "feature": "\\%u529f\\%u80fd\\>", "given": "\\%u5047\\%u8a2d", "scenario": "\\%u5834\\%u666f\\>\\|\\%u5287\\%u672c\\>", "scenario_outline": "\\%u5834\\%u666f\\%u5927\\%u7db1\\>\\|\\%u5287\\%u672c\\%u5927\\%u7db1\\>", "then": "\\%u90a3\\%u9ebc", "when": "\\%u7576"}}
+      \"zh-CN": {"and": "\\%u800c\\%u4e14\\|\\%u5e76\\%u4e14\\|\\%u540c\\%u65f6", "background": "\\%u80cc\\%u666f\\>", "but": "\\%u4f46\\%u662f", "examples": "\\%u4f8b\\%u5b50\\>", "feature": "\\%u529f\\%u80fd\\>", "given": "\\%u5047\\%u5982\\|\\%u5047\\%u8bbe\\|\\%u5047\\%u5b9a", "scenario": "\\%u573a\\%u666f\\>\\|\\%u5267\\%u672c\\>", "scenario_outline": "\\%u573a\\%u666f\\%u5927\\%u7eb2\\>\\|\\%u5267\\%u672c\\%u5927\\%u7eb2\\>", "then": "\\%u90a3\\%u4e48", "when": "\\%u5f53"},
+      \"zh-TW": {"and": "\\%u800c\\%u4e14\\|\\%u4e26\\%u4e14\\|\\%u540c\\%u6642", "background": "\\%u80cc\\%u666f\\>", "but": "\\%u4f46\\%u662f", "examples": "\\%u4f8b\\%u5b50\\>", "feature": "\\%u529f\\%u80fd\\>", "given": "\\%u5047\\%u5982\\|\\%u5047\\%u8a2d\\|\\%u5047\\%u5b9a", "scenario": "\\%u5834\\%u666f\\>\\|\\%u5287\\%u672c\\>", "scenario_outline": "\\%u5834\\%u666f\\%u5927\\%u7db1\\>\\|\\%u5287\\%u672c\\%u5927\\%u7db1\\>", "then": "\\%u90a3\\%u9ebc", "when": "\\%u7576"}}
 
 function! s:pattern(key)
   let language = matchstr(getline(1),'#\s*language:\s*\zs\S\+')
@@ -73,13 +83,15 @@ function! s:pattern(key)
 endfunction
 
 function! s:Add(name)
-  let next = " skipempty skipwhite nextgroup=".join(map(["Region","AndRegion","ButRegion","Comment","Table"],'"cucumber".a:name.v:val'),",")
+  let next = " skipempty skipwhite nextgroup=".join(map(["Region","AndRegion","ButRegion","Comment","String","Table"],'"cucumber".a:name.v:val'),",")
   exe "syn region cucumber".a:name.'Region matchgroup=cucumber'.a:name.' start="\%(^\s*\)\@<=\%('.s:pattern(tolower(a:name)).'\)" end="$"'.next
   exe 'syn region cucumber'.a:name.'AndRegion matchgroup=cucumber'.a:name.'And start="\%(^\s*\)\@<='.s:pattern('and').'" end="$" contained'.next
   exe 'syn region cucumber'.a:name.'ButRegion matchgroup=cucumber'.a:name.'But start="\%(^\s*\)\@<='.s:pattern('but').'" end="$" contained'.next
   exe 'syn match cucumber'.a:name.'Comment "\%(^\s*\)\@<=#.*" contained'.next
+  exe 'syn region cucumber'.a:name.'String start=+\%(^\s*\)\@<="""+ end=+"""+ contained'.next
   exe 'syn match cucumber'.a:name.'Table "\%(^\s*\)\@<=|.*" contained contains=cucumberDelimiter'.next
   exe 'hi def link cucumber'.a:name.'Comment cucumberComment'
+  exe 'hi def link cucumber'.a:name.'String cucumberString'
   exe 'hi def link cucumber'.a:name.'But cucumber'.a:name.'And'
   exe 'hi def link cucumber'.a:name.'And cucumber'.a:name
   exe 'syn cluster cucumberStepRegions add=cucumber'.a:name.'Region,cucumber'.a:name.'AndRegion,cucumber'.a:name.'ButRegion'
@@ -99,9 +111,8 @@ exe 'syn match cucumberExamples "\%(^\s*\)\@<='.s:pattern('examples').':" nextgr
 
 syn match   cucumberPlaceholder   "<[^<>]*>" contained containedin=@cucumberStepRegions
 syn match   cucumberExampleTable  "\%(^\s*\)\@<=|.*" contains=cucumberDelimiter
-syn match   cucumberDelimiter     "|" contained
-syn match   cucumberTags          "\%(^\s*\)\@<=\%(@[^@[:space:]]\+\s\+\)*@[^@[:space:]]\+\s*$"
-syn region  cucumberString   start=+\%(^\s*\)\@<="""+ end=+"""+
+syn match   cucumberDelimiter     "\\\@
-" Last Change:  2012 Jan 11
-" Version:      0.24
+" Last Change:  2013 May 21
+" Version:      0.25
 "
 " Contributors:
-"   - Jason Mills : original Maintainer
+"   - Jason Mills: original Maintainer
 "   - Kirk McDonald
 "   - Tim Keating
 "   - Frank Benoit
-"   - Shougo Matsushita 
+"   - Shougo Matsushita
 "   - Ellery Newcomer
 "   - Steven N. Oliver
 "   - Sohgo Takeuchi
+"   - Robert Clipsham
 "
 " Please submit bugs/comments/suggestions to the github repo: 
-" https://github.com/he-the-great/d.vim
+" https://github.com/JesseKPhillips/d.vim
 "
 " Options:
 "   d_comment_strings - Set to highlight strings and numbers in comments.
@@ -40,7 +41,8 @@ let b:current_syntax = "d"
 
 " Keyword definitions
 "
-syn keyword dExternal              import module
+syn keyword dExternal              contained import module
+syn keyword dAssert                assert
 syn keyword dConditional           if else switch
 syn keyword dBranch                goto break continue
 syn keyword dRepeat                while for do foreach foreach_reverse
@@ -48,6 +50,7 @@ syn keyword dBoolean               true false
 syn keyword dConstant              null
 syn keyword dConstant              __FILE__ __LINE__ __EOF__ __VERSION__
 syn keyword dConstant              __DATE__ __TIME__ __TIMESTAMP__ __VENDOR__
+syn keyword dConstant              __MODULE__ __FUNCTION__ __PRETTY_FUNCTION__
 syn keyword dTypedef               alias typedef
 syn keyword dStructure             template interface class struct union
 syn keyword dEnum                  enum
@@ -58,7 +61,7 @@ if exists("d_hl_operator_overload")
   syn keyword dOpOverload          opSub opSub_r opMul opDiv opDiv_r opMod 
   syn keyword dOpOverload          opMod_r opAnd opOr opXor opShl opShl_r opShr
   syn keyword dOpOverload          opShr_r opUShr opUShr_r opCat
-  syn keyword dOpOverload          opCat_r opEquals opEquals opCmp
+  syn keyword dOpOverload          opCat_r opEquals opCmp
   syn keyword dOpOverload          opAssign opAddAssign opSubAssign opMulAssign
   syn keyword dOpOverload          opDivAssign opModAssign opAndAssign 
   syn keyword dOpOverload          opOrAssign opXorAssign opShlAssign 
@@ -73,7 +76,7 @@ if exists("d_hl_operator_overload")
 endif
 
 syn keyword dType                  byte ubyte short ushort int uint long ulong cent ucent
-syn keyword dType                  void bool bit
+syn keyword dType                  void bool Object
 syn keyword dType                  float double real
 syn keyword dType                  ushort int uint long ulong float
 syn keyword dType                  char wchar dchar string wstring dstring
@@ -94,22 +97,31 @@ syn keyword dDebug                 deprecated unittest invariant
 syn keyword dExceptions            throw try catch finally
 syn keyword dScopeDecl             public protected private export package 
 syn keyword dStatement             debug return with
-syn keyword dStatement             function delegate __ctfe mixin macro
-syn keyword dStorageClass          in out inout ref lazy body
-syn keyword dStorageClass          pure nothrow
+syn keyword dStatement             function delegate __ctfe mixin macro __simd
+syn keyword dStatement             in out body
+syn keyword dStorageClass          contained in out scope
+syn keyword dStorageClass          inout ref lazy pure nothrow
 syn keyword dStorageClass          auto static override final abstract volatile
-syn keyword dStorageClass          __gshared __thread
+syn keyword dStorageClass          __gshared __vector
 syn keyword dStorageClass          synchronized shared immutable const lazy
-syn keyword dPragma                pragma
-syn keyword dIdentifier            _arguments _argptr __vptr __monitor _ctor _dtor
+syn keyword dIdentifier            _arguments _argptr __vptr __monitor
+syn keyword dIdentifier             _ctor _dtor __argTypes __overloadset
 syn keyword dScopeIdentifier       contained exit success failure
-syn keyword dTraitsIdentifier      contained isAbstractClass isArithmetic isAssociativeArray
-syn keyword dTraitsIdentifier      contained isFinalClass isFloating isIntegral isScalar
-syn keyword dTraitsIdentifier      contained isStaticArray isUnsigned isVirtualFunction
-syn keyword dTraitsIdentifier      contained isAbstractFunction isFinalFunction isStaticFunction
-syn keyword dTraitsIdentifier      contained isRef isOut isLazy hasMember identifier getMember
-syn keyword dTraitsIdentifier      contained getOverloads getVirtualFunctions parent compiles
-syn keyword dTraitsIdentifier      contained classInstanceSize allMembers derivedMembers isSame
+syn keyword dTraitsIdentifier      contained isAbstractClass isArithmetic
+syn keyword dTraitsIdentifier      contained isAssociativeArray isFinalClass
+syn keyword dTraitsIdentifier      contained isPOD isNested isFloating
+syn keyword dTraitsIdentifier      contained isIntegral isScalar isStaticArray
+syn keyword dTraitsIdentifier      contained isUnsigned isVirtualFunction
+syn keyword dTraitsIdentifier      contained isVirtualMethod isAbstractFunction
+syn keyword dTraitsIdentifier      contained isFinalFunction isStaticFunction
+syn keyword dTraitsIdentifier      contained isRef isOut isLazy hasMember
+syn keyword dTraitsIdentifier      contained identifier getAttributes getMember
+syn keyword dTraitsIdentifier      contained getOverloads getProtection
+syn keyword dTraitsIdentifier      contained getVirtualFunctions
+syn keyword dTraitsIdentifier      contained getVirtualMethods parent
+syn keyword dTraitsIdentifier      contained classInstanceSize allMembers
+syn keyword dTraitsIdentifier      contained derivedMembers isSame compiles
+syn keyword dPragmaIdentifier      contained lib msg startaddress GNU_asm
 syn keyword dExternIdentifier      contained Windows Pascal Java System D
 syn keyword dAttribute             contained safe trusted system
 syn keyword dAttribute             contained property disable
@@ -124,6 +136,8 @@ syn keyword dVersionIdentifier     contained D_InlineAsm_X86 D_InlineAsm_X86_64
 syn keyword dVersionIdentifier     contained D_Version2 D_Coverage D_Ddoc D_LP64 D_PIC
 syn keyword dVersionIdentifier     contained unittest none all
 
+syn cluster dComment contains=dNestedComment,dBlockComment,dLineComment
+
 " Highlight the sharpbang
 syn match dSharpBang "\%^#!.*"     display
 
@@ -131,45 +145,42 @@ syn match dSharpBang "\%^#!.*"     display
 syn match dAnnotation	"@[_$a-zA-Z][_$a-zA-Z0-9_]*\>" contains=dAttribute
 
 " Version Identifiers
-syn match dVersion   "[^.]\"hs=s+1 nextgroup=dVersionInside
-syn match dVersion   "^\" nextgroup=dVersionInside
-syn match dVersionInside  "\s*([_a-zA-Z][_a-zA-Z0-9]*\>" transparent contained contains=dVersionIdentifier
+syn match dVersion      "\"
+syn match dVersion      "\"he=s+7 contains=dVersionIdentifier
 
-" Scope StorageClass
-syn match dStorageClass   "\"
+" Scope Identifiers
+syn match dStatement    "\"
+syn match dStatement    "\"he=s+5 contains=dScopeIdentifier
 
-" Traits Expression
+" Traits Statement
 syn match dStatement    "\<__traits\>"
+syn match dStatement    "\<__traits\s*([_a-zA-Z][_a-zA-Z0-9]*\>"he=s+8 contains=dTraitsIdentifier
 
-" Extern Modifier
-syn match dExternal     "\"
-
-" Scope Identifiers
-syn match dScope	"\"he=s+5 contains=dScopeIdentifier
-
-" Traits Identifiers
-syn match dTraits       "\<__traits\s*([_a-zA-Z][_a-zA-Z0-9]*\>"he=s+8 contains=dTraitsIdentifier
+" Pragma Statement
+syn match dPragma       "\"
+syn match dPragma       "\"he=s+8 contains=dPragmaIdentifier
 
 " Necessary to highlight C++ in extern modifiers.
 syn match dExternIdentifier "C\(++\)\?" contained
 
 " Extern Identifiers
+syn match dExternal     "\"
 syn match dExtern       "\"he=s+6 contains=dExternIdentifier
 
-" String is a statement and a module name.
-syn match dType "[^.]\"ms=s+1
-syn match dType "^\"
+" Make import a region to prevent highlighting keywords
+syn region dImport start="import" end=";" contains=dExternal,@dComment
 
-" Assert is a statement and a module name.
-syn match dAssert "[^.]\"ms=s+1
-syn match dAssert "^\"
+" Make module a region to prevent highlighting keywords
+syn region dImport start="module" end=";" contains=dExternal,@dComment
 
 " dTokens is used by the token string highlighting
 syn cluster dTokens contains=dExternal,dConditional,dBranch,dRepeat,dBoolean
 syn cluster dTokens add=dConstant,dTypedef,dStructure,dOperator,dOpOverload
 syn cluster dTokens add=dType,dDebug,dExceptions,dScopeDecl,dStatement
-syn cluster dTokens add=dStorageClass,dPragma,dAssert,dAnnotation
+syn cluster dTokens add=dStorageClass,dPragma,dAssert,dAnnotation,dEnum
 
+" Create a match for parameter lists to identify storage class
+syn region paramlist start="(" end=")" contains=@dTokens
 
 " Labels
 "
@@ -358,146 +369,192 @@ hi def link dLineComment         Comment
 hi def link dBlockComment        Comment
 hi def link dNestedComment       Comment
 hi def link dExternal            Include
-hi def link dPragma              PreProc
 hi def link dAnnotation          PreProc
 hi def link dSharpBang           PreProc
 hi def link dAttribute           StorageClass
 hi def link dIdentifier          Identifier
 hi def link dVersion             dStatement
 hi def link dVersionIdentifier   Identifier
-hi def link dScope               dStorageClass
 hi def link dScopeIdentifier     Identifier
-hi def link dTraits              dStatement
 hi def link dTraitsIdentifier    Identifier
+hi def link dPragma              PreProc
+hi def link dPragmaIdentifier    Identifier
 hi def link dExtern              dExternal
 hi def link dExternIdentifier    Identifier
 
 " Marks contents of the asm statment body as special
 
 syn match dAsmStatement "\"
-syn region dAsmBody start="asm[\n]*\s*{"hs=e+1 end="}"he=e-1 contains=dAsmStatement,dAsmOpCode
+syn region dAsmBody start="asm[\n]*\s*{"hs=e+1 end="}"he=e-1 contains=dAsmStatement,dAsmOpCode,@dComment,DUserLabel
 
 hi def link dAsmBody dUnicode
 hi def link dAsmStatement dStatement
 hi def link dAsmOpCode Identifier
 
-syn keyword dAsmOpCode contained	aaa  	aad  	aam  	aas  	adc
-syn keyword dAsmOpCode contained	add 	addpd 	addps 	addsd 	addss
-syn keyword dAsmOpCode contained	and 	andnpd 	andnps 	andpd 	andps
-syn keyword dAsmOpCode contained	arpl 	bound 	bsf 	bsr 	bswap
-syn keyword dAsmOpCode contained	bt 	btc 	btr 	bts 	call
-syn keyword dAsmOpCode contained	cbw 	cdq 	clc 	cld 	clflush
-syn keyword dAsmOpCode contained	cli 	clts 	cmc 	cmova 	cmovae
-syn keyword dAsmOpCode contained	cmovb 	cmovbe 	cmovc 	cmove 	cmovg
-syn keyword dAsmOpCode contained	cmovge 	cmovl 	cmovle 	cmovna 	cmovnae
-syn keyword dAsmOpCode contained	cmovnb 	cmovnbe 	cmovnc 	cmovne 	cmovng
-syn keyword dAsmOpCode contained	cmovnge 	cmovnl 	cmovnle 	cmovno 	cmovnp
-syn keyword dAsmOpCode contained	cmovns 	cmovnz 	cmovo 	cmovp 	cmovpe
-syn keyword dAsmOpCode contained	cmovpo 	cmovs 	cmovz 	cmp 	cmppd
-syn keyword dAsmOpCode contained	cmpps 	cmps 	cmpsb 	cmpsd 	cmpss
-syn keyword dAsmOpCode contained	cmpsw 	cmpxch8b 	cmpxchg 	comisd 	comiss
-syn keyword dAsmOpCode contained	cpuid 	cvtdq2pd 	cvtdq2ps 	cvtpd2dq 	cvtpd2pi
-syn keyword dAsmOpCode contained	cvtpd2ps 	cvtpi2pd 	cvtpi2ps 	cvtps2dq 	cvtps2pd
-syn keyword dAsmOpCode contained	cvtps2pi 	cvtsd2si 	cvtsd2ss 	cvtsi2sd 	cvtsi2ss
-syn keyword dAsmOpCode contained	cvtss2sd 	cvtss2si 	cvttpd2dq 	cvttpd2pi 	cvttps2dq
-syn keyword dAsmOpCode contained	cvttps2pi 	cvttsd2si 	cvttss2si 	cwd 	cwde
-syn keyword dAsmOpCode contained	da 	daa 	das 	db 	dd
-syn keyword dAsmOpCode contained	de 	dec 	df 	di 	div
-syn keyword dAsmOpCode contained	divpd 	divps 	divsd 	divss 	dl
-syn keyword dAsmOpCode contained	dq 	ds 	dt 	dw 	emms
-syn keyword dAsmOpCode contained	enter 	f2xm1 	fabs 	fadd 	faddp
-syn keyword dAsmOpCode contained	fbld 	fbstp 	fchs 	fclex 	fcmovb
-syn keyword dAsmOpCode contained	fcmovbe 	fcmove 	fcmovnb 	fcmovnbe 	fcmovne
-syn keyword dAsmOpCode contained	fcmovnu 	fcmovu 	fcom 	fcomi 	fcomip
-syn keyword dAsmOpCode contained	fcomp 	fcompp 	fcos 	fdecstp 	fdisi
-syn keyword dAsmOpCode contained	fdiv 	fdivp 	fdivr 	fdivrp 	feni
-syn keyword dAsmOpCode contained	ffree 	fiadd 	ficom 	ficomp 	fidiv
-syn keyword dAsmOpCode contained	fidivr 	fild 	fimul 	fincstp 	finit
-syn keyword dAsmOpCode contained	fist 	fistp 	fisub 	fisubr 	fld
-syn keyword dAsmOpCode contained	fld1 	fldcw 	fldenv 	fldl2e 	fldl2t
-syn keyword dAsmOpCode contained	fldlg2 	fldln2 	fldpi 	fldz 	fmul
-syn keyword dAsmOpCode contained	fmulp 	fnclex 	fndisi 	fneni 	fninit
-syn keyword dAsmOpCode contained	fnop 	fnsave 	fnstcw 	fnstenv 	fnstsw
-syn keyword dAsmOpCode contained	fpatan 	fprem 	fprem1 	fptan 	frndint
-syn keyword dAsmOpCode contained	frstor 	fsave 	fscale 	fsetpm 	fsin
-syn keyword dAsmOpCode contained	fsincos 	fsqrt 	fst 	fstcw 	fstenv
-syn keyword dAsmOpCode contained	fstp 	fstsw 	fsub 	fsubp 	fsubr
-syn keyword dAsmOpCode contained	fsubrp 	ftst 	fucom 	fucomi 	fucomip
-syn keyword dAsmOpCode contained	fucomp 	fucompp 	fwait 	fxam 	fxch
-syn keyword dAsmOpCode contained	fxrstor 	fxsave 	fxtract 	fyl2x 	fyl2xp1
-syn keyword dAsmOpCode contained	hlt 	idiv 	imul 	in 	inc
-syn keyword dAsmOpCode contained	ins 	insb 	insd 	insw 	int
-syn keyword dAsmOpCode contained	into 	invd 	invlpg 	iret 	iretd
-syn keyword dAsmOpCode contained	ja 	jae 	jb 	jbe 	jc
-syn keyword dAsmOpCode contained	jcxz 	je 	jecxz 	jg 	jge
-syn keyword dAsmOpCode contained	jl 	jle 	jmp 	jna 	jnae
-syn keyword dAsmOpCode contained	jnb 	jnbe 	jnc 	jne 	jng
-syn keyword dAsmOpCode contained	jnge 	jnl 	jnle 	jno 	jnp
-syn keyword dAsmOpCode contained	jns 	jnz 	jo 	jp 	jpe
-syn keyword dAsmOpCode contained	jpo 	js 	jz 	lahf 	lar
-syn keyword dAsmOpCode contained	ldmxcsr 	lds 	lea 	leave 	les
-syn keyword dAsmOpCode contained	lfence 	lfs 	lgdt 	lgs 	lidt
-syn keyword dAsmOpCode contained	lldt 	lmsw 	lock 	lods 	lodsb
-syn keyword dAsmOpCode contained	lodsd 	lodsw 	loop 	loope 	loopne
-syn keyword dAsmOpCode contained	loopnz 	loopz 	lsl 	lss 	ltr
-syn keyword dAsmOpCode contained	maskmovdqu 	maskmovq 	maxpd 	maxps 	maxsd
-syn keyword dAsmOpCode contained	maxss 	mfence 	minpd 	minps 	minsd
-syn keyword dAsmOpCode contained	minss 	mov 	movapd 	movaps 	movd
-syn keyword dAsmOpCode contained	movdq2q 	movdqa 	movdqu 	movhlps 	movhpd
-syn keyword dAsmOpCode contained	movhps 	movlhps 	movlpd 	movlps 	movmskpd
-syn keyword dAsmOpCode contained	movmskps 	movntdq 	movnti 	movntpd 	movntps
-syn keyword dAsmOpCode contained	movntq 	movq 	movq2dq 	movs 	movsb
-syn keyword dAsmOpCode contained	movsd 	movss 	movsw 	movsx 	movupd
-syn keyword dAsmOpCode contained	movups 	movzx 	mul 	mulpd 	mulps
-syn keyword dAsmOpCode contained	mulsd 	mulss 	neg 	nop 	not
-syn keyword dAsmOpCode contained	or 	orpd 	orps 	out 	outs
-syn keyword dAsmOpCode contained	outsb 	outsd 	outsw 	packssdw 	packsswb
-syn keyword dAsmOpCode contained	packuswb 	paddb 	paddd 	paddq 	paddsb
-syn keyword dAsmOpCode contained	paddsw 	paddusb 	paddusw 	paddw 	pand
-syn keyword dAsmOpCode contained	pandn 	pavgb 	pavgw 	pcmpeqb 	pcmpeqd
-syn keyword dAsmOpCode contained	pcmpeqw 	pcmpgtb 	pcmpgtd 	pcmpgtw 	pextrw
-syn keyword dAsmOpCode contained	pinsrw 	pmaddwd 	pmaxsw 	pmaxub 	pminsw
-syn keyword dAsmOpCode contained	pminub 	pmovmskb 	pmulhuw 	pmulhw 	pmullw
-syn keyword dAsmOpCode contained	pmuludq 	pop 	popa 	popad 	popf
-syn keyword dAsmOpCode contained	popfd 	por 	prefetchnta 	prefetcht0 	prefetcht1
-syn keyword dAsmOpCode contained	prefetcht2 	psadbw 	pshufd 	pshufhw 	pshuflw
-syn keyword dAsmOpCode contained	pshufw 	pslld 	pslldq 	psllq 	psllw
-syn keyword dAsmOpCode contained	psrad 	psraw 	psrld 	psrldq 	psrlq
-syn keyword dAsmOpCode contained	psrlw 	psubb 	psubd 	psubq 	psubsb
-syn keyword dAsmOpCode contained	psubsw 	psubusb 	psubusw 	psubw 	punpckhbw
-syn keyword dAsmOpCode contained	punpckhdq 	punpckhqdq 	punpckhwd 	punpcklbw 	punpckldq
-syn keyword dAsmOpCode contained	punpcklqdq 	punpcklwd 	push 	pusha 	pushad
-syn keyword dAsmOpCode contained	pushf 	pushfd 	pxor 	rcl 	rcpps
-syn keyword dAsmOpCode contained	rcpss 	rcr 	rdmsr 	rdpmc 	rdtsc
-syn keyword dAsmOpCode contained	rep 	repe 	repne 	repnz 	repz
-syn keyword dAsmOpCode contained	ret 	retf 	rol 	ror 	rsm
-syn keyword dAsmOpCode contained	rsqrtps 	rsqrtss 	sahf 	sal 	sar
-syn keyword dAsmOpCode contained	sbb 	scas 	scasb 	scasd 	scasw
-syn keyword dAsmOpCode contained	seta 	setae 	setb 	setbe 	setc
-syn keyword dAsmOpCode contained	sete 	setg 	setge 	setl 	setle
-syn keyword dAsmOpCode contained	setna 	setnae 	setnb 	setnbe 	setnc
-syn keyword dAsmOpCode contained	setne 	setng 	setnge 	setnl 	setnle
-syn keyword dAsmOpCode contained	setno 	setnp 	setns 	setnz 	seto
-syn keyword dAsmOpCode contained	setp 	setpe 	setpo 	sets 	setz
-syn keyword dAsmOpCode contained	sfence 	sgdt 	shl 	shld 	shr
-syn keyword dAsmOpCode contained	shrd 	shufpd 	shufps 	sidt 	sldt
-syn keyword dAsmOpCode contained	smsw 	sqrtpd 	sqrtps 	sqrtsd 	sqrtss
-syn keyword dAsmOpCode contained	stc 	std 	sti 	stmxcsr 	stos
-syn keyword dAsmOpCode contained	stosb 	stosd 	stosw 	str 	sub
-syn keyword dAsmOpCode contained	subpd 	subps 	subsd 	subss 	sysenter
-syn keyword dAsmOpCode contained	sysexit 	test 	ucomisd 	ucomiss 	ud2
-syn keyword dAsmOpCode contained	unpckhpd 	unpckhps 	unpcklpd 	unpcklps 	verr
-syn keyword dAsmOpCode contained	verw 	wait 	wbinvd 	wrmsr 	xadd
-syn keyword dAsmOpCode contained	xchg 	xlat 	xlatb 	xor 	xorpd
-syn keyword dAsmOpCode contained	xorps 				
-syn keyword dAsmOpCode contained	addsubpd 	addsubps 	fisttp 	haddpd 	haddps
-syn keyword dAsmOpCode contained	hsubpd 	hsubps 	lddqu 	monitor 	movddup
-syn keyword dAsmOpCode contained	movshdup 	movsldup 	mwait 		
-syn keyword dAsmOpCode contained	pavgusb 	pf2id 	pfacc 	pfadd 	pfcmpeq
-syn keyword dAsmOpCode contained	pfcmpge 	pfcmpgt 	pfmax 	pfmin 	pfmul
-syn keyword dAsmOpCode contained	pfnacc 	pfpnacc 	pfrcp 	pfrcpit1 	pfrcpit2
-syn keyword dAsmOpCode contained	pfrsqit1 	pfrsqrt 	pfsub 	pfsubr 	pi2fd
-syn keyword dAsmOpCode contained	pmulhrw 	pswapd
+syn keyword dAsmOpCode contained	aaa		aad		aam		aas
+syn keyword dAsmOpCode contained	add		addpd		addps		addsd
+syn keyword dAsmOpCode contained	and		andnpd		andnps		andpd
+syn keyword dAsmOpCode contained	arpl		bound		bsf		bsr
+syn keyword dAsmOpCode contained	bt		btc		btr		bts
+syn keyword dAsmOpCode contained	call		bswap		andps		addss
+syn keyword dAsmOpCode contained	cbw		cdq		clc		cld
+syn keyword dAsmOpCode contained	cli		clts		cmc		cmova
+syn keyword dAsmOpCode contained	cmovb		cmovbe		cmovc		cmove
+syn keyword dAsmOpCode contained	cmovge		cmovl		cmovle		cmovna
+syn keyword dAsmOpCode contained	cmovnae		cmovg		cmovae		clflush
+syn keyword dAsmOpCode contained	cmovnb		cmovnbe		cmovnc		cmovne
+syn keyword dAsmOpCode contained	cmovnge		cmovnl		cmovnle		cmovno
+syn keyword dAsmOpCode contained	cmovns		cmovnz		cmovo		cmovp
+syn keyword dAsmOpCode contained	cmovpo		cmovs		cmovz		cmp
+syn keyword dAsmOpCode contained	cmppd		cmovpe		cmovnp		cmovng
+syn keyword dAsmOpCode contained	cmpps		cmps		cmpsb		cmpsd
+syn keyword dAsmOpCode contained	cmpsw		cmpxch8b	cmpxchg		comisd
+syn keyword dAsmOpCode contained	cpuid		cvtdq2pd	cvtdq2ps	cvtpd2dq
+syn keyword dAsmOpCode contained	cvtpd2ps	cvtpi2pd	cvtpi2ps	cvtps2dq
+syn keyword dAsmOpCode contained	cvtps2pd	cvtpd2pi	comiss		cmpss
+syn keyword dAsmOpCode contained	cvtps2pi	cvtsd2si	cvtsd2ss	cvtsi2sd
+syn keyword dAsmOpCode contained	cvtss2sd	cvtss2si	cvttpd2dq	cvttpd2pi
+syn keyword dAsmOpCode contained	cvttps2pi	cvttsd2si	cvttss2si	cwd
+syn keyword dAsmOpCode contained	da		daa		das		db
+syn keyword dAsmOpCode contained	dd		cwde		cvttps2dq	cvtsi2ss
+syn keyword dAsmOpCode contained	de		dec		df		di
+syn keyword dAsmOpCode contained	divpd		divps		divsd		divss
+syn keyword dAsmOpCode contained	dq		ds		dt		dw
+syn keyword dAsmOpCode contained	enter		f2xm1		fabs		fadd
+syn keyword dAsmOpCode contained	faddp		emms		dl		div
+syn keyword dAsmOpCode contained	fbld		fbstp		fchs		fclex
+syn keyword dAsmOpCode contained	fcmovbe		fcmove		fcmovnb		fcmovnbe
+syn keyword dAsmOpCode contained	fcmovnu		fcmovu		fcom		fcomi
+syn keyword dAsmOpCode contained	fcomp		fcompp		fcos		fdecstp
+syn keyword dAsmOpCode contained	fdisi		fcomip		fcmovne		fcmovb
+syn keyword dAsmOpCode contained	fdiv		fdivp		fdivr		fdivrp
+syn keyword dAsmOpCode contained	ffree		fiadd		ficom		ficomp
+syn keyword dAsmOpCode contained	fidivr		fild		fimul		fincstp
+syn keyword dAsmOpCode contained	fist		fistp		fisub		fisubr
+syn keyword dAsmOpCode contained	fld		finit		fidiv		feni
+syn keyword dAsmOpCode contained	fld1		fldcw		fldenv		fldl2e
+syn keyword dAsmOpCode contained	fldlg2		fldln2		fldpi		fldz
+syn keyword dAsmOpCode contained	fmulp		fnclex		fndisi		fneni
+syn keyword dAsmOpCode contained	fnop		fnsave		fnstcw		fnstenv
+syn keyword dAsmOpCode contained	fnstsw		fninit		fmul		fldl2t
+syn keyword dAsmOpCode contained	fpatan		fprem		fprem1		fptan
+syn keyword dAsmOpCode contained	frstor		fsave		fscale		fsetpm
+syn keyword dAsmOpCode contained	fsincos		fsqrt		fst		fstcw
+syn keyword dAsmOpCode contained	fstp		fstsw		fsub		fsubp
+syn keyword dAsmOpCode contained	fsubr		fstenv		fsin		frndint
+syn keyword dAsmOpCode contained	fsubrp		ftst		fucom		fucomi
+syn keyword dAsmOpCode contained	fucomp		fucompp		fwait		fxam
+syn keyword dAsmOpCode contained	fxrstor		fxsave		fxtract		fyl2x
+syn keyword dAsmOpCode contained	hlt		idiv		imul		in
+syn keyword dAsmOpCode contained	inc		fyl2xp1		fxch		fucomip
+syn keyword dAsmOpCode contained	ins		insb		insd		insw
+syn keyword dAsmOpCode contained	into		invd		invlpg		iret
+syn keyword dAsmOpCode contained	ja		jae		jb		jbe
+syn keyword dAsmOpCode contained	jcxz		je		jecxz		jg
+syn keyword dAsmOpCode contained	jge		jc		iretd		int
+syn keyword dAsmOpCode contained	jl		jle		jmp		jna
+syn keyword dAsmOpCode contained	jnb		jnbe		jnc		jne
+syn keyword dAsmOpCode contained	jnge		jnl		jnle		jno
+syn keyword dAsmOpCode contained	jns		jnz		jo		jp
+syn keyword dAsmOpCode contained	jpe		jnp		jng		jnae
+syn keyword dAsmOpCode contained	jpo		js		jz		lahf
+syn keyword dAsmOpCode contained	ldmxcsr		lds		lea		leave
+syn keyword dAsmOpCode contained	lfence		lfs		lgdt		lgs
+syn keyword dAsmOpCode contained	lldt		lmsw		lock		lods
+syn keyword dAsmOpCode contained	lodsb		lidt		les		lar
+syn keyword dAsmOpCode contained	lodsd		lodsw		loop		loope
+syn keyword dAsmOpCode contained	loopnz		loopz		lsl		lss
+syn keyword dAsmOpCode contained	maskmovdqu	maskmovq	maxpd		maxps
+syn keyword dAsmOpCode contained	maxss		mfence		minpd		minps
+syn keyword dAsmOpCode contained	minsd		maxsd		ltr		loopne
+syn keyword dAsmOpCode contained	minss		mov		movapd		movaps
+syn keyword dAsmOpCode contained	movdq2q		movdqa		movdqu		movhlps
+syn keyword dAsmOpCode contained	movhps		movlhps		movlpd		movlps
+syn keyword dAsmOpCode contained	movmskps	movntdq		movnti		movntpd
+syn keyword dAsmOpCode contained	movntps		movmskpd	movhpd		movd
+syn keyword dAsmOpCode contained	movntq		movq		movq2dq		movs
+syn keyword dAsmOpCode contained	movsd		movss		movsw		movsx
+syn keyword dAsmOpCode contained	movups		movzx		mul		mulpd
+syn keyword dAsmOpCode contained	mulsd		mulss		neg		nop
+syn keyword dAsmOpCode contained	not		mulps		movupd		movsb
+syn keyword dAsmOpCode contained	or		orpd		orps		out
+syn keyword dAsmOpCode contained	outsb		outsd		outsw		packssdw
+syn keyword dAsmOpCode contained	packuswb	paddb		paddd		paddq
+syn keyword dAsmOpCode contained	paddsw		paddusb		paddusw		paddw
+syn keyword dAsmOpCode contained	pand		paddsb		packsswb	outs
+syn keyword dAsmOpCode contained	pandn		pavgb		pavgw		pcmpeqb
+syn keyword dAsmOpCode contained	pcmpeqw		pcmpgtb		pcmpgtd		pcmpgtw
+syn keyword dAsmOpCode contained	pinsrw		pmaddwd		pmaxsw		pmaxub
+syn keyword dAsmOpCode contained	pminub		pmovmskb	pmulhuw		pmulhw
+syn keyword dAsmOpCode contained	pmullw		pminsw		pextrw		pcmpeqd
+syn keyword dAsmOpCode contained	pmuludq		pop		popa		popad
+syn keyword dAsmOpCode contained	popfd		por		prefetchnta	prefetcht0
+syn keyword dAsmOpCode contained	prefetcht2	psadbw		pshufd		pshufhw
+syn keyword dAsmOpCode contained	pshufw		pslld		pslldq		psllq
+syn keyword dAsmOpCode contained	psllw		pshuflw		prefetcht1	popf
+syn keyword dAsmOpCode contained	psrad		psraw		psrld		psrldq
+syn keyword dAsmOpCode contained	psrlw		psubb		psubd		psubq
+syn keyword dAsmOpCode contained	psubsw		psubusb		psubusw		psubw
+syn keyword dAsmOpCode contained	punpckhdq	punpckhqdq	punpckhwd	punpcklbw
+syn keyword dAsmOpCode contained	punpckldq	punpckhbw	psubsb		psrlq
+syn keyword dAsmOpCode contained	punpcklqdq	punpcklwd	push		pusha
+syn keyword dAsmOpCode contained	pushf		pushfd		pxor		rcl
+syn keyword dAsmOpCode contained	rcpss		rcr		rdmsr		rdpmc
+syn keyword dAsmOpCode contained	rep		repe		repne		repnz
+syn keyword dAsmOpCode contained	repz		rdtsc		rcpps		pushad
+syn keyword dAsmOpCode contained	ret		retf		rol		ror
+syn keyword dAsmOpCode contained	rsqrtps		rsqrtss		sahf		sal
+syn keyword dAsmOpCode contained	sbb		scas		scasb		scasd
+syn keyword dAsmOpCode contained	seta		setae		setb		setbe
+syn keyword dAsmOpCode contained	setc		scasw		sar		rsm
+syn keyword dAsmOpCode contained	sete		setg		setge		setl
+syn keyword dAsmOpCode contained	setna		setnae		setnb		setnbe
+syn keyword dAsmOpCode contained	setne		setng		setnge		setnl
+syn keyword dAsmOpCode contained	setno		setnp		setns		setnz
+syn keyword dAsmOpCode contained	seto		setnle		setnc		setle
+syn keyword dAsmOpCode contained	setp		setpe		setpo		sets
+syn keyword dAsmOpCode contained	sfence		sgdt		shl		shld
+syn keyword dAsmOpCode contained	shrd		shufpd		shufps		sidt
+syn keyword dAsmOpCode contained	smsw		sqrtpd		sqrtps		sqrtsd
+syn keyword dAsmOpCode contained	sqrtss		sldt		shr		setz
+syn keyword dAsmOpCode contained	stc		std		sti		stmxcsr
+syn keyword dAsmOpCode contained	stosb		stosd		stosw		str
+syn keyword dAsmOpCode contained	subpd		subps		subsd		subss
+syn keyword dAsmOpCode contained	sysexit		test		ucomisd		ucomiss
+syn keyword dAsmOpCode contained	ud2		sysenter	sub		stos
+syn keyword dAsmOpCode contained	unpckhpd	unpckhps	unpcklpd	unpcklps
+syn keyword dAsmOpCode contained	verw		wbinvd		wrmsr		xadd
+syn keyword dAsmOpCode contained	xchg		xlatb		xor		xorpd
+syn keyword dAsmOpCode contained	xorps		pfrcpit1	pfmin		movddup
+syn keyword dAsmOpCode contained	addsubpd	addsubps	fisttp		haddps
+syn keyword dAsmOpCode contained	hsubpd		hsubps		lddqu		monitor
+syn keyword dAsmOpCode contained	haddpd		xlat		wait		verr
+syn keyword dAsmOpCode contained	movshdup	movsldup	mwait		pfcmpeq
+syn keyword dAsmOpCode contained	pavgusb		pf2id		pfacc		pfadd
+syn keyword dAsmOpCode contained	pfcmpge		pfcmpgt		pfmax		pfmul
+syn keyword dAsmOpCode contained	pfnacc		pfpnacc		pfrcp		pfrcpit1
+syn keyword dAsmOpCode contained	pfrsqit1	pfrsqrt		pfsub		pfsubr
+syn keyword dAsmOpCode contained	pmulhrw 	pswapd		syscall		sysret
+syn keyword dAsmOpCode contained	vpmuldq		xgetbv		cmpxchg8b	cmpxchg16b
+syn keyword dAsmOpCode contained	pabsb		pabsd		pabsw		palignr
+syn keyword dAsmOpCode contained	phaddd		phaddsw		phaddw		phsubd
+syn keyword dAsmOpCode contained	phsubsw		phsubw		pmaddubsw	pmulhrsw
+syn keyword dAsmOpCode contained	pshufb		psignb		psignd		psignw
+syn keyword dAsmOpCode contained	popfq		pushfq		blendpd		blendps
+syn keyword dAsmOpCode contained	blendvpd	blendvps	extractps	insertps
+syn keyword dAsmOpCode contained	movntdqa	mpsadbw		packusdw	pblendvb
+syn keyword dAsmOpCode contained	pblendw		pcmpeqq		pextrb		pextrd
+syn keyword dAsmOpCode contained	pextrq		phminposuw	pinsrb		pinsrd
+syn keyword dAsmOpCode contained	pinsrq		pmaxsb		pmaxsd		pmaxud
+syn keyword dAsmOpCode contained	pmaxuw		pminsb		pminsd		pminud
+syn keyword dAsmOpCode contained	pminuw		pmulld		ptest		roundpd
+syn keyword dAsmOpCode contained	roundps		roundsd		roundss		pmuldq
+syn keyword dAsmOpCode contained	pmovsxbd	pmovsxdq	pmovzxbq	pmovzxdq
+syn keyword dAsmOpCode contained	pmovsxbq	pmovsxwd	pmovzxbq	pmovzxwd
+syn keyword dAsmOpCode contained	pmovsxbw	pmovsxwq	pmovzxbw	pmovzxwq
+syn keyword dAsmOpCode contained	crc32		pcmpestri	pcmpestrm	pcmpgtq
+syn keyword dAsmOpCode contained	pcmpistri	pcmpistrm	popcnt		pi2fd
+syn keyword dAsmOpCode contained	adc
 
 let &cpo = s:cpo_save
 unlet s:cpo_save
diff --git a/runtime/syntax/debchangelog.vim b/runtime/syntax/debchangelog.vim
index 4ccb7658d7..b1d7a31390 100644
--- a/runtime/syntax/debchangelog.vim
+++ b/runtime/syntax/debchangelog.vim
@@ -3,7 +3,7 @@
 " Maintainer:  Debian Vim Maintainers 
 " Former Maintainers: Gerfried Fuchs 
 "                     Wichert Akkerman 
-" Last Change: 2012 April 29
+" Last Change: 2013 May 05
 " URL: http://anonscm.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/debchangelog.vim
 
 " Standard syntax initialization
@@ -19,7 +19,7 @@ syn case ignore
 " Define some common expressions we can use later on
 syn match debchangelogName	contained "^[[:alnum:]][[:alnum:].+-]\+ "
 syn match debchangelogUrgency	contained "; urgency=\(low\|medium\|high\|critical\|emergency\)\( \S.*\)\="
-syn match debchangelogTarget	contained "\v %(frozen|unstable|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|%(squeeze)-%(backports%(-sloppy)=|volatile)|%(hardy|lucid|natty|oneiric|precise|quantal)%(-%(security|proposed|updates|backports|commercial|partner))=)+"
+syn match debchangelogTarget	contained "\v %(frozen|unstable|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile)|wheezy-backports|%(lucid|precise|quantal|raring|saucy)%(-%(security|proposed|updates|backports|commercial|partner))=)+"
 syn match debchangelogVersion	contained "(.\{-})"
 syn match debchangelogCloses	contained "closes:\_s*\(bug\)\=#\=\_s\=\d\+\(,\_s*\(bug\)\=#\=\_s\=\d\+\)*"
 syn match debchangelogLP	contained "\clp:\s\+#\d\+\(,\s*#\d\+\)*"
diff --git a/runtime/syntax/debcontrol.vim b/runtime/syntax/debcontrol.vim
index 7875b3c977..3ca17a86e9 100644
--- a/runtime/syntax/debcontrol.vim
+++ b/runtime/syntax/debcontrol.vim
@@ -3,7 +3,7 @@
 " Maintainer:  Debian Vim Maintainers 
 " Former Maintainers: Gerfried Fuchs 
 "                     Wichert Akkerman 
-" Last Change: 2011 Dec 09
+" Last Change: 2013 May 05
 " URL: http://anonscm.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/debcontrol.vim
 
 " Standard syntax initialization
@@ -38,19 +38,21 @@ syn match debcontrolDmUpload contained "\cyes"
 syn match debcontrolHTTPUrl contained "\vhttps?://[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?(:\d+)?(/[^[:space:]]*)?$"
 syn match debcontrolVcsSvn contained "\vsvn%(\+ssh)?://[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?(:\d+)?(/[^[:space:]]*)?$"
 syn match debcontrolVcsCvs contained "\v%(\-d *)?:pserver:[^@]+\@[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?:/[^[:space:]]*%( [^[:space:]]+)?$"
-syn match debcontrolVcsGit contained "\v%(git|http)://[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?(:\d+)?(/[^[:space:]]*)?$"
+syn match debcontrolVcsGit contained "\v%(git|http)://[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?(:\d+)?(/[^[:space:]]*)?%(\s+-b\s+[^ ~^:?*[\\]+)?$"
 
 " An email address
 syn match	debcontrolEmail	"[_=[:alnum:]\.+-]\+@[[:alnum:]\./\-]\+"
 syn match	debcontrolEmail	"<.\{-}>"
 
 " #-Comments
-syn match debcontrolComment "^#.*$"
+syn match debcontrolComment "^#.*$" contains=@Spell
 
 syn case ignore
 
 " List of all legal keys
-syn match debcontrolKey contained "^\%(Source\|Package\|Section\|Priority\|\%(XSBC-Original-\)\=Maintainer\|Uploaders\|Build-\%(Conflicts\|Depends\)\%(-Indep\)\=\|Standards-Version\|\%(Pre-\)\=Depends\|Recommends\|Suggests\|Provides\|Replaces\|Conflicts\|Enhances\|Breaks\|Essential\|Architecture\|Multi-Arch\|Description\|Bugs\|Origin\|X[SB]-Python-Version\|Homepage\|\(XS-\)\=Vcs-\(Browser\|Arch\|Bzr\|Cvs\|Darcs\|Git\|Hg\|Mtn\|Svn\)\|\%(XC-\)\=Package-Type\|\%(XS-\)\=DM-Upload-Allowed\): *"
+syn match debcontrolKey contained "^\%(Source\|Package\|Section\|Priority\|\%(XSBC-Original-\)\=Maintainer\|Uploaders\|Build-\%(Conflicts\|Depends\)\%(-Indep\)\=\|Standards-Version\|\%(Pre-\)\=Depends\|Recommends\|Suggests\|Provides\|Replaces\|Conflicts\|Enhances\|Breaks\|Essential\|Architecture\|Multi-Arch\|Description\|Bugs\|Origin\|X[SB]-Python-Version\|Homepage\|\(XS-\)\=Vcs-\(Browser\|Arch\|Bzr\|Cvs\|Darcs\|Git\|Hg\|Mtn\|Svn\)\|\%(XC-\)\=Package-Type\): *"
+
+syn match debcontrolDeprecatedKey contained "^\%(\%(XS-\)\=DM-Upload-Allowed\): *"
 
 " Fields for which we do strict syntax checking
 syn region debcontrolStrictField start="^Architecture" end="$" contains=debcontrolKey,debcontrolArchitecture,debcontrolSpace oneline
@@ -64,11 +66,12 @@ syn region debcontrolStrictField start="^\%(XS-\)\=Vcs-\%(Browser\|Arch\|Bzr\|Da
 syn region debcontrolStrictField start="^\%(XS-\)\=Vcs-Svn" end="$" contains=debcontrolKey,debcontrolVcsSvn,debcontrolHTTPUrl oneline keepend
 syn region debcontrolStrictField start="^\%(XS-\)\=Vcs-Cvs" end="$" contains=debcontrolKey,debcontrolVcsCvs oneline keepend
 syn region debcontrolStrictField start="^\%(XS-\)\=Vcs-Git" end="$" contains=debcontrolKey,debcontrolVcsGit oneline keepend
-syn region debcontrolStrictField start="^\%(XS-\)\=DM-Upload-Allowed" end="$" contains=debcontrolKey,debcontrolDmUpload oneline
+syn region debcontrolStrictField start="^\%(XS-\)\=DM-Upload-Allowed" end="$" contains=debcontrolDeprecatedKey,debcontrolDmUpload oneline
 
 " Catch-all for the other legal fields
 syn region debcontrolField start="^\%(\%(XSBC-Original-\)\=Maintainer\|Standards-Version\|Essential\|Bugs\|Origin\|X[SB]-Python-Version\|\%(XS-\)\=Vcs-Mtn\):" end="$" contains=debcontrolKey,debcontrolVariable,debcontrolEmail oneline
 syn region debcontrolMultiField start="^\%(Build-\%(Conflicts\|Depends\)\%(-Indep\)\=\|\%(Pre-\)\=Depends\|Recommends\|Suggests\|Provides\|Replaces\|Conflicts\|Enhances\|Breaks\|Uploaders\|Description\):" skip="^ " end="^$"me=s-1 end="^[^ #]"me=s-1 contains=debcontrolKey,debcontrolEmail,debcontrolVariable,debcontrolComment
+syn region debcontrolMultiFieldSpell start="^\%(Description\):" skip="^ " end="^$"me=s-1 end="^[^ #]"me=s-1 contains=debcontrolKey,debcontrolEmail,debcontrolVariable,debcontrolComment,@Spell
 
 " Associate our matches and regions with pretty colours
 if version >= 508 || !exists("did_debcontrol_syn_inits")
@@ -82,6 +85,7 @@ if version >= 508 || !exists("did_debcontrol_syn_inits")
   HiLink debcontrolKey		Keyword
   HiLink debcontrolField	Normal
   HiLink debcontrolStrictField	Error
+  HiLink debcontrolDeprecatedKey	Error
   HiLink debcontrolMultiField	Normal
   HiLink debcontrolArchitecture	Normal
   HiLink debcontrolMultiArch	Normal
diff --git a/runtime/syntax/debsources.vim b/runtime/syntax/debsources.vim
index 0a645dd66e..f3dd2a5fc1 100644
--- a/runtime/syntax/debsources.vim
+++ b/runtime/syntax/debsources.vim
@@ -2,7 +2,7 @@
 " Language:     Debian sources.list
 " Maintainer:   Debian Vim Maintainers 
 " Former Maintainer: Matthijs Mohlmann 
-" Last Change: 2012 April 29
+" Last Change: 2013 May 05
 " URL: http://anonscm.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/debsources.vim
 
 " Standard syntax initialization
@@ -23,7 +23,7 @@ syn match debsourcesComment        /#.*/  contains=@Spell
 
 " Match uri's
 syn match debsourcesUri            +\(http://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' 	<>"]\++
-syn match debsourcesDistrKeyword   +\([[:alnum:]_./]*\)\(squeeze\|wheezy\|\(old\)\=stable\|testing\|unstable\|sid\|rc-buggy\|experimental\|hardy\|lucid\|natty\|oneiric\|precise\|quantal\)\([-[:alnum:]_./]*\)+
+syn match debsourcesDistrKeyword   +\([[:alnum:]_./]*\)\(squeeze\|wheezy\|\(old\)\=stable\|testing\|unstable\|sid\|rc-buggy\|experimental\|lucid\|precise\|quantal\|raring\|saucy\)\([-[:alnum:]_./]*\)+
 
 " Associate our matches and regions with pretty colours
 hi def link debsourcesLine            Error
diff --git a/runtime/syntax/diff.vim b/runtime/syntax/diff.vim
index 62a70bfc02..484e2cca65 100644
--- a/runtime/syntax/diff.vim
+++ b/runtime/syntax/diff.vim
@@ -1,7 +1,8 @@
 " Vim syntax file
 " Language:	Diff (context or unified)
 " Maintainer:	Bram Moolenaar 
-" Last Change:	2010 Aug 03
+"               Translations by Jakson Alves de Aquino.
+" Last Change:	2013 Jul 24
 
 " Quit when a (custom) syntax file was already loaded
 if exists("b:current_syntax")
@@ -14,275 +15,309 @@ syn match diffIdentical	"^Files .* and .* are identical$"
 syn match diffDiffer	"^Files .* and .* differ$"
 syn match diffBDiffer	"^Binary files .* and .* differ$"
 syn match diffIsA	"^File .* is a .* while file .* is a .*"
-syn match diffNoEOL	"^No newline at end of file .*"
+syn match diffNoEOL	"^\\ No newline at end of file .*"
 syn match diffCommon	"^Common subdirectories: .*"
 
 " ca
-syn match diffOnly	"^Només a .*: .*$"
+syn match diffOnly	"^Només a .*"
 syn match diffIdentical	"^Els fitxers .* i .* són idèntics$"
 syn match diffDiffer	"^Els fitxers .* i .* difereixen$"
 syn match diffBDiffer	"^Els fitxers .* i .* difereixen$"
-syn match diffIsA	"^El fitxer .* és un .* mentre que el fitxer .* és un .*$"
-syn match diffNoEOL	"^No hi ha cap caràcter de salt de línia al final del fitxer"
-syn match diffCommon	"^Subdirectoris comuns: .* i .*$"
+syn match diffIsA	"^El fitxer .* és un .* mentre que el fitxer .* és un .*"
+syn match diffNoEOL	"^\\ No hi ha cap caràcter de salt de línia al final del fitxer"
+syn match diffCommon	"^Subdirectoris comuns: .* i .*"
 
 " cs
-syn match diffOnly	"^Pouze v .*: .*$"
+syn match diffOnly	"^Pouze v .*"
 syn match diffIdentical	"^Soubory .* a .* jsou identické$"
 syn match diffDiffer	"^Soubory .* a .* jsou různé$"
+syn match diffBDiffer	"^Binární soubory .* a .* jsou rozdílné$"
 syn match diffBDiffer	"^Soubory .* a .* jsou různé$"
-syn match diffIsA	"^Soubor .* je .* pokud soubor .* je .*$"
-syn match diffNoEOL	"^Chybí znak konce řádku na konci souboru"
-syn match diffCommon	"^SpoleÄné podadresáře: .* a .*$"
+syn match diffIsA	"^Soubor .* je .* pokud soubor .* je .*"
+syn match diffNoEOL	"^\\ Chybí znak konce řádku na konci souboru"
+syn match diffCommon	"^SpoleÄné podadresáře: .* a .*"
 
 " da
-syn match diffOnly	"^Kun i .*: .*$"
+syn match diffOnly	"^Kun i .*"
 syn match diffIdentical	"^Filerne .* og .* er identiske$"
 syn match diffDiffer	"^Filerne .* og .* er forskellige$"
 syn match diffBDiffer	"^Binære filer .* og .* er forskellige$"
-syn match diffIsA	"^Filen .* er en .* mens filen .* er en .*$"
-syn match diffNoEOL	"^Intet linjeskift ved filafslutning"
-syn match diffCommon	"^Identiske underkataloger: .* og .*$"
+syn match diffIsA	"^Filen .* er en .* mens filen .* er en .*"
+syn match diffNoEOL	"^\\ Intet linjeskift ved filafslutning"
+syn match diffCommon	"^Identiske underkataloger: .* og .*"
 
 " de
-syn match diffOnly	"^Nur in .*: .*.$"
+syn match diffOnly	"^Nur in .*"
 syn match diffIdentical	"^Dateien .* und .* sind identisch.$"
 syn match diffDiffer	"^Dateien .* und .* sind verschieden.$"
 syn match diffBDiffer	"^Binärdateien .* and .* sind verschieden.$"
+syn match diffBDiffer	"^Binärdateien .* und .* sind verschieden.$"
 syn match diffIsA	"^Datei .* ist ein .* während Datei .* ein .* ist.$"
-syn match diffNoEOL	"^Kein Zeilenumbruch am Dateiende."
+syn match diffNoEOL	"^\\ Kein Zeilenumbruch am Dateiende."
 syn match diffCommon	"^Gemeinsame Unterverzeichnisse: .* und .*.$"
 
 " el
-syn match diffOnly	"^Μόνο στο .*: .*$"
+syn match diffOnly	"^Μόνο στο .*"
 syn match diffIdentical	"^Τα αÏχεία .* καί .* είναι πανομοιότυπα$"
 syn match diffDiffer	"^Τα αÏχεία .* και .* διαφέÏουν$"
 syn match diffBDiffer	"^Τα αÏχεία .* και .* διαφέÏουν$"
-syn match diffIsA	"^Το αÏχείο .* είναι .* ενώ το αÏχείο .* είναι .*$"
-syn match diffNoEOL	"^Δεν υπάÏχει χαÏακτήÏας νέας γÏαμμής στο τέλος του αÏχείου"
+syn match diffIsA	"^Το αÏχείο .* είναι .* ενώ το αÏχείο .* είναι .*"
+syn match diffNoEOL	"^\\ Δεν υπάÏχει χαÏακτήÏας νέας γÏαμμής στο τέλος του αÏχείου"
 syn match diffCommon	"^Οι υποκατάλογοι .* και .* είναι ταυτόσημοι$"
 
 " eo
-syn match diffOnly	"^Nur en .*: .*$"
+syn match diffOnly	"^Nur en .*"
 syn match diffIdentical	"^Dosieroj .* kaj .* estas samaj$"
 syn match diffDiffer	"^Dosieroj .* kaj .* estas malsamaj$"
 syn match diffBDiffer	"^Dosieroj .* kaj .* estas malsamaj$"
-syn match diffIsA	"^Dosiero .* estas .*, dum dosiero .* estas .*$"
-syn match diffNoEOL	"^Mankas linifino ĉe fino de dosiero"
-syn match diffCommon	"^Komunaj subdosierujoj: .* kaj .*$"
+syn match diffIsA	"^Dosiero .* estas .*, dum dosiero .* estas .*"
+syn match diffNoEOL	"^\\ Mankas linifino ĉe fino de dosiero"
+syn match diffCommon	"^Komunaj subdosierujoj: .* kaj .*"
 
 " es
-syn match diffOnly	"^Sólo en .*: .*$"
+syn match diffOnly	"^Sólo en .*"
 syn match diffIdentical	"^Los ficheros .* y .* son idénticos$"
 syn match diffDiffer	"^Los ficheros .* y .* son distintos$"
 syn match diffBDiffer	"^Los ficheros binarios .* y .* son distintos$"
-syn match diffIsA	"^El fichero .* es un .* mientras que el .* es un .*$"
-syn match diffNoEOL	"^No hay ningún carácter de nueva línea al final del fichero"
-syn match diffCommon	"^Subdirectorios comunes: .* y .*$"
+syn match diffIsA	"^El fichero .* es un .* mientras que el .* es un .*"
+syn match diffNoEOL	"^\\ No hay ningún carácter de nueva línea al final del fichero"
+syn match diffCommon	"^Subdirectorios comunes: .* y .*"
 
 " fi
-syn match diffOnly	"^Vain hakemistossa .*: .*$"
+syn match diffOnly	"^Vain hakemistossa .*"
 syn match diffIdentical	"^Tiedostot .* ja .* ovat identtiset$"
 syn match diffDiffer	"^Tiedostot .* ja .* eroavat$"
 syn match diffBDiffer	"^Binääritiedostot .* ja .* eroavat$"
-syn match diffIsA	"^Tiedosto .* on .*, kun taas tiedosto .* on .*$"
-syn match diffNoEOL	"^Ei rivinvaihtoa tiedoston lopussa"
-syn match diffCommon	"^Yhteiset alihakemistot: .* ja .*$"
+syn match diffIsA	"^Tiedosto .* on .*, kun taas tiedosto .* on .*"
+syn match diffNoEOL	"^\\ Ei rivinvaihtoa tiedoston lopussa"
+syn match diffCommon	"^Yhteiset alihakemistot: .* ja .*"
 
 " fr
-syn match diffOnly	"^Seulement dans .*: .*$"
-syn match diffIdentical	"^Les fichiers .* et .* sont identiques.$"
-syn match diffDiffer	"^Les fichiers .* et .* sont différents.$"
-syn match diffBDiffer	"^Les fichiers binaires .* et .* sont différents.$"
-syn match diffIsA	"^Le fichier .* est un .* alors que le fichier .* est un .*$"
-syn match diffNoEOL	"^Pas de fin de ligne à la fin du fichier."
-syn match diffCommon	"^Les sous-répertoires .* et .* sont identiques.$"
+syn match diffOnly	"^Seulement dans .*"
+syn match diffIdentical	"^Les fichiers .* et .* sont identiques.*"
+syn match diffDiffer	"^Les fichiers .* et .* sont différents.*"
+syn match diffBDiffer	"^Les fichiers binaires .* et .* sont différents.*"
+syn match diffIsA	"^Le fichier .* est un .* alors que le fichier .* est un .*"
+syn match diffNoEOL	"^\\ Pas de fin de ligne à la fin du fichier.*"
+syn match diffCommon	"^Les sous-répertoires .* et .* sont identiques.*"
 
 " ga
-syn match diffOnly	"^I .* amháin: .*$"
-syn match diffIdentical	"^Is comhionann iad na comhaid .* agus .*$"
-syn match diffDiffer	"^Tá difríocht idir na comhaid .* agus .*$"
-syn match diffBDiffer	"^Tá difríocht idir na comhaid .* agus .*$"
-syn match diffIsA	"^Tá comhad .* ina .* ach tá comhad .* ina .*$"
-syn match diffNoEOL	"^Gan líne nua ag an chomhadchríoch"
-syn match diffCommon	"^Fochomhadlanna i gcoitianta: .* agus .*$"
+syn match diffOnly	"^I .* amháin: .*"
+syn match diffIdentical	"^Is comhionann iad na comhaid .* agus .*"
+syn match diffDiffer	"^Tá difríocht idir na comhaid .* agus .*"
+syn match diffBDiffer	"^Tá difríocht idir na comhaid .* agus .*"
+syn match diffIsA	"^Tá comhad .* ina .* ach tá comhad .* ina .*"
+syn match diffNoEOL	"^\\ Gan líne nua ag an chomhadchríoch"
+syn match diffCommon	"^Fochomhadlanna i gcoitianta: .* agus .*"
 
 " gl
-syn match diffOnly	"^Só en .*: .*$"
+syn match diffOnly	"^Só en .*"
 syn match diffIdentical	"^Os ficheiros .* e .* son idénticos$"
 syn match diffDiffer	"^Os ficheiros .* e .* son diferentes$"
 syn match diffBDiffer	"^Os ficheiros binarios .* e .* son diferentes$"
-syn match diffIsA	"^O ficheiro .* é un .* mentres que o ficheiro .* é un .*$"
-syn match diffNoEOL	"^Non hai un salto de liña na fin da liña"
-syn match diffCommon	"^Subdirectorios comúns: .* e .*$"
+syn match diffIsA	"^O ficheiro .* é un .* mentres que o ficheiro .* é un .*"
+syn match diffNoEOL	"^\\ Non hai un salto de liña na fin da liña"
+syn match diffCommon	"^Subdirectorios comúns: .* e .*"
 
 " he
-syn match diffOnly	"^.*-ב קר ×צמנ .*$"
+syn match diffOnly	"^.*-ב קר ×צמנ .*"
 syn match diffIdentical	"^××™×”×– ×× ×™×” .*-ו .* ×יצבקה$"
 syn match diffDiffer	"^הזמ ×”×– ×ינוש `.*'-ו `.*' ×יצבקה$"
 syn match diffBDiffer	"^הזמ ×”×– ×ינוש `.*'-ו `.*' ×יירניב ×יצבק$"
 syn match diffIsA	"^.* .*-ל .* .* תוושהל ןתינ ×ל$"
-syn match diffNoEOL	"^ץבוקה ףוסב השדח-הרוש ות רסח"
+syn match diffNoEOL	"^\\ ץבוקה ףוסב השדח-הרוש ות רסח"
 syn match diffCommon	"^.*-ו .* :תוהז תויקית-תת$"
 
+" hr
+syn match diffOnly	"^Samo u .*"
+syn match diffIdentical	"^Datoteke .* i .* su identiÄne$"
+syn match diffDiffer	"^Datoteke .* i .* se razlikuju$"
+syn match diffBDiffer	"^Binarne datoteke .* i .* se razlikuju$"
+syn match diffIsA	"^Datoteka .* je .*, a datoteka .* je .*"
+syn match diffNoEOL	"^\\ Nema novog retka na kraju datoteke"
+syn match diffCommon	"^UobiÄajeni poddirektoriji: .* i .*"
+
 " hu
-syn match diffOnly	"^Csak .* -ben: .*$"
+syn match diffOnly	"^Csak .* -ben: .*"
 syn match diffIdentical	"^.* és .* fájlok azonosak$"
 syn match diffDiffer	"^A(z) .* és a(z) .* fájlok különböznek$"
 syn match diffBDiffer	"^A(z) .* és a(z) .* fájlok különböznek$"
-syn match diffIsA	"^A(z) .* fájl egy .*, viszont a(z) .* fájl egy .*$"
-syn match diffNoEOL	"^Nincs újsor a fájl végén"
-syn match diffCommon	"^Közös alkönyvtárak: .* és .*$"
+syn match diffIsA	"^A(z) .* fájl egy .*, viszont a(z) .* fájl egy .*"
+syn match diffNoEOL	"^\\ Nincs újsor a fájl végén"
+syn match diffCommon	"^Közös alkönyvtárak: .* és .*"
 
 " id
-syn match diffOnly	"^Hanya dalam .*: .*$"
+syn match diffOnly	"^Hanya dalam .*"
 syn match diffIdentical	"^File .* dan .* identik$"
 syn match diffDiffer	"^Berkas .* dan .* berbeda$"
 syn match diffBDiffer	"^File biner .* dan .* berbeda$"
-syn match diffIsA	"^File .* adalah .* sementara file .* adalah .*$"
-syn match diffNoEOL	"^Tidak ada baris-baru di akhir dari berkas"
-syn match diffCommon	"^Subdirektori sama: .* dan .*$"
+syn match diffIsA	"^File .* adalah .* sementara file .* adalah .*"
+syn match diffNoEOL	"^\\ Tidak ada baris-baru di akhir dari berkas"
+syn match diffCommon	"^Subdirektori sama: .* dan .*"
 
 " it
-syn match diffOnly	"^Solo in .*: .*$"
+syn match diffOnly	"^Solo in .*"
 syn match diffIdentical	"^I file .* e .* sono identici$"
 syn match diffDiffer	"^I file .* e .* sono diversi$"
 syn match diffBDiffer	"^I file .* e .* sono diversi$"
-syn match diffIsA	"^File .* è un .* mentre file .* è un .*$"
-syn match diffNoEOL	"^Manca newline alla fine del file"
-syn match diffCommon	"^Sottodirectory in comune: .* e .*$"
+syn match diffBDiffer	"^I file binari .* e .* sono diversi$"
+syn match diffIsA	"^File .* è un .* mentre file .* è un .*"
+syn match diffNoEOL	"^\\ Manca newline alla fine del file"
+syn match diffCommon	"^Sottodirectory in comune: .* e .*"
 
 " ja
-syn match diffOnly	"^.*ã ã‘ã«ç™ºè¦‹: .*$"
+syn match diffOnly	"^.*ã ã‘ã«ç™ºè¦‹: .*"
 syn match diffIdentical	"^ファイル.*ã¨.*ã¯åŒä¸€$"
 syn match diffDiffer	"^ファイル.*ã¨.*ã¯é•ã„ã¾ã™$"
 syn match diffBDiffer	"^ãƒã‚¤ãƒŠãƒªãƒ¼ãƒ»ãƒ•ã‚¡ã‚¤ãƒ«.*ã¨.*ã¯é•ã„ã¾ã™$"
-syn match diffIsA	"^ファイル.*ã¯.*ã€ãƒ•ã‚¡ã‚¤ãƒ«.*ã¯.*$"
-syn match diffNoEOL	"^ファイル末尾ã«æ”¹è¡ŒãŒã‚ã‚Šã¾ã›ã‚“"
-syn match diffCommon	"^共通ã®ä¸‹ä½ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªãƒ¼: .*ã¨.*$"
+syn match diffIsA	"^ファイル.*ã¯.*ã€ãƒ•ã‚¡ã‚¤ãƒ«.*ã¯.*"
+syn match diffNoEOL	"^\\ ファイル末尾ã«æ”¹è¡ŒãŒã‚ã‚Šã¾ã›ã‚“"
+syn match diffCommon	"^共通ã®ä¸‹ä½ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªãƒ¼: .*ã¨.*"
+
+" ja DiffUtils 3.3
+syn match diffOnly	"^.* ã®ã¿ã«å­˜åœ¨: .*"
+syn match diffIdentical	"^ファイル .* 㨠.* ã¯åŒä¸€ã§ã™$"
+syn match diffDiffer	"^ファイル .* 㨠.* ã¯ç•°ãªã‚Šã¾ã™$"
+syn match diffBDiffer	"^ãƒã‚¤ãƒŠãƒªãƒ¼ãƒ•ã‚¡ã‚¤ãƒ« .* ã¨.* ã¯ç•°ãªã‚Šã¾ã™$"
+syn match diffIsA	"^ファイル .* 㯠.* ã§ã™ã€‚一方ã€ãƒ•ã‚¡ã‚¤ãƒ« .* 㯠.* ã§ã™$"
+syn match diffNoEOL	"^\\ ファイル末尾ã«æ”¹è¡ŒãŒã‚ã‚Šã¾ã›ã‚“"
+syn match diffCommon	"^共通ã®ã‚µãƒ–ディレクトリー: .* 㨠.*"
 
 " lv
-syn match diffOnly	"^Tikai iekš .*: .*$"
+syn match diffOnly	"^Tikai iekš .*"
 syn match diffIdentical	"^Fails .* un .* ir identiski$"
 syn match diffDiffer	"^Faili .* un .* atšķiras$"
 syn match diffBDiffer	"^Faili .* un .* atšķiras$"
-syn match diffIsA	"^Fails .* ir .* kamēr fails .* ir .*$"
-syn match diffNoEOL	"^Nav jaunu rindu faila beigÄs"
-syn match diffCommon	"^KopÄ“jÄs apakÅ¡direktorijas: .* un .*$"
+syn match diffBDiffer	"^BinÄrie faili .* un .* atÅ¡Ä·iras$"
+syn match diffIsA	"^Fails .* ir .* kamēr fails .* ir .*"
+syn match diffNoEOL	"^\\ Nav jaunu rindu faila beigÄs"
+syn match diffCommon	"^KopÄ“jÄs apakÅ¡direktorijas: .* un .*"
 
 " ms
+syn match diffOnly	"^Hanya dalam .*"
 syn match diffIdentical	"^Fail .* dan .* adalah serupa$"
 syn match diffDiffer	"^Fail .* dan .* berbeza$"
 syn match diffBDiffer	"^Fail .* dan .* berbeza$"
-syn match diffIsA	"^Fail .* adalah .* manakala fail .* adalah .*$"
-syn match diffNoEOL	"^Tiada baris baru pada penghujung fail"
-syn match diffCommon	"^Subdirektori umum: .* dan .*$"
+syn match diffIsA	"^Fail .* adalah .* manakala fail .* adalah .*"
+syn match diffNoEOL	"^\\ Tiada baris baru pada penghujung fail"
+syn match diffCommon	"^Subdirektori umum: .* dan .*"
 
 " nl
-syn match diffOnly	"^Alleen in .*: .*$"
+syn match diffOnly	"^Alleen in .*"
 syn match diffIdentical	"^Bestanden .* en .* zijn identiek$"
 syn match diffDiffer	"^Bestanden .* en .* zijn verschillend$"
 syn match diffBDiffer	"^Bestanden .* en .* zijn verschillend$"
+syn match diffBDiffer	"^Binaire bestanden .* en .* zijn verschillend$"
 syn match diffIsA	"^Bestand .* is een .* terwijl bestand .* een .* is$"
-syn match diffNoEOL	"^Geen regeleindeteken (LF) aan einde van bestand"
-syn match diffCommon	"^Gemeenschappelijke submappen: .* en .*$"
+syn match diffNoEOL	"^\\ Geen regeleindeteken (LF) aan einde van bestand"
+syn match diffCommon	"^Gemeenschappelijke submappen: .* en .*"
 
 " pl
-syn match diffOnly	"^Tylko w .*: .*$"
+syn match diffOnly	"^Tylko w .*"
 syn match diffIdentical	"^Pliki .* i .* sÄ… identyczne$"
 syn match diffDiffer	"^Pliki .* i .* różnią się$"
 syn match diffBDiffer	"^Pliki .* i .* różnią się$"
-syn match diffIsA	"^Plik .* jest .*, podczas gdy plik .* jest .*$"
-syn match diffNoEOL	"^Brak znaku nowej linii na końcu pliku"
-syn match diffCommon	"^Wspólne podkatalogi: .* i .*$"
+syn match diffBDiffer	"^Binarne pliki .* i .* różnią się$"
+syn match diffIsA	"^Plik .* jest .*, podczas gdy plik .* jest .*"
+syn match diffNoEOL	"^\\ Brak znaku nowej linii na końcu pliku"
+syn match diffCommon	"^Wspólne podkatalogi: .* i .*"
 
 " pt_BR
-syn match diffOnly	"^Somente em .*: .*$"
-syn match diffOnly	"^Apenas em .*: .*$"
+syn match diffOnly	"^Somente em .*"
+syn match diffOnly	"^Apenas em .*"
 syn match diffIdentical	"^Os aquivos .* e .* são idênticos$"
 syn match diffDiffer	"^Os arquivos .* e .* são diferentes$"
 syn match diffBDiffer	"^Os arquivos binários .* e .* são diferentes$"
-syn match diffIsA	"^O arquivo .* é .* enquanto o arquivo .* é .*$"
-syn match diffNoEOL	"^Falta o caracter nova linha no final do arquivo"
-syn match diffCommon	"^Subdiretórios idênticos: .* e .*$"
+syn match diffIsA	"^O arquivo .* é .* enquanto o arquivo .* é .*"
+syn match diffNoEOL	"^\\ Falta o caracter nova linha no final do arquivo"
+syn match diffCommon	"^Subdiretórios idênticos: .* e .*"
 
 " ro
-syn match diffOnly	"^Doar în .*: .*$"
+syn match diffOnly	"^Doar în .*"
 syn match diffIdentical	"^FiÅŸierele .* ÅŸi .* sunt identice$"
 syn match diffDiffer	"^Fişierele .* şi .* diferă$"
 syn match diffBDiffer	"^Fişierele binare .* şi .* diferă$"
 syn match diffIsA	"^Fişierul .* este un .* pe când fişierul .* este un .*.$"
-syn match diffNoEOL	"^Nici un element de linie nouă la sfârşitul fişierului"
+syn match diffNoEOL	"^\\ Nici un element de linie nouă la sfârşitul fişierului"
 syn match diffCommon	"^Subdirectoare comune: .* ÅŸi .*.$"
 
 " ru
-syn match diffOnly	"^Только в .*: .*$"
+syn match diffOnly	"^Только в .*"
 syn match diffIdentical	"^Файлы .* и .* идентичны$"
 syn match diffDiffer	"^Файлы .* и .* различаютÑÑ$"
 syn match diffBDiffer	"^Файлы .* и .* различаютÑÑ$"
-syn match diffIsA	"^Файл .* Ñто .*, тогда как файл .* -- .*$"
-syn match diffNoEOL	"^Ð’ конце файла нет новой Ñтроки"
-syn match diffCommon	"^Общие подкаталоги: .* и .*$"
+syn match diffIsA	"^Файл .* Ñто .*, тогда как файл .* -- .*"
+syn match diffNoEOL	"^\\ Ð’ конце файла нет новой Ñтроки"
+syn match diffCommon	"^Общие подкаталоги: .* и .*"
 
 " sr
-syn match diffOnly	"^Само у .*: .*$"
+syn match diffOnly	"^Само у .*"
 syn match diffIdentical	"^Датотеке „.*“ и „.*“ Ñе подударају$"
 syn match diffDiffer	"^Датотеке .* и .* различите$"
 syn match diffBDiffer	"^Бинарне датотеке .* и .* различите$"
 syn match diffIsA	"^Датотека „.*“ је „.*“ док је датотека „.*“ „.*“$"
-syn match diffNoEOL	"^Без новог реда на крају датотеке"
-syn match diffCommon	"^Заједнички поддиректоријуми: .* и .*$"
+syn match diffNoEOL	"^\\ Без новог реда на крају датотеке"
+syn match diffCommon	"^Заједнички поддиректоријуми: .* и .*"
 
 " sv
-syn match diffOnly	"^Endast i .*: .*$"
+syn match diffOnly	"^Endast i .*"
 syn match diffIdentical	"^Filerna .* och .* är lika$"
 syn match diffDiffer	"^Filerna .* och .* skiljer$"
 syn match diffBDiffer	"^Filerna .* och .* skiljer$"
-syn match diffIsA	"^Fil .* är en .* medan fil .* är en .*$"
-syn match diffNoEOL	"^Ingen nyrad vid filslut"
-syn match diffCommon	"^Lika underkataloger: .* och .*$"
+syn match diffIsA	"^Fil .* är en .* medan fil .* är en .*"
+syn match diffBDiffer	"^De binära filerna .* och .* skiljer$"
+syn match diffIsA	"^Filen .* är .* medan filen .* är .*"
+syn match diffNoEOL	"^\\ Ingen nyrad vid filslut"
+syn match diffCommon	"^Lika underkataloger: .* och .*"
 
 " tr
-syn match diffOnly	"^Yalnızca .*'da: .*$"
+syn match diffOnly	"^Yalnızca .*'da: .*"
 syn match diffIdentical	"^.* ve .* dosyaları birbirinin aynı$"
 syn match diffDiffer	"^.* ve .* dosyaları birbirinden farklı$"
 syn match diffBDiffer	"^.* ve .* dosyaları birbirinden farklı$"
-syn match diffIsA	"^.* dosyası, bir .*, halbuki .* dosyası bir .*$"
-syn match diffNoEOL	"^Dosya sonunda yenisatır yok."
-syn match diffCommon	"^Ortak alt dizinler: .* ve .*$"
+syn match diffBDiffer	"^İkili .* ve .* birbirinden farklı$"
+syn match diffIsA	"^.* dosyası, bir .*, halbuki .* dosyası bir .*"
+syn match diffNoEOL	"^\\ Dosya sonunda yenisatır yok."
+syn match diffCommon	"^Ortak alt dizinler: .* ve .*"
 
 " uk
-syn match diffOnly	"^Лише у .*: .*$"
+syn match diffOnly	"^Лише у .*"
 syn match diffIdentical	"^Файли .* та .* ідентичні$"
 syn match diffDiffer	"^Файли .* та .* відрізнÑÑŽÑ‚ÑŒÑÑ$"
 syn match diffBDiffer	"^Файли .* та .* відрізнÑÑŽÑ‚ÑŒÑÑ$"
-syn match diffIsA	"^Файл .* це .*, тоді Ñк файл .* -- .*$"
-syn match diffNoEOL	"^Ðаприкінці файлу немає нового Ñ€Ñдка"
-syn match diffCommon	"^Спільні підкаталоги: .* та .*$"
+syn match diffBDiffer	"^Двійкові файли .* та .* відрізнÑÑŽÑ‚ÑŒÑÑ$"
+syn match diffIsA	"^Файл .* це .*, тоді Ñк файл .* -- .*"
+syn match diffNoEOL	"^\\ Ðаприкінці файлу немає нового Ñ€Ñдка"
+syn match diffCommon	"^Спільні підкаталоги: .* та .*"
 
 " vi
-syn match diffOnly	"^Chỉ trong .*: .*$"
+syn match diffOnly	"^Chỉ trong .*"
 syn match diffIdentical	"^Hai tập tin .* và .* là bằng nhau.$"
+syn match diffIdentical	"^Cả .* và .* là cùng một tập tin$"
 syn match diffDiffer	"^Hai tập tin .* và .* là khác nhau.$"
+syn match diffBDiffer	"^Hai tập tin nhị phân .* và .* khác nhau$"
+syn match diffIsA	"^Tập tin .* là một .* trong khi tập tin .* là một .*.$"
 syn match diffBDiffer	"^Hai tập tin .* và .* là khác nhau.$"
 syn match diffIsA	"^Tập tin .* là một .* còn tập tin .* là một .*.$"
-syn match diffNoEOL	"^Không có ký tự dòng mới tại kêt thức tập tin."
-syn match diffCommon	"^Thư mục con chung: .* và .*$"
+syn match diffNoEOL	"^\\ Không có ký tự dòng mới tại kêt thức tập tin."
+syn match diffCommon	"^Thư mục con chung: .* và .*"
 
 " zh_CN
-syn match diffOnly	"^åªåœ¨ .* 存在:.*$"
+syn match diffOnly	"^åªåœ¨ .* 存在:.*"
 syn match diffIdentical	"^檔案 .* å’Œ .* 相åŒ$"
 syn match diffDiffer	"^文件 .* å’Œ .* ä¸åŒ$"
 syn match diffBDiffer	"^文件 .* å’Œ .* ä¸åŒ$"
-syn match diffIsA	"^文件 .* 是.*而文件 .* 是.*$"
-syn match diffNoEOL	"^文件尾没有 newline 字符"
+syn match diffIsA	"^文件 .* 是.*而文件 .* 是.*"
+syn match diffNoEOL	"^\\ 文件尾没有 newline 字符"
 syn match diffCommon	"^.* å’Œ .* 有共åŒçš„å­ç›®å½•$"
 
 " zh_TW
+syn match diffOnly	"^åªåœ¨ .* 存在:.*"
+syn match diffIdentical	"^檔案 .* å’Œ .* 相åŒ$"
 syn match diffDiffer	"^檔案 .* 與 .* ä¸åŒ$"
 syn match diffBDiffer	"^二元碼檔 .* 與 .* ä¸åŒ$"
-syn match diffIsA	"^檔案 .* 是.*而檔案 .* 是.*$"
-syn match diffNoEOL	"^檔案末沒有 newline 字元"
+syn match diffIsA	"^檔案 .* 是.*而檔案 .* 是.*"
+syn match diffNoEOL	"^\\ 檔案末沒有 newline 字元"
 syn match diffCommon	"^.* å’Œ .* 有共åŒçš„副目錄$"
 
 
@@ -303,8 +338,8 @@ syn match diffLine	"^\d\+\(,\d\+\)\=[cda]\d\+\>.*"
 
 syn match diffFile	"^diff.*"
 syn match diffFile	"^+++ .*"
-syn match diffFile	"^Index: .*$"
-syn match diffFile	"^==== .*$"
+syn match diffFile	"^Index: .*"
+syn match diffFile	"^==== .*"
 syn match diffOldFile	"^\*\*\* .*"
 syn match diffNewFile	"^--- .*"
 
diff --git a/runtime/syntax/docbk.vim b/runtime/syntax/docbk.vim
index 73c1cb4751..fc679eecaf 100644
--- a/runtime/syntax/docbk.vim
+++ b/runtime/syntax/docbk.vim
@@ -1,9 +1,10 @@
 " Vim syntax file
 " Language:	DocBook
 " Maintainer:	Devin Weaver 
+" Last Updated By: Shlomi Fish
 " URL:		http://tritarget.com/pub/vim/syntax/docbk.vim
-" Last Change:	$Date: 2005/06/23 22:31:01 $
-" Version:	$Revision: 1.2 $
+" Last Change:	2012 Nov 28
+" Version:	1.2 (and modified after that)
 " Thanks to Johannes Zellner  for the default to XML
 " suggestion.
 
@@ -28,6 +29,15 @@ if !exists('b:docbk_type')
     let b:docbk_type = 'xml'
   endif
 endif
+
+if !exists('b:docbk_ver')
+  if exists('docbk_ver')
+    let b:docbk_ver = docbk_ver
+  else
+    let b:docbk_ver = 4
+  endif
+end
+
 if 'xml' == b:docbk_type
     doau Syntax xml
     syn cluster xmlTagHook add=docbkKeyword
@@ -40,81 +50,121 @@ elseif 'sgml' == b:docbk_type
     syn case ignore
 endif
 
-"  has been removed and replace with  in DocBook 4.0
-"  kept for backwards compatability.
-syn keyword docbkKeyword abbrev abstract accel ackno acronym action contained
-syn keyword docbkKeyword address affiliation alt anchor answer appendix contained
-syn keyword docbkKeyword application area areaset areaspec arg artheader contained
-syn keyword docbkKeyword article articleinfo artpagenums attribution audiodata contained
-syn keyword docbkKeyword audioobject author authorblurb authorgroup contained
-syn keyword docbkKeyword authorinitials beginpage bibliodiv biblioentry contained
-syn keyword docbkKeyword bibliography bibliomisc bibliomixed bibliomset contained
-syn keyword docbkKeyword biblioset blockquote book bookbiblio bookinfo contained
-syn keyword docbkKeyword bridgehead callout calloutlist caption caution contained
-syn keyword docbkKeyword chapter citation citerefentry citetitle city contained
-syn keyword docbkKeyword classname cmdsynopsis co collab collabname contained
-syn keyword docbkKeyword colophon colspec command comment computeroutput contained
-syn keyword docbkKeyword confdates confgroup confnum confsponsor conftitle contained
-syn keyword docbkKeyword constant contractnum contractsponsor contrib contained
-syn keyword docbkKeyword copyright corpauthor corpname country database contained
-syn keyword docbkKeyword date dedication docinfo edition editor email contained
-syn keyword docbkKeyword emphasis entry entrytbl envar epigraph equation contained
-syn keyword docbkKeyword errorcode errorname errortype example fax figure contained
-syn keyword docbkKeyword filename firstname firstterm footnote footnoteref contained
+syn keyword docbkKeyword abbrev abstract accel acronym address contained
+syn keyword docbkKeyword affiliation alt anchor answer appendix contained
+syn keyword docbkKeyword application area areaset areaspec arg contained
+syn keyword docbkKeyword article artpagenums attribution audiodata contained
+syn keyword docbkKeyword audioobject author authorgroup contained
+syn keyword docbkKeyword authorinitials bibliocoverage bibliodiv contained
+syn keyword docbkKeyword biblioentry bibliography biblioid contained
+syn keyword docbkKeyword bibliolist bibliomisc bibliomixed contained
+syn keyword docbkKeyword bibliomset biblioref bibliorelation contained
+syn keyword docbkKeyword biblioset bibliosource blockquote book contained
+syn keyword docbkKeyword bridgehead callout calloutlist caption contained
+syn keyword docbkKeyword caution chapter citation citebiblioid contained
+syn keyword docbkKeyword citerefentry citetitle city classname contained
+syn keyword docbkKeyword classsynopsis classsynopsisinfo cmdsynopsis contained
+syn keyword docbkKeyword co code col colgroup collab colophon contained
+syn keyword docbkKeyword colspec command computeroutput confdates contained
+syn keyword docbkKeyword confgroup confnum confsponsor conftitle contained
+syn keyword docbkKeyword constant constructorsynopsis contractnum contained
+syn keyword docbkKeyword contractsponsor contrib copyright coref contained
+syn keyword docbkKeyword country database date dedication contained
+syn keyword docbkKeyword destructorsynopsis edition editor email contained
+syn keyword docbkKeyword emphasis entry entrytbl envar epigraph contained
+syn keyword docbkKeyword equation errorcode errorname errortext contained
+syn keyword docbkKeyword errortype example exceptionname fax contained
+syn keyword docbkKeyword fieldsynopsis figure filename firstname contained
+syn keyword docbkKeyword firstterm footnote footnoteref contained
 syn keyword docbkKeyword foreignphrase formalpara funcdef funcparams contained
 syn keyword docbkKeyword funcprototype funcsynopsis funcsynopsisinfo contained
-syn keyword docbkKeyword function glossary glossdef glossdiv glossentry contained
-syn keyword docbkKeyword glosslist glosssee glossseealso glossterm graphic contained
-syn keyword docbkKeyword graphicco group guibutton guiicon guilabel contained
+syn keyword docbkKeyword function glossary glossdef glossdiv contained
+syn keyword docbkKeyword glossentry glosslist glosssee glossseealso contained
+syn keyword docbkKeyword glossterm group guibutton guiicon guilabel contained
 syn keyword docbkKeyword guimenu guimenuitem guisubmenu hardware contained
-syn keyword docbkKeyword highlights holder honorific imagedata imageobject contained
-syn keyword docbkKeyword imageobjectco important index indexdiv indexentry contained
-syn keyword docbkKeyword indexterm informalequation informalexample contained
-syn keyword docbkKeyword informalfigure informaltable inlineequation contained
-syn keyword docbkKeyword inlinegraphic inlinemediaobject interface contained
-syn keyword docbkKeyword interfacedefinition invpartnumber isbn issn contained
-syn keyword docbkKeyword issuenum itemizedlist itermset jobtitle keycap contained
-syn keyword docbkKeyword keycode keycombo keysym keyword keywordset label contained
-syn keyword docbkKeyword legalnotice lineage lineannotation link listitem contained
-syn keyword docbkKeyword literal literallayout lot lotentry manvolnum contained
-syn keyword docbkKeyword markup medialabel mediaobject mediaobjectco contained
-syn keyword docbkKeyword member menuchoice modespec mousebutton msg msgaud contained
-syn keyword docbkKeyword msgentry msgexplan msginfo msglevel msgmain contained
-syn keyword docbkKeyword msgorig msgrel msgset msgsub msgtext note contained
-syn keyword docbkKeyword objectinfo olink option optional orderedlist contained
-syn keyword docbkKeyword orgdiv orgname otheraddr othercredit othername contained
-syn keyword docbkKeyword pagenums para paramdef parameter part partintro contained
-syn keyword docbkKeyword phone phrase pob postcode preface primary contained
-syn keyword docbkKeyword primaryie printhistory procedure productname contained
-syn keyword docbkKeyword productnumber programlisting programlistingco contained
-syn keyword docbkKeyword prompt property pubdate publisher publishername contained
-syn keyword docbkKeyword pubsnumber qandadiv qandaentry qandaset question contained
-syn keyword docbkKeyword quote refclass refdescriptor refentry contained
+syn keyword docbkKeyword holder honorific imagedata imageobject contained
+syn keyword docbkKeyword imageobjectco important index indexdiv contained
+syn keyword docbkKeyword indexentry indexterm informalequation contained
+syn keyword docbkKeyword informalexample informalfigure contained
+syn keyword docbkKeyword informaltable initializer inlineequation contained
+syn keyword docbkKeyword inlinemediaobject interfacename issuenum contained
+syn keyword docbkKeyword itemizedlist itermset jobtitle keycap contained
+syn keyword docbkKeyword keycode keycombo keysym keyword keywordset contained
+syn keyword docbkKeyword label legalnotice lineage lineannotation contained
+syn keyword docbkKeyword link listitem literal literallayout contained
+syn keyword docbkKeyword manvolnum markup mathphrase mediaobject contained
+syn keyword docbkKeyword member menuchoice methodname methodparam contained
+syn keyword docbkKeyword methodsynopsis modifier mousebutton msg contained
+syn keyword docbkKeyword msgaud msgentry msgexplan msginfo msglevel contained
+syn keyword docbkKeyword msgmain msgorig msgrel msgset msgsub contained
+syn keyword docbkKeyword msgtext note olink ooclass ooexception contained
+syn keyword docbkKeyword oointerface option optional orderedlist contained
+syn keyword docbkKeyword orgdiv orgname otheraddr othercredit contained
+syn keyword docbkKeyword othername package pagenums para paramdef contained
+syn keyword docbkKeyword parameter part partintro personblurb contained
+syn keyword docbkKeyword personname phone phrase pob postcode contained
+syn keyword docbkKeyword preface primary primaryie printhistory contained
+syn keyword docbkKeyword procedure productname productnumber contained
+syn keyword docbkKeyword programlisting programlistingco prompt contained
+syn keyword docbkKeyword property pubdate publisher publishername contained
+syn keyword docbkKeyword qandadiv qandaentry qandaset question quote contained
+syn keyword docbkKeyword refclass refdescriptor refentry contained
 syn keyword docbkKeyword refentrytitle reference refmeta refmiscinfo contained
 syn keyword docbkKeyword refname refnamediv refpurpose refsect1 contained
-syn keyword docbkKeyword refsect1info refsect2 refsect2info refsect3 contained
-syn keyword docbkKeyword refsect3info refsynopsisdiv refsynopsisdivinfo contained
-syn keyword docbkKeyword releaseinfo remark replaceable returnvalue revhistory contained
-syn keyword docbkKeyword revision revnumber revremark row sbr screen contained
-syn keyword docbkKeyword screenco screeninfo screenshot secondary contained
-syn keyword docbkKeyword secondaryie sect1 sect1info sect2 sect2info sect3 contained
-syn keyword docbkKeyword sect3info sect4 sect4info sect5 sect5info section contained
-syn keyword docbkKeyword sectioninfo see seealso seealsoie seeie seg contained
-syn keyword docbkKeyword seglistitem segmentedlist segtitle seriesinfo contained
-syn keyword docbkKeyword seriesvolnums set setindex setinfo sgmltag contained
-syn keyword docbkKeyword shortaffil shortcut sidebar simpara simplelist contained
-syn keyword docbkKeyword simplesect spanspec state step street structfield contained
-syn keyword docbkKeyword structname subject subjectset subjectterm contained
-syn keyword docbkKeyword subscript substeps subtitle superscript surname contained
-syn keyword docbkKeyword symbol synopfragment synopfragmentref synopsis contained
-syn keyword docbkKeyword systemitem table tbody term tertiary tertiaryie contained
-syn keyword docbkKeyword textobject tfoot tgroup thead tip title contained
-syn keyword docbkKeyword titleabbrev toc tocback tocchap tocentry tocfront contained
-syn keyword docbkKeyword toclevel1 toclevel2 toclevel3 toclevel4 toclevel5 contained
-syn keyword docbkKeyword tocpart token trademark type ulink userinput contained
+syn keyword docbkKeyword refsect2 refsect3 refsection refsynopsisdiv contained
+syn keyword docbkKeyword releaseinfo remark replaceable returnvalue contained
+syn keyword docbkKeyword revdescription revhistory revision contained
+syn keyword docbkKeyword revnumber revremark row sbr screen screenco contained
+syn keyword docbkKeyword screenshot secondary secondaryie sect1 contained
+syn keyword docbkKeyword sect2 sect3 sect4 sect5 section see seealso contained
+syn keyword docbkKeyword seealsoie seeie seg seglistitem contained
+syn keyword docbkKeyword segmentedlist segtitle seriesvolnums set contained
+syn keyword docbkKeyword setindex shortaffil shortcut sidebar contained
+syn keyword docbkKeyword simpara simplelist simplemsgentry contained
+syn keyword docbkKeyword simplesect spanspec state step contained
+syn keyword docbkKeyword stepalternatives street subject subjectset contained
+syn keyword docbkKeyword subjectterm subscript substeps subtitle contained
+syn keyword docbkKeyword superscript surname symbol synopfragment contained
+syn keyword docbkKeyword synopfragmentref synopsis systemitem table contained
+syn keyword docbkKeyword task taskprerequisites taskrelated contained
+syn keyword docbkKeyword tasksummary tbody td term termdef tertiary contained
+syn keyword docbkKeyword tertiaryie textdata textobject tfoot tgroup contained
+syn keyword docbkKeyword th thead tip title titleabbrev toc tocentry contained
+syn keyword docbkKeyword token tr trademark type uri userinput contained
 syn keyword docbkKeyword varargs variablelist varlistentry varname contained
-syn keyword docbkKeyword videodata videoobject void volumenum warning contained
-syn keyword docbkKeyword wordasword xref year contained
+syn keyword docbkKeyword videodata videoobject void volumenum contained
+syn keyword docbkKeyword warning wordasword xref year contained
+
+if b:docbk_ver == 4
+  syn keyword docbkKeyword ackno action appendixinfo articleinfo contained
+  syn keyword docbkKeyword authorblurb beginpage bibliographyinfo contained
+  syn keyword docbkKeyword blockinfo bookinfo chapterinfo contained
+  syn keyword docbkKeyword collabname corpauthor corpcredit contained
+  syn keyword docbkKeyword corpname glossaryinfo graphic graphicco contained
+  syn keyword docbkKeyword highlights indexinfo inlinegraphic contained
+  syn keyword docbkKeyword interface invpartnumber isbn issn lot contained
+  syn keyword docbkKeyword lotentry medialabel mediaobjectco contained
+  syn keyword docbkKeyword modespec objectinfo partinfo contained
+  syn keyword docbkKeyword prefaceinfo pubsnumber refentryinfo contained
+  syn keyword docbkKeyword referenceinfo refsect1info refsect2info contained
+  syn keyword docbkKeyword refsect3info refsectioninfo contained
+  syn keyword docbkKeyword refsynopsisdivinfo screeninfo sect1info contained
+  syn keyword docbkKeyword sect2info sect3info sect4info sect5info contained
+  syn keyword docbkKeyword sectioninfo setindexinfo setinfo contained
+  syn keyword docbkKeyword sgmltag sidebarinfo structfield contained
+  syn keyword docbkKeyword structname tocback tocchap tocfront contained
+  syn keyword docbkKeyword toclevel1 toclevel2 toclevel3 toclevel4 contained
+  syn keyword docbkKeyword toclevel5 tocpart ulink contained
+
+else
+  syn keyword docbkKeyword acknowledgements annotation arc contained
+  syn keyword docbkKeyword constraint constraintdef cover contained
+  syn keyword docbkKeyword extendedlink givenname info lhs locator contained
+  syn keyword docbkKeyword multimediaparam nonterminal org person contained
+  syn keyword docbkKeyword production productionrecap contained
+  syn keyword docbkKeyword productionset rhs tag tocdiv topic contained
+
+endif
 
 " Add special emphasis on some regions. Thanks to Rory Hunter  for these ideas.
 syn region docbkRegion start=""lc=10 end=""me=e-11 contains=xmlRegion,xmlEntity,sgmlRegion,sgmlEntity keepend
diff --git a/runtime/syntax/doxygen.vim b/runtime/syntax/doxygen.vim
index 1aea3bf72a..cadbf54dc5 100644
--- a/runtime/syntax/doxygen.vim
+++ b/runtime/syntax/doxygen.vim
@@ -2,7 +2,7 @@
 " Language:     doxygen on top of c, cpp, idl, java, php
 " Maintainer:   Michael Geddes 
 " Author:       Michael Geddes
-" Last Change:  Jan 2009
+" Last Change:  Jan 2009 (\tparam by Domnique Pelle, Aug 2013)
 " Version:      1.23
 "
 " Copyright 2004-2008 Michael Geddes
@@ -179,7 +179,7 @@ endif
 
   " Match parameters and retvals (highlighting the first word as special).
   syn match doxygenParamDirection contained "\v\[(\s*in>((]\s*\[|\s*,\s*)out>)=|out>((]\s*\[|\s*,\s*)in>)=)\]" nextgroup=doxygenParamName skipwhite
-  syn keyword doxygenParam contained param nextgroup=doxygenParamName,doxygenParamDirection skipwhite
+  syn keyword doxygenParam contained param tparam nextgroup=doxygenParamName,doxygenParamDirection skipwhite
   syn match doxygenParamName contained +[A-Za-z0-9_:]\++ nextgroup=doxygenSpecialMultilineDesc skipwhite
   syn keyword doxygenRetval contained retval throw exception nextgroup=doxygenParamName skipwhite
 
diff --git a/runtime/syntax/dts.vim b/runtime/syntax/dts.vim
new file mode 100644
index 0000000000..d7663cf72a
--- /dev/null
+++ b/runtime/syntax/dts.vim
@@ -0,0 +1,28 @@
+" Vim syntax file
+" Language:	dts/dtsi (device tree files)
+" Maintainer:	Daniel Mack 
+" Last Change:	2013 Apr 05
+
+if exists("b:current_syntax")
+  finish
+endif
+
+syntax region dtsComment        start="/\*"  end="\*/"
+syntax match  dtsReference      "&[[:alpha:][:digit:]_]\+"
+syntax region dtsBinaryProperty start="\[" end="\]" 
+syntax match  dtsStringProperty "\".*\""
+syntax match  dtsKeyword        "/.*/"
+syntax match  dtsLabel          "^[[:space:]]*[[:alpha:][:digit:]_]\+:"
+syntax match  dtsNode           /[[:alpha:][:digit:]-_]\+\(@[0-9a-fA-F]\+\|\)[[:space:]]*{/he=e-1
+syntax region dtsCellProperty   start="<" end=">" contains=dtsReference,dtsBinaryProperty,dtsStringProperty,dtsComment
+syntax region dtsCommentInner   start="/\*"  end="\*/"
+
+hi def link dtsCellProperty     Number
+hi def link dtsBinaryProperty   Number
+hi def link dtsStringProperty   String
+hi def link dtsKeyword          Include
+hi def link dtsLabel            Label
+hi def link dtsNode             Structure
+hi def link dtsReference        Macro
+hi def link dtsComment          Comment
+hi def link dtsCommentInner     Comment 
diff --git a/runtime/syntax/erlang.vim b/runtime/syntax/erlang.vim
index 28bc4a5d35..02597e75f3 100644
--- a/runtime/syntax/erlang.vim
+++ b/runtime/syntax/erlang.vim
@@ -1,126 +1,265 @@
 " Vim syntax file
-" Language:     Erlang
-" Author:       Oscar Hellström  (http://oscar.hellstrom.st)
-" Contributors: Ricardo Catalinas Jiménez 
+" Language:     Erlang (http://www.erlang.org)
+" Maintainer:   Csaba Hoch 
+" Last Update:  2013-Jul-25
 " License:      Vim license
-" Version:      2011/09/11
+" URL:          https://github.com/hcs42/vim-erlang
 
-if exists("b:current_syntax")
-	finish
-else
-	let b:current_syntax = "erlang"
-endif
+" Acknowledgements: This script was originally created by Kresimir Marzic [1].
+" The script was then revamped by Csaba Hoch [2]. During the revamp, the new
+" highlighting style and some code was taken from the Erlang syntax script
+" that is part of vimerl [3], created by Oscar Hellström [4] and improved by
+" Ricardo Catalinas Jiménez [5].
+
+" [1]: Kreąimir Marľić (Kresimir Marzic) 
+" [2]: Csaba Hoch 
+" [3]: https://github.com/jimenezrick/vimerl
+" [4]: Oscar Hellström  (http://oscar.hellstrom.st)
+" [5]: Ricardo Catalinas Jiménez 
+
+" Customization:
+"
+" To use the old highlighting style, add this to your .vimrc:
+"
+"     let g:erlang_old_style_highlight = 1
+"
+" To highlight further module attributes, add them to
+" ~/.vim/after/syntax/erlang.vim:
+"
+"     syn keyword erlangAttribute myattr1 myattr2 contained
 
-if !exists("g:erlang_highlight_bif")
-	let g:erlang_highlight_bif = 1
+" For version 5.x: Clear all syntax items
+" For version 6.x: Quit when a syntax file was already loaded
+if version < 600
+    syntax clear
+elseif exists("b:current_syntax")
+    finish
 endif
 
-" Erlang is case sensitive
+let s:cpo_save = &cpo
+set cpo&vim
+
+" Case sensitive
 syn case match
 
-" Match groups
-syn match erlangStringModifier               /\\./ contained
-syn match erlangStringModifier               /\~\%(-\?[0-9*]\+\)\?\%(\.[0-9*]\+\..\?\)\?\%(c\|f\|e\|g\|s\|w\|p\|W\|P\|B\|X\|#\|b\|+\|n\|i\)/ contained
-syn match erlangModifier                     /\$\\\?./
-
-syn match erlangInteger                      /\<\%([0-9]\+#[0-9a-fA-F]\+\|[0-9]\+\)\>/
-syn match erlangFloat                        /\<[0-9]\+\.[0-9]\+\%(e-\?[0-9]\+\)\?\>/
-
-syn keyword erlangTodo                       TODO FIXME XXX contained
-syn match   erlangComment                    /%.*$/ contains=@Spell,erlangTodo,erlangAnnotation
-syn match   erlangAnnotation                 /\%(%\s\)\@<=@\%(author\|clear\|copyright\|deprecated\|doc\|docfile\|end\|equiv\|headerfile\|hidden\|private\|reference\|see\|since\|spec\|throws\|title\|todo\|TODO\|type\|version\)/ contained
-syn match   erlangAnnotation                 /`[^']\+'/ contained
-
-syn keyword erlangKeyword                    band bor bnot bsl bsr bxor div rem xor
-syn keyword erlangKeyword                    try catch begin receive after cond fun let query
-
-syn keyword erlangConditional                case if of end
-syn keyword erlangConditional                not and or andalso orelse
-syn keyword erlangConditional                when
-
-syn keyword erlangBoolean                    true false
-
-syn keyword erlangGuard                      is_list is_alive is_atom is_binary is_bitstring is_boolean is_tuple is_number is_integer is_float is_function is_constant is_pid is_port is_reference is_record is_process_alive
-
-syn match erlangOperator                     /\/\|*\|+\|-\|++\|--/
-syn match erlangOperator                     /->\|<-\|||\||\|!\|=/
-syn match erlangOperator                     /=:=\|==\|\/=\|=\/=\|<\|>\|=<\|>=/
-syn keyword erlangOperator                   div rem
-
-syn region erlangString                      start=/"/ end=/"/ skip=/\\/ contains=@Spell,erlangStringModifier
-
-syn match erlangVariable                     /\<[A-Z_]\w*\>/
-syn match erlangAtom                         /\%(\%(^-\)\|#\)\@\%(\s*[(:]\)\@!/
-syn match erlangAtom                         /\\\@/
-syn match erlangBitSize                      /:\@<=[0-9]\+/
-
-syn match erlangBinary                      /<<\|>>/
-
-" BIFs
-syn match erlangBIF                          /\%([^:0-9A-Za-z_]\|\= 600
+  setlocal iskeyword+=$,@-@
 endif
+
+" Comments
+syn match erlangComment           '%.*$' contains=erlangCommentAnnotation,erlangTodo
+syn match erlangCommentAnnotation ' \@<=@\%(clear\|docfile\|end\|headerfile\|todo\|TODO\|type\|author\|copyright\|doc\|reference\|see\|since\|title\|version\|deprecated\|hidden\|private\|equiv\|spec\|throws\)' contained
+syn match erlangCommentAnnotation /`[^']*'/ contained
+syn keyword erlangTodo            TODO FIXME XXX contained
+syn match erlangShebang           '^#!.*'
+
+" Numbers (minimum base is 2, maximum is 36.)
+syn match erlangNumberInteger '\<\d\+\>'
+syn match erlangNumberInteger '\<\%([2-9]\|[12]\d\|3[0-6]\)\+#[[:alnum:]]\+\>'
+syn match erlangNumberFloat   '\<\d\+\.\d\+\%([eE][+-]\=\d\+\)\=\>'
+
+" Strings, atoms, characters
+syn region erlangString            start=/"/ end=/"/ contains=erlangStringModifier
+syn region erlangQuotedAtom        start=/'/ end=/'/ contains=erlangQuotedAtomModifier
+syn match erlangStringModifier     '\~\a\|\\\%(\o\{1,3}\|x\x\x\|x{\x\+}\|\^.\|.\)' contained
+syn match erlangQuotedAtomModifier '\~\a\|\\\%(\o\{1,3}\|x\x\x\|x{\x\+}\|\^.\|.\)' contained
+syn match erlangModifier           '\$\%([^\\]\|\\\%(\o\{1,3}\|x\x\x\|x{\x\+}\|\^.\|.\)\)'
+
+" Operators, separators
+syn match erlangOperator   '==\|=:=\|/=\|=/=\|<\|=<\|>\|>=\|++\|--\|=\|!\|<-\|+\|-\|\*\|\/'
+syn keyword erlangOperator div rem or xor bor bxor bsl bsr and band not bnot andalso orelse
+syn match erlangBracket    '{\|}\|\[\|]\||\|||'
+syn match erlangPipe       '|'
+syn match erlangRightArrow '->'
+
+" Atoms, function calls (order is important)
+syn match erlangAtom           '\<\l[[:alnum:]_@]*' contains=erlangBoolean
+syn keyword erlangBoolean      true false contained
+syn match erlangLocalFuncCall  '\<\a[[:alnum:]_@]*\>\%(\%(\s\|\n\|%.*\n\)*(\)\@=' contains=erlangBIF
+syn match erlangLocalFuncRef   '\<\a[[:alnum:]_@]*\>\%(\%(\s\|\n\|%.*\n\)*/\)\@='
+syn match erlangGlobalFuncCall '\<\%(\a[[:alnum:]_@]*\%(\s\|\n\|%.*\n\)*\.\%(\s\|\n\|%.*\n\)*\)*\a[[:alnum:]_@]*\%(\s\|\n\|%.*\n\)*:\%(\s\|\n\|%.*\n\)*\a[[:alnum:]_@]*\>\%(\%(\s\|\n\|%.*\n\)*(\)\@=' contains=erlangComment
+syn match erlangGlobalFuncRef  '\<\%(\a[[:alnum:]_@]*\%(\s\|\n\|%.*\n\)*\.\%(\s\|\n\|%.*\n\)*\)*\a[[:alnum:]_@]*\%(\s\|\n\|%.*\n\)*:\%(\s\|\n\|%.*\n\)*\a[[:alnum:]_@]*\>\%(\%(\s\|\n\|%.*\n\)*/\)\@=' contains=erlangComment
+
+" Variables, macros, records
+syn match erlangVariable '\<[A-Z_][[:alnum:]_@]*'
+syn match erlangMacro    '??\=[[:alnum:]_@]\+'
+syn match erlangMacro    '\%(-define(\)\@<=[[:alnum:]_@]\+'
+syn match erlangRecord   '#\s*\l[[:alnum:]_@]*'
+
+" Bitstrings
+syn match erlangBitType '\%(\/\%(\s\|\n\|%.*\n\)*\)\@<=\%(integer\|float\|binary\|bytes\|bitstring\|bits\|binary\|utf8\|utf16\|utf32\|signed\|unsigned\|big\|little\|native\|unit\)\%(\%(\s\|\n\|%.*\n\)*-\%(\s\|\n\|%.*\n\)*\%(integer\|float\|binary\|bytes\|bitstring\|bits\|binary\|utf8\|utf16\|utf32\|signed\|unsigned\|big\|little\|native\|unit\)\)*' contains=erlangComment
+
+" Constants and Directives
+syn match erlangUnknownAttribute '^\s*-\%(\s\|\n\|%.*\n\)*\l[[:alnum:]_@]*' contains=erlangComment
+syn match erlangAttribute '^\s*-\%(\s\|\n\|%.*\n\)*\%(behaviou\=r\|compile\|export\(_type\)\=\|file\|import\|module\|author\|copyright\|doc\|vsn\|on_load\)\>' contains=erlangComment
+syn match erlangInclude   '^\s*-\%(\s\|\n\|%.*\n\)*\%(include\|include_lib\)\>' contains=erlangComment
+syn match erlangRecordDef '^\s*-\%(\s\|\n\|%.*\n\)*record\>' contains=erlangComment
+syn match erlangDefine    '^\s*-\%(\s\|\n\|%.*\n\)*\%(define\|undef\)\>' contains=erlangComment
+syn match erlangPreCondit '^\s*-\%(\s\|\n\|%.*\n\)*\%(ifdef\|ifndef\|else\|endif\)\>' contains=erlangComment
+syn match erlangType      '^\s*-\%(\s\|\n\|%.*\n\)*\%(spec\|type\|opaque\|callback\)\>' contains=erlangComment
+
+" Keywords
+syn keyword erlangKeyword after begin case catch cond end fun if let of query
+syn keyword erlangKeyword receive when try
+
+" Build-in-functions (BIFs)
+syn keyword erlangBIF abs alive apply atom_to_binary atom_to_list contained
+syn keyword erlangBIF binary_part binary_to_atom contained
+syn keyword erlangBIF binary_to_existing_atom binary_to_float contained
+syn keyword erlangBIF binary_to_integer bitstring_to_list contained
+syn keyword erlangBIF binary_to_list binary_to_term bit_size contained
+syn keyword erlangBIF byte_size check_old_code check_process_code contained
+syn keyword erlangBIF concat_binary date delete_module demonitor contained
+syn keyword erlangBIF disconnect_node element erase error exit contained
+syn keyword erlangBIF float float_to_binary float_to_list contained
+syn keyword erlangBIF garbage_collect get get_keys group_leader contained
+syn keyword erlangBIF halt hd integer_to_binary integer_to_list contained
+syn keyword erlangBIF iolist_to_binary iolist_size is_alive contained
+syn keyword erlangBIF is_atom is_binary is_bitstring is_boolean contained
+syn keyword erlangBIF is_float is_function is_integer is_list contained
+syn keyword erlangBIF is_number is_pid is_port is_process_alive contained
+syn keyword erlangBIF is_record is_reference is_tuple length link contained
+syn keyword erlangBIF list_to_atom list_to_binary contained
+syn keyword erlangBIF list_to_bitstring list_to_existing_atom contained
+syn keyword erlangBIF list_to_float list_to_integer list_to_pid contained
+syn keyword erlangBIF list_to_tuple load_module make_ref max min contained
+syn keyword erlangBIF module_loaded monitor monitor_node node contained
+syn keyword erlangBIF nodes now open_port pid_to_list port_close contained
+syn keyword erlangBIF port_command port_connect pre_loaded contained
+syn keyword erlangBIF process_flag process_flag process_info contained
+syn keyword erlangBIF process purge_module put register registered contained
+syn keyword erlangBIF round self setelement size spawn spawn_link contained
+syn keyword erlangBIF spawn_monitor spawn_opt split_binary contained
+syn keyword erlangBIF statistics term_to_binary throw time tl contained
+syn keyword erlangBIF trunc tuple_size tuple_to_list unlink contained
+syn keyword erlangBIF unregister whereis contained
+
+" Sync at the beginning of functions: if this is not used, multiline string
+" are not always recognized, and the indentation script cannot use the
+" "searchpair" (because it would not always skip strings and comments when
+" looking for keywords and opening parens/brackets).
+syn sync match erlangSync grouphere NONE "^[a-z]\s*("
+let b:erlang_syntax_synced = 1
+
+" Define the default highlighting. See ":help group-name" for the groups and
+" their colors.
+
+let s:old_style = (exists("g:erlang_old_style_highlight") &&
+                  \g:erlang_old_style_highlight == 1)
+
+" 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_erlang_inits")
+  if version < 508
+    let did_erlang_inits = 1
+    command -nargs=+ HiLink hi link 
+  else
+    command -nargs=+ HiLink hi def link 
+  endif
+
+  " Comments
+  HiLink erlangComment Comment
+  HiLink erlangCommentAnnotation Special
+  HiLink erlangTodo Todo
+  HiLink erlangShebang Comment
+
+  " Numbers
+  HiLink erlangNumberInteger Number
+  HiLink erlangNumberFloat Float
+
+  " Strings, atoms, characters
+  HiLink erlangString String
+
+  if s:old_style
+    HiLink erlangQuotedAtom Type
+  else
+    HiLink erlangQuotedAtom String
+  endif
+
+  HiLink erlangStringModifier Special
+  HiLink erlangQuotedAtomModifier Special
+  HiLink erlangModifier Special
+
+  " Operators, separators
+  HiLink erlangOperator Operator
+  HiLink erlangRightArrow Operator
+  if s:old_style
+    HiLink erlangBracket Normal
+    HiLink erlangPipe Normal
+  else
+    HiLink erlangBracket Delimiter
+    HiLink erlangPipe Delimiter
+  endif
+
+  " Atoms, functions, variables, macros
+  if s:old_style
+    HiLink erlangAtom Normal
+    HiLink erlangLocalFuncCall Normal
+    HiLink erlangLocalFuncRef Normal
+    HiLink erlangGlobalFuncCall Function
+    HiLink erlangGlobalFuncRef Function
+    HiLink erlangVariable Normal
+    HiLink erlangMacro Normal
+    HiLink erlangRecord Normal
+  else
+    HiLink erlangAtom String
+    HiLink erlangLocalFuncCall Normal
+    HiLink erlangLocalFuncRef Normal
+    HiLink erlangGlobalFuncCall Normal
+    HiLink erlangGlobalFuncRef Normal
+    HiLink erlangVariable Identifier
+    HiLink erlangMacro Macro
+    HiLink erlangRecord Structure
+  endif
+
+  " Bitstrings
+  if !s:old_style
+    HiLink erlangBitType Type
+  endif
+
+  " Constants and Directives
+  if s:old_style
+    HiLink erlangAttribute Type
+    HiLink erlangMacroDef Type
+    HiLink erlangUnknownAttribute Normal
+    HiLink erlangInclude Type
+    HiLink erlangRecordDef Type
+    HiLink erlangDefine Type
+    HiLink erlangPreCondit Type
+    HiLink erlangType Type
+  else
+    HiLink erlangAttribute Keyword
+    HiLink erlangMacroDef Macro
+    HiLink erlangUnknownAttribute Normal
+    HiLink erlangInclude Include
+    HiLink erlangRecordDef Keyword
+    HiLink erlangDefine Define
+    HiLink erlangPreCondit PreCondit
+    HiLink erlangType Type
+  endif
+
+  " Keywords
+  HiLink erlangKeyword Keyword
+
+  " Build-in-functions (BIFs)
+  HiLink erlangBIF Function
+
+  if s:old_style
+    HiLink erlangBoolean Statement
+    HiLink erlangExtra Statement
+    HiLink erlangSignal Statement
+  else
+    HiLink erlangBoolean Boolean
+    HiLink erlangExtra Statement
+    HiLink erlangSignal Statement
+  endif
+
+  delcommand HiLink
+endif
+
+let b:current_syntax = "erlang"
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
+
+" vim: sw=2 et
diff --git a/runtime/syntax/eruby.vim b/runtime/syntax/eruby.vim
index 42c8b51065..c20b086ba5 100644
--- a/runtime/syntax/eruby.vim
+++ b/runtime/syntax/eruby.vim
@@ -1,9 +1,7 @@
 " Vim syntax file
 " Language:		eRuby
 " Maintainer:		Tim Pope 
-" Last Change:		2010 Apr 15
-" URL:			http://vim-ruby.rubyforge.org
-" Anon CVS:		See above site
+" URL:			https://github.com/vim-ruby/vim-ruby
 " Release Coordinator:	Doug Kearns 
 
 if exists("b:current_syntax")
@@ -18,12 +16,11 @@ if !exists("g:eruby_default_subtype")
   let g:eruby_default_subtype = "html"
 endif
 
-if !exists("b:eruby_subtype") && main_syntax == 'eruby'
+if &filetype =~ '^eruby\.'
+  let b:eruby_subtype = matchstr(&filetype,'^eruby\.\zs\w\+')
+elseif !exists("b:eruby_subtype") && main_syntax == 'eruby'
   let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$")
   let b:eruby_subtype = matchstr(s:lines,'eruby_subtype=\zs\w\+')
-  if b:eruby_subtype == ''
-    let b:eruby_subtype = matchstr(&filetype,'^eruby\.\zs\w\+')
-  endif
   if b:eruby_subtype == ''
     let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\|\.eruby\|\.erubis\)\+$','',''),'\.\zs\w\+$')
   endif
@@ -61,7 +58,7 @@ syn cluster erubyRegions contains=erubyOneLiner,erubyBlock,erubyExpression,eruby
 exe 'syn region  erubyOneLiner   matchgroup=erubyDelimiter start="^%\{1,'.b:eruby_nest_level.'\}%\@!"    end="$"     contains=@rubyTop	     containedin=ALLBUT,@erubyRegions keepend oneline'
 exe 'syn region  erubyBlock      matchgroup=erubyDelimiter start="<%\{1,'.b:eruby_nest_level.'\}%\@!-\=" end="[=-]\=%\@" contains=@rubyTop  containedin=ALLBUT,@erubyRegions keepend'
 exe 'syn region  erubyExpression matchgroup=erubyDelimiter start="<%\{1,'.b:eruby_nest_level.'\}=\{1,4}" end="[=-]\=%\@" contains=@rubyTop  containedin=ALLBUT,@erubyRegions keepend'
-exe 'syn region  erubyComment    matchgroup=erubyDelimiter start="<%\{1,'.b:eruby_nest_level.'\}#"       end="%\@" contains=rubyTodo,@Spell containedin=ALLBUT,@erubyRegions keepend'
+exe 'syn region  erubyComment    matchgroup=erubyDelimiter start="<%\{1,'.b:eruby_nest_level.'\}-\=#"    end="[=-]\=%\@" contains=rubyTodo,@Spell containedin=ALLBUT,@erubyRegions keepend'
 
 " Define the default highlighting.
 
diff --git a/runtime/syntax/esmtprc.vim b/runtime/syntax/esmtprc.vim
index b36739ac20..b22b1a1416 100644
--- a/runtime/syntax/esmtprc.vim
+++ b/runtime/syntax/esmtprc.vim
@@ -12,23 +12,23 @@ elseif exists("b:current_syntax")
 endif
 
 "All options
-:syntax keyword	esmtprcOptions hostname username password starttls certificate_passphrase preconnect identity mda
+syntax keyword	esmtprcOptions hostname username password starttls certificate_passphrase preconnect identity mda
 
 "All keywords
-:syntax keyword esmtprcIdentifier default enabled disabled required
+syntax keyword esmtprcIdentifier default enabled disabled required
 
 "We're trying to be smarer than /."*@.*/ :)
-:syntax match esmtprcAddress /[a-z0-9_.-]*[a-z0-9]\+@[a-z0-9_.-]*[a-z0-9]\+\.[a-z]\+/
-:syntax match esmtprcFulladd /[a-z0-9_.-]*[a-z0-9]\+\.[a-z]\+:[0-9]\+/
+syntax match esmtprcAddress /[a-z0-9_.-]*[a-z0-9]\+@[a-z0-9_.-]*[a-z0-9]\+\.[a-z]\+/
+syntax match esmtprcFulladd /[a-z0-9_.-]*[a-z0-9]\+\.[a-z]\+:[0-9]\+/
  
 "String..
-:syntax region esmtprcString start=/"/ end=/"/
+syntax region esmtprcString start=/"/ end=/"/
 
 
-:highlight link esmtprcOptions		Label
-:highlight link esmtprcString 		String
-:highlight link esmtprcAddress		Type
-:highlight link esmtprcIdentifier 	Identifier
-:highlight link esmtprcFulladd		Include
+highlight link esmtprcOptions		Label
+highlight link esmtprcString 		String
+highlight link esmtprcAddress		Type
+highlight link esmtprcIdentifier 	Identifier
+highlight link esmtprcFulladd		Include
 
-let b:current_syntax="esmtprc"
+let b:current_syntax = "esmtprc"
diff --git a/runtime/syntax/falcon.vim b/runtime/syntax/falcon.vim
index 0ff500ccc9..1f6fefa9ff 100644
--- a/runtime/syntax/falcon.vim
+++ b/runtime/syntax/falcon.vim
@@ -3,8 +3,8 @@
 " Maintainer:   Steven Oliver 
 " Website:      http://github.com/steveno/vim-files/blob/master/syntax/falcon.vim
 " Credits:      Thanks the ruby.vim authors, I borrowed a lot!
+"               Thanks to the lisp authors for the rainbow code!
 " -------------------------------------------------------------------------------
-" GetLatestVimScripts: 2745 1 :AutoInstall: falcon.vim
 
 " When wanted, highlight the trailing whitespace.
 if exists("c_space_errors")
@@ -56,6 +56,7 @@ syn keyword falconBool true false
 
 " Constants
 syn keyword falconConst PI E nil
+syn match   falconConstant  "\%(\%([.@$]\@\|::\)\@=\%(\s*(\)\@!"
 
 " Comments
 syn match falconCommentSkip contained "^\s*\*\($\|\s\+\)"
@@ -116,6 +117,47 @@ syn region falconString start=+\%(\%(class\s*\|\%([]}).]\|::\)\)\_s*\|\w\)\@
-" URL: http://ld.yi.org/vim/fstab.vim
-" Last Change: 2009 Feb 04
-" Version: 0.93
+" Maintainer: Radu Dineiu 
+" URL: https://raw.github.com/rid9/vim-fstab/master/fstab.vim
+" Last Change: 2013 May 21
+" Version: 1.0
 "
 " Credits:
 "   David Necas (Yeti) 
@@ -11,10 +11,13 @@
 "   Georgi Georgiev 
 "   James Vega 
 "   Elias Probst 
-"
+
 " Options:
 "   let fstab_unknown_fs_errors = 1
 "     highlight unknown filesystems as errors
+"
+"   let fstab_unknown_device_errors = 0
+"     do not highlight unknown devices as errors
 
 if version < 600
 	syntax clear
@@ -22,15 +25,18 @@ elseif exists("b:current_syntax")
 	finish
 endif
 
+let s:cpo_save = &cpo
+set cpo&vim
+
 " General
 syn cluster fsGeneralCluster contains=fsComment
-syn match fsComment /\s*#.*/
+syn match fsComment /\s*#.*/ contains=@Spell
 syn match fsOperator /[,=:#]/
 
 " Device
 syn cluster fsDeviceCluster contains=fsOperator,fsDeviceKeyword,fsDeviceError
 syn match fsDeviceError /\%([^a-zA-Z0-9_\/#@:\.-]\|^\w\{-}\ze\W\)/ contained
-syn keyword fsDeviceKeyword contained none proc linproc tmpfs devpts sysfs usbfs
+syn keyword fsDeviceKeyword contained none proc linproc tmpfs devpts devtmpfs sysfs usbfs
 syn keyword fsDeviceKeyword contained LABEL nextgroup=fsDeviceLabel
 syn keyword fsDeviceKeyword contained UUID nextgroup=fsDeviceUUID
 syn keyword fsDeviceKeyword contained sshfs nextgroup=fsDeviceSshfs
@@ -47,7 +53,7 @@ syn keyword fsMountPointKeyword contained none swap
 " Type
 syn cluster fsTypeCluster contains=fsTypeKeyword,fsTypeUnknown
 syn match fsTypeUnknown /\s\+\zs\w\+/ contained
-syn keyword fsTypeKeyword contained adfs ados affs atfs audiofs auto autofs befs bfs cd9660 cfs cifs coda cramfs devfs devpts e2compr efs ext2 ext2fs ext3 ext4 fdesc ffs filecore fuse hfs hpfs iso9660 jffs jffs2 jfs kernfs lfs linprocfs mfs minix msdos ncpfs nfs none ntfs null nwfs overlay ovlfs portal proc procfs ptyfs qnx4 reiserfs romfs shm smbfs sshfs std subfs swap sysfs sysv tcfs tmpfs udf ufs umap umsdos union usbfs userfs vfat vs3fs vxfs wrapfs wvfs xfs zisofs
+syn keyword fsTypeKeyword contained adfs ados affs anon_inodefs atfs audiofs auto autofs bdev befs bfs btrfs binfmt_misc cd9660 cfs cgroup cifs coda configfs cpuset cramfs devfs devpts devtmpfs e2compr efs ext2 ext2fs ext3 ext4 fdesc ffs filecore fuse fuseblk fusectl hfs hpfs hugetlbfs iso9660 jffs jffs2 jfs kernfs lfs linprocfs mfs minix mqueue msdos ncpfs nfs nfsd nilfs2 none ntfs null nwfs overlay ovlfs pipefs portal proc procfs pstore ptyfs qnx4 reiserfs ramfs romfs securityfs shm smbfs squashfs sockfs sshfs std subfs swap sysfs sysv tcfs tmpfs udf ufs umap umsdos union usbfs userfs vfat vs3fs vxfs wrapfs wvfs xenfs xfs zisofs
 
 " Options
 " -------
@@ -71,6 +77,11 @@ syn match fsOptionsKeywords contained /\<\%(prefix\|volume\|root\)=/ nextgroup=f
 syn match fsOptionsKeywords contained /\/
-syn keyword fsOptionsKeywords contained acl bsddf minixdf debug grpid bsdgroups minixdf noacl nocheck nogrpid oldalloc orlov sysvgroups nouid32 nobh user_xattr nouser_xattr
+syn keyword fsOptionsKeywords contained acl bsddf minixdf debug grpid bsdgroups minixdf nocheck nogrpid oldalloc orlov sysvgroups nouid32 nobh user_xattr nouser_xattr
 
 " Options: ext3
 syn match fsOptionsKeywords contained /\= 508 || !exists("did_config_syntax_inits")
 	if version < 508
@@ -241,7 +252,10 @@ if version >= 508 || !exists("did_config_syntax_inits")
 		HiLink fsTypeUnknown Error
 	endif
 
-	HiLink fsDeviceError Error
+	if !exists('fstab_unknown_device_errors') || fstab_unknown_device_errors == 1
+		HiLink fsDeviceError Error
+	endif
+
 	HiLink fsMountPointError Error
 	HiLink fsMountPointKeyword Keyword
 	HiLink fsFreqPassError Error
@@ -277,4 +291,7 @@ endif
 
 let b:current_syntax = "fstab"
 
+let &cpo = s:cpo_save
+unlet s:cpo_save
+
 " vim: ts=8 ft=vim
diff --git a/runtime/syntax/gdb.vim b/runtime/syntax/gdb.vim
index aada70e547..64e89cce7f 100644
--- a/runtime/syntax/gdb.vim
+++ b/runtime/syntax/gdb.vim
@@ -2,7 +2,7 @@
 " Language:	GDB command files
 " Maintainer:	Claudio Fleiner 
 " URL:		http://www.fleiner.com/vim/syntax/gdb.vim
-" Last Change:	2009 May 25
+" Last Change:	2012 Oct 05
 
 " For version 5.x: Clear all syntax items
 " For version 6.x: Quit when a syntax file was already loaded
@@ -12,6 +12,9 @@ elseif exists("b:current_syntax")
   finish
 endif
 
+let s:cpo_save = &cpo
+set cpo&vim
+
 syn keyword gdbInfo contained address architecture args breakpoints catch common copying dcache
 syn keyword gdbInfo contained display files float frame functions handle line
 syn keyword gdbInfo contained locals program registers scope set sharedlibrary signals
@@ -32,7 +35,7 @@ syn match gdbFuncDef "\.*"
 syn match gdbStatmentContainer "^\s*\S\+" contains=gdbStatement,gdbFuncDef
 syn match gdbStatement "^\s*info" nextgroup=gdbInfo skipwhite skipempty
 
-" some commonly used abreviations
+" some commonly used abbreviations
 syn keyword gdbStatement c disp undisp disas p
 
 syn region gdbDocument matchgroup=gdbFuncDef start="\.*$" matchgroup=gdbFuncDef end="^end\s*$"
@@ -65,12 +68,12 @@ syn match gdbSet "\"
 syn match gdbSet "\"
 syn match gdbSet "\"
 
-syn match gdbComment "^\s*#.*"
+syn match gdbComment "^\s*#.*" contains=@Spell
 
 syn match gdbVariable "\$\K\k*"
 
 " Strings and constants
-syn region  gdbString		start=+"+  skip=+\\\\\|\\"+  end=+"+
+syn region  gdbString		start=+"+  skip=+\\\\\|\\"+  end=+"+ contains=@Spell
 syn match   gdbCharacter	"'[^']*'" contains=gdbSpecialChar,gdbSpecialCharError
 syn match   gdbCharacter	"'\\''" contains=gdbSpecialChar
 syn match   gdbCharacter	"'[^\\]'"
@@ -108,4 +111,6 @@ endif
 
 let b:current_syntax = "gdb"
 
+let &cpo = s:cpo_save
+unlet s:cpo_save
 " vim: ts=8
diff --git a/runtime/syntax/gitcommit.vim b/runtime/syntax/gitcommit.vim
index 83cd4733f4..b0315a9465 100644
--- a/runtime/syntax/gitcommit.vim
+++ b/runtime/syntax/gitcommit.vim
@@ -2,7 +2,7 @@
 " Language:	git commit file
 " Maintainer:	Tim Pope 
 " Filenames:	*.git/COMMIT_EDITMSG
-" Last Change:	2012 April 7
+" Last Change:	2013 May 30
 
 if exists("b:current_syntax")
   finish
diff --git a/runtime/syntax/gitrebase.vim b/runtime/syntax/gitrebase.vim
index 084645630a..a7460280d3 100644
--- a/runtime/syntax/gitrebase.vim
+++ b/runtime/syntax/gitrebase.vim
@@ -2,7 +2,7 @@
 " Language:	git rebase --interactive
 " Maintainer:	Tim Pope 
 " Filenames:	git-rebase-todo
-" Last Change:	2012 April 7
+" Last Change:	2013 May 30
 
 if exists("b:current_syntax")
   finish
diff --git a/runtime/syntax/gprof.vim b/runtime/syntax/gprof.vim
new file mode 100644
index 0000000000..381a3c63b0
--- /dev/null
+++ b/runtime/syntax/gprof.vim
@@ -0,0 +1,69 @@
+" Vim syntax file
+" Language: Syntax for Gprof Output
+" Maintainer: Dominique Pelle 
+" Last Change: 2013 Jun 09
+
+" Quit when a syntax file was already loaded
+if exists("b:current_syntax")
+	finish
+endif
+let s:keepcpo= &cpo
+set cpo&vim
+
+syn case match
+syn sync minlines=100
+
+" Flat profile
+syn match gprofFlatProfileTitle
+  \ "^Flat profile:$" 
+syn region gprofFlatProfileHeader 
+  \ start="^Each sample counts as.*"
+  \ end="^ time.*name\s*$"
+syn region gprofFlatProfileTrailer
+  \ start="^\s*%\s\+the percentage of the total running time.*"
+  \ end="^\s*the gprof listing if it were to be printed\."
+
+" Call graph
+syn match gprofCallGraphTitle "Call graph (explanation follows)"
+syn region gprofCallGraphHeader
+  \ start="^granularity: each sample hit covers.*"
+  \ end="^\s*index % time\s\+self\s\+children\s\+called\s\+name$"
+syn match gprofCallGraphFunction "\s\+\(\d\+\.\d\+\s\+\)\{3}\([0-9+]\+\)\?\s\+[a-zA-Z_<].*\ze\["
+syn match gprofCallGraphSeparator "^-\+$"
+syn region gprofCallGraphTrailer
+  \ start="This table describes the call tree of the program"
+  \ end="^\s*the cycle\.$"
+
+" Index
+syn region gprofIndex
+  \ start="^Index by function name$"
+  \ end="\%$"
+
+syn match gprofIndexFunctionTitle "^Index by function name$"
+
+syn match gprofNumbers "^\s\+[0-9 ./+]\+"
+syn match gprofFunctionIndex "\[\d\+\]"
+syn match gprofSpecial "<\(spontaneous\|cycle \d\+\)>"
+
+hi def link gprofFlatProfileTitle      Title
+hi def link gprofFlatProfileHeader     Comment
+hi def link gprofFlatProfileFunction   Number
+hi def link gprofFlatProfileTrailer    Comment
+
+hi def link gprofCallGraphTitle        Title
+hi def link gprofCallGraphHeader       Comment
+hi def link gprofFlatProfileFunction   Number
+hi def link gprofCallGraphFunction     Special
+hi def link gprofCallGraphTrailer      Comment
+hi def link gprofCallGraphSeparator    Label
+
+hi def link gprofFunctionIndex         Label
+hi def link gprofSpecial               SpecialKey
+hi def link gprofNumbers               Number
+
+hi def link gprofIndexFunctionTitle Title
+
+let b:current_syntax = "gprof"
+
+let &cpo = s:keepcpo
+unlet s:keepcpo
diff --git a/runtime/syntax/groovy.vim b/runtime/syntax/groovy.vim
index 5b256f3989..2056bd16d0 100644
--- a/runtime/syntax/groovy.vim
+++ b/runtime/syntax/groovy.vim
@@ -2,9 +2,9 @@
 " Language:	Groovy
 " Original Author:	Alessio Pace 
 " Maintainer:	Tobias Rapp 
-" Version: 	0.1.11
+" Version: 	0.1.13
 " URL:	  http://www.vim.org/scripts/script.php?script_id=945
-" Last Change:	2012 Jan 08
+" Last Change:	2013 Apr 24
 
 " THE ORIGINAL AUTHOR'S NOTES:
 "
@@ -74,7 +74,7 @@ endif
 
 " keyword definitions
 syn keyword groovyExternal        native package
-syn match groovyExternal          "\\)\?"
+syn match groovyExternal          "\\(\s\+static\>\)\?"
 syn keyword groovyError           goto const
 syn keyword groovyConditional     if else switch
 syn keyword groovyRepeat          while for do
@@ -250,13 +250,17 @@ syn match   groovyComment          "/\*\*/"
 " Strings and constants
 syn match   groovySpecialError     contained "\\."
 syn match   groovySpecialCharError contained "[^']"
-syn match   groovySpecialChar      contained "\\\([4-9]\d\|[0-3]\d\d\|[\"\\'ntbrf]\|u\x\{4\}\)"
+syn match   groovySpecialChar      contained "\\\([4-9]\d\|[0-3]\d\d\|[\"\\'ntbrf]\|u\x\{4\}\|\$\)"
+syn match   groovyRegexChar        contained "\\."
 syn region  groovyString          start=+"+ end=+"+ end=+$+ contains=groovySpecialChar,groovySpecialError,@Spell,groovyELExpr
 syn region  groovyString          start=+'+ end=+'+ end=+$+ contains=groovySpecialChar,groovySpecialError,@Spell
 syn region  groovyString          start=+"""+ end=+"""+ contains=groovySpecialChar,groovySpecialError,@Spell,groovyELExpr
 syn region  groovyString          start=+'''+ end=+'''+ contains=groovySpecialChar,groovySpecialError,@Spell
+" regex string
+syn region groovyString           start='/[^/]'  end='/' contains=groovySpecialChar,groovyRegexChar,groovyELExpr
 " syn region groovyELExpr start=+${+ end=+}+ keepend contained
- syn match groovyELExpr /\${.\{-}}/ contained
+syn match groovyELExpr /\${.\{-}}/ contained
+syn match groovyELExpr /\$[a-zA-Z_][a-zA-Z0-9_.]*/ contained
 GroovyHiLink groovyELExpr Identifier
 
 " TODO: better matching. I am waiting to understand how it really works in groovy
@@ -415,6 +419,7 @@ if version >= 508 || !exists("did_groovy_syn_inits")
   GroovyHiLink groovySpecialError	Error
   GroovyHiLink groovySpecialCharError	Error
   GroovyHiLink groovyString		String
+  GroovyHiLink groovyRegexChar		String
   GroovyHiLink groovyCharacter		Character
   GroovyHiLink groovySpecialChar	SpecialChar
   GroovyHiLink groovyNumber		Number
diff --git a/runtime/syntax/help.vim b/runtime/syntax/help.vim
index af97543c33..807c78b8c4 100644
--- a/runtime/syntax/help.vim
+++ b/runtime/syntax/help.vim
@@ -1,7 +1,7 @@
 " Vim syntax file
 " Language:	Vim help file
 " Maintainer:	Bram Moolenaar (Bram@vim.org)
-" Last Change:	2012 Jul 16
+" Last Change:	2013 Jul 07
 
 " Quit when a (custom) syntax file was already loaded
 if exists("b:current_syntax")
@@ -14,7 +14,11 @@ set cpo&vim
 syn match helpHeadline		"^[-A-Z .][-A-Z0-9 .()]*[ \t]\+\*"me=e-1
 syn match helpSectionDelim	"^===.*===$"
 syn match helpSectionDelim	"^---.*--$"
-syn region helpExample		matchgroup=helpIgnore start=" >$" start="^>$" end="^[^ \t]"me=e-1 end="^<"
+if has("conceal")
+  syn region helpExample	matchgroup=helpIgnore start=" >$" start="^>$" end="^[^ \t]"me=e-1 end="^<" concealends
+else
+  syn region helpExample	matchgroup=helpIgnore start=" >$" start="^>$" end="^[^ \t]"me=e-1 end="^<"
+endif
 if has("ebcdic")
   syn match helpHyperTextJump	"\\\@.,]\+}"
 syn match helpSpecial		"{[-a-zA-Z0-9'"*+/:%#=[\]<>.,]\+}"
 syn match helpSpecial		"\s\[[-a-z^A-Z0-9_]\{2,}]"ms=s+1
 syn match helpSpecial		"<[-a-zA-Z0-9_]\+>"
@@ -150,6 +155,7 @@ syn sync minlines=40
 hi def link helpIgnore		Ignore
 hi def link helpHyperTextJump	Subtitle
 hi def link helpBar		Ignore
+hi def link helpBacktick	Ignore
 hi def link helpStar		Ignore
 hi def link helpHyperTextEntry	String
 hi def link helpHeadline	Statement
diff --git a/runtime/syntax/hgcommit.vim b/runtime/syntax/hgcommit.vim
index e4c8b6ed44..37fe9db8bf 100644
--- a/runtime/syntax/hgcommit.vim
+++ b/runtime/syntax/hgcommit.vim
@@ -1,7 +1,7 @@
 " Vim syntax file
 " Language:	hg (Mercurial) commit file
 " Maintainer:	Ken Takata 
-" Last Change:	2012 Aug 2
+" Last Change:	2012 Aug 23
 " Filenames:	hg-editor-*.txt
 " License:	VIM License
 " URL:		https://github.com/k-takata/hg-vim
@@ -10,12 +10,12 @@ if exists("b:current_syntax")
   finish
 endif
 
-syn match hgcommitComment "^HG:.*$"
-syn match hgcommitUser    "^HG: user: \zs.*$"   contained containedin=hgcommitComment
-syn match hgcommitBranch  "^HG: branch \zs.*$"  contained containedin=hgcommitComment
-syn match hgcommitAdded   "^HG: \zsadded .*$"   contained containedin=hgcommitComment
-syn match hgcommitChanged "^HG: \zschanged .*$" contained containedin=hgcommitComment
-syn match hgcommitRemoved "^HG: \zsremoved .*$" contained containedin=hgcommitComment
+syn match hgcommitComment "^HG:.*$"             contains=@NoSpell
+syn match hgcommitUser    "^HG: user: \zs.*$"   contains=@NoSpell contained containedin=hgcommitComment
+syn match hgcommitBranch  "^HG: branch \zs.*$"  contains=@NoSpell contained containedin=hgcommitComment
+syn match hgcommitAdded   "^HG: \zsadded .*$"   contains=@NoSpell contained containedin=hgcommitComment
+syn match hgcommitChanged "^HG: \zschanged .*$" contains=@NoSpell contained containedin=hgcommitComment
+syn match hgcommitRemoved "^HG: \zsremoved .*$" contains=@NoSpell contained containedin=hgcommitComment
 
 hi def link hgcommitComment Comment
 hi def link hgcommitUser    String
diff --git a/runtime/syntax/html.vim b/runtime/syntax/html.vim
index 137c13c5b0..d59126dede 100644
--- a/runtime/syntax/html.vim
+++ b/runtime/syntax/html.vim
@@ -2,7 +2,7 @@
 " Language:	HTML
 " Maintainer:	Claudio Fleiner 
 " URL:		http://www.fleiner.com/vim/syntax/html.vim
-" Last Change:  2006 Jun 19
+" Last Change:	2012 Oct 05
 
 " Please check :help html.vim for some comments and a description of the options
 
@@ -17,6 +17,9 @@ if !exists("main_syntax")
   let main_syntax = 'html'
 endif
 
+let s:cpo_save = &cpo
+set cpo&vim
+
 " don't use standard HiLink, it will not work with included syntax files
 if version < 508
   command! -nargs=+ HtmlHiLink hi link 
@@ -37,7 +40,7 @@ syn region  htmlString   contained start=+"+ end=+"+ contains=htmlSpecialChar,ja
 syn region  htmlString   contained start=+'+ end=+'+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc
 syn match   htmlValue    contained "=[\t ]*[^'" \t>][^ \t>]*"hs=s+1   contains=javaScriptExpression,@htmlPreproc
 syn region  htmlEndTag             start=++ contains=htmlTagN,htmlTagError
-syn region  htmlTag                start=+<[^/]+   end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster
+syn region  htmlTag                start=+<[^/]+   end=+>+ fold contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster
 syn match   htmlTagN     contained +<\s*[-a-zA-Z0-9]\++hs=s+1 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster
 syn match   htmlTagN     contained +]<"ms=s+1
@@ -98,11 +101,11 @@ syn match htmlSpecialChar "&#\=[0-9A-Za-z]\{1,8};"
 
 " Comments (the real ones or the old netscape ones)
 if exists("html_wrong_comments")
-  syn region htmlComment                start=++ contains=prologComment,prologCComment,prologString
+syn keyword  prologKeyword  module meta_predicate multifile dynamic
+syn match    prologCharCode +0'\\\=.+
+syn region   prologString   start=+"+ skip=+\\\\\|\\"+ end=+"+
+syn region   prologAtom     start=+'+ skip=+\\\\\|\\'+ end=+'+
+syn region   prologClause   matchgroup=prologClauseHead start=+^\s*[a-z]\w*+ matchgroup=Normal end=+\.\s\|\.$+ contains=ALLBUT,prologClause
 
 if !exists("prolog_highlighting_clean")
 
@@ -40,12 +40,12 @@ if !exists("prolog_highlighting_clean")
   syn keyword prologKeyword   arg     current_prolog_flag     put_char
   syn keyword prologKeyword   asserta fail    put_code
   syn keyword prologKeyword   assertz findall read
-  syn keyword prologKeyword   at_end_of_stream	      float   read_term
+  syn keyword prologKeyword   at_end_of_stream        float   read_term
   syn keyword prologKeyword   atom    flush_output    repeat
   syn keyword prologKeyword   atom_chars      functor retract
-  syn keyword prologKeyword   atom_codes      get_byte	      set_input
-  syn keyword prologKeyword   atom_concat     get_char	      set_output
-  syn keyword prologKeyword   atom_length     get_code	      set_prolog_flag
+  syn keyword prologKeyword   atom_codes      get_byte        set_input
+  syn keyword prologKeyword   atom_concat     get_char        set_output
+  syn keyword prologKeyword   atom_length     get_code        set_prolog_flag
   syn keyword prologKeyword   atomic  halt    set_stream_position
   syn keyword prologKeyword   bagof   integer setof
   syn keyword prologKeyword   call    is      stream_property
@@ -54,7 +54,7 @@ if !exists("prolog_highlighting_clean")
   syn keyword prologKeyword   char_conversion number  true
   syn keyword prologKeyword   clause  number_chars    unify_with_occurs_check
   syn keyword prologKeyword   close   number_codes    var
-  syn keyword prologKeyword   compound	      once    write
+  syn keyword prologKeyword   compound        once    write
   syn keyword prologKeyword   copy_term       op      write_canonical
   syn keyword prologKeyword   current_char_conversion open    write_term
   syn keyword prologKeyword   current_input   peek_byte       writeq
@@ -63,11 +63,13 @@ if !exists("prolog_highlighting_clean")
   syn match   prologOperator "=\\=\|=:=\|\\==\|=<\|==\|>=\|\\=\|\\+\|<\|>\|="
   syn match   prologAsIs     "===\|\\===\|<=\|=>"
 
-  syn match   prologNumber	      "\<[0123456789]*\>'\@!"
+  syn match   prologNumber            "\<[0123456789]*\>'\@!"
   syn match   prologCommentError      "\*/"
   syn match   prologSpecialCharacter  ";"
   syn match   prologSpecialCharacter  "!"
-  syn match   prologQuestion	      "?-.*\."	contains=prologNumber
+  syn match   prologSpecialCharacter  ":-"
+  syn match   prologSpecialCharacter  "-->"
+  syn match   prologQuestion          "?-.*\."  contains=prologNumber
 
 
 endif
@@ -87,27 +89,29 @@ if version >= 508 || !exists("did_prolog_syn_inits")
   endif
 
   " The default highlighting.
-  HiLink prologComment		Comment
-  HiLink prologCComment		Comment
-  HiLink prologCharCode		Special
+  HiLink prologComment          Comment
+  HiLink prologCComment         Comment
+  HiLink prologCharCode         Special
 
   if exists ("prolog_highlighting_clean")
 
-    HiLink prologKeyword	Statement
-    HiLink prologClauseHead	Statement
+    HiLink prologKeyword        Statement
+    HiLink prologClauseHead     Statement
+    HiLink prologClause Normal
 
   else
 
-    HiLink prologKeyword	Keyword
-    HiLink prologClauseHead	Constant
-    HiLink prologQuestion	PreProc
+    HiLink prologKeyword        Keyword
+    HiLink prologClauseHead     Constant
+    HiLink prologClause Normal
+    HiLink prologQuestion       PreProc
     HiLink prologSpecialCharacter Special
-    HiLink prologNumber		Number
-    HiLink prologAsIs		Normal
-    HiLink prologCommentError	Error
-    HiLink prologAtom		String
-    HiLink prologString		String
-    HiLink prologOperator	Operator
+    HiLink prologNumber         Number
+    HiLink prologAsIs           Normal
+    HiLink prologCommentError   Error
+    HiLink prologAtom           String
+    HiLink prologString         String
+    HiLink prologOperator       Operator
 
   endif
 
diff --git a/runtime/syntax/proto.vim b/runtime/syntax/proto.vim
new file mode 100644
index 0000000000..4d6a77e84a
--- /dev/null
+++ b/runtime/syntax/proto.vim
@@ -0,0 +1,74 @@
+" syntax file for Protocol Buffers - Google's data interchange format
+"
+" Copyright 2008 Google Inc.  All rights reserved.
+"
+" 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.
+"
+" http://code.google.com/p/protobuf/
+
+if version < 600
+  syntax clear
+elseif exists("b:current_syntax")
+  finish
+endif
+
+syn case match
+
+syn keyword protoTodo       contained TODO FIXME XXX
+syn cluster protoCommentGrp contains=protoTodo
+
+syn keyword protoSyntax     syntax import option
+syn keyword protoStructure  package message group
+syn keyword protoRepeat     optional required repeated
+syn keyword protoDefault    default
+syn keyword protoExtend     extend extensions to max
+syn keyword protoRPC        service rpc returns
+
+syn keyword protoType      int32 int64 uint32 uint64 sint32 sint64
+syn keyword protoType      fixed32 fixed64 sfixed32 sfixed64
+syn keyword protoType      float double bool string bytes
+syn keyword protoTypedef   enum
+syn keyword protoBool      true false
+
+syn match   protoInt     /-\?\<\d\+\>/
+syn match   protoInt     /\<0[xX]\x+\>/
+syn match   protoFloat   /\<-\?\d*\(\.\d*\)\?/
+syn region  protoComment start="\/\*" end="\*\/" contains=@protoCommentGrp
+syn region  protoComment start="//" skip="\\$" end="$" keepend contains=@protoCommentGrp
+syn region  protoString  start=/"/ skip=/\\./ end=/"/
+syn region  protoString  start=/'/ skip=/\\./ end=/'/
+
+hi def link protoTodo         Todo
+
+hi def link protoSyntax       Include
+hi def link protoStructure    Structure
+hi def link protoRepeat       Repeat
+hi def link protoDefault      Keyword
+hi def link protoExtend       Keyword
+hi def link protoRPC          Keyword
+hi def link protoType         Type
+hi def link protoTypedef      Typedef
+hi def link protoBool         Boolean
+
+hi def link protoInt          Number
+hi def link protoFloat        Float
+hi def link protoComment      Comment
+hi def link protoString       String
+
+let b:current_syntax = "proto"
diff --git a/runtime/syntax/python.vim b/runtime/syntax/python.vim
index 0cdf9c4e40..71b4405e95 100644
--- a/runtime/syntax/python.vim
+++ b/runtime/syntax/python.vim
@@ -1,7 +1,7 @@
 " Vim syntax file
 " Language:	Python
 " Maintainer:	Neil Schemenauer 
-" Last Change:	2010 Sep 21
+" Last Change:	2013 Feb 26
 " Credits:	Zvezdan Petkovic 
 "		Neil Schemenauer 
 "		Dmitry Vasiliev
@@ -236,7 +236,7 @@ endif
 " Notice that the end of a string, either ''', or """, will end the contained
 " doctest too.  Thus, we do *not* need to have it as an end pattern.
 if !exists("python_no_doctest_highlight")
-  if !exists("python_no_doctest_code_higlight")
+  if !exists("python_no_doctest_code_highlight")
     syn region pythonDoctest
 	  \ start="^\s*>>>\s" end="^\s*$"
 	  \ contained contains=ALLBUT,pythonDoctest,@Spell
diff --git a/runtime/syntax/r.vim b/runtime/syntax/r.vim
index 8912ba191e..5e76e7af7f 100644
--- a/runtime/syntax/r.vim
+++ b/runtime/syntax/r.vim
@@ -3,7 +3,7 @@
 " Maintainer:	      Jakson Aquino 
 " Former Maintainers: Vaidotas Zemlys 
 " 		      Tom Payne 
-" Last Change:	      Sun Feb 20, 2011  12:06PM
+" Last Change:	      Sun May 19, 2013  05:59PM
 " Filenames:	      *.R *.r *.Rhistory *.Rt
 " 
 " NOTE: The highlighting of R functions is defined in the
@@ -30,7 +30,16 @@ endif
 syn case match
 
 " Comment
-syn match rComment contains=@Spell "\#.*"
+syn match rComment contains=@Spell "#.*"
+
+" Roxygen
+syn match rOKeyword contained "@\(param\|return\|name\|rdname\|examples\|include\|docType\)"
+syn match rOKeyword contained "@\(S3method\|TODO\|aliases\|alias\|assignee\|author\|callGraphDepth\|callGraph\)"
+syn match rOKeyword contained "@\(callGraphPrimitives\|concept\|exportClass\|exportMethod\|exportPattern\|export\|formals\)"
+syn match rOKeyword contained "@\(format\|importClassesFrom\|importFrom\|importMethodsFrom\|import\|keywords\)"
+syn match rOKeyword contained "@\(method\|nord\|note\|references\|seealso\|setClass\|slot\|source\|title\|usage\)"
+syn match rOComment contains=@Spell,rOKeyword "#'.*"
+
 
 if &filetype == "rhelp"
   " string enclosed in double quotes
@@ -65,7 +74,7 @@ syn keyword rConditional if else
 syn keyword rRepeat      for in repeat while
 
 " Constant (not really)
-syn keyword rConstant T F LETTERS letters month.ab month.name pi
+syn keyword rConstant T F LETTERS letters month.abb month.name pi
 syn keyword rConstant R.version.string
 
 syn keyword rNumber   NA_integer_ NA_real_ NA_complex_ NA_character_ 
@@ -102,12 +111,16 @@ syn match rComplex "\<\d\+[Ee][-+]\=\d\+i"
 
 syn match rOperator    "&"
 syn match rOperator    '-'
-syn match rOperator    '*'
+syn match rOperator    '\*'
 syn match rOperator    '+'
 syn match rOperator    '='
-syn match rOperator    "[|!<>^~`/:@]"
-syn match rOperator    "%\{2}\|%\*%\|%\/%\|%in%\|%o%\|%x%"
-syn match rOpError  '*\{3}'
+if &filetype != "rmd" && &filetype != "rrst"
+  syn match rOperator    "[|!<>^~/:]"
+else
+  syn match rOperator    "[|!<>^~`/:]"
+endif
+syn match rOperator    "%\{2}\|%\S*%"
+syn match rOpError  '\*\{3}'
 syn match rOpError  '//'
 syn match rOpError  '&&&'
 syn match rOpError  '|||'
@@ -141,9 +154,11 @@ syn match rParenError "[\]}]" contained
 runtime r-plugin/functions.vim
 
 syn match rDollar display contained "\$"
+syn match rDollar display contained "@"
 
 " List elements will not be highlighted as functions:
 syn match rLstElmt "\$[a-zA-Z0-9\\._]*" contains=rDollar
+syn match rLstElmt "@[a-zA-Z0-9\\._]*" contains=rDollar
 
 " Functions that may add new objects
 syn keyword rPreProc     library require attach detach source
@@ -157,7 +172,9 @@ endif
 syn keyword rType array category character complex double function integer list logical matrix numeric vector data.frame 
 
 " Name of object with spaces
-syn region rNameWSpace start="`" end="`"
+if &filetype != "rmd" && &filetype != "rrst"
+  syn region rNameWSpace start="`" end="`"
+endif
 
 if &filetype == "rhelp"
   syn match rhPreProc "^#ifdef.*" 
@@ -170,6 +187,7 @@ hi def link rArrow       Statement
 hi def link rBoolean     Boolean
 hi def link rBraceError  Error
 hi def link rComment     Comment
+hi def link rOComment    Comment
 hi def link rComplex     Number
 hi def link rConditional Conditional
 hi def link rConstant    Constant
@@ -196,6 +214,7 @@ hi def link rStatement   Statement
 hi def link rString      String
 hi def link rStrError    Error
 hi def link rType        Type
+hi def link rOKeyword    Title
 
 let b:current_syntax="r"
 
diff --git a/runtime/syntax/redif.vim b/runtime/syntax/redif.vim
new file mode 100644
index 0000000000..1b83c07790
--- /dev/null
+++ b/runtime/syntax/redif.vim
@@ -0,0 +1,972 @@
+" Vim syntax file
+" Language:          ReDIF
+" Maintainer:        Axel Castellane 
+" Last Change:       2013 April 17
+" Original Author:   Axel Castellane
+" Source:            http://openlib.org/acmes/root/docu/redif_1.html
+" File Extension:    rdf
+" Note:              The ReDIF format is used by RePEc.
+
+" To be compatible with Vim 5.8 use:
+if version < 600
+  syntax clear
+elseif exists("b:current_syntax")
+  finish
+endif
+
+" ReDIF is case-insensitive
+syntax case ignore
+
+" Structure: Some fields determine what fields can come next. For example:
+"       Template-Type
+"       *-Name
+"       File-URL
+"       *-Institution
+" Those fields span a syntax region over several lines so that these regions
+" can only contain their respective items.
+
+" Any line which is not a correct template or part of an argument is an error.
+" This comes at the very beginning, so it has the lowest priority and will
+" only match if nothing else did.
+syntax match redifWrongLine /^.\+/ display
+
+highlight def link redifWrongLine redifError
+
+" Comments must start with # and it must be the first character of the line,
+" otherwise I believe that they are considered as part of an argument.
+syntax match redifComment /^#.*/ containedin=ALL display
+
+" Defines the 9 possible multi-lines regions of Template-Type and the fields
+" they can contain.
+syntax region redifRegionTemplatePaper start=/^Template-Type:\_s*ReDIF-Paper \d\+\.\d\+/ end=/^Template-Type:/me=s-1 contains=redifContainerFieldsPaper,redifWrongLine,redifRegionClusterAuthor,redifRegionClusterFile fold
+syntax region redifRegionTemplateArticle start=/^Template-Type:\_s*ReDIF-Article \d\+\.\d\+/ end=/^Template-Type:/me=s-1 contains=redifContainerFieldsArticle,redifWrongLine,redifRegionClusterAuthor,redifRegionClusterFile fold
+syntax region redifRegionTemplateChapter start=/^Template-Type:\_s*ReDIF-Chapter \d\+\.\d\+/ end=/^Template-Type:/me=s-1 contains=redifContainerFieldsChapter,redifWrongLine,redifRegionClusterAuthor,redifRegionClusterFile,redifRegionClusterProvider,redifRegionClusterPublisher,redifRegionClusterEditor fold
+syntax region redifRegionTemplateBook start=/^Template-Type:\_s*ReDIF-Book \d\+\.\d\+/ end=/^Template-Type:/me=s-1 contains=redifContainerFieldsBook,redifWrongLine,redifRegionClusterAuthor,redifRegionClusterFile,redifRegionClusterProvider,redifRegionClusterPublisher,redifRegionClusterEditor fold
+syntax region redifRegionTemplateSoftware start=/^Template-Type:\_s*ReDIF-Software \d\+\.\d\+/ end=/^Template-Type:/me=s-1 contains=redifContainerFieldsSoftware,redifWrongLine,redifRegionClusterAuthor,redifRegionClusterFile fold
+syntax region redifRegionTemplateArchive start=/^Template-Type:\_s*ReDIF-Archive \d\+\.\d\+/ end=/^Template-Type:/me=s-1 contains=redifContainerFieldsArchive,redifWrongLine fold
+syntax region redifRegionTemplateSeries start=/^Template-Type:\_s*ReDIF-Series \d\+\.\d\+/ end=/^Template-Type:/me=s-1 contains=redifContainerFieldsSeries,redifWrongLine,redifRegionClusterProvider,redifRegionClusterPublisher,redifRegionClusterEditor fold
+syntax region redifRegionTemplateInstitution start=/^Template-Type:\_s*ReDIF-Institution \d\+\.\d\+/ end=/^Template-Type:/me=s-1 contains=redifContainerFieldsInstitution,redifWrongLine,redifRegionClusterPrimary,redifRegionClusterSecondary,redifRegionClusterTertiary,redifRegionClusterQuaternary fold
+syntax region redifRegionTemplatePerson start=/^Template-Type:\_s*ReDIF-Person \d\+\.\d\+/ end=/^Template-Type:/me=s-1 contains=redifContainerFieldsPerson,redifWrongLine,redifRegionClusterWorkplace fold
+
+" All fields are foldable (These come before clusters, so they have lower
+" priority). So they are contained in a foldable syntax region.
+syntax region redifContainerFieldsPaper start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldTitle,redifFieldHandleOfWork,redifFieldLanguage,redifFieldContactEmail,redifFieldAbstract,redifFieldClassificationJEL,redifFieldKeywords,redifFieldNumber,redifFieldCreationDate,redifFieldRevisionDate,redifFieldPublicationStatus,redifFieldNote,redifFieldLength,redifFieldSeries,redifFieldAvailability,redifFieldOrderURL,redifFieldArticleHandle,redifFieldBookHandle,redifFieldChapterHandle,redifFieldPaperHandle,redifFieldSoftwareHandle,redifFieldRestriction,redifFieldPrice,redifFieldNotification,redifFieldPublicationType,redifFieldTemplateType,redifWrongLine contained transparent fold
+syntax region redifContainerFieldsArticle start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldTitle,redifFieldHandleOfWork,redifFieldLanguage,redifFieldContactEmail,redifFieldAbstract,redifFieldClassificationJEL,redifFieldKeywords,redifFieldNumber,redifFieldCreationDate,redifFieldPublicationStatus,redifFieldOrderURL,redifFieldArticleHandle,redifFieldBookHandle,redifFieldChapterHandle,redifFieldPaperHandle,redifFieldSoftwareHandle,redifFieldRestriction,redifFieldPrice,redifFieldNotification,redifFieldPublicationType,redifFieldJournal,redifFieldVolume,redifFieldYear,redifFieldIssue,redifFieldMonth,redifFieldPages,redifFieldNumber,redifFieldArticleHandle,redifFieldBookHandle,redifFieldChapterHandle,redifFieldPaperHandle,redifFieldSoftwareHandle,redifFieldTemplateType,redifWrongLine contained transparent fold
+syntax region redifContainerFieldsChapter start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldHandleOfWork,redifFieldTitle,redifFieldContactEmail,redifFieldAbstract,redifFieldClassificationJEL,redifFieldKeywords,redifFieldBookTitle,redifFieldYear,redifFieldMonth,redifFieldPages,redifFieldChapter,redifFieldVolume,redifFieldEdition,redifFieldSeries,redifFieldISBN,redifFieldPublicationStatus,redifFieldNote,redifFieldInBook,redifFieldOrderURL,redifFieldArticleHandle,redifFieldBookHandle,redifFieldChapterHandle,redifFieldPaperHandle,redifFieldSoftwareHandle,redifFieldTemplateType,redifWrongLine contained transparent fold
+syntax region redifContainerFieldsBook start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldTitle,redifFieldHandleOfWork,redifFieldContactEmail,redifFieldYear,redifFieldMonth,redifFieldVolume,redifFieldEdition,redifFieldSeries,redifFieldISBN,redifFieldPublicationStatus,redifFieldNote,redifFieldAbstract,redifFieldClassificationJEL,redifFieldKeywords,redifFieldHasChapter,redifFieldPrice,redifFieldOrderURL,redifFieldNumber,redifFieldCreationDate,redifFieldPublicationDate,redifFieldArticleHandle,redifFieldBookHandle,redifFieldChapterHandle,redifFieldPaperHandle,redifFieldSoftwareHandle,redifFieldTemplateType,redifWrongLine contained transparent fold
+syntax region redifContainerFieldsSoftware start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldHandleOfWork,redifFieldTitle,redifFieldProgrammingLanguage,redifFieldAbstract,redifFieldNumber,redifFieldVersion,redifFieldClassificationJEL,redifFieldKeywords,redifFieldSize,redifFieldSeries,redifFieldCreationDate,redifFieldRevisionDate,redifFieldNote,redifFieldRequires,redifFieldArticleHandle,redifFieldBookHandle,redifFieldChapterHandle,redifFieldPaperHandle,redifFieldSoftwareHandle,redifFieldTemplateType,redifWrongLine contained transparent fold
+syntax region redifContainerFieldsArchive start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldHandleOfArchive,redifFieldURL,redifFieldMaintainerEmail,redifFieldName,redifFieldMaintainerName,redifFieldMaintainerPhone,redifFieldMaintainerFax,redifFieldClassificationJEL,redifFieldHomepage,redifFieldDescription,redifFieldNotification,redifFieldRestriction,redifFieldTemplateType,redifWrongLine contained transparent fold
+syntax region redifContainerFieldsSeries start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldName,redifFieldHandleOfSeries,redifFieldMaintainerEmail,redifFieldType,redifFieldOrderEmail,redifFieldOrderHomepage,redifFieldOrderPostal,redifFieldPrice,redifFieldRestriction,redifFieldMaintainerPhone,redifFieldMaintainerFax,redifFieldMaintainerName,redifFieldDescription,redifFieldClassificationJEL,redifFieldKeywords,redifFieldNotification,redifFieldISSN,redifFieldFollowup,redifFieldPredecessor,redifFieldTemplateType,redifWrongLine contained transparent fold
+syntax region redifContainerFieldsInstitution start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldHandleOfInstitution,redifFieldPrimaryDefunct,redifFieldSecondaryDefunct,redifFieldTertiaryDefunct,redifFieldTemplateType,redifWrongLine contained transparent fold
+syntax region redifContainerFieldsPerson start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldHandleOfPerson,redifFieldNameFull,redifFieldNameFirst,redifFieldNameLast,redifFieldNamePrefix,redifFieldNameMiddle,redifFieldNameSuffix,redifFieldNameASCII,redifFieldEmail,redifFieldHomepage,redifFieldFax,redifFieldPostal,redifFieldPhone,redifFieldWorkplaceOrganization,redifFieldAuthorPaper,redifFieldAuthorArticle,redifFieldAuthorSoftware,redifFieldAuthorBook,redifFieldAuthorChapter,redifFieldEditorBook,redifFieldEditorSeries,redifFieldClassificationJEL,redifFieldShortId,redifFieldLastLoginDate,redifFieldRegisteredDate,redifWrongLine contained transparent fold
+
+" Defines the 10 possible clusters and what they can contain
+" A field not in the cluster ends the cluster.
+syntax region redifRegionClusterWorkplace start=/^Workplace-Name:/ skip=/^Workplace-\%(Name-English\|Homepage\|Postal\|Location\|Email\|Phone\|Fax\|Institution\):/ end=/^\S\{-}:/me=s-1 contained contains=redifWrongLine,redifContainerFieldsWorkplace fold
+syntax region redifRegionClusterPrimary start=/^Primary-Name:/ skip=/^Primary-\%(Name-English\|Homepage\|Postal\|Location\|Email\|Phone\|Fax\|Institution\):/ end=/^\S\{-}:/me=s-1 contained contains=redifWrongLine,redifContainerFieldsPrimary fold
+syntax region redifRegionClusterSecondary start=/^Secondary-Name:/ skip=/^Secondary-\%(Name-English\|Homepage\|Postal\|Location\|Email\|Phone\|Fax\|Institution\):/ end=/^\S\{-}:/me=s-1 contained contains=redifWrongLine,redifContainerFieldsSecondary fold
+syntax region redifRegionClusterTertiary start=/^Tertiary-Name:/ skip=/^Tertiary-\%(Name-English\|Homepage\|Postal\|Location\|Email\|Phone\|Fax\|Institution\):/ end=/^\S\{-}:/me=s-1 contained contains=redifWrongLine,redifContainerFieldsTertiary fold
+syntax region redifRegionClusterQuaternary start=/^Quaternary-Name:/ skip=/^Quaternary-\%(Name-English\|Homepage\|Postal\|Location\|Email\|Phone\|Fax\|Institution\):/ end=/^\S\{-}:/me=s-1 contained contains=redifWrongLine,redifContainerFieldsQuaternary fold
+syntax region redifRegionClusterProvider start=/^Provider-Name:/ skip=/^Provider-\%(Name-English\|Homepage\|Postal\|Location\|Email\|Phone\|Fax\|Institution\):/ end=/^\S\{-}:/me=s-1 contained contains=redifWrongLine,redifContainerFieldsProvider fold
+syntax region redifRegionClusterPublisher start=/^Publisher-Name:/ skip=/^Publisher-\%(Name-English\|Homepage\|Postal\|Location\|Email\|Phone\|Fax\|Institution\):/ end=/^\S\{-}:/me=s-1 contained contains=redifWrongLine,redifContainerFieldsPublisher fold
+syntax region redifRegionClusterAuthor start=/^Author-Name:/ skip=/^Author-\%(Name\%(-First\|-Last\)\|Homepage\|Email\|Fax\|Postal\|Phone\|Person\|Workplace-Name\):/ end=/^\S\{-}:/me=s-1 contained contains=redifWrongLine,redifRegionClusterAuthorWorkplace,redifContainerFieldsAuthor fold
+syntax region redifRegionClusterEditor start=/^Editor-Name:/ skip=/^Editor-\%(Name\%(-First\|-Last\)\|Homepage\|Email\|Fax\|Postal\|Phone\|Person\|Workplace-Name\):/ end=/^\S\{-}:/me=s-1 contained contains=redifWrongLine,redifRegionClusterEditorWorkplace,redifContainerFieldsEditor fold
+syntax region redifRegionClusterFile start=/^File-URL:/ skip=/^File-\%(Format\|Function\|Size\|Restriction\):/ end=/^\S\{-}:/me=s-1 contained contains=redifWrongLine,redifContainerFieldsFile fold
+
+" The foldable containers of the clusters.
+syntax region redifContainerFieldsWorkplace start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldWorkplaceName,redifFieldWorkplaceHomepage,redifFieldWorkplaceNameEnglish,redifFieldWorkplacePostal,redifFieldWorkplaceLocation,redifFieldWorkplaceEmail,redifFieldWorkplacePhone,redifFieldWorkplaceFax,redifFieldWorkplaceInstitution,redifWrongLine contained transparent fold
+syntax region redifContainerFieldsPrimary start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldPrimaryName,redifFieldPrimaryHomepage,redifFieldPrimaryNameEnglish,redifFieldPrimaryPostal,redifFieldPrimaryLocation,redifFieldPrimaryEmail,redifFieldPrimaryPhone,redifFieldPrimaryFax,redifFieldPrimaryInstitution,redifWrongLine contained transparent fold
+syntax region redifContainerFieldsSecondary start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldSecondaryName,redifFieldSecondaryHomepage,redifFieldSecondaryNameEnglish,redifFieldSecondaryPostal,redifFieldSecondaryLocation,redifFieldSecondaryEmail,redifFieldSecondaryPhone,redifFieldSecondaryFax,redifFieldSecondaryInstitution,redifWrongLine contained transparent fold
+syntax region redifContainerFieldsTertiary start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldTertiaryName,redifFieldTertiaryHomepage,redifFieldTertiaryNameEnglish,redifFieldTertiaryPostal,redifFieldTertiaryLocation,redifFieldTertiaryEmail,redifFieldTertiaryPhone,redifFieldTertiaryFax,redifFieldTertiaryInstitution,redifWrongLine contained transparent fold
+syntax region redifContainerFieldsQuaternary start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldQuaternaryName,redifFieldQuaternaryHomepage,redifFieldQuaternaryNameEnglish,redifFieldQuaternaryPostal,redifFieldQuaternaryLocation,redifFieldQuaternaryEmail,redifFieldQuaternaryPhone,redifFieldQuaternaryFax,redifFieldQuaternaryInstitution,redifWrongLine contained transparent fold
+syntax region redifContainerFieldsProvider start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldProviderName,redifFieldProviderHomepage,redifFieldProviderNameEnglish,redifFieldProviderPostal,redifFieldProviderLocation,redifFieldProviderEmail,redifFieldProviderPhone,redifFieldProviderFax,redifFieldProviderInstitution,redifWrongLine contained transparent fold
+syntax region redifContainerFieldsPublisher start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldPublisherName,redifFieldPublisherHomepage,redifFieldPublisherNameEnglish,redifFieldPublisherPostal,redifFieldPublisherLocation,redifFieldPublisherEmail,redifFieldPublisherPhone,redifFieldPublisherFax,redifFieldPublisherInstitution,redifWrongLine contained transparent fold
+syntax region redifContainerFieldsAuthor start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldAuthorName,redifFieldAuthorNameFirst,redifFieldAuthorNameLast,redifFieldAuthorHomepage,redifFieldAuthorEmail,redifFieldAuthorFax,redifFieldAuthorPostal,redifFieldAuthorPhone,redifFieldAuthorPerson,redifWrongLine contained transparent fold
+syntax region redifContainerFieldsEditor start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldEditorName,redifFieldEditorNameFirst,redifFieldEditorNameLast,redifFieldEditorHomepage,redifFieldEditorEmail,redifFieldEditorFax,redifFieldEditorPostal,redifFieldEditorPhone,redifFieldEditorPerson,redifWrongLine contained transparent fold
+syntax region redifContainerFieldsFile start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldFileURL,redifFieldFileFormat,redifFieldFileFunction,redifFieldFileSize,redifFieldFileRestriction,redifWrongLine contained transparent fold
+
+" The two clusters in cluster (must be presented after to have priority over
+" fields containers)
+syntax region redifRegionClusterAuthorWorkplace start=/^Author-Workplace-Name:/ skip=/^Author-Workplace-\%(Name-English\|Homepage\|Postal\|Location\|Email\|Phone\|Fax\|Institution\):/ end=/^\S\{-}:/me=s-1 contained contains=redifWrongLine,redifContainerFieldsAuthorWorkplace fold
+syntax region redifRegionClusterEditorWorkplace start=/^Editor-Workplace-Name:/ skip=/^Editor-Workplace-\%(Name-English\|Homepage\|Postal\|Location\|Email\|Phone\|Fax\|Institution\):/ end=/^\S\{-}:/me=s-1 contained contains=redifWrongLine,redifContainerFieldsEditorWorkplace fold
+
+" Their foldable fields containers
+syntax region redifContainerFieldsAuthorWorkplace start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldAuthorWorkplaceName,redifFieldAuthorWorkplaceHomepage,redifFieldAuthorWorkplaceNameEnglish,redifFieldAuthorWorkplacePostal,redifFieldAuthorWorkplaceLocation,redifFieldAuthorWorkplaceEmail,redifFieldAuthorWorkplacePhone,redifFieldAuthorWorkplaceFax,redifFieldAuthorWorkplaceInstitution,redifWrongLine contained transparent fold
+syntax region redifContainerFieldsEditorWorkplace start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldEditorWorkplaceName,redifFieldEditorWorkplaceHomepage,redifFieldEditorWorkplaceNameEnglish,redifFieldEditorWorkplacePostal,redifFieldEditorWorkplaceLocation,redifFieldEditorWorkplaceEmail,redifFieldEditorWorkplacePhone,redifFieldEditorWorkplaceFax,redifFieldEditorWorkplaceInstitution,redifWrongLine contained transparent fold
+
+" All the possible fields
+"     Note: The "Handle" field is handled a little bit differently, because it
+"     does not have the same meaning depending on the Template-Type. See:
+" 	  /redifFieldHandleOf....
+syntax match redifFieldAbstract /^Abstract:/ skipwhite skipempty nextgroup=redifArgumentAbstract contained
+syntax match redifFieldArticleHandle /^Article-Handle:/ skipwhite skipempty nextgroup=redifArgumentArticleHandle contained
+syntax match redifFieldAuthorArticle /^Author-Article:/ skipwhite skipempty nextgroup=redifArgumentAuthorArticle contained
+syntax match redifFieldAuthorBook /^Author-Book:/ skipwhite skipempty nextgroup=redifArgumentAuthorBook contained
+syntax match redifFieldAuthorChapter /^Author-Chapter:/ skipwhite skipempty nextgroup=redifArgumentAuthorChapter contained
+syntax match redifFieldAuthorEmail /^Author-Email:/ skipwhite skipempty nextgroup=redifArgumentAuthorEmail contained
+syntax match redifFieldAuthorFax /^Author-Fax:/ skipwhite skipempty nextgroup=redifArgumentAuthorFax contained
+syntax match redifFieldAuthorHomepage /^Author-Homepage:/ skipwhite skipempty nextgroup=redifArgumentAuthorHomepage contained
+syntax match redifFieldAuthorName /^Author-Name:/ skipwhite skipempty nextgroup=redifArgumentAuthorName contained
+syntax match redifFieldAuthorNameFirst /^Author-Name-First:/ skipwhite skipempty nextgroup=redifArgumentAuthorNameFirst contained
+syntax match redifFieldAuthorNameLast /^Author-Name-Last:/ skipwhite skipempty nextgroup=redifArgumentAuthorNameLast contained
+syntax match redifFieldAuthorPaper /^Author-Paper:/ skipwhite skipempty nextgroup=redifArgumentAuthorPaper contained
+syntax match redifFieldAuthorPerson /^Author-Person:/ skipwhite skipempty nextgroup=redifArgumentAuthorPerson contained
+syntax match redifFieldAuthorPhone /^Author-Phone:/ skipwhite skipempty nextgroup=redifArgumentAuthorPhone contained
+syntax match redifFieldAuthorPostal /^Author-Postal:/ skipwhite skipempty nextgroup=redifArgumentAuthorPostal contained
+syntax match redifFieldAuthorSoftware /^Author-Software:/ skipwhite skipempty nextgroup=redifArgumentAuthorSoftware contained
+syntax match redifFieldAuthorWorkplaceEmail /^Author-Workplace-Email:/ skipwhite skipempty nextgroup=redifArgumentAuthorWorkplaceEmail contained
+syntax match redifFieldAuthorWorkplaceFax /^Author-Workplace-Fax:/ skipwhite skipempty nextgroup=redifArgumentAuthorWorkplaceFax contained
+syntax match redifFieldAuthorWorkplaceHomepage /^Author-Workplace-Homepage:/ skipwhite skipempty nextgroup=redifArgumentAuthorWorkplaceHomepage contained
+syntax match redifFieldAuthorWorkplaceInstitution /^Author-Workplace-Institution:/ skipwhite skipempty nextgroup=redifArgumentAuthorWorkplaceInstitution contained
+syntax match redifFieldAuthorWorkplaceLocation /^Author-Workplace-Location:/ skipwhite skipempty nextgroup=redifArgumentAuthorWorkplaceLocation contained
+syntax match redifFieldAuthorWorkplaceName /^Author-Workplace-Name:/ skipwhite skipempty nextgroup=redifArgumentAuthorWorkplaceName contained
+syntax match redifFieldAuthorWorkplaceNameEnglish /^Author-Workplace-Name-English:/ skipwhite skipempty nextgroup=redifArgumentAuthorWorkplaceNameEnglish contained
+syntax match redifFieldAuthorWorkplacePhone /^Author-Workplace-Phone:/ skipwhite skipempty nextgroup=redifArgumentAuthorWorkplacePhone contained
+syntax match redifFieldAuthorWorkplacePostal /^Author-Workplace-Postal:/ skipwhite skipempty nextgroup=redifArgumentAuthorWorkplacePostal contained
+syntax match redifFieldAvailability /^Availability:/ skipwhite skipempty nextgroup=redifArgumentAvailability contained
+syntax match redifFieldBookHandle /^Book-Handle:/ skipwhite skipempty nextgroup=redifArgumentBookHandle contained
+syntax match redifFieldBookTitle /^Book-Title:/ skipwhite skipempty nextgroup=redifArgumentBookTitle contained
+syntax match redifFieldChapterHandle /^Chapter-Handle:/ skipwhite skipempty nextgroup=redifArgumentChapterHandle contained
+syntax match redifFieldChapter /^Chapter:/ skipwhite skipempty nextgroup=redifArgumentChapter contained
+syntax match redifFieldClassificationJEL /^Classification-JEL:/ skipwhite skipempty nextgroup=redifArgumentClassificationJEL contained
+syntax match redifFieldContactEmail /^Contact-Email:/ skipwhite skipempty nextgroup=redifArgumentContactEmail contained
+syntax match redifFieldCreationDate /^Creation-Date:/ skipwhite skipempty nextgroup=redifArgumentCreationDate contained
+syntax match redifFieldDescription /^Description:/ skipwhite skipempty nextgroup=redifArgumentDescription contained
+syntax match redifFieldEdition /^Edition:/ skipwhite skipempty nextgroup=redifArgumentEdition contained
+syntax match redifFieldEditorBook /^Editor-Book:/ skipwhite skipempty nextgroup=redifArgumentEditorBook contained
+syntax match redifFieldEditorEmail /^Editor-Email:/ skipwhite skipempty nextgroup=redifArgumentEditorEmail contained
+syntax match redifFieldEditorFax /^Editor-Fax:/ skipwhite skipempty nextgroup=redifArgumentEditorFax contained
+syntax match redifFieldEditorHomepage /^Editor-Homepage:/ skipwhite skipempty nextgroup=redifArgumentEditorHomepage contained
+syntax match redifFieldEditorName /^Editor-Name:/ skipwhite skipempty nextgroup=redifArgumentEditorName contained
+syntax match redifFieldEditorNameFirst /^Editor-Name-First:/ skipwhite skipempty nextgroup=redifArgumentEditorNameFirst contained
+syntax match redifFieldEditorNameLast /^Editor-Name-Last:/ skipwhite skipempty nextgroup=redifArgumentEditorNameLast contained
+syntax match redifFieldEditorPerson /^Editor-Person:/ skipwhite skipempty nextgroup=redifArgumentEditorPerson contained
+syntax match redifFieldEditorPhone /^Editor-Phone:/ skipwhite skipempty nextgroup=redifArgumentEditorPhone contained
+syntax match redifFieldEditorPostal /^Editor-Postal:/ skipwhite skipempty nextgroup=redifArgumentEditorPostal contained
+syntax match redifFieldEditorSeries /^Editor-Series:/ skipwhite skipempty nextgroup=redifArgumentEditorSeries contained
+syntax match redifFieldEditorWorkplaceEmail /^Editor-Workplace-Email:/ skipwhite skipempty nextgroup=redifArgumentEditorWorkplaceEmail contained
+syntax match redifFieldEditorWorkplaceFax /^Editor-Workplace-Fax:/ skipwhite skipempty nextgroup=redifArgumentEditorWorkplaceFax contained
+syntax match redifFieldEditorWorkplaceHomepage /^Editor-Workplace-Homepage:/ skipwhite skipempty nextgroup=redifArgumentEditorWorkplaceHomepage contained
+syntax match redifFieldEditorWorkplaceInstitution /^Editor-Workplace-Institution:/ skipwhite skipempty nextgroup=redifArgumentEditorWorkplaceInstitution contained
+syntax match redifFieldEditorWorkplaceLocation /^Editor-Workplace-Location:/ skipwhite skipempty nextgroup=redifArgumentEditorWorkplaceLocation contained
+syntax match redifFieldEditorWorkplaceName /^Editor-Workplace-Name:/ skipwhite skipempty nextgroup=redifArgumentEditorWorkplaceName contained
+syntax match redifFieldEditorWorkplaceNameEnglish /^Editor-Workplace-Name-English:/ skipwhite skipempty nextgroup=redifArgumentEditorWorkplaceNameEnglish contained
+syntax match redifFieldEditorWorkplacePhone /^Editor-Workplace-Phone:/ skipwhite skipempty nextgroup=redifArgumentEditorWorkplacePhone contained
+syntax match redifFieldEditorWorkplacePostal /^Editor-Workplace-Postal:/ skipwhite skipempty nextgroup=redifArgumentEditorWorkplacePostal contained
+syntax match redifFieldEmail /^Email:/ skipwhite skipempty nextgroup=redifArgumentEmail contained
+syntax match redifFieldFax /^Fax:/ skipwhite skipempty nextgroup=redifArgumentFax contained
+syntax match redifFieldFileFormat /^File-Format:/ skipwhite skipempty nextgroup=redifArgumentFileFormat contained
+syntax match redifFieldFileFunction /^File-Function:/ skipwhite skipempty nextgroup=redifArgumentFileFunction contained
+syntax match redifFieldFileRestriction /^File-Restriction:/ skipwhite skipempty nextgroup=redifArgumentFileRestriction contained
+syntax match redifFieldFileSize /^File-Size:/ skipwhite skipempty nextgroup=redifArgumentFileSize contained
+syntax match redifFieldFileURL /^File-URL:/ skipwhite skipempty nextgroup=redifArgumentFileURL contained
+syntax match redifFieldFollowup /^Followup:/ skipwhite skipempty nextgroup=redifArgumentFollowup contained
+syntax match redifFieldHandleOfArchive /^Handle:/ skipwhite skipempty nextgroup=redifArgumentHandleOfArchive contained
+syntax match redifFieldHandleOfInstitution /^Handle:/ skipwhite skipempty nextgroup=redifArgumentHandleOfInstitution contained
+syntax match redifFieldHandleOfPerson /^Handle:/ skipwhite skipempty nextgroup=redifArgumentHandleOfPerson contained
+syntax match redifFieldHandleOfSeries /^Handle:/ skipwhite skipempty nextgroup=redifArgumentHandleOfSeries contained
+syntax match redifFieldHandleOfWork /^Handle:/ skipwhite skipempty nextgroup=redifArgumentHandleOfWork contained
+syntax match redifFieldHasChapter /^HasChapter:/ skipwhite skipempty nextgroup=redifArgumentHasChapter contained
+syntax match redifFieldHomepage /^Homepage:/ skipwhite skipempty nextgroup=redifArgumentHomepage contained
+syntax match redifFieldInBook /^In-Book:/ skipwhite skipempty nextgroup=redifArgumentInBook contained
+syntax match redifFieldISBN /^ISBN:/ skipwhite skipempty nextgroup=redifArgumentISBN contained
+syntax match redifFieldISSN /^ISSN:/ skipwhite skipempty nextgroup=redifArgumentISSN contained
+syntax match redifFieldIssue /^Issue:/ skipwhite skipempty nextgroup=redifArgumentIssue contained
+syntax match redifFieldJournal /^Journal:/ skipwhite skipempty nextgroup=redifArgumentJournal contained
+syntax match redifFieldKeywords /^Keywords:/ skipwhite skipempty nextgroup=redifArgumentKeywords contained
+syntax match redifFieldKeywords /^Keywords:/ skipwhite skipempty nextgroup=redifArgumentKeywords contained
+syntax match redifFieldLanguage /^Language:/ skipwhite skipempty nextgroup=redifArgumentLanguage contained
+syntax match redifFieldLastLoginDate /^Last-Login-Date:/ skipwhite skipempty nextgroup=redifArgumentLastLoginDate contained
+syntax match redifFieldLength /^Length:/ skipwhite skipempty nextgroup=redifArgumentLength contained
+syntax match redifFieldMaintainerEmail /^Maintainer-Email:/ skipwhite skipempty nextgroup=redifArgumentMaintainerEmail contained
+syntax match redifFieldMaintainerFax /^Maintainer-Fax:/ skipwhite skipempty nextgroup=redifArgumentMaintainerFax contained
+syntax match redifFieldMaintainerName /^Maintainer-Name:/ skipwhite skipempty nextgroup=redifArgumentMaintainerName contained
+syntax match redifFieldMaintainerPhone /^Maintainer-Phone:/ skipwhite skipempty nextgroup=redifArgumentMaintainerPhone contained
+syntax match redifFieldMonth /^Month:/ skipwhite skipempty nextgroup=redifArgumentMonth contained
+syntax match redifFieldNameASCII /^Name-ASCII:/ skipwhite skipempty nextgroup=redifArgumentNameASCII contained
+syntax match redifFieldNameFirst /^Name-First:/ skipwhite skipempty nextgroup=redifArgumentNameFirst contained
+syntax match redifFieldNameFull /^Name-Full:/ skipwhite skipempty nextgroup=redifArgumentNameFull contained
+syntax match redifFieldNameLast /^Name-Last:/ skipwhite skipempty nextgroup=redifArgumentNameLast contained
+syntax match redifFieldNameMiddle /^Name-Middle:/ skipwhite skipempty nextgroup=redifArgumentNameMiddle contained
+syntax match redifFieldNamePrefix /^Name-Prefix:/ skipwhite skipempty nextgroup=redifArgumentNamePrefix contained
+syntax match redifFieldNameSuffix /^Name-Suffix:/ skipwhite skipempty nextgroup=redifArgumentNameSuffix contained
+syntax match redifFieldName /^Name:/ skipwhite skipempty nextgroup=redifArgumentName contained
+syntax match redifFieldNote /^Note:/ skipwhite skipempty nextgroup=redifArgumentNote contained
+syntax match redifFieldNotification /^Notification:/ skipwhite skipempty nextgroup=redifArgumentNotification contained
+syntax match redifFieldNumber /^Number:/ skipwhite skipempty nextgroup=redifArgumentNumber contained
+syntax match redifFieldOrderEmail /^Order-Email:/ skipwhite skipempty nextgroup=redifArgumentOrderEmail contained
+syntax match redifFieldOrderHomepage /^Order-Homepage:/ skipwhite skipempty nextgroup=redifArgumentOrderHomepage contained
+syntax match redifFieldOrderPostal /^Order-Postal:/ skipwhite skipempty nextgroup=redifArgumentOrderPostal contained
+syntax match redifFieldOrderURL /^Order-URL:/ skipwhite skipempty nextgroup=redifArgumentOrderURL contained
+syntax match redifFieldPages /^Pages:/ skipwhite skipempty nextgroup=redifArgumentPages contained
+syntax match redifFieldPaperHandle /^Paper-Handle:/ skipwhite skipempty nextgroup=redifArgumentPaperHandle contained
+syntax match redifFieldPhone /^Phone:/ skipwhite skipempty nextgroup=redifArgumentPhone contained
+syntax match redifFieldPostal /^Postal:/ skipwhite skipempty nextgroup=redifArgumentPostal contained
+syntax match redifFieldPredecessor /^Predecessor:/ skipwhite skipempty nextgroup=redifArgumentPredecessor contained
+syntax match redifFieldPrice /^Price:/ skipwhite skipempty nextgroup=redifArgumentPrice contained
+syntax match redifFieldPrimaryDefunct /^Primary-Defunct:/ skipwhite skipempty nextgroup=redifArgumentPrimaryDefunct contained
+syntax match redifFieldPrimaryEmail /^Primary-Email:/ skipwhite skipempty nextgroup=redifArgumentPrimaryEmail contained
+syntax match redifFieldPrimaryFax /^Primary-Fax:/ skipwhite skipempty nextgroup=redifArgumentPrimaryFax contained
+syntax match redifFieldPrimaryHomepage /^Primary-Homepage:/ skipwhite skipempty nextgroup=redifArgumentPrimaryHomepage contained
+syntax match redifFieldPrimaryInstitution /^Primary-Institution:/ skipwhite skipempty nextgroup=redifArgumentPrimaryInstitution contained
+syntax match redifFieldPrimaryLocation /^Primary-Location:/ skipwhite skipempty nextgroup=redifArgumentPrimaryLocation contained
+syntax match redifFieldPrimaryName /^Primary-Name:/ skipwhite skipempty nextgroup=redifArgumentPrimaryName contained
+syntax match redifFieldPrimaryNameEnglish /^Primary-Name-English:/ skipwhite skipempty nextgroup=redifArgumentPrimaryNameEnglish contained
+syntax match redifFieldPrimaryPhone /^Primary-Phone:/ skipwhite skipempty nextgroup=redifArgumentPrimaryPhone contained
+syntax match redifFieldPrimaryPostal /^Primary-Postal:/ skipwhite skipempty nextgroup=redifArgumentPrimaryPostal contained
+syntax match redifFieldProgrammingLanguage /^Programming-Language:/ skipwhite skipempty nextgroup=redifArgumentProgrammingLanguage contained
+syntax match redifFieldProviderEmail /^Provider-Email:/ skipwhite skipempty nextgroup=redifArgumentProviderEmail contained
+syntax match redifFieldProviderFax /^Provider-Fax:/ skipwhite skipempty nextgroup=redifArgumentProviderFax contained
+syntax match redifFieldProviderHomepage /^Provider-Homepage:/ skipwhite skipempty nextgroup=redifArgumentProviderHomepage contained
+syntax match redifFieldProviderInstitution /^Provider-Institution:/ skipwhite skipempty nextgroup=redifArgumentProviderInstitution contained
+syntax match redifFieldProviderLocation /^Provider-Location:/ skipwhite skipempty nextgroup=redifArgumentProviderLocation contained
+syntax match redifFieldProviderName /^Provider-Name:/ skipwhite skipempty nextgroup=redifArgumentProviderName contained
+syntax match redifFieldProviderNameEnglish /^Provider-Name-English:/ skipwhite skipempty nextgroup=redifArgumentProviderNameEnglish contained
+syntax match redifFieldProviderPhone /^Provider-Phone:/ skipwhite skipempty nextgroup=redifArgumentProviderPhone contained
+syntax match redifFieldProviderPostal /^Provider-Postal:/ skipwhite skipempty nextgroup=redifArgumentProviderPostal contained
+syntax match redifFieldPublicationDate /^Publication-Date:/ skipwhite skipempty nextgroup=redifArgumentPublicationDate contained
+syntax match redifFieldPublicationStatus /^Publication-Status:/ skipwhite skipempty nextgroup=redifArgumentPublicationStatus contained
+syntax match redifFieldPublicationType /^Publication-Type:/ skipwhite skipempty nextgroup=redifArgumentPublicationType contained
+syntax match redifFieldQuaternaryEmail /^Quaternary-Email:/ skipwhite skipempty nextgroup=redifArgumentQuaternaryEmail contained
+syntax match redifFieldQuaternaryFax /^Quaternary-Fax:/ skipwhite skipempty nextgroup=redifArgumentQuaternaryFax contained
+syntax match redifFieldQuaternaryHomepage /^Quaternary-Homepage:/ skipwhite skipempty nextgroup=redifArgumentQuaternaryHomepage contained
+syntax match redifFieldQuaternaryInstitution /^Quaternary-Institution:/ skipwhite skipempty nextgroup=redifArgumentQuaternaryInstitution contained
+syntax match redifFieldQuaternaryLocation /^Quaternary-Location:/ skipwhite skipempty nextgroup=redifArgumentQuaternaryLocation contained
+syntax match redifFieldQuaternaryName /^Quaternary-Name:/ skipwhite skipempty nextgroup=redifArgumentQuaternaryName contained
+syntax match redifFieldQuaternaryNameEnglish /^Quaternary-Name-English:/ skipwhite skipempty nextgroup=redifArgumentQuaternaryNameEnglish contained
+syntax match redifFieldQuaternaryPhone /^Quaternary-Phone:/ skipwhite skipempty nextgroup=redifArgumentQuaternaryPhone contained
+syntax match redifFieldQuaternaryPostal /^Quaternary-Postal:/ skipwhite skipempty nextgroup=redifArgumentQuaternaryPostal contained
+syntax match redifFieldRegisteredDate /^Registered-Date:/ skipwhite skipempty nextgroup=redifArgumentRegisteredDate contained
+syntax match redifFieldRequires /^Requires:/ skipwhite skipempty nextgroup=redifArgumentRequires contained
+syntax match redifFieldRestriction /^Restriction:/ skipwhite skipempty nextgroup=redifArgumentRestriction contained
+syntax match redifFieldRevisionDate /^Revision-Date:/ skipwhite skipempty nextgroup=redifArgumentRevisionDate contained
+syntax match redifFieldSecondaryDefunct /^Secondary-Defunct:/ skipwhite skipempty nextgroup=redifArgumentSecondaryDefunct contained
+syntax match redifFieldSecondaryEmail /^Secondary-Email:/ skipwhite skipempty nextgroup=redifArgumentSecondaryEmail contained
+syntax match redifFieldSecondaryFax /^Secondary-Fax:/ skipwhite skipempty nextgroup=redifArgumentSecondaryFax contained
+syntax match redifFieldSecondaryHomepage /^Secondary-Homepage:/ skipwhite skipempty nextgroup=redifArgumentSecondaryHomepage contained
+syntax match redifFieldSecondaryInstitution /^Secondary-Institution:/ skipwhite skipempty nextgroup=redifArgumentSecondaryInstitution contained
+syntax match redifFieldSecondaryLocation /^Secondary-Location:/ skipwhite skipempty nextgroup=redifArgumentSecondaryLocation contained
+syntax match redifFieldSecondaryName /^Secondary-Name:/ skipwhite skipempty nextgroup=redifArgumentSecondaryName contained
+syntax match redifFieldSecondaryNameEnglish /^Secondary-Name-English:/ skipwhite skipempty nextgroup=redifArgumentSecondaryNameEnglish contained
+syntax match redifFieldSecondaryPhone /^Secondary-Phone:/ skipwhite skipempty nextgroup=redifArgumentSecondaryPhone contained
+syntax match redifFieldSecondaryPostal /^Secondary-Postal:/ skipwhite skipempty nextgroup=redifArgumentSecondaryPostal contained
+syntax match redifFieldSeries /^Series:/ skipwhite skipempty nextgroup=redifArgumentSeries contained
+syntax match redifFieldShortId /^Short-Id:/ skipwhite skipempty nextgroup=redifArgumentShortId contained
+syntax match redifFieldSize /^Size:/ skipwhite skipempty nextgroup=redifArgumentSize contained
+syntax match redifFieldSoftwareHandle /^Software-Handle:/ skipwhite skipempty nextgroup=redifArgumentSoftwareHandle contained
+syntax match redifFieldTemplateType /^Template-Type:/ skipwhite skipempty nextgroup=redifArgumentTemplateType contained
+syntax match redifFieldTertiaryDefunct /^Tertiary-Defunct:/ skipwhite skipempty nextgroup=redifArgumentTertiaryDefunct contained
+syntax match redifFieldTertiaryEmail /^Tertiary-Email:/ skipwhite skipempty nextgroup=redifArgumentTertiaryEmail contained
+syntax match redifFieldTertiaryFax /^Tertiary-Fax:/ skipwhite skipempty nextgroup=redifArgumentTertiaryFax contained
+syntax match redifFieldTertiaryHomepage /^Tertiary-Homepage:/ skipwhite skipempty nextgroup=redifArgumentTertiaryHomepage contained
+syntax match redifFieldTertiaryInstitution /^Tertiary-Institution:/ skipwhite skipempty nextgroup=redifArgumentTertiaryInstitution contained
+syntax match redifFieldTertiaryLocation /^Tertiary-Location:/ skipwhite skipempty nextgroup=redifArgumentTertiaryLocation contained
+syntax match redifFieldTertiaryName /^Tertiary-Name:/ skipwhite skipempty nextgroup=redifArgumentTertiaryName contained
+syntax match redifFieldTertiaryNameEnglish /^Tertiary-Name-English:/ skipwhite skipempty nextgroup=redifArgumentTertiaryNameEnglish contained
+syntax match redifFieldTertiaryPhone /^Tertiary-Phone:/ skipwhite skipempty nextgroup=redifArgumentTertiaryPhone contained
+syntax match redifFieldTertiaryPostal /^Tertiary-Postal:/ skipwhite skipempty nextgroup=redifArgumentTertiaryPostal contained
+syntax match redifFieldTitle /^Title:/ skipwhite skipempty nextgroup=redifArgumentTitle contained
+syntax match redifFieldType /^Type:/ skipwhite skipempty nextgroup=redifArgumentType contained
+syntax match redifFieldURL /^URL:/ skipwhite skipempty nextgroup=redifArgumentURL contained
+syntax match redifFieldVersion /^Version:/ skipwhite skipempty nextgroup=redifArgumentVersion contained
+syntax match redifFieldVolume /^Volume:/ skipwhite skipempty nextgroup=redifArgumentVolume contained
+syntax match redifFieldWorkplaceEmail /^Workplace-Email:/ skipwhite skipempty nextgroup=redifArgumentWorkplaceEmail contained
+syntax match redifFieldWorkplaceFax /^Workplace-Fax:/ skipwhite skipempty nextgroup=redifArgumentWorkplaceFax contained
+syntax match redifFieldWorkplaceHomepage /^Workplace-Homepage:/ skipwhite skipempty nextgroup=redifArgumentWorkplaceHomepage contained
+syntax match redifFieldWorkplaceInstitution /^Workplace-Institution:/ skipwhite skipempty nextgroup=redifArgumentWorkplaceInstitution contained
+syntax match redifFieldWorkplaceLocation /^Workplace-Location:/ skipwhite skipempty nextgroup=redifArgumentWorkplaceLocation contained
+syntax match redifFieldWorkplaceName /^Workplace-Name:/ skipwhite skipempty nextgroup=redifArgumentWorkplaceName contained
+syntax match redifFieldWorkplaceNameEnglish /^Workplace-Name-English:/ skipwhite skipempty nextgroup=redifArgumentWorkplaceNameEnglish contained
+syntax match redifFieldWorkplaceOrganization /^Workplace-Organization:/ skipwhite skipempty nextgroup=redifArgumentWorkplaceOrganization contained
+syntax match redifFieldWorkplacePhone /^Workplace-Phone:/ skipwhite skipempty nextgroup=redifArgumentWorkplacePhone contained
+syntax match redifFieldWorkplacePostal /^Workplace-Postal:/ skipwhite skipempty nextgroup=redifArgumentWorkplacePostal contained
+syntax match redifFieldYear /^Year:/ skipwhite skipempty nextgroup=redifArgumentYear contained
+
+highlight def link redifFieldAbstract redifField
+highlight def link redifFieldArticleHandle redifField
+highlight def link redifFieldAuthorArticle redifField
+highlight def link redifFieldAuthorBook redifField
+highlight def link redifFieldAuthorChapter redifField
+highlight def link redifFieldAuthorEmail redifField
+highlight def link redifFieldAuthorFax redifField
+highlight def link redifFieldAuthorHomepage redifField
+highlight def link redifFieldAuthorName redifField
+highlight def link redifFieldAuthorNameFirst redifField
+highlight def link redifFieldAuthorNameLast redifField
+highlight def link redifFieldAuthorPaper redifField
+highlight def link redifFieldAuthorPerson redifField
+highlight def link redifFieldAuthorPhone redifField
+highlight def link redifFieldAuthorPostal redifField
+highlight def link redifFieldAuthorSoftware redifField
+highlight def link redifFieldAuthorWorkplaceEmail redifField
+highlight def link redifFieldAuthorWorkplaceFax redifField
+highlight def link redifFieldAuthorWorkplaceHomepage redifField
+highlight def link redifFieldAuthorWorkplaceInstitution redifField
+highlight def link redifFieldAuthorWorkplaceLocation redifField
+highlight def link redifFieldAuthorWorkplaceName redifField
+highlight def link redifFieldAuthorWorkplaceNameEnglish redifField
+highlight def link redifFieldAuthorWorkplacePhone redifField
+highlight def link redifFieldAuthorWorkplacePostal redifField
+highlight def link redifFieldAvailability redifField
+highlight def link redifFieldBookHandle redifField
+highlight def link redifFieldBookTitle redifField
+highlight def link redifFieldChapterHandle redifField
+highlight def link redifFieldChapter redifField
+highlight def link redifFieldClassificationJEL redifField
+highlight def link redifFieldContactEmail redifField
+highlight def link redifFieldCreationDate redifField
+highlight def link redifFieldDescription redifField
+highlight def link redifFieldEdition redifField
+highlight def link redifFieldEditorBook redifField
+highlight def link redifFieldEditorEmail redifField
+highlight def link redifFieldEditorFax redifField
+highlight def link redifFieldEditorHomepage redifField
+highlight def link redifFieldEditorName redifField
+highlight def link redifFieldEditorNameFirst redifField
+highlight def link redifFieldEditorNameLast redifField
+highlight def link redifFieldEditorPerson redifField
+highlight def link redifFieldEditorPhone redifField
+highlight def link redifFieldEditorPostal redifField
+highlight def link redifFieldEditorSeries redifField
+highlight def link redifFieldEditorWorkplaceEmail redifField
+highlight def link redifFieldEditorWorkplaceFax redifField
+highlight def link redifFieldEditorWorkplaceHomepage redifField
+highlight def link redifFieldEditorWorkplaceInstitution redifField
+highlight def link redifFieldEditorWorkplaceLocation redifField
+highlight def link redifFieldEditorWorkplaceName redifField
+highlight def link redifFieldEditorWorkplaceNameEnglish redifField
+highlight def link redifFieldEditorWorkplacePhone redifField
+highlight def link redifFieldEditorWorkplacePostal redifField
+highlight def link redifFieldEmail redifField
+highlight def link redifFieldFax redifField
+highlight def link redifFieldFileFormat redifField
+highlight def link redifFieldFileFunction redifField
+highlight def link redifFieldFileRestriction redifField
+highlight def link redifFieldFileSize redifField
+highlight def link redifFieldFileURL redifField
+highlight def link redifFieldFollowup redifField
+highlight def link redifFieldHandleOfArchive redifField
+highlight def link redifFieldHandleOfInstitution redifField
+highlight def link redifFieldHandleOfPerson redifField
+highlight def link redifFieldHandleOfSeries redifField
+highlight def link redifFieldHandleOfWork redifField
+highlight def link redifFieldHasChapter redifField
+highlight def link redifFieldHomepage redifField
+highlight def link redifFieldInBook redifField
+highlight def link redifFieldISBN redifField
+highlight def link redifFieldISSN redifField
+highlight def link redifFieldIssue redifField
+highlight def link redifFieldJournal redifField
+highlight def link redifFieldKeywords redifField
+highlight def link redifFieldKeywords redifField
+highlight def link redifFieldLanguage redifField
+highlight def link redifFieldLastLoginDate redifField
+highlight def link redifFieldLength redifField
+highlight def link redifFieldMaintainerEmail redifField
+highlight def link redifFieldMaintainerFax redifField
+highlight def link redifFieldMaintainerName redifField
+highlight def link redifFieldMaintainerPhone redifField
+highlight def link redifFieldMonth redifField
+highlight def link redifFieldNameASCII redifField
+highlight def link redifFieldNameFirst redifField
+highlight def link redifFieldNameFull redifField
+highlight def link redifFieldNameLast redifField
+highlight def link redifFieldNameMiddle redifField
+highlight def link redifFieldNamePrefix redifField
+highlight def link redifFieldNameSuffix redifField
+highlight def link redifFieldName redifField
+highlight def link redifFieldNote redifField
+highlight def link redifFieldNotification redifField
+highlight def link redifFieldNumber redifField
+highlight def link redifFieldOrderEmail redifField
+highlight def link redifFieldOrderHomepage redifField
+highlight def link redifFieldOrderPostal redifField
+highlight def link redifFieldOrderURL redifField
+highlight def link redifFieldPages redifField
+highlight def link redifFieldPaperHandle redifField
+highlight def link redifFieldPhone redifField
+highlight def link redifFieldPostal redifField
+highlight def link redifFieldPredecessor redifField
+highlight def link redifFieldPrice redifField
+highlight def link redifFieldPrimaryDefunct redifField
+highlight def link redifFieldPrimaryEmail redifField
+highlight def link redifFieldPrimaryFax redifField
+highlight def link redifFieldPrimaryHomepage redifField
+highlight def link redifFieldPrimaryInstitution redifField
+highlight def link redifFieldPrimaryLocation redifField
+highlight def link redifFieldPrimaryName redifField
+highlight def link redifFieldPrimaryNameEnglish redifField
+highlight def link redifFieldPrimaryPhone redifField
+highlight def link redifFieldPrimaryPostal redifField
+highlight def link redifFieldProgrammingLanguage redifField
+highlight def link redifFieldProviderEmail redifField
+highlight def link redifFieldProviderFax redifField
+highlight def link redifFieldProviderHomepage redifField
+highlight def link redifFieldProviderInstitution redifField
+highlight def link redifFieldProviderLocation redifField
+highlight def link redifFieldProviderName redifField
+highlight def link redifFieldProviderNameEnglish redifField
+highlight def link redifFieldProviderPhone redifField
+highlight def link redifFieldProviderPostal redifField
+highlight def link redifFieldPublicationDate redifField
+highlight def link redifFieldPublicationStatus redifField
+highlight def link redifFieldPublicationType redifField
+highlight def link redifFieldQuaternaryEmail redifField
+highlight def link redifFieldQuaternaryFax redifField
+highlight def link redifFieldQuaternaryHomepage redifField
+highlight def link redifFieldQuaternaryInstitution redifField
+highlight def link redifFieldQuaternaryLocation redifField
+highlight def link redifFieldQuaternaryName redifField
+highlight def link redifFieldQuaternaryNameEnglish redifField
+highlight def link redifFieldQuaternaryPhone redifField
+highlight def link redifFieldQuaternaryPostal redifField
+highlight def link redifFieldRegisteredDate redifField
+highlight def link redifFieldRequires redifField
+highlight def link redifFieldRestriction redifField
+highlight def link redifFieldRevisionDate redifField
+highlight def link redifFieldSecondaryDefunct redifField
+highlight def link redifFieldSecondaryEmail redifField
+highlight def link redifFieldSecondaryFax redifField
+highlight def link redifFieldSecondaryHomepage redifField
+highlight def link redifFieldSecondaryInstitution redifField
+highlight def link redifFieldSecondaryLocation redifField
+highlight def link redifFieldSecondaryName redifField
+highlight def link redifFieldSecondaryNameEnglish redifField
+highlight def link redifFieldSecondaryPhone redifField
+highlight def link redifFieldSecondaryPostal redifField
+highlight def link redifFieldSeries redifField
+highlight def link redifFieldShortId redifField
+highlight def link redifFieldSize redifField
+highlight def link redifFieldSoftwareHandle redifField
+highlight def link redifFieldTemplateType redifField
+highlight def link redifFieldTertiaryDefunct redifField
+highlight def link redifFieldTertiaryEmail redifField
+highlight def link redifFieldTertiaryFax redifField
+highlight def link redifFieldTertiaryHomepage redifField
+highlight def link redifFieldTertiaryInstitution redifField
+highlight def link redifFieldTertiaryLocation redifField
+highlight def link redifFieldTertiaryName redifField
+highlight def link redifFieldTertiaryNameEnglish redifField
+highlight def link redifFieldTertiaryPhone redifField
+highlight def link redifFieldTertiaryPostal redifField
+highlight def link redifFieldTitle redifField
+highlight def link redifFieldTitle redifField
+highlight def link redifFieldType redifField
+highlight def link redifFieldURL redifField
+highlight def link redifFieldVersion redifField
+highlight def link redifFieldVolume redifField
+highlight def link redifFieldWorkplaceEmail redifField
+highlight def link redifFieldWorkplaceFax redifField
+highlight def link redifFieldWorkplaceHomepage redifField
+highlight def link redifFieldWorkplaceInstitution redifField
+highlight def link redifFieldWorkplaceLocation redifField
+highlight def link redifFieldWorkplaceName redifField
+highlight def link redifFieldWorkplaceNameEnglish redifField
+highlight def link redifFieldWorkplaceOrganization redifField
+highlight def link redifFieldWorkplacePhone redifField
+highlight def link redifFieldWorkplacePostal redifField
+highlight def link redifFieldYear redifField
+
+" Deprecated
+"     same as Provider-*
+"     nextgroup=redifArgumentProvider*
+syntax match redifFieldPublisherEmail /^Publisher-Email:/ skipwhite skipempty nextgroup=redifArgumentProviderEmail contained
+syntax match redifFieldPublisherFax /^Publisher-Fax:/ skipwhite skipempty nextgroup=redifArgumentProviderFax contained
+syntax match redifFieldPublisherHomepage /^Publisher-Homepage:/ skipwhite skipempty nextgroup=redifArgumentProviderHomepage contained
+syntax match redifFieldPublisherInstitution /^Publisher-Institution:/ skipwhite skipempty nextgroup=redifArgumentProviderInstitution contained
+syntax match redifFieldPublisherLocation /^Publisher-Location:/ skipwhite skipempty nextgroup=redifArgumentProviderLocation contained
+syntax match redifFieldPublisherName /^Publisher-Name:/ skipwhite skipempty nextgroup=redifArgumentProviderName contained
+syntax match redifFieldPublisherNameEnglish /^Publisher-Name-English:/ skipwhite skipempty nextgroup=redifArgumentProviderNameEnglish contained
+syntax match redifFieldPublisherPhone /^Publisher-Phone:/ skipwhite skipempty nextgroup=redifArgumentProviderPhone contained
+syntax match redifFieldPublisherPostal /^Publisher-Postal:/ skipwhite skipempty nextgroup=redifArgumentProviderPostal contained
+
+highlight def link redifFieldPublisherEmail redifFieldDeprecated
+highlight def link redifFieldPublisherFax redifFieldDeprecated
+highlight def link redifFieldPublisherHomepage redifFieldDeprecated
+highlight def link redifFieldPublisherInstitution redifFieldDeprecated
+highlight def link redifFieldPublisherLocation redifFieldDeprecated
+highlight def link redifFieldPublisherName redifFieldDeprecated
+highlight def link redifFieldPublisherNameEnglish redifFieldDeprecated
+highlight def link redifFieldPublisherPhone redifFieldDeprecated
+highlight def link redifFieldPublisherPostal redifFieldDeprecated
+
+" Standard arguments
+"    By default, they contain all the argument until another field is started:
+"        start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1
+"    For arguments that must not span more than one line, use a match:
+"        /\%(^\S\{-}:\)\@!\S.*/
+"        AND ADD "display"
+"    This is faster.
+"
+"    Those arguments are not highlighted so far. They are here for future
+"    extensions.
+"    TODO Find more RegEx for these arguments
+"    	TODO Fax, Phone
+"    	TODO URL, Homepage
+"    	TODO Keywords
+"    	TODO Classification-JEL
+"    	TODO Short-Id, Author-Person, Editor-Person
+"
+"    Arguments that may span several lines:
+syntax region redifArgumentAuthorWorkplaceLocation start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentAuthorWorkplacePostal start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentEditorPostal start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentEditorWorkplacePostal start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentFileFunction start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentIssue start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentJournal start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentOrderPostal start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentPostal start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentPrice start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentPrimaryLocation start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentPrimaryPostal start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentProviderLocation start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentProviderPostal start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentQuaternaryLocation start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentQuaternaryPostal start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentRequires start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentSecondaryLocation start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentSecondaryPostal start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentSize start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentTertiaryLocation start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentTertiaryPostal start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentVersion start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentWorkplaceLocation start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentWorkplacePhone start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentWorkplacePostal start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+
+" Arguments that may not span several lines:
+"    If you are sure that these arguments cannot span several lines, change
+"    them to a match:
+"        /\%(^\S\{-}:\)\@!\S.*/
+"    AND ADD "display" after "contained"
+"        You can use this command on each line that you want to change:
+"        :s+\Vregion \(\w\+\) start=/\\%(^\\S\\{-}:\\)\\@!\\S/ end=/^\\S\\{-}:/me=s-1 contained+match \1 /\\%(^\\S\\{-}:\\)\\@!\\S.*/ contained display
+syntax region redifArgumentAuthorFax start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentAuthorHomepage start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentAuthorName start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentAuthorNameFirst start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentAuthorNameLast start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentAuthorPerson start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentAuthorPhone start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentAuthorPostal start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentAuthorWorkplaceFax start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentAuthorWorkplaceHomepage start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentAuthorWorkplaceName start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentAuthorWorkplaceNameEnglish start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentAuthorWorkplacePhone start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentEditorFax start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentEditorHomepage start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentEditorName start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentEditorNameFirst start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentEditorNameLast start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentEditorPerson start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentEditorPhone start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentEditorWorkplaceFax start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentEditorWorkplaceHomepage start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentEditorWorkplaceLocation start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentEditorWorkplaceName start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentEditorWorkplaceNameEnglish start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentEditorWorkplacePhone start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentFax start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentFileURL start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentHomepage start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentMaintainerFax start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentMaintainerName start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentMaintainerPhone start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentNameFirst start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentNameFull start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentNameLast start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentNameMiddle start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentNamePrefix start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentNameSuffix start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentName start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentNumber start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentOrderHomepage start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentOrderURL start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentPhone start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentPrimaryFax start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentPrimaryHomepage start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentPrimaryName start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentPrimaryNameEnglish start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentPrimaryPhone start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentProviderFax start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentProviderHomepage start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentProviderName start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentProviderNameEnglish start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentProviderPhone start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentQuaternaryFax start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentQuaternaryHomepage start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentQuaternaryName start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentQuaternaryNameEnglish start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentQuaternaryPhone start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentSecondaryFax start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentSecondaryHomepage start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentSecondaryName start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentSecondaryNameEnglish start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentSecondaryPhone start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentSeries start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentShortId start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentTertiaryFax start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentTertiaryHomepage start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentTertiaryName start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentTertiaryNameEnglish start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentTertiaryPhone start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentURL start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentWorkplaceFax start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentWorkplaceHomepage start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentWorkplaceName start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentWorkplaceNameEnglish start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+syntax region redifArgumentWorkplaceOrganization start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained
+
+" Special arguments
+"    Those arguments require special values
+"    TODO Improve some RegEx
+"    	TODO Improve Emails
+"    	TODO Improve ISBN
+"    	TODO Improve ISSN
+"    	TODO Improve spell check (add words from economics.
+"    	   expl=macroeconometrics, Schumpeterian, IS-LM, etc.)
+"
+"    Template-Type
+syntax match redifArgumentTemplateType /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectTemplateType contained display
+syntax match redifCorrectTemplateType /ReDIF-\%(Paper\|Article\|Chapter\|Book\|Software\|Archive\|Series\|Institution\|Person\)/ nextgroup=redifTemplateVersionNumberContainer contained display
+syntax match redifTemplateVersionNumberContainer /.\+/ contains=redifTemplateVersionNumber contained display
+syntax match redifTemplateVersionNumber / \d\+\.\d\+/ nextgroup=redifWrongLineEnding contained display
+
+highlight def link redifArgumentTemplateType redifError
+highlight def link redifCorrectTemplateType Constant
+highlight def link redifTemplateVersionNumber Number
+highlight def link redifTemplateVersionNumberContainer redifError
+
+"    Handles:
+"
+"        Handles of Works:
+syntax match redifArgumentHandleOfWork /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display
+syntax match redifArgumentAuthorArticle /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display
+syntax match redifArgumentAuthorBook /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display
+syntax match redifArgumentAuthorChapter /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display
+syntax match redifArgumentAuthorPaper /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display
+syntax match redifArgumentAuthorSoftware /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display
+syntax match redifArgumentEditorBook /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display
+syntax match redifArgumentEditorSeries /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display
+syntax match redifArgumentInBook /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display
+syntax match redifArgumentHasChapter /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display
+syntax match redifArgumentArticleHandle /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display
+syntax match redifArgumentBookHandle /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display
+syntax match redifArgumentChapterHandle /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display
+syntax match redifArgumentPaperHandle /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display
+syntax match redifArgumentSoftwareHandle /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display
+syntax match redifCorrectHandleOfWork /RePEc:\a\a\a:\%(_\@!\w\)\{6}:\S\+/ contains=redifForbiddenCharactersInHandle,redifBestPracticeInHandle nextgroup=redifWrongLineEnding contained display
+" TODO Are those characters really forbidden???
+syntax match redifForbiddenCharactersInHandle /[\/*?"<>|]/ contained display
+syntax match redifBestPracticeInHandle /\<\%([vi]:[1-9]\d*\|y:[1-9]\d\{3}\|p:[1-9]\d*-[1-9]\d*\|i:\%(jan\|feb\|mar\|apr\|may\|jun\|jul\|aug\|sep\|oct\|nov\|dec\|spr\|sum\|aut\|win\|spe\|Q[1-4]\|\d\d-\d\d\)\|Q:[1-4]\)\>/ contained display
+
+highlight def link redifArgumentHandleOfWork redifError
+highlight def link redifArgumentAuthorArticle redifError
+highlight def link redifArgumentAuthorBook redifError
+highlight def link redifArgumentAuthorChapter redifError
+highlight def link redifArgumentAuthorPaper redifError
+highlight def link redifArgumentAuthorSoftware redifError
+highlight def link redifArgumentEditorBook redifError
+highlight def link redifArgumentEditorSeries redifError
+highlight def link redifArgumentInBook redifError
+highlight def link redifArgumentHasChapter redifError
+highlight def link redifArgumentArticleHandle redifError
+highlight def link redifArgumentBookHandle redifError
+highlight def link redifArgumentChapterHandle redifError
+highlight def link redifArgumentPaperHandle redifError
+highlight def link redifArgumentSoftwareHandle redifError
+highlight def link redifForbiddenCharactersInHandle redifError
+highlight def link redifBestPracticeInHandle redifSpecial
+
+"        Handles of Series:
+syntax match redifArgumentHandleOfSeries /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfSeries contained display
+syntax match redifArgumentFollowup /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfSeries contained display
+syntax match redifArgumentPredecessor /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfSeries contained display
+syntax match redifCorrectHandleOfSeries /RePEc:\a\a\a:\%(_\@!\w\)\{6}/ nextgroup=redifWrongLineEnding contained display
+
+highlight def link redifArgumentHandleOfSeries redifError
+highlight def link redifArgumentFollowup redifError
+highlight def link redifArgumentPredecessor redifError
+
+"        Handles of Archives:
+syntax match redifArgumentHandleOfArchive /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfArchive contained display
+syntax match redifCorrectHandleOfArchive /RePEc:\a\a\a/ nextgroup=redifWrongLineEnding contained display
+
+highlight def link redifArgumentHandleOfArchive redifError
+
+"        Handles of Person:
+syntax match redifArgumentHandleOfPerson /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfPerson contained display
+syntax match redifCorrectHandleOfPerson /\%(\%(:\@!\S\)\{-}:\)\{2}[1-9]\d\{3}\%(-02\%(-[12]\d\|-0[1-9]\)\|-\%(0[469]\|11\)\%(-30\|-[12]\d\|-0[1-9]\)\|-\%(0[13578]\|1[02]\)\%(-3[01]\|-[12]\d\|-0[1-9]\)\):\S\+/ nextgroup=redifWrongLineEnding contained display
+
+highlight def link redifArgumentHandleOfPerson redifError
+
+"        Handles of Institution:
+syntax match redifArgumentAuthorWorkplaceInstitution /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfInstitution contained display
+syntax match redifArgumentEditorWorkplaceInstitution /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfInstitution contained display
+syntax match redifArgumentPrimaryInstitution /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfInstitution contained display
+syntax match redifArgumentProviderInstitution /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfInstitution contained display
+syntax match redifArgumentPublisherInstitution /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfInstitution contained display
+syntax match redifArgumentQuaternaryInstitution /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfInstitution contained display
+syntax match redifArgumentSecondaryInstitution /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfInstitution contained display
+syntax match redifArgumentTertiaryInstitution /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfInstitution contained display
+syntax match redifArgumentWorkplaceInstitution /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfInstitution contained display
+syntax match redifArgumentHandleOfInstitution /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfInstitution contained display
+syntax match redifArgumentPrimaryDefunct /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfInstitution contained display
+syntax match redifArgumentSecondaryDefunct /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfInstitution contained display
+syntax match redifArgumentTertiaryDefunct /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfInstitution contained display
+" TODO Are digits authorized? Apparently not.
+" Country codes:
+" http://www.iso.org/iso/country_codes/iso_3166_code_lists/country_names_and_code_elements.htm
+syntax match redifCorrectHandleOfInstitution /RePEc:\a\a\a:\a\{5}\(ea\|af\|ax\|al\|dz\|as\|ad\|ao\|ai\|aq\|ag\|ar\|am\|aw\|au\|at\|az\|bs\|bh\|bd\|bb\|by\|be\|bz\|bj\|bm\|bt\|bo\|bq\|ba\|bw\|bv\|br\|io\|bn\|bg\|bf\|bi\|kh\|cm\|ca\|cv\|ky\|cf\|td\|cl\|cn\|cx\|cc\|co\|km\|cg\|cd\|ck\|cr\|ci\|hr\|cu\|cw\|cy\|cz\|dk\|dj\|dm\|do\|ec\|eg\|sv\|gq\|er\|ee\|et\|fk\|fo\|fj\|fi\|fr\|gf\|pf\|tf\|ga\|gm\|ge\|de\|gh\|gi\|gr\|gl\|gd\|gp\|gu\|gt\|gg\|gn\|gw\|gy\|ht\|hm\|va\|hn\|hk\|hu\|is\|in\|id\|ir\|iq\|ie\|im\|il\|it\|jm\|jp\|je\|jo\|kz\|ke\|ki\|kp\|kr\|kw\|kg\|la\|lv\|lb\|ls\|lr\|ly\|li\|lt\|lu\|mo\|mk\|mg\|mw\|my\|mv\|ml\|mt\|mh\|mq\|mr\|mu\|yt\|mx\|fm\|md\|mc\|mn\|me\|ms\|ma\|mz\|mm\|na\|nr\|np\|nl\|nc\|nz\|ni\|ne\|ng\|nu\|nf\|mp\|no\|om\|pk\|pw\|ps\|pa\|pg\|py\|pe\|ph\|pn\|pl\|pt\|pr\|qa\|re\|ro\|ru\|rw\|bl\|sh\|kn\|lc\|mf\|pm\|vc\|ws\|sm\|st\|sa\|sn\|rs\|sc\|sl\|sg\|sx\|sk\|si\|sb\|so\|za\|gs\|ss\|es\|lk\|sd\|sr\|sj\|sz\|se\|ch\|sy\|tw\|tj\|tz\|th\|tl\|tg\|tk\|to\|tt\|tn\|tr\|tm\|tc\|tv\|ug\|ua\|ae\|gb\|us\|um\|uy\|uz\|vu\|ve\|vn\|vg\|vi\|wf\|eh\|ye\|zm\|zw\)/ nextgroup=redifWrongLineEnding contained display
+
+highlight def link redifArgumentHandleOfInstitution redifError
+highlight def link redifArgumentPrimaryDefunct redifError
+highlight def link redifArgumentSecondaryDefunct redifError
+highlight def link redifArgumentTertiaryDefunct redifError
+
+"    Emails:
+syntax match redifArgumentAuthorEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display
+syntax match redifArgumentAuthorWorkplaceEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display
+syntax match redifArgumentContactEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display
+syntax match redifArgumentEditorEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display
+syntax match redifArgumentEditorWorkplaceEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display
+syntax match redifArgumentEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display
+syntax match redifArgumentMaintainerEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display
+syntax match redifArgumentOrderEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display
+syntax match redifArgumentPrimaryEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display
+syntax match redifArgumentProviderEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display
+syntax match redifArgumentPublisherEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display
+syntax match redifArgumentQuaternaryEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display
+syntax match redifArgumentSecondaryEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display
+syntax match redifArgumentTertiaryEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display
+syntax match redifArgumentWorkplaceEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display
+syntax match redifCorrectEmail /\%(@\@!\S\)\+@\%(@\@!\S\)\+/ nextgroup=redifWrongLineEnding contained display
+
+highlight def link redifArgumentAuthorEmail redifError
+highlight def link redifArgumentAuthorWorkplaceEmail redifError
+highlight def link redifArgumentContactEmail redifError
+highlight def link redifArgumentEditorEmail redifError
+highlight def link redifArgumentEditorWorkplaceEmail redifError
+highlight def link redifArgumentEmail redifError
+highlight def link redifArgumentMaintainerEmail redifError
+highlight def link redifArgumentOrderEmail redifError
+highlight def link redifArgumentPrimaryEmail redifError
+highlight def link redifArgumentProviderEmail redifError
+highlight def link redifArgumentPublisherEmail redifError
+highlight def link redifArgumentQuaternaryEmail redifError
+highlight def link redifArgumentSecondaryEmail redifError
+highlight def link redifArgumentTertiaryEmail redifError
+highlight def link redifArgumentWorkplaceEmail redifError
+
+"    Language
+"    Source: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
+syntax match redifArgumentLanguage /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectLanguage contained display
+syntax match redifCorrectLanguage /\<\(aa\|ab\|af\|ak\|als\|am\|an\|ang\|ar\|arc\|as\|ast\|av\|ay\|az\|ba\|bar\|bat-smg\|bcl\|be\|be-x-old\|bg\|bh\|bi\|bm\|bn\|bo\|bpy\|br\|bs\|bug\|bxr\|ca\|ce\|ceb\|ch\|cho\|chr\|chy\|co\|cr\|cs\|csb\|cu\|cv\|cy\|da\|de\|diq\|dsb\|dv\|dz\|ee\|el\|en\|eo\|es\|et\|eu\|ext\|fa\|ff\|fi\|fiu-vro\|fj\|fo\|fr\|frp\|fur\|fy\|ga\|gd\|gil\|gl\|gn\|got\|gu\|gv\|ha\|haw\|he\|hi\|ho\|hr\|ht\|hu\|hy\|hz\|ia\|id\|ie\|ig\|ii\|ik\|ilo\|io\|is\|it\|iu\|ja\|jbo\|jv\|ka\|kg\|ki\|kj\|kk\|kl\|km\|kn\|khw\|ko\|kr\|ks\|ksh\|ku\|kv\|kw\|ky\|la\|lad\|lan\|lb\|lg\|li\|lij\|lmo\|ln\|lo\|lt\|lv\|map-bms\|mg\|mh\|mi\|mk\|ml\|mn\|mo\|mr\|ms\|mt\|mus\|my\|na\|nah\|nap\|nd\|nds\|nds-nl\|ne\|new\|ng\|nl\|nn\|no\|nr\|nso\|nrm\|nv\|ny\|oc\|oj\|om\|or\|os\|pa\|pag\|pam\|pap\|pdc\|pi\|pih\|pl\|pms\|ps\|pt\|qu\|rm\|rmy\|rn\|ro\|roa-rup\|ru\|rw\|sa\|sc\|scn\|sco\|sd\|se\|sg\|sh\|si\|simple\|sk\|sl\|sm\|sn\|so\|sq\|sr\|ss\|st\|su\|sv\|sw\|ta\|te\|tet\|tg\|th\|ti\|tk\|tl\|tlh\|tn\|to\|tpi\|tr\|ts\|tt\|tum\|tw\|ty\|udm\|ug\|uk\|ur\|uz\|ve\|vi\|vec\|vls\|vo\|wa\|war\|wo\|xal\|xh\|yi\|yo\|za\|zh\|zh-min-nan\|zh-yue\|zu\)\>/ nextgroup=redifWrongLineEnding contained display
+
+highlight def link redifArgumentLanguage redifError
+highlight def link redifCorrectLanguage redifSpecial
+
+"    Length
+"    Based on the example in the documentation. But apparently any field is
+"    possible
+syntax region redifArgumentLength start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contains=redifGoodLength contained
+syntax match redifGoodLength /1 page\|[1-9]\d*\%( pages\)\=/ contained display
+
+highlight def link redifGoodLength redifSpecial
+
+"    Publication-Type
+syntax match redifArgumentPublicationType /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectPublicationType contained display
+syntax match redifCorrectPublicationType /\<\(journal article\|book\|book chapter\|working paper\|conference paper\|report\|other\)\>/ nextgroup=redifWrongLineEnding contained display
+
+highlight def link redifArgumentPublicationType redifError
+highlight def link redifCorrectPublicationType redifSpecial
+
+"    Publication-Status
+syntax region redifArgumentPublicationStatus start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contains=redifSpecialPublicationStatus contained
+syntax match redifSpecialPublicationStatus /published\|forthcoming/ nextgroup=redifCorrectPublicationStatus contained display
+syntax region redifCorrectPublicationStatus start=/./ end=/^\S\{-}:/me=s-1 contained
+
+highlight def link redifArgumentPublicationStatus redifError
+highlight def link redifSpecialPublicationStatus redifSpecial
+
+"    Month
+"    TODO Are numbers also allowed?
+syntax match redifArgumentMonth /\%(^\S\{-}:\)\@!\S.*/ contains=redifGoodMonth contained display
+syntax match redifGoodMonth /\<\(Jan\%(uary\)\=\|Feb\%(ruary\)\=\|Mar\%(ch\)\=\|Apr\%(il\)\=\|May\|June\=\|July\=\|Aug\%(ust\)\=\|Sep\%(tember\)\=\|Oct\%(ober\)\=\|Nov\%(ember\)\=\|Dec\%(ember\)\=\)\>/ contained display
+
+highlight def link redifGoodMonth redifSpecial
+
+"    Integers: Volume, Chapter
+syntax match redifArgumentVolume /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectInteger contained display
+syntax match redifArgumentChapter /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectInteger contained display
+syntax match redifCorrectInteger /[1-9]\d*/ nextgroup=redifWrongLineEnding contained display
+
+highlight def link redifArgumentVolume redifError
+highlight def link redifArgumentChapter redifError
+
+"    Year
+syntax match redifArgumentYear /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectYear contained display
+syntax match redifCorrectYear /[1-9]\d\{3}/ nextgroup=redifWrongLineEnding contained display
+
+highlight def link redifArgumentYear redifError
+
+"    Edition
+"    Based on the example in the documentation.
+syntax match redifArgumentEdition /\%(^\S\{-}:\)\@!\S.*/ contains=redifGoodEdition contained display
+syntax match redifGoodEdition /1st\|2nd\|3rd\|[4-9]th\|[1-9]\d*\%(1st\|2nd\|3rd\|[4-9]th\)\|[1-9]\d*/ contained display
+
+highlight def link redifGoodEdition redifSpecial
+
+"    ISBN
+syntax match redifArgumentISBN /\%(^\S\{-}:\)\@!\S.*/ contains=redifGoodISBN contained display
+syntax match redifGoodISBN /\d[0-9-]\{8,15}\d/ contained display
+
+highlight def link redifGoodISBN redifSpecial
+
+"    ISSN
+syntax match redifArgumentISSN /\%(^\S\{-}:\)\@!\S.*/ contains=redifGoodISSN contained display
+syntax match redifGoodISSN /\d\{4}-\d\{3}[0-9X]/ contained display
+
+highlight def link redifGoodISSN redifSpecial
+
+"    File-Size
+"    Based on the example in the documentation.
+syntax region redifArgumentFileSize start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contains=redifGoodSize contained
+syntax match redifGoodSize /kb\|bytes/ contained display
+
+highlight def link redifGoodSize redifSpecial
+
+"    Type
+syntax match redifArgumentType /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectType contained display
+syntax match redifCorrectType /ReDIF-Paper\|ReDIF-Software\|ReDIF-Article\|ReDIF-Chapter\|ReDIF-Book/ nextgroup=redifWrongLineEnding contained display
+
+highlight def link redifArgumentType redifError
+highlight def link redifCorrectType redifSpecial
+
+"    Dates: Publication-Date, Creation-Date, Revision-Date,
+"    Last-Login-Date, Registration-Date
+syntax match redifArgumentCreationDate /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectDate contained display
+syntax match redifArgumentLastLoginDate /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectDate contained display
+syntax match redifArgumentPublicationDate /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectDate contained display
+syntax match redifArgumentRegisteredDate /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectDate contained display
+syntax match redifArgumentRevisionDate /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectDate contained display
+syntax match redifCorrectDate /[1-9]\d\{3}\%(-02\%(-[12]\d\|-0[1-9]\)\=\|-\%(0[469]\|11\)\%(-30\|-[12]\d\|-0[1-9]\)\=\|-\%(0[13578]\|1[02]\)\%(-3[01]\|-[12]\d\|-0[1-9]\)\=\)\=/ nextgroup=redifWrongLineEnding contained display
+
+highlight def link redifArgumentCreationDate redifError
+highlight def link redifArgumentLastLoginDate redifError
+highlight def link redifArgumentPublicationDate redifError
+highlight def link redifArgumentRegisteredDate redifError
+highlight def link redifArgumentRevisionDate redifError
+
+"    Classification-JEL
+syntax match redifArgumentClassificationJEL /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectJEL contained display
+syntax match redifCorrectJEL /\<\%(\u\d\{,2}[,; \t]\s*\)*\u\d\{,2}/ contains=redifSpecialJEL nextgroup=redifWrongLineEnding contained display
+syntax match redifSpecialJEL /\<\u\d\{,2}/ contained display
+
+highlight def link redifArgumentClassificationJEL redifError
+highlight def link redifSpecialJEL redifSpecial
+
+"    Pages
+syntax match redifArgumentPages /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectPages contained display
+syntax match redifCorrectPages /[1-9]\d*-[1-9]\d*/ nextgroup=redifWrongLineEnding contained display
+
+highlight def link redifArgumentPages redifError
+
+"    Name-ASCII
+syntax match redifArgumentNameASCII /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectNameASCII contained display
+syntax match redifCorrectNameASCII /[ -~]/ contained display
+
+highlight def link redifArgumentNameASCII redifError
+
+"    Programming-Language
+syntax match redifArgumentProgrammingLanguage /\%(^\S\{-}:\)\@!\S.*/ contains=redifGoodProgrammingLanguage contained display
+syntax match redifGoodProgrammingLanguage /\/ nextgroup=redifWrongLineEnding contained display
+
+highlight def link redifGoodProgrammingLanguage redifSpecial
+
+"    File-Format
+"    TODO The link in the documentation that gives the list of possible formats is broken.
+"    ftp://ftp.isi.edu/in-notes/iana/assignments/media-types/media-types
+"    These are based on the examples in the documentation.
+syntax match redifArgumentFileFormat /\%(^\S\{-}:\)\@!\S.*/ contains=redifGoodFormat contained display
+syntax match redifGoodFormat "\a\+/[[:alpha:]+-]\+" nextgroup=redifWrongLineEnding contains=redifSpecialFormat contained display
+syntax match redifSpecialFormat "application/atom+xml\|application/ecmascript\|application/EDI-X12\|application/EDIFACT\|application/json\|application/javascript\|application/octet-stream\|application/ogg\|application/pdf\|application/postscript\|application/rdf+xml\|application/rss+xml\|application/soap+xml\|application/font-woff\|application/xhtml+xml\|application/xml\|application/xml-dtd\|application/xop+xml\|application/zip\|application/gzip\|audio/basic\|audio/L24\|audio/mp4\|audio/mpeg\|audio/ogg\|audio/vorbis\|audio/vnd.rn-realaudio\|audio/vnd.wave\|audio/webm\|image/gif\|image/jpeg\|image/pjpeg\|image/png\|image/svg+xml\|image/tiff\|image/vnd.microsoft.icon\|message/http\|message/imdn+xml\|message/partial\|message/rfc822\|model/example\|model/iges\|model/mesh\|model/vrml\|model/x3d+binary\|model/x3d+vrml\|model/x3d+xml\|multipart/mixed\|multipart/alternative\|multipart/related\|multipart/form-data\|multipart/signed\|multipart/encrypted\|text/cmd\|text/css\|text/csv\|text/html\|text/javascript\|text/plain\|text/vcard\|text/xml\|video/mpeg\|video/mp4\|video/ogg\|video/quicktime\|video/webm\|video/x-matroska\|video/x-ms-wmv\|video/x-flv" contained display
+
+highlight def link redifSpecialFormat redifSpecial
+highlight def link redifArgumentFileFormat redifError
+
+" Keywords
+"     Spell checked
+syntax match redifArgumentKeywords /\%(^\S\{-}:\)\@!\S.*/ contains=@Spell,redifKeywordsSemicolon contained
+syntax match redifKeywordsSemicolon /;/ contained
+
+highlight def link redifKeywordsSemicolon redifSpecial
+
+" Other spell-checked arguments
+"    Very useful when copy-pasting abstracts that may contain hyphens or
+"    ligatures.
+syntax region redifArgumentAbstract start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contains=@Spell contained
+syntax region redifArgumentAvailability start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contains=@Spell contained
+syntax region redifArgumentBookTitle start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contains=@Spell contained
+syntax region redifArgumentDescription start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contains=@Spell contained
+syntax region redifArgumentFileRestriction start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contains=@Spell contained
+syntax region redifArgumentNote start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contains=@Spell contained
+syntax region redifArgumentNotification start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contains=@Spell contained
+syntax region redifArgumentRestriction start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contains=@Spell contained
+syntax region redifArgumentTitle start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contains=@Spell contained
+
+" Wrong line ending
+syntax match redifWrongLineEnding /.\+/ contained display
+
+highlight def link redifWrongLineEnding redifError
+
+" Final highlight
+highlight def link redifComment Comment
+highlight def link redifError Error
+highlight def link redifField Identifier
+highlight def link redifFieldDeprecated Identifier
+highlight def link redifSpecial Special
+" For deprecated fields:
+highlight redifFieldDeprecated term=undercurl cterm=undercurl gui=undercurl guisp=DarkGrey
+
+" Sync: The template-type (ReDIF-Paper, ReDIF-Archive, etc.) influences which
+" fields can follow. Thus sync must search backwards for it.
+"
+" I would like to simply ask VIM to search backward for the first occurence of
+" /^Template-Type:/, but it does not seem to be possible, so I have to start
+" from the beginning of the file... This might slow down a lot for files that
+" contain a lot of Template-Type statements.
+syntax sync fromstart
+
+" The problem with syntax sync match (tried below), it is that, for example,
+" it cannot realize when it is inside a Author-Name cluster, which is inside a
+" Template-Type template...
+"
+" TODO Is this linecont pattern really useful? It seems to work anyway...
+"syntax sync linecont /^\(Template-Type:\)\=\s*$/
+" TODO This sync is surprising... It seems to work on several lines even
+" though I replaced \_s* by \s*, even without the linecont pattern...
+"syntax sync match redifSyncForTemplatePaper groupthere redifRegionTemplatePaper /^Template-Type:\s*ReDIF-Paper \d\+\.\d\+/
+"syntax sync match redifSyncForTemplateArticle groupthere redifRegionTemplateArticle /^Template-Type:\s*ReDIF-Article \d\+\.\d\+/
+"syntax sync match redifSyncForTemplateChapter groupthere redifRegionTemplateChapter /^Template-Type:\s*ReDIF-Chapter \d\+\.\d\+/
+"syntax sync match redifSyncForTemplateBook groupthere redifRegionTemplateBook /^Template-Type:\s*ReDIF-Book \d\+\.\d\+/
+"syntax sync match redifSyncForTemplateSoftware groupthere redifRegionTemplateSoftware /^Template-Type:\s*ReDIF-Software \d\+\.\d\+/
+"syntax sync match redifSyncForTemplateArchive groupthere redifRegionTemplateArchive /^Template-Type:\s*ReDIF-Archive \d\+\.\d\+/
+"syntax sync match redifSyncForTemplateSeries groupthere redifRegionTemplateSeries /^Template-Type:\s*ReDIF-Series \d\+\.\d\+/
+"syntax sync match redifSyncForTemplateInstitution groupthere redifRegionTemplateInstitution /^Template-Type:\s*ReDIF-Institution \d\+\.\d\+/
+"syntax sync match redifSyncForTemplatePerson groupthere redifRegionTemplatePerson /^Template-Type:\s*ReDIF-Person \d\+\.\d\+/
+
+" I do not really know how sync linebreaks works, but it helps when making
+" changes on the argument when this argument is not on the same line than its
+" field. I just assume that people won't leave more than one line of
+" whitespace between fields and arguments (which is already very unlikely)
+" hence the value of 2.
+syntax sync linebreaks=2
+
+" Since folding is defined by the syntax, set foldmethod to syntax.
+set foldmethod=syntax
+
+" Set "b:current_syntax" to the name of the syntax at the end:
+let b:current_syntax="redif"
diff --git a/runtime/syntax/resolv.vim b/runtime/syntax/resolv.vim
index cbb9105d2f..06d6885c1c 100644
--- a/runtime/syntax/resolv.vim
+++ b/runtime/syntax/resolv.vim
@@ -1,10 +1,13 @@
 " Vim syntax file
 " Language: resolver configuration file
-" Maintainer: David Necas (Yeti) 
-" Original Maintaner: Radu Dineiu 
-" License: This file can be redistributed and/or modified under the same terms
-"   as Vim itself.
-" Last Change: 2012-05-24
+" Maintainer: Radu Dineiu 
+" URL: https://raw.github.com/rid9/vim-resolv/master/resolv.vim
+" Last Change: 2013 May 21
+" Version: 1.0
+"
+" Credits:
+"   David Necas (Yeti) 
+"   Stefano Zacchiroli 
 
 if version < 600
 	syntax clear
@@ -14,18 +17,18 @@ endif
 
 " Errors, comments and operators
 syn match resolvError /./
-syn match resolvComment /\s*[#;].*$/ contains=@Spell
-syn match resolvOperator /[/:]/ contained
+syn match resolvComment /\s*[#;].*$/
+syn match resolvOperator /[\/:]/ contained
 
 " IP
 syn cluster resolvIPCluster contains=resolvIPError,resolvIPSpecial
-syn match resolvIPError /\%(\d\{4,}\|25[6-9]\|2[6-9]\d\|[3-9]\d\{2}\)[.0-9]*/ contained
+syn match resolvIPError /\%(\d\{4,}\|25[6-9]\|2[6-9]\d\|[3-9]\d\{2}\)[\.0-9]*/ contained
 syn match resolvIPSpecial /\%(127\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\)/ contained
 
 " General
 syn match resolvIP contained /\%(\d\{1,4}\.\)\{3}\d\{1,4}/ contains=@resolvIPCluster
 syn match resolvIPNetmask contained /\%(\d\{1,4}\.\)\{3}\d\{1,4}\%(\/\%(\%(\d\{1,4}\.\)\{,3}\d\{1,4}\)\)\?/ contains=resolvOperator,@resolvIPCluster
-syn match resolvHostname contained /\w\{-}\.[-0-9A-Za-z_.]*/
+syn match resolvHostname contained /\w\{-}\.[-0-9A-Za-z_\.]*/
 
 " Particular
 syn match resolvIPNameserver contained /\%(\%(\d\{1,4}\.\)\{3}\d\{1,4}\%(\s\|$\)\)\+/ contains=@resolvIPCluster
@@ -41,8 +44,6 @@ syn match resolvSortList /^\s*sortlist\>/ nextgroup=resolvIPNetmaskSortList skip
 syn match resolvOptions /^\s*options\>/ nextgroup=resolvOption skipwhite
 
 " Options
-" FIXME: The manual page and the source code do not exactly agree on the set
-" of allowed options
 syn match resolvOption /\<\%(debug\|no_tld_query\|rotate\|no-check-names\|inet6\)\>/ contained nextgroup=resolvOption skipwhite
 syn match resolvOption /\<\%(ndots\|timeout\|attempts\):\d\+\>/ contained contains=resolvOperator nextgroup=resolvOption skipwhite
 
diff --git a/runtime/syntax/rexx.vim b/runtime/syntax/rexx.vim
index b4d07323d1..ef698a5351 100644
--- a/runtime/syntax/rexx.vim
+++ b/runtime/syntax/rexx.vim
@@ -1,14 +1,8 @@
 " Vim syntax file
 " Language:	Rexx
 " Maintainer:	Thomas Geulig 
-" Last Change:  2005 Dez  9, added some -coloring,
-"                            line comments, do *over*, messages, directives,
-"                            highlighting classes, methods, routines and requires
-"               2007 Oct 17, added support for new ooRexx 3.2 features
-"               Rony G. Flatscher 
-"
+" Last Change:  2012 Sep 14, added support for new ooRexx 4.0 features
 " URL:		http://www.geulig.de/vim/rexx.vim
-"
 " Special Thanks to Dan Sharp  and Rony G. Flatscher
 "  for comments and additions
 
@@ -54,7 +48,7 @@ syn match rexxKeyword contained "\\s*\(strict\s*\)\?\"
 syn match rexxRegularCallSignal contained "\<\(call\|signal\)\s\(\s*on\>\|\s*off\>\)\@!\(\k\+\ze\|\ze(\)\(\s*\|;\|$\|(\)"
 syn region rexxLabel contained start="\<\(call\|signal\)\>\s*\zs\(\k*\|(\)" end="\ze\(\s*\|;\|$\|(\)" containedin=rexxRegularCallSignal
 
-syn match rexxExceptionHandling contained "\<\(call\|signal\)\>\s\+\<\(on\|off\)\>.*\(;\|$\)"
+syn match rexxExceptionHandling contained "\<\(call\|signal\)\>\s\+\<\(on\|off\)\>.*\(;\|$\)" contains=rexxComment
 
 " hilite label given after keyword "name"
 syn match rexxLabel "name\s\+\zs\k\+\ze" containedin=rexxExceptionHandling
@@ -74,13 +68,14 @@ syn match rexxConditional "\<\(then\|else\|when\|otherwise\)\(\s*\|;\|\_$\|\)\>"
 syn match rexxLoopKeywords "\<\(to\|by\|for\|until\|while\|over\)\>" containedin=doLoopSelectLabelRegion
 
 " must be after Conditional phrases!
-syn match doLoopSelectLabelRegion "\<\(do\|loop\|select\)\>\s\+\(label\s\+\)\?\(\s\+\k\+\s\+\zs\\)\?\k*\(\s\+forever\)\?\(\s\|;\|$\)" 
+syn match doLoopSelectLabelRegion "\<\(do\|loop\|select\)\>\s\+\(label\s\+\)\?\(\s\+\k\+\s\+\zs\\)\?\k*\(\s\+forever\)\?\(\s\|;\|$\)" contains=doLoopSelectLabelRegion,rexxStartValueAssignment,rexxLoopKeywords
 
 " color label's name
 syn match rexxLabel2 "\<\(do\|loop\|select\)\>\s\+label\s\+\zs\k*\ze" containedin=doLoopSelectLabelRegion
 
 " make sure control variable is normal
-syn match rexxControlVariable        "\<\(do\|loop\)\>\(\s\+label\s\+\k*\)\?\s\+\zs.*\ze\s\+\" containedin=doLoopSelectLabelRegion
+" TODO: re-activate ?
+"rgf syn match rexxControlVariable        "\<\(do\|loop\)\>\(\s\+label\s\+\k*\)\?\s\+\zs.*\ze\s\+\" containedin=doLoopSelectLabelRegion
 
 " make sure control variable assignment is normal
 syn match rexxStartValueAssignment       "\<\(do\|loop\)\>\(\s\+label\s\+\k*\)\?\s\+\zs.*\ze\(=.*\)\?\s\+\" containedin=doLoopSelectLabelRegion
@@ -96,7 +91,8 @@ syn match rexxGuard "\(^\|;\|:\)\s*\\s\+\<\(on\|off\)\>"
 syn match rexxTrace "\(^\|;\|:\)\s*\\s\+\<\K\k*\>"
 
 " Raise statement
-syn match rexxRaise "\(^\|;\|:\)\s\+\\s*\<\(propagate\|error\|failure\|syntax\|user\)\>\?" contains=rexxRaise2
+" syn match rexxRaise "\(^\|;\|:\)\s\+\\s*\<\(propagate\|error\|failure\|syntax\|user\)\>\?" contains=rexxRaise2
+syn match rexxRaise "\(^\|;\|:\)\s*\\s*\<\(propagate\|error\|failure\|syntax\|user\)\>\?" contains=rexxRaise2
 syn match rexxRaise2 "\<\(additional\|array\|description\|exit\|propagate\|return\)\>" containedin=rexxRaise
 
 " Forward statement
@@ -142,19 +138,36 @@ syn keyword rexxSpecialVariable  sigl rc result self super
 syn keyword rexxSpecialVariable  .environment .error .input .local .methods .output .rs .stderr .stdin .stdout .stdque
 
 " Constants
-syn keyword rexxConst .true .false .nil .endOfLine .line
+syn keyword rexxConst .true .false .nil .endOfLine .line .context
+
+" Rexx numbers
+" int like number
+syn match rexxNumber '\d\+' contained
+syn match rexxNumber '[-+]\s*\d\+' contained
+
+" Floating point number with decimal
+syn match rexxNumber '\d\+\.\d*' contained
+syn match rexxNumber '[-+]\s*\d\+\.\d*' contained
+
+" Floating point like number with E
+syn match rexxNumber '[-+]\s*\d*[eE][\-+]\d\+' contained
+syn match rexxNumber '\d*[eE][\-+]\d\+' contained
+
+" Floating point like number with E and decimal point (+,-)
+syn match rexxNumber '[-+]\s*\d*\.\d*[eE][\-+]\d\+' contained
+syn match rexxNumber '\d*\.\d*[eE][\-+]\d\+' contained
 
-syn match rexxNumber "\(-\|+\)\?\s*\zs\<\(\d\+\.\?\|\d*\.\d\+\(E\(+\|-\)\d\{2,2}\)\?\)\?\>"
 
 " ooRexx builtin classes (as of version 3.2.0, fall 2007), first define dot to be o.k. in keywords
 syn keyword rexxBuiltinClass .Alarm .ArgUtil .Array .Bag .CaselessColumnComparator
 syn keyword rexxBuiltinClass .CaselessComparator .CaselessDescendingComparator .CircularQueue
 syn keyword rexxBuiltinClass .Class .Collection .ColumnComparator .Comparable .Comparator
-syn keyword rexxBuiltinClass .DateTime .DescendingComparator .Directory .InputOutputStream
+syn keyword rexxBuiltinClass .DateTime .DescendingComparator .Directory .File .InputOutputStream
 syn keyword rexxBuiltinClass .InputStream .InvertingComparator .List .MapCollection
 syn keyword rexxBuiltinClass .Message .Method .Monitor .MutableBuffer .Object
-syn keyword rexxBuiltinClass .OrderedCollection .OutputStream .Properties .Queue
-syn keyword rexxBuiltinClass .Relation .RexxQueue .Set .SetCollection .Stem .Stream
+syn keyword rexxBuiltinClass .OrderedCollection .OutputStream .Package .Properties .Queue
+syn keyword rexxBuiltinClass .RegularExpression .Relation .RexxContext .RexxQueue .Routine
+syn keyword rexxBuiltinClass .Set .SetCollection .Stem .Stream
 syn keyword rexxBuiltinClass .StreamSupplier .String .Supplier .Table .TimeSpan
 
 " Windows-only classes
@@ -163,7 +176,8 @@ syn keyword rexxBuiltinClass .CategoryDialog .CheckBox .CheckList .ComboBox .Dia
 syn keyword rexxBuiltinClass .DialogExtensions .DlgArea .DlgAreaU .DynamicDialog
 syn keyword rexxBuiltinClass .EditControl .InputBox .IntegerBox .ListBox .ListChoice
 syn keyword rexxBuiltinClass .ListControl .MenuObject .MessageExtensions .MultiInputBox
-syn keyword rexxBuiltinClass .MultiListChoice .PasswordBox .PlainBaseDialog .PlainUserDialog
+syn keyword rexxBuiltinClass .MultiListChoice .OLEObject .OLEVariant
+syn keyword rexxBuiltinClass .PasswordBox .PlainBaseDialog .PlainUserDialog
 syn keyword rexxBuiltinClass .ProgressBar .ProgressIndicator .PropertySheet .RadioButton
 syn keyword rexxBuiltinClass .RcDialog .ResDialog .ScrollBar .SingleSelection .SliderControl
 syn keyword rexxBuiltinClass .StateIndicator .StaticControl .TabControl .TimedMessage
@@ -171,22 +185,34 @@ syn keyword rexxBuiltinClass .TreeControl .UserDialog .VirtualKeyCodes .WindowBa
 syn keyword rexxBuiltinClass .WindowExtensions .WindowObject .WindowsClassesBase .WindowsClipboard
 syn keyword rexxBuiltinClass .WindowsEventLog .WindowsManager .WindowsProgramManager .WindowsRegistry
 
+" BSF4ooRexx classes
+syn keyword rexxBuiltinClass .BSF .bsf.dialog .bsf_proxy
+syn keyword rexxBuiltinClass .UNO .UNO_ENUM .UNO_CONSTANTS .UNO_PROPERTIES
+
 " ooRexx directives, ---rgf location important, otherwise directives in top of file not matched!
 syn region rexxClassDirective     start="::\s*class\s*"ms=e+1    end="\ze\(\s\|;\|$\)"
 syn region rexxMethodDirective    start="::\s*method\s*"ms=e+1   end="\ze\(\s\|;\|$\)"
 syn region rexxRequiresDirective  start="::\s*requires\s*"ms=e+1 end="\ze\(\s\|;\|$\)"
 syn region rexxRoutineDirective   start="::\s*routine\s*"ms=e+1  end="\ze\(\s\|;\|$\)"
 syn region rexxAttributeDirective start="::\s*attribute\s*"ms=e+1  end="\ze\(\s\|;\|$\)"
+" rgf, 2012-09-09
+syn region rexxOptionsDirective   start="::\s*options\s*"ms=e+1  end="\ze\(\s\|;\|$\)"
+syn region rexxConstantDirective  start="::\s*constant\s*"ms=e+1  end="\ze\(\s\|;\|$\)"
+
+syn region rexxDirective start="\(^\|;\)\s*::\s*\w\+"  end="\($\|;\)" contains=rexxString,rexxNumber,rexxComment,rexxLineComment,rexxClassDirective,rexxMethodDirective,rexxRoutineDirective,rexxRequiresDirective,rexxAttributeDirective,rexxOptionsDirective,rexxConstantDirective keepend
+
+syn match rexxOptionsDirective2 "\<\(digits\|form\|fuzz\|trace\)\>" containedin = rexxOptionsDirective3
+syn region rexxOptionsDirective3 start="\(^\|;\)\s*::\s*options\s"ms=e+1  end="\($\|;\)" contains=rexxString,rexxNumber,rexxVariable,rexxComment,rexxLineComment containedin = rexxDirective
 
-syn region rexxDirective start="\(^\|;\)\s*::\s*\w\+"  end="\($\|;\)" contains=rexxString,rexxComment,rexxLineComment,rexxClassDirective,rexxMethodDirective,rexxRoutineDirective,rexxRequiresDirective,rexxAttributeDirective keepend
 
 syn region rexxVariable start="\zs\<\(\.\)\@!\K\k\+\>\ze\s*\(=\|,\|)\|%\|\]\|\\\||\|&\|+=\|-=\|<\|>\)" end="\(\_$\|.\)"me=e-1
-syn match rexxVariable "\(=\|,\|)\|%\|\]\|\\\||\|&\|+=\|-=\|<\|>\)\s*\zs\K\k*\ze" 
+syn match rexxVariable "\(=\|,\|)\|%\|\]\|\\\||\|&\|+=\|-=\|<\|>\)\s*\zs\K\k*\ze"
 
 " rgf, 2007-07-22: unfortunately, the entire region is colored (not only the
 " patterns), hence useless (vim 7.0)! (syntax-docs hint that that should work)
 " attempt: just colorize the parenthesis in matching colors, keep content
 "          transparent to keep the formatting already done to it!
+" TODO: test on 7.3
 " syn region par1 matchgroup=par1 start="(" matchgroup=par1 end=")" transparent contains=par2
 " syn region par2 matchgroup=par2 start="(" matchgroup=par2 end=")" transparent contains=par3 contained
 " syn region par3 matchgroup=par3 start="(" matchgroup=par3 end=")" transparent contains=par4 contained
@@ -200,11 +226,11 @@ syn match rexxVariable "\(=\|,\|)\|%\|\]\|\\\||\|&\|+=\|-=\|<\|>\)\s*\zs\K\k*\ze
 " syn region par4 matchgroup=par4 start="(" end=")" contains=par5 contained
 " syn region par5 matchgroup=par5 start="(" end=")" contains=par1 contained
 
-hi par1 ctermfg=red 		guifg=red
-hi par2 ctermfg=blue 		guifg=blue
-hi par3 ctermfg=darkgreen 	guifg=darkgreen
-hi par4 ctermfg=darkyellow	guifg=darkyellow
-hi par5 ctermfg=darkgrey 	guifg=darkgrey
+hi par1 ctermfg=red 		guifg=red          "guibg=grey
+hi par2 ctermfg=blue 		guifg=blue         "guibg=grey
+hi par3 ctermfg=darkgreen 	guifg=darkgreen    "guibg=grey
+hi par4 ctermfg=darkyellow	guifg=darkyellow   "guibg=grey
+hi par5 ctermfg=darkgrey 	guifg=darkgrey     "guibg=grey
 
 " line continuation (trailing comma or single dash)
 syn sync linecont "\(,\|-\ze-\@!\)\ze\s*\(--.*\|\/\*.*\)*$"
@@ -214,7 +240,7 @@ syn sync linecont "\(,\|-\ze-\@!\)\ze\s*\(--.*\|\/\*.*\)*$"
 " endif
 " exec "syn sync ccomment rexxComment minlines=" . rexx_minlines
 
-" always scan from start, PCs are powerful enough for that in 2007 !
+" always scan from start, PCs have long become to be powerful enough for that
 exec "syn sync fromstart"
 
 " Define the default highlighting.
@@ -236,7 +262,7 @@ if version >= 508 || !exists("did_rexx_syn_inits")
   HiLink endIterateLeaveLabelRegion	rexxKeyword
   HiLink rexxLoopKeywords	rexxKeyword " Todo
 
-  HiLink rexxNumber		Normal	
+  HiLink rexxNumber		Normal "DiffChange
 "  HiLink rexxIdentifier		DiffChange
 
   HiLink rexxRegularCallSignal	Statement
@@ -249,7 +275,7 @@ if version >= 508 || !exists("did_rexx_syn_inits")
   HiLink rexxCommentError	rexxError
   HiLink rexxError		Error
   HiLink rexxKeyword		Statement
-  HiLink rexxKeywordStatements	Statement  
+  HiLink rexxKeywordStatements	Statement
 
   HiLink rexxFunction		Function
   HiLink rexxString		String
@@ -271,6 +297,13 @@ if version >= 508 || !exists("did_rexx_syn_inits")
   HiLink rexxRequiresDirective	Include
   HiLink rexxRoutineDirective	rexxFunction
 
+" rgf, 2012-09-09
+  HiLink rexxOptionsDirective	rexxFunction
+  HiLink rexxOptionsDirective2  rexxOptionsDirective
+  HiLink rexxOptionsDirective3  Normal " rexxOptionsDirective
+
+  HiLink rexxConstantDirective	rexxFunction
+
   HiLink rexxConst		Constant
   HiLink rexxTypeSpecifier	Type
   HiLink rexxBuiltinClass	rexxTypeSpecifier
diff --git a/runtime/syntax/rng.vim b/runtime/syntax/rng.vim
new file mode 100644
index 0000000000..1ef864c78f
--- /dev/null
+++ b/runtime/syntax/rng.vim
@@ -0,0 +1,25 @@
+" Vim syntax file
+" Language:    RELAX NG
+" Maintainer:  Jaromir Hradilek 
+" URL:         https://github.com/jhradilek/vim-rng
+" Last Change: 25 March 2013
+" Description: A syntax file for RELAX NG, a schema language for XML
+
+if exists('b:current_syntax')
+  finish
+endif
+
+do Syntax xml
+syn spell toplevel
+syn cluster xmlTagHook add=rngTagName
+syn case match
+
+syn keyword rngTagName anyName attribute choice data define div contained
+syn keyword rngTagName element empty except externalRef grammar contained
+syn keyword rngTagName group include interleave list mixed name contained
+syn keyword rngTagName notAllowed nsName oneOrMore optional param contained
+syn keyword rngTagName parentRef ref start text value zeroOrMore contained
+
+hi def link rngTagName Statement
+
+let b:current_syntax = 'rng'
diff --git a/runtime/syntax/rst.vim b/runtime/syntax/rst.vim
index b3f37d4053..159d14ef37 100644
--- a/runtime/syntax/rst.vim
+++ b/runtime/syntax/rst.vim
@@ -1,7 +1,7 @@
 " Vim syntax file
 " Language:         reStructuredText documentation format
 " Maintainer:       Nikolai Weibull 
-" Latest Revision:  2012-08-05
+" Latest Revision:  2013-06-03
 
 if exists("b:current_syntax")
   finish
@@ -135,9 +135,29 @@ execute 'syn match rstHyperlinkReference' .
 syn match   rstStandaloneHyperlink  contains=@NoSpell
       \ "\<\%(\%(\%(https\=\|file\|ftp\|gopher\)://\|\%(mailto\|news\):\)[^[:space:]'\"<>]\+\|www[[:alnum:]_-]*\.[[:alnum:]_-]\+\.[^[:space:]'\"<>]\+\)[[:alnum:]/]"
 
-" TODO: Use better syncing.  I don’t know the specifics of syncing well enough,
-" though.
-syn sync minlines=50 linebreaks=1
+syn region rstCodeBlock contained matchgroup=rstDirective
+      \ start=+\%(sourcecode\|code\%(-block\)\=\)::\s+
+      \ skip=+^$+
+      \ end=+^\s\@!+ 
+      \ contains=@NoSpell
+syn cluster rstDirectives add=rstCodeBlock
+
+if !exists('g:rst_syntax_code_list')
+    let g:rst_syntax_code_list = ['vim', 'java', 'cpp', 'lisp', 'php', 'python', 'perl']
+endif
+
+for code in g:rst_syntax_code_list
+    unlet! b:current_syntax
+    exe 'syn include @rst'.code.' syntax/'.code.'.vim'
+    exe 'syn region rstDirective'.code.' matchgroup=rstDirective fold '
+                \.'start=#\%(sourcecode\|code\%(-block\)\=\)::\s\+'.code.'\s*$# '
+                \.'skip=#^$# '
+                \.'end=#^\s\@!# contains=@NoSpell,@rst'.code
+    exe 'syn cluster rstDirectives add=rstDirective'.code
+endfor
+
+" TODO: Use better syncing.
+syn sync minlines=50 linebreaks=2
 
 hi def link rstTodo                         Todo
 hi def link rstComment                      Comment
@@ -168,6 +188,7 @@ hi def link rstFootnoteReference            Identifier
 hi def link rstCitationReference            Identifier
 hi def link rstHyperLinkReference           Identifier
 hi def link rstStandaloneHyperlink          Identifier
+hi def link rstCodeBlock                    String
 
 let b:current_syntax = "rst"
 
diff --git a/runtime/syntax/ruby.vim b/runtime/syntax/ruby.vim
index e3aee1200d..28f553decb 100644
--- a/runtime/syntax/ruby.vim
+++ b/runtime/syntax/ruby.vim
@@ -1,9 +1,7 @@
 " Vim syntax file
 " Language:		Ruby
 " Maintainer:		Doug Kearns 
-" Last Change:		2009 Dec 2
-" URL:			http://vim-ruby.rubyforge.org
-" Anon CVS:		See above site
+" URL:			https://github.com/vim-ruby/vim-ruby
 " Release Coordinator:	Doug Kearns 
 " ----------------------------------------------------------------------------
 "
@@ -32,8 +30,8 @@ endif
 
 " Operators
 if exists("ruby_operators")
-  syn match  rubyOperator	 "\%([~!^&|*/%+-]\|\%(class\s*\)\@\|<=\|\%(<\|\>\|>=\|=\@\|\*\*\|\.\.\.\|\.\.\|::\)"
-  syn match  rubyPseudoOperator  "\%(-=\|/=\|\*\*=\|\*=\|&&=\|&=\|&&\|||=\||=\|||\|%=\|+=\|!\~\|!=\)"
+  syn match  rubyOperator "[~!^&|*/%+-]\|\%(class\s*\)\@\|<=\|\%(<\|\>\|>=\|=\@\|\*\*\|\.\.\.\|\.\.\|::"
+  syn match  rubyOperator "->\|-=\|/=\|\*\*=\|\*=\|&&=\|&=\|&&\|||=\||=\|||\|%=\|+=\|!\~\|!="
   syn region rubyBracketOperator matchgroup=rubyOperator start="\%(\w[?!]\=\|[]})]\)\@<=\[\s*" end="\s*]" contains=ALLBUT,@rubyNotTop
 endif
 
@@ -95,86 +93,89 @@ syn match rubyLocalVariableOrMethod "\<[_[:lower:]][_[:alnum:]]*[?!=]\=" contain
 syn match rubyBlockArgument	    "&[_[:lower:]][_[:alnum:]]"		 contains=NONE display transparent
 
 syn match  rubyConstant		"\%(\%([.@$]\@\|::\)\@=\%(\s*(\)\@!"
-syn match  rubyClassVariable	"@@\h\w*" display
-syn match  rubyInstanceVariable "@\h\w*"  display
-syn match  rubyGlobalVariable	"$\%(\h\w*\|-.\)"
-syn match  rubySymbol		"[]})\"':]\@\|<=\|<\|===\|==\|=\~\|>>\|>=\|>\||\|-@\|-\|/\|\[]=\|\[]\|\*\*\|\*\|&\|%\|+@\|+\|`\)"
+syn match  rubyClassVariable	"@@\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" display
+syn match  rubyInstanceVariable "@\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*"  display
+syn match  rubyGlobalVariable	"$\%(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\|-.\)"
+syn match  rubySymbol		"[]})\"':]\@\|<=\|<\|===\|[=!]=\|[=!]\~\|!\|>>\|>=\|>\||\|-@\|-\|/\|\[]=\|\[]\|\*\*\|\*\|&\|%\|+@\|+\|`\)"
 syn match  rubySymbol		"[]})\"':]\@_,;:!?/.'"@$*\&+0]\)"
-syn match  rubySymbol		"[]})\"':]\@\@!\)\="
+syn match  rubySymbol		"[]})\"':]\@\@!\)\="
 syn match  rubySymbol		"\%([{(,]\_s*\)\@<=\l\w*[!?]\=::\@!"he=e-1
-syn match  rubySymbol		"[]})\"':]\@\|{\)\s*\)\@<=|" end="|" oneline display contains=rubyBlockParameter
 
 syn match rubyInvalidVariable	 "$[^ A-Za-z_-]"
-syn match rubyPredefinedVariable #$[!$&"'*+,./0:;<=>?@\`~1-9]#
+syn match rubyPredefinedVariable #$[!$&"'*+,./0:;<=>?@\`~]#
+syn match rubyPredefinedVariable "$\d\+"										   display
 syn match rubyPredefinedVariable "$_\>"											   display
 syn match rubyPredefinedVariable "$-[0FIKadilpvw]\>"									   display
 syn match rubyPredefinedVariable "$\%(deferr\|defout\|stderr\|stdin\|stdout\)\>"					   display
 syn match rubyPredefinedVariable "$\%(DEBUG\|FILENAME\|KCODE\|LOADED_FEATURES\|LOAD_PATH\|PROGRAM_NAME\|SAFE\|VERBOSE\)\>" display
 syn match rubyPredefinedConstant "\%(\%(\.\@\%(\s*(\)\@!"
-syn match rubyPredefinedConstant "\%(\%(\.\@\%(\s*(\)\@!"
-syn match rubyPredefinedConstant "\%(\%(\.\@\%(\s*(\)\@!"
-"Obsolete Global Constants
-"syn match rubyPredefinedConstant "\%(::\)\=\zs\%(PLATFORM\|RELEASE_DATE\|VERSION\)\>"
-"syn match rubyPredefinedConstant "\%(::\)\=\zs\%(NotImplementError\)\>"
+syn match rubyPredefinedConstant "\%(\%(\.\@\%(\s*(\)\@!"
+syn match rubyPredefinedConstant "\%(\%(\.\@\%(\s*(\)\@!"
+syn match rubyPredefinedConstant "\%(\%(\.\@\%(\s*(\)\@!"
 
 " Normal Regular Expression
-syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\%(^\|\<\%(and\|or\|while\|until\|unless\|if\|elsif\|when\|not\|then\|else\)\|[;\~=!|&(,[>]\)\s*\)\@<=/" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial keepend fold
+syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\%(^\|\<\%(and\|or\|while\|until\|unless\|if\|elsif\|when\|not\|then\|else\)\|[;\~=!|&(,[<>?:*+-]\)\s*\)\@<=/" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial fold
 syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\h\k*\s\+\)\@<=/[ \t=]\@!" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial fold
 
 " Generalized Regular Expression
-syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)"	end="\z1[iomxneus]*" skip="\\\\\|\\\z1" contains=@rubyRegexpSpecial fold
-syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r{"				end="}[iomxneus]*"   skip="\\\\\|\\}"	contains=@rubyRegexpSpecial fold
-syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r<"				end=">[iomxneus]*"   skip="\\\\\|\\>"	contains=@rubyRegexpSpecial,rubyNestedAngleBrackets,rubyDelimEscape fold
-syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\["				end="\][iomxneus]*"  skip="\\\\\|\\\]"	contains=@rubyRegexpSpecial fold
-syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r("				end=")[iomxneus]*"   skip="\\\\\|\\)"	contains=@rubyRegexpSpecial fold
+syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\z([~`!@#$%^&*_\-+=|\:;"',.? /]\)" end="\z1[iomxneus]*" skip="\\\\\|\\\z1" contains=@rubyRegexpSpecial fold
+syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r{"				 end="}[iomxneus]*"   skip="\\\\\|\\}"	 contains=@rubyRegexpSpecial fold
+syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r<"				 end=">[iomxneus]*"   skip="\\\\\|\\>"	 contains=@rubyRegexpSpecial,rubyNestedAngleBrackets,rubyDelimEscape fold
+syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\["				 end="\][iomxneus]*"  skip="\\\\\|\\\]"	 contains=@rubyRegexpSpecial fold
+syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r("				 end=")[iomxneus]*"   skip="\\\\\|\\)"	 contains=@rubyRegexpSpecial fold
 
 " Normal String and Shell Command Output
-syn region rubyString matchgroup=rubyStringDelimiter start="\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial fold
-syn region rubyString matchgroup=rubyStringDelimiter start="'"	end="'"  skip="\\\\\|\\'"  contains=rubyQuoteEscape    fold
+syn region rubyString matchgroup=rubyStringDelimiter start="\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial,@Spell fold
+syn region rubyString matchgroup=rubyStringDelimiter start="'"	end="'"  skip="\\\\\|\\'"  contains=rubyQuoteEscape,@Spell    fold
 syn region rubyString matchgroup=rubyStringDelimiter start="`"	end="`"  skip="\\\\\|\\`"  contains=@rubyStringSpecial fold
 
 " Generalized Single Quoted String, Symbol and Array of Strings
-syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold
-syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]{"				   end="}"   skip="\\\\\|\\}"	fold contains=rubyNestedCurlyBraces,rubyDelimEscape
-syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]<"				   end=">"   skip="\\\\\|\\>"	fold contains=rubyNestedAngleBrackets,rubyDelimEscape
-syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]\["				   end="\]"  skip="\\\\\|\\\]"	fold contains=rubyNestedSquareBrackets,rubyDelimEscape
-syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]("				   end=")"   skip="\\\\\|\\)"	fold contains=rubyNestedParentheses,rubyDelimEscape
-syn region rubySymbol matchgroup=rubySymbolDelimiter start="%[s]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)"  end="\z1" skip="\\\\\|\\\z1" fold
-syn region rubySymbol matchgroup=rubySymbolDelimiter start="%[s]{"				   end="}"   skip="\\\\\|\\}"	fold contains=rubyNestedCurlyBraces,rubyDelimEscape
-syn region rubySymbol matchgroup=rubySymbolDelimiter start="%[s]<"				   end=">"   skip="\\\\\|\\>"	fold contains=rubyNestedAngleBrackets,rubyDelimEscape
-syn region rubySymbol matchgroup=rubySymbolDelimiter start="%[s]\["				   end="\]"  skip="\\\\\|\\\]"	fold contains=rubyNestedSquareBrackets,rubyDelimEscape
-syn region rubySymbol matchgroup=rubySymbolDelimiter start="%[s]("				   end=")"   skip="\\\\\|\\)"	fold contains=rubyNestedParentheses,rubyDelimEscape
+syn region rubyString matchgroup=rubyStringDelimiter start="%[qwi]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold
+syn region rubyString matchgroup=rubyStringDelimiter start="%[qwi]{"				   end="}"   skip="\\\\\|\\}"	fold contains=rubyNestedCurlyBraces,rubyDelimEscape
+syn region rubyString matchgroup=rubyStringDelimiter start="%[qwi]<"				   end=">"   skip="\\\\\|\\>"	fold contains=rubyNestedAngleBrackets,rubyDelimEscape
+syn region rubyString matchgroup=rubyStringDelimiter start="%[qwi]\["				   end="\]"  skip="\\\\\|\\\]"	fold contains=rubyNestedSquareBrackets,rubyDelimEscape
+syn region rubyString matchgroup=rubyStringDelimiter start="%[qwi]("				   end=")"   skip="\\\\\|\\)"	fold contains=rubyNestedParentheses,rubyDelimEscape
+syn region rubyString matchgroup=rubyStringDelimiter start="%q "				   end=" "   skip="\\\\\|\\)"	fold
+syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s\z([~`!@#$%^&*_\-+=|\:;"',.? /]\)"   end="\z1" skip="\\\\\|\\\z1" fold
+syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s{"				   end="}"   skip="\\\\\|\\}"	fold contains=rubyNestedCurlyBraces,rubyDelimEscape
+syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s<"				   end=">"   skip="\\\\\|\\>"	fold contains=rubyNestedAngleBrackets,rubyDelimEscape
+syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s\["				   end="\]"  skip="\\\\\|\\\]"	fold contains=rubyNestedSquareBrackets,rubyDelimEscape
+syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s("				   end=")"   skip="\\\\\|\\)"	fold contains=rubyNestedParentheses,rubyDelimEscape
 
 " Generalized Double Quoted String and Array of Strings and Shell Command Output
 " Note: %= is not matched here as the beginning of a double quoted string
 syn region rubyString matchgroup=rubyStringDelimiter start="%\z([~`!@#$%^&*_\-+|\:;"',.?/]\)"	    end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial fold
-syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial fold
-syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\={"				    end="}"   skip="\\\\\|\\}"	 contains=@rubyStringSpecial,rubyNestedCurlyBraces,rubyDelimEscape    fold
-syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\=<"				    end=">"   skip="\\\\\|\\>"	 contains=@rubyStringSpecial,rubyNestedAngleBrackets,rubyDelimEscape  fold
-syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\=\["				    end="\]"  skip="\\\\\|\\\]"	 contains=@rubyStringSpecial,rubyNestedSquareBrackets,rubyDelimEscape fold
-syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\=("				    end=")"   skip="\\\\\|\\)"	 contains=@rubyStringSpecial,rubyNestedParentheses,rubyDelimEscape    fold
+syn region rubyString matchgroup=rubyStringDelimiter start="%[QWIx]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial fold
+syn region rubyString matchgroup=rubyStringDelimiter start="%[QWIx]\={"				    end="}"   skip="\\\\\|\\}"	 contains=@rubyStringSpecial,rubyNestedCurlyBraces,rubyDelimEscape    fold
+syn region rubyString matchgroup=rubyStringDelimiter start="%[QWIx]\=<"				    end=">"   skip="\\\\\|\\>"	 contains=@rubyStringSpecial,rubyNestedAngleBrackets,rubyDelimEscape  fold
+syn region rubyString matchgroup=rubyStringDelimiter start="%[QWIx]\=\["				    end="\]"  skip="\\\\\|\\\]"	 contains=@rubyStringSpecial,rubyNestedSquareBrackets,rubyDelimEscape fold
+syn region rubyString matchgroup=rubyStringDelimiter start="%[QWIx]\=("				    end=")"   skip="\\\\\|\\)"	 contains=@rubyStringSpecial,rubyNestedParentheses,rubyDelimEscape    fold
+syn region rubyString matchgroup=rubyStringDelimiter start="%[Qx] "				    end=" "   skip="\\\\\|\\)"   contains=@rubyStringSpecial fold
 
 " Here Document
-syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@>\|[<>]=\=\|<=>\|===\|==\|=\~\|`\)\%([[:space:];#(]\|$\)\@=" contained containedin=rubyAliasDeclaration,rubyAliasDeclaration2,rubyMethodDeclaration
+syn match  rubyFunction "\%([[:space:].]\|^\)\@<=\%(\[\]=\=\|\*\*\|[+-]@\=\|[*/%|&^~]\|<<\|>>\|[<>]=\=\|<=>\|===\|[=!]=\|[=!]\~\|!\|`\)\%([[:space:];#(]\|$\)\@=" contained containedin=rubyAliasDeclaration,rubyAliasDeclaration2,rubyMethodDeclaration
 
 syn cluster rubyDeclaration contains=rubyAliasDeclaration,rubyAliasDeclaration2,rubyMethodDeclaration,rubyModuleDeclaration,rubyClassDeclaration,rubyFunction,rubyBlockParameter
 
@@ -198,7 +199,7 @@ syn match   rubyControl	       "\<\%(and\|break\|in\|next\|not\|or\|redo\|rescue
 syn match   rubyOperator       "\[?!]\@!"
 syn match   rubyBoolean	       "\<\%(true\|false\)\>[?!]\@!"
-syn match   rubyPseudoVariable "\<\%(nil\|self\|__FILE__\|__LINE__\)\>[?!]\@!"
+syn match   rubyPseudoVariable "\<\%(nil\|self\|__ENCODING__\|__FILE__\|__LINE__\|__callee__\|__method__\)\>[?!]\@!" " TODO: reorganise
 syn match   rubyBeginEnd       "\<\%(BEGIN\|END\)\>[?!]\@!"
 
 " Expensive Mode - match 'end' with the appropriate opening keyword for syntax
@@ -220,13 +221,13 @@ if !exists("b:ruby_no_expensive") && !exists("ruby_no_expensive")
 
   syn region rubyDoBlock      matchgroup=rubyControl start="\" end="\"                 contains=ALLBUT,@rubyNotTop fold
   " curly bracket block or hash literal
-  syn region rubyCurlyBlock   start="{" end="}"							  contains=ALLBUT,@rubyNotTop fold
-  syn region rubyArrayLiteral matchgroup=rubyArrayDelimiter start="\%(\w\|[\]})]\)\@" end="\" contains=ALLBUT,@rubyNotTop fold
   syn region rubyCaseExpression	       matchgroup=rubyConditional start="\"  end="\" contains=ALLBUT,@rubyNotTop fold
-  syn region rubyConditionalExpression matchgroup=rubyConditional start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+=-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@" end="\" contains=ALLBUT,@rubyNotTop fold
+  syn region rubyConditionalExpression matchgroup=rubyConditional start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+=-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@" end="\%(\%(\%(\.\@" contains=ALLBUT,@rubyNotTop fold
 
   syn match rubyConditional "\<\%(then\|else\|when\)\>[?!]\@!"	contained containedin=rubyCaseExpression
   syn match rubyConditional "\<\%(then\|else\|elsif\)\>[?!]\@!" contained containedin=rubyConditionalExpression
@@ -239,7 +240,7 @@ if !exists("b:ruby_no_expensive") && !exists("ruby_no_expensive")
   syn region rubyRepeatExpression start="\[?!]\@!" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@" matchgroup=rubyRepeat end="\" contains=ALLBUT,@rubyNotTop nextgroup=rubyOptionalDoLine fold
 
   if !exists("ruby_minlines")
-    let ruby_minlines = 50
+    let ruby_minlines = 500
   endif
   exec "syn sync minlines=" . ruby_minlines
 
@@ -253,7 +254,7 @@ endif
 
 " Special Methods
 if !exists("ruby_no_special_methods")
-  syn keyword rubyAccess    public protected private module_function
+  syn keyword rubyAccess    public protected private public_class_method private_class_method public_constant private_constant module_function
   " attr is a common variable name
   syn match   rubyAttribute "\%(\%(^\|;\)\s*\)\@<=attr\>\(\s*[.=]\)\@!"
   syn keyword rubyAttribute attr_accessor attr_reader attr_writer
@@ -262,17 +263,17 @@ if !exists("ruby_no_special_methods")
   syn keyword rubyException raise fail catch throw
   " false positive with 'include?'
   syn match   rubyInclude   "\[?!]\@!"
-  syn keyword rubyInclude   autoload extend load require
+  syn keyword rubyInclude   autoload extend load prepend require require_relative
   syn keyword rubyKeyword   callcc caller lambda proc
 endif
 
 " Comments and Documentation
 syn match   rubySharpBang "\%^#!.*" display
-syn keyword rubyTodo	  FIXME NOTE TODO OPTIMIZE XXX contained
+syn keyword rubyTodo	  FIXME NOTE TODO OPTIMIZE XXX todo contained
 syn match   rubyComment   "#.*" contains=rubySharpBang,rubySpaceError,rubyTodo,@Spell
 if !exists("ruby_no_comment_fold")
   syn region rubyMultilineComment start="\%(\%(^\s*#.*\n\)\@"   transparent contains=NONE
-syn match rubyKeywordAsMethod "\%(\%(\.\@"	    transparent contains=NONE
-syn match rubyKeywordAsMethod "\%(\%(\.\@" transparent contains=NONE
-syn match rubyKeywordAsMethod "\%(\%(\.\@"		    transparent contains=NONE
-syn match rubyKeywordAsMethod "\%(\%(\.\@"		    transparent contains=NONE
-syn match rubyKeywordAsMethod "\%(\%(\.\@"		    transparent contains=NONE
+syn match rubyKeywordAsMethod "\%(\%(\.\@"	transparent contains=NONE
+syn match rubyKeywordAsMethod "\%(\%(\.\@"		transparent contains=NONE
+syn match rubyKeywordAsMethod "\%(\%(\.\@"	transparent contains=NONE
+syn match rubyKeywordAsMethod "\%(\%(\.\@"			transparent contains=NONE
+syn match rubyKeywordAsMethod "\%(\%(\.\@"		transparent contains=NONE
+syn match rubyKeywordAsMethod "\%(\%(\.\@"	transparent contains=NONE
 
 " __END__ Directive
 syn region rubyData matchgroup=rubyDataDirective start="^__END__$" end="\%$" fold
@@ -330,7 +331,6 @@ hi def link rubyPredefinedVariable	rubyPredefinedIdentifier
 hi def link rubySymbol			Constant
 hi def link rubyKeyword			Keyword
 hi def link rubyOperator		Operator
-hi def link rubyPseudoOperator		rubyOperator
 hi def link rubyBeginEnd		Statement
 hi def link rubyAccess			Statement
 hi def link rubyAttribute		Statement
@@ -351,6 +351,7 @@ hi def link rubySharpBang		PreProc
 hi def link rubyRegexpDelimiter		rubyStringDelimiter
 hi def link rubySymbolDelimiter		rubyStringDelimiter
 hi def link rubyStringDelimiter		Delimiter
+hi def link rubyHeredoc			rubyString
 hi def link rubyString			String
 hi def link rubyRegexpEscape		rubyRegexpSpecial
 hi def link rubyRegexpQuantifier	rubyRegexpSpecial
diff --git a/runtime/syntax/sass.vim b/runtime/syntax/sass.vim
index aa5f5e95b0..2ea0722696 100644
--- a/runtime/syntax/sass.vim
+++ b/runtime/syntax/sass.vim
@@ -2,7 +2,7 @@
 " Language:	Sass
 " Maintainer:	Tim Pope 
 " Filenames:	*.sass
-" Last Change:	2010 Aug 9
+" Last Change:	2013 May 30
 
 if exists("b:current_syntax")
   finish
@@ -17,8 +17,8 @@ syn cluster sassCssAttributes contains=css.*Attr,scssComment,cssValue.*,cssColor
 
 syn region sassDefinition matchgroup=cssBraces start="{" end="}" contains=TOP
 
-syn match sassProperty "\%([{};]\s*\|^\)\@<=\%([[:alnum:]-]\|#{[^{}]*}\)\+:" contains=css.*Prop skipwhite nextgroup=sassCssAttribute contained containedin=sassDefinition
-syn match sassProperty "^\s*\zs\s\%(\%([[:alnum:]-]\|#{[^{}]*}\)\+:\|:[[:alnum:]-]\+\)"hs=s+1 contains=css.*Prop skipwhite nextgroup=sassCssAttribute
+syn match sassProperty "\%([{};]\s*\|^\)\@<=\%([[:alnum:]-]\|#{[^{}]*}\)\+\s*:" contains=css.*Prop skipwhite nextgroup=sassCssAttribute contained containedin=sassDefinition
+syn match sassProperty "^\s*\zs\s\%(\%([[:alnum:]-]\|#{[^{}]*}\)\+\s*:\|:[[:alnum:]-]\+\)"hs=s+1 contains=css.*Prop skipwhite nextgroup=sassCssAttribute
 syn match sassProperty "^\s*\zs\s\%(:\=[[:alnum:]-]\+\s*=\)"hs=s+1 contains=css.*Prop skipwhite nextgroup=sassCssAttribute
 syn match sassCssAttribute +\%("\%([^"]\|\\"\)*"\|'\%([^']\|\\'\)*'\|#{[^{}]*}\|[^{};]\)*+ contained contains=@sassCssAttributes,sassVariable,sassFunction,sassInterpolation
 syn match sassDefault "!default\>" contained
@@ -34,14 +34,19 @@ syn match sassFunction "\<\%(unquote\|quote\)\>(\@=" contained
 syn match sassFunction "\<\%(percentage\|round\|ceil\|floor\|abs\)\>(\@=" contained
 syn match sassFunction "\<\%(type-of\|unit\|unitless\|comparable\)\>(\@=" contained
 
-syn region sassInterpolation matchgroup=sassInterpolationDelimiter start="#{" end="}" contains=@sassCssAttributes,sassVariable,sassFunction containedin=cssStringQ,cssStringQQ,sassProperty
+syn region sassInterpolation matchgroup=sassInterpolationDelimiter start="#{" end="}" contains=@sassCssAttributes,sassVariable,sassFunction containedin=cssStringQ,cssStringQQ,cssPseudoClass,sassProperty
 
 syn match sassMixinName "[[:alnum:]_-]\+" contained nextgroup=sassCssAttribute
-syn match sassMixin  "^="               nextgroup=sassMixinName
+syn match sassMixin  "^="               nextgroup=sassMixinName skipwhite
 syn match sassMixin  "\%([{};]\s*\|^\s*\)\@<=@mixin"   nextgroup=sassMixinName skipwhite
 syn match sassMixing "^\s\+\zs+"        nextgroup=sassMixinName
 syn match sassMixing "\%([{};]\s*\|^\s*\)\@<=@include" nextgroup=sassMixinName skipwhite
 syn match sassExtend "\%([{};]\s*\|^\s*\)\@<=@extend"
+syn match sassPlaceholder "\%([{};]\s*\|^\s*\)\@<=%"   nextgroup=sassMixinName skipwhite
+
+syn match sassFunctionName "[[:alnum:]_-]\+" contained nextgroup=sassCssAttribute
+syn match sassFunctionDecl "\%([{};]\s*\|^\s*\)\@<=@function"   nextgroup=sassFunctionName skipwhite
+syn match sassReturn "\%([{};]\s*\|^\s*\)\@<=@return"
 
 syn match sassEscape     "^\s*\zs\\"
 syn match sassIdChar     "#[[:alnum:]_-]\@=" nextgroup=sassId
@@ -53,11 +58,11 @@ syn match sassAmpersand  "&"
 " TODO: Attribute namespaces
 " TODO: Arithmetic (including strings and concatenation)
 
-syn region sassInclude start="@import" end=";\|$" contains=scssComment,cssURL,cssUnicodeEscape,cssMediaType
+syn region sassInclude start="@import" end=";\|$" contains=scssComment,cssStringQ,cssStringQQ,cssURL,cssUnicodeEscape,cssMediaType
 syn region sassDebugLine end=";\|$" matchgroup=sassDebug start="@debug\>" contains=@sassCssAttributes,sassVariable,sassFunction
 syn region sassWarnLine end=";\|$" matchgroup=sassWarn start="@warn\>" contains=@sassCssAttributes,sassVariable,sassFunction
-syn region sassControlLine matchgroup=sassControl start="@\%(if\|else\%(\s\+if\)\=\|while\|for\)\>" end="[{};]\@=\|$" contains=sassFor,@sassCssAttributes,sassVariable,sassFunction
-syn keyword sassFor from to through contained
+syn region sassControlLine matchgroup=sassControl start="@\%(if\|else\%(\s\+if\)\=\|while\|for\|each\)\>" end="[{};]\@=\|$" contains=sassFor,@sassCssAttributes,sassVariable,sassFunction
+syn keyword sassFor from to through in contained
 
 syn keyword sassTodo        FIXME NOTE TODO OPTIMIZE XXX contained
 syn region  sassComment     start="^\z(\s*\)//"  end="^\%(\z1 \)\@!" contains=sassTodo,@Spell
@@ -70,7 +75,10 @@ hi def link sassVariable                Identifier
 hi def link sassFunction                Function
 hi def link sassMixing                  PreProc
 hi def link sassMixin                   PreProc
+hi def link sassPlaceholder             PreProc
 hi def link sassExtend                  PreProc
+hi def link sassFunctionDecl            PreProc
+hi def link sassReturn                  PreProc
 hi def link sassTodo                    Todo
 hi def link sassInclude                 Include
 hi def link sassDebug                   sassControl
diff --git a/runtime/syntax/sgmllnx.vim b/runtime/syntax/sgmllnx.vim
index 99e6ea2afe..28224f601e 100644
--- a/runtime/syntax/sgmllnx.vim
+++ b/runtime/syntax/sgmllnx.vim
@@ -1,8 +1,7 @@
 " Vim syntax file
 " Language:	SGML-linuxdoc (supported by old sgmltools-1.x)
-"		(for more information, visit www.sgmltools.org)
 " Maintainer:	SungHyun Nam 
-" Last Change:	2008 Sep 17
+" Last Change:	2013 May 13
 
 " For version 5.x: Clear all syntax items
 " For version 6.x: Quit when a syntax file was already loaded
@@ -29,7 +28,7 @@ syn region sgmllnxSpecial	oneline start="&" end=";"
 syn keyword sgmllnxTagName contained article author date toc title sect verb
 syn keyword sgmllnxTagName contained abstract tscreen p itemize item enum
 syn keyword sgmllnxTagName contained descrip quote htmlurl code ref
-syn keyword sgmllnxTagName contained tt tag bf
+syn keyword sgmllnxTagName contained tt tag bf it url
 syn match   sgmllnxTagName contained "sect\d\+"
 
 " Comments
diff --git a/runtime/syntax/sh.vim b/runtime/syntax/sh.vim
index 355e8eb918..0bec249d0c 100644
--- a/runtime/syntax/sh.vim
+++ b/runtime/syntax/sh.vim
@@ -1,9 +1,9 @@
 " Vim syntax file
 " Language:		shell (sh) Korn shell (ksh) bash (sh)
-" Maintainer:		Dr. Charles E. Campbell, Jr.  
+" Maintainer:		Charles E. Campbell  
 " Previous Maintainer:	Lennart Schultz 
-" Last Change:		Mar 19, 2012
-" Version:		122
+" Last Change:		Jul 02, 2013
+" Version:		131
 " URL:		http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
 " For options and settings, please use:      :help ft-sh-syntax
 " This file includes many ideas from ?ric Brunet (eric.brunet@ens.fr)
@@ -17,29 +17,33 @@ elseif exists("b:current_syntax")
 endif
 
 " AFAICT "." should be considered part of the iskeyword.  Using iskeywords in
-" syntax is dicey, so the following code permits the user to prevent/override
-" its setting.
-if exists("g:sh_isk")          " override support
- exe "setlocal isk=".g:sh_isk
-elseif !exists("g:sh_noisk")   " prevent modification support
- setlocal isk+=.
+" syntax is dicey, so the following code permits the user to
+"  g:sh_isk set to a string	: specify iskeyword.
+"  g:sh_noisk exists	: don't change iskeyword
+"  g:sh_noisk does not exist	: (default) append "." to iskeyword
+if exists("g:sh_isk") && type(g:sh_isk) == 1	" user specifying iskeyword
+ exe "setl isk=".g:sh_isk
+elseif !exists("g:sh_noisk")		" optionally prevent appending '.' to iskeyword
+ setl isk+=.
 endif
 
 " trying to answer the question: which shell is /bin/sh, really?
+" If the user has not specified any of g:is_kornshell, g:is_bash, g:is_posix, g:is_sh, then guess.
 if !exists("g:is_kornshell") && !exists("g:is_bash") && !exists("g:is_posix") && !exists("g:is_sh")
+ let s:shell = ""
  if executable("/bin/sh")
-  if     resolve("/bin/sh") =~ 'bash$'
-   let g:is_bash= 1
-  elseif resolve("/bin/sh") =~ 'ksh$'
-   let g:is_ksh = 1
-  endif
+  let s:shell = resolve("/bin/sh")
  elseif executable("/usr/bin/sh")
-  if     resolve("/usr/bin//sh") =~ 'bash$'
-   let g:is_bash= 1
-  elseif resolve("/usr/bin//sh") =~ 'ksh$'
-   let g:is_ksh = 1
-  endif
+  let s:shell = resolve("/usr/bin/sh")
  endif
+ if     s:shell =~ 'bash$'
+  let g:is_bash= 1
+ elseif s:shell =~ 'ksh$'
+  let g:is_kornshell = 1
+ elseif s:shell =~ 'dash$'
+  let g:is_posix = 1
+ endif
+ unlet s:shell
 endif
 
 " handling /bin/sh with is_kornshell/is_sh {{{1
@@ -76,16 +80,19 @@ elseif g:sh_fold_enabled != 0 && !has("folding")
  echomsg "Ignoring g:sh_fold_enabled=".g:sh_fold_enabled."; need to re-compile vim for +fold support"
 endif
 if !exists("s:sh_fold_functions")
- let s:sh_fold_functions = 1
+ let s:sh_fold_functions= and(g:sh_fold_enabled,1)
 endif
 if !exists("s:sh_fold_heredoc")
- let s:sh_fold_heredoc   = 2
+ let s:sh_fold_heredoc  = and(g:sh_fold_enabled,2)
 endif
 if !exists("s:sh_fold_ifdofor")
- let s:sh_fold_ifdofor   = 4
+ let s:sh_fold_ifdofor  = and(g:sh_fold_enabled,4)
 endif
 if g:sh_fold_enabled && &fdm == "manual"
- setlocal fdm=syntax
+ " Given that	the	user provided g:sh_fold_enabled
+ " 	AND	g:sh_fold_enabled is manual (usual default)
+ " 	implies	a desire for syntax-based folding
+ setl fdm=syntax
 endif
 
 " sh syntax is case sensitive {{{1
@@ -102,12 +109,12 @@ syn cluster shArithList	contains=@shArithParenList,shParenError
 syn cluster shCaseEsacList	contains=shCaseStart,shCase,shCaseBar,shCaseIn,shComment,shDeref,shDerefSimple,shCaseCommandSub,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote,shCtrlSeq,@shErrorList,shStringSpecial,shCaseRange
 syn cluster shCaseList	contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq
 "syn cluster shColonList	contains=@shCaseList
-syn cluster shCommandSubList	contains=shArithmetic,shDeref,shDerefSimple,shEscape,shNumber,shOperator,shPosnParm,shExSingleQuote,shSingleQuote,shExDoubleQuote,shDoubleQuote,shStatement,shVariable,shSubSh,shAlias,shTest,shCtrlSeq,shSpecial
+syn cluster shCommandSubList	contains=shArithmetic,shDeref,shDerefSimple,shEcho,shEscape,shNumber,shOption,shPosnParm,shExSingleQuote,shSingleQuote,shExDoubleQuote,shDoubleQuote,shStatement,shVariable,shSubSh,shAlias,shTest,shCtrlSeq,shSpecial,shCmdParenRegion
 syn cluster shCurlyList	contains=shNumber,shComma,shDeref,shDerefSimple,shDerefSpecial
-syn cluster shDblQuoteList	contains=shCommandSub,shDeref,shDerefSimple,shPosnParm,shCtrlSeq,shSpecial
+syn cluster shDblQuoteList	contains=shCommandSub,shDeref,shDerefSimple,shEscape,shPosnParm,shCtrlSeq,shSpecial
 syn cluster shDerefList	contains=shDeref,shDerefSimple,shDerefVar,shDerefSpecial,shDerefWordError,shDerefPPS
 syn cluster shDerefVarList	contains=shDerefOp,shDerefVarArray,shDerefOpError
-syn cluster shEchoList	contains=shArithmetic,shCommandSub,shDeref,shDerefSimple,shExpr,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shCtrlSeq,shEchoQuote
+syn cluster shEchoList	contains=shArithmetic,shCommandSub,shDeref,shDerefSimple,shEscape,shExpr,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shCtrlSeq,shEchoQuote
 syn cluster shExprList1	contains=shCharClass,shNumber,shOperator,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shDblBrace,shDeref,shDerefSimple,shCtrlSeq
 syn cluster shExprList2	contains=@shExprList1,@shCaseList,shTest
 syn cluster shFunctionList	contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shOption,shRedir,shSetList,shSource,shStatement,shVariable,shOperator,shCtrlSeq
@@ -118,7 +125,7 @@ endif
 syn cluster shHereBeginList	contains=@shCommandSubList
 syn cluster shHereList	contains=shBeginHere,shHerePayload
 syn cluster shHereListDQ	contains=shBeginHere,@shDblQuoteList,shHerePayload
-syn cluster shIdList	contains=shCommandSub,shWrapLineOperator,shSetOption,shDeref,shDerefSimple,shRedir,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq,shStringSpecial
+syn cluster shIdList	contains=shCommandSub,shWrapLineOperator,shSetOption,shDeref,shDerefSimple,shRedir,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq,shStringSpecial,shAtExpr
 syn cluster shIfList	contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey,shFunctionOne,shFunctionTwo
 syn cluster shLoopList	contains=@shCaseList,shTestOpr,shExpr,shDblBrace,shConditional,shCaseEsac,shTest,@shErrorList,shSet,shOption
 syn cluster shSubShList	contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq,shOperator
@@ -126,8 +133,8 @@ syn cluster shTestList	contains=shCharClass,shComment,shCommandSub,shDeref,shDer
 " Echo: {{{1
 " ====
 " This one is needed INSIDE a CommandSub, so that `echo bla` be correct
-syn region shEcho matchgroup=shStatement start="\"  skip="\\$" matchgroup=shEchoDelim end="$" matchgroup=NONE end="[<>;&|()]"me=e-1 end="\d[<>]"me=e-2 end="\s#"me=e-2 contains=@shEchoList skipwhite nextgroup=shQuickComment
-syn region shEcho matchgroup=shStatement start="\" skip="\\$" matchgroup=shEchoDelim end="$" matchgroup=NONE end="[<>;&|()]"me=e-1 end="\d[<>]"me=e-2 end="\s#"me=e-2 contains=@shEchoList skipwhite nextgroup=shQuickComment
+syn region shEcho matchgroup=shStatement start="\"  skip="\\$" matchgroup=shEchoDelim end="$" matchgroup=NONE end="[<>;&|()`]"me=e-1 end="\d[<>]"me=e-2 end="\s#"me=e-2 contains=@shEchoList skipwhite nextgroup=shQuickComment
+syn region shEcho matchgroup=shStatement start="\" skip="\\$" matchgroup=shEchoDelim end="$" matchgroup=NONE end="[<>;&|()`]"me=e-1 end="\d[<>]"me=e-2 end="\s#"me=e-2 contains=@shEchoList skipwhite nextgroup=shQuickComment
 syn match  shEchoQuote contained	'\%(\\\\\)*\\["`'()]'
 
 " This must be after the strings, so that ... \" will be correct
@@ -160,8 +167,8 @@ endif
 
 " Options: {{{1
 " ====================
-syn match   shOption	"\s\zs[-+][-_a-zA-Z0-9]\+\>"
-syn match   shOption	"\s\zs--[^ \t$`'"|]\+"
+syn match   shOption	"\s\zs[-+][-_a-zA-Z0-9#]\+"
+syn match   shOption	"\s\zs--[^ \t$`'"|);]\+"
 
 " File Redirection Highlighted As Operators: {{{1
 "===========================================
@@ -204,14 +211,15 @@ syn match   shCharClass	contained	"\[:\(backspace\|escape\|return\|xdigit\|alnum
 
 " Loops: do, if, while, until {{{1
 " ======
-if (g:sh_fold_enabled % (s:sh_fold_ifdofor * 2))/s:sh_fold_ifdofor
+if s:sh_fold_ifdofor
  syn region shDo	fold transparent matchgroup=shConditional start="\" matchgroup=shConditional end="\" contains=@shLoopList
  syn region shIf	fold transparent matchgroup=shConditional start="\+ end="\<;\_s*then\>" end="\"   contains=@shIfList
- syn region shFor	fold matchgroup=shLoop start="\+ end="\<;\_s*then\>" end="\"   contains=@shIfList
- syn region shFor	matchgroup=shLoop start="\\ze\_s*(('
 endif
 if exists("b:is_kornshell") || exists("b:is_bash")
  syn cluster shCaseList	add=shRepeat
@@ -230,7 +238,7 @@ syn match  shComma     contained	","
 " ====
 syn match   shCaseBar	contained skipwhite "\(^\|[^\\]\)\(\\\\\)*\zs|"		nextgroup=shCase,shCaseStart,shCaseBar,shComment,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote
 syn match   shCaseStart	contained skipwhite skipnl "("			nextgroup=shCase,shCaseBar
-if (g:sh_fold_enabled % (s:sh_fold_ifdofor * 2))/s:sh_fold_ifdofor
+if s:sh_fold_ifdofor
  syn region  shCase	fold contained skipwhite skipnl matchgroup=shSnglCase start="\%(\\.\|[^#$()'" \t]\)\{-}\zs)"  end=";;" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,shComment
  syn region  shCaseEsac	fold matchgroup=shConditional start="\" end="\"	contains=@shCaseEsacList
 else
@@ -246,13 +254,17 @@ endif
 syn region  shCaseSingleQuote	matchgroup=shQuote start=+'+ end=+'+		contains=shStringSpecial		skipwhite skipnl nextgroup=shCaseBar	contained
 syn region  shCaseDoubleQuote	matchgroup=shQuote start=+"+ skip=+\\\\\|\\.+ end=+"+	contains=@shDblQuoteList,shStringSpecial	skipwhite skipnl nextgroup=shCaseBar	contained
 syn region  shCaseCommandSub	start=+`+ skip=+\\\\\|\\.+ end=+`+		contains=@shCommandSubList		skipwhite skipnl nextgroup=shCaseBar	contained
-syn region  shCaseRange	matchgroup=Delimiter start=+\[+ skip=+\\\\+ end=+]+	contained
-
+if exists("b:is_bash")
+ syn region  shCaseRange	matchgroup=Delimiter start=+\[+ skip=+\\\\+ end=+\]+	contained	contains=shCharClass
+ syn match   shCharClass	'\[:\%(alnum\|alpha\|ascii\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|word\|or\|xdigit\):\]'			contained
+else
+ syn region  shCaseRange	matchgroup=Delimiter start=+\[+ skip=+\\\\+ end=+\]+	contained
+endif
 " Misc: {{{1
 "======
 syn match   shWrapLineOperator "\\$"
-syn region  shCommandSub   start="`" skip="\\\\\|\\." end="`" contains=@shCommandSubList
-syn match   shEscape	contained	'\\.'         contains=@shCommandSubList
+syn region  shCommandSub   start="`" skip="\\\\\|\\." end="`"	contains=@shCommandSubList
+syn match   shEscape	contained	'\%(^\)\@!\%(\\\\\)*\\.'
 
 " $() and $(()): {{{1
 " $(..) is not supported by sh (Bourne shell).  However, apparently
@@ -268,20 +280,23 @@ if exists("b:is_kornshell") || exists("b:is_bash")
 elseif !exists("g:sh_no_error")
  syn region shCommandSub matchgroup=Error start="\$(" end=")" contains=@shCommandSubList
 endif
+syn region shCmdParenRegion matchgroup=shCmdSubRegion start="(" skip='\\\\\|\\.' end=")"	contains=@shCommandSubList
 
 if exists("b:is_bash")
  syn cluster shCommandSubList add=bashSpecialVariables,bashStatement
  syn cluster shCaseList add=bashAdminStatement,bashStatement
  syn keyword bashSpecialVariables contained auto_resume BASH BASH_ALIASES BASH_ALIASES BASH_ARGC BASH_ARGC BASH_ARGV BASH_ARGV BASH_CMDS BASH_CMDS BASH_COMMAND BASH_COMMAND BASH_ENV BASH_EXECUTION_STRING BASH_EXECUTION_STRING BASH_LINENO BASH_LINENO BASHOPTS BASHOPTS BASHPID BASHPID BASH_REMATCH BASH_REMATCH BASH_SOURCE BASH_SOURCE BASH_SUBSHELL BASH_SUBSHELL BASH_VERSINFO BASH_VERSION BASH_XTRACEFD BASH_XTRACEFD CDPATH COLUMNS COLUMNS COMP_CWORD COMP_CWORD COMP_KEY COMP_KEY COMP_LINE COMP_LINE COMP_POINT COMP_POINT COMPREPLY COMPREPLY COMP_TYPE COMP_TYPE COMP_WORDBREAKS COMP_WORDBREAKS COMP_WORDS COMP_WORDS COPROC COPROC DIRSTACK EMACS EMACS ENV ENV EUID FCEDIT FIGNORE FUNCNAME FUNCNAME FUNCNEST FUNCNEST GLOBIGNORE GROUPS histchars HISTCMD HISTCONTROL HISTFILE HISTFILESIZE HISTIGNORE HISTSIZE HISTTIMEFORMAT HISTTIMEFORMAT HOME HOSTFILE HOSTNAME HOSTTYPE IFS IGNOREEOF INPUTRC LANG LC_ALL LC_COLLATE LC_CTYPE LC_CTYPE LC_MESSAGES LC_NUMERIC LC_NUMERIC LINENO LINES LINES MACHTYPE MAIL MAILCHECK MAILPATH MAPFILE MAPFILE OLDPWD OPTARG OPTERR OPTIND OSTYPE PATH PIPESTATUS POSIXLY_CORRECT POSIXLY_CORRECT PPID PROMPT_COMMAND PS1 PS2 PS3 PS4 PWD RANDOM READLINE_LINE READLINE_LINE READLINE_POINT READLINE_POINT REPLY SECONDS SHELL SHELL SHELLOPTS SHLVL TIMEFORMAT TIMEOUT TMPDIR TMPDIR UID
- syn keyword bashStatement chmod clear complete du egrep expr fgrep find gnufind gnugrep grep install less ls mkdir mv rm rmdir rpm sed sleep sort strip tail touch
+ syn keyword bashStatement chmod clear complete du egrep expr fgrep find gnufind gnugrep grep less ls mkdir mv rm rmdir rpm sed sleep sort strip tail touch
  syn keyword bashAdminStatement daemon killall killproc nice reload restart start status stop
+ syn keyword bashStatement	command compgen
 endif
 
 if exists("b:is_kornshell")
  syn cluster shCommandSubList add=kshSpecialVariables,kshStatement
  syn cluster shCaseList add=kshStatement
  syn keyword kshSpecialVariables contained CDPATH COLUMNS EDITOR ENV ERRNO FCEDIT FPATH HISTFILE HISTSIZE HOME IFS LINENO LINES MAIL MAILCHECK MAILPATH OLDPWD OPTARG OPTIND PATH PPID PS1 PS2 PS3 PS4 PWD RANDOM REPLY SECONDS SHELL TMOUT VISUAL
- syn keyword kshStatement cat chmod clear cp du egrep expr fgrep find grep install killall less ls mkdir mv nice printenv rm rmdir sed sort strip stty tail touch tput
+ syn keyword kshStatement cat chmod clear cp du egrep expr fgrep find grep killall less ls mkdir mv nice printenv rm rmdir sed sort strip stty tail touch tput
+ syn keyword kshStatement command setgroups setsenv
 endif
 
 syn match   shSource	"^\.\s"
@@ -309,8 +324,8 @@ syn region  shDoubleQuote	matchgroup=shQuote start=+\%(\%(\\\\\)*\\\)\@"	contained
 syn match  shVariable	"\<\([bwglsav]:\)\=[a-zA-Z0-9.!@_%+,]*\ze="	nextgroup=shSetIdentifier
-syn match  shSetIdentifier	"="		contained	nextgroup=shPattern,shDeref,shDerefSimple,shDoubleQuote,shExDoubleQuote,shSingleQuote,shExSingleQuote
+syn match  shSetIdentifier	"="		contained	nextgroup=shCmdParenRegion,shPattern,shDeref,shDerefSimple,shDoubleQuote,shExDoubleQuote,shSingleQuote,shExSingleQuote
+syn region shAtExpr	contained	start="@(" end=")" contains=@shIdList
 if exists("b:is_bash")
- syn region shSetList oneline matchgroup=shSet start="\<\(declare\|typeset\|local\|export\|unset\)\>\ze[^/]" end="$"	matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+#\|=" contains=@shIdList
- syn region shSetList oneline matchgroup=shSet start="\\ze[^/]" end="\ze[;|)]\|$"			matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList
+ syn region shSetList oneline matchgroup=shSet start="\<\(declare\|typeset\|local\|export\|unset\)\>\ze[^/]" end="$"	matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+#\|="	contains=@shIdList
+ syn region shSetList oneline matchgroup=shSet start="\\ze[^/]" end="\ze[;|)]\|$"			matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+="	contains=@shIdList
 elseif exists("b:is_kornshell")
- syn region shSetList oneline matchgroup=shSet start="\<\(typeset\|export\|unset\)\>\ze[^/]" end="$"		matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList
- syn region shSetList oneline matchgroup=shSet start="\\ze[^/]" end="$"				matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList
+ syn region shSetList oneline matchgroup=shSet start="\<\(typeset\|export\|unset\)\>\ze[^/]" end="$"		matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]"	contains=@shIdList
+ syn region shSetList oneline matchgroup=shSet start="\\ze[^/]" end="$"				matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]"	contains=@shIdList
 else
- syn region shSetList oneline matchgroup=shSet start="\<\(set\|export\|unset\)\>\ze[^/]" end="$"		matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList
+ syn region shSetList oneline matchgroup=shSet start="\<\(set\|export\|unset\)\>\ze[^/]" end="$"		matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]"	contains=@shIdList
 endif
 
 " Functions: {{{1
@@ -390,15 +407,15 @@ if !exists("g:is_posix")
 endif
 
 if exists("b:is_bash")
- if (g:sh_fold_enabled % (s:sh_fold_functions * 2))/s:sh_fold_functions
-  syn region shFunctionOne fold	matchgroup=shFunction start="^\s*\h[-a-zA-Z_0-9]*\s*()\_s*{" end="}"	contains=@shFunctionList			skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
+ if s:sh_fold_functions
+  syn region shFunctionOne fold	matchgroup=shFunction start="^\s*\h[-a-zA-Z_0-9]*\s*()\_s*{"	end="}"	contains=@shFunctionList			skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
   syn region shFunctionTwo fold	matchgroup=shFunction start="\h[-a-zA-Z_0-9]*\s*\%(()\)\=\_s*{"	end="}"	contains=shFunctionKey,@shFunctionList contained	skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
  else
   syn region shFunctionOne	matchgroup=shFunction start="^\s*\h[-a-zA-Z_0-9]*\s*()\_s*{"	end="}"	contains=@shFunctionList
   syn region shFunctionTwo	matchgroup=shFunction start="\h[-a-zA-Z_0-9]*\s*\%(()\)\=\_s*{"	end="}"	contains=shFunctionKey,@shFunctionList contained
  endif
 else
- if (g:sh_fold_enabled % (s:sh_fold_functions * 2))/s:sh_fold_functions
+ if s:sh_fold_functions
   syn region shFunctionOne fold	matchgroup=shFunction start="^\s*\h\w*\s*()\_s*{" end="}"	contains=@shFunctionList			skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
   syn region shFunctionTwo fold	matchgroup=shFunction start="\h\w*\s*\%(()\)\=\_s*{"	end="}"	contains=shFunctionKey,@shFunctionList contained	skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
  else
@@ -409,7 +426,7 @@ endif
 
 " Parameter Dereferencing: {{{1
 " ========================
-syn match  shDerefSimple	"\$\%(\h\w*\|\d\)"
+syn match  shDerefSimple	"\$\%(\k\+\|\d\)"
 syn region shDeref	matchgroup=PreProc start="\${" end="}"	contains=@shDerefList,shDerefVarArray
 if !exists("g:sh_no_error")
  syn match  shDerefWordError	"[^}$[]"	contained
@@ -425,12 +442,12 @@ endif
 " ====================================
 if exists("b:is_bash")
  syn region shDeref	matchgroup=PreProc start="\${!" end="\*\=}"	contains=@shDerefList,shDerefOp
- syn match  shDerefVar	contained	"{\@<=!\w\+"		nextgroup=@shDerefVarList
+ syn match  shDerefVar	contained	"{\@<=!\k\+"		nextgroup=@shDerefVarList
 endif
 
 syn match  shDerefSpecial	contained	"{\@<=[-*@?0]"		nextgroup=shDerefOp,shDerefOpError
 syn match  shDerefSpecial	contained	"\({[#!]\)\@<=[[:alnum:]*@_]\+"	nextgroup=@shDerefVarList,shDerefOp
-syn match  shDerefVar	contained	"{\@<=\w\+"		nextgroup=@shDerefVarList
+syn match  shDerefVar	contained	"{\@<=\k\+"		nextgroup=@shDerefVarList
 
 " sh ksh bash : ${var[... ]...}  array reference: {{{1
 syn region  shDerefVarArray   contained	matchgroup=shDeref start="\[" end="]"	contains=@shCommandSubList nextgroup=shDerefOp,shDerefOpError
@@ -477,12 +494,13 @@ if exists("b:is_bash")
  " bash : ${parameter//pattern/string}
  " bash : ${parameter//pattern}
  syn match  shDerefPPS	contained	'/\{1,2}'	nextgroup=shDerefPPSleft
- syn region shDerefPPSleft	contained	start='.'	skip=@\%(\\\)\/@ matchgroup=shDerefOp end='/' end='\ze}' nextgroup=shDerefPPSright contains=@shCommandSubList
- syn region shDerefPPSright	contained	start='.'	end='\ze}'	contains=@shCommandSubList
+ syn region shDerefPPSleft	contained	start='.'	skip=@\%(\\\\\)*\\/@ matchgroup=shDerefOp	end='/' end='\ze}' nextgroup=shDerefPPSright contains=@shCommandSubList
+ syn region shDerefPPSright	contained	start='.'	skip=@\%(\\\\\)\+@		end='\ze}'	contains=@shCommandSubList
 endif
 
 " Arithmetic Parenthesized Expressions: {{{1
-syn region shParen matchgroup=shArithRegion start='(\%(\ze[^(]\|$\)' end=')' contains=@shArithParenList
+"syn region shParen matchgroup=shArithRegion start='[^$]\zs(\%(\ze[^(]\|$\)' end=')' contains=@shArithParenList
+syn region shParen matchgroup=shArithRegion start='\$\@!(\%(\ze[^(]\|$\)' end=')' contains=@shArithParenList
 
 " Useful sh Keywords: {{{1
 " ===================
@@ -534,6 +552,7 @@ syn sync match shWhileSync	grouphere	shRepeat	"\"
 " Default Highlighting: {{{1
 " =====================
 hi def link shArithRegion	shShellVariables
+hi def link shAtExpr	shSetList
 hi def link shBeginHere	shRedir
 hi def link shCaseBar	shConditional
 hi def link shCaseCommandSub	shCommandSub
@@ -557,6 +576,7 @@ hi def link shDoubleQuote	shString
 hi def link shEcho	shString
 hi def link shEchoDelim	shOperator
 hi def link shEchoQuote	shString
+hi def link shForPP	shLoop
 hi def link shEmbeddedEcho	shString
 hi def link shEscape	shCommandSub
 hi def link shExDoubleQuote	shDoubleQuote
@@ -592,6 +612,7 @@ if exists("b:is_bash")
   hi def link bashStatement		shStatement
   hi def link shFunctionParen		Delimiter
   hi def link shFunctionDelim		Delimiter
+  hi def link shCharClass		shSpecial
 endif
 if exists("b:is_kornshell")
   hi def link kshSpecialVariables	shShellVariables
@@ -638,6 +659,38 @@ hi def link shStatement		Statement
 hi def link shString		String
 hi def link shTodo		Todo
 hi def link shAlias		Identifier
+hi def link shRedir01		shRedir
+hi def link shRedir02		shRedir
+hi def link shRedir03		shRedir
+hi def link shRedir04		shRedir
+hi def link shRedir05		shRedir
+hi def link shRedir06		shRedir
+hi def link shRedir07		shRedir
+hi def link shRedir08		shRedir
+hi def link shRedir09		shRedir
+hi def link shRedir10		shRedir
+hi def link shRedir11		shRedir
+hi def link shRedir12		shRedir
+hi def link shRedir13		shRedir
+hi def link shRedir14		shRedir
+hi def link shRedir15		shRedir
+hi def link shRedir16		shRedir
+hi def link shRedir17		shRedir
+hi def link shRedir18		shRedir
+hi def link shRedir19		shRedir
+hi def link shRedir20		shRedir
+hi def link shRedir21		shRedir
+hi def link shRedir22		shRedir
+hi def link shRedir23		shRedir
+hi def link shRedir24		shRedir
+hi def link shRedir25		shRedir
+hi def link shRedir26		shRedir
+hi def link shRedir27		shRedir
+hi def link shRedir28		shRedir
+hi def link shRedir29		shRedir
+hi def link shRedir30		shRedir
+hi def link shRedir31		shRedir
+hi def link shRedir32		shRedir
 
 " Set Current Syntax: {{{1
 " ===================
diff --git a/runtime/syntax/sisu.vim b/runtime/syntax/sisu.vim
index 4545ee8fa4..23d73254eb 100644
--- a/runtime/syntax/sisu.vim
+++ b/runtime/syntax/sisu.vim
@@ -1,8 +1,8 @@
 " SiSU Vim syntax file
 " SiSU Maintainer: Ralph Amissah 
-" SiSU Markup:     SiSU (sisu-3.1.0)
-" Last Change:     2011-10-03
-" URL:             
+" SiSU Markup:     SiSU (sisu-4.0.9)
+" Last Change:     2013-02-22
+" URL (sisu-4.1.0): 
 "(originally looked at Ruby Vim by Mirko Nasato)
 
 if version < 600
@@ -20,14 +20,9 @@ syn match sisu_error contains=sisu_link,sisu_error_wspace ""
 "% "Markers Identifiers:
 if !exists("sisu_no_identifiers")
   syn match   sisu_mark_endnote                                           "\~^"
-  syn match   sisu_break               contains=@NoSpell                  " \\\\\( \|$\)"
-  syn match   sisu_break               contains=@NoSpell                  "
\|
" - syn match sisu_control contains=@NoSpell "^<:p[bn]>\s*$" - "syn match sisu_control contains=@NoSpell "^<\(br\)\?:\(pg\|pgn\|pn\)>\s*$" - "syn match sisu_control contains=@NoSpell "^\[\(br\)\?:\(pg\|pgn\|pn\)\]\s*$" + syn match sisu_break contains=@NoSpell " \\\\\( \|$\)\|
\|
" + syn match sisu_control contains=@NoSpell "^\(-\\\\-\|=\\\\=\|-\.\.-\|<:p[bn]>\)\s*$" syn match sisu_control contains=@NoSpell "^<:\(bo\|---\)>\s*$" - "syn match sisu_control contains=@NoSpell "^<\(br\)\?:\(pr\|o\)>\s*$" - "syn match sisu_control contains=@NoSpell "^\[\(br\)\?:\(pr\|o\)\]\s*$" syn match sisu_marktail "[~-]#" syn match sisu_control "\"" syn match sisu_underline "\(^\| \)_[a-zA-Z0-9]\+_\([ .,]\|$\)" @@ -43,11 +38,12 @@ if !exists("sisu_no_identifiers") syn match sisu_sub_header_title "^\s\+:\(subtitle\|short\|edition\|language\|lang_char\|note\):\s" "group=sisu_header_content syn match sisu_sub_header_creator "^\s\+:\(author\|editor\|contributor\|illustrator\|photographer\|translator\|digitized_by\|prepared_by\|audio\|video\):\s" " &hon &institution syn match sisu_sub_header_rights "^\s\+:\(copyright\|text\|translation\|illustrations\|photographs\|preparation\|digitization\|audio\|video\|license\|all\):\s" " access_rights license - syn match sisu_sub_header_classify "^\s\+:\(topic_register\|coverage\|format\|identifier\|keywords\|relation\|subject\|type\|dewey\|loc\|oclc\|pg\|isbn\):\s" - syn match sisu_sub_header_date "^\s\+:\(added_to_site\|available\|created\|issued\|modified\|published\|valid\|translated\|original_publication\):\s" + syn match sisu_sub_header_classify "^\s\+:\(topic_register\|keywords\|subject\|dewey\|loc\):\s" + syn match sisu_sub_header_identifier "^\s\+:\(oclc\|isbn\):\s" + syn match sisu_sub_header_date "^\s\+:\(added_to_site\|available\|created\|issued\|modified\|published\|valid\|translated\|original_publication\):\s" syn match sisu_sub_header_original "^\s\+:\(publisher\|date\|language\|lang_char\|institution\|nationality\|source\):\s" - syn match sisu_sub_header_make "^\s\+:\(headings\|num_top\|breaks\|language\|italics\|bold\|emphasis\|plaintext_wrap\|texpdf_font_mono\|texpdf_font\|skin\|stamp\|promo\|ad\|manpage\):\s" - syn match sisu_sub_header_notes "^\s\+:\(abstract\|comment\|description\|history\|prefix\|prefix_[ab]\|suffix\):\s" + syn match sisu_sub_header_make "^\s\+:\(headings\|num_top\|breaks\|language\|italics\|bold\|emphasis\|substitute\|omit\|plaintext_wrap\|texpdf_font_mono\|texpdf_font\|stamp\|promo\|ad\|manpage\|home_button_text\|home_button_image\|cover_image\|footer\):\s" + syn match sisu_sub_header_notes "^\s\+:\(description\|abstract\|comment\|coverage\|relation\|source\|history\|type\|format\|prefix\|prefix_[ab]\|suffix\):\s" "% "semantic markers: (ignore) syn match sisu_sem_marker ";{\|};[a-z._]*[a-z]" @@ -85,6 +81,8 @@ syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_ syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_rights matchgroup=sisu_header start="^[@]rights:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" " classify document syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_classify matchgroup=sisu_header start="^[@]classify:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" identifier document +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_identifier matchgroup=sisu_header start="^[@]identifier:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" " original language (depreciated) syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_original matchgroup=sisu_header start="^[@]original:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" " notes @@ -219,6 +217,7 @@ hi def link sisu_sub_header_date Statement hi def link sisu_sub_header_publisher Statement hi def link sisu_sub_header_rights Statement hi def link sisu_sub_header_classify Statement +hi def link sisu_sub_header_identifier Statement hi def link sisu_sub_header_original Statement hi def link sisu_sub_header_links Statement hi def link sisu_sub_header_notes Statement diff --git a/runtime/syntax/slice.vim b/runtime/syntax/slice.vim index 8a4d6751a7..4e2f9a8604 100644 --- a/runtime/syntax/slice.vim +++ b/runtime/syntax/slice.vim @@ -20,6 +20,7 @@ syn keyword sliceQualifier const extends idempotent implements local nonmutatin syn keyword sliceBoolean false true " Include directives +syn region sliceIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ syn match sliceIncluded display contained "<[^>]*>" syn match sliceInclude display "^\s*#\s*include\>\s*["<]" contains=sliceIncluded diff --git a/runtime/syntax/sqlanywhere.vim b/runtime/syntax/sqlanywhere.vim index b0f93217a6..05b05c9f4f 100644 --- a/runtime/syntax/sqlanywhere.vim +++ b/runtime/syntax/sqlanywhere.vim @@ -1,11 +1,11 @@ - " Vim syntax file " Language: SQL, Adaptive Server Anywhere " Maintainer: David Fishburn -" Last Change: 2012 Jan 23 -" Version: 12.0.1 +" Last Change: 2013 May 13 +" Version: 16.0.0 -" Description: Updated to Adaptive Server Anywhere 12.0.1 (including spatial data) +" Description: Updated to Adaptive Server Anywhere 16.0.0 +" Updated to Adaptive Server Anywhere 12.0.1 (including spatial data) " Updated to Adaptive Server Anywhere 11.0.1 " Updated to Adaptive Server Anywhere 10.0.1 " Updated to Adaptive Server Anywhere 9.0.2 @@ -27,33 +27,34 @@ syn case ignore syn keyword sqlSpecial false null true " common functions -syn keyword sqlFunction count sum avg min max debug_eng isnull -syn keyword sqlFunction greater lesser argn string ymd todate -syn keyword sqlFunction totimestamp date today now utc_now -syn keyword sqlFunction number identity years months weeks days -syn keyword sqlFunction hours minutes seconds second minute hour -syn keyword sqlFunction day month year dow date_format substr -syn keyword sqlFunction substring byte_substr length byte_length -syn keyword sqlFunction datalength ifnull evaluate list -syn keyword sqlFunction soundex similar difference like_start -syn keyword sqlFunction like_end regexp_compile -syn keyword sqlFunction regexp_compile_patindex remainder abs -syn keyword sqlFunction graphical_plan plan explanation ulplan -syn keyword sqlFunction graphical_ulplan long_ulplan -syn keyword sqlFunction short_ulplan rewrite watcomsql -syn keyword sqlFunction transactsql dialect estimate -syn keyword sqlFunction estimate_source index_estimate -syn keyword sqlFunction experience_estimate traceback wsql_state -syn keyword sqlFunction lang_message dateadd datediff datepart -syn keyword sqlFunction datename dayname monthname quarter -syn keyword sqlFunction tsequal hextoint inttohex rand textptr -syn keyword sqlFunction rowid grouping stddev variance rank -syn keyword sqlFunction dense_rank density percent_rank user_name -syn keyword sqlFunction user_id str stuff char_length nullif -syn keyword sqlFunction sortkey compare ts_index_statistics -syn keyword sqlFunction ts_table_statistics isdate isnumeric -syn keyword sqlFunction get_identity lookup newid uuidtostr -syn keyword sqlFunction strtouuid varexists +syn keyword sqlFunction abs argn avg bintohex bintostr +syn keyword sqlFunction byte_length byte_substr char_length +syn keyword sqlFunction compare count count_big datalength date +syn keyword sqlFunction date_format dateadd datediff datename +syn keyword sqlFunction datepart day dayname days debug_eng +syn keyword sqlFunction dense_rank density dialect difference +syn keyword sqlFunction dow estimate estimate_source evaluate +syn keyword sqlFunction experience_estimate explanation +syn keyword sqlFunction get_identity graphical_plan +syn keyword sqlFunction graphical_ulplan greater grouping +syn keyword sqlFunction hextobin hextoint hour hours identity +syn keyword sqlFunction ifnull index_estimate inttohex isdate +syn keyword sqlFunction isencrypted isnull isnumeric +syn keyword sqlFunction lang_message length lesser like_end +syn keyword sqlFunction like_start list long_ulplan lookup max +syn keyword sqlFunction min minute minutes month monthname +syn keyword sqlFunction months newid now nullif number +syn keyword sqlFunction percent_rank plan quarter rand rank +syn keyword sqlFunction regexp_compile regexp_compile_patindex +syn keyword sqlFunction remainder rewrite rowid second seconds +syn keyword sqlFunction short_ulplan similar sortkey soundex +syn keyword sqlFunction stddev stack_trace str string strtobin strtouuid stuff +syn keyword sqlFunction subpartition substr substring sum switchoffset sysdatetimeoffset +syn keyword sqlFunction textptr todate todatetimeoffset today totimestamp traceback transactsql +syn keyword sqlFunction ts_index_statistics ts_table_statistics +syn keyword sqlFunction tsequal ulplan user_id user_name utc_now +syn keyword sqlFunction uuidtostr varexists variance watcomsql +syn keyword sqlFunction weeks wsql_state year years ymd " 9.0.1 functions syn keyword sqlFunction acos asin atan atn2 cast ceiling convert cos cot @@ -473,31 +474,36 @@ syn keyword sqlFunction ST_ToPoint syn keyword sqlFunction ST_ToPolygon syn keyword sqlFunction ST_ToSurface +" Array functions 16.x +syn keyword sqlFunction array array_agg array_max_cardinality trim_array +syn keyword sqlFunction error_line error_message error_procedure +syn keyword sqlFunction error_sqlcode error_sqlstate error_stack_trace + " keywords -syn keyword sqlKeyword absolute accent action active add address admin aes_decrypt -syn keyword sqlKeyword after aggregate algorithm allow_dup_row allow allowed alter -syn keyword sqlKeyword and angular ansi_substring any as append apply -syn keyword sqlKeyword arbiter asc ascii ase -syn keyword sqlKeyword assign at atan2 atomic attended -syn keyword sqlKeyword audit auditing authorization axis +syn keyword sqlKeyword absolute accent access account action active activate add address admin +syn keyword sqlKeyword aes_decrypt after aggregate algorithm allow_dup_row allow allowed alter +syn keyword sqlKeyword always and angular ansi_substring any as append apply +syn keyword sqlKeyword arbiter array asc ascii ase +syn keyword sqlKeyword assign at atan2 atomic attended +syn keyword sqlKeyword audit auditing authentication authorization axis syn keyword sqlKeyword autoincrement autostop batch bcp before syn keyword sqlKeyword between bit_and bit_length bit_or bit_substr bit_xor syn keyword sqlKeyword blank blanks block syn keyword sqlKeyword both bottom unbounded breaker bufferpool syn keyword sqlKeyword build bulk by byte bytes cache calibrate calibration -syn keyword sqlKeyword cancel capability cascade cast -syn keyword sqlKeyword catalog ceil change changes char char_convert check checksum -syn keyword sqlKeyword class classes client cmp +syn keyword sqlKeyword cancel capability cardinality cascade cast +syn keyword sqlKeyword catalog catch ceil change changes char char_convert +syn keyword sqlKeyword check checkpointlog checksum class classes client cmp syn keyword sqlKeyword cluster clustered collation syn keyword sqlKeyword column columns -syn keyword sqlKeyword command comments committed comparisons +syn keyword sqlKeyword command comments committed commitid comparisons syn keyword sqlKeyword compatible component compressed compute computes syn keyword sqlKeyword concat configuration confirm conflict connection syn keyword sqlKeyword console consolidate consolidated -syn keyword sqlKeyword constraint constraints content +syn keyword sqlKeyword constraint constraints content syn keyword sqlKeyword convert coordinate coordinator copy count count_set_bits -syn keyword sqlKeyword crc createtime cross cube cume_dist +syn keyword sqlKeyword crc createtime critical cross cube cume_dist syn keyword sqlKeyword current cursor data data database syn keyword sqlKeyword current_timestamp current_user cycle syn keyword sqlKeyword databases datatype dba dbfile @@ -506,83 +512,86 @@ syn keyword sqlKeyword decrypted default defaults default_dbspace deferred syn keyword sqlKeyword definer definition syn keyword sqlKeyword delay deleting delimited dependencies desc syn keyword sqlKeyword description deterministic directory -syn keyword sqlKeyword disable disabled disallow distinct do domain download duplicate -syn keyword sqlKeyword dsetpass dttm dynamic each earth editproc ejb -syn keyword sqlKeyword elimination ellipsoid -syn keyword sqlKeyword else elseif empty enable encapsulated encrypted end -syn keyword sqlKeyword encoding endif engine environment erase error escape escapes event +syn keyword sqlKeyword disable disabled disallow distinct disksandbox disk_sandbox +syn keyword sqlKeyword dn do domain download duplicate +syn keyword sqlKeyword dsetpass dttm dynamic each earth editproc effective ejb +syn keyword sqlKeyword elimination ellipsoid else elseif +syn keyword sqlKeyword email empty enable encapsulated encrypted encryption end +syn keyword sqlKeyword encoding endif engine environment erase error errors escape escapes event syn keyword sqlKeyword event_parameter every exception exclude excluded exclusive exec syn keyword sqlKeyword existing exists expanded expiry express exprtype extended_property syn keyword sqlKeyword external externlogin factor failover false syn keyword sqlKeyword fastfirstrow feature fieldproc file files filler syn keyword sqlKeyword fillfactor final finish first first_keyword first_value syn keyword sqlKeyword flattening -syn keyword sqlKeyword following force foreign format forxml forxml_sep fp frame -syn keyword sqlKeyword free freepage french fresh full function +syn keyword sqlKeyword following force foreign format forjson forxml forxml_sep fp frame +syn keyword sqlKeyword free freepage french fresh full function syn keyword sqlKeyword gb generic get_bit go global grid syn keyword sqlKeyword group handler hash having header hexadecimal syn keyword sqlKeyword hidden high history hg hng hold holdlock host syn keyword sqlKeyword hours http_body http_session_timeout id identified identity ignore syn keyword sqlKeyword ignore_dup_key ignore_dup_row immediate syn keyword sqlKeyword in inactiv inactive inactivity included increment incremental -syn keyword sqlKeyword index index_enabled index_lparen indexonly info -syn keyword sqlKeyword inline inner inout insensitive inserting -syn keyword sqlKeyword instead integrated -syn keyword sqlKeyword internal intersection into introduced inverse invoker +syn keyword sqlKeyword index index_enabled index_lparen indexonly info information +syn keyword sqlKeyword inheritance inline inner inout insensitive inserting +syn keyword sqlKeyword instead +syn keyword sqlKeyword internal intersection into introduced inverse invoker syn keyword sqlKeyword iq is isolation syn keyword sqlKeyword jar java java_location java_main_userid java_vm_options -syn keyword sqlKeyword jconnect jdk join kb key keep kerberos language last +syn keyword sqlKeyword jconnect jdk join json kb key keys keep language last syn keyword sqlKeyword last_keyword last_value lateral latitude -syn keyword sqlKeyword ld left len linear lf ln level like -syn keyword sqlKeyword limit local location log +syn keyword sqlKeyword ld ldap left len linear lf ln level like +syn keyword sqlKeyword limit local location log syn keyword sqlKeyword logging logical login logscan long longitude low lru ls -syn keyword sqlKeyword main major manual mark -syn keyword sqlKeyword match matched materialized max maxvalue maximum mb measure membership -syn keyword sqlKeyword merge metadata methods minimum minor minutes minvalue mirror -syn keyword sqlKeyword mode modify monitor move mru multiplex -syn keyword sqlKeyword name named namespaces national native natural new next nextval +syn keyword sqlKeyword main major manage manual mark master +syn keyword sqlKeyword match matched materialized max maxvalue maximum mb measure median membership +syn keyword sqlKeyword merge metadata methods migrate minimum minor minutes minvalue mirror +syn keyword sqlKeyword mode modify monitor move mru multiplex +syn keyword sqlKeyword name named namespaces national native natural new next nextval syn keyword sqlKeyword ngram no noholdlock nolock nonclustered none normal not -syn keyword sqlKeyword notify null nullable_constant nulls -syn keyword sqlKeyword object oem_string of off offline offset olap +syn keyword sqlKeyword notify null nullable_constant nulls +syn keyword sqlKeyword object objects oem_string of off offline offset olap syn keyword sqlKeyword old on online only openstring operator syn keyword sqlKeyword optimization optimizer option -syn keyword sqlKeyword or order organization others out outer over +syn keyword sqlKeyword or order ordinality organization others out outer over owner syn keyword sqlKeyword package packetsize padding page pages -syn keyword sqlKeyword paglock parallel parameter parent part -syn keyword sqlKeyword partition partitions partner password path pctfree -syn keyword sqlKeyword perms plan planar policy polygon populate port postfilter preceding +syn keyword sqlKeyword paglock parallel parameter parent part partial +syn keyword sqlKeyword partition partitions partner password path pctfree +syn keyword sqlKeyword permissions perms plan planar policy polygon populate port postfilter preceding syn keyword sqlKeyword precisionprefetch prefilter prefix preserve preview previous -syn keyword sqlKeyword primary prior priority priqty private privileges procedure profile +syn keyword sqlKeyword primary prior priority priqty private privilege privileges procedure profile profiling syn keyword sqlKeyword property_is_cumulative property_is_numeric public publication publish publisher syn keyword sqlKeyword quiesce quote quotes range readclientfile readcommitted reader readfile readonly syn keyword sqlKeyword readpast readuncommitted readwrite rebuild syn keyword sqlKeyword received recompile recover recursive references syn keyword sqlKeyword referencing regex regexp regexp_substr relative relocate -syn keyword sqlKeyword rename repeatable repeatableread replicate +syn keyword sqlKeyword rename repeatable repeatableread replicate replication syn keyword sqlKeyword requests request_timeout required rereceive resend reserve reset syn keyword sqlKeyword resizing resolve resource respect restart -syn keyword sqlKeyword restrict result retain -syn keyword sqlKeyword returns reverse right role -syn keyword sqlKeyword rollup root row row_number rowlock rows +syn keyword sqlKeyword restrict result retain retries +syn keyword sqlKeyword returns reverse right role roles +syn keyword sqlKeyword rollup root row row_number rowlock rows rowtype syn keyword sqlKeyword sa_index_hash sa_internal_fk_verify sa_internal_termbreak syn keyword sqlKeyword sa_order_preserving_hash sa_order_preserving_hash_big sa_order_preserving_hash_prefix -syn keyword sqlKeyword scale schedule schema scope scripted scroll seconds secqty security +syn keyword sqlKeyword sa_file_free_pages sa_internal_type_from_catalog sa_internal_valid_hash +syn keyword sqlKeyword sa_internal_validate_value sa_json_element +syn keyword sqlKeyword scale schedule schema scope script scripted scroll search seconds secqty security syn keyword sqlKeyword semi send sensitive sent sequence serializable -syn keyword sqlKeyword server server session set_bit set_bits sets +syn keyword sqlKeyword server severity session set_bit set_bits sets syn keyword sqlKeyword shapefile share side simple since site size skip -syn keyword sqlKeyword snap snapshot soapheader soap_header +syn keyword sqlKeyword snap snapshot soapheader soap_header syn keyword sqlKeyword spatial split some sorted_data syn keyword sqlKeyword sql sqlcode sqlid sqlflagger sqlstate sqrt square -syn keyword sqlKeyword stacker stale statement statistics status stddev_pop stddev_samp +syn keyword sqlKeyword stacker stale state statement statistics status stddev_pop stddev_samp syn keyword sqlKeyword stemmer stogroup stoplist storage store syn keyword sqlKeyword strip stripesizekb striping subpages subscribe subscription -syn keyword sqlKeyword subtransaction suser_id suser_name synchronization +syn keyword sqlKeyword subtransaction suser_id suser_name suspend synchronization syn keyword sqlKeyword syntax_error table tables tablock -syn keyword sqlKeyword tablockx tb temp template temporary term then ties -syn keyword sqlKeyword timezone timeout to to_char to_nchar tolerance top -syn keyword sqlKeyword traced_plan tracing -syn keyword sqlKeyword transfer transform transaction transactional treat tries -syn keyword sqlKeyword true tsequal type tune uncommitted unconditionally +syn keyword sqlKeyword tablockx target tb temp template temporary term then ties +syn keyword sqlKeyword timezone timeout tls to to_char to_nchar tolerance top +syn keyword sqlKeyword trace traced_plan tracing +syn keyword sqlKeyword transfer transform transaction transactional treat tries +syn keyword sqlKeyword true try tsequal type tune uncommitted unconditionally syn keyword sqlKeyword unenforced unicode unique unistr unit unknown unlimited unload syn keyword sqlKeyword unpartition unquiesce updatetime updating updlock upgrade upload syn keyword sqlKeyword upper usage use user @@ -593,14 +602,14 @@ syn keyword sqlKeyword verify versions view virtual wait syn keyword sqlKeyword warning wd web when where with with_auto syn keyword sqlKeyword with_auto with_cube with_rollup without syn keyword sqlKeyword with_lparen within word work workload write writefile -syn keyword sqlKeyword writeclientfile writer writers writeserver xlock -syn keyword sqlKeyword zeros zone -" XML +syn keyword sqlKeyword writeclientfile writer writers writeserver xlock +syn keyword sqlKeyword war xml zeros zone +" XML syn keyword sqlKeyword raw auto elements explicit " HTTP support syn keyword sqlKeyword authorization secure url service next_soap_header " HTTP 9.0.2 new procedure keywords -syn keyword sqlKeyword namespace certificate clientport proxy +syn keyword sqlKeyword namespace certificate certificates clientport proxy trusted_certificates_file " OLAP support 9.0.0 syn keyword sqlKeyword covar_pop covar_samp corr regr_slope regr_intercept syn keyword sqlKeyword regr_count regr_r2 regr_avgx regr_avgy @@ -610,6 +619,10 @@ syn keyword sqlKeyword regr_sxx regr_syy regr_sxy syn keyword sqlKeyword character dec options proc reference syn keyword sqlKeyword subtrans tran syn keyword +" Login Mode Options +syn keyword sqlKeywordLogin standard integrated kerberos LDAPUA +syn keyword sqlKeywordLogin cloudadmin mixed + " Spatial Predicates syn keyword sqlKeyword ST_Contains syn keyword sqlKeyword ST_ContainsFilter @@ -692,9 +705,9 @@ syn keyword sqlKeyword ST_LinearUnHash syn keyword sqlOperator in any some all between exists syn keyword sqlOperator like escape not is and or syn keyword sqlOperator minus -syn keyword sqlOperator prior distinct +syn keyword sqlOperator prior distinct unnest -syn keyword sqlStatement allocate alter attach backup begin break call case +syn keyword sqlStatement allocate alter attach backup begin break call case catch syn keyword sqlStatement checkpoint clear close comment commit configure connect syn keyword sqlStatement continue create deallocate declare delete describe syn keyword sqlStatement detach disconnect drop except execute exit explain fetch @@ -705,7 +718,7 @@ syn keyword sqlStatement prepare print put raiserror read readtext refresh relea syn keyword sqlStatement remote remove reorganize resignal restore resume syn keyword sqlStatement return revoke rollback save savepoint select syn keyword sqlStatement set setuser signal start stop synchronize -syn keyword sqlStatement system trigger truncate union unload update +syn keyword sqlStatement system trigger truncate try union unload update syn keyword sqlStatement validate waitfor whenever while window writetext @@ -715,7 +728,7 @@ syn keyword sqlType float int integer numeric syn keyword sqlType smallint tinyint real syn keyword sqlType money smallmoney syn keyword sqlType date datetime datetimeoffset smalldatetime time timestamp -syn keyword sqlType binary image varbinary uniqueidentifier +syn keyword sqlType binary image varray varbinary uniqueidentifier syn keyword sqlType unsigned " Spatial types syn keyword sqlType st_geometry st_point st_curve st_surface st_geomcollection @@ -736,8 +749,10 @@ syn keyword sqlOption Ansi_update_constraints syn keyword sqlOption Ansinull syn keyword sqlOption Auditing syn keyword sqlOption Auditing_options +syn keyword sqlOption Auto_commit_on_create_local_temp_index syn keyword sqlOption Background_priority syn keyword sqlOption Blocking +syn keyword sqlOption Blocking_others_timeout syn keyword sqlOption Blocking_timeout syn keyword sqlOption Chained syn keyword sqlOption Checkpoint_time @@ -754,6 +769,7 @@ syn keyword sqlOption Cooperative_commits syn keyword sqlOption Database_authentication syn keyword sqlOption Date_format syn keyword sqlOption Date_order +syn keyword sqlOption db_publisher syn keyword sqlOption Debug_messages syn keyword sqlOption Dedicated_task syn keyword sqlOption Default_dbspace @@ -764,14 +780,18 @@ syn keyword sqlOption Divide_by_zero_error syn keyword sqlOption Escape_character syn keyword sqlOption Exclude_operators syn keyword sqlOption Extended_join_syntax +syn keyword sqlOption Extern_login_credentials syn keyword sqlOption Fire_triggers syn keyword sqlOption First_day_of_week syn keyword sqlOption For_xml_null_treatment syn keyword sqlOption Force_view_creation syn keyword sqlOption Global_database_id syn keyword sqlOption Http_session_timeout +syn keyword sqlOption Http_connection_pool_basesize +syn keyword sqlOption Http_connection_pool_timeout syn keyword sqlOption Integrated_server_name syn keyword sqlOption Isolation_level +syn keyword sqlOption Java_class_path syn keyword sqlOption Java_location syn keyword sqlOption Java_main_userid syn keyword sqlOption Java_vm_options @@ -790,6 +810,7 @@ syn keyword sqlOption Max_recursive_iterations syn keyword sqlOption Max_statement_count syn keyword sqlOption Max_temp_space syn keyword sqlOption Min_password_length +syn keyword sqlOption Min_role_admins syn keyword sqlOption Nearest_century syn keyword sqlOption Non_keywords syn keyword sqlOption Odbc_describe_binary_as_varbinary @@ -807,6 +828,7 @@ syn keyword sqlOption Prefetch syn keyword sqlOption Preserve_source_format syn keyword sqlOption Prevent_article_pkey_update syn keyword sqlOption Priority +syn keyword sqlOption Progress_messages syn keyword sqlOption Query_mem_timeout syn keyword sqlOption Quoted_identifier syn keyword sqlOption Read_past_deleted @@ -814,6 +836,7 @@ syn keyword sqlOption Recovery_time syn keyword sqlOption Remote_idle_timeout syn keyword sqlOption Replicate_all syn keyword sqlOption Request_timeout +syn keyword sqlOption Reserved_keywords syn keyword sqlOption Return_date_time_as_string syn keyword sqlOption Rollback_on_deadlock syn keyword sqlOption Row_counts @@ -823,6 +846,12 @@ syn keyword sqlOption Sort_collation syn keyword sqlOption Sql_flagger_error_level syn keyword sqlOption Sql_flagger_warning_level syn keyword sqlOption String_rtruncation +syn keyword sqlOption st_geometry_asbinary_format +syn keyword sqlOption st_geometry_astext_format +syn keyword sqlOption st_geometry_asxml_format +syn keyword sqlOption st_geometry_describe_type +syn keyword sqlOption st_geometry_interpolation +syn keyword sqlOption st_geometry_on_invalid syn keyword sqlOption Subsume_row_locks syn keyword sqlOption Suppress_tds_debugging syn keyword sqlOption Synchronize_mirror_on_commit @@ -831,6 +860,7 @@ syn keyword sqlOption Temp_space_limit_check syn keyword sqlOption Time_format syn keyword sqlOption Time_zone_adjustment syn keyword sqlOption Timestamp_format +syn keyword sqlOption Timestamp_with_time_zone_format syn keyword sqlOption Truncate_timestamp_values syn keyword sqlOption Tsql_outer_joins syn keyword sqlOption Tsql_variables @@ -842,6 +872,7 @@ syn keyword sqlOption Uuid_has_hyphens syn keyword sqlOption Verify_password_function syn keyword sqlOption Wait_for_commit syn keyword sqlOption Webservice_namespace_host +syn keyword sqlOption Webservice_sessionid_name " Strings and characters: syn region sqlString start=+"+ end=+"+ contains=@Spell @@ -859,32 +890,18 @@ syn sync ccomment sqlComment syn sync ccomment sqlDashComment syn sync ccomment sqlSlashComment -" 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_sql_syn_inits") - if version < 508 - let did_sql_syn_inits = 1 - command -nargs=+ HiLink hi link - else - command -nargs=+ HiLink hi link - endif - - HiLink sqlDashComment Comment - HiLink sqlSlashComment Comment - HiLink sqlMultiComment Comment - HiLink sqlNumber Number - HiLink sqlOperator Operator - HiLink sqlSpecial Special - HiLink sqlKeyword Keyword - HiLink sqlStatement Statement - HiLink sqlString String - HiLink sqlType Type - HiLink sqlFunction Function - HiLink sqlOption PreProc - - delcommand HiLink -endif +hi def link sqlDashComment Comment +hi def link sqlSlashComment Comment +hi def link sqlMultiComment Comment +hi def link sqlNumber Number +hi def link sqlOperator Operator +hi def link sqlSpecial Special +hi def link sqlKeyword Keyword +hi def link sqlStatement Statement +hi def link sqlString String +hi def link sqlType Type +hi def link sqlFunction Function +hi def link sqlOption PreProc let b:current_syntax = "sqlanywhere" diff --git a/runtime/syntax/sqlhana.vim b/runtime/syntax/sqlhana.vim new file mode 100644 index 0000000000..1410e99eb4 --- /dev/null +++ b/runtime/syntax/sqlhana.vim @@ -0,0 +1,293 @@ +" Vim syntax file +" Language: SQL, SAP HANA In Memory Database +" Maintainer: David Fishburn +" Last Change: 2012 Oct 23 +" Version: SP4 b (Q2 2012) +" Homepage: http://www.vim.org/scripts/script.php?script_id=4275 + +" Description: Updated to SAP HANA SP4 +" +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +" The SQL reserved words, defined as keywords. +" These were pulled from the following SQL reference: +" http://help.sap.com/hana/hana_sql_en.pdf +" An easy approach is to copy all text from the PDF +" into a Vim buffer. The keywords are in UPPER case, +" so you can run the following commands to be left with +" mainly the UPPER case words: +" 1. Delete all words that do not begin with a Capital +" %s/\(\<[^A-Z]\w*\>\)//g +" 2. Remove all words where the 2nd letter is not a Capital +" %s/\(\<[A-Z][^A-Z]\w*\>\)//g +" 3. Remove all non-word (or space) characters +" %s/[^0-9A-Za-z_ ]*//g +" 4. Remove some known words +" %s/\<\(SAP\|HANA\|OK\|AG\|IBM\|DB2\|AIX\|POWER\d\+\|UNIX\)\>//g +" 5. Remove blank lines and trailing spaces +" %s/\s\+$//g +" %s/^\s\+//g +" %s/^$\n//g +" 6. Convert spaces to newlines remove single character +" %s/[ ]\+/\r/g +" %g/^\w$/d +" 7. Sort and remove duplicates +" :sort +" :Uniq +" 8. Use the WhatsMissing plugin against the sqlhana.vim file. +" 9. Generated a file of all UPPER cased words which should not +" be in the syntax file. These items should be removed +" from the list in step 7. You can use WhatsNotMissing +" between step 7 and this new file to weed out the words +" we know are not syntax related. +" 10. Use the WhatsMissingRemoveMatches to remove the words +" from step 9. + +syn keyword sqlSpecial false null true + +" Supported Functions for Date/Time types +syn keyword sqlFunction ADD_DAYS ADD_MONTHS ADD_SECONDS ADD_YEARS COALESCE +syn keyword sqlFunction CURRENT_DATE CURRENT_TIME CURRENT_TIMESTAMP CURRENT_UTCDATE +syn keyword sqlFunction CURRENT_UTCTIME CURRENT_UTCTIMESTAMP +syn keyword sqlFunction DAYNAME DAYOFMONTH DAYOFYEAR DAYS_BETWEEN EXTRACT +syn keyword sqlFunction GREATEST HOUR IFNULL ISOWEEK LAST_DAY LEAST LOCALTOUTC +syn keyword sqlFunction MINUTE MONTH MONTHNAME NEXT_DAY NOW QUARTER SECOND +syn keyword sqlFunction SECONDS_BETWEEN UTCTOLOCAL WEEK WEEKDAY YEAR + +syn keyword sqlFunction TO_CHAR TO_DATE TO_DATS TO_NCHAR TO_TIME TO_TIMESTAMP UTCTOLOCAL + +" Aggregate +syn keyword sqlFunction COUNT MIN MAX SUM AVG STDDEV VAR + +" Datatype conversion +syn keyword sqlFunction CAST TO_ALPHANUM TO_BIGINT TO_BINARY TO_BLOB TO_CHAR TO_CLOB +syn keyword sqlFunction TO_DATE TO_DATS TO_DECIMAL TO_DOUBLE TO_INT TO_INTEGER TO_NCHAR +syn keyword sqlFunction TO_NCLOB TO_NVARCHAR TO_REAL TO_SECONDDATE TO_SMALLDECIMAL +syn keyword sqlFunction TO_SMALLINT TO_TIME TO_TIMESTAMP TO_TINYINT TO_VARCHAR TO_VARBINARY + +" Number functions +syn keyword sqlFunction ABS ACOS ASIN ATAN ATAN2 BINTOHEX BITAND CEIL COS COSH COT +syn keyword sqlFunction EXP FLOOR GREATEST HEXTOBIN LEAST LN LOG MOD POWER ROUND +syn keyword sqlFunction SIGN SIN SINH SQRT TAN TANH UMINUS + +" String functions +syn keyword sqlFunction ASCII CHAR CONCAT LCASE LENGTH LOCATE LOWER LPAD LTRIM +syn keyword sqlFunction NCHAR REPLACE RPAD RTRIM SUBSTR_AFTER SUBSTR_BEFORE +syn keyword sqlFunction SUBSTRING TRIM UCASE UNICODE UPPER + +" Miscellaneous functions +syn keyword sqlFunction COALESCE CURRENT_CONNECTION CURRENT_SCHEMA CURRENT_USER +syn keyword sqlFunction GROUPING_ID IFNULL MAP NULLIF SESSION_CONTEXT SESSION_USER SYSUUIDSQL +syn keyword sqlFunction GET_NUM_SERVERS + + +" sp_ procedures +" syn keyword sqlFunction sp_addalias + + +" Reserved keywords +syn keyword sqlkeyword ALL AS AT BEFORE +syn keyword sqlkeyword BEGIN BOTH BY +syn keyword sqlkeyword CONDITION +syn keyword sqlkeyword CURRVAL CURSOR DECLARE +syn keyword sqlkeyword DISTINCT DO ELSE ELSEIF ELSIF +syn keyword sqlkeyword END EXCEPTION EXEC +syn keyword sqlkeyword FOR FROM GROUP +syn keyword sqlkeyword HAVING IN +syn keyword sqlkeyword INOUT INTO IS +syn keyword sqlkeyword LEADING +syn keyword sqlkeyword LOOP MINUS NATURAL NEXTVAL +syn keyword sqlkeyword OF ON ORDER OUT +syn keyword sqlkeyword PRIOR RETURN RETURNS REVERSE +syn keyword sqlkeyword ROWID SELECT +syn keyword sqlkeyword SQL START STOP SYSDATE +syn keyword sqlkeyword SYSTIME SYSTIMESTAMP SYSUUID +syn keyword sqlkeyword TRAILING USING UTCDATE +syn keyword sqlkeyword UTCTIME UTCTIMESTAMP VALUES +syn keyword sqlkeyword WHILE +syn keyword sqlkeyword ANY SOME EXISTS ESCAPE + +" IF keywords +syn keyword sqlkeyword IF + +" CASE keywords +syn keyword sqlKeyword WHEN THEN + +" Syntax rules common to TEXT and SHORTTEXT keywords +syn keyword sqlKeyword LANGUAGE DETECTION LINGUISTIC +syn keyword sqlkeyword MIME TYPE +syn keyword sqlkeyword EXACT WEIGHT FUZZY FUZZINESSTHRESHOLD SEARCH +syn keyword sqlkeyword PHRASE INDEX RATIO REBUILD +syn keyword sqlkeyword CONFIGURATION +syn keyword sqlkeyword SEARCH ONLY +syn keyword sqlkeyword FAST PREPROCESS +syn keyword sqlkeyword SYNC SYNCHRONOUS ASYNC ASYNCHRONOUS FLUSH QUEUE +syn keyword sqlkeyword EVERY AFTER MINUTES DOCUMENTS SUSPEND + +" Statement keywords (i.e. after ALTER or CREATE) +syn keyword sqlkeyword AUDIT POLICY +syn keyword sqlkeyword FULLTEXT +syn keyword sqlkeyword SEQUENCE RESTART +syn keyword sqlkeyword TABLE +syn keyword sqlkeyword PROCEDURE STATISTICS +syn keyword sqlkeyword SCHEMA +syn keyword sqlkeyword SYNONYM +syn keyword sqlkeyword VIEW +syn keyword sqlkeyword COLUMN +syn keyword sqlkeyword SYSTEM LICENSE +syn keyword sqlkeyword SESSION +syn keyword sqlkeyword CANCEL WORK +syn keyword sqlkeyword PLAN CACHE +syn keyword sqlkeyword LOGGING NOLOGGING RETENTION +syn keyword sqlkeyword RECONFIGURE SERVICE +syn keyword sqlkeyword RESET MONITORING +syn keyword sqlkeyword SAVE DURATION PERFTRACE FUNCTION_PROFILER +syn keyword sqlkeyword SAVEPOINT +syn keyword sqlkeyword USER +syn keyword sqlkeyword ROLE +syn keyword sqlkeyword ASC DESC +syn keyword sqlkeyword OWNED +syn keyword sqlkeyword DEPENDENCIES SCRAMBLE + +" Create sequence +syn keyword sqlkeyword INCREMENT MAXVALUE MINVALUE CYCLE + +" Create table +syn keyword sqlkeyword HISTORY GLOBAL LOCAL TEMPORARY + +" Create trigger +syn keyword sqlkeyword TRIGGER REFERENCING EACH DEFAULT +syn keyword sqlkeyword SIGNAL RESIGNAL MESSAGE_TEXT OLD NEW +syn keyword sqlkeyword EXIT HANDLER SQL_ERROR_CODE +syn keyword sqlkeyword TARGET CONDITION SIGNAL + +" Alter table +syn keyword sqlkeyword ADD DROP MODIFY GENERATED ALWAYS +syn keyword sqlkeyword UNIQUE BTREE CPBTREE PRIMARY KEY +syn keyword sqlkeyword CONSTRAINT PRELOAD NONE +syn keyword sqlkeyword ROW THREADS BATCH +syn keyword sqlkeyword MOVE PARTITION TO LOCATION PHYSICAL OTHERS +syn keyword sqlkeyword ROUNDROBIN PARTITIONS HASH RANGE VALUE +syn keyword sqlkeyword PERSISTENT DELTA AUTO AUTOMERGE + +" Create audit policy +syn keyword sqlkeyword AUDITING SUCCESSFUL UNSUCCESSFUL +syn keyword sqlkeyword PRIVILEGE STRUCTURED CHANGE LEVEL +syn keyword sqlkeyword EMERGENCY ALERT CRITICAL WARNING INFO + +" Privileges +syn keyword sqlkeyword DEBUG EXECUTE + +" Schema +syn keyword sqlkeyword CASCADE RESTRICT PARAMETERS SCAN + +" Traces +syn keyword sqlkeyword CLIENT CRASHDUMP EMERGENCYDUMP +syn keyword sqlkeyword INDEXSERVER NAMESERVER DAEMON +syn keyword sqlkeyword CLEAR REMOVE TRACES + +" Reclaim +syn keyword sqlkeyword RECLAIM DATA VOLUME VERSION SPACE DEFRAGMENT SPARSIFY + +" Join +syn keyword sqlkeyword INNER OUTER LEFT RIGHT FULL CROSS JOIN +syn keyword sqlkeyword GROUPING SETS ROLLUP CUBE +syn keyword sqlkeyword BEST LIMIT OFFSET +syn keyword sqlkeyword WITH SUBTOTAL BALANCE TOTAL +syn keyword sqlkeyword TEXT_FILTER FILL UP SORT MATCHES TOP +syn keyword sqlkeyword RESULT OVERVIEW PREFIX MULTIPLE RESULTSETS + +" Lock +syn keyword sqlkeyword EXCLUSIVE MODE NOWAIT + +" Transaction +syn keyword sqlkeyword TRANSACTION ISOLATION READ COMMITTED +syn keyword sqlkeyword REPEATABLE SERIALIZABLE WRITE + +" Saml +syn keyword sqlkeyword SAML ASSERTION PROVIDER SUBJECT ISSUER + +" User +syn keyword sqlkeyword PASSWORD IDENTIFIED EXTERNALLY ATTEMPTS ATTEMPTS +syn keyword sqlkeyword ENABLE DISABLE OFF LIFETIME FORCE DEACTIVATE +syn keyword sqlkeyword ACTIVATE IDENTITY KERBEROS + +" Grant +syn keyword sqlkeyword ADMIN BACKUP CATALOG SCENARIO INIFILE MONITOR +syn keyword sqlkeyword OPTIMIZER OPTION +syn keyword sqlkeyword RESOURCE STRUCTUREDPRIVILEGE TRACE + +" Import +syn keyword sqlkeyword CSV FILE CONTROL NO CHECK SKIP FIRST LIST +syn keyword sqlkeyword RECORD DELIMITED FIELD OPTIONALLY ENCLOSED FORMAT + +" Roles +syn keyword sqlkeyword PUBLIC CONTENT_ADMIN MODELING MONITORING + +" Miscellaneous +syn keyword sqlkeyword APPLICATION BINARY IMMEDIATE COREFILE SECURITY DEFINER +syn keyword sqlkeyword DUMMY INVOKER MATERIALIZED MESSEGE_TEXT PARAMETER PARAMETERS +syn keyword sqlkeyword PART +syn keyword sqlkeyword CONSTANT SQLEXCEPTION SQLWARNING + +syn keyword sqlOperator WHERE BETWEEN LIKE NULL CONTAINS +syn keyword sqlOperator AND OR NOT CASE +syn keyword sqlOperator UNION INTERSECT EXCEPT + +syn keyword sqlStatement ALTER CALL CALLS CREATE DROP RENAME TRUNCATE +syn keyword sqlStatement DELETE INSERT UPDATE EXPLAIN +syn keyword sqlStatement MERGE REPLACE UPSERT SELECT +syn keyword sqlStatement SET UNSET LOAD UNLOAD +syn keyword sqlStatement CONNECT DISCONNECT COMMIT LOCK ROLLBACK +syn keyword sqlStatement GRANT REVOKE +syn keyword sqlStatement EXPORT IMPORT + + +syn keyword sqlType DATE TIME SECONDDATE TIMESTAMP TINYINT SMALLINT +syn keyword sqlType INT INTEGER BIGINT SMALLDECIMAL DECIMAL +syn keyword sqlType REAL DOUBLE FLOAT +syn keyword sqlType VARCHAR NVARCHAR ALPHANUM SHORTTEXT VARBINARY +syn keyword sqlType BLOB CLOB NCLOB TEXT DAYDATE + +syn keyword sqlOption Webservice_namespace_host + +" Strings and characters: +syn region sqlString start=+"+ end=+"+ contains=@Spell +syn region sqlString start=+'+ end=+'+ contains=@Spell + +" Numbers: +syn match sqlNumber "-\=\<\d*\.\=[0-9_]\>" + +" Comments: +syn region sqlDashComment start=/--/ end=/$/ contains=@Spell +syn region sqlSlashComment start=/\/\// end=/$/ contains=@Spell +syn region sqlMultiComment start="/\*" end="\*/" contains=sqlMultiComment,@Spell +syn cluster sqlComment contains=sqlDashComment,sqlSlashComment,sqlMultiComment,@Spell +syn sync ccomment sqlComment +syn sync ccomment sqlDashComment +syn sync ccomment sqlSlashComment + +hi def link sqlDashComment Comment +hi def link sqlSlashComment Comment +hi def link sqlMultiComment Comment +hi def link sqlNumber Number +hi def link sqlOperator Operator +hi def link sqlSpecial Special +hi def link sqlKeyword Keyword +hi def link sqlStatement Statement +hi def link sqlString String +hi def link sqlType Type +hi def link sqlFunction Function +hi def link sqlOption PreProc + +let b:current_syntax = "sqlhana" + +" vim:sw=4: diff --git a/runtime/syntax/synload.vim b/runtime/syntax/synload.vim index 9b28fd8f41..48b5956b3c 100644 --- a/runtime/syntax/synload.vim +++ b/runtime/syntax/synload.vim @@ -1,6 +1,6 @@ " Vim syntax support file " Maintainer: Bram Moolenaar -" Last Change: 2012 Feb 11 +" Last Change: 2012 Sep 25 " This file sets up for syntax highlighting. " It is loaded from "syntax.vim" and "manual.vim". @@ -46,6 +46,8 @@ fun! s:SynSet() echohl None endif let s = &filetype + elseif s == "OFF" + let s = "" endif if s != "" diff --git a/runtime/syntax/tex.vim b/runtime/syntax/tex.vim index 0eeff6f598..7bb2815986 100644 --- a/runtime/syntax/tex.vim +++ b/runtime/syntax/tex.vim @@ -1,9 +1,9 @@ " Vim syntax file " Language: TeX -" Maintainer: Dr. Charles E. Campbell, Jr. -" Last Change: Apr 24, 2012 -" Version: 73 -" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax +" Maintainer: Charles E. Campbell +" Last Change: Jun 24, 2013 +" Version: 79 +" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX " " Notes: {{{1 " @@ -52,14 +52,29 @@ if version >= 508 || !exists("did_tex_syntax_inits") command -nargs=+ HiLink hi def link endif endif -if exists("g:tex_tex") && !exists("g:tex_no_error") - let g:tex_no_error= 1 +if exists("g:tex_no_error") && g:tex_no_error + let s:tex_no_error= 1 +endif + +" by default, enable all region-based highlighting +let s:tex_fast= "bcmMprsSvV" +if exists("g:tex_fast") + if type(g:tex_fast) != 1 + " g:tex_fast exists and is not a string, so + " turn off all optional region-based highighting + let s:tex_fast= "" + else + let s:tex_fast= g:tex_fast + endif + let s:tex_no_error= 1 +else + let s:tex_fast= "bcmMprsSvV" endif " let user determine which classes of concealment will be supported " a=accents/ligatures d=delimiters m=math symbols g=Greek s=superscripts/subscripts if !exists("g:tex_conceal") - let s:tex_conceal= 'abdmgs' + let s:tex_conceal= 'abdmgsS' else let s:tex_conceal= g:tex_conceal endif @@ -110,7 +125,7 @@ endif " Clusters: {{{1 " -------- syn cluster texCmdGroup contains=texCmdBody,texComment,texDefParm,texDelimiter,texDocType,texInput,texLength,texLigature,texMathDelim,texMathOper,texNewCmd,texNewEnv,texRefZone,texSection,texBeginEnd,texBeginEndName,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle -if !exists("g:tex_no_error") +if !exists("s:tex_no_error") syn cluster texCmdGroup add=texMathError endif syn cluster texEnvGroup contains=texMatcher,texMathDelim,texSpecialChar,texStatement @@ -132,7 +147,7 @@ if !exists("tex_no_math") syn cluster texMathDelimGroup contains=texMathDelimBad,texMathDelimKey,texMathDelimSet1,texMathDelimSet2 syn cluster texMathMatchGroup contains=@texMathZones,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMathDelim,texMathMatcher,texMathOper,texNewCmd,texNewEnv,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone syn cluster texMathZoneGroup contains=texComment,texDelimiter,texLength,texMathDelim,texMathMatcher,texMathOper,texMathSymbol,texMathText,texRefZone,texSpecialChar,texStatement,texTypeSize,texTypeStyle - if !exists("g:tex_no_error") + if !exists("s:tex_no_error") syn cluster texMathMatchGroup add=texMathError syn cluster texMathZoneGroup add=texMathError endif @@ -153,26 +168,30 @@ if !exists("tex_no_math") endif " Try to flag {} and () mismatches: {{{1 -if !exists("g:tex_no_error") - syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" contains=@texMatchGroup,texError - syn region texMatcher matchgroup=Delimiter start="\[" end="]" contains=@texMatchGroup,texError -else - syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" contains=@texMatchGroup - syn region texMatcher matchgroup=Delimiter start="\[" end="]" contains=@texMatchGroup -endif -if !exists("g:tex_nospell") || !g:tex_nospell - syn region texParen start="(" end=")" contains=@texMatchGroup,@Spell -else - syn region texParen start="(" end=")" contains=@texMatchGroup +if s:tex_fast =~ 'm' + if !exists("s:tex_no_error") + syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" contains=@texMatchGroup,texError + syn region texMatcher matchgroup=Delimiter start="\[" end="]" contains=@texMatchGroup,texError,@NoSpell + else + syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" contains=@texMatchGroup + syn region texMatcher matchgroup=Delimiter start="\[" end="]" contains=@texMatchGroup + endif + if !exists("g:tex_nospell") || !g:tex_nospell + syn region texParen start="(" end=")" contains=@texMatchGroup,@Spell + else + syn region texParen start="(" end=")" contains=@texMatchGroup + endif endif -if !exists("g:tex_no_error") +if !exists("s:tex_no_error") syn match texError "[}\])]" endif -if !exists("tex_no_math") - if !exists("g:tex_no_error") - syn match texMathError "}" contained - endif - syn region texMathMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\}" end="}" end="%stopzone\>" contained contains=@texMathMatchGroup +if s:tex_fast =~ 'M' + if !exists("tex_no_math") + if !exists("s:tex_no_error") + syn match texMathError "}" contained + endif + syn region texMathMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\}" end="}" end="%stopzone\>" contained contains=@texMathMatchGroup + endif endif " TeX/LaTeX keywords: {{{1 @@ -182,7 +201,7 @@ if exists("g:tex_tex") || b:tex_stylish syn match texStatement "\\[a-zA-Z@]\+" else syn match texStatement "\\\a\+" - if !exists("g:tex_no_error") + if !exists("s:tex_no_error") syn match texError "\\\a*@[a-zA-Z@]*" endif endif @@ -210,12 +229,16 @@ syn match texLigature "\\\([ijolL]\|ae\|oe\|ss\|AA\|AE\|OE\)$" " \begin{}/\end{} section markers: {{{1 syn match texBeginEnd "\\begin\>\|\\end\>" nextgroup=texBeginEndName -syn region texBeginEndName matchgroup=Delimiter start="{" end="}" contained nextgroup=texBeginEndModifier contains=texComment -syn region texBeginEndModifier matchgroup=Delimiter start="\[" end="]" contained contains=texComment,@NoSpell +if s:tex_fast =~ 'm' + syn region texBeginEndName matchgroup=Delimiter start="{" end="}" contained nextgroup=texBeginEndModifier contains=texComment + syn region texBeginEndModifier matchgroup=Delimiter start="\[" end="]" contained contains=texComment,@NoSpell +endif " \documentclass, \documentstyle, \usepackage: {{{1 syn match texDocType "\\documentclass\>\|\\documentstyle\>\|\\usepackage\>" nextgroup=texBeginEndName,texDocTypeArgs -syn region texDocTypeArgs matchgroup=Delimiter start="\[" end="]" contained nextgroup=texBeginEndName contains=texComment,@NoSpell +if s:tex_fast =~ 'm' + syn region texDocTypeArgs matchgroup=Delimiter start="\[" end="]" contained nextgroup=texBeginEndName contains=texComment,@NoSpell +endif " Preamble syntax-based folding support: {{{1 if g:tex_fold_enabled && has("folding") @@ -227,7 +250,9 @@ syn match texInput "\\input\s\+[a-zA-Z/.0-9_^]\+"hs=s+7 contains=texStatemen syn match texInputFile "\\include\(graphics\|list\)\=\(\[.\{-}\]\)\=\s*{.\{-}}" contains=texStatement,texInputCurlies,texInputFileOpt syn match texInputFile "\\\(epsfig\|input\|usepackage\)\s*\(\[.*\]\)\={.\{-}}" contains=texStatement,texInputCurlies,texInputFileOpt syn match texInputCurlies "[{}]" contained -syn region texInputFileOpt matchgroup=Delimiter start="\[" end="\]" contained contains=texComment +if s:tex_fast =~ 'm' + syn region texInputFileOpt matchgroup=Delimiter start="\[" end="\]" contained contains=texComment +endif " Type Styles (LaTeX 2.09): {{{1 syn match texTypeStyle "\\rm\>" @@ -293,66 +318,70 @@ syn match texSpaceCode "\\\(math\|cat\|del\|lc\|sf\|uc\)code`"me=e-1 nextgroup= syn match texSpaceCodeChar "`\\\=.\(\^.\)\==\(\d\|\"\x\{1,6}\|`.\)" contained " Sections, subsections, etc: {{{1 -if !exists("g:tex_nospell") || !g:tex_nospell - if g:tex_fold_enabled && has("folding") - syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' fold contains=@texFoldGroup,@texDocGroup,@Spell - syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texPartGroup,@Spell - syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texChapterGroup,@Spell - syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSectionGroup,@Spell - syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSubSectionGroup,@Spell - syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSubSubSectionGroup,@Spell - syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texParaGroup,@Spell - syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@Spell - syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' fold contains=@texFoldGroup,@Spell - syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' fold contains=@texFoldGroup,@Spell - else - syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' contains=@texFoldGroup,@texDocGroup,@Spell - syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texPartGroup,@Spell - syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texChapterGroup,@Spell - syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSectionGroup,@Spell - syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSectionGroup,@Spell - syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSubSectionGroup,@Spell - syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texParaGroup,@Spell - syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@Spell - syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' contains=@texFoldGroup,@Spell - syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' contains=@texFoldGroup,@Spell - endif -else - if g:tex_fold_enabled && has("folding") - syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' fold contains=@texFoldGroup,@texDocGroup - syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texPartGroup - syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texChapterGroup - syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSectionGroup - syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSubSectionGroup - syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSubSubSectionGroup - syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texParaGroup - syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup - syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' fold contains=@texFoldGroup - syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' fold contains=@texFoldGroup - else - syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' contains=@texFoldGroup,@texDocGroup - syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texPartGroup - syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texChapterGroup - syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSectionGroup - syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSectionGroup - syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSubSectionGroup - syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texParaGroup - syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup - syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' contains=@texFoldGroup - syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' contains=@texFoldGroup - endif +if s:tex_fast =~ 'p' + if !exists("g:tex_nospell") || !g:tex_nospell + if g:tex_fold_enabled && has("folding") + syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' fold contains=@texFoldGroup,@texDocGroup,@Spell + syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texPartGroup,@Spell + syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texChapterGroup,@Spell + syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSectionGroup,@Spell + syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSubSectionGroup,@Spell + syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSubSubSectionGroup,@Spell + syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texParaGroup,@Spell + syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@Spell + syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' fold contains=@texFoldGroup,@Spell + syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' fold contains=@texFoldGroup,@Spell + else + syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' contains=@texFoldGroup,@texDocGroup,@Spell + syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texPartGroup,@Spell + syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texChapterGroup,@Spell + syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSectionGroup,@Spell + syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSectionGroup,@Spell + syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSubSectionGroup,@Spell + syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texParaGroup,@Spell + syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@Spell + syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' contains=@texFoldGroup,@Spell + syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' contains=@texFoldGroup,@Spell + endif + else + if g:tex_fold_enabled && has("folding") + syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' fold contains=@texFoldGroup,@texDocGroup + syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texPartGroup + syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texChapterGroup + syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSectionGroup + syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSubSectionGroup + syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSubSubSectionGroup + syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texParaGroup + syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup + syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' fold contains=@texFoldGroup + syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' fold contains=@texFoldGroup + else + syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' contains=@texFoldGroup,@texDocGroup + syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texPartGroup + syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texChapterGroup + syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSectionGroup + syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSectionGroup + syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSubSectionGroup + syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texParaGroup + syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup + syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' contains=@texFoldGroup + syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' contains=@texFoldGroup + endif + endif endif " particular support for bold and italic {{{1 -if s:tex_conceal =~ 'b' - syn region texBoldStyle matchgroup=texTypeStyle start="\\textbf\s*{" end="}" concealends contains=@texBoldGroup - syn region texBoldItalStyle matchgroup=texTypeStyle start="\\textit\s*{" end="}" concealends contains=@texItalGroup - syn region texItalStyle matchgroup=texTypeStyle start="\\textit\s*{" end="}" concealends contains=@texItalGroup - syn region texItalBoldStyle matchgroup=texTypeStyle start="\\textbf\s*{" end="}" concealends contains=@texBoldGroup +if s:tex_fast =~ 'b' + if s:tex_conceal =~ 'b' + syn region texBoldStyle matchgroup=texTypeStyle start="\\textbf\s*{" end="}" concealends contains=@texBoldGroup + syn region texBoldItalStyle matchgroup=texTypeStyle start="\\textit\s*{" end="}" concealends contains=@texItalGroup + syn region texItalStyle matchgroup=texTypeStyle start="\\textit\s*{" end="}" concealends contains=@texItalGroup + syn region texItalBoldStyle matchgroup=texTypeStyle start="\\textbf\s*{" end="}" concealends contains=@texBoldGroup + endif endif " Bad Math (mismatched): {{{1 -if !exists("tex_no_math") +if !exists("g:tex_no_math") && !exists("s:tex_no_error") syn match texBadMath "\\end\s*{\s*\(array\|gathered\|bBpvV]matrix\|split\|subequations\|smallmatrix\|xxalignat\)\s*}" syn match texBadMath "\\end\s*{\s*\(align\|alignat\|displaymath\|displaymath\|eqnarray\|equation\|flalign\|gather\|math\|multline\|xalignat\)\*\=\s*}" syn match texBadMath "\\[\])]" @@ -373,17 +402,21 @@ if !exists("tex_no_math") let foldcmd= "" endif exe "syn cluster texMathZones add=".grpname - exe 'syn region '.grpname.' start='."'".'\\begin\s*{\s*'.a:mathzone.'\s*}'."'".' end='."'".'\\end\s*{\s*'.a:mathzone.'\s*}'."'".' keepend contains=@texMathZoneGroup'.foldcmd - exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"' - exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"' + if s:tex_fast =~ 'M' + exe 'syn region '.grpname.' start='."'".'\\begin\s*{\s*'.a:mathzone.'\s*}'."'".' end='."'".'\\end\s*{\s*'.a:mathzone.'\s*}'."'".' keepend contains=@texMathZoneGroup'.foldcmd + exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"' + exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"' + endif exe 'hi def link '.grpname.' texMath' if a:starform let grpname = "texMathZone".a:sfx.'S' let syncname = "texSyncMathZone".a:sfx.'S' exe "syn cluster texMathZones add=".grpname - exe 'syn region '.grpname.' start='."'".'\\begin\s*{\s*'.a:mathzone.'\*\s*}'."'".' end='."'".'\\end\s*{\s*'.a:mathzone.'\*\s*}'."'".' keepend contains=@texMathZoneGroup'.foldcmd - exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"' - exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"' + if s:tex_fast =~ 'M' + exe 'syn region '.grpname.' start='."'".'\\begin\s*{\s*'.a:mathzone.'\*\s*}'."'".' end='."'".'\\end\s*{\s*'.a:mathzone.'\*\s*}'."'".' keepend contains=@texMathZoneGroup'.foldcmd + exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"' + exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"' + endif exe 'hi def link '.grpname.' texMath' endif endfun @@ -403,26 +436,30 @@ if !exists("tex_no_math") call TexNewMathZone("L","xxalignat",0) " Inline Math Zones: {{{2 - if has("conceal") && &enc == 'utf-8' && s:tex_conceal =~ 'd' - syn region texMathZoneV matchgroup=Delimiter start="\\(" matchgroup=Delimiter end="\\)\|%stopzone\>" keepend concealends contains=@texMathZoneGroup - syn region texMathZoneW matchgroup=Delimiter start="\\\[" matchgroup=Delimiter end="\\]\|%stopzone\>" keepend concealends contains=@texMathZoneGroup - syn region texMathZoneX matchgroup=Delimiter start="\$" skip="\\\\\|\\\$" matchgroup=Delimiter end="\$" end="%stopzone\>" concealends contains=@texMathZoneGroup - syn region texMathZoneY matchgroup=Delimiter start="\$\$" matchgroup=Delimiter end="\$\$" end="%stopzone\>" concealends keepend contains=@texMathZoneGroup - else - syn region texMathZoneV matchgroup=Delimiter start="\\(" matchgroup=Delimiter end="\\)\|%stopzone\>" keepend contains=@texMathZoneGroup - syn region texMathZoneW matchgroup=Delimiter start="\\\[" matchgroup=Delimiter end="\\]\|%stopzone\>" keepend contains=@texMathZoneGroup - syn region texMathZoneX matchgroup=Delimiter start="\$" skip="\\\\\|\\\$" matchgroup=Delimiter end="\$" end="%stopzone\>" contains=@texMathZoneGroup - syn region texMathZoneY matchgroup=Delimiter start="\$\$" matchgroup=Delimiter end="\$\$" end="%stopzone\>" keepend contains=@texMathZoneGroup + if s:tex_fast =~ 'M' + if has("conceal") && &enc == 'utf-8' && s:tex_conceal =~ 'd' + syn region texMathZoneV matchgroup=Delimiter start="\\(" matchgroup=Delimiter end="\\)\|%stopzone\>" keepend concealends contains=@texMathZoneGroup + syn region texMathZoneW matchgroup=Delimiter start="\\\[" matchgroup=Delimiter end="\\]\|%stopzone\>" keepend concealends contains=@texMathZoneGroup + syn region texMathZoneX matchgroup=Delimiter start="\$" skip="\\\\\|\\\$" matchgroup=Delimiter end="\$" end="%stopzone\>" concealends contains=@texMathZoneGroup + syn region texMathZoneY matchgroup=Delimiter start="\$\$" matchgroup=Delimiter end="\$\$" end="%stopzone\>" concealends keepend contains=@texMathZoneGroup + else + syn region texMathZoneV matchgroup=Delimiter start="\\(" matchgroup=Delimiter end="\\)\|%stopzone\>" keepend contains=@texMathZoneGroup + syn region texMathZoneW matchgroup=Delimiter start="\\\[" matchgroup=Delimiter end="\\]\|%stopzone\>" keepend contains=@texMathZoneGroup + syn region texMathZoneX matchgroup=Delimiter start="\$" skip="\\\\\|\\\$" matchgroup=Delimiter end="\$" end="%stopzone\>" contains=@texMathZoneGroup + syn region texMathZoneY matchgroup=Delimiter start="\$\$" matchgroup=Delimiter end="\$\$" end="%stopzone\>" keepend contains=@texMathZoneGroup + endif + syn region texMathZoneZ matchgroup=texStatement start="\\ensuremath\s*{" matchgroup=texStatement end="}" end="%stopzone\>" contains=@texMathZoneGroup endif - syn region texMathZoneZ matchgroup=texStatement start="\\ensuremath\s*{" matchgroup=texStatement end="}" end="%stopzone\>" contains=@texMathZoneGroup syn match texMathOper "[_^=]" contained " Text Inside Math Zones: {{{2 - if !exists("g:tex_nospell") || !g:tex_nospell - syn region texMathText matchgroup=texStatement start='\\\(\(inter\)\=text\|mbox\)\s*{' end='}' contains=@texFoldGroup,@Spell - else - syn region texMathText matchgroup=texStatement start='\\\(\(inter\)\=text\|mbox\)\s*{' end='}' contains=@texFoldGroup + if s:tex_fast =~ 'M' + if !exists("g:tex_nospell") || !g:tex_nospell + syn region texMathText matchgroup=texStatement start='\\\(\(inter\)\=text\|mbox\)\s*{' end='}' contains=@texFoldGroup,@Spell + else + syn region texMathText matchgroup=texStatement start='\\\(\(inter\)\=text\|mbox\)\s*{' end='}' contains=@texFoldGroup + endif endif " \left..something.. and \right..something.. support: {{{2 @@ -492,6 +529,13 @@ if !exists("tex_no_math") syn match texOnlyMath "[_^]" endif syn match texSpecialChar "\^\^[0-9a-f]\{2}\|\^\^\S" +if s:tex_conceal !~ 'S' + syn match texSpecialChar '\\glq\>' contained conceal cchar=‚ + syn match texSpecialChar '\\grq\>' contained conceal cchar=‘ + syn match texSpecialChar '\\glqq\>' contained conceal cchar=„ + syn match texSpecialChar '\\grqq\>' contained conceal cchar=“ + syn match texSpecialChar '\\hyp\>' contained conceal cchar=- +endif " Comments: {{{1 " Normal TeX LaTeX : %.... @@ -512,65 +556,77 @@ else " allows syntax-folding of 2 or more contiguous comment lines " single-line comments are not folded syn match texComment "%.*$" contains=@texCommentGroup - syn region texComment start="^\zs\s*%.*\_s*%" skip="^\s*%" end='^\ze\s*[^%]' fold - syn region texNoSpell contained fold matchgroup=texComment start="%\s*nospell\s*{" end="%\s*nospell\s*}" contains=@texFoldGroup,@NoSpell + if s:tex_fast =~ 'c' + syn region texComment start="^\zs\s*%.*\_s*%" skip="^\s*%" end='^\ze\s*[^%]' fold + syn region texNoSpell contained fold matchgroup=texComment start="%\s*nospell\s*{" end="%\s*nospell\s*}" contains=@texFoldGroup,@NoSpell + endif else syn match texComment "%.*$" contains=@texCommentGroup - syn region texNoSpell contained matchgroup=texComment start="%\s*nospell\s*{" end="%\s*nospell\s*}" contains=@texFoldGroup,@NoSpell + if s:tex_fast =~ 'c' + syn region texNoSpell contained matchgroup=texComment start="%\s*nospell\s*{" end="%\s*nospell\s*}" contains=@texFoldGroup,@NoSpell + endif endif endif " Separate lines used for verb` and verb# so that the end conditions {{{1 " will appropriately terminate. " If g:tex_verbspell exists, then verbatim texZones will permit spellchecking there. -if exists("g:tex_verbspell") && g:tex_verbspell - syn region texZone start="\\begin{[vV]erbatim}" end="\\end{[vV]erbatim}\|%stopzone\>" contains=@Spell - " listings package: - syn region texZone start="\\begin{lstlisting}" end="\\end{lstlisting}\|%stopzone\>" contains=@Spell - if version < 600 - syn region texZone start="\\verb\*\=`" end="`\|%stopzone\>" contains=@Spell - syn region texZone start="\\verb\*\=#" end="#\|%stopzone\>" contains=@Spell - else - if b:tex_stylish - syn region texZone start="\\verb\*\=\z([^\ta-zA-Z@]\)" end="\z1\|%stopzone\>" contains=@Spell +if s:tex_fast =~ 'v' + if exists("g:tex_verbspell") && g:tex_verbspell + syn region texZone start="\\begin{[vV]erbatim}" end="\\end{[vV]erbatim}\|%stopzone\>" contains=@Spell + " listings package: + syn region texZone start="\\begin{lstlisting}" end="\\end{lstlisting}\|%stopzone\>" contains=@Spell + if version < 600 + syn region texZone start="\\verb\*\=`" end="`\|%stopzone\>" contains=@Spell + syn region texZone start="\\verb\*\=#" end="#\|%stopzone\>" contains=@Spell else - syn region texZone start="\\verb\*\=\z([^\ta-zA-Z]\)" end="\z1\|%stopzone\>" contains=@Spell + if b:tex_stylish + syn region texZone start="\\verb\*\=\z([^\ta-zA-Z@]\)" end="\z1\|%stopzone\>" contains=@Spell + else + syn region texZone start="\\verb\*\=\z([^\ta-zA-Z]\)" end="\z1\|%stopzone\>" contains=@Spell + endif endif - endif -else - syn region texZone start="\\begin{[vV]erbatim}" end="\\end{[vV]erbatim}\|%stopzone\>" - if version < 600 - syn region texZone start="\\verb\*\=`" end="`\|%stopzone\>" - syn region texZone start="\\verb\*\=#" end="#\|%stopzone\>" - else - if b:tex_stylish - syn region texZone start="\\verb\*\=\z([^\ta-zA-Z@]\)" end="\z1\|%stopzone\>" + else + syn region texZone start="\\begin{[vV]erbatim}" end="\\end{[vV]erbatim}\|%stopzone\>" + if version < 600 + syn region texZone start="\\verb\*\=`" end="`\|%stopzone\>" + syn region texZone start="\\verb\*\=#" end="#\|%stopzone\>" else - syn region texZone start="\\verb\*\=\z([^\ta-zA-Z]\)" end="\z1\|%stopzone\>" + if b:tex_stylish + syn region texZone start="\\verb\*\=\z([^\ta-zA-Z@]\)" end="\z1\|%stopzone\>" + else + syn region texZone start="\\verb\*\=\z([^\ta-zA-Z]\)" end="\z1\|%stopzone\>" + endif endif - endif + endif endif " Tex Reference Zones: {{{1 -syn region texZone matchgroup=texStatement start="@samp{" end="}\|%stopzone\>" contains=@texRefGroup -syn region texRefZone matchgroup=texStatement start="\\nocite{" end="}\|%stopzone\>" contains=@texRefGroup -syn region texRefZone matchgroup=texStatement start="\\bibliography{" end="}\|%stopzone\>" contains=@texRefGroup -syn region texRefZone matchgroup=texStatement start="\\label{" end="}\|%stopzone\>" contains=@texRefGroup -syn region texRefZone matchgroup=texStatement start="\\\(page\|eq\)ref{" end="}\|%stopzone\>" contains=@texRefGroup -syn region texRefZone matchgroup=texStatement start="\\v\=ref{" end="}\|%stopzone\>" contains=@texRefGroup +if s:tex_fast =~ 'r' + syn region texZone matchgroup=texStatement start="@samp{" end="}\|%stopzone\>" contains=@texRefGroup + syn region texRefZone matchgroup=texStatement start="\\nocite{" end="}\|%stopzone\>" contains=@texRefGroup + syn region texRefZone matchgroup=texStatement start="\\bibliography{" end="}\|%stopzone\>" contains=@texRefGroup + syn region texRefZone matchgroup=texStatement start="\\label{" end="}\|%stopzone\>" contains=@texRefGroup + syn region texRefZone matchgroup=texStatement start="\\\(page\|eq\)ref{" end="}\|%stopzone\>" contains=@texRefGroup + syn region texRefZone matchgroup=texStatement start="\\v\=ref{" end="}\|%stopzone\>" contains=@texRefGroup + syn region texRefOption contained matchgroup=Delimiter start='\[' end=']' contains=@texRefGroup,texRefZone nextgroup=texRefOption,texCite + syn region texCite contained matchgroup=Delimiter start='{' end='}' contains=@texRefGroup,texRefZone,texCite +endif syn match texRefZone '\\cite\%([tp]\*\=\)\=' nextgroup=texRefOption,texCite -syn region texRefOption contained matchgroup=Delimiter start='\[' end=']' contains=@texRefGroup,texRefZone nextgroup=texRefOption,texCite -syn region texCite contained matchgroup=Delimiter start='{' end='}' contains=@texRefGroup,texRefZone,texCite " Handle newcommand, newenvironment : {{{1 syn match texNewCmd "\\newcommand\>" nextgroup=texCmdName skipwhite skipnl -syn region texCmdName contained matchgroup=Delimiter start="{"rs=s+1 end="}" nextgroup=texCmdArgs,texCmdBody skipwhite skipnl -syn region texCmdArgs contained matchgroup=Delimiter start="\["rs=s+1 end="]" nextgroup=texCmdBody skipwhite skipnl -syn region texCmdBody contained matchgroup=Delimiter start="{"rs=s+1 skip="\\\\\|\\[{}]" matchgroup=Delimiter end="}" contains=@texCmdGroup +if s:tex_fast =~ 'V' + syn region texCmdName contained matchgroup=Delimiter start="{"rs=s+1 end="}" nextgroup=texCmdArgs,texCmdBody skipwhite skipnl + syn region texCmdArgs contained matchgroup=Delimiter start="\["rs=s+1 end="]" nextgroup=texCmdBody skipwhite skipnl + syn region texCmdBody contained matchgroup=Delimiter start="{"rs=s+1 skip="\\\\\|\\[{}]" matchgroup=Delimiter end="}" contains=@texCmdGroup +endif syn match texNewEnv "\\newenvironment\>" nextgroup=texEnvName skipwhite skipnl -syn region texEnvName contained matchgroup=Delimiter start="{"rs=s+1 end="}" nextgroup=texEnvBgn skipwhite skipnl -syn region texEnvBgn contained matchgroup=Delimiter start="{"rs=s+1 end="}" nextgroup=texEnvEnd skipwhite skipnl contains=@texEnvGroup -syn region texEnvEnd contained matchgroup=Delimiter start="{"rs=s+1 end="}" skipwhite skipnl contains=@texEnvGroup +if s:tex_fast =~ 'V' + syn region texEnvName contained matchgroup=Delimiter start="{"rs=s+1 end="}" nextgroup=texEnvBgn skipwhite skipnl + syn region texEnvBgn contained matchgroup=Delimiter start="{"rs=s+1 end="}" nextgroup=texEnvEnd skipwhite skipnl contains=@texEnvGroup + syn region texEnvEnd contained matchgroup=Delimiter start="{"rs=s+1 end="}" skipwhite skipnl contains=@texEnvGroup +endif " Definitions/Commands: {{{1 syn match texDefCmd "\\def\>" nextgroup=texDefName skipwhite skipnl @@ -591,11 +647,15 @@ syn match texLength "\<\d\+\([.,]\d\+\)\=\s*\(true\)\=\s*\(bp\|cc\|cm\|dd\|em\ syn match texString "\(``\|''\|,,\)" " makeatletter -- makeatother sections -if !exists("g:tex_no_error") - syn region texStyle matchgroup=texStatement start='\\makeatletter' end='\\makeatother' contains=@texStyleGroup contained +if !exists("s:tex_no_error") + if s:tex_fast =~ 'S' + syn region texStyle matchgroup=texStatement start='\\makeatletter' end='\\makeatother' contains=@texStyleGroup contained + endif syn match texStyleStatement "\\[a-zA-Z@]\+" contained - syn region texStyleMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" contains=@texStyleGroup,texError contained - syn region texStyleMatcher matchgroup=Delimiter start="\[" end="]" contains=@texStyleGroup,texError contained + if s:tex_fast =~ 'S' + syn region texStyleMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" contains=@texStyleGroup,texError contained + syn region texStyleMatcher matchgroup=Delimiter start="\[" end="]" contains=@texStyleGroup,texError contained + endif endif " Conceal mode support (supports set cole=2) {{{1 @@ -723,7 +783,7 @@ if has("conceal") && &enc == 'utf-8' \ ['leftarrowtail' , '↢'], \ ['leftharpoondown', '↽'], \ ['leftharpoonup' , '↼'], - \ ['leftrightarrow' , '⇔'], + \ ['leftrightarrow' , '↔'], \ ['Leftrightarrow' , '⇔'], \ ['leftrightsquigarrow', '↭'], \ ['leftthreetimes' , '⋋'], @@ -970,8 +1030,10 @@ if has("conceal") && &enc == 'utf-8' " Superscripts/Subscripts {{{2 if s:tex_conceal =~ 's' - syn region texSuperscript matchgroup=Delimiter start='\^{' skip="\\\\\|\\[{}]" end='}' contained concealends contains=texSpecialChar,texSuperscripts,texStatement,texSubscript,texSuperscript,texMathMatcher - syn region texSubscript matchgroup=Delimiter start='_{' skip="\\\\\|\\[{}]" end='}' contained concealends contains=texSpecialChar,texSubscripts,texStatement,texSubscript,texSuperscript,texMathMatcher + if s:tex_fast =~ 's' + syn region texSuperscript matchgroup=Delimiter start='\^{' skip="\\\\\|\\[{}]" end='}' contained concealends contains=texSpecialChar,texSuperscripts,texStatement,texSubscript,texSuperscript,texMathMatcher + syn region texSubscript matchgroup=Delimiter start='_{' skip="\\\\\|\\[{}]" end='}' contained concealends contains=texSpecialChar,texSubscripts,texStatement,texSubscript,texSuperscript,texMathMatcher + endif fun! s:SuperSub(group,leader,pat,cchar) exe 'syn match '.a:group." '".a:leader.a:pat."' contained conceal cchar=".a:cchar exe 'syn match '.a:group."s '".a:pat."' contained conceal cchar=".a:cchar.' nextgroup='.a:group.'s' @@ -1180,8 +1242,8 @@ endif if did_tex_syntax_inits == 1 let did_tex_syntax_inits= 2 " TeX highlighting groups which should share similar highlighting - if !exists("g:tex_no_error") - if !exists("tex_no_math") + if !exists("s:tex_no_error") + if !exists("g:tex_no_math") HiLink texBadMath texError HiLink texMathDelimBad texError HiLink texMathError texError diff --git a/runtime/syntax/tidy.vim b/runtime/syntax/tidy.vim index b23dc3aeba..c24796edd1 100644 --- a/runtime/syntax/tidy.vim +++ b/runtime/syntax/tidy.vim @@ -1,161 +1,144 @@ " Vim syntax file -" Language: HMTL Tidy configuration file ( /etc/tidyrc ~/.tidyrc ) -" Maintainer: Doug Kearns -" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/syntax/tidy.vim -" Last Change: 2005 Oct 06 +" Language: HMTL Tidy configuration file (/etc/tidyrc ~/.tidyrc) +" Maintainer: Doug Kearns +" Last Change: 2013 June 01 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +if exists("b:current_syntax") finish endif -if version < 600 - set iskeyword=@,48-57,- -else - setlocal iskeyword=@,48-57,- -endif +setlocal iskeyword=@,48-57,- -syn match tidyComment "^\s*//.*$" contains=tidyTodo -syn match tidyComment "^\s*#.*$" contains=tidyTodo -syn keyword tidyTodo TODO NOTE FIXME XXX contained +syn match tidyComment "^\s*//.*$" contains=tidyTodo +syn match tidyComment "^\s*#.*$" contains=tidyTodo +syn keyword tidyTodo TODO NOTE FIXME XXX contained -syn match tidyAssignment "^[a-z0-9-]\+:\s*.*$" contains=tidyOption,@tidyValue,tidyDelimiter -syn match tidyDelimiter ":" contained +syn match tidyAssignment "^[a-z0-9-]\+:\s*.*$" contains=tidyOption,@tidyValue,tidyDelimiter +syn match tidyDelimiter ":" contained syn match tidyNewTagAssignment "^new-\l\+-tags:\s*.*$" contains=tidyNewTagOption,tidyNewTagDelimiter,tidyNewTagValue,tidyDelimiter syn match tidyNewTagDelimiter "," contained syn match tidyNewTagValue "\<\w\+\>" contained syn case ignore -syn keyword tidyBoolean t[rue] f[alse] y[es] n[o] contained +syn keyword tidyBoolean t[rue] f[alse] y[es] n[o] contained syn case match -syn match tidyDoctype "\" contained +syn match tidyDoctype "\<\%(omit\|auto\|strict\|loose\|transitional\|user\)\>" contained " NOTE: use match rather than keyword here so that tidyEncoding 'raw' does not " always have precedence over tidyOption 'raw' -syn match tidyEncoding "\<\(ascii\|latin0\|latin1\|raw\|utf8\|iso2022\|mac\|utf16le\|utf16be\|utf16\|win1252\|ibm858\|big5\|shiftjis\)\>" contained -syn match tidyNewline "\<\(LF\|CRLF\|CR\)\>" -syn match tidyNumber "\<\d\+\>" contained -syn match tidyRepeat "\" contained -syn region tidyString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained oneline -syn region tidyString start=+'+ skip=+\\\\\|\\'+ end=+'+ contained oneline -syn cluster tidyValue contains=tidyBoolean,tidyDoctype,tidyEncoding,tidyNewline,tidyNumber,tidyRepeat,tidyString - -syn match tidyOption "^accessibility-check" contained -syn match tidyOption "^add-xml-decl" contained -syn match tidyOption "^add-xml-pi" contained -syn match tidyOption "^add-xml-space" contained -syn match tidyOption "^alt-text" contained -syn match tidyOption "^ascii-chars" contained -syn match tidyOption "^assume-xml-procins" contained -syn match tidyOption "^bare" contained -syn match tidyOption "^break-before-br" contained -syn match tidyOption "^char-encoding" contained -syn match tidyOption "^clean" contained -syn match tidyOption "^css-prefix" contained -syn match tidyOption "^doctype" contained -syn match tidyOption "^doctype-mode" contained -syn match tidyOption "^drop-empty-paras" contained -syn match tidyOption "^drop-font-tags" contained -syn match tidyOption "^drop-proprietary-attributes" contained -syn match tidyOption "^enclose-block-text" contained -syn match tidyOption "^enclose-text" contained -syn match tidyOption "^error-file" contained -syn match tidyOption "^escape-cdata" contained -syn match tidyOption "^fix-backslash" contained -syn match tidyOption "^fix-bad-comments" contained -syn match tidyOption "^fix-uri" contained -syn match tidyOption "^force-output" contained -syn match tidyOption "^gnu-emacs" contained -syn match tidyOption "^gnu-emacs-file" contained -syn match tidyOption "^hide-comments" contained -syn match tidyOption "^hide-endtags" contained -syn match tidyOption "^indent" contained -syn match tidyOption "^indent-attributes" contained -syn match tidyOption "^indent-cdata" contained -syn match tidyOption "^indent-spaces" contained -syn match tidyOption "^input-encoding" contained -syn match tidyOption "^input-xml" contained -syn match tidyOption "^join-classes" contained -syn match tidyOption "^join-styles" contained -syn match tidyOption "^keep-time" contained -syn match tidyOption "^language" contained -syn match tidyOption "^literal-attributes" contained -syn match tidyOption "^logical-emphasis" contained -syn match tidyOption "^lower-literals" contained -syn match tidyOption "^markup" contained -syn match tidyOption "^merge-divs" contained -syn match tidyOption "^ncr" contained -syn match tidyOption "^newline" contained -syn match tidyOption "^numeric-entities" contained -syn match tidyOption "^output-bom" contained -syn match tidyOption "^output-encoding" contained -syn match tidyOption "^output-file" contained -syn match tidyOption "^output-html" contained -syn match tidyOption "^output-xhtml" contained -syn match tidyOption "^output-xml" contained -syn match tidyOption "^punctuation-wrap" contained -syn match tidyOption "^quiet" contained -syn match tidyOption "^quote-ampersand" contained -syn match tidyOption "^quote-marks" contained -syn match tidyOption "^quote-nbsp" contained -syn match tidyOption "^raw" contained -syn match tidyOption "^repeated-attributes" contained -syn match tidyOption "^replace-color" contained -syn match tidyOption "^show-body-only" contained -syn match tidyOption "^show-errors" contained -syn match tidyOption "^show-warnings" contained -syn match tidyOption "^slide-style" contained -syn match tidyOption "^split" contained -syn match tidyOption "^tab-size" contained -syn match tidyOption "^tidy-mark" contained -syn match tidyOption "^uppercase-attributes" contained -syn match tidyOption "^uppercase-tags" contained -syn match tidyOption "^word-2000" contained -syn match tidyOption "^wrap" contained -syn match tidyOption "^wrap-asp" contained -syn match tidyOption "^wrap-attributes" contained -syn match tidyOption "^wrap-jste" contained -syn match tidyOption "^wrap-php" contained -syn match tidyOption "^wrap-script-literals" contained -syn match tidyOption "^wrap-sections" contained -syn match tidyOption "^write-back" contained -syn match tidyOption "^vertical-space" contained -syn match tidyNewTagOption "^new-blocklevel-tags" contained -syn match tidyNewTagOption "^new-empty-tags" contained -syn match tidyNewTagOption "^new-inline-tags" contained -syn match tidyNewTagOption "^new-pre-tags" contained +syn match tidyEncoding "\<\%(ascii\|latin0\|latin1\|raw\|utf8\|iso2022\|mac\|utf16le\|utf16be\|utf16\|win1252\|ibm858\|big5\|shiftjis\)\>" contained +syn match tidyNewline "\<\%(LF\|CRLF\|CR\)\>" +syn match tidyNumber "\<\d\+\>" contained +syn match tidyRepeat "\<\%(keep-first\|keep-last\)\>" contained +syn region tidyString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained oneline +syn region tidyString start=+'+ skip=+\\\\\|\\'+ end=+'+ contained oneline +syn cluster tidyValue contains=tidyBoolean,tidyDoctype,tidyEncoding,tidyNewline,tidyNumber,tidyRepeat,tidyString -" 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_tidy_syn_inits") - if version < 508 - let did_tidy_syn_inits = 1 - command -nargs=+ HiLink hi link - else - command -nargs=+ HiLink hi def link - endif +syn match tidyOption "^accessibility-check" contained +syn match tidyOption "^add-xml-decl" contained +syn match tidyOption "^add-xml-pi" contained +syn match tidyOption "^add-xml-space" contained +syn match tidyOption "^alt-text" contained +syn match tidyOption "^anchor-as-name" contained +syn match tidyOption "^ascii-chars" contained +syn match tidyOption "^assume-xml-procins" contained +syn match tidyOption "^bare" contained +syn match tidyOption "^break-before-br" contained +syn match tidyOption "^char-encoding" contained +syn match tidyOption "^clean" contained +syn match tidyOption "^css-prefix" contained +syn match tidyOption "^decorate-inferred-ul" contained +syn match tidyOption "^doctype" contained +syn match tidyOption "^doctype-mode" contained +syn match tidyOption "^drop-empty-paras" contained +syn match tidyOption "^drop-font-tags" contained +syn match tidyOption "^drop-proprietary-attributes" contained +syn match tidyOption "^enclose-block-text" contained +syn match tidyOption "^enclose-text" contained +syn match tidyOption "^error-file" contained +syn match tidyOption "^escape-cdata" contained +syn match tidyOption "^fix-backslash" contained +syn match tidyOption "^fix-bad-comments" contained +syn match tidyOption "^fix-uri" contained +syn match tidyOption "^force-output" contained +syn match tidyOption "^gnu-emacs" contained +syn match tidyOption "^gnu-emacs-file" contained +syn match tidyOption "^hide-comments" contained +syn match tidyOption "^hide-endtags" contained +syn match tidyOption "^indent" contained +syn match tidyOption "^indent-attributes" contained +syn match tidyOption "^indent-cdata" contained +syn match tidyOption "^indent-spaces" contained +syn match tidyOption "^input-encoding" contained +syn match tidyOption "^input-xml" contained +syn match tidyOption "^join-classes" contained +syn match tidyOption "^join-styles" contained +syn match tidyOption "^keep-time" contained +syn match tidyOption "^language" contained +syn match tidyOption "^literal-attributes" contained +syn match tidyOption "^logical-emphasis" contained +syn match tidyOption "^lower-literals" contained +syn match tidyOption "^markup" contained +syn match tidyOption "^merge-divs" contained +syn match tidyOption "^merge-spans" contained +syn match tidyOption "^ncr" contained +syn match tidyOption "^newline" contained +syn match tidyOption "^numeric-entities" contained +syn match tidyOption "^output-bom" contained +syn match tidyOption "^output-encoding" contained +syn match tidyOption "^output-file" contained +syn match tidyOption "^output-html" contained +syn match tidyOption "^output-xhtml" contained +syn match tidyOption "^output-xml" contained +syn match tidyOption "^preserve-entities" contained +syn match tidyOption "^punctuation-wrap" contained +syn match tidyOption "^quiet" contained +syn match tidyOption "^quote-ampersand" contained +syn match tidyOption "^quote-marks" contained +syn match tidyOption "^quote-nbsp" contained +syn match tidyOption "^raw" contained +syn match tidyOption "^repeated-attributes" contained +syn match tidyOption "^replace-color" contained +syn match tidyOption "^show-body-only" contained +syn match tidyOption "^show-errors" contained +syn match tidyOption "^show-warnings" contained +syn match tidyOption "^slide-style" contained +syn match tidyOption "^sort-attributes" contained +syn match tidyOption "^split" contained +syn match tidyOption "^tab-size" contained +syn match tidyOption "^tidy-mark" contained +syn match tidyOption "^uppercase-attributes" contained +syn match tidyOption "^uppercase-tags" contained +syn match tidyOption "^word-2000" contained +syn match tidyOption "^wrap" contained +syn match tidyOption "^wrap-asp" contained +syn match tidyOption "^wrap-attributes" contained +syn match tidyOption "^wrap-jste" contained +syn match tidyOption "^wrap-php" contained +syn match tidyOption "^wrap-script-literals" contained +syn match tidyOption "^wrap-sections" contained +syn match tidyOption "^write-back" contained +syn match tidyOption "^vertical-space" contained - HiLink tidyBoolean Boolean - HiLink tidyComment Comment - HiLink tidyDelimiter Special - HiLink tidyDoctype Constant - HiLink tidyEncoding Constant - HiLink tidyNewline Constant - HiLink tidyNewTagDelimiter Special - HiLink tidyNewTagOption Identifier - HiLink tidyNewTagValue Constant - HiLink tidyNumber Number - HiLink tidyOption Identifier - HiLink tidyRepeat Constant - HiLink tidyString String - HiLink tidyTodo Todo +syn match tidyNewTagOption "^new-blocklevel-tags" contained +syn match tidyNewTagOption "^new-empty-tags" contained +syn match tidyNewTagOption "^new-inline-tags" contained +syn match tidyNewTagOption "^new-pre-tags" contained - delcommand HiLink -endif +hi def link tidyBoolean Boolean +hi def link tidyComment Comment +hi def link tidyDelimiter Special +hi def link tidyDoctype Constant +hi def link tidyEncoding Constant +hi def link tidyNewline Constant +hi def link tidyNewTagDelimiter Special +hi def link tidyNewTagOption Identifier +hi def link tidyNewTagValue Constant +hi def link tidyNumber Number +hi def link tidyOption Identifier +hi def link tidyRepeat Constant +hi def link tidyString String +hi def link tidyTodo Todo let b:current_syntax = "tidy" diff --git a/runtime/syntax/tt2.vim b/runtime/syntax/tt2.vim new file mode 100644 index 0000000000..5321e277da --- /dev/null +++ b/runtime/syntax/tt2.vim @@ -0,0 +1,210 @@ +" Language: TT2 (Perl Template Toolkit) +" Maintainer: vim-perl +" Author: Moriki, Atsushi <4woods+vim@gmail.com> +" Homepage: http://github.com/vim-perl/vim-perl +" Bugs/requests: http://github.com/vim-perl/vim-perl/issues +" Last Change: 2013-07-21 +" +" Instration: +" put tt2.vim and tt2html.vim in to your syntax diretory. +" +" add below in your filetype.vim. +" au BufNewFile,BufRead *.tt2 setf tt2 +" or +" au BufNewFile,BufRead *.tt2 +" \ if ( getline(1) . getline(2) . getline(3) =~ '<\chtml' | +" \ && getline(1) . getline(2) . getline(3) !~ '<[%?]' ) | +" \ || getline(1) =~ '' +" "PHP" +" :let b:tt2_syn_tags = '' +" "TT2 and HTML" +" :let b:tt2_syn_tags = '\[% %] ' +" +" Changes: +" 0.1.3 +" Changed fileformat from 'dos' to 'unix' +" Deleted 'echo' that print obstructive message +" 0.1.2 +" Added block comment syntax +" e.g. [%# COMMENT +" COMMENT TOO %] +" [%# IT'S SAFE %] HERE IS OUTSIDE OF TT2 DIRECTIVE +" [% # WRONG!! %] HERE STILL BE COMMENT +" 0.1.1 +" Release +" 0.1.0 +" Internal +" +" License: follow Vim :help uganda +" + +if !exists("b:tt2_syn_tags") + let b:tt2_syn_tags = '\[% %]' + "let b:tt2_syn_tags = '\[% %] \[\* \*]' +endif + +if !exists("b:tt2_syn_inc_perl") + let b:tt2_syn_inc_perl = 1 +endif + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn case match + +syn cluster tt2_top_cluster contains=tt2_perlcode,tt2_tag_region + +" TT2 TAG Region +if exists("b:tt2_syn_tags") + + let s:str = b:tt2_syn_tags . ' ' + let s:str = substitute(s:str,'^ \+','','g') + let s:str = substitute(s:str,' \+',' ','g') + + while stridx(s:str,' ') > 0 + + let s:st = strpart(s:str,0,stridx(s:str,' ')) + let s:str = substitute(s:str,'[^ ]* ','',"") + + let s:ed = strpart(s:str,0,stridx(s:str,' ')) + let s:str = substitute(s:str,'[^ ]* ','',"") + + exec 'syn region tt2_tag_region '. + \ 'matchgroup=tt2_tag '. + \ 'start=+\(' . s:st .'\)[-]\=+ '. + \ 'end=+[-]\=\(' . s:ed . '\)+ '. + \ 'contains=@tt2_statement_cluster keepend extend' + + exec 'syn region tt2_commentblock_region '. + \ 'matchgroup=tt2_tag '. + \ 'start=+\(' . s:st .'\)[-]\=\(#\)\@=+ '. + \ 'end=+[-]\=\(' . s:ed . '\)+ '. + \ 'keepend extend' + + "Include Perl syntax when 'PERL' 'RAWPERL' block + if b:tt2_syn_inc_perl + syn include @Perl $VIMRUNTIME/syntax/perl.vim + exec 'syn region tt2_perlcode '. + \ 'start=+\(\(RAW\)\=PERL\s*[-]\=' . s:ed . '\(\n\)\=\)\@<=+ ' . + \ 'end=+' . s:st . '[-]\=\s*END+me=s-1 contains=@Perl keepend' + endif + + "echo 'TAGS ' . s:st . ' ' . s:ed + unlet s:st + unlet s:ed + endwhile + +else + + syn region tt2_tag_region + \ matchgroup=tt2_tag + \ start=+\(\[%\)[-]\=+ + \ end=+[-]\=%\]+ + \ contains=@tt2_statement_cluster keepend extend + + syn region tt2_commentblock_region + \ matchgroup=tt2_tag + \ start=+\(\[%\)[-]\=#+ + \ end=+[-]\=%\]+ + \ keepend extend + + "Include Perl syntax when 'PERL' 'RAWPERL' block + if b:tt2_syn_inc_perl + syn include @Perl $VIMRUNTIME/syntax/perl.vim + syn region tt2_perlcode + \ start=+\(\(RAW\)\=PERL\s*[-]\=%]\(\n\)\=\)\@<=+ + \ end=+\[%[-]\=\s*END+me=s-1 + \ contains=@Perl keepend + endif +endif + +" Directive +syn keyword tt2_directive contained + \ GET CALL SET DEFAULT DEBUG + \ LAST NEXT BREAK STOP BLOCK + \ IF IN UNLESS ELSIF FOR FOREACH WHILE SWITCH CASE + \ USE PLUGIN MACRO META + \ TRY FINAL RETURN LAST + \ CLEAR TO STEP AND OR NOT MOD DIV + \ ELSE PERL RAWPERL END +syn match tt2_directive +|+ contained +syn keyword tt2_directive contained nextgroup=tt2_string_q,tt2_string_qq,tt2_blockname skipwhite skipempty + \ INSERT INCLUDE PROCESS WRAPPER FILTER + \ THROW CATCH +syn keyword tt2_directive contained nextgroup=tt2_def_tag skipwhite skipempty + \ TAGS + +syn match tt2_def_tag "\S\+\s\+\S\+\|\<\w\+\>" contained + +syn match tt2_variable +\I\w*+ contained +syn match tt2_operator "[+*/%:?-]" contained +syn match tt2_operator "\<\(mod\|div\|or\|and\|not\)\>" contained +syn match tt2_operator "[!=<>]=\=\|&&\|||" contained +syn match tt2_operator "\(\s\)\@<=_\(\s\)\@=" contained +syn match tt2_operator "=>\|," contained +syn match tt2_deref "\([[:alnum:]_)\]}]\s*\)\@<=\." contained +syn match tt2_comment +#.*$+ contained extend +syn match tt2_func +\<\I\w*\(\s*(\)\@=+ contained nextgroup=tt2_bracket_r skipempty skipwhite +" +syn region tt2_bracket_r start=+(+ end=+)+ contained contains=@tt2_statement_cluster keepend extend +syn region tt2_bracket_b start=+\[+ end=+]+ contained contains=@tt2_statement_cluster keepend extend +syn region tt2_bracket_b start=+{+ end=+}+ contained contains=@tt2_statement_cluster keepend extend + +syn region tt2_string_qq start=+"+ end=+"+ skip=+\\"+ contained contains=tt2_ivariable keepend extend +syn region tt2_string_q start=+'+ end=+'+ skip=+\\'+ contained keepend extend + +syn match tt2_ivariable +\$\I\w*\>\(\.\I\w*\>\)*+ contained +syn match tt2_ivariable +\${\I\w*\>\(\.\I\w*\>\)*}+ contained + +syn match tt2_number "\d\+" contained +syn match tt2_number "\d\+\.\d\+" contained +syn match tt2_number "0x\x\+" contained +syn match tt2_number "0\o\+" contained + +syn match tt2_blockname "\f\+" contained nextgroup=tt2_blockname_joint skipwhite skipempty +syn match tt2_blockname "$\w\+" contained contains=tt2_ivariable nextgroup=tt2_blockname_joint skipwhite skipempty +syn region tt2_blockname start=+"+ end=+"+ skip=+\\"+ contained contains=tt2_ivariable nextgroup=tt2_blockname_joint keepend skipwhite skipempty +syn region tt2_blockname start=+'+ end=+'+ skip=+\\'+ contained nextgroup=tt2_blockname_joint keepend skipwhite skipempty +syn match tt2_blockname_joint "+" contained nextgroup=tt2_blockname skipwhite skipempty + +syn cluster tt2_statement_cluster contains=tt2_directive,tt2_variable,tt2_operator,tt2_string_q,tt2_string_qq,tt2_deref,tt2_comment,tt2_func,tt2_bracket_b,tt2_bracket_r,tt2_number + +" Synchronizing +syn sync minlines=50 + +hi def link tt2_tag Type +hi def link tt2_tag_region Type +hi def link tt2_commentblock_region Comment +hi def link tt2_directive Statement +hi def link tt2_variable Identifier +hi def link tt2_ivariable Identifier +hi def link tt2_operator Statement +hi def link tt2_string_qq String +hi def link tt2_string_q String +hi def link tt2_blockname String +hi def link tt2_comment Comment +hi def link tt2_func Function +hi def link tt2_number Number + +if exists("b:tt2_syn_tags") + unlet b:tt2_syn_tags +endif + +let b:current_syntax = "tt2" + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim:ts=4:sw=4 diff --git a/runtime/syntax/tt2html.vim b/runtime/syntax/tt2html.vim new file mode 100644 index 0000000000..ac5744f39d --- /dev/null +++ b/runtime/syntax/tt2html.vim @@ -0,0 +1,20 @@ +" Language: TT2 embedded with HTML +" Maintainer: vim-perl +" Author: Moriki, Atsushi <4woods+vim@gmail.com> +" Homepage: http://github.com/vim-perl/vim-perl +" Bugs/requests: http://github.com/vim-perl/vim-perl/issues +" Last Change: 2013-07-21 + +if exists("b:current_syntax") + finish +endif + +runtime! syntax/html.vim +unlet b:current_syntax + +runtime! syntax/tt2.vim +unlet b:current_syntax + +syn cluster htmlPreProc add=@tt2_top_cluster + +let b:current_syntax = "tt2html" diff --git a/runtime/syntax/tt2js.vim b/runtime/syntax/tt2js.vim new file mode 100644 index 0000000000..350df57d4c --- /dev/null +++ b/runtime/syntax/tt2js.vim @@ -0,0 +1,20 @@ +" Language: TT2 embedded with Javascript +" Maintainer: Andy Lester +" Author: Yates, Peter +" Homepage: http://github.com/vim-perl/vim-perl +" Bugs/requests: http://github.com/vim-perl/vim-perl/issues +" Last Change: 2013-07-21 + +if exists("b:current_syntax") + finish +endif + +runtime! syntax/javascript.vim +unlet b:current_syntax + +runtime! syntax/tt2.vim +unlet b:current_syntax + +syn cluster javascriptPreProc add=@tt2_top_cluster + +let b:current_syntax = "tt2js" diff --git a/runtime/syntax/uil.vim b/runtime/syntax/uil.vim index 87de427c38..b5421bcfdb 100644 --- a/runtime/syntax/uil.vim +++ b/runtime/syntax/uil.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: Motif UIL (User Interface Language) " Maintainer: Thomas Koehler -" Last Change: 2012 May 14 +" Last Change: 2013 May 23 " URL: http://gott-gehabt.de/800_wer_wir_sind/thomas/Homepage/Computer/vim/syntax/uil.vim " Quit when a syntax file was already loaded @@ -25,11 +25,11 @@ syn keyword uilTodo contained TODO syn match uilSpecial contained "\\\d\d\d\|\\." syn region uilString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell,uilSpecial syn match uilCharacter "'[^\\]'" -syn region uilString start=+'+ skip=+\\\\\|\\"+ end=+'+ contains=@Spell,uilSpecial +syn region uilString start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@Spell,uilSpecial syn match uilSpecialCharacter "'\\.'" -syn match uilSpecialStatement "Xm[^ =(){}]*" +syn match uilSpecialStatement "Xm[^ =(){}:;]*" syn match uilSpecialFunction "MrmNcreateCallback" -syn match uilRessource "XmN[^ =(){}]*" +syn match uilRessource "XmN[^ =(){}:;]*" syn match uilNumber "-\=\<\d*\.\=\d\+\(e\=f\=\|[uU]\=[lL]\=\)\>" syn match uilNumber "0[xX]\x\+\>" diff --git a/runtime/syntax/upstreamdat.vim b/runtime/syntax/upstreamdat.vim new file mode 100644 index 0000000000..7be806730d --- /dev/null +++ b/runtime/syntax/upstreamdat.vim @@ -0,0 +1,296 @@ +" Vim syntax file +" Language: Innovation Data Processing upstream.dat file +" Maintainer: Rob Owens +" Latest Revision: 2013-06-17 + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn keyword upstreamdat_Parameter ACCEPTPCREMOTE +syn keyword upstreamdat_Parameter ACCEPTREMOTE +syn keyword upstreamdat_Parameter ACTION +syn keyword upstreamdat_Parameter ACTIVATEONENTRY +syn keyword upstreamdat_Parameter ARCHIVEBIT +syn keyword upstreamdat_Parameter ARCHIVEBIT +syn keyword upstreamdat_Parameter ASCTOEBC +syn keyword upstreamdat_Parameter ASRBACKUP +syn keyword upstreamdat_Parameter ATTENDED +syn keyword upstreamdat_Parameter AUTHORITATIVE +syn keyword upstreamdat_Parameter AUTHORITATIVERESTORE +syn keyword upstreamdat_Parameter AUTHORITATIVERESTORE +syn keyword upstreamdat_Parameter BACKUPPROFILE +syn keyword upstreamdat_Parameter BACKUPPROFILE2 +syn keyword upstreamdat_Parameter BACKUPREPARSEFILES +syn keyword upstreamdat_Parameter BACKUPREPARSEFILES +syn keyword upstreamdat_Parameter BACKUPVERIFY +syn keyword upstreamdat_Parameter BLANKTRUNC +syn keyword upstreamdat_Parameter CALCDASDSIZE +syn keyword upstreamdat_Parameter CHANGEDIRATTRIBS +syn keyword upstreamdat_Parameter CHANGEDIRATTRIBS +syn keyword upstreamdat_Parameter COMPRESSLEVEL +syn keyword upstreamdat_Parameter CONTROLFILE +syn keyword upstreamdat_Parameter DASDOVERRIDE +syn keyword upstreamdat_Parameter DATELIMIT +syn keyword upstreamdat_Parameter DATELIMIT +syn keyword upstreamdat_Parameter DAYSOLD +syn keyword upstreamdat_Parameter DAYSOLD +syn keyword upstreamdat_Parameter DELETED +syn keyword upstreamdat_Parameter DELETED +syn keyword upstreamdat_Parameter DELETEPROMPTS +syn keyword upstreamdat_Parameter DELETEPROMPTS +syn keyword upstreamdat_Parameter DESTINATION +syn keyword upstreamdat_Parameter DESTINATION +syn keyword upstreamdat_Parameter DIRDELETE +syn keyword upstreamdat_Parameter DIRECTORVMC +syn keyword upstreamdat_Parameter DIRONLYRESTOREOK +syn keyword upstreamdat_Parameter DIRSONLY +syn keyword upstreamdat_Parameter DIRSONLY +syn keyword upstreamdat_Parameter DISASTERRECOVERY +syn keyword upstreamdat_Parameter DISPLAY +syn keyword upstreamdat_Parameter DRIVEALIAS +syn keyword upstreamdat_Parameter DRIVEALIAS +syn keyword upstreamdat_Parameter DUALCOPY +syn keyword upstreamdat_Parameter DUPDAYS +syn keyword upstreamdat_Parameter DUPLICATE +syn keyword upstreamdat_Parameter EBCTOASC +syn keyword upstreamdat_Parameter ENCRYPT +syn keyword upstreamdat_Parameter ENCRYPTLEVEL +syn keyword upstreamdat_Parameter EXCLUDELISTNAME +syn keyword upstreamdat_Parameter FAILBACKUPONERROR +syn keyword upstreamdat_Parameter FAILBACKUPONERROR +syn keyword upstreamdat_Parameter FAILIFNOFILES +syn keyword upstreamdat_Parameter FAILIFNOFILES +syn keyword upstreamdat_Parameter FAILIFSKIP +syn keyword upstreamdat_Parameter FAILJOB +syn keyword upstreamdat_Parameter FAILRESTOREONERROR +syn keyword upstreamdat_Parameter FAILRESTOREONERROR +syn keyword upstreamdat_Parameter FILEDATE +syn keyword upstreamdat_Parameter FILEDATE +syn keyword upstreamdat_Parameter FILEDELETE +syn keyword upstreamdat_Parameter FILEDELETE +syn keyword upstreamdat_Parameter FILES +syn keyword upstreamdat_Parameter FILES +syn keyword upstreamdat_Parameter FILESOPENFORUPDAT +syn keyword upstreamdat_Parameter FILESOPENFORUPDAT +syn keyword upstreamdat_Parameter FILETRANSFER +syn keyword upstreamdat_Parameter GETREMOTEFILES +syn keyword upstreamdat_Parameter HARDLINKDB +syn keyword upstreamdat_Parameter HARDLINKS +syn keyword upstreamdat_Parameter HARDLINKS +syn keyword upstreamdat_Parameter HIDDENFILES +syn keyword upstreamdat_Parameter HIDDENFILES +syn keyword upstreamdat_Parameter HOLDTAPE +syn keyword upstreamdat_Parameter HOLDUSERDIRS +syn keyword upstreamdat_Parameter HOSTFILENAME +syn keyword upstreamdat_Parameter HOSTRECORD +syn keyword upstreamdat_Parameter HOSTSORT +syn keyword upstreamdat_Parameter IGNOREPLUGINSFORRESTORE +syn keyword upstreamdat_Parameter INCRDB +syn keyword upstreamdat_Parameter INCRDBARCHIVEBIT +syn keyword upstreamdat_Parameter INCRDBDELETEDFILES +syn keyword upstreamdat_Parameter INCREMENTAL +syn keyword upstreamdat_Parameter INCREMENTAL +syn keyword upstreamdat_Parameter INQOPTIONS +syn keyword upstreamdat_Parameter INSTALLWIN2KAGENT +syn keyword upstreamdat_Parameter INSTALLWIN2KAGENT +syn keyword upstreamdat_Parameter JOBOPTIONS +syn keyword upstreamdat_Parameter JOBRETURNCODEMAP +syn keyword upstreamdat_Parameter JOBWAITTIMELIMIT +syn keyword upstreamdat_Parameter KEEPALIVE +syn keyword upstreamdat_Parameter LANINTERFACE +syn keyword upstreamdat_Parameter LANWSNAME +syn keyword upstreamdat_Parameter LANWSPASSWORD +syn keyword upstreamdat_Parameter LASTACCESS +syn keyword upstreamdat_Parameter LASTACCESS +syn keyword upstreamdat_Parameter LATESTDATE +syn keyword upstreamdat_Parameter LATESTDATE +syn keyword upstreamdat_Parameter LATESTTIME +syn keyword upstreamdat_Parameter LATESTTIME +syn keyword upstreamdat_Parameter LATESTVERSION +syn keyword upstreamdat_Parameter LINEBLOCK +syn keyword upstreamdat_Parameter LINETRUNC +syn keyword upstreamdat_Parameter LISTENFORREMOTE +syn keyword upstreamdat_Parameter LOCALBACKUP +syn keyword upstreamdat_Parameter LOCALBACKUPDIR +syn keyword upstreamdat_Parameter LOCALBACKUPMAX +syn keyword upstreamdat_Parameter LOCALBACKUPMAXFILESIZE +syn keyword upstreamdat_Parameter LOCALBACKUPMAXSIZE +syn keyword upstreamdat_Parameter LOCALEXCLUDEFILE +syn keyword upstreamdat_Parameter LOCALPARAMETERS +syn keyword upstreamdat_Parameter LOCALPASSWORD +syn keyword upstreamdat_Parameter LOCALRESTORE +syn keyword upstreamdat_Parameter LOCALUSER +syn keyword upstreamdat_Parameter LOFS +syn keyword upstreamdat_Parameter LOGNONFATAL +syn keyword upstreamdat_Parameter MAXBACKUPFILESFAIL +syn keyword upstreamdat_Parameter MAXBACKUPTIME +syn keyword upstreamdat_Parameter MAXDUPS +syn keyword upstreamdat_Parameter MAXFILENAMESIZE +syn keyword upstreamdat_Parameter MAXKFILESIZE +syn keyword upstreamdat_Parameter MAXLOGDAYS +syn keyword upstreamdat_Parameter MAXRESTOREFILESFAIL +syn keyword upstreamdat_Parameter MAXRESTORETIME +syn keyword upstreamdat_Parameter MAXRETRY +syn keyword upstreamdat_Parameter MAXRPTDAYS +syn keyword upstreamdat_Parameter MERGE +syn keyword upstreamdat_Parameter MIGRBITS +syn keyword upstreamdat_Parameter MIGRBITS +syn keyword upstreamdat_Parameter MINCOMPRESSSIZE +syn keyword upstreamdat_Parameter MINIMIZE +syn keyword upstreamdat_Parameter MODIFYFILE +syn keyword upstreamdat_Parameter MOUNTPOINTS +syn keyword upstreamdat_Parameter MOUNTPOINTS +syn keyword upstreamdat_Parameter NDS +syn keyword upstreamdat_Parameter NDS +syn keyword upstreamdat_Parameter NEWFILECOMPARE +syn keyword upstreamdat_Parameter NFSBELOW +syn keyword upstreamdat_Parameter NODATAOK +syn keyword upstreamdat_Parameter NODIRFORINCREMENTAL +syn keyword upstreamdat_Parameter NODIRFORINCREMENTAL +syn keyword upstreamdat_Parameter NONFILEDATABITMAP +syn keyword upstreamdat_Parameter NONFILEDATABITMAP +syn keyword upstreamdat_Parameter NOPOINTRESTORE +syn keyword upstreamdat_Parameter NOSPECINHERITANCE +syn keyword upstreamdat_Parameter NOTIFYEVENTS +syn keyword upstreamdat_Parameter NOTIFYFAILUREATTACHMENT +syn keyword upstreamdat_Parameter NOTIFYSUCCESSATTACHMENT +syn keyword upstreamdat_Parameter NOTIFYTARGETS +syn keyword upstreamdat_Parameter NOUIDGIDNAMES +syn keyword upstreamdat_Parameter NOUIDGIDNAMES +syn keyword upstreamdat_Parameter NOVELLMIGRATE +syn keyword upstreamdat_Parameter NOVELLMIGRATE +syn keyword upstreamdat_Parameter NOVELLMIGRATEADDEXT +syn keyword upstreamdat_Parameter NOVELLMIGRATEADDEXT +syn keyword upstreamdat_Parameter NOVELLPROFILE +syn keyword upstreamdat_Parameter NOVELLRECALL +syn keyword upstreamdat_Parameter NTFSADDPERMISSION +syn keyword upstreamdat_Parameter NTFSADDPERMISSION +syn keyword upstreamdat_Parameter NTREGRESTORE +syn keyword upstreamdat_Parameter OSTYPE +syn keyword upstreamdat_Parameter OUTPORT +syn keyword upstreamdat_Parameter PACKFLUSHAFTERFILE +syn keyword upstreamdat_Parameter PACKRECSIZE +syn keyword upstreamdat_Parameter PARAMETER +syn keyword upstreamdat_Parameter PASSWORD +syn keyword upstreamdat_Parameter PATHNAME +syn keyword upstreamdat_Parameter PATHNAME +syn keyword upstreamdat_Parameter PERFORMBITMAP +syn keyword upstreamdat_Parameter PERFORMNUMRECORDS +syn keyword upstreamdat_Parameter PERFORMRECORDSIZE +syn keyword upstreamdat_Parameter PLUGIN +syn keyword upstreamdat_Parameter PLUGIN +syn keyword upstreamdat_Parameter PLUGINPARAMETERS +syn keyword upstreamdat_Parameter PLUGINPARAMETERS +syn keyword upstreamdat_Parameter POSTJOB +syn keyword upstreamdat_Parameter PREJOB +syn keyword upstreamdat_Parameter PRTYCLASS +syn keyword upstreamdat_Parameter PRTYLEVEL +syn keyword upstreamdat_Parameter RECALLCLEANUP +syn keyword upstreamdat_Parameter RECALLOFFLINEFILES +syn keyword upstreamdat_Parameter RECALLOFFLINEFILES +syn keyword upstreamdat_Parameter RECORDSIZE +syn keyword upstreamdat_Parameter REMOTEADDR +syn keyword upstreamdat_Parameter REMOTEAPPLPREF +syn keyword upstreamdat_Parameter REMOTEAPPLRETRY +syn keyword upstreamdat_Parameter REMOTECONNECTTYPE +syn keyword upstreamdat_Parameter REMOTEFLAGS +syn keyword upstreamdat_Parameter REMOTEIPADAPTER +syn keyword upstreamdat_Parameter REMOTELOCALPARAMETERS +syn keyword upstreamdat_Parameter REMOTELOGMODE +syn keyword upstreamdat_Parameter REMOTELUNAME +syn keyword upstreamdat_Parameter REMOTEMAXRETRIES +syn keyword upstreamdat_Parameter REMOTEMODENAME +syn keyword upstreamdat_Parameter REMOTEPARAMETERFILE +syn keyword upstreamdat_Parameter REMOTEPORT +syn keyword upstreamdat_Parameter REMOTEREQUEST +syn keyword upstreamdat_Parameter REMOTERESTART +syn keyword upstreamdat_Parameter REMOTEROUTE +syn keyword upstreamdat_Parameter REMOTETARGETNAME +syn keyword upstreamdat_Parameter REMOTETCP +syn keyword upstreamdat_Parameter REMOTETIMEOUT +syn keyword upstreamdat_Parameter REMOTETMAXRETRY +syn keyword upstreamdat_Parameter REMOTETPN +syn keyword upstreamdat_Parameter REMOTEUSAPPL +syn keyword upstreamdat_Parameter REMOTEVERIFY +syn keyword upstreamdat_Parameter REMOTEWTOCOMP +syn keyword upstreamdat_Parameter REPORTNAME +syn keyword upstreamdat_Parameter REPORTOPTIONS +syn keyword upstreamdat_Parameter RESTARTLASTFILE +syn keyword upstreamdat_Parameter RESTART +syn keyword upstreamdat_Parameter RESTARTTYPE +syn keyword upstreamdat_Parameter RESTARTVERSIONDATE +syn keyword upstreamdat_Parameter RESTOREARCHIVEBIT +syn keyword upstreamdat_Parameter RESTORECHECKPOINT +syn keyword upstreamdat_Parameter RESTOREDATELIMIT +syn keyword upstreamdat_Parameter RESTOREDATELIMIT +syn keyword upstreamdat_Parameter RESTOREFILEFAIL +syn keyword upstreamdat_Parameter RESTOREMOUNTPOINTS +syn keyword upstreamdat_Parameter RESTOREMOUNTPOINTS +syn keyword upstreamdat_Parameter RESTORESEGMENTS +syn keyword upstreamdat_Parameter RESTORESEGMENTS +syn keyword upstreamdat_Parameter RESTORETODIFFFS +syn keyword upstreamdat_Parameter RETAIN +syn keyword upstreamdat_Parameter RETAIN +syn keyword upstreamdat_Parameter ROOTENTRY +syn keyword upstreamdat_Parameter ROOTENTRY +syn keyword upstreamdat_Parameter SAN +syn keyword upstreamdat_Parameter SCHEDULENAME +syn keyword upstreamdat_Parameter SEGMENTEDFILESIZE +syn keyword upstreamdat_Parameter SEGMENTEDFILESIZE +syn keyword upstreamdat_Parameter SEGMENTSIZE +syn keyword upstreamdat_Parameter SEGMENTSIZE +syn keyword upstreamdat_Parameter SENDHOSTDETAILS +syn keyword upstreamdat_Parameter SINGLEFS +syn keyword upstreamdat_Parameter SIZETRC +syn keyword upstreamdat_Parameter SKIP +syn keyword upstreamdat_Parameter SKIPBACKUPSCAN +syn keyword upstreamdat_Parameter SKIPOLD +syn keyword upstreamdat_Parameter SKIPOLD +syn keyword upstreamdat_Parameter SMSTARGETSERVICENAME +syn keyword upstreamdat_Parameter SMSTSA +syn keyword upstreamdat_Parameter SOLO +syn keyword upstreamdat_Parameter SORTBACKUP +syn keyword upstreamdat_Parameter SOSDISK +syn keyword upstreamdat_Parameter SOSDISK +syn keyword upstreamdat_Parameter SOSTIMESTAMP +syn keyword upstreamdat_Parameter SOSTIMESTAMP +syn keyword upstreamdat_Parameter SOSTIMESTAMPPATH +syn keyword upstreamdat_Parameter SOSTIMESTAMPPATH +syn keyword upstreamdat_Parameter SPECNUMBER +syn keyword upstreamdat_Parameter SPECNUMBER +syn keyword upstreamdat_Parameter SPECTYPE +syn keyword upstreamdat_Parameter SPECTYPE +syn keyword upstreamdat_Parameter STARTTIME +syn keyword upstreamdat_Parameter STORAGETYPE +syn keyword upstreamdat_Parameter SUBDIRECTORIES +syn keyword upstreamdat_Parameter SUBDIRECTORIES +syn keyword upstreamdat_Parameter SWITCHTOTAPEMB +syn keyword upstreamdat_Parameter TCPADDRESS +syn keyword upstreamdat_Parameter TCPTIMEOUT +syn keyword upstreamdat_Parameter TIMEOVERRIDE +syn keyword upstreamdat_Parameter TRACE +syn keyword upstreamdat_Parameter TRANSLATE +syn keyword upstreamdat_Parameter ULTRACOMP +syn keyword upstreamdat_Parameter ULTREG +syn keyword upstreamdat_Parameter ULTUPD +syn keyword upstreamdat_Parameter UNCMACHINEALIAS +syn keyword upstreamdat_Parameter UNCMACHINEALIAS +syn keyword upstreamdat_Parameter USEALEBRA +syn keyword upstreamdat_Parameter USECONTROLFILE +syn keyword upstreamdat_Parameter USEGID +syn keyword upstreamdat_Parameter USERID +syn keyword upstreamdat_Parameter USEUID +syn keyword upstreamdat_Parameter USNOUIDGIDERRORS +syn keyword upstreamdat_Parameter UTF8 +syn keyword upstreamdat_Parameter VAULTNUMBER +syn keyword upstreamdat_Parameter VERSIONDATE +syn keyword upstreamdat_Parameter WRITESPARSE +syn keyword upstreamdat_Parameter XFERECORDSIZE +syn keyword upstreamdat_Parameter XFERRECSEP +syn keyword upstreamdat_Parameter XFERRECUSECR + +hi def link upstreamdat_Parameter Type + +let b:current_syntax = "upstreamdat" diff --git a/runtime/syntax/upstreaminstalllog.vim b/runtime/syntax/upstreaminstalllog.vim new file mode 100644 index 0000000000..fb23fdcca0 --- /dev/null +++ b/runtime/syntax/upstreaminstalllog.vim @@ -0,0 +1,27 @@ +" Vim syntax file +" Language: Innovation Data Processing UPSTREAMInstall.log file +" Maintainer: Rob Owens +" Latest Revision: 2013-06-17 + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" Date: +syn match upstreaminstalllog_Date /\u\l\l \u\l\l\s\{1,2}\d\{1,2} \d\d:\d\d:\d\d \d\d\d\d/ +" Msg Types: +syn match upstreaminstalllog_MsgD /Msg #MSI\d\{4,5}D/ +syn match upstreaminstalllog_MsgE /Msg #MSI\d\{4,5}E/ +syn match upstreaminstalllog_MsgI /Msg #MSI\d\{4,5}I/ +syn match upstreaminstalllog_MsgW /Msg #MSI\d\{4,5}W/ +" IP Address: +syn match upstreaminstalllog_IPaddr / \d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}/ + +hi def link upstreaminstalllog_Date Underlined +hi def link upstreaminstalllog_MsgD Type +hi def link upstreaminstalllog_MsgE Error +hi def link upstreaminstalllog_MsgW Constant +hi def link upstreaminstalllog_IPaddr Identifier + +let b:current_syntax = "upstreaminstalllog" diff --git a/runtime/syntax/upstreamlog.vim b/runtime/syntax/upstreamlog.vim new file mode 100644 index 0000000000..1161ecfcbe --- /dev/null +++ b/runtime/syntax/upstreamlog.vim @@ -0,0 +1,53 @@ +" Vim syntax file +" Language: Innovation Data Processing upstream.log file +" Maintainer: Rob Owens +" Latest Revision: 2013-07-26 + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" Date: +syn match upstreamlog_Date /\u\l\l \u\l\l\s\{1,2}\d\{1,2} \d\d:\d\d:\d\d \d\d\d\d/ +" Msg Types: +syn match upstreamlog_MsgD /Msg #\(Agt\|PC\|Srv\)\d\{4,5}D/ nextgroup=upstreamlog_Process skipwhite +syn match upstreamlog_MsgE /Msg #\(Agt\|PC\|Srv\)\d\{4,5}E/ nextgroup=upstreamlog_Process skipwhite +syn match upstreamlog_MsgI /Msg #\(Agt\|PC\|Srv\)\d\{4,5}I/ nextgroup=upstreamlog_Process skipwhite +syn match upstreamlog_MsgW /Msg #\(Agt\|PC\|Srv\)\d\{4,5}W/ nextgroup=upstreamlog_Process skipwhite +" Processes: +syn region upstreamlog_Process start="(" end=")" contained +" IP Address: +syn match upstreamlog_IPaddr /\( \|(\)\zs\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}/ +" Profile: +syn match upstreamlog_Profile /Using default configuration for profile \zs\S\{1,8}\ze/ +syn match upstreamlog_Profile /Now running profile \zs\S\{1,8}\ze/ +syn match upstreamlog_Profile /in profile set \zs\S\{1,8}\ze/ +syn match upstreamlog_Profile /Migrate disk backup from profile \zs\S\{1,8}\ze/ +syn match upstreamlog_Profile /Profileset=\zs\S\{1,8}\ze,/ +syn match upstreamlog_Profile /Vault \(disk\|tape\) backup to vault \d\{1,4} from profile \zs\S\{1,8}\ze/ +syn match upstreamlog_Profile /Profile name \zs\"\S\{1,8}\"/ +syn match upstreamlog_Profile / Profile: \zs\S\{1,8}/ +syn match upstreamlog_Profile / Profile: \zs\S\{1,8}\ze, / +syn match upstreamlog_Profile /, profile: \zs\S\{1,8}\ze,/ +syn match upstreamlog_Profile /found Profile: \zs\S\{1,8}\ze,/ +syn match upstreamlog_Profile /Backup Profile: \zs\ze Version date/ +syn match upstreamlog_Profile /Full of \zs\S\{1,8}\ze$/ +syn match upstreamlog_Profile /Incr. of \zs\S\{1,8}\ze$/ +syn match upstreamlog_Profile /Profile=\zs\S\{1,8}\ze,/ +" Target: +syn region upstreamlog_Target start="Computer: \zs" end="\ze[\]\)]" +syn region upstreamlog_Target start="Computer name \zs" end="\ze," +syn region upstreamlog_Target start="request to registered name \zs" end=" " + + +hi def link upstreamlog_Date Underlined +hi def link upstreamlog_MsgD Type +hi def link upstreamlog_MsgE Error +hi def link upstreamlog_MsgW Constant +hi def link upstreamlog_Process Statement +hi def link upstreamlog_IPaddr Identifier +hi def link upstreamlog_Profile Identifier +hi def link upstreamlog_Target Identifier + +let b:current_syntax = "upstreamlog" diff --git a/runtime/syntax/usserverlog.vim b/runtime/syntax/usserverlog.vim new file mode 100644 index 0000000000..7cd50b3287 --- /dev/null +++ b/runtime/syntax/usserverlog.vim @@ -0,0 +1,59 @@ +" Vim syntax file +" Language: Innovation Data Processing usserver.log file +" Maintainer: Rob Owens +" Latest Revision: 2013-07-26 + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" Date: +syn match usserverlog_Date /\u\l\l \u\l\l\s\{1,2}\d\{1,2} \d\d:\d\d:\d\d \d\d\d\d/ +" Msg Types: +syn match usserverlog_MsgD /Msg #\(Agt\|PC\|Srv\)\d\{4,5}D/ nextgroup=usserverlog_Process skipwhite +syn match usserverlog_MsgE /Msg #\(Agt\|PC\|Srv\)\d\{4,5}E/ nextgroup=usserverlog_Process skipwhite +syn match usserverlog_MsgI /Msg #\(Agt\|PC\|Srv\)\d\{4,5}I/ nextgroup=usserverlog_Process skipwhite +syn match usserverlog_MsgW /Msg #\(Agt\|PC\|Srv\)\d\{4,5}W/ nextgroup=usserverlog_Process skipwhite +" Processes: +syn region usserverlog_Process start="(" end=")" contained +" IP Address: +syn match usserverlog_IPaddr /\( \|(\)\zs\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}/ +" Profile: +syn match usserverlog_Profile /Using default configuration for profile \zs\S\{1,8}\ze/ +syn match usserverlog_Profile /Now running profile \zs\S\{1,8}\ze/ +syn match usserverlog_Profile /in profile set \zs\S\{1,8}\ze/ +syn match usserverlog_Profile /Migrate disk backup from profile \zs\S\{1,8}\ze/ +syn match usserverlog_Profile /Using profile prefix for profile \zs\S\{1,8}\ze/ +syn match usserverlog_Profile /Add\/update profile \zs\S\{1,8}\ze/ +syn match usserverlog_Profile /Profileset=\zs\S\{1,8}\ze,/ +syn match usserverlog_Profile /profileset=\zs\S\{1,8}\ze/ +syn match usserverlog_Profile /Vault \(disk\|tape\) backup to vault \d\{1,4} from profile \zs\S\{1,8}\ze/ +syn match usserverlog_Profile /Profile name \zs\"\S\{1,8}\"/ +syn match usserverlog_Profile / Profile: \zs\S\{1,8}/ +syn match usserverlog_Profile / Profile: \zs\S\{1,8}\ze, / +syn match usserverlog_Profile /, profile: \zs\S\{1,8}\ze,/ +syn match usserverlog_Profile /Expecting Profile: \zs\S\{1,8}\ze,/ +syn match usserverlog_Profile /found Profile: \zs\S\{1,8}\ze,/ +syn match usserverlog_Profile /Profile \zs\S\{1,8} \zeis a member of group: / +syn match usserverlog_Profile /Backup Profile: \zs\ze Version date/ +syn match usserverlog_Profile /Full of \zs\S\{1,8}\ze$/ +syn match usserverlog_Profile /Incr. of \zs\S\{1,8}\ze$/ +syn match usserverlog_Profile /Profile=\zs\S\{1,8}\ze,/ +" Target: +syn region usserverlog_Target start="Computer: \zs" end="\ze[\]\)]" +syn region usserverlog_Target start="Computer name \zs" end="\ze," +syn region usserverlog_Target start="Registration add request successful \zs" end="$" +syn region usserverlog_Target start="request to registered name \zs" end=" " +syn region usserverlog_Target start=", sending to \zs" end="$" + +hi def link usserverlog_Date Underlined +hi def link usserverlog_MsgD Type +hi def link usserverlog_MsgE Error +hi def link usserverlog_MsgW Constant +hi def link usserverlog_Process Statement +hi def link usserverlog_IPaddr Identifier +hi def link usserverlog_Profile Identifier +hi def link usserverlog_Target Identifier + +let b:current_syntax = "usserverlog" diff --git a/runtime/syntax/usw2kagtlog.vim b/runtime/syntax/usw2kagtlog.vim new file mode 100644 index 0000000000..9315731343 --- /dev/null +++ b/runtime/syntax/usw2kagtlog.vim @@ -0,0 +1,49 @@ +" Vim syntax file +" Language: Innovation Data Processing USW2KAgt.log file +" Maintainer: Rob Owens +" Latest Revision: 2013-07-26 + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" Date: +syn match usw2kagtlog_Date /\u\l\l \u\l\l\s\{1,2}\d\{1,2} \d\d:\d\d:\d\d \d\d\d\d/ +" Msg Types: +syn match usw2kagtlog_MsgD /Msg #\(Agt\|PC\|Srv\)\d\{4,5}D/ nextgroup=usw2kagtlog_Process skipwhite +syn match usw2kagtlog_MsgE /Msg #\(Agt\|PC\|Srv\)\d\{4,5}E/ nextgroup=usw2kagtlog_Process skipwhite +syn match usw2kagtlog_MsgI /Msg #\(Agt\|PC\|Srv\)\d\{4,5}I/ nextgroup=usw2kagtlog_Process skipwhite +syn match usw2kagtlog_MsgW /Msg #\(Agt\|PC\|Srv\)\d\{4,5}W/ nextgroup=usw2kagtlog_Process skipwhite +" Processes: +syn region usw2kagtlog_Process start="(" end=")" contained +syn region usw2kagtlog_Process start="Starting the processing for a \zs\"" end="\ze client request" +syn region usw2kagtlog_Process start="Ending the processing for a \zs\"" end="\ze client request" +" IP Address: +syn match usw2kagtlog_IPaddr / \d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}/ +" Profile: + +syn match usw2kagtlog_Profile /Profile name \zs\"\S\{1,8}\"/ +syn match usw2kagtlog_Profile / Profile: \zs\S\{1,8}/ +syn match usw2kagtlog_Profile / Profile: \zs\S\{1,8}\ze, / +syn match usw2kagtlog_Profile /Backup Profile: \zs\ze Version date/ +syn match usw2kagtlog_Profile /Full of \zs\S\{1,8}\ze$/ +syn match usw2kagtlog_Profile /Incr. of \zs\S\{1,8}\ze$/ +syn match usw2kagtlog_Profile /profile name "\zs\S\{1,8}\ze"/ +" Target: +syn region usw2kagtlog_Target start="Computer: \zs" end="\ze[\]\)]" +syn region usw2kagtlog_Target start="Computer name \zs" end="\ze," +" Agent Keywords: +syn keyword usw2kagtlog_Agentword opened closed + +hi def link usw2kagtlog_Date Underlined +hi def link usw2kagtlog_MsgD Type +hi def link usw2kagtlog_MsgE Error +hi def link usw2kagtlog_MsgW Constant +hi def link usw2kagtlog_Process Statement +hi def link usw2kagtlog_IPaddr Identifier +hi def link usw2kagtlog_Profile Identifier +hi def link usw2kagtlog_Target Identifier +hi def link usw2kagtlog_Agentword Special + +let b:current_syntax = "usw2kagentlog" diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index 2ed771c8dd..246cb0cf7d 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: Vim 7.3 script " Maintainer: Dr. Charles E. Campbell, Jr. -" Last Change: Jan 11, 2012 -" Version: 7.3-13 +" Last Change: Jul 05, 2013 +" Version: 7.3-26 " Automatically generated keyword lists: {{{1 " Quit when a syntax file was already loaded {{{2 @@ -18,41 +18,40 @@ syn keyword vimTodo contained COMBAK FIXME TODO XXX syn cluster vimCommentGroup contains=vimTodo,@Spell " regular vim commands {{{2 -syn keyword vimCommand contained a arga[dd] argu[ment] bd[elete] bN[ext] breakd[el] buf c cal[l] ce[nter] cg[etfile] cl cn cNf comc[lear] cope[n] cr[ewind] d d[elete] diffo diffsplit di[splay] ds[earch] ec e:e:e en endt[ry] exu[sage] filetype fix[del] for go[to] h hi if intro k la lan[guage] lch[dir] let@ lg[etfile] lla[st] lnew[er] lNf[ile] loc[kmarks] lr[ewind] lv[imgrep] ma[rk] messages mkv mv n new noautocmd on[ly] p:~ perld[o] popu[p] p[rint] promptr[epl] ptl[ast] ptr[ewind] py3file q[uit] r[ead] redraws[tatus] ret[ab] r:r:r ru[ntime] sba[ll] sbp[revious] scs sf[ind] sil[ent] sm[ap] sno[magic] so[urce] spellr[epall] st startr[eplace] sunme sw[apname] t tabf[ind] tabn[ext] ta[g] tf[irst] tn tp[revious] tu undoj[oin] up[date] vi vmapc[lear] win wN[ext] wundo xmapc[lear] xnoremenu -syn keyword vimCommand contained ab argd[elete] as[cii] bel[owright] bo[tright] breakl[ist] bufdo cabc[lear] cat[ch] cex[pr] c[hange] cla[st] cN cnf[ile] comment co[py] cs de delf diffoff difft dj[ump] dsp[lit] echoe[rr] e:e:r endf endw[hile] f fin fo[ld] fu gr[ep] ha[rdcopy] hid[e] ij[ump] is[earch] keepa lad la[st] lcl[ose] lex[pr] lgr[ep] lli[st] lne[xt] lo lockv[ar] ls lvimgrepa[dd] marks mk mkvie[w] Mycmd N n[ext] noh[lsearch] o[pen] P p:gs? pp[op] P[rint] ps[earch] ptn pts[elect] pyf[ile] quita[ll] rec[over] reg[isters] retu[rn] ru rv[iminfo] sbf[irst] sbr[ewind] scscope sfir[st] sim[alt] sme snoreme s?pat?sub? spellu[ndo] sta[g] stj[ump] sunmenu sy ta tabfir[st] tabN[ext] tags th[row] tN tr tu[nmenu] undol[ist] v vie[w] vne[w] winc[md] wp[revious] wv[iminfo] xme xterm -syn keyword vimCommand contained abc[lear] argdo au bf[irst] bp[revious] br[ewind] b[uffer] cad cb[uffer] cf[ile] changes cl[ist] cnew[er] cNf[ile] comp[iler] count cscope debug delf[unction] DiffOrig diffthis dl[ist] dwim echom[sg] el[se] endfo[r] ene[w] f[ile] fina[lly] foldc[lose] fun grepa[dd] h[elp] his[tory] il[ist] isp[lit] keepalt laddb[uffer] lat lcs lf[ile] lgrepa[dd] lmak[e] lN[ext] loadk lol[der] lt[ag] lw[indow] mat[ch] mkdir mkv[imrc] MyCommand nbc[lose] N[ext] nu[mber] opt[ions] pc[lose] p:h pr pro p:t ptN pu[t] py[thon] quote red Ren rew[ind] rub[y] sal[l] sbl[ast] sb[uffer] se[t] sh[ell] sl smenu snoremenu spe spellw[rong] star st[op] sus[pend] syn tab tabl[ast] tabo[nly] tc[l] tj[ump] tn[ext] t:r u unh[ide] ve vim[grep] vs[plit] windo wq x xmenu xunme -syn keyword vimCommand contained abo[veleft] arge[dit] bad[d] bl[ast] br bro[wse] buffers caddb[uffer] cc cfir[st] chd[ir] clo[se] cn[ext] col[der] con cpf[ile] cstag debugg[reedy] delm[arks] diffp diffu[pdate] do e echon elsei[f] endfun Error filename fin[d] folddoc[losed] fu[nction] gs?pat?sub? helpf[ind] i imapc[lear] iuna[bbrev] keepj[umps] lad[dexpr] later lcscope lfir[st] lh[elpgrep] lmapc[lear] lnf loadkeymap lop[en] lua ma menut mk[exrc] mo mz nb[key] nkf o ownsyntax pe p:h:h p:r profd[el] pta[g] ptn[ext] pw[d] python3 r redi[r] Rena ri[ght] rubyd[o] san[dbox] sbm[odified] scrip setf[iletype] si sla[st] sn[ext] s@\n@\=\r" spelld[ump] sp[lit] start stopi[nsert] s?version?main? sync tabc[lose] tabm[ove] tabp[revious] tcld[o] tl[ast] tN[ext] tr[ewind] un unl verb[ose] vimgrepa[dd] w winp[os] wqa[ll] X XMLent xunmenu -syn keyword vimCommand contained al[l] argg[lobal] ba[ll] bm[odified] brea[k] browseset bun[load] cad[dexpr] ccl[ose] cgetb[uffer] che[ckpath] cmapc[lear] cN[ext] colo[rscheme] conf[irm] cp[revious] cuna[bbrev] del di diffpatch dig doau ea e[dit] em[enu] endf[unction] ex files fini[sh] foldd[oopen] g gui helpg[rep] ia in j[oin] kee[pmarks] laddf[ile] lb[uffer] le[ft] lgetb[uffer] l[ist] lN lNf lo[adview] lpf[ile] luado mak[e] menut[ranslate] mks[ession] mod[e] mzf[ile] nbs[tart] nmapc[lear] ol[dfiles] p ped[it] po[p] pre[serve] prof[ile] ptf[irst] ptN[ext] py q re red[o] Renu rightb[elow] rubyf[ile] sa[rgument] sbn[ext] scripte[ncoding] setg[lobal] sig sl[eep] sN[ext] so spe[llgood] spr[evious] startg[replace] sts[elect] s?version?main?:p syncbind tabd[o] tabN tabr[ewind] tclf[ile] tm TOhtml try una[bbreviate] unlo[ckvar] ve[rsion] vi[sual] wa[ll] win[size] w[rite] xa[ll] XMLns xwininfo -syn keyword vimCommand contained Allargs argl[ocal] bar bn[ext] breaka[dd] bu bw[ipeout] caddf[ile] cd cgete[xpr] checkt[ime] cmdname cnf com con[tinue] cq[uit] cw[indow] delc[ommand] diffg[et] diffpu[t] dig[raphs] dr[op] earlier e:e emenu* en[dif] exi[t] filet fir[st] foldo[pen] get gvim helpt[ags] iabc[lear] index ju[mps] l lan lc[d] lefta[bove] lgete[xpr] ll lne lnf[ile] locale lp[revious] luafile Man mes mksp[ell] m[ove] mz[scheme] ne noa omapc[lear] p: pe[rl] popu prev[ious] promptf[ind] ptj[ump] ptp[revious] py3 qa[ll] r:e redr[aw] res[ize] r:r rundo sav[eas] sbN[ext] scrip[tnames] setl[ocal] sign sm[agic] sni[ff] sor[t] spelli[nfo] sre[wind] star[tinsert] sun[hide] sv[iew] synlist tabe[dit] tabnew tabs te[aroff] tm[enu] to[pleft] ts[elect] u[ndo] uns[ilent] vert[ical] viu[sage] wh[ile] wn[ext] ws[verb] x[it] xnoreme y[ank] -syn keyword vimCommand contained ar ar[gs] +syn keyword vimCommand contained a arga[dd] ar[gs] bar bn[ext] breaka[dd] bu bw[ipeout] caddf[ile] cd cgete[xpr] checkt[ime] cmdname cnf com con[tinue] cq[uit] cw[indow] delc[ommand] diffg[et] diffpu[t] dig[raphs] dr[op] earlier el[se] endfo[r] ene[w] filename fin[d] folddoc[losed] fu[nction] gui helpg[rep] ia in j[oin] kee[pmarks] laddf[ile] lb[uffer] le[ft] lgetb[uffer] l[ist] lN lNf lo[adview] lpf[ile] luado mak[e] menut[ranslate] mks[ession] mod[e] n new noautocmd on[ly] pc[lose] popu p[rint] promptr[epl] ptn pts[elect] py[thon] quote redi[r] res[ize] ru rv[iminfo] sbf[irst] sbr[ewind] scscope sfir[st] sim[alt] sme snoreme spe spellw[rong] star st[op] sunmenu syn ta tabf[ind] tabnew tabr[ewind] tcld[o] tj[ump] tN tp[revious] tu u[ndo] unlo[ckvar] verb[ose] vim[grep] vne[w] win wn[ext] w[rite] xa[ll] XMLent xunme +syn keyword vimCommand contained ab argd[elete] argu[ment] bd[elete] bN[ext] breakd[el] buf c cal[l] ce[nter] cg[etfile] cl cn cNf comc[lear] cope[n] cr[ewind] d d[elete] diffo diffsplit di[splay] ds[earch] ec elsei[f] endfun ex files fini[sh] foldd[oopen] g gvim helpt[ags] iabc[lear] index ju[mps] l lan lc[d] lefta[bove] lgete[xpr] ll lne lnf[ile] locale lp[revious] luafile Man mes mksp[ell] m[ove] N n[ext] noh[lsearch] o[pen] pe popu[p] P[rint] ps[earch] ptN pu[t] python3 r red[o] ret[ab] rub[y] sal[l] sbl[ast] sb[uffer] se[t] sh[ell] sl smenu snoremenu spelld[ump] sp[lit] start stopi[nsert] sus[pend] sync tab tabfir[st] tabn[ext] tabs tclf[ile] tl[ast] tn[ext] tr tu[nmenu] undoj[oin] uns[ilent] ve[rsion] vimgrepa[dd] vs[plit] winc[md] wN[ext] ws[verb] x[it] XMLns xunmenu +syn keyword vimCommand contained abc[lear] argdo as[cii] bel[owright] bo[tright] breakl[ist] bufdo cabc[lear] cat[ch] cex[pr] c[hange] cla[st] cN cnf[ile] comment co[py] cs de delf diffoff difft dj[ump] dsp[lit] echoe[rr] em[enu] endf[unction] exi[t] filet fir[st] foldo[pen] get h hi if intro k la lan[guage] lch[dir] let@ lg[etfile] lla[st] lnew[er] lNf[ile] loc[kmarks] lr[ewind] lv[imgrep] ma[rk] messages mkv mv nbc[lose] N[ext] nu[mber] opt[ions] ped[it] pp[op] pro pta[g] ptn[ext] pw[d] q re redr[aw] retu[rn] rubyd[o] san[dbox] sbm[odified] scrip setf[iletype] si sla[st] sn[ext] s@\n@\=\r" spe[llgood] spr[evious] startg[replace] sts[elect] sv[iew] syncbind tabc[lose] tabl[ast] tabN[ext] ta[g] te[aroff] tm tN[ext] tr[ewind] u undol[ist] up[date] vert[ical] vi[sual] w windo wp[revious] wundo xmapc[lear] xnoreme xwininfo +syn keyword vimCommand contained abo[veleft] arge[dit] au bf[irst] bp[revious] br[ewind] b[uffer] cad cb[uffer] cf[ile] changes cl[ist] cnew[er] cNf[ile] comp[iler] count cscope debug delf[unction] DiffOrig diffthis dl[ist] dwim echom[sg] emenu* en[dif] exu[sage] filetype fix[del] for go[to] ha[rdcopy] hid[e] ij[ump] is[earch] keepa lad la[st] lcl[ose] lex[pr] lgr[ep] lli[st] lne[xt] lo lockv[ar] ls lvimgrepa[dd] marks mk mkvie[w] mz nb[key] nkf o ownsyntax pe[rl] pr profd[el] ptf[irst] ptN[ext] py qa[ll] r[ead] redraws[tatus] rew[ind] rubyf[ile] sa[rgument] sbn[ext] scripte[ncoding] setg[lobal] sig sl[eep] sN[ext] so spelli[nfo] sre[wind] star[tinsert] sun[hide] sw[apname] synlist tabd[o] tabm[ove] tabo[nly] tags tf[irst] tm[enu] TOhtml try un unh[ide] v vi viu[sage] wa[ll] winp[os] wq wv[iminfo] xme xnoremenu y[ank] +syn keyword vimCommand contained al[l] argg[lobal] bad[d] bl[ast] br bro[wse] buffers caddb[uffer] cc cfir[st] chd[ir] clo[se] cn[ext] col[der] con cpf[ile] cstag debugg[reedy] delm[arks] diffp diffu[pdate] do e echon en endt[ry] f fin fo[ld] fu gr[ep] h[elp] his[tory] il[ist] isp[lit] keepalt laddb[uffer] lat lcs lf[ile] lgrepa[dd] lmak[e] lN[ext] loadk lol[der] lt[ag] lw[indow] mat[ch] mkdir mkv[imrc] mzf[ile] nbs[tart] nmapc[lear] ol[dfiles] p perld[o] pre[serve] prof[ile] ptj[ump] ptp[revious] py3 q[uit] rec[over] reg[isters] ri[ght] rundo sav[eas] sbN[ext] scrip[tnames] setl[ocal] sign sm[agic] sni[ff] sor[t] spellr[epall] st startr[eplace] sunme sy t tabe[dit] tabN tabp[revious] tc[l] th[row] tn to[pleft] ts[elect] una[bbreviate] unl ve vie[w] vmapc[lear] wh[ile] win[size] wqa[ll] x xmenu xterm errormsg +syn keyword vimCommand contained ar argl[ocal] ba[ll] bm[odified] brea[k] browseset bun[load] cad[dexpr] ccl[ose] cgetb[uffer] che[ckpath] cmapc[lear] cN[ext] colo[rscheme] conf[irm] cp[revious] cuna[bbrev] del di diffpatch dig doau ea e[dit] endf endw[hile] f[ile] fina[lly] foldc[lose] fun grepa[dd] helpf[ind] i imapc[lear] iuna[bbrev] keepj[umps] lad[dexpr] later lcscope lfir[st] lh[elpgrep] lmapc[lear] lnf loadkeymap lop[en] lua ma menut mk[exrc] mo mz[scheme] ne noa omapc[lear] P po[p] prev[ious] promptf[ind] ptl[ast] ptr[ewind] pyf[ile] quita[ll] red Ren rightb[elow] ru[ntime] sba[ll] sbp[revious] scs sf[ind] sil[ent] sm[ap] sno[magic] so[urce] spellu[ndo] sta[g] stj[ump] syn match vimCommand contained "\