User login

Auto-expand abbreviations in Vim

vim autocomplete, or really, autoexpand abbreviations

All about shortcuts as well as abbreviations:

To set abbreviations only for insert mode (which seems a little safer) add to your .vimrc file (or in Agaric's case, an included .vimrc-agaric file with all our Drupal and other development-specific additions) abbreviations in the format iab abbr abbreviation.

For instance, to go immediately to one that abuses the form but still works:

" autoexpanding abbreviations for insert mode
iab dvm drupal_set_message('<pre>'.var_export($form,TRUE).'</pre>'); //@debug

Now, whenever we type "dvm " (the letters d, v, and m followed by a space) this will be replaced with

drupal_set_message('<pre>'.var_export($form,TRUE).'</pre>'); //@debug

(Not the PHP tags, they're just there to make it look pretty.)

Don't forget to change $form to whatever variable you are looking for.