31
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 ...
30
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 ...
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....
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!
...
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:‗
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 ...
9
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>
...
8
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 ...
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
...
6
votes
How to disable hjkl movements?
I would do:
nnoremap h <Nop>
nnoremap j <Nop>
nnoremap k <Nop>
nnoremap l <Nop>
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 ...
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 @...
5
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 ...
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 ...
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 ...
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&...
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 ...
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....
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 ...
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 ...
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 &...
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.,
...
3
votes
Accepted
Vim change keyboard language.. via shortcut
The proper syntax is
noremap gus :silent !setxkbmap -layout us<enter><C-L>
The exclamation mark introduces an external, shell command and Ctrl-L redraws the screen.
3
votes
What keys on my keyboard is <M-n>?
The meta key is another name for the alt key. This is akin to how the Windows key is called the super key in the Linux world.
3
votes
Accepted
How can I inhibit the effect of hitting Ctrl+Menu
I propose you to map the key sequence ^[[29^ to <Nop>
:noremap ^[[29^ <Nop>
3
votes
Accepted
How to completely change the `f` key to a `/` and the `F` key to a `?`
You should also add these mappings in Operator-pending mode to have df etc. commands work as expected. You probably also want these in Visual mode, so that f and / etc. work the same way when you're ...
2
votes
How do international users use Ctrl-] efficiently? Remapping?
I use a customized us layout and access ligatures by vim mappings and
OS option key mappings instead of spending a whole key on them.
For instance, I use aeo, which are adjacent on qgmlwb (jkl), to ...
2
votes
Ctags not working properly on Latin american keyboard
set tags=./tags means "path of the current file" not necessarily the current directory. The vim default set tags=./tags,tags would look in both path of current file and current directory. You can ...
2
votes
How do I keep accidentally creating a no break space before opening curly brace?
If you don’t want to type non-breaking spaces, you can just map them to normal spaces. Doing so globally can be done by this command (add it to your .vimrc or init.vim file):
execute "inoremap \...
2
votes
Numpad characters don't work in keybindings mappings (but work in general)
If I understand your question right, you are working in a terminal. Vim can't change the font size in a terminal. What you see, when pressing Ctrl-+ and Ctrl-- is a functionality of the terminal.
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
keyboard-layout × 55key-bindings × 32
vimrc × 6
terminal × 4
unicode × 4
neovim × 3
vim-windows × 3
insert-mode × 3
gvim × 2
microsoft-windows × 2
escape × 2
map-operator × 2
input-methods × 2
vimscript × 1
cursor-movement × 1
normal-mode × 1
visual-mode × 1
cursor-motions × 1
plugin-nerdtree × 1
macos × 1
ctags × 1
filetype-python × 1
linux-ubuntu × 1
mark × 1
text-generation × 1