I often want to insert a single word with vim. Is there a way to insert as many Chars as you want until you type a <Space>
which then acts as an <esc>
?
I know that a normal i
with an <esc>
doesn't take too long, but I would like to have such a command and the <esc>
is quiet hard to reach.
Asked
Active
Viewed 83 times
2

sudo bangbang
- 27,127
- 11
- 75
- 77

Michael
- 657
- 5
- 22
-
How about doing a find replace? – Burhan Khalid Aug 21 '16 at 09:32
-
I don't know how... – Michael Aug 21 '16 at 09:53
-
http://vim.wikia.com/wiki/Search_and_replace – Burhan Khalid Aug 21 '16 at 09:56
-
6Get used to `esc`. Perhaps remap it... – Karoly Horvath Aug 21 '16 at 10:06
2 Answers
2
You should consider the following
- remap caps lock to esc or;
- remap caps lock to control, and then use
the alias for esc which is control-[.
Otherwise, though this isn't quite what you're looking for, see this post for a possible approach, but also read Ingo Karkat's answer there for why it may not be such a great idea to make such mappings.
-
-
1Another common hack is to `inoremap kj
| cnoremap kj – Amadan Aug 22 '16 at 02:17`, as `kj` almost never shows up in English text, is just under your fingers on a QWERTY keyboard, and you can just mash it with your middle and index finger.
0
Please mention the most underrated <C-c>

P4C
- 507
- 5
- 10
-
They often do the same thing, but they are [not equivalent](http://stackoverflow.com/questions/5030164/whats-the-difference-between-ctrlc-and-ctrl). You shouldn't train yourself to use one as a synonym for the other understanding the difference. – Amadan Aug 23 '16 at 03:37