Reputation: 4721
For some reason, I can't seem to get vim-ruby to set the syntax of a Gemfile. Other functionality like ctrl-x + ctrl-o work though, so I know that it's installed properly (via vundle).
My .vimrc
is as shown:
" 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
And :scriptnames
shows:
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
Upvotes: 1
Views: 349
Reputation: 22734
Don't comment out filetype off
.
It is required if the Vim installed on your system does filetype on
by itself already. This prevents you from adding your own ftdetect scripts via plugin managers that manipulate the runtime path.
See the answers Why vundle requires filetype off and filetype on or filetype off? for more info.
Upvotes: 3