Ale: Feature Request: Toggle ALEFix on save for specific buffers

Created on 18 Aug 2017  路  5Comments  路  Source: dense-analysis/ale

I've been able to work around this with a small function snippet that I wrote, but it would be nice if there was a way to easily toggle ALEFix on save, on a per local buffer basis.

enhancement

Most helpful comment

b:ale_fix_on_save can now be used for controlling fixing on save for specific buffers.

All 5 comments

isn't that what you're looking for?

" Set this setting in vimrc if you want to fix files automatically on save.
" This is off by default.
let g:ale_fix_on_save = 1

I think he might be asking for a buffer-specific option, in addition to the global option. That's worth implementing.

@morhetz yeah, I built a small vimscript snippet that enables me to toggle the global ale_fix_on_save variable. But sometimes I am working in a file that I would rather not mess with, so being able to do like ALEFixToggle and have it only save for that specific buffer would be great.

@w0rp precisely, awesome!

b:ale_fix_on_save can now be used for controlling fixing on save for specific buffers.

Works great, thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ilyakopy picture ilyakopy  路  4Comments

kronos29296 picture kronos29296  路  4Comments

garand picture garand  路  4Comments

amerov picture amerov  路  4Comments

trevordmiller picture trevordmiller  路  4Comments