This answer simply summarizes what we discussed in the comments. :)
This is most likely due to the fact that you have certain file options. To learn more about this, check out :h modeline . Make sure that these files have problems that do not have this line.
Instead of setting only tabstop and shiftwidth , you should also set a couple more settings for spaces and tabs.
set noexpandtab " Make sure that every file uses real tabs, not spaces set shiftround " Round indent to multiple of 'shiftwidth' set smartindent " Do smart indenting when starting a new line set autoindent " Copy indent from current line, over to the new line " Set the tab width let s:tabwidth=4 exec 'set tabstop=' .s:tabwidth exec 'set shiftwidth=' .s:tabwidth exec 'set softtabstop='.s:tabwidth
Watch this video for more information: http://vimcasts.org/episodes/tabs-and-spaces/
So this is the answer to the actual problem that you were able to solve. This php.php file was located in the /plugin directory. This directory is loaded once, each time Vim starts. Check this out: http://learnvimscriptthehardway.stevelosh.com/chapters/42.html#vimplugin
If you want this file to be downloaded only to PHP files, you should put it in the /ftplugin folder: http://learnvimscriptthehardway.stevelosh.com/chapters/42.html#vimftplugin
Read the documentation there, it should be a .vim file, in other words, in this case it will be called php.vim .
What Pathogen or Vundle to do is change the execution path ( :h runtimepath ), nothing more, nothing more.
So now you can accept this answer by clicking on the little green arrow to the left of this answer. :)
source share