[mini.align] Padding or margin on only one side of '=' #1879
-
Contributing guidelines
Module(s)mini.align QuestionHi there, I am trying to transition from vim-easy-align to mini.align and pretty much everything is working out of the box. Thanks for this plugin! I was wondering how can I add some padding only to the left of a pattern, say '='. For example: I want to align around '=' the following lines:
This is very straightforward if I select the lines and then But let's say I want to add extra padding (4 spaces) to the left of '=' only. I tried
Thanks in advance for your help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I don't think this is possible with built-in capabilities. There are two approaches I'd recommend here:
My suggestion would be to use manual (second) approach, but if it a regular occurrence then invest into writing a dedicated modifier. |
Beta Was this translation helpful? Give feedback.
I don't think this is possible with built-in capabilities. There are two approaches I'd recommend here:
pre_merge
step that tweaks first separator (for example, adds specific string to its left side). This is complex, but possible.ga=
) but manually tweak with blockwise edit. Put cursor on the first=
in first line, press<C-v>
, navigate down to the last line, pressI
followed by four spaces and<Esc>
. This is pretty straightforward as spaces are aligned already.My suggestion would be to use manual (second) approach, but if it a regular occurrence then invest into writing a dedicated modifier.