News for hackers. Stuff that matters.
Re:A Vim Guide for Advanced Users by lucb1e on Saturday February 27, 2021 @03:55PM (#26288078)
One thing I've never been able to figure out in Vim: why does O (insert new line above the current line and enter insert mode) often wait and hang? And when you start typing, it'll sometimes do random stuff? Is there a way to just make it behave like a true counterpart of o (insert new line below and enter insert mode)?
Re:A Vim Guide for Advanced Users by drewfish on Saturday February 27, 2021 @04:05PM (#26288161)
Re:A Vim Guide for Advanced Users by lucb1e on Saturday February 27, 2021 @04:21PM (#26288295)
Thanks! I never use arrows in insert mode so that's an easy choice for me, but removing 'nocompatible' from my vimrc does nothing and setting 'compatible' instead has side effects like not showing what mode I'm in. Not sure I need it, but I'm also wondering what other side effects I'll run into. The help file mentions a ton of things that I frankly don't care enough to comb through. The only thing I randomly spotted (and knew what it meant without digging deeper) is that this also breaks backspace in insert mode. Overall it makes vim feel quite a lot like vi.

Instead, setting nocompatible and timeoutlen=1 (1ms I guess? Help file doesn't say) works fine in my terminal, I guess because it's not over any sort of network connection. I'll give this a go and see if I run into any issues when using these escape-based features (afaik I use those only rarely) over the network.

Re:A Vim Guide for Advanced Users by gnubison on Saturday February 27, 2021 @10:14PM (#26290353)
Woah, I just looked at the Vim help page for 'timeoutlen' and the fact that it's in milliseconds is only mentioned below, under 'ttimeoutlen'. The Neovim help page specifies that it's in milliseconds.

I think that the Stack Overflow answer was just saying that the default depends on 'compatible'; not that the recommended solution is to go back to 'compatible'.

Re:A Vim Guide for Advanced Users by devenvdev on Sunday February 28, 2021 @11:58AM (#26294726)
You probably have a mapping for a multikey starting with O, I had this problem many times with different keys. You can search for it in `:map` or `:verbose map`. Or just `:map O` and tab for autocomplete (might work, not sure).
Re:A Vim Guide for Advanced Users by leadingthenet on Saturday February 27, 2021 @04:02PM (#26288138)
I think I remember having this issue in vim too. Don’t remember it ever crossing my mind since I’ve started using neovim, though, so maybe give it a try?
Re:A Vim Guide for Advanced Users by jonaustin on Sunday February 28, 2021 @11:56PM (#26299874)
Just add this to your .vimrc

set timeout timeoutlen=1000 ttimeoutlen=100 " Fix slow O inserts