Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The autocommand I would like to run is

au CmdlineModeEnter * wall

except that CmdlineModeEnter does not exist. I used to have a mapping defined like

nnoremap : :wall<CR>:

which worked fine except that the ":wall" flashing up was visible and distracting. Any ideas?

share|improve this question
up vote 1 down vote accepted
function! CmdlineEnter()
    silent! wall
    call feedkeys(":", 'n')
endfun

noremap <silent> : :call CmdlineEnter()<CR>
share|improve this answer
    
@Owen strictly speaking, Ex mode is what you enter with Q, not :: : enters Command-line mode (as do / and ?). – accolade Jun 17 '11 at 23:14
    
Thank you! That works! – Owen Jun 20 '11 at 20:46
    
Owen added silent! to suppress warnings. – BloodPhilia Jun 20 '11 at 20:56

Does this help?

nnoremap <silent> : :wall<CR>:

See

:help :map-<silent>
share|improve this answer
    
Yes, it does make the ":wall" go away... unfortunately it also hides the leading : until I type the next char ;). Oh well I think I'm just too picky. – Owen Jun 5 '11 at 6:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .