vim - How can I get MacVim to properly indent my .vimrc -
vim - How can I get MacVim to properly indent my .vimrc -
i'm going through vimcasts.org archive of videos , number 5 covers using vim's auto-indentation format source code. see working in objective-c file not .vimrc.
my tab settings follows:
set tabstop=2 set shiftwidth=2 set softtabstop=2 set expandtab    my .vimrc file has  next if block:
if has("autocmd") filetype on autocmd bufnewfile,bufread *.rss,*.atom setfiletype xml autocmd bufwritepre *.py,*.js :call <sid>striptrailingwhitespaces() endif    i think if placed cursor on first line above , pressed vjjjj= second,  3rd ,  4th line indented 2 spaces, instead is:
if has("autocmd") filetype on     autocmd bufnewfile,bufread *.rss,*.atom setfiletype xml autocmd bufwritepre *.py,*.js :call <sid>striptrailingwhitespaces()     endif    are expectations wrong or right reason given vimscript language?
you need  add together filetype plugin indent on vimrc vim indentation properly. (the plugin part isn't necessary nice have)
i recommend replacing filetype on line filetype plugin indent on
 vim macvim 
 
Comments
Post a Comment