[Pacemaker] Syntax highlighting in vim for crm configure edit

Dan Frincu df.cluster at gmail.com
Tue Nov 22 12:14:24 EST 2011


On Tue, Nov 15, 2011 at 11:47 AM, Raoul Bhatia [IPAX] <r.bhatia at ipax.at> wrote:
> hi!
> On 2011-08-19 16:28, Dan Frincu wrote:
>> Hi,
>> On Thu, Aug 18, 2011 at 5:53 PM, Digimer<linux at alteeve.com>  wrote:
>>> On 08/18/2011 10:39 AM, Trevor Hemsley wrote:
>>>> Hi all
>>>> I have attached a first stab at a vim syntax highlighting file for 'crm
>>>> configure edit'
>>>> To activate this, I have added 'filetype plugin on' to my /root/.vimrc
>>>> then created /root/.vim/{ftdetect,ftplugin}/pcmk.vim
>>>> In /root/.vim/ftdetect/pcmk.vim I have the following content
>>>> au BufNewFile,BufRead /tmp/tmp* set filetype=pcmk
>>>> but there may be a better way to make this happen. /root/.vim/pcmk.vim
>>>> is the attached file.
>>>> Comments (not too nasty please!) welcome.
>> I've added a couple of extra keywords to the file, to cover a couple
>> more use cases. Other than that, great job.
> will this addition make it into some package(s)?
> would it be right to ship this vim syntax file with crm?

In the hope it will be a part of crm, I've written a patch for this.
Applying the patch over cibconfig.py and utils.py on Pacemaker 1.1.5
and adding the pcmk.vim file to the vim syntax folder (for Debian
Squeeze it's /usr/share/vim/vim72/syntax) gives access to syntax
highlighting in crm configure edit, if using vi/vim as editor.

Original work on pcmk.vim by Trevor Hemsley <themsley at voiceflex.com>,
a couple of additions by me.

Please review it and and add a Signed-Off line if it's ok.


p.s.: many thanks to everyone for the input received on IRC.

> thanks,
> raoul
> --
> ____________________________________________________________________
> DI (FH) Raoul Bhatia M.Sc.          email.          r.bhatia at ipax.at
> Technischer Leiter
> IPAX - Aloy Bhatia Hava OG          web.          http://www.ipax.at
> Barawitzkagasse 10/2/2/11           email.            office at ipax.at
> 1190 Wien                           tel.               +43 1 3670030
> FN 277995t HG Wien                  fax.            +43 1 3670030 15
> ____________________________________________________________________

Dan Frincu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Low-extra-Add-syntax-highlighting-for-crm-configure-.patch
Type: text/x-patch
Size: 1884 bytes
Desc: not available
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20111122/ead05f2b/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pcmk.vim
Type: application/octet-stream
Size: 3585 bytes
Desc: not available
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20111122/ead05f2b/attachment-0003.obj>

More information about the Pacemaker mailing list