Wednesday, July 28, 2010

Re: Feed keystrokes to Vim?

On 2010-07-28, Benjamin R. Haskell wrote:
> I think I'm flipping between too many programming languages at the
> moment. How do I feed a sequence of keys to Vim in Vimscript?
>
> E.g. Given: Goa<cr>b<esc>
>
> How do I get Vim to execute the 'G' command, 'o' command, insert an 'a'
> followed by a newline and a 'b', then exit insert mode?

How about this?

:exe "normal Goa\<CR>b\<Esc>"

Regards,
Gary

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: