On Wed, Jul 29, 2009 at 9:47 AM, S. Cowles <scow...@ckhb.org> wrote: > > On Wed, 29 Jul 2009, Daniel Tripp wrote: > > > From: Daniel Tripp <qpmirruvnnvwoca...@dt.theorem.ca> > > > > Say that I have set a variable like this: > > :let desiredcolumn=42 > > And now I want to define a mapping that will go to that column on the > current > > line, using the <bar> command. My problem is that I can't figure out how > to > > substitute the variable's value into the 'count' argument of the <bar> > command. > > ... > > But instead of a constant like 42, I want to take the value from my > > 'desiredcolumn' variable. Something like this: > > :map <F2> desiredcolumn<bar> > > But of course that doesn't work. > > Any suggestions? > > > how about
:map <F2> :exec 'norm ' . desiredcolumn . '<bar><CR>' --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---