• AVincentInSpace@pawb.social
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    9 months ago

    Vim and Neovim are pretty similar at this point honestly apart from the Lua and LSP integration (seriously, that feature is cool). The only difference I’ve really noticed is that in Neovim, when you :term, it opens the terminal in the active pane, putting the buffer you were working on in background. In Vim, it splits the screen and puts the terminal there. Vim also prompts you to confirm a :e if you haven’t saved the current buffer, even though it doesn’t close it, just puts it in the background (iirc?)

    In the original vi, when you cw it doesn’t delete the word right away, only changing the last character of it to a $ so you can see where it ends, to save screen refresh. (This was actually a concern on the 1970s modems on which vi was developed.) When you type, it looks like you’re overtyping the word, but when you go back to normal mode it redraws the line and shows the rest of the line shifted over appropriately, so you replaced the whole word. Vim and Neovim redraw the line with every keystroke, which is not a problem even on today’s shoddiest internet connections, and is much more intuitive. vi only starts to do that once the word you’re typing becomes longer than the word it’s replacing.

    • Arnaught@lemmy.blahaj.zone
      link
      fedilink
      arrow-up
      1
      ·
      9 months ago

      Is the LSP support in nvim better than what you can get with plugins? I’m using coc.nvim with vim and yeah it is really cool.

      I didn’t know about that :term difference. I think I prefer vim’s behavior there.

      If you have :set hidden, then the current buffer will be hidden when you open a different file, and you won’t be prompted. Without it, vim doesn’t allow hidden buffers and will discard the buffer when you open a different file (which is why it prompts you). Vim’s defaults are very odd sometimes.

      Huh, that cw behavior in vi does seem pretty jarring. Interesting, though. It makes sense why it was like that.