AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / computer / 问题 / 1643238
Accepted
Franc
Franc
Asked: 2021-04-21 04:45:45 +0800 CST2021-04-21 04:45:45 +0800 CST 2021-04-21 04:45:45 +0800 CST

TagList vim 插件不起作用

  • 772

我在使用taglist. 例如,如果 I TlistOpen,则显示错误E117: Unknown function: taglist#Tlist_Window_Toggle

我使用的是 Ubuntu18.04 , vimrc 如下所示;

test@test-VirtualBox:~/.vim/taglist/plugin$ cat ~/.vimrc
set nocompatible              " be iMproved, required
filetype off                  " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
set rtp+=~/.vim/taglist/plugin/
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')

" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'

" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
Plugin 'tpope/vim-fugitive'
" plugin from http://vim-scripts.org/vim/scripts.html
" Plugin 'L9'
" Git plugin not hosted on GitHub
Plugin 'git://git.wincent.com/command-t.git'
" git repos on your local machine (i.e. when working on your own plugin)
Plugin 'file:///home/gmarik/path/to/plugin'
" The sparkup vim script is in a subdirectory of this repo called vim.
" Pass the path to set the runtimepath properly.
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
" Install L9 and avoid a Naming conflict if you've already installed a
" different version somewhere else.
" Plugin 'ascenator/L9', {'name': 'newL9'}

Plugin 'taglist.vim'
" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList       - lists configured plugins
" :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
set tags=/home/test/code/tags

我将我的 taglist 克隆到.vim/taglist/plugin. 我Exuberant Ctags的安装在/usr/bin/ctags并且路径在PATH. 我已经安装了 vim 插件管理器vundle。我为目录设置了 cscope 和 ctags code。但是,当我TlistOpen进入时vim,它会引发错误消息E117: Unknown function: taglist#Tlist_Window_Toggle

vim vim-plugins
  • 1 1 个回答
  • 396 Views

1 个回答

  • Voted
  1. Best Answer
    romainl
    2021-04-21T08:50:12+08:002021-04-21T08:50:12+08:00

    让我们首先从您的 : 中删除所有评论噪音vimrc:

    set nocompatible              " be iMproved, required
    filetype off                  " required
    set rtp+=~/.vim/bundle/Vundle.vim
    set rtp+=~/.vim/taglist/plugin/
    call vundle#begin()
    Plugin 'VundleVim/Vundle.vim'
    Plugin 'tpope/vim-fugitive'
    Plugin 'git://git.wincent.com/command-t.git'
    Plugin 'file:///home/gmarik/path/to/plugin'
    Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
    Plugin 'taglist.vim'
    call vundle#end()            " required
    filetype plugin indent on    " required
    set tags=/home/test/code/tags
    

    以及 VundleREADME.md告诉您删除的示例:

    set nocompatible              " be iMproved, required
    filetype off                  " required
    set rtp+=~/.vim/bundle/Vundle.vim
    set rtp+=~/.vim/taglist/plugin/
    call vundle#begin()
    Plugin 'VundleVim/Vundle.vim'
    Plugin 'taglist.vim'
    call vundle#end()            " required
    filetype plugin indent on    " required
    set tags=/home/test/code/tags
    

    和不相关的样板:

    set rtp+=~/.vim/bundle/Vundle.vim
    set rtp+=~/.vim/taglist/plugin/
    call vundle#begin()
    Plugin 'VundleVim/Vundle.vim'
    Plugin 'taglist.vim'
    call vundle#end()            " required
    set tags=/home/test/code/tags
    

    引人注目的第一件事是您正在尝试手动管理该插件:

    set rtp+=~/.vim/taglist/plugin/
    

    并使用您的插件管理器:

    Plugin 'taglist.vim'
    

    这没有任何意义。

    引人注目的第二件事是您添加的是~/.vim/taglist/plugin/to:help 'runtimepath'而不是~/.vim/taglist/,这会阻止 Vim 找到~/.vim/taglist/autoload/并因此无法调用taglist#Tlist_Window_Toggle().

    改变:

    set rtp+=~/.vim/taglist/plugin/
    

    至:

    set rtp+=~/.vim/taglist/
    

    应该暂时让你摆脱困境,但你仍然会一团糟。

    我建议您放弃手动方法,让您的插件管理器处理所有事情:

    1. ~/.vim/taglist/从您的机器中删除。
    2. 从set rtp+=~/.vim/taglist/您的vimrc.
    3. 替换Plugin 'taglist.vim'为Plugin 'yegappan/taglist'您的vimrc.
    4. 阅读插件管理器的文档以熟悉它。
    • 1

相关问题

  • 向上滚动到 Vim 术语

  • 在 (L)Ubuntu 14.04 中从 Vim 8.1 降级到 Vim 7.4

  • VIM 正则表达式模式无法搜索和替换大括号之间的字符

  • Powershell 中的 Vim 在使用小键盘时插入不需要的 UTF-8 字符

  • 使用支持正则表达式的编辑器用指定字符包围特定字符串

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何减少“vmmem”进程的消耗?

    • 11 个回答
  • Marko Smith

    从 Microsoft Stream 下载视频

    • 4 个回答
  • Marko Smith

    Google Chrome DevTools 无法解析 SourceMap:chrome-extension

    • 6 个回答
  • Marko Smith

    Windows 照片查看器因为内存不足而无法运行?

    • 5 个回答
  • Marko Smith

    支持结束后如何激活 WindowsXP?

    • 6 个回答
  • Marko Smith

    远程桌面间歇性冻结

    • 7 个回答
  • Marko Smith

    子网掩码 /32 是什么意思?

    • 6 个回答
  • Marko Smith

    鼠标指针在 Windows 中按下的箭头键上移动?

    • 1 个回答
  • Marko Smith

    VirtualBox 无法以 VERR_NEM_VM_CREATE_FAILED 启动

    • 8 个回答
  • Marko Smith

    应用程序不会出现在 MacBook 的摄像头和麦克风隐私设置中

    • 5 个回答
  • Martin Hope
    Saaru Lindestøkke 为什么使用 Python 的 tar 库时 tar.xz 文件比 macOS tar 小 15 倍? 2021-03-14 09:37:48 +0800 CST
  • Martin Hope
    CiaranWelsh 如何减少“vmmem”进程的消耗? 2020-06-10 02:06:58 +0800 CST
  • Martin Hope
    Jim Windows 10 搜索未加载,显示空白窗口 2020-02-06 03:28:26 +0800 CST
  • Martin Hope
    v15 为什么通过电缆(同轴电缆)的千兆位/秒 Internet 连接不能像光纤一样提供对称速度? 2020-01-25 08:53:31 +0800 CST
  • Martin Hope
    andre_ss6 远程桌面间歇性冻结 2019-09-11 12:56:40 +0800 CST
  • Martin Hope
    Riley Carney 为什么在 URL 后面加一个点会删除登录信息? 2019-08-06 10:59:24 +0800 CST
  • Martin Hope
    zdimension 鼠标指针在 Windows 中按下的箭头键上移动? 2019-08-04 06:39:57 +0800 CST
  • Martin Hope
    jonsca 我所有的 Firefox 附加组件突然被禁用了,我该如何重新启用它们? 2019-05-04 17:58:52 +0800 CST
  • Martin Hope
    MCK 是否可以使用文本创建二维码? 2019-04-02 06:32:14 +0800 CST
  • Martin Hope
    SoniEx2 更改 git init 默认分支名称 2019-04-01 06:16:56 +0800 CST

热门标签

windows-10 linux windows microsoft-excel networking ubuntu worksheet-function bash command-line hard-drive

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve