78 questions linked to/from How to debug a mapping?
1k views

In my vimrc I have nnoremap <Leader>h :bp<CR> nnoremap <Leader>l :bn<CR> But I have to source my vimrc to enable them with (:so \$MYVIMRC). If I do a :map after starting vim I ...
513 views

### store regex searches in vimrc as mappings

In browsing markdown files, I find the following search useful /\v^(\*|#) However, when I try to map it I get an error nmap <c-j> /\v^(\*|#)<cr> E488: Trailing characters: #) What ...
1k views

### Mapping control-H in insert mode doesn't work; it always works like backspace

I tried mapping control-H, J, K, and L respectively in insert mode to move around splits. inoremap <C-h> <ESC><C-W><C-h>i inoremap <C-l> <ESC><C-W><C-l&...
1k views

### How to map shortcut to double square brackets?

When I type [[ or ]] in normal mode, cursor is jumping previous / next "class definition" during editing python (.py) file. I want to map these shortcuts to SHIFT + UP and SHIFT + DOWN. And I added ...
2k views

### mapping to quit using “<Ctrl> + q” not coming into effect [duplicate]

I am trying to map Ctrl + q to quit editing the file. I added the below line to my .vimrc nnoremap <C-q> :execute "q"<CR> On pressing the above key combination, nothing happens, vim ...
998 views

### inoremap only works after source

So I want to disable the arrow keys in insert mode. So I added the following lines at the end of ~/.vimrc: inoremap <up> <nop> inoremap <down> <nop> inoremap <left> <...
2k views

### Swap j and gj [duplicate]

I use vim a lot to edit tex files. When I have lines spanning multiple display lines, most of the time I want to navigate through them with gj not j (i.e. according to displayed lines, not physical ...
2k views

### vim split horizontal resize shortcut

I can resize horizontal split windows by ctrl-w-shift-< and ctrl-w-shift->. I would like to have a shortcut for that. Close to the topic, recently I learned about the following maps: nnoremap &...
871 views

### How to disable Help menu in insert mode?

I want to map <M-h> to ← in insert mode. I add imap <M-h> <Left> to .vimrc. But if I press <M-h>, Help menu will pop up. How to disable this and force <M-h> to ←...
1k views

### Can't remap <C-C> in vim

(NB: I've moved this question from another SE site, let me know if thats not ok and I can take this down) I'm having issues remapping Ctrl+Shift+c to copy visually selected text to the + register. ...
1k views

### <Esc> key mapping seems to be not working in my vim 8.0 on my Ubuntu 16.04

I have inoremap jj <ESC> in my vimrc on my Ubuntu 16.04. I have no idea why my jj not working and its just typing literally <ESC> in my text file for my jj press. Any idea how can I get ...
1k views

### Mapping key to execute shell script from vim

I would like to execute a shell script, with parameters, from vim by mapping it to F6, however the current mapping I have in my .vimrc isn't working: " Map F6 to sync project changes to dev server ...
238 views

### Assign shortcut to a Split window resize Ctrl+w+|

I can expand a vertical split screen to occupy most of the area using Ctrl+w+| Now I would like to map that shortcut to Ctrl+m. I tried the following but it failed. nnoremap <C-m> <C-W&...
269 views

### Vimrc tries to execute command defined on leader

I'm trying to have something like this in my .vimrc: nnoremap <leader>has :w | ! reset; runhaskell % <cr> How ever, now it prompts an error when loading .vimrc and tells me: :! reset; ...
433 views

### Alt-I doesn't work to inset \item in vim-latex

Hello Vimmers and LaTeXers, I cannot get Alt-I to work in vim-latex. It is supposed to insert \item depending on the environment that you are in. Do I need to activate it somehow? Is there a setting ...

15 30 50 per page