slimv 无法在 vim 中加载 *.lisp 文件
我安装了 slimv.vim(首先通过 Archlinux 上的 yaourt,然后通过 vimana),通过这两种方法,当我打开 lisp 文件时,slimv.vim 不会加载。我已经在谷歌结果中搜索了调试帮助,这是我迄今为止检查过的内容:
:scriptnames
does not showslimv.vim
, so it's not be returned at all- < code>:filetype 显示设置为 ON 的所有选项
:set rtp?
显示~/.vim
作为第一个条目- vim 是用 python 编译的,显示
+python
slimv.vim
及相关文件均在~/.vim/ftplugin/
:echo $HOME
显示正确的主目录slimv.vim
是filetype=unix
- 我已经尝试过使用和不使用
let g:slimv_python = 'python2'
在.vimrc
,正如 slimv 的 AUR 注释所建议的 :messages
没有显示任何内容:set ft?
显示该文件被识别为 lisp
我不知道没有任何其他插件,所以这可能是一个普遍的 vim 问题,我无法判断。接下来我应该尝试什么?
I installed slimv.vim (first through yaourt on Archlinux and then through vimana) and via both methods, slimv.vim doesn't load when I open a lisp file. I've scoured google results for debugging help, and here's what I have checked so far:
:scriptnames
does not showslimv.vim
, so it's not being loaded at all:filetype
shows all options set to ON:set rtp?
shows~/.vim
as the first entry- vim was compiled with python, shows
+python
slimv.vim
and related files are all in~/.vim/ftplugin/
:echo $HOME
shows the correct home directoryslimv.vim
is offiletype=unix
- I've tried both with and without
let g:slimv_python = 'python2'
in.vimrc
, as suggested by the AUR comments for slimv :messages
shows nothing:set ft?
shows that the file is recognized as lisp
I don't have any other plugins, so it's possible that this is a general vim issue and I can't tell. What should I try next?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
即使 :filetype 显示所有设置为 ON 的选项,也许它们设置得太晚了(paredit.vim 设置它们),所以我建议在您的 .vimrc 中写入:
您也可以通过使用 -V10 选项运行 vim 来设置详细模式:
这将打印有关搜索和获取的脚本的日志信息。
Slimv 附带了 paredit.vim,它是一个通用(不是文件类型)插件,因此应该为所有文件类型加载它。检查它是否通过以下方式加载
您可能还想尝试安装另一个 vim 插件,只是为了测试它是否是一般 vim 问题或与 Slimv 相关的问题。
编辑:文件类型插件要么需要与文件类型本身同名(例如lisp.vim),要么需要驻留在与文件类型同名的子目录中。 Slimv 使用后一种逻辑,因此请确保有一个包含 slimv-lisp.vim 的 lisp 子目录:
Even if :filetype shows all options set to ON, maybe they are set too late (paredit.vim sets them), so I suggest to write this in your .vimrc:
Also you can set verbose mode by running vim with the -V10 option:
This prints log info on the scripts searched and sourced.
Slimv comes with paredit.vim that is a general (not a filetype) plugin, so it should be loaded for all filetypes. Check if it is loaded via
You may also want to try to install another vim plugin just to test if it's a general vim problem or something related to Slimv.
EDIT: filetype plugins either need to have the same name as the filetype itself (e.g. lisp.vim) or they need to reside in a subdirectory having the same name as the filetype. Slimv uses the latter logic, so make sure that there is a lisp subdirectory containing slimv-lisp.vim:
很难说你的问题到底出在哪里,但首先我会检查你的文件类型是否被正确识别。
:set ft?
应该输出类似filetype=lisp
的内容,之后您可以检查
:messages
是否有任何错误消息。It's difficult to say where your problem is exactly but first I would check that your filetype is recognized properly.
:set ft?
should output something likefiletype=lisp
After that you could check
:messages
for any error messages.我最终通过卸载 slimv.vim 并从
~/.vim/ftplugin/
中手动删除名为lisp
的文件,然后使用 vimana 重新安装来解决了这个问题。现在效果很好。感谢您帮助我度过难关!I eventually fixed this issue by uninstalling slimv.vim and manually removing the file named
lisp
from~/.vim/ftplugin/
, then reinstalling with vimana. It's working great, now. Thanks for helping me through it!