woodstok
woodstok

Reputation: 2794

using idioms in vim for perl

I have the perl-support plugin enabled. now, I tried the \idd idiom shortcut which would give you a my ($,$); statement with the cursor placed on the first var. Now the second var is displayed as <+name+>. In effect the my line after entering the first variables name would be

my ( $top, $<+name+> );

If it was a code snippet I could have easily used tab to go to the next field, but it is not working in this case. How do I quickly move to changing the 2nd part of the idiom?

Upvotes: 1

Views: 157

Answers (2)

Rob Kennedy
Rob Kennedy

Reputation: 163287

Those are jump targets, and you can visit them with Ctrl+J. See perlsupport-templates-jump for details.

Upvotes: 2

Nathan Fellman
Nathan Fellman

Reputation: 127468

If this is VIM, why don't you just use VIM's navigation keys for this?

3W (that is a capital W) will move you three words to the left, right onto $<+name+>.

You could also try:

f< to put the cursor on the <, and then you can change <+name+>.

Upvotes: 0

Related Questions