简体   繁体   English

GVim无法识别插件中的命令

[英]GVim not recognizing commands in plugin

How do I get gvim to recognize sqlcomplete.vim commands? 如何使gvim识别sqlcomplete.vim命令?

I'm unable to use the sqlcomplete.vim plugin. 我无法使用sqlcomplete.vim插件。 When running :version I get the following output: 运行:version我得到以下输出:

在此处输入图片说明

and scrolling all the way to the bottom here is the rest of the output: 并一直滚动到底部,这是其余的输出:

在此处输入图片说明

and the env variables: 和env变量:

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

:echo $HOME
H:\

Here is the output of :scriptnames : 这是:scriptnames的输出:

在此处输入图片说明

When running the sqlcomplete.vim command such as :SQLSetType sqlanywhere the output I get is: 运行诸如:SQLSetType sqlanywhere之类的sqlcomplete.vim命令时,我得到的输出是:

在此处输入图片说明

How do I get gvim to recognize sqlcomplete.vim commands? 如何使gvim识别sqlcomplete.vim命令?

Another piece of helpful information is the output of :echo &rtp : 另一个有用的信息是: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

Some points you could check: 您可以检查以下几点:

  1. :scriptnames shows plugin \\sqlcomplete.vim :scriptnames显示插件 \\ sqlcomplete.vim

But the link you provided points to .../vim/runtime/ autoload /sqlcomplete.vim, there is no .../vim/runtime/ plugin /sqlcomplete.vim, and the version at vim.org also doesn't contains a /plugin file: 但是您提供的链接指向... / vim / runtime / autoload /sqlcomplete.vim,没有... / vim / runtime / 插件 /sqlcomplete.vim,vim.org上的版本也不包含/ plugin文件:

install details
Copy sqlcomplete.vim to:
.vim/autoload/sqlcomplete.vim (Unix)
vimfiles\autoload\sqlcomplete.vim (Windows)

For documentation:
:h sql.txt 

Maybe you have installed it incorrectly. 也许您安装不正确。

  1. The file on your link has version 12 at its header, while the latest version is 15. Try updating to the latest version 链接上的文件的标题具有版本12,而最新版本是15。请尝试更新为最新版本。

  2. Note that this plugin does not define the SQLSetType command. 请注意,此插件未定义 SQLSetType命令。

You could check that by simple searching the file the on link. 您可以通过简单地搜索文件on链接来检查。 And on its header: 并在标题上:

" 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

Following :help 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

And scriptnames is not listing ftplugin/sql.vim 而且ftplugin/sql.vim 列出ftplugin/sql.vim

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM