rodjek / vim-puppet

Puppet niceties for your Vim setup
Apache License 2.0
500 stars 137 forks source link

Autoformat only normal mode #136

Open lelutin opened 3 years ago

lelutin commented 3 years ago

This change resolves this issue I've been experiencing for months about the characters that keep flipping before the line is auto-formatted.

However, changes how the plugin currently behaves. So I'd like to get at least a tiny bit of feedback about the change.

Basically what this will change is that line re-splitting will not happen automatically as you type anymore. You will need to use gq to explicitely request a reformatting of lines so that long lines get split out to shorter ones.

Note that auto-alignment of hash arrows will still happen as you type.

Closes: #135

russellshackleford commented 3 years ago

I can confirm this does what it claims on self-compiled vim-8.2-2107. However, I'm on the fence about whether I would even want this fix because it's just going to cause all manner of testing errors for long lines that are just over the limit and not really noticeable to the naked eye whereas I can spot the weird flipping and fix it inline. ¯\_(ツ)_/¯