I wanted to remap (for normal mode) <C-a>
to <C-=>
and <C-x>
to <C-->
but it didn't work.
Is there another way to write this?
I wanted to remap (for normal mode) <C-a>
to <C-=>
and <C-x>
to <C-->
but it didn't work.
Is there another way to write this?
I'm not sure about <C-=>, but for <C-->, try <C-_> instead (replace hyphen with underscore).
I had a problem using and because my shell uses those to resize my window and font size. I was able to map '+' and '-' to the commands so pressing them in normal mode incremented and decremented values.
map + <C-a>
map - <C-x>
Is that what you were trying to accomplish? I don't know if that will work for you, since they probably have different uses that I don't use.
You could also use a mapleader instead of control to do this and not mess with any default uses:
let mapleader=","
map <Leader>+ <C-a>
map <Leader>- <C-x>
Instead of C-+ and C--, you would use ,+ and ,-.
Works for me.
map <C-a> <C-=>
map <C-=> :echo 'ken'<CR>
map <C-x> <C-->
map <C--> :echo 'barbie'<CR>
Then <C-a>
should echo ken
and <C-->
should echo barbie