I was going to write something long and smart about how its important to know what YOUR NEEDS are when it comes to coding and using specific IDEs and how do they satisfy them, but decided its best to cut to the chase and just post my VIM configs as requested by several from NYC Drupal User Group during our Feb 10 2010 monthly meetup.
Attached to this post ZIP file contains customized .vimrc and .vim folder which contains several plugins which make vim very useful when developing in PHP. Contents are dot files so you will not see them unless viewed through terminal or enable displaying hidden files on unix system. P.S. Windows users can use the same .vimrc and .vim but make sure to google for instructions where to place them correctly.
Place both .vimrc and .vim in your $HOME directory so each will have the following respective paths: ~/.vimrc and ~/.vim
Attached _.ctags.txt file is CTAGS customization to perform PHP language map to drupal specific file extensions such as .test, .module, etc... Instructions: Place this file into webroot of your website that you are developing and make sure to rename it to ".ctags" (no leading _ and no .txt, i added these to be able to upload the file). To generate tags file you will need to run the following command in your webroot where you placed .ctags file (without quotes): "ctags -R ."
Without this file ctags will not know how to handle drupal specific files and you will not be able to use IDE features like code completion and jump to resource definition
If it is not clear how to use the customized plugins and other features once installed, leave a comment with your question for me to reply to.
edit:Last notes of wisdom: Make sure you are using _vim_ 7.2 or later, not _vi_(see the missing _m_?). Thx Rob Loach.
|myvim.zip||400.39 KB||117||21 hours 37 min ago|
|_.ctags_.txt||50 bytes||183||21 hours 36 min ago|
I suggest installing vim-full. The default vim package tends to be more limited in functionality. Also the ctags package name may be different.
sudo apt-get install vim-full exuberant-ctags
When I ran "vi", I got a bunch of errors. Forgot this was for "vim" :-) .
So, you'll need:
sudo apt-get install vim ctags