VIM FOR DRUPALLERS - portland2013.drupal.org ·...

13
VIM FOR DRUPALLERS Getting the most out of the ever-present editor October 21, 2012 by Patrick Teglia Sunday, October 21, 12

Transcript of VIM FOR DRUPALLERS - portland2013.drupal.org ·...

Page 1: VIM FOR DRUPALLERS - portland2013.drupal.org · vim-and-xdebug-dbgp-for-debugging-drupal-or-any-php-application.html Or search for “Vim Drupal Xdebug” ...

VIM FOR DRUPALLERSGetting the most out of the ever-present editorOctober 21, 2012 by Patrick Teglia

Sunday, October 21, 12

Page 2: VIM FOR DRUPALLERS - portland2013.drupal.org · vim-and-xdebug-dbgp-for-debugging-drupal-or-any-php-application.html Or search for “Vim Drupal Xdebug” ...

Who am I?Patrick Teglia (Pat, or CrashTest_)Senior Developer at Forum One building Drupal sites & mobile apps.Father of 3 very busy girls.Hiker, photographer, gamer.Not a Vim expert!

Sunday, October 21, 12

Page 3: VIM FOR DRUPALLERS - portland2013.drupal.org · vim-and-xdebug-dbgp-for-debugging-drupal-or-any-php-application.html Or search for “Vim Drupal Xdebug” ...

Questions to Answer:How do I set up Vim for Drupal?How do I customize Vim?What plugins can help?Can I debug with Vim?What can Vim do?Bonus: How do I learn Vim?

Sunday, October 21, 12

Page 4: VIM FOR DRUPALLERS - portland2013.drupal.org · vim-and-xdebug-dbgp-for-debugging-drupal-or-any-php-application.html Or search for “Vim Drupal Xdebug” ...

What is Vim (says Vim)?Vim is often called the “programmers editor”It is NOT vi. Vim is a tool that needs to be learned.

Sunday, October 21, 12

Page 5: VIM FOR DRUPALLERS - portland2013.drupal.org · vim-and-xdebug-dbgp-for-debugging-drupal-or-any-php-application.html Or search for “Vim Drupal Xdebug” ...

Why use Vim?“I didn’t know Vim could do that?!”It’s pretty much everywhereIt can be used simply or advanced.

Sunday, October 21, 12

Page 6: VIM FOR DRUPALLERS - portland2013.drupal.org · vim-and-xdebug-dbgp-for-debugging-drupal-or-any-php-application.html Or search for “Vim Drupal Xdebug” ...

Initial Setup - Get JanusTraditionally use .vimrc and .vim/Janus builds and keeps plugins up to date..vimrc.after == .vimrc.janus/ == .vim + pathogenhttps://github.com/carlhuda/janus

Sunday, October 21, 12

Page 7: VIM FOR DRUPALLERS - portland2013.drupal.org · vim-and-xdebug-dbgp-for-debugging-drupal-or-any-php-application.html Or search for “Vim Drupal Xdebug” ...

Janus installs plugins that work!Fugitive - git integrationCtrlP - fuzzy file searchNerd Tree - file explorer

Nerd Commenter - commentsSuperTab - tab completionSyntastic - syntax checkingBufferGator - buffer help

Sunday, October 21, 12

Page 8: VIM FOR DRUPALLERS - portland2013.drupal.org · vim-and-xdebug-dbgp-for-debugging-drupal-or-any-php-application.html Or search for “Vim Drupal Xdebug” ...

Drupal StandardsDrupal Vim page: http://drupal.org/node/29325

Sunday, October 21, 12

Page 9: VIM FOR DRUPALLERS - portland2013.drupal.org · vim-and-xdebug-dbgp-for-debugging-drupal-or-any-php-application.html Or search for “Vim Drupal Xdebug” ...

Customize!Janus comes with tons of colors schemes(Or you can make your own!)

Add custom vimrc entries to .vimrc.after

esc -> “:colorscheme molokai”

Sunday, October 21, 12

Page 11: VIM FOR DRUPALLERS - portland2013.drupal.org · vim-and-xdebug-dbgp-for-debugging-drupal-or-any-php-application.html Or search for “Vim Drupal Xdebug” ...

What Can Vim Do?Snippets (demo h_menu and mi)Fugitive (demo)\rt, \n, \b (demo)syntastic, tab complete (demo)ctrlp (demo). (repeat)

Sunday, October 21, 12

Page 12: VIM FOR DRUPALLERS - portland2013.drupal.org · vim-and-xdebug-dbgp-for-debugging-drupal-or-any-php-application.html Or search for “Vim Drupal Xdebug” ...

Where Can I Learn?Vim Tutorvimcasts.orgRead Janus’ doc!Game (http://vim-adventures.com/)#vim freenode (mad regexp skills)

Sunday, October 21, 12

Page 13: VIM FOR DRUPALLERS - portland2013.drupal.org · vim-and-xdebug-dbgp-for-debugging-drupal-or-any-php-application.html Or search for “Vim Drupal Xdebug” ...

THANK YOU!Any [email protected]

Sunday, October 21, 12