首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >不是编辑器命令:PluginInstall,mac osx 10.12.6中的vim

不是编辑器命令:PluginInstall,mac osx 10.12.6中的vim
EN

Stack Overflow用户
提问于 2018-04-09 01:15:45
回答 5查看 7.8K关注 0票数 0

我的下一个问题是vim,我有一个Mac OsX 10.12.6,我配置了.vimrc,当我触摸ESC按钮和小费:PluginInstall时,告诉我下一个错误:

代码语言:javascript
运行
复制
E492: Not an editor command: PluginInstall

我遵循这个页面的教程,但是,我认为有一个问题,因为它不能正常工作,因为我不能用命令:PluginInstall安装任何插件,我已经安装了MacVim,我的.vimrc是next:

代码语言:javascript
运行
复制
set nocompatible              " required
filetype off                  " required

 set the runtime path to include Vundle and initialize
 set rtp+=~/.vim/bundle/Vundle.vim
 set splitbelow
 set splitright
 call vundle#begin()
 "split navigations
 nnoremap <C-J> <C-W><C-J>
 nnoremap <C-K> <C-W><C-K>
 nnoremap <C-L> <C-W><C-L>
 nnoremap <C-H> <C-W><C-H>
 " Enable folding
 set foldmethod=indent
 set foldlevel=99
 " Enable folding with the spacebar
 nnoremap <space> za
 " alternatively, pass a path where Vundle should install plugins
 "call vundle#begin('~/some/path/here')

 " let Vundle manage Vundle, required
 Plugin 'gmarik/Vundle.vim'
 Plugin 'tmhedberg/SimplyFold'
 Helptags

 let g:SimplyFold_docstring_preview=1
 " PEP8 indetantion
 au BufNewFile,BufRead *.py
    \ set tabstop=4
    \ set softtabstop=4
    \ set shiftwidth=4
    \ set textwidth=79
    \ set expandtab
    \ set autoindent
    \ set fileformat=unix
 " HTML, JS, CSS indentation
 au BufNewfile,BufRead *.js, *.html, *.css
    \ set tabstop=2
    \ set softtabstop=2
    \ set shiftwidth=2
 "Fix problem indentation PEP8
 Plugin 'vim-script/indentpython.vim'
 "Uneccesary whitespace
 au BufRead,BufNewfile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/
 " UTF8 support
 set encoding=utf-8
 "Autocomplete
 Bundle 'Valloric/YouCompleteMe'

 let g:ymc_autoclose_preview_window_after_completion=1
 map <leader>g :YcmCompleter GoToDefinitionElseDeclaration<CR>

 " python with virtualenv support

 py << EOF
 import os
 import sys
 if 'VIRTUAL_ENV' in os.environ:
     project_base_dir = os.environ['VIRTUAL_ENV']
     activate_this = os.path.join(project_base_dir, 'bin/activate_this.py')
     execfile(activate_this, dict(__file__=activate_this))
 EOF

 " Syntax Checkin/Highlighting
 Plugin 'vim-syntastic/syntastic'
 Plugin 'nvie/vim-flake8'
 let python_highlight_all=1
 syntax on

 "Color Shemes
 Plugin 'jnurmin/Zenburn'
 Plugin 'altercation/vim-colors-solarized'
 if has('gui_running')
     set background=dark
     colorscheme solarized
 else
     colorscheme zenburn
 endif
 call togglebg#map("<F5>")
 "File Browsing
 Plugin 'scrooloose/nerdtree'
 Plugin 'jistr/vim-nerdtree-tabs'
 let NERDTreeIgnore=['\.pyc$','\~$'] "Ignore files in NERDTree

 "SuperSearching
 Plugin 'kien/ctrlp.vim'
 "Line numering
 set nu
 "Git integration
 Plugin 'tpope/vim-fugitive'

 "Powerline
 Plugin 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim/'}

 "System clipboard
 set clipboard=unnamed
 "VIM in the shell
 set editing-mode vi

 " add all your plugins here (note older versions of Vundle
 " used Bundle instead of Plugin)

 " ...

 " All of your Plugins must be added before the following line
 call vundle#end()            " required
 filetype plugin indent on    " required

我尝试更改我的.vimrc,但现在出现的错误如下:

代码语言:javascript
运行
复制
dmuino@Diegos-MacBook-Pro:~$ vi .vimrc
Error detected while processing /Users/dmuino/.vimrc:
line    4:
E518: Unknown option: the 
line    8:
E15: Invalid expression: /Users/dmuino/.vim/bundle/Vundle.vim)
E116: Invalid arguments for function vundle#begin
Error detected while processing function vundle#config#bundle[2]..<SNR>5_check_bundle_name:
line    1:
E121: Undefined variable: s:bundle_names
E116: Invalid arguments for function has_key(s:bundle_names, a:bundle.name)
E15: Invalid expression: has_key(s:bundle_names, a:bundle.name)
line   11:
E121: Undefined variable: s:bundle_names
line    1:
E121: Undefined variable: s:bundle_names
E116: Invalid arguments for function has_key(s:bundle_names, a:bundle.name)
E15: Invalid expression: has_key(s:bundle_names, a:bundle.name)
line   11:
E121: Undefined variable: s:bundle_names
Error detected while processing /Users/dmuino/.vimrc:
line   25:
E492: Not an editor command:  Helptags
Error detected while processing function vundle#config#bundle[2]..<SNR>5_check_bundle_name:
line    1:
E121: Undefined variable: s:bundle_names
E116: Invalid arguments for function has_key(s:bundle_names, a:bundle.name)
E15: Invalid expression: has_key(s:bundle_names, a:bundle.name)
line   11:
E121: Undefined variable: s:bundle_names
line    1:
E121: Undefined variable: s:bundle_names
E116: Invalid arguments for function has_key(s:bundle_names, a:bundle.name)
E15: Invalid expression: has_key(s:bundle_names, a:bundle.name)
line   11:
E121: Undefined variable: s:bundle_names
Error detected while processing /Users/dmuino/.vimrc:
line  109:
  File "<string>", line 1
    import os
    ^
IndentationError: unexpected indent
Press ENTER or type command to continue
 set nu
 "Git integration
 Plugin 'tpope/vim-fugitive'

 "Powerline
 Plugin 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim/'}

 "System clipboard
 set clipboard=unnamed
 "VIM in the shell
 set editing-mode vi

 " add all your plugins here (note older versions of Vundle
 " used Bundle instead of Plugin)

 " ...

 " All of your Plugins must be added before the following line
 call vundle#end()            " required
 filetype plugin indent on    " required
EN

Stack Overflow用户

发布于 2020-09-11 19:37:06

E492是针对路径问题的,因为git将vundle文件克隆到了错误的位置。我想你必须提供绝对路径。Vundle插件还有很多vim无法处理的其他问题。最好的做法是在学习和应用配置设置时编写自己的配置设置。

票数 0
EN
查看全部 5 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/49720549

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档