Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Making Vim word objects include sigils

by PlanetJelly (Initiate)
on Sep 26, 2014 at 15:20 UTC ( [id://1102149]=perlquestion: print w/replies, xml ) Need Help??

PlanetJelly has asked for the wisdom of the Perl Monks concerning the following question:

I'm starting to use Vim for editing my Perl scripts and I found that any time I do something like 'yiw' it does not include the sigil.

For example

my $pet = "dog";

Putting cursor on 'p' and copying the word copies pet instead of $pet.

Is a good idea or should it be avoided?
I tried searching for vim word objects to include sigils but didn't find anyone else doing this or even how to update the vim config file.

Replies are listed 'Best First'.
Re: Making Vim word objects include sigils
by farang (Chaplain) on Sep 26, 2014 at 15:35 UTC

    Not exactly a Perl issue, but using upper case W (for a whitespace delimited 'WORD') will do what you want, e.g. yiW

      Thanks!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1102149]
Approved by GotToBTru
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (7)
As of 2024-03-28 11:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found