Linked Questions

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 ...
Revan Darth's user avatar
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 ...
Blaszard's user avatar
  • 555
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. ...
SLN's user avatar
  • 537
31 votes
9 answers
39k 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 (...
minseong's user avatar
  • 2,291
28 votes
2 answers
21k 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. ...
domi91c's user avatar
  • 469
28 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 &...
Christopher Bottoms's user avatar
23 votes
2 answers
7k 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 ...
John Winston's user avatar
27 votes
1 answer
8k 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-...
user1135541's user avatar
  • 1,103
11 votes
4 answers
11k views

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

When I edit file: /home/me/projects/myproj/src/util.c I would like to start terminal at: /home/me/projects/myproj/src. With Vim version > 8 I can run :terminal but it always starts at folder in ...
ephemerr's user avatar
  • 813
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: ...
user avatar
7 votes
1 answer
4k 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 ...
baxbear's user avatar
  • 314
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.
Geoff Lee's user avatar
  • 135
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&...
DJMcMayhem's user avatar
  • 17.5k
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+...
Raphael Ahrens's user avatar
9 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 ...
sudo bangbang's user avatar

15 30 50 per page
1
2 3 4 5 6