Information
VIM version
VIM - Vi IMproved 8.1 (2018 May 18, compiled Feb 29 2020 00:47:39)
macOS version
Included patches: 1-503, 505-680, 682-2292
Operating System: Catalina 10.15.4
What went wrong
I'm sure this will just be a configuration thing but I've been banging my head against the desk for hours trying to figure this out.
EDIT: Below I first noticed this happening on ALEFix - however I've realised even when I do :grep, asofsdfas
is logged to the console... I'm going to keep digging.
If anyone knows a way to see what is being executed by vim that would be useful (ie show commands being run? - q: doesn't reveal anything)
When I run ALEFix on a python file it automatically inserts junk at the top:
asofsdfas
import logging
For me its always the same junk asofsdfas
but if I keep saving it keeps inserting it.
Here is my ftplugin/python.vim
" Check Python files with flake8 and pylint.
let b:ale_linters = ['flake8', 'mypy']
" Fix Python files with autopep8 and yapf.
let b:ale_fixers = ['autopep8', 'yapf']
" python syntax
let g:python_highlight_all = 1
If I change to let b:ale_fixers = []
it doesn't occur
If I pip uninstall autopep8 and yapf it doesn't occur
It still occurs if I have either only let b:ale_fixers = ['autopep8']
or let b:ale_fixers = ['yapf']
Please someone help I'm losing my mind
EDIT: Turns out it's also happening on my javascript fixers so isn't specific to this python stuff (but the same behaviour is occurring re: if I change the ale_fixers value)
ALE
for a while and never had any trouble. Also, check whichautopep8
andyapf
are used in ALE, try to run them manually. If you end up with no issue then it's probably something in your configuration and not in the plugin. – nobe4 May 4 '20 at 13:45