sponsor Vim development Vim logo Vim Book Ad

vim-textobj-quoted : A text-object for quoted text

 script karma  Rating -1/1, Downloaded by 352  Comments, bugs, improvements  Vim wiki

created by
Luca Pette
 
script type
utility
 
description
A custom text object for selecting quoted text. It depends on awesome Kana's https://github.com/kana/vim-textobj-user.


vim-textobj-quoted gives you two new text-objects:

* iq
That stands for Inner Quoted
* *_aq_*
That stands for Around Quoted

So, the two text-objects defined will work with the following quoting chars:

* { }
* " "
* ' '
* ( )

Please note that the defined text-objects are single-line oriented. I find them very useful in situations like the following (* indicated cursor position):

* "some awes*ome text"
* (some awes*ome text)
* {some awes*ome text}
* 'some awes*ome text'

In each case you could use commands like viq or ciq and select/cancel all the quoted text. Obviously, you can achive the same results using commands like vi" or vi{. Indeed, the real benefit you'll get using this plugin is that you will have to remember only the q char.
 
install details
Copy to your vim folder or use the rake task.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
vim-textobj-quoted.zip 0.0.1 2011-05-09 7.0 Luca Pette Initial upload
ip used for rating: 18.205.176.85

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
OSDN.net Logo