LINBIT featured image

Editing the Pacemaker configuration with VIM

For people using the VIM editor I’ve got two small tips when editing Pacemaker configurations:

Use syntax highlight. This helps to see unmatched quote characters easily. Whether it’s too colorful can be discussed, though 😉
A current version can be found here, and the mailing list post is here.

For correlating resource names I recommend the Mark plugin. I’ve put an additional mapping in my ~/.vimrc:

 nnoremap  <F4>   :call mark#MarkCurrentWord()

With this I just put the cursor on a resource name and press F4 – all occurrences of this word are highlighted, so it’s very easy to see where the name is used[1. eg. groups, constraints, etc.]. If I mark other words they get different colors, and with F4 the highlightning can be turned off again, too.

I think that for people looking at more-than-minimal Pacemaker configurations this helps to quickly get (and keep!) an overview.

Like? Share it with the world.

Share on facebook
Share on twitter
Share on linkedin
Share on whatsapp
Share on vk
Share on reddit
Share on email