Skip to content

subhojit777/drupal-vim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vim plugins and settings for Drupal development

Vim plugins and settings that will ease writing Drupal code in Vim. Other than Drupal, these settings will also help you writing PHP and JavaScript. The settings will also work in graphical Vim (recommended).

Installation

1. cd
2. mv ~/.vim ~/.vim-bak // If you have vim settings. Else, proceed to next step
3. git clone git@github.com:subhojit777/drupal-vim.git ~/.vim
4. git clone git@github.com:VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
5. cp ~/.vim/vimrc ~/.vimrc
6. cp ~/.vim/gvimrc ~/.gvimrc // If you have graphical vim installed
7. mkdir ~/.vimsessions
8. mkdir ~/vimtmp
9. `sudo apt-get install exuberant-ctags` // Install exuberant-ctags on Ubuntu/Debian
10. `brew install ctags` // Install exuberant-ctags on OSX (Make sure you have [Homebrew](https://brew.sh/) installed)
11. vim +BundleInstall +qall

And you are good to go!

Features

Autocomplete

Autocomplete variables

Autocomplete syntax

Navigate through the list using <C-n> (next), <C-p> (previous).

Autocomplete syntax (after pressing ctrl-k)

Expand it by pressing ctrl-k key.

Note

Valloric/YouCompleteMe, with shawncplus/phpcomplete.vim is now used for auto-complete. Therefore, you have to generate the tags. Run the following command from inside the root of your project.

ctags -R  --languages=php

Asynchronous syntax checker using w0rp/ale

Asynchronous syntax checker

This is triggered on file save.

List of functions and variables

Functions and variables

Trigger it using <leader>tt.

View files and directories in project docroot

Files and directories

Trigger it using <leader>ntt.

This also uses jistr/vim-nerdtree-tabs, so the state is maintained across tabs.

And many other features.

Feel free to create issues here if you are having problem during the setup.

Pull requests are welcome for bugs/new features :)

Thanks for flying Vim :)