I am figuring out a way to apply linting to a visual selection of code. For example:
I only want to lint run
:ALEFix on that section of code, and not the 100s (or 1000s) of lines of other code in the file. My first thought was doing something like:
- Copy the visual selection.
- Option a new file and paste that in.
:AleFixon that shortened file.
- Close that file
gvto re-highlight the visual selection at the start.
- Paste in the copy-buffer
What might be a better way to do that? And if the above seems like it might be the best way, what might be a clean function to do that with? (I'll try writing one myself as well...)