Created attachment 606308 [details] file for BeakerLib highlighting in vim BeakerLib syntax highlighting for vim is an enhancement for more comfortable work with this shell-level integration testing library. Syntax is now highlighted with green color, however, it can be optimized by modifying provided file. Installation is quite easy: 1. download file sh.vim to your computer 2. set user to root 3. move it to /usr/share/vim/vimfiles/after/syntax/ BeakerLib highlight feature will be active only if the extension of the file is *.sh Any ideas ?
Nice, thanks for providing the patch! It would be great to have this working out-of-the box after installing beakerlib. Could we just include /usr/share/vim/vimfiles/after/syntax/sh.vim in beakerlib? Not sure whether vim supports naming of these "after" files which would prevent name clashes. Last note: I've noticed that the suggested syntax file does not highlight beakerlib commands inside function definitions, e.g. > fun() { > rlRun "does not work here" > } > > rlJournalStart > rlPhaseStartTest > rlAssertExists "foo" > rlRun "works here" > rlPhaseEnd > rlJournalPrintText > rlJournalEnd
Wonderful. Really. Thanks! (In reply to comment #1) > Nice, thanks for providing the patch! It would be great to have > this working out-of-the box after installing beakerlib. Could we > just include /usr/share/vim/vimfiles/after/syntax/sh.vim in > beakerlib? Not sure whether vim supports naming of these "after" > files which would prevent name clashes. I would really like do that if possible. While a vim user myself, I'm not really familiar how the syn-high machinery work. Is it possible to somehow distinguish that from the other possible sh.vim highlighters, for examply by grepping for rlJournalStart, some tag in the file, or something similar? If something like that and a rename of the file is possible, that would allow me to put the file into the RPM directly. The second issue I see is that by installing this file directly we would probably need to depend on vim so that the directory to install actually exists. But that can probably be solved by creating a subpackage, which would be installed on Beaker boxes by default.
Another option is to enable highlighting in user's vimrc: autocmd FileType sh match Type 'rl[A-Z][^ ]*' However, I too would prefer to have it packed in the rpm.
Still do not know how to do this :(
I think I managed to do this using more vim machinery... I have introduced new 'beakerlib' filetype, which is set on a *.sh file if the first 100 lines contain some often used BL function. A syntax highlight then loads the common *.sh highlight and applies Filip's work onto it. But as I do not want BL to depend on vim-common, the syntax highlight needs to be in a subpackage. https://git.fedorahosted.org/cgit/beakerlib.git/commit/?id=5d65632a2c76d2769fbde7eefa5e5702beb39405 http://git.engineering.redhat.com/?p=users/pmuller/beakerlib-rhel.git;a=commit;h=1dca362d88de3c1bafda4fdf0aea4bb057f04f7c
beakerlib-1.9-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/beakerlib-1.9-1.fc20
Package beakerlib-1.9-1.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing beakerlib-1.9-1.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-7442/beakerlib-1.9-1.fc20 then log in and leave karma (feedback).
beakerlib-1.9-2.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/beakerlib-1.9-2.fc20
Please consider the package fixing this bug available in Fedora stable repos once bz1116308 is closed and RHEL stable repos once bz1116317 is closed. Fixed in: beakerlib-1.9-2.fc19 beakerlib-1.9-2.fc20 beakerlib-1.9-2.fc21 beakerlib-1.9-3.el5 beakerlib-1.9-2.el6 beakerlib-1.9-2.el7
beakerlib-1.9-3.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/beakerlib-1.9-3.fc20
beakerlib-1.9-3.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.