All Projects → lucapette → vim-textobj-underscore

lucapette / vim-textobj-underscore

Licence: other
Underscore text-object for Vim

Programming Languages

Vim Script
2826 projects

Introduction

The textobj-underscore plugin provides two new text-objects which are triggered by a_ and i_ respectively. You can use them when you have to deal with the following type of words:

  • foo_bar_baz

Now, suppose you have to change bar to qux (* for cursor position). You can do the following:

foo_b*ar_baz and type ci_ to get foo_*_baz. Or you can type da_ to get foobaz

Installation

I strongly recommend installing pathogen.vim.

cd ~/.vim/bundle
git clone git://github.com/lucapette/vim-textobj-underscore.git

Or you can unzip it in your ~/.vim directory. The plugin depends on the awesome vim-textobj-user by kana. So you need to install it in order to use this plugin.

Contributors

  • kana Use normal! instead of normal to avoid unexpected remapping.

Copyright

Copyright (c) Luca Pette. Distributed under the same terms as Vim itself.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].