GVim无法识别插件中的命令

时间:2015-07-23 15:43:58

标签: sql windows vim

如何让gvim识别sqlcomplete.vim命令?

我无法使用sqlcomplete.vim插件。运行:version时,我得到以下输出:

enter image description here

并一直滚动到底部是输出的其余部分:

enter image description here

和env变量:

:echo $VIM
c:\users\me\.babun\cygwin\etc\

:echo $HOME
H:\

以下是:scriptnames的输出:

enter image description here

当运行sqlcomplete.vim命令(如:SQLSetType sqlanywhere)时,我得到的输出是:

enter image description here

如何让gvim识别sqlcomplete.vim命令?

另一条有用的信息是:echo &rtp的输出:

H:\vimfiles,H:\.vim\bundle\Vundle.vim,H:\.vim\bundle\dbext.vim,H:\.vim\bundle\SQ
LComplete.vim,C:\Users\me\.babun\cygwin\etc\vimfiles,C:\Users\me\.babu
n\cygwin\etc\,C:\Users\me\.babun\cygwin\etc\vimfiles/after,H:\vimfiles/afte
r,H:\.vim/bundle/Vundle.vim,H:\.vim\bundle\Vundle.vim/after,H:\.vim\bundle\dbext
.vim/after,H:\.vim\bundle\SQLComplete.vim/after

1 个答案:

答案 0 :(得分:1)

您可以查看以下几点:

  1. :scriptnames显示插件 \ sqlcomplete.vim
  2. 但您提供的链接指向... / vim / runtime / autoload /sqlcomplete.vim,没有... / vim / runtime / 插件 /sqlcomplete.vim,version at vim.org也不包含/ plugin文件:

    install details
    Copy sqlcomplete.vim to:
    .vim/autoload/sqlcomplete.vim (Unix)
    vimfiles\autoload\sqlcomplete.vim (Windows)
    
    For documentation:
    :h sql.txt 
    

    也许您安装错误。

    1. 链接上的文件标题为12,最新版本为15.尝试更新到最新版本

    2. 请注意,此插件未定义 SQLSetType命令。

    3. 您可以通过简单搜索文件链接来检查。在标题上:

      " Vim OMNI completion script for SQL
      " Language: SQL
      " Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
      " Version: 15.0
      " Last Change: 2013 May 13
      " Homepage: http://www.vim.org/scripts/script.php?script_id=1572
      " Usage: For detailed help
      " ":help sql.txt"
      " or ":help ft-sql-omni"
      " or read $VIMRUNTIME/doc/sql.txt
      

      关注:help sql.txt

      2.1 SQLSetType                  *sqlsettype* *SQLSetType*
      --------------
      For the people that work with many different databases, it is nice to be
      able to flip between the various vendors rules (indent, syntax) on a per
      buffer basis, at any time.  The ftplugin/sql.vim file defines this function: >
          SQLSetType
      

      脚本名称列出ftplugin/sql.vim

相关问题