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

### Remapping motion keys [duplicate]

I recently found the awesome plugin named CamelCaseMotion which is awesome. I used their suggested mappings in my .vimrc for the plugin like this: map <silent> w <Plug>CamelCaseMotion_w ...
49 views

### How can I detect which command triggers a shortcut in a third-party package? [duplicate]

I remap Shift + k to noh, but once I installed ale, it is no longer working since one of the command on the package uses the shortcut. At least as far as I know, I feel that it is related to ...
28 views

### Mapping influenced my return key to toggle the syntastic check mode [duplicate]

I've mapped control-m to start the Syntastic check mode (Active/Passive) nnoremap <c-m> :SyntasticToggleMode<Cr> But in normal mode, when I tap the return key, it also toggles the mode. ...
7k views

### What does <Bar> mean?

In answering a question just now, I mentioned using a normal mode key mapping that can be found at the Vim Tips Wiki. In the middle of explaining the key mapping, I realized that I had no idea what &...
22k views

### arrow keys don't work in insert mode

When I hit the arrow keys in insert mode I get characters instead of navigation: I'd like to be able to use the arrow keys to navigate. Things I've tried I have set nocompatible in my ~/.vimrc (...
11k views

### File Type dependent key mapping

I'm trying to setup mappings for <C-]> that, depending on the buffer's file type, trigger different functions. For example, if I'm in a Javascript buffer, I want <C-]> to trigger :TernDef. ...
5k views

### Can I map a Ctrl + upper-case letter separately from Ctrl + lower-case letter?

I am trying to figure out how to navigate windows little quicker, so I would like to map the following: :nmap <silent> <C-F> :wincmd f<CR> The problem is this remaps the ^f (lower-...
5k views

### How to run internal vim terminal at current file's dir?

I edit file /home/me/projects/myproj/src/util.c And want to start terminal at /home/me/projects/myproj/src. Vim version > 8 so I can run :terminal but it always starts at folder in which I've opened ...
2k views

### Why does remapping <Esc> make the cursor jump?

In .vimrc: inoremap ii <esc> " ii to go back into command mode The problem is, after ii, cursor jumps 35 columns right. The only other line which affects Esc: ...
881 views

### What does <Plug> do in vim?

I came across <Plug> in this command of easy-motion nmap <Leader>w <Plug>(easymotion-overwin-w) I tried to search for the definition of but no luck. What does it mean? Does it have ...
2k views

### Separate C-m and Enter

I am using zsh, urxvt, tmux and in there vim. I am not 100% sure who causes the effect but I would like to bind something to ctrl and m but not to carriage return in vim. Does somebody how this is ...
2k views

### What does asterisk mean in vim mappings?

For example, easy clip has this mapping when you run smap k: s k * <C-o>"_ck The asterisk and <C-o> are highlighted.
3k views

### key mapping best practices

I found that I frequently needed a command in INSERT mode to open a line above the cursor (what O does in NORMAL mode) I put this in my .vimrc inoremap ao <esc>O It works well. I chose the ...
2k views

### Is it possible to map <C-S-Space> in neovim?

I usually use gvim and it understands the mapping similar to inoremap <C-Space> <C-n> inoremap <C-S-Space> <C-p> Now I'm testing nvim and I can use the Ctrl+Space. But Ctrl+...
2k views

### Strange behavior of <ctrl-j> remapping

I want ctrl-h, ctrl-j, ctrl-k and ctrl-l in insert mode to behave like the arrow keys. I have this (among other things) in my .vimrc: inoremap <C-j> <Down> inoremap <C-k> <Up&...
1k views

265 views

### Troubleshooting mapping

I have the following in my vimrc: nnoremap <C-J> o<Esc>k$nnoremap <C-K> O<Esc>j$ The bottom mapping works as expected, but c-j now produces the same effect as i (which is ...
143 views

### Change <up>/<down> to gk/gj in insert mode

I want to replace the default behavior of the arrows in insert mode, so that they behave like gk and gj, I have used: inoremap <up> <Esc>gka inoremap <down> <Esc>gja But this ...