0

Map semicolon to colon

local opts = { silent = true }
keymap("n", ";", ":", opts)

This works fine but not show command-line mode immediately after I just press semicolon. Actually it's already in command-line mode now but not showing in the status line until I press another key enter image description here

gary
  • 33
  • 1
  • 5
  • Can not reproduce. can you reproduce with `nvim --clean`? It is likely caused by your other configs, you need to debug yourself. – jdhao Sep 18 '22 at 07:59
  • @jdhao problems solved by remove the silent option. – gary Sep 18 '22 at 13:35
  • 1
    ah, this is the reason. I actually have met it before, but I kinda forgot, see the [issue here](https://github.com/vim/vim/issues/6832). In short, it make no sense to use `silent` for mapping involved with command line. – jdhao Sep 19 '22 at 03:45

1 Answers1

0

Removing the silent option solved the issue.

Wai Ha Lee
  • 8,598
  • 83
  • 57
  • 92
gary
  • 33
  • 1
  • 5