-
-
Notifications
You must be signed in to change notification settings - Fork 379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rails.vim indentation settings ignored in macvim #108
Comments
What does this tell you? |
shiftwidth=2
Last set from ~/.vim/bundle/vim-rails/autoload/rails.vim But in my vimrc: |
macvim installed from homebrew (vim version displayed 7.3.237) |
And you've verified that the autocmd is still present after starting Vim? |
Yes, it's presented. |
You're on a recent version of rails.vim, right? Does the javascript file have a modeline? I don't know what else could cause this to fail. Both of your autocmds work for me. The relevant portion of the code definitely runs after indenting is adjusted. You can try |
I use last version of rails.vim from github. All js files haven't modeline settings. Also I found that settings customization overrided by rails.vim settings only in macvim (vim works fine). This is macvim log when started opening js file: Executing User Auto commands for "Rails"
autocommand if &ft == 'javascript' | set tabstop=4 softtabstop=4 shiftwidth=4 expandtab | endif
Executing User Auto commands for "Rails"
autocommand if &ft == 'javascript' | set tabstop=4 softtabstop=4 shiftwidth=4 expandtab | endif
No matching autocommands
chdir(Rails/public/app)
fchdir() to previous dir
No matching autocommands
Executing BufRead Auto commands for "*.js"
autocommand setf javascript
Executing FileType Auto commands for "*"
autocommand call s:LoadFTPlugin()
Searching for "ftplugin/javascript.vim ftplugin/javascript_*.vim ftplugin/javascript/*.vim" in "/Users/gorkunov/.vim,/Users/gorkunov/.vim/bundle/applescript,/Users/gorkunov/.vim/bundle/bufkill,/Users/gorkunov/.vim/bundle/bufonly,/Users/gorkunov/.vim/bundle/camelcasemotion,/Users/gorkunov/.vim/bundle/command-t,/Users/gorkunov/.vim/bundle/fugitive,/Users/gorkunov/.vim/bundle/git,/Users/gorkunov/.vim/bundle/haml,/Users/gorkunov/.vim/bundle/nerdcommenter,/Users/gorkunov/.vim/bundle/nerdtree,/Users/gorkunov/.vim/bundle/rvm,/Users/gorkunov/.vim/bundle/scss-syntax,/Users/gorkunov/.vim/bundle/supertab,/Users/gorkunov/.vim/bundle/surround,/Users/gorkunov/.vim/bundle/tabular,/Users/gorkunov/.vim/bundle/vim-easymotion,/Users/gorkunov/.vim/bundle/vim-indent-guides,/Users/gorkunov/.vim/bundle/vim-rails,/Users/gorkunov/.vim/bundle/vim-ruby,/Applications/MacVim.app/Contents/Resources/vim/vimfiles,/Applications/MacVim.app/Contents/Resources/vim/runtime,/Applications/MacVim.app/Contents/Resources/vim/vimfiles/after,/Users/gor
...
chdir(/Applications/MacVim.app/Contents/Resources/vim/runtime/ftplugin)
fchdir() to previous dir
line 17: sourcing "/Applications/MacVim.app/Contents/Resources/vim/runtime/ftplugin/javascript.vim"
finished sourcing /Applications/MacVim.app/Contents/Resources/vim/runtime/ftplugin/javascript.vim
continuing in function <SNR>14_LoadFTPlugin
Searching for "/Applications/MacVim.app/Contents/Resources/vim/runtime/ftplugin/javascript_*.vim"
...
chdir(/Users/gorkunov/.vim/after/ftplugin)
fchdir() to previous dir
line 17: sourcing "/Users/gorkunov/.vim/after/ftplugin/javascript.vim"
finished sourcing /Users/gorkunov/.vim/after/ftplugin/javascript.vim
continuing in function <SNR>14_LoadFTPlugin
Searching for "/Users/gorkunov/.vim/after/ftplugin/javascript_*.vim"
...
Executing FileType Auto commands for "*"
autocommand call s:LoadIndent()
Searching for "indent/javascript.vim" in "/Users/gorkunov/.vim,/Users/gorkunov/.vim/bundle/applescript,/Users/gorkunov/.vim/bundle/bufkill,/Users/gorkunov/.vim/bundle/bufonly,/Users/gorkunov/.vim/bundle/camelcasemotion,/Users/gorkunov/.vim/bundle/command-t,/Users/gorkunov/.vim/bundle/fugitive,/Users/gorkunov/.vim/bundle/git,/Users/gorkunov/.vim/bundle/haml,/Users/gorkunov/.vim/bundle/nerdcommenter,/Users/gorkunov/.vim/bundle/nerdtree,/Users/gorkunov/.vim/bundle/rvm,/Users/gorkunov/.vim/bundle/scss-syntax,/Users/gorkunov/.vim/bundle/supertab,/Users/gorkunov/.vim/bundle/surround,/Users/gorkunov/.vim/bundle/tabular,/Users/gorkunov/.vim/bundle/vim-easymotion,/Users/gorkunov/.vim/bundle/vim-indent-guides,/Users/gorkunov/.vim/bundle/vim-rails,/Users/gorkunov/.vim/bundle/vim-ruby,/Applications/MacVim.app/Contents/Resources/vim/vimfiles,/Applications/MacVim.app/Contents/Resources/vim/runtime,/Applications/MacVim.app/Contents/Resources/vim/vimfiles/after,/Users/gorkunov/.vim/bundle/tabular/after,/Users/gorkunov/.vim/a
...
chdir(/Users/gorkunov/.vim/indent)
fchdir() to previous dir
line 14: sourcing "/Users/gorkunov/.vim/indent/javascript.vim"
Error detected while processing /Users/gorkunov/.vim/indent/javascript.vim:
line 16:
E486: Pattern not found: \r$
finished sourcing /Users/gorkunov/.vim/indent/javascript.vim
continuing in function <SNR>15_LoadIndent
Searching for "/Users/gorkunov/.vim/bundle/applescript/indent/javascript.vim"
...
chdir(/Applications/MacVim.app/Contents/Resources/vim/runtime/indent)
fchdir() to previous dir
line 14: sourcing "/Applications/MacVim.app/Contents/Resources/vim/runtime/indent/javascript.vim"
finished sourcing /Applications/MacVim.app/Contents/Resources/vim/runtime/indent/javascript.vim
continuing in function <SNR>15_LoadIndent
Searching for "/Applications/MacVim.app/Contents/Resources/vim/vimfiles/after/indent/javascript.vim"
...
Executing FileType Auto commands for "*"
autocommand :call s:SetUpForNewFiletype(&filetype, 1)
Executing FileType Auto commands for "*"
autocommand exe "set syntax=" . expand("<amatch>")
Executing Syntax Auto commands for "*"
autocommand call s:SynSet()
Searching for "syntax/javascript.vim syntax/javascript/*.vim" in "/Users/gorkunov/.vim,/Users/gorkunov/.vim/bundle/applescript,/Users/gorkunov/.vim/bundle/bufkill,/Users/gorkunov/.vim/bundle/bufonly,/Users/gorkunov/.vim/bundle/camelcasemotion,/Users/gorkunov/.vim/bundle/command-t,/Users/gorkunov/.vim/bundle/fugitive,/Users/gorkunov/.vim/bundle/git,/Users/gorkunov/.vim/bundle/haml,/Users/gorkunov/.vim/bundle/nerdcommenter,/Users/gorkunov/.vim/bundle/nerdtree,/Users/gorkunov/.vim/bundle/rvm,/Users/gorkunov/.vim/bundle/scss-syntax,/Users/gorkunov/.vim/bundle/supertab,/Users/gorkunov/.vim/bundle/surround,/Users/gorkunov/.vim/bundle/tabular,/Users/gorkunov/.vim/bundle/vim-easymotion,/Users/gorkunov/.vim/bundle/vim-indent-guides,/Users/gorkunov/.vim/bundle/vim-rails,/Users/gorkunov/.vim/bundle/vim-ruby,/Applications/MacVim.app/Contents/Resources/vim/vimfiles,/Applications/MacVim.app/Contents/Resources/vim/runtime,/Applications/MacVim.app/Contents/Resources/vim/vimfiles/after,/Users/gorkunov/.vim/bundle/tabular/afte
Searching for "/Users/gorkunov/.vim/syntax/javascript.vim"
chdir(/Users/gorkunov/.vim/syntax)
fchdir() to previous dir
line 22: sourcing "/Users/gorkunov/.vim/syntax/javascript.vim"
finished sourcing /Users/gorkunov/.vim/syntax/javascript.vim
continuing in function <SNR>6_SynSet
Searching for "/Users/gorkunov/.vim/syntax/javascript/*.vim"
...
chdir(/Applications/MacVim.app/Contents/Resources/vim/runtime/syntax)
fchdir() to previous dir
line 22: sourcing "/Applications/MacVim.app/Contents/Resources/vim/runtime/syntax/javascript.vim"
finished sourcing /Applications/MacVim.app/Contents/Resources/vim/runtime/syntax/javascript.vim
continuing in function <SNR>6_SynSet
Searching for "/Applications/MacVim.app/Contents/Resources/vim/runtime/syntax/javascript/*.vim"
...
Executing Syntax Auto commands for "javascript"
autocommand if exists("b:rails_root") | call s:BufSyntax() | endif
Executing FileType Auto commands for "*"
autocommand if exists("b:rails_root") | call s:BufSettings() | endif
chdir(public/app)
fchdir() to previous dir
chdir(public/app)
fchdir() to previous dir
Executing BufRead Auto commands for "*"
autocommand if !did_filetype() && expand("<amatch>") !~ g:ft_ignore_pat | r |
raises some alarm bells. Can you fix that and see if the problem persists? |
I removed this file for experiment but nothing's changed. |
Can you try broadening the autocmd to
And then checking if it works in either JavaScript or Ruby? |
nothing's changed. Not for ruby, not for js. |
Well, given the lack of other clues, I'm going to give my standard advice of removing all other plugins, stripping down your vimrc, and seeing if the problem persists. If it doesn't, you're a binary search away from finding the cause. |
also I updated mac vim to snapshot n.61 (vim 7.3.260) when migrated to os x lion. |
I just tried in snapshot 61 on Lion and it works fine. |
Hopefully rendered moot now. |
I customize indention settings for vim on ubuntu with:
macvim ignores this line and uses default settings (indent=2).
Also i tried:
but has no effect too.
The text was updated successfully, but these errors were encountered: