85 votes
Accepted

Why does vim use hjkl for cursor keys?

From http://www.catonmat.net/blog/why-vim-uses-hjkl-as-arrow-keys/: When Bill Joy created the vi text editor he used the ADM-3A terminal, which had the arrows on hjkl keys. Naturally he reused the ...
nobe4's user avatar
  • 15.9k
28 votes
Accepted

Why doesn't my numpad work right in my terminal?

Short answer Turn off “application keypad mode switching.” Terminal-specific instructions PuTTY (also here): Terminal > Features > uncheck Disable application keypad mode SecureCRT: Session ...
Jacktose's user avatar
  • 843
28 votes
Accepted

How do I keep accidentally creating a no break space before opening curly brace?

Others have already provided work-arounds, but as for the reason why it happens, I bet you're accidentally pressing Alt+Space. I'm using Xubuntu with the 105-key Finnish keyboard layout myself, so ...
Ilmari Karonen's user avatar
27 votes

Why does vim use hjkl for cursor keys?

Nobe4's answer is great, and explains why we use hjkl very well. However, it's really interesting to see the full keyboard, and a lot of strange things about vim make more sense when you can see the ...
DJMcMayhem's user avatar
  • 17.4k
24 votes
Accepted

Expectations in how to get faster with Vim/Nvim?

I think for me the key was (and the optimization-happy engineer in me is aghast at this) not trying to vim-golf my motions. Because once you have to think about the motion it takes you out of the flow....
Jared Smith's user avatar
20 votes

How do I keep accidentally creating a no break space before opening curly brace?

You can add an autocommand that replaces non-breaking spaces with regular ones upon saving particular file types, eg. by putting something like this in your vimrc: augroup RemoveSpaces autocmd! ...
Endre Both's user avatar
17 votes

Why does vim use hjkl for cursor keys?

As to why these arrows were printed on these keys... it's because they could be used with the control key for local cursor movement. Ctrl-H and Ctrl-J (backspace and line feed) are obvious, and an ...
Random832's user avatar
  • 1,192
16 votes

How do I keep accidentally creating a no break space before opening curly brace?

The 'listchars' option provides a means to make 'list' display non-breaking spaces. It's not set by default, so you probably want to add it. set listchars+=nbsp:‗
jamessan's user avatar
  • 10.9k
16 votes

Expectations in how to get faster with Vim/Nvim?

What helped me was to vocalize the commands I'm issuing in my head while keying them into Vim, e.g.: "change inside quotes" ⇒ ci" "goto definition" ⇒ gd "change ...
Georg Berky's user avatar
9 votes

How to enter tilde (~), back tick (`) and special chars with a non-US keyboard?

From :he digraph: Digraphs are used to enter characters that normally cannot be entered by an ordinary keyboard. Running :digraphs will show you the currently defined digraphs. ` is defined as '!...
8bittree's user avatar
  • 1,487
8 votes

Other ways to exit Insert mode besides Escape

I would suggest using my plugin vim-easyescape. Plug "zhou13/vim-easyescape" let g:easyescape_chars = { "j": 1, "k": 1 } let g:easyescape_timeout = 100 cnoremap jk <ESC> cnoremap kj <ESC> ...
Yichao Zhou's user avatar
7 votes

Other ways to exit Insert mode besides Escape

You can map Caps Lock to Control without installing any extra software: In Mac OS X visit System Preferences > Keyboard -> Modifier Keys In Linux execute: setxkbmap -option caps:ctrl_modifier ...
joeytwiddle's user avatar
  • 3,592
7 votes
Accepted

german umlaute mapping

You might want to look into digraphs, which give you a built-in solution to accents and umlauts in Vim. For umlauted "u" you can type: Ctrl+K, :, u Or: Ctrl+K, u, : See :help digraphs-use for ...
filbranden's user avatar
  • 28.4k
6 votes

How to disable hjkl movements?

I would do: nnoremap h <Nop> nnoremap j <Nop> nnoremap k <Nop> nnoremap l <Nop>
Vivian De Smedt's user avatar
5 votes
Accepted

Can I write Japanese (SKK) text in Vim?

OK, this took several days of struggle against the skk.vim plugin mentioned by @SatoKatsura. All the documentation is in Japanese therefore I still do not know of most of its features, and, certainly,...
grochmal's user avatar
  • 1,656
5 votes
Accepted

How to open a vertical split to the main view not just next to the current one in case of horizontal splitted viewport?

There isn't one single builtin command to open the buffer and position it, I don't believe. Option #1: Well, it turns out there is. The :botright {cmd} style of commands (e.g. :botright vsplit). If @...
B Layer's user avatar
  • 19.6k
5 votes
Accepted

What does c^n in vim do?

In normal mode, it basically moves your cursor down, it is like pressing RETURN. From :help CTRL-n: <NL> or CTRL-N [count] lines downward linewise. In insert mode, it ...
padawin's user avatar
  • 1,323
4 votes

How do I swap key bindings without breaking plugins?

EDIT @Octaviour's solution is way smarter, you should use it :-) Nonetheless I'll leave this answer here because I worked on it and because it contains some interesting part about the usage of <SID&...
statox's user avatar
  • 49.4k
4 votes

How do I swap key bindings without breaking plugins?

I think your best bet would be to remap everything that uses s in all modes. You are already aware of the command for normal mode I think, nnoremap. This changes the normal mode mapping only. Once you ...
Octaviour's user avatar
  • 942
4 votes

How do international users use Ctrl-] efficiently? Remapping?

In the place where ANSI US has [ and ] Nordic keyboards have å and ¨, of which the latter is really not bindable, since it sends "half a character" and waits for the character to be accented. For ...
algoni's user avatar
  • 141
4 votes
Accepted

Use the same key for `, ~, esc

As far as I know there is no built-in support for mappings that change based on the time you hold the key. But as the problematic key is Esc, you have some good alternatives: Use Ctrl+[, which works ...
mMontu's user avatar
  • 6,600
4 votes

Can I write Japanese (SKK) text in Vim?

Since I was in search for a good way to input unicode Japanese characters in VIM, this post was really helpful. I tried using skk.vim but found it really difficult, because contrary to the OP, I ...
aignas's user avatar
  • 141
4 votes
Accepted

NERDTreeMenu Remapping

if you look at the documentation (:help NERDTree-t), you'll see that each of the command have a name and a default key. To remap for example NERDTreeMapUpdir to the 'a' key, you just have to add to ...
godot's user avatar
  • 256
4 votes

Expectations in how to get faster with Vim/Nvim?

Jared Smith's answer is generally correct, but here I'll provide a few more hints on how to implement this. The very first thing you need to do, above all else, is to make sure you can touch-type (i.e....
cjs's user avatar
  • 347
3 votes

Other ways to exit Insert mode besides Escape

FWIW I use: :map! ;l ^[ :vmap ;l ^[ It feels similar to hitting Return. I use ; as the leader for other Insert-mode mappings too. The only time I've needed to type ';' + letter is when code ...
Antony's user avatar
  • 2,550
3 votes

Other ways to exit Insert mode besides Escape

I've been using Ctrl+3 since quite some time, I find it easier to type than most alternatives and seems to work nicely (at least on Linux). My Caps Lock is mapped to Ctrl, so it's very comfy to type ...
elias's user avatar
  • 131
3 votes

Can I write Japanese (SKK) text in Vim?

I'm trying to summarize here the experience of the other two users, while trying to keep it simple. Some issues were resolved (e.g. eskk now supports nvim). Also, I'm using pathogen which somewhat ...
x-yuri's user avatar
  • 349
3 votes

How do you set no timeout for a specific remap?

It sounds like you have something like noremap i d noremap ix ... other mappings starting with i And you are asking that for i the timeout is 0. In that case you would never be able to type any of ...
laktak's user avatar
  • 2,898
3 votes
Accepted

Auto replace special programming characters

If you're using vim, you want a :noremap variant. To apply this for just the current editing session, and just in insert mode, :inoremap [ { :inoremap ] } :inoremap 9 ( :inoremap 0 ) :inoremap 7 &...
Ed Grimm's user avatar
  • 201
3 votes
Accepted

is it possible to map numpad differently?

There are special keys <k0> to <k9> and <kPlus>, <kMinus>, <kDivide>, <kMultiply>, <kEnter>, and <kPoint>, which can be mapped separately, e.g., ...
Jürgen Krämer's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible