

- SET EDITOR FOR VIM OSX INSTALL
- SET EDITOR FOR VIM OSX UPDATE
- SET EDITOR FOR VIM OSX SOFTWARE
- SET EDITOR FOR VIM OSX DOWNLOAD
They improve Vim… a lot! They are not specifically for PHP development but they will bring some great functionalities major IDEs have by default. The plugins of this section are simply the-best-and-must-have-plugins-of-the-death.
SET EDITOR FOR VIM OSX INSTALL
This second approach is more straightforward: all you need is to install gutentags plugin, configure it as you wish and you are ready to go! Essentials plugins Normally a tags file should appear in the. You can test if it works by opening any PHP file in your project and save it. It will generate the tags each time you save a PHP file.Īu BufWritePost *.php silent! !eval ' &. Now you need to change the permissions of the file:įinally you need to add the following line in your vimrc. tags" -fields =+aimlS -languages =php -PHP-kinds =+cdfint-av -exclude =composer.phar -exclude =*Test.php -exclude =*phpunit* -exclude = "\.git" PATH = "/usr/local/bin: $PATH " dir = "`git rev-parse -git-dir`" trap 'rm -f "$dir/$$.tags"' EXITĬtags -tag-relative =yes -R -f " $dir / $$.

git/hooks/ of your PHP project with the following content: Then you need to add a git hook to automatically generate this tag file.
SET EDITOR FOR VIM OSX SOFTWARE
A little suggestion: it’s good practice to keep all your compiled software at one place (I personally have them in the folder ~/bin): git clone ctags
SET EDITOR FOR VIM OSX DOWNLOAD
If it’s not available in your package manager, you will need to compile it.Įxecute these command lines and you will download and compile universal-ctags in the current directory. 1 - Universal ctagsįor this first approach to generate a tag file you need to use git for your PHP projects (and I secretly hope you do!).įirst you need to install universal-ctags in order to generate this tag file. I personally prefer the first one but you can of course test both. There are two solutions in order to generating this file: Universal ctags or Gutentags.

You need to declare your plugins between the lines call plug#begin and call plug#end. The keyword Plug need to be followed by any plugin’s github repository. The line Plug 'tpope/vim-fugitive' is an example of plugin you can install.

You only need to install it and put this configuration on top of your vimrc:Ĭall plug# begin ( '~/nvim/plugged' ) Plug 'tpope/vim-fugitive' call plug# end () Vim-plug is all you need to manage your Vim’s plugins.
SET EDITOR FOR VIM OSX UPDATE
This plugin is the mother-of-all-plugin: it will help you install new plugins, delete or update them via simple command lines. Plugin Managerįirst of all you need a plugin manager. If you just want a plain boring list, you can directly go to the plugin reference list at the end of the article. I try here to highlight every strength of every plugin I use. However, keep in mind that the plugin I refer to are more likely to work with Neovim. Neovim and Vim are almost the same software in practice, that’s why I refer to them in this article under the global name Vim. It should, but be aware I never tested it. I use these plugins with Neovim on Arch Linux, which means that I have no clue if they work on MacOs or Windows. I would be happy to help you as much as I can. You can as well look at my configurations for some specific plugins.įinally you can let a comment if you have difficulties configuring these plugins. If you need some concrete configuration examples you can have a look at my general vim configuration. That’s one of the multiple reason Vim is so great: you can make your own IDE which suits perfectly your needs and preferences. Of course you need to read the documentation of each plugins to configure them as you wish. Unlike many articles on the net, I tried to list and describe all the plugins which are necessary for a good PHP IDE. This configuration won’t block Vim to work perfectly with other plugins for different languages as well. The list of plugins I propose here will cover most of your needs: project management, autocompletion, PHPDoc generation, powerful search and replace tools, debugger… all these features will be at your fingertips, for free. “What? A PHP IDE with Vim? Are you insane?”Īm I? It’s definitely possible to make a very powerful IDE with Vim: you need to know what plugins to install and what are their purposes. I can see you spitting your cereals in front of you computer. If you want to build a complete Mouseless Development Environment, you might be interested by this book.
