vimcmdline
vimcmdline copied to clipboard
Mapping colon to semi-colon causing vimcmdline commands to not work
I installed vimcmdline using Plug by placing the following line into my ~/.config/nvim/init.vim
:
call plug#begin('~/.config/nvim/plugged')
Plug 'jalvesaq/vimcmdline'
call plug#end()
I was able to install the plugin. Loading up a test.sh
file and then pressing <LocalLeader>s
starts up my interpreter. But if add the following mapping:
call plug#begin('~/.config/nvim/plugged')
Plug 'jalvesaq/vimcmdline'
call plug#end()
" Swap ; and :
" Avoid needing to use <SHIFT> for Ex commands
" Only applies in 'normal' mode
" E.g. ;w! - Will save the file
nnoremap ; :
nnoremap : ;
The interpreter no longer starts. Clearly, the mapping of the colon to semicolon is having an adverse effect on starting the interpreter and other vimcmdline arguments. Is there a way to get around this? Interestingly, when I use Nvim-R I don't have this problem.
I confirm the issue. The problem is that :call
is hardcoded in many places in vimcmdline. But many other plugins that I have installed do the same. I believe you would get similar result there:
cd ~/.config/nvim/plugged
grep --color -R ': call'
Any idea on how to avoid the problem?
Looking at the issue again, it seems to work if I map only ;
to :
(and don't map :
to ;
). Because ;
doesn't seem to be used for anything in Normal mode, it's harmless to be unable to type it.