[Pacemaker] Add a color scheme to the editor used in crm shell
Lars Ellenberg
lars.ellenberg at linbit.com
Wed Oct 27 07:11:39 EDT 2010
On Mon, Oct 25, 2010 at 05:43:40PM +0300, Dan Frincu wrote:
> Hi,
>
> As a person who spends quite a lot of time in the crm shell I have
> seen that there is a colorscheme option that can be applied when
> issuing crm configure show. I'm interested if there's a way to have
> a colorscheme within the editor that is used by crm. It's usually
> vim, I've noticed that I could add my .vimrc and when using the crm
> configure edit, the shortcuts and everything else worked, except for
> the colorscheme.
>
> Does anyone know how to add a colorscheme to the crm editor (vim for
> example) that can also do syntax highlighting while inside the crm
> configure edit?
You'd need to
:help syntax
:help syn-define
and then write quite a few lines about keywords, matches and regions,
some contained, some transparent and so on, and link them to
highlighting attributes.
To find out you need to put in there, you'd have to look through
parse.py of the crm shell source, start with the parsers defined at
CliParser parsers dictionary.
First thing probably would be to define the "logical line", to get the
backslash \\ line continuation transparently mapped into the rest of the
syntax rules.
If you (or someone else) feel you're up to the task,
I'm happy to help out, review and comment.
I just don't have the time to do it myself right now.
Once you have a vim style syntax definition, converting that into other
editors syntax definition should be easy.
Thanks for asking.
Thanks for volunteering ;-)
--
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com
DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
More information about the Pacemaker
mailing list