Gvim / Git插件错误E492:不是编辑器命令:GitStatus

如何解决Gvim / Git插件错误E492:不是编辑器命令:GitStatus

首先,我认为这是我安装东西的问题,而不是软件包的问题。

在Windows上,我从下载了Vim的Git插件的zip文件。 https://github.com/WolfgangMehner/git-support

该zip文件名为git-support-master.zip,并具有以下树:

git-support-master\doc
git-support-master\git-support
git-support-master\plugin
git-support-master\project
git-support-master\syntax
git-support-master\README.md

我的$ HOME是c:\ Users \ myuser 而且我有c:\ Users \ myuser \ vimfiles。

我将说明解释为意味着我应该能够解压缩zip文件,以便上面zip中的doc文件进入上面的doc目录。为此,我必须提取修剪 路径中的git-support-master。

~ vimfiles/
  ~ autoload/
      pathogen.vim
  ~ bundle/
    + delimitMate/
    + nerdtree/
  ~ doc/
      gitsupport.txt
      tags
  ~ git-support/
    ~ doc/
        ChangeLog
    ~ git-doc/
        commands.txt
        compile_changelog.lua
        help_topics.txt
    + rc/
      README.md
  + pack/typescript/start/typescript-vim/
  ~ plugin/
      git-support.vim
  ~ project/
      release.lua
  + syntax/
    README.md
    vimrc

我的.vimrc是:

execute pathogen#infect()
syntax on
filetype plugin indent on
set nocompatible
let $ORACLE_HOME='C:\app\oracle\product\12.1.0\client'
set expandtab


nmap <C-n> :NERDTreeToggle<CR>
set autoindent
set sw=4
set clipboard=unnamed
set nu
set noerrorbells
set nohlsearch
set vb t_vb=

"if $OSTYPE=="cygwin"
"    set SHELL=C:\programs\cygwin\bin\bash.exe
"endif
"
"let g:Git_Executable = 'LANG=en_US git'
let g:Git_Executable = 'C:\programs\cygwin\bin\git.exe'

在git菜单中运行内容时,出现如下错误:

E492: Not an editor command: GitStatus

但是,它可以找到插件支持。

上面的Git可执行文件确实存在,是的,我正在使用它的Cygwin版本。

我运行了注释中提到的scriptnames命令,但是无法将其捕获到暂存缓冲区中,但是确实看到它没有加载任何与Git插件相关的内容。它加载了.vimrc,病原体vim插件。

我尝试了:GitHelp,它给了我:

usage: git [--version] [--help] [-C <path>] [-c <name>=<value>]
           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare]
           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
           <command> [<args>]

These are common Git commands used in various situations:

start a working area (see also: git help tutorial)
   clone             Clone a repository into a new directory
   init              Create an empty Git repository or reinitialize an existing one

work on the current change (see also: git help everyday)
   add               Add file contents to the index
   mv                Move or rename a file,a directory,or a symlink
   restore           Restore working tree files
   rm                Remove files from the working tree and from the index
   sparse-checkout   Initialize and modify the sparse-checkout

examine the history and state (see also: git help revisions)
   bisect            Use binary search to find the commit that introduced a bug
   diff              Show changes between commits,commit and working tree,etc
   grep              Print lines matching a pattern
   log               Show commit logs
   show              Show various types of objects
   status            Show the working tree status

grow,mark and tweak your common history
   branch            List,create,or delete branches
   commit            Record changes to the repository
   merge             Join two or more development histories together
   rebase            Reapply commits on top of another base tip
   reset             Reset current HEAD to the specified state
   switch            Switch branches
   tag               Create,list,delete or verify a tag object signed with GPG

collaborate (see also: git help workflows)
   fetch             Download objects and refs from another repository
   pull              Fetch from and integrate with another repository or a local branch
   push              Update remote refs along with associated objects

'git help -a' and 'git help -g' list available subcommands and some
concept guides. See 'git help <command>' or 'git help <concept>'
to read about a specific subcommand or concept.
See 'git help git' for an overview of the system.

解决方法

您似乎在混合三种不同的插件处理方法:

~ vimfiles/
  ~ autoload/
      pathogen.vim
  ~ bundle/

表明您正在使用病原菌

+ pack/typescript/start/typescript-vim/

表明您正在使用新的:help package功能,

我将说明解释为意味着我应该能够解压缩zip文件,以便上面zip中的doc文件进入上面的doc目录。为此,我必须从路径中提取修剪git-support-master。

表明您正在尝试以“经典”方式安装该插件。

您应该选择一种方法并坚持下去...

  • 通常认为经典方式比较凌乱,因此您应该避免使用它。
  • 如果您仅使用最新的Vim,则可能应将Pathogen视为已弃用,并选择新的“打包”方法(如果您不介意自己管理插件)或使用像vim-这样的功能强大的插件管理器,插头。
,

如果在 CMP 面板中输入错误命令后显示,则只需按 esc 然后再次输入您要运行的命令。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


依赖报错 idea导入项目后依赖报错,解决方案:https://blog.csdn.net/weixin_42420249/article/details/81191861 依赖版本报错:更换其他版本 无法下载依赖可参考:https://blog.csdn.net/weixin_42628809/a
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下 2021-12-03 13:33:33.927 ERROR 7228 [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPL
错误1:gradle项目控制台输出为乱码 # 解决方案:https://blog.csdn.net/weixin_43501566/article/details/112482302 # 在gradle-wrapper.properties 添加以下内容 org.gradle.jvmargs=-Df
错误还原:在查询的过程中,传入的workType为0时,该条件不起作用 &lt;select id=&quot;xxx&quot;&gt; SELECT di.id, di.name, di.work_type, di.updated... &lt;where&gt; &lt;if test=&qu
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct redisServer’没有名为‘server_cpulist’的成员 redisSetCpuAffinity(server.server_cpulist); ^ server.c: 在函数‘hasActiveC
解决方案1 1、改项目中.idea/workspace.xml配置文件,增加dynamic.classpath参数 2、搜索PropertiesComponent,添加如下 &lt;property name=&quot;dynamic.classpath&quot; value=&quot;tru
删除根组件app.vue中的默认代码后报错:Module Error (from ./node_modules/eslint-loader/index.js): 解决方案:关闭ESlint代码检测,在项目根目录创建vue.config.js,在文件中添加 module.exports = { lin
查看spark默认的python版本 [root@master day27]# pyspark /home/software/spark-2.3.4-bin-hadoop2.7/conf/spark-env.sh: line 2: /usr/local/hadoop/bin/hadoop: No s
使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams[&#39;font.sans-serif&#39;] = [&#39;SimHei&#39;] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -&gt; systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping(&quot;/hires&quot;) public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate&lt;String
使用vite构建项目报错 C:\Users\ychen\work&gt;npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-