6

Let's start with the difference between recursive mapping and non-recursive mapping. In a recursive mapping (nmap, xmap, etc.), the keys you use in the right hand side of your mapping are used "as is". If they are already mapped at the time of execution those mappings are respected: " here we remap b to work like B nmap b B " <F5> thus works like dB ...


3

The reason for this is that the default setting of vim-easy-align is to keep the current indentation. You can get the desired alignment with ga<c-i>*<space>. I find the EasyAlignLign feature to be very useful for this sort of thing. If you map e.g. gA to <plug>(LiveEasyAlign), then visually select your text and do gA. Now you can see how ...


2

FileType solution, just for reference to whoever can use it.... "---- Easy Align ---- {{{ xmap ga <Plug>(EasyAlign) nmap ga <Plug>(EasyAlign) augroup FileType sh,perl let g:easy_align_delimiters = { \ 's': { \ 'pattern': '\$', \ 'ignore_groups': ['Comment'], \ 'left_margin': 0, \ '...


2

Here's an admittedly hacky solution in pure vimscript: :%norm dt::left 17<C-v><CR>0:exec "norm R".getreg('"')<C-v><CR> Obviously, you can changed 17 to whatever value works best with your text. Explanation: The way this works is by deleting everything up to the first colon before aligning. Then after that, it uses replace mode (R) ...


1

Aligning delimiter is controlled by stick-to-left option. Its a boolean controlling whether to position delimiter on the left-side. so your wanted result is achievable through selecting the desired lines with V(visual linewise mode) and running the following command: '<,'>EasyAlign : { 'right-margin':0, 'left-margin':3, 'stick-to-left':0 } Of course ...


Only top voted, non community-wiki answers of a minimum length are eligible