I like to line up things like let
bindings and such, purely for silly, aesthetic reasons. So I'll add a space or two here and there to make them all line up if possible. Is there a way to help partially automate this? Like I highlight the code block and hit a command, it lines them up.
Not shure if this what you are looking for but this plugin helps with tab alignment https://github.com/junegunn/vim-easy-align and you can map it like this
map <C-a> gai{<Space><CR>
this will align mapsit can turn
{:a "hi"
:long "hi}
to
{:a "hi"
:long "hi}