Thanks guys for the replies. The best thing so far that I find is using v:operator and v:prevcount. Say that the command I typed is "3d2w" :echo v:operator --> d :echo v:prevcount --> 6 My guess for v:prevcount is 3 x 2, which is 6.
If somebody knows it is wrong, please let us know. On Sat, Nov 7, 2009 at 5:03 AM, Francisco Dibar <[email protected]> wrote: > > On Fri, Nov 6, 2009 at 4:46 PM, Christian Brabandt <[email protected]> > wrote: > > > > Hi Francisco! > > > > On Fr, 06 Nov 2009, Francisco Dibar wrote: > > > >> On Fri, Nov 6, 2009 at 12:15 AM, anna <[email protected]> wrote: > >> > > >> > Is is possible to get the last executed command in normal mode? I want > >> > to echo the last executed command. > >> > >> The last executed command is stored in register ": > >> So you can paste it from there. > >> > >> :h quote: > > > > Yeah, but this does not contain the last executed normal mode command > > (like in his example - which you didn't quote - was d6w). And as far as > > I know, there is no way to retrieve the exact command. You can retrieve > > the last command (echo v:operator) but I do not know how to receive it's > > argument (6w), it's not v:prevcount, unfortunately. > > > > regards, > > Christian > > you're right, sorry for the noise. > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
