I installed vim 8 from source and setup PATH to point to the installation. Then I installed ale using Vundle. But whenever I try to use vim I get the following error
"!s:has_features" [Not edited] --No lines in buffer--
Error detected while processing /home/vikram/.vim/bundle/ale/plugin/ale.vim:
line 23:
ALE requires NeoVim >= 0.1.5 or Vim 8 with +timers +job +channel
line 24:
Please update your editor appropriately.
Can you paste the output of
vim --version | grep 'timers\|job\|channel'
+channel -hangul_input +netbeans_intg +timers
+clipboard +job +path_extra +user_commands
Can you find out which of https://github.com/w0rp/ale/blob/d7ed49f84964aebdaa180b553e83943cd85c5d20/plugin/ale.vim#L19 is causing s:has_features to be false?
vim +'if has("timers")
echom("timers")
if exists("*job_start")
echom("job_start")
if exists("*ch_close_in")
echom("ch_close_in")
' +messages
What does the above command output?
timers
job_start
ch_close_in
Messages maintainer: Bram Moolenaar Bram@vim.org
timers
job_start
ch_close_in
That is weird. Are you sure, you are seeing the error with the version of vim you used above? It sounds like you have two vim binaries in your path.
Just making sure.
I do have two vim binaries. One is the original vim that is 7. And one that I installed and am pointing to by setting the PATH variable. So once I start using vim after this, I should only be getting vim 8, right. This is what vim --version tells me.
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jan 23 2017 20:30:21)
Included patches: 1-222
I'm guessing that something is wrong with the version of Vim you compiled. Maybe try compiling a newer version of Vim.
I compiled directly from the git source.
I just performed a git revert XXXXX and got this too although I installed Ale through vim-plug.
$聽vim --version | grep 'timers\|job\|channel'
+channel -hangul_input +netbeans_intg +timers
+clipboard +job +path_extra +user_commands
$聽vim --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jan 31 2017 07:14:31)
...
...
$ which vim
/usr/local/bin/vim
I'm on macOS Sierra and I installed Vim 8 using brew install vim.
Could you paste the output for the following?
:echo has('timers')
:echo exists('*job_start')
:echo exists('*ch_close_in')
That's what the plugin tests for if you're using Vim.
I recommend installing MacVim from the official release binaries posted on GitHub. https://github.com/macvim-dev/macvim/releases
I made a screen recording: https://asciinema.org/a/6w3129na3gu33a86l7w3qwy40
I don't think this is an Ale issue, at least not in my case. But I'm not sure what's going on...
That series of errors is interesting.
The first error is that the features check fails.
let s:has_features = has('timers') && exists('*job_start') && exists('*ch_close_in')
That's what ALE checks for in Vim. Now you're running it there while editing a git commit message, so that might have some special behaviour.
The following errors come from airline's integration with ALE, and I can fix that pretty easily. It's complaining because a global variable for ALE isn't defined, because the check which stops ALE from doing anything meaningful happens before that variable is defined. So, I can just define the variables before the check is made, and those errors will go away.
Could you paste the output of the :echo lines I mentioned above? Do you get this when running Vim all the time, or just when editing git commits?
I might silence the warning if the filetype is something for git commits.
The output of all the echo lines were 1 when vim worked fine and they were all 0 during the git commit editing.
Aha! So the errors only appear while editing diffs with git, then? I think I should be able to repeat that and fix it. ALE just shouldn't do much of anything while you're using Vim to edit a commit message, etc.
So the errors only appear while editing diffs with git, then?
For me, yep, this only happens during git editing of a diff or revert.
If you try again now, those particular errors should hopefully be gone.
I performed a :PlugUpdate, tried again and I got this:

Hitting enter a few times and I see this:

Okay, I have pushed a patch now which should get airline to shut the Hell up in these situations. Now there are two global flags set by ALE for loading. There is g:loaded_ale, which other plugins can check to see if ALE is installed, and g:loaded_ale_dont_use_this_in_other_plugins_please, which no plugin should ever use. Hopefully the name should make that obvious enough.
Yes, it works!
No more caughing in vim! 馃憤
Nicely done, @w0rp
Okay, that's that issue handled then.
@vikramsg Are you still having some issues? From what I read, I think you might have separate issues.
I had actually given up on it, but tried again now. This time I backed up existing .vimrc and .vim and removed them entirely. Reinstalled Vundle and then ale and it seems to work. Thanks @w0rp
Cool! Good to hear.
This happened to me only when merging with git, git was using my _built-in_ vim version which was vim 7.4.
Once I changed the git default editor to the newer version, it got fixed 馃憤
Run brew install vim
This will install vim at /usr/local/bin/vim
Run which vim and make sure it returns /usr/local/bin/vim
Then run git config --global core.editor /usr/local/bin/vim
This will ensure git's default editor is the latest vim.
Ohh, silly me, I got this error because I didn't realize I was using MacOs defaults vi binary which is version 7.4 when I was installing this plugin, I'm just used to type vi instead of vim, so I created an alias in my .bash_profile.
Most helpful comment
Okay, I have pushed a patch now which should get airline to shut the Hell up in these situations. Now there are two global flags set by ALE for loading. There is
g:loaded_ale, which other plugins can check to see if ALE is installed, andg:loaded_ale_dont_use_this_in_other_plugins_please, which no plugin should ever use. Hopefully the name should make that obvious enough.