top | item 36339513

(no title)

bartq | 2 years ago

I tried to understand what vim/nvim is all about and why people love it so I've learned it a little bit. I grasped the Zen of VIM, it's actually very comfortable to navigate files and files tree assuming Ctrl is swapped with Caps Lock and you don't use ESC but Ctrl+] or jk/jj. BUT. But. but... VIM was shining when it was designed and created, it doesn't shine that much today, because for working with code you need things like LSP, syntax awareness etc. Thing like VS Code with Emacs cross platform keybindins AND WITH smartSelect is amazing for me.

Go to VSCode, put it into your `keybindings.json`:

    {
        "key": "ctrl+cmd+j",
        "command": "editor.action.smartSelect.expand"
    },
    {
        "key": "ctrl+cmd+k",
        "command": "editor.action.smartSelect.shrink"
    }

go to TS file and press keybinding multiple times to see how it grows/shrinks. Having Emacs keybindings like C-w, C-y, C-d (I'm using it to move char left), C-S-d (word left, S is shift, I'm using right one) and more I feel like flying through things like selecting block, expression, function, moving in and out etc. I guess Emacs people using paredit feel something similar taken to the next level.

Ideas in VIM are still brilliant, the same goes for Emacs, but they both need to reincarnate in modern skin taking pixel perfect GUIs with proper animations to the extreme. In fully multithreaded and multiprocess environment.

discuss

order

she11c0de|2 years ago

> VIM was shining when it was designed and created, it doesn't shine that much today, because for working with code you need things like LSP, syntax awareness etc.

This is not true at all. Nvim has built-in LSP support now, there's a huge amount of plugins you can use that integrate with LSP and they work great. I even use ChatGPT inside my vim (check out this plugin: https://github.com/dpayne/CodeGPT.nvim). The smart select functionality you mention is trivial to implement and I bet there is a plugin for this (btw, try `dit` to "delete in tag", or `di(` to delete in bracket, etc...).

I will admit that you have to spend a lot of time to configure it to your liking, not everybody wants to and I understand that.

Honestly I feel like (n)vim is going through a renaissance period lately, check out streamers like ThePrimeagen or TjDevries for some great content on how to get started.

bartq|2 years ago

You're defending n(vim)+plugins, not naked (n)vim and I agree it can be taken very far and can start to look like Emacs which integrates multiple external processes in single place. Actually anything can be taken anywhere with sufficient time and effort. That's the secret of transmutation. But you won't overcome the fact it uses terminal by default which I find subpar compared to pixel perfect GUIs. Terminal UIs are useful for sure, but I see them as a hidden cry of despair when people are trying to avoid touching modern GUI systems. The strength of vim (vim motions) should be stripped away and be embeddable in any other system as a leaf, not the other way around where (n)vim is in the center and other pieces are plugged into it. I know it's happening and you can use native nvim inside e.g. VSCode which is great.

I know there are tools like GVim etc, but again, they are created with high engineering effort which for some people is simply pleasant to undertake.

Again, I'm not trying to defend or favor any system, I'm actually using at the same time VSCode (for best TS intellisense), WebStorm (for refactors), nvim (for quick browsing and small config file edits) and Emacs (for Magit). My computer is my tool, not single thing inside it.