4 ms·
Terminal is just the display, I'm talking about editor model. Even if the cursor is displayed as vertical bar, vi would still models it on-symbol and switching
by tliltocatl 2y ago
Terminal is just the display, I'm talking about editor model. Even if the cursor is displayed as vertical bar, vi would still models it on-symbol and switching between modes will move it sometimes inconsistently. Well explained here: https://www.reddit.com/r/vim/comments/99h4le/comment/e4nsx0m/ https://www.reddit.com/r/vim/comments/99h4le/comment/e4nsx0m...
- cess11 2y agoReddit doesn't like my network and I won't dig up some proxy they prefer. You can describe an incantation that will "move it sometimes inconsistently" instead.
- tliltocatl 2y agoMy personal take is just you have to remember what you did last to choose between "a" and "i". If you do i123<Esc>iabc, you get "12abc3" rather then "123abc". And then as the link says: - <Esc> moves to the left [...] but if you do i_Ctrl-O or i_Ctrl-\_Ctrl-O [...] it moves to the right!! - An empty line still allows normal mode to have a cursor, but since there are zero characters this cursor is kind of “fake”.
- cess11 2y agoNone of those are inconsistent. If a is confusing for you, use i, A and o, that'll be enough for most things you want. Most of the time you'll drop into insert mode through cw, cib and the like anyway. What do you mean by empty lines? Does your vim somehow have lines in the buffer that aren't in the file?
- tliltocatl 2y ago\n\n
- cess11 2y agoThat's two characters, i.e. not empty?
- teo_zero 2y agoI think the parent poster meant that two newlines in file are displayed as an empty line. That's ok. What's odd is that the cursor is allowed to stay in the empty line, as if it was on a virtual character at the end of the line. However, if the line is not empty, the cursor is not allowed to go one character right of the last one.
- teo_zero 2y agoThe point is that they teach you that 'i' enters insert mode and '<esc>' exits it. This is not true! It it was true and 'i' and '<esc>' only switched mode, then the sequence 'i<esc>' would have no effect. Instead 'i<esc>' leaves the cursor on another character.