On Tuesday, September 22, 2015 at 3:10:58 PM UTC-5, Aleksey Tsalolikhin wrote:
> Hello,
> 
> 
> Background: I am editing multiple files and I would like to move to the next 
> file (:next) after running a command that leaves me at the "Press ENTER or 
> type command to continue" prompt.  I can do this by typing 
> 
> 
>    :next
> 
> 
> but I would like to use a keymapping to make it faster.  (I'm actually 
> teaching a five day class and I'm showing a lot of files in vim, a sort of 
> "vim slideshow" if you will).
> 
> 
> My .vimrc contains:
> 
> 
>    map <SPACE> :next<CR>
> 
> 
> and this works while I'm editing a file, but if after I run a command, I get 
> the "Press ENTER or type command to continue" prompt, and when I press SPACE 
> there, vim pops me back in the edit buffer FOR THAT SAME FILE.
> 
> 
> How can I make the mapping of SPACE to :next effective at the "Press ENTER" 
> prompt?
> 
> 
> I read :help mapmode and tried the following but alas they all have the same 
> behavior as "map" (pop me back in the same file):
> 
> 
> 
> omap <SPACE> :next<CR>
> nmap <SPACE> :next<CR>
> vmap <SPACE> :next<CR>
> cmap <SPACE> :next<CR>
> imap <SPACE> :next<CR>
> 
> 
> Best,
> Aleksey

Maybe just avoid the "hit enter" prompt in the first place? Try using a :silent 
on your command, or increase your cmdheight.

http://vim.wikia.com/wiki/Avoid_hit_enter

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to