I’m thinking of switching from VSC to VIM because VSC is too heavy in term of ressources usage.

Currently, I use the VSC + VIM extension and I’m pretty happy.

But nowadays, I avoid to open some monorepo projects because it takes too much time and I use the Github explorer instead. Also, I use the mouse too much.

So I finally took the decision to give a try to Neovim.

I initially started with SpaceVIM and it was a good experience. But there is too much magic for me. Also, I have the feeling to not learn VIM.

So I setup CoC with VIM-plug + NerdTree. It looks promising.

Do you have any tips for me?

  • zygo_histo_morpheus
    link
    fedilink
    arrow-up
    3
    ·
    1 year ago

    How familiar are you with vim? You’ve been using it with vscode for a while so I figure you’re somewhat familiar with vim shortcuts? If you haven’t already, you should run through vimtutor. The built in help is very good in vim, it’s good to develop a habit of using :help and :helpgrep before googling. When in help pages you can use C-] to go to references in the documentation.

    Some resources that I found useful when getting in to vim:

    Articles: Oil and vinegar, Death by a thousand files

    Talks: Let vim do the typing, How to do 90% of what plugins do with just vim

    Speaking of plugins, tpope has an excellent repo of very good plugins that feel like they fit in very naturally with vim. I can especially recommend fugitive, commentary and surround

    • madeindjs@lemmy.mlOP
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      Yeah, I’m familiar with shortcurts to move the cursor and text manipulation. But I’m not familiar with buffers, tabs and splitting window (i used VSC GUI to handle this part).

      I’ll have a look to your links, thank you very much

      • zygo_histo_morpheus
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        1 year ago

        The help pages for buffers, tabs and manipulating windows (:help CTRL-W) are always a good place to start!

        Some basic pointers:

        Buffers

        A buffer is some text that vim has in memory, usually linked to a file, but not necessarily.

        You might want to :set hidden to allow for buffers to exist without being open in any window.

        I have this mapping in my .vimrc for moving between buffers

        " switch between buffers
        nnoremap <leader>b :ls<cr>:b<space>
        

        If you hit the leader key (backslash by default) you can see all open buffers. You can then type one of the numbers preceding the buffers, or start typing the name of one of the buffers and then tab complete.

        Windows

        A window is a particular view into a buffer. You can have windows that point to the same buffer but are scrolled to different places which can be convenient if you want to look at different parts of the same file side by side for example. You can split the current window with C-W S (horizontally) or C-W V (vertically). You can also close the current window with C-W Q. One common way to move between windows is C-W + one of hjkl, but there are a ton of other ways that can sometimes be more convenient listed under :help CTRL-W.

        Tabs

        A tab is a collection of windows. You can create a new tab with :tabnew or C-W T. You can navigate between tabs with :tabnext or gt and :tabprev or gT. Tabs are usually a bit counter-intuitive when coming from other editors since they work differently in vim, but they’re very convenient once you get used to them imo.

        Jumps

        Jumps are also worth checking out, the short version is that you can go to your previous position with C-O and then back with C-I.

        • madeindjs@lemmy.mlOP
          link
          fedilink
          arrow-up
          1
          ·
          1 year ago

          Thank you very much. I already checked some blog post about it but it’s still very useful to hear iy in different words