On 29 июл, 09:02, Daniel Tripp <qpmirruvnnvwoca...@dt.theorem.ca> wrote: > Hello all. I have a situation that I can't figure out. > > Say that I have set a variable like this: > > :let desiredcolumn=42 > ... > 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?
Use cursor() function instead: :let g:desiredcolumn = 42 :map <F2> :call cursor(line('.'), g:desiredcolumn)<CR> Best wishes, Maxim. --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---