vim-systemd-syntax icon indicating copy to clipboard operation
vim-systemd-syntax copied to clipboard

Feature Request: support space before/after =

Open aletheia7 opened this issue 8 years ago • 1 comments

Syntax highlighting works great for key/value pairs such as:

Description=Expense

Syntax highlighting does not work for lines like:

Description = Expense

Could you enable the script to support spaces before/after the "="?

aletheia7 avatar Mar 31 '17 22:03 aletheia7

Aw blerg. Yeah, this is technically possible. At the moment, I think the syntax allows whitespace after the =, so it should work fine for lines like:

Description= Expense

Unfortunately, because of the way the syntax file is written, fixing this to allow whitespace before the = means hand-editing all the regexes that end with /[...]=/ to be /[...]\s*=/. ("=/" shows up in a lot of different places in that file, so this isn't just a simple regex or one-line change.. so it's gonna take me a bit of effort.)

In the meantime, fixing a service file to remove spaces before = is pretty simple:

:%s/^\(\w\+\)\s\+=/\1=/

wgwoods avatar Apr 03 '17 20:04 wgwoods