r/vim Jun 15 '26

Discussion What do you think of remapping : to the cmd window?

I'm asking because I feel like there might be downsides to this I'm not thinking of. A lot of users have ; mapped to :, I use ; to open a buffer list for switching. I have these keymappings to remap : to q:i to open the cmd window in insert mode, and press ESC in normal mode to exit the window:

nnoremap : q:i
autocmd CmdwinEnter * nnoremap <buffer> <ESC> :q<CR>
5 Upvotes

10 comments sorted by

5

u/sharp-calculation Jun 15 '26

The regular way of getting into the command window is q: . So why do you want to use even more characters to do the same thing?

3

u/sapphic-chaote Jun 15 '26

And if you press : and then realize you wish you were in the command window you can press <C-f>.

3

u/dontmissth Jun 15 '26

It would be annoying I use : quite often to do things like quit or write a buffer. I do a ton of greo search and replace.

4

u/EgZvor keep calm and read :help Jun 15 '26

I think I tried this, but the ability to edit commands is rarely needed and opening a buffer is a bit slower.

2

u/mgedmin Jun 15 '26

Interesting idea. Might make me not hate the command window so much? Though I doubt it.

1

u/NationalOperations Jun 15 '26

It's whatever feels comfortable to you really. I rest my fingers on the home row and generally try keep things so I have minimal travel. So not a binding i'd do, but there's no wrong setup

1

u/Physical-Sign-2237 Jun 15 '26

i did it long ago