sponsor Vim development Vim logo Vim Book Ad

text object left and right : text oject for left and right of a statement

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

created by
Vinh Tran
 
script type
utility
 
description
This simple script create text object for left and right of a statement. e.g

stri|ng = "Hello World"


| is where your cursor is, in command mode
type ciL (change inner and L for the right hand sided)

the line will become

string = |

similarily

ciH, diH, yiH etc will change, delete, yank the left hand side of the statement

this also works for ==, => as well

Note if the line end with ',' or ';' it will be the boundary of the right hand side
If there is a space before the separator (=, ==, =>) or after, they are so the the boundary
 
install details
 

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
left_right_text_object.vim 1.2 2011-03-29 7.0 Vinh Tran Previous version contain a use of one of my other plugin. This remove that part
left_right_text_object.vim 1.0 2011-03-18 7.0 Vinh Tran Initial upload
ip used for rating: 18.222.120.133

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.
   
Vim at Github