Linked Questions
85 questions linked to/from How to debug a mapping?
3
votes
1
answer
1k
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
...
1
vote
0
answers
53
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 ...
1
vote
0
answers
34
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. ...
29
votes
9
answers
37k
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 (...
28
votes
2
answers
19k
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. ...
26
votes
3
answers
10k
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 &...
20
votes
2
answers
5k
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 ...
25
votes
1
answer
7k
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-...
10
votes
3
answers
9k
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 ...
9
votes
1
answer
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:
...
7
votes
1
answer
3k
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 ...
11
votes
1
answer
3k
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.
6
votes
3
answers
3k
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&...
8
votes
1
answer
4k
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+...
8
votes
2
answers
4k
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 ...