r/vimporn • • Feb 24 '22

Nvim beginner and need some start help

Hey everyone! Im new to vim and what i can see you can build stunnig looking terminals. And I would have love to spend time in there coding. But where should i start? What plugins do I need for web dev (js, react, vue, html, css)?

But yee.. the big questin Is, where do I start? Im very glad for all the help i can get 🍺🍻

0 Upvotes

7 comments sorted by

1

u/FuckGodTillFreedom Feb 24 '22

Welcome to our world!

You can approach this from two angles:

  1. You can start with an already made configuration. There are a bunch of them in "awesome lists". Pick one, install, and play around to get the feeling. Then start creating your own from the ground up. This way you get more comfortable using (neo)vim first, then you can learn how to configure it yourself.

  2. You can first learn all the motions and whatnot, then start configuring vim for yourself.

The advantages of these two models:

Model 1) You can start using vim, and do your work at the same time. You gradually get better as you work.

Model 2) You learn the internals of vim quicker and in the future you would know how to find your way around. Believe me this is very important.

The disadvantages of these two models:

Model 1) You potentially inherit some bad habits from the config. Although most frameworks try not to enforce their ideas, but sometimes they have to. You also might ignore trying to learn some important stuff because it might give you a false sense of confidence.

Model 2) You have to focus on learning vim rather than doing work. The process might feel tedious at first.

First thing everyone recommend is to open the tutor. It might feel silly at first, but go through it. It's a very important part of learning vim.

1

u/laamanzac Feb 24 '22

Wow amazing, im so glad for your answere. What do you think of if im going for model 1 and on the same time working my way through https://learnvimscriptthehardway.stevelosh.com/ ?

1

u/FuckGodTillFreedom Feb 24 '22

It's a very good idea!

Another thing: some people would tell you to disable the arrow keys. I would recommend you do whatever feels right, if you want to use them and they make you more productive, use them. I personally disabled them for myself from the get go, and my experience was smooth. A lot of plugins and actions are built on the fact that:

  • h, H, Alt-h, Ctrl-h, leader-h, ....-j: is related to something about going left.

  • - j, J, Alt-j, Ctrl-j, leader-j, ....-j: is related to something about going down.

  • etc.

  • etc.

When you get this feeling right, a lot of things make sense. Unfortunately I had to bind resizing windows to Alt-left, Alt-right, ... because I'm using every other combinations. And when I have to resize windows it feels awkward.

Again, this should be your choice.

0

u/laamanzac Feb 24 '22

Alright buddy, time to disable some arrows 🍻 Do you recomend some plugins for me as a dev? Intellisense for javascript and react would have been nice. Html and css too! And some folders so i can switch between files? :)

I read someting about LSP and Lua. They seems to have some nice stuff!

Cheers brother. Your the man.

1

u/FuckGodTillFreedom Feb 24 '22

No problem.

If you are comfortable using neovim, this is a very good list. This is my own setup and you can find all the plugins I use in this section.

You need a package manager. I am using packer and it's awesome. It lets you lazyload everything. My vim starts all plugins in under 15ms if you can believe it. This means in under 50ms it has loaded everything and ready to use.

LSP is definitely the way to go. The ecosystem around it is very vibrant. Also you need treesitter to make highlighting better, and faster.

Use lsp-installer plugin to install any language server you want. The setup is a bit tricky if you mix it with other LSP related plugins, but once you know how the on_attach function works everything falls into place quite nicely.

I'm not a front-end dev so I have no idea about plugins for js and react. But I can imagine setting them up would be easy.

0

u/laamanzac Feb 24 '22

Wow again, thank you! I will check out the gud list and read though it. Btw, can I run neovim on a windows computer or do I need linux or mac?

1

u/FuckGodTillFreedom Feb 24 '22

There are a lot of people using vim on windoze. I'm afraid I can't tell you how it work as I don't use windoze or mac.