Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/vim/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
vim ruby未放入运行时路径_Vim - Fatal编程技术网

vim ruby未放入运行时路径

vim ruby未放入运行时路径,vim,Vim,出于某种原因,我似乎无法让vim ruby设置GEM文件的语法。不过,其他功能(如ctrl-x+ctrl-o)也可以正常工作,因此我知道它已正确安装(通过vundle) 我的.vimrc如下所示: " use syntax highlighting syntax on " make backspace do what it should "set backspace=eol,start,indent " set tab = 4 spaces set expandtab set sw=2 se

出于某种原因,我似乎无法让vim ruby设置GEM文件的语法。不过,其他功能(如ctrl-x+ctrl-o)也可以正常工作,因此我知道它已正确安装(通过vundle)

我的
.vimrc
如下所示:

" use syntax highlighting
syntax on

" make backspace do what it should
"set backspace=eol,start,indent

" set tab = 4 spaces
set expandtab
set sw=2
set sts=2
set ts=2

" set tab = 2 spaces if ruby file
"autocmd Filetype ruby setlocal ts=2 sts=2 sw=2

" fix splitting from opening in the wrong place
set splitright
set splitbelow

" fix auto-indent pasting
set paste

" use the mouse
set ttyfast
set mouse=a
set ttymouse=xterm2

"" Vundle
set nocompatible
"filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()

Bundle 'gmarik/vundle'
Bundle 'tpope/vim-rails'
Bundle 'scrooloose/nerdtree'
Bundle 'mattn/webapi-vim'
Bundle 'mattn/gist-vim'
Bundle 'tpope/vim-markdown'
Bundle 'vim-ruby/vim-ruby'

filetype plugin indent on
"
" Brief help
" :BundleList          - list configured bundles
" :BundleInstall(!)    - install(update) bundles
" :BundleSearch(!) foo - search(or refresh cache first) for foo
" :BundleClean(!)      - confirm(or auto-approve) removal of unused bundles
"
" see :h vundle for more details or wiki for FAQ
" NOTE: comments after Bundle command are not allowed..
"" End Vundle

" NerdTree
autocmd vimenter * if !argc() | NERDTree | endif

" gist-vim
let g:gist_detect_filetype = 1
let g:gist_post_private = 1

" vim-ruby
filetype on
filetype indent on
filetype plugin on
:scriptnames
显示:

  1: /usr/share/vim/vimrc
  2: /Users/bswinnerton/.vimrc
  3: /usr/share/vim/vim73/syntax/syntax.vim
  4: /usr/share/vim/vim73/syntax/synload.vim
  5: /usr/share/vim/vim73/syntax/syncolor.vim
  6: /usr/share/vim/vim73/filetype.vim
  7: /Users/bswinnerton/.dotfiles/vim/bundle/vundle/autoload/vundle.vim
  8: /Users/bswinnerton/.dotfiles/vim/bundle/vundle/autoload/vundle/config.vim
  9: /usr/share/vim/vim73/ftplugin.vim
 10: /usr/share/vim/vim73/indent.vim
 11: /Users/bswinnerton/.dotfiles/vim/bundle/vim-rails/plugin/rails.vim
 12: /Users/bswinnerton/.dotfiles/vim/bundle/nerdtree/plugin/NERD_tree.vim
 13: /Users/bswinnerton/.dotfiles/vim/bundle/nerdtree/autoload/nerdtree.vim
 14: /Users/bswinnerton/.dotfiles/vim/bundle/nerdtree/lib/nerdtree/path.vim
 15: /Users/bswinnerton/.dotfiles/vim/bundle/nerdtree/lib/nerdtree/menu_controller.vim
 16: /Users/bswinnerton/.dotfiles/vim/bundle/nerdtree/lib/nerdtree/menu_item.vim
 17: /Users/bswinnerton/.dotfiles/vim/bundle/nerdtree/lib/nerdtree/key_map.vim
 18: /Users/bswinnerton/.dotfiles/vim/bundle/nerdtree/lib/nerdtree/bookmark.vim
 19: /Users/bswinnerton/.dotfiles/vim/bundle/nerdtree/lib/nerdtree/tree_file_node.vim
 20: /Users/bswinnerton/.dotfiles/vim/bundle/nerdtree/lib/nerdtree/tree_dir_node.vim
 21: /Users/bswinnerton/.dotfiles/vim/bundle/nerdtree/lib/nerdtree/opener.vim
 22: /Users/bswinnerton/.dotfiles/vim/bundle/nerdtree/lib/nerdtree/creator.vim
 23: /Users/bswinnerton/.dotfiles/vim/bundle/nerdtree/nerdtree_plugin/exec_menuitem.vim
 24: /Users/bswinnerton/.dotfiles/vim/bundle/nerdtree/nerdtree_plugin/fs_menu.vim
 25: /Users/bswinnerton/.dotfiles/vim/bundle/gist-vim/plugin/gist.vim
 26: /usr/share/vim/vim73/plugin/getscriptPlugin.vim
 27: /usr/share/vim/vim73/plugin/gzip.vim
 28: /usr/share/vim/vim73/plugin/matchparen.vim
 29: /usr/share/vim/vim73/plugin/netrwPlugin.vim
 30: /usr/share/vim/vim73/plugin/rrhelper.vim
 31: /usr/share/vim/vim73/plugin/spellfile.vim
 32: /usr/share/vim/vim73/plugin/tarPlugin.vim
 33: /usr/share/vim/vim73/plugin/tohtml.vim
 34: /usr/share/vim/vim73/plugin/vimballPlugin.vim
 35: /usr/share/vim/vim73/plugin/zipPlugin.vim
 36: /Users/bswinnerton/.dotfiles/vim/bundle/nerdtree/syntax/nerdtree.vim

不要注释掉
filetype off

如果安装在您系统上的Vim本身已经启用了
文件类型,则需要该选项。这防止您通过操纵运行时路径的插件管理器添加自己的ftdetect脚本


请参阅答案和了解更多信息。

不要注释掉
文件类型关闭
@glts,请将其作为正式答案发布。谢谢你:)!非常非常感谢。我假设它需要被注释掉,因为我在代码的后面有一个点:
filetype插件缩进。