我在 Vim 中使用 ESLint 和 Syntastic。在 Syntastic 中可以正确找到错误,但是当我导航到错误位置面板中的错误并按 Enter 键时,它会将我放在文件中的相同位置,而不是将我带到正确的行和列。
我也看到以下错误:
E926: Current location list was changed
但是,我的 Google-fu 对此错误一无所知。
我还录制了一个快速截屏视频,演示了这种情况:
https://www.dropbox.com/s/q6qjh2mk4g5w63c/syntastic%20not%20working.mov?dl=0
关于如何解决这个问题的任何想法?它工作了几个星期;我没有更改我的 .vimrc,但我最近确实重新安装了 node 和 npm。
- 更新 -
输出brew info vim:
vim: stable 7.4.1655, HEAD
Vi "workalike" with many additional features
http://www.vim.org/
Conflicts with: ex-vi
/usr/local/Cellar/vim/7.4.1655 (1,625 files, 22.5M) *
Built from source
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/vim.rb
==> Dependencies
Optional: lua ?, luajit ?
==> Options
--disable-nls
Build vim without National Language Support (translated messages, keymaps)
--override-system-vi
Override system vi
--with-client-server
Enable client/server mode
--with-lua
Build vim with lua support
--with-luajit
Build with luajit support
--with-mzscheme
Build vim with mzscheme support
--with-python3
Build vim with python3 instead of python[2] support
--with-tcl
Build vim with tcl support
--without-perl
Build vim without perl support
--without-python
Build vim without python support
--without-ruby
Build vim without ruby support
--HEAD
Install HEAD version
这似乎是由于 vim 的问题(我不确定是什么),在 7.4.1589 和 7.4.1655 之间引入。如果您使用的是 OS X / Homebrew,临时解决方案可能是brew switch vim 7.4.1589(假设您仍然下载了该版本的本地副本,您可以使用 进行检查brew info vim)。
如果您没有在 下列出该版本brew info vim,您可以直接从提交的 URL 安装它:
brew install https://raw.githubusercontent.com/Homebrew/homebrew/7746a5509b3fb10216f1d40ab639398e8d0c5e4c/Library/Formula/vim.rb
Run Code Online (Sandbox Code Playgroud)
或者,您可以通过在自制 git 日志中搜索所需的提交并将 vim 公式恢复为该提交来在本地执行此操作:
git -C "$(brew --repository)" log --grep='vim 7.4.1589'
# Using the commit from the above command
git -C "$(brew --repository)" checkout 7746a5509b3fb10216f1d40ab639398e8d0c5e4c -- Library/Formula/vim.rb
# Ensure the version number looks correct
head <"$(brew --repository)"/Library/Formula/vim.rb
# Install as usual
brew install vim
# Later, when you're ready to go back to the latest version
git -C "$(brew --repository)" checkout HEAD .
Run Code Online (Sandbox Code Playgroud)
-C "$(brew --repository)"如果刚cd "$(brew --repository)"开始,您也可以省略所有内容。