Hacker News new | ask | show | jobs
by billti 1457 days ago
Similar, but you can do most of those in one line! I also turn on line numbers and map "jk" to Escape in insert mode:

    set expandtab shiftwidth=4 softtabstop=4 tabstop=4
    syntax on
    set number
    inoremap jk <Esc>
2 comments

I tried that 'jk' thing way back, and I seem to recall it introducing some lag. Like a few milliseconds so it could process and see if you were hitting the followup key. Just enough to be annoying.
The lag thing is due to this:

If you type `j` in insert mode, it waits to see if there's a possible `k` following. That's the lag.

There's a setting for how long it waits.

I have the following in my .vimrc

> set timeout timeoutlen=3000 ttimeoutlen=100

Heh, jj for me and ji in visual mode since I might use jk there.