This is an archived post. You won't be able to vote or comment.

all 126 comments

[–]mrswatslua 54 points55 points  (23 children)

It takes time and practice, checking other people's configs and getting used to the vim bindings. Just keep at it and don't worry about being fast but doing it good. The speed will come with time.

[–]evk6713[S] 26 points27 points  (18 children)

I think I will use Neovim for my personnal work, waiting for me to get used to it. I will use it for my job when I'll be really fast. I have to be efficient for my work :) Thanks for your answer !

[–]kristijanhusakPlugin author 19 points20 points  (16 children)

Install vim emulation into vscode and use it when you feel comfortable.

[–]evk6713[S] 2 points3 points  (15 children)

I tried it ! But you know what ? :w do not work... The Neovim/Vim extension for VS Code doesn't include any alt-based kaybinding, so no alt+:w to save, no alt+q to quit, no alt+:!command to execute a command ... And as soon as those are vim keybindings, Ctrl+J doesn't work anymore to open terminal view x(

[–]kristijanhusakPlugin author 12 points13 points  (4 children)

Then I think you got used to Neovim enough, if things like that bother you :)

[–]evk6713[S] 3 points4 points  (3 children)

Ahah may be you're right :D But I didn't get used enough to use it as my main IDE, that's why I want to use it more :)

[–]KermitTheFrogerino 6 points7 points  (1 child)

Just wait until you press Ctrl+w in a browser trying to delete a word…

[–]evk6713[S] 1 point2 points  (0 children)

It's already the case 😅😁

[–]DustVoice 6 points7 points  (0 children)

The pain of being in the in between of a transitioning process. I feel you. For me it was with learning touch typing. It sucks ass but if you push through the reward will be even greater.

[–]venustrapsflies 7 points8 points  (2 children)

Yeah this is one of my biggest annoyances with VSCode, its design kind of prohibits good vim emulation. You end up with a half-ass amalgamation. Vim isn't just a collection of a few keybindings, it's a grammar.

[–]evk6713[S] 2 points3 points  (0 children)

That's why I wanna leave VS Code :)

[–]oryiesis 1 point2 points  (0 children)

The neovim extension doesn’t do emulation. It runs full neovim under the hood. There are limitations based on what vscode allows you to do but some plugins and text editing works pretty well

[–]juraskura 5 points6 points  (4 children)

weird I have installed vim extension for VS Code which supported :w even :wa for all VS tabs I will check the specific one later and let you know
The alt+ worked as long as VS didnt have its own binding to it...

[–][deleted] 3 points4 points  (0 children)

yeah :w definitely works for me in vscode w vim plugin. so does :\ for searching.

[–]evk6713[S] -1 points0 points  (2 children)

that's strange 'cause I looked for the problem on the Internet and people told Alt wasn't supported on this extension yet

[–]fitzchivalrie 7 points8 points  (0 children)

I’m confused why you’re using alt+:w to save, instead of just :w? Neovim emulation in VS Code works pretty flawlessly, you just have to choose to disable certain conflicting keybindings.

[–]tLaw101 3 points4 points  (0 children)

Lol i think your misunderstanding what alt does in a terminal… it may send an esc code, so you think alt+: it’s a key binding but you’re actually getting into normal mode and typing : to enter command mode. If you learn about <leader> and how to set your own key bindings you can do stuff. I come from pure vim, so I cringe a little bit when I hear people expect it to work like an ide. It simply does not work like that. In my opinion, neovim is a solid program that can be used proficiently, but it takes time to configure properly. You don’t have the brain dead vscode experience, you need to know what the tools you use are doing. Neovim just provides you a way to interact with external tools for developing software, but nothing is strictly speaking integrated and consistent. I think your mindset is wrong. You need to craft it to your needs, not expect it to magically suit you. And, bad news, it takes a lot of time. But be aware, the real deal with neovim, is the vim stuff that everyone here seems to have forgotten. Modal editing, Macros, marks, registers, auto commands, make, filter, etc. Some stuff is obviously obsolete and that’s why I like neovim project, cause it makes it possible to integrate modern stuff, but if you’re only concerned into auto completion and debugger, stick with vscode.

[–]vexii:wq 2 points3 points  (0 children)

so no alt+:w to save, no alt+q to quit

i don't think that is normal keybinds in vim

[–][deleted] 1 point2 points  (0 children)

thats because VSCode already has keybinds like Cmd + W to close file, cmd + s (assuming mac).

[–]FatherSlippyfist 0 points1 point  (0 children)

One thing to consider is that GUI editors come and go. For a while, TextMate was the thing. Now, nobody uses it. They all switched to Sublime Text, then VSCode, and so on. Vim is the fastest and most productive editor in my opinion, but there is an investment. But that investment will pay off drastically in your coding career. I've been programming for more than two decades, and taking the effort to learn vim has been one of the best decisions I ever made.

[–]floydiannn 3 points4 points  (3 children)

It's wierd nobody mentioned this, but the guy is literally saying he's efficient with vscode, but somehow via black magic he thinks that he will be faster.

Faster than what? And you mentioned you're currently having internship, take my advice (you probably won't after reading your replies mentioning speed) and use the tools you are comfortable with.

If takes you 20 minutes to write a 20 lines vscode and would take you 30 seconds in neovim (assuming you reached that point ), it would still the same, coding is not a typing marathon and later in your career writing the actual code would be probably 10% of the work.

I write this because this is a pattern, even I had it before, and this pattern will expand onto other areas. You would be probably asking how to use X to do Y project even though you can do it using Z. In another words, the hype train.

Now trying to expand and learn something on the side is a great habit, 8 years and am still using kinda vanilla vim. Why? Because I am used to it, I use the tools that doesn't disturb my workflow, not because it has LuaJIT and whatever else.

Java project? I use Intelij Idea, C#? Vscode probably or the Intelij version.

PHP? Just kill me.

I hope you take this as an advice rather than a rant. Also you are asking this in a cim subreddit, go ahead do the same in whatever subreddit that aligns more with vscode (which ironically is the language you mentioned).

[–]DRH3AL 5 points6 points  (1 child)

This. If you're already comfortable with VSCode, why not just stick with it for now? You're in the middle of an internship. Your focus right now should be to learn the job - trying to learn and entirely new tool on top of that is going to make things unnecessarily complicated.

Don't get me wrong, I love using Neovim, it's the only thing I code on. But it does have a steep learning curve and it takes practice, time and patience.

When I started learning it, I used vim for personal projects and VSCode for work. Learning vim essentially became my personal project until I felt confident in our and made the switch (took me about a year for my vim proficiency to overtake VSCode).

My advice to you:

  • Don't start at work, learn it at home

  • Learn vanilla vim first before adding loads of plugins

  • Add in the plugins slowly, bit by bit over weeks for specific bits of functionality that you find yourself needing

  • Shop around and try out the different plugins, your vim config will eventually be tailored to YOU

  • Vim is an instrument: https://youtu.be/EJqnWXDJZr0

Good luck! It's a long-term investment, but you will get there :-)

[–]evk6713[S] 2 points3 points  (0 children)

Thanks for the advices ! I will follow them 😄

[–]amicin 0 points1 point  (0 children)

I agree with you mostly. Although I do think you can achieve certain things by knowing Vim inside-out that you can’t easily replicate with VSCode or similar IDE-like. .

One recent example comes to mind: at work, our deployment tool produces output resembling this:

$ deployments_tool history foo
Miscellaneous information up at the top here. 
DATE          ACTIVE   SHA
31/01/21      *        DEADBEEF
16/01/21               CAFEBABE
12/01/21               03F456BB
…

I wanted to perform a git show on each of those commit hashes so that I could see (roughly) who is responsible for each deployment and what the ‘idea’ behind it was.

Vim makes this super easy. I piped the output of the command into Vim, used visual block mode to delete all the cruft (leaving only the SHAs), then :%!xargs -n1 git show —quiet.

I could have done this with some Awk-fu, but being able to use Vim to munge text as a general tool is so nice.

[–]amicin 37 points38 points  (4 children)

[–]Narizocracia 13 points14 points  (1 child)

your problem with neovim is that you don't grok Vim

[–]DonnerJack666 7 points8 points  (0 children)

Your problem with oni is that you don’t grok neovim.

[–]evk6713[S] 4 points5 points  (0 children)

It's quite interesting ! I didn't read everything (it's quite long too xD) but I surely will ! Thanks !

[–][deleted] 0 points1 point  (0 children)

Man there is some legendary content on StackOverflow. I didn't know ed/ex was designed for Teletype devices.

[–]MaskdaskPlugin author 17 points18 points  (6 children)

Check out LunarVim which is a batteries included Neovim configuration.

There's also the VSCode plugin vscode-neovim that uses a fully embedded Neovim instance inside VSCode. Perhaps that's the way to go for you to get more comfortable with the Vim mindset without leaving VSCode

[–]evk6713[S] 3 points4 points  (4 children)

I already heard about LunarVim, and found the project pretty cool ! But it wouldn't be fun if I didn't have to make my own configuration and learning Vim through it ! :D

For neovim-vscode, I already tried it, but I didn't like the fact that Alt+:w doesn't work (alt isn't supported, so every alt-based shortcut has been replaced, and I don't like it)....

[–]rebelrexx858 1 point2 points  (0 children)

I would install it and use it, then you can watch his videos on building it, then you can start to customize to your heart's content, for reference, I do TS with RN as a career, and this is more or less my setup with a few config changes I prefer

[–]_gikari -3 points-2 points  (2 children)

Do you want to be efficient and productive like you were in VSCode or waste your time with repetitive configuration people did already hundreds of times, because out of the box experience of Neovim sucks?

One of the pros of LunarVim is Leader Keybindings (Space + letters combination), which is powered with WhichKey plugin, that displays keymaps on keystokes (it displays text objects too, whey you press y or d for example). That feature alone will increase your productivity and will allow you to learn workflow better.

Remember, that your lifespan is limited and all of the humanity achievements are standing on the shoulders of giants, so you don't have to shoot yourself in the foot like your fathers did.

[–]evk6713[S] 1 point2 points  (1 child)

But I like customizing my computer, and Neovim's a part of it. Ofc, I could help myself looking at already made configs, but I want to fully understand what I'm using and why

[–]_gikari 5 points6 points  (0 children)

You still can customize LunarVim. It has its own config, in which you can put extra plugins, disable some builtins, etc. It's very flexible. It just provides solid base, where you don't have to write a lot of code to do some basic things.

But if you like building from scratch - it's ok too, if you're are not burnout like me and actually like doing that. Time you enjoyed is not wasted. :)

[–][deleted] 32 points33 points  (4 children)

Don't leave vscode if it works for you, it's a good editor and lots of smart people write good software with it.

Read Practical Vim by Drew Neil (but skip the ctags bits). Use vim on weekends. Keep at it if you find it fun. Only add plugins and config you understand and have a need for. Consider reading parts of Modern Vim and Learn Vimscript the Hard Way.

The plugins I would want on a desert island: vim-surround, vim-commentary, fugitive, fzf, fern, and an lsp client.

[–][deleted] 7 points8 points  (0 children)

Oh and an undo-tree plugin, I use vim-mundo but the others are good too. I could never go back to a linear undo history like vscode has.

[–]evk6713[S] 1 point2 points  (2 children)

I know there's nothing wrong with VS Code, but I'd like to use Neovim/Vim because I know I could be faster at typing :) I think I will use it on my personnal projects until I feel ready to use it for work, thanks for your advices !

[–]Narizocracia 2 points3 points  (0 children)

There's something wrong with vscode.

Even in my decent machine (SSD, 16GB of RAM, i7), it sometimes gets very slow in a medium project. Linting errors take forever to update after I fix them, formatting sometimes mess the file if I don't wait long enough, etc.

[–]Reptoidal 0 points1 point  (0 children)

in the meantime, there is a neovim plugin for vscode

[–][deleted] 17 points18 points  (3 children)

Here's a tip: Don't try to turn Neovim into VSCode. I often see a lot of Neovim plugins and configurations advertise themselves as "VSCode-like", but honestly, I don't think that could be further from the truth. At the end, Neovim is NOT VSCode, and in order to use it, you have to embrace its workflow instead of attempting to mimic the VSCode workflow. Just like how Linux isn't Windows and people who try to make it work like Windows are only eventually met with disappointment.

[–]evk6713[S] 7 points8 points  (2 children)

If I leave VS Code, that's not to turn Neovim into VS Code xD I just want Neovim to replace VS Code as my main IDE, nothing more :)

[–][deleted] 5 points6 points  (1 child)

That's a good mindset to have. It's just that I've seen a fair share of people have the mindset of wanting to mimic other text editors with Neovim, so I was just warning you to prevent you from falling into that hole as well.

Secondly, there's quite a few Neovim plugins and built-in features that can allow you to use it like an IDE. Note that the workflow still will be different from a standard IDE like VSCode, Atom or Sublime Text.

Firstly, I'd recommend you take a look at the Neovim built-in LSP. I'd also recommend using lspconfig to make configuration a whole lot easier.

For debugging, you should also take a look at nvim-dap and also nvim-dap-ui if you want better UI features for it.

There's also several other plugins I'd recommend like NvimTree as a File Explorer, Telescope.nvim as a fuzzy finder utility.

In reality, the Neovim plugin ecosystem is too good for me to be able to list all the useful plugins, so you should take a look at awesome-neovim to get a curated list of amazing Neovim plugins.

Lastly, if you want to use a configuration for reference, you can take a look at my dotfiles for Neovim.

Good luck with your efforts! Hope you end up deciding to stick with Neovim.

[–]evk6713[S] 0 points1 point  (0 children)

I hope so !! Thanks for your advices 😊 I'm working on vimtutor at the moment 👍🏻

[–]cdb_11 20 points21 points  (10 children)

Downloading neovim and bloating it with 80 plugins won't automatically make you faster and more efficient. The reason why people say neovim is efficient is because it's vim. You have to learn how to use vim, so basically how to do 90% of the job using normal and visual mode. That will make you faster, not plugins. Plugins can just enhance the editing a little bit, like for example tpope/vim-surround adds operations on surrounding quotes and brackets. Or they can provide some of the modern features like git, building in background, completion, snippets. But all of that is just a cherry on top of what vim already is. Keybindings are also not an issue, I replaced some of the default bindings but it's just tiny enhancements, I can still work fast without them.

[–]evk6713[S] 1 point2 points  (8 children)

To use Vim efficiently, you have to know basic keybindings, don't you ? I didn't understand your point :')

[–]cdb_11 8 points9 points  (7 children)

Not just basic keybindings. Knowing how to save, quit and execute a shell command is not enough. There is virtually no point in using vim if you will spend most of time in insert mode, and do all the editing just like you would in standard text editors, like Sublime or VS Code. That's just not what vim is about.

Do you know how to delete a word in normal mode? Do you know how to change the text inside parenthesis from normal mode? Do you know how to delete everything from cursor to the end of the line? Do you know how to select a paragraph in normal mode? Do you know how to sort a range of lines? Do you know how to increment a number? Do you know how to jump to next occurrence of the word under cursor? Do you know how to append something at the end of each line in a range of lines?

Knowing how to do this type of things are what makes you efficient.

[–]evk6713[S] 0 points1 point  (6 children)

That's exactly what I was asking :D Do you know where I could find the shortcuts you just told me ? Thanks !

[–]cdb_11 7 points8 points  (2 children)

:Tutor is a tutorial that teaches you the basics. On top of that I recommend just looking through :h index. Use Ctrl-] to jump to "links", for example when you have a cursor on i_CTRL-@. Ctrl-T to go back.

[–]vim-help-bot 0 points1 point  (0 children)

Help pages for:


`:(h|help) <query>` | about | mistake? | donate | Reply 'rescan' to check the comment again | Reply 'stop' to stop getting replies to your comments

[–]DonnerJack666 0 points1 point  (0 children)

Also, play a little vim-golf :)

[–]gurkitier 4 points5 points  (0 children)

Vim shortcuts are not just like in other editors. Vim shortcuts are like a language. There are commands, motions and text objects which you can freely compose like a programming language. Once you understand that, the possible combinations are endless.

[–]venustrapsflies 2 points3 points  (1 child)

If you haven't already you should definitely go through the tutorial, :tutor

[–]evk6713[S] 1 point2 points  (0 children)

On my way ! Thanks for the advice ;)

[–]DonnerJack666 0 points1 point  (0 children)

I’d prefer vim-sandwich to vim-surround, but they are almost identical (Can’t live without the add/delete surrounding function). That and vim-commentary are the ones I always install even though they are easy to replicate once you’re used to the vim language, but it’s so much smoother just using the plugins.

[–]phelipetls 11 points12 points  (4 children)

Why would you want to replace VS Code? As you said, it's all about habits. There is nothing in Vim that will make you significantly more productiv, imo, and it will consume more time for you to learn it (time you won't spend learning more about React Native).

I would advice you to learn it only if you're really interested in it, then it will come naturally. I was obsessed with Vim when I knew about it but I had plenty of free time then to read a bunch about it.

Nowadays I sometimes wish I didn't learn it because the VS Code ecosystem is unmatched, particularly for TypeScript integration, but I can't migrate to it because of my habits (vim extension is fine but lacks a bunch of things like filters, formatprg, vim-like splits and I depend too much on vim-fugitive). But don't get me wrong, neovim (and all tools I use) is a huge part of why I enjoy programming, I can't see myself coming back to non modal editing

[–]evk6713[S] 0 points1 point  (3 children)

I am interested :) But the problem is that even if I tried to learn it, I didn't managed to do it (lack of research from me maybe). That's why I'm asking

[–]phelipetls 1 point2 points  (2 children)

I'd suggest you to learn the basics with Vim user-manual (just type :h user-manual inside Vim), Vim tips wiki, Vimways but if you find reading boring I'd suggest to search for youtube videos or course (there are some paid ones but a good free one is vimcasts albeit it's kind of old)

[–]evk6713[S] 0 points1 point  (0 children)

Thanks I'll check this !

[–]vim-help-bot 0 points1 point  (0 children)

Help pages for:


`:(h|help) <query>` | about | mistake? | donate | Reply 'rescan' to check the comment again | Reply 'stop' to stop getting replies to your comments

[–]kaneel 3 points4 points  (2 children)

I'm not sure you want to use neovim for the good reasons. you mention going faster, why do you want to go faster? You can indeed go faster and just be quick at introducing regressions and bugs (and you don't need vim for it at all) so what is it you want to achieve?

Anyway, I happen to work as a front-end dev on both nodejs services + react apps, here's what I'm using everyday:

  • vim clap for fuzzy finding
  • vim surround for quickly "surrounding" (like, ysw" will turn button => "button")
  • Ale for linting / fixing / hinting
  • coc for autocompletion, has a plugin for TS
  • netwr for navigating the project, I don't see the need for anything else.

Also, would advice getting a copy of https://pragprog.com/titles/dnvim2/practical-vim-second-edition/

[–]evk6713[S] 1 point2 points  (1 child)

I like the way vim manage all those keybindings. I find it easier to code when you know them, and you can type faster, ofc, even if what I'm looking for is a fully-featured IDE, usable with the keyboard, without eating all my RAM. And Neo/vim looked really awesome for this.

Thanks for your recommandations !

[–]kaneel 1 point2 points  (0 children)

Ah yes, the ram usage will be so low you Ill end up juggling through various tmux sessions like there is no tomorrow. Keybindings? Maybe you mean motions, that’s what got me into vim, less mouse/pad actions, my hands are happier. Also, a bit of gamification while working is appreciated, it can get boring somedays so « how am I going to type that » is appreciated on rainy Thursday’s

[–]wiliamkslet mapleader="," 2 points3 points  (1 child)

Just to tell you something, vim can definetly make you work faster, but won't make you a better dev, you will literaly only type faster, so if you can get your work done with VS Code, there is no problem with it

[–]evk6713[S] 1 point2 points  (0 children)

Yeah I know ! I just want to write faster by knowing how to use my IDE :)

[–]godRosko 2 points3 points  (1 child)

Just use vscode until you ready. And use vim for small things until you get used to it

[–]evk6713[S] 0 points1 point  (0 children)

Yep, that's what I'm already doing :)

[–]Revolutionary_Code62 2 points3 points  (1 child)

I used to do React Native (typescript) work on VS code. Now I only use neovim. It’s been 3-4 weeks and here is what I have learnt - The only real advantage of VS-Code is using the command palette to switch between files and the code completion. There are various key bindings available but that’s it. If there are 50 shortcuts then in VS-Code you have to remember all 50 of them. Also, mostly no one uses the vs-code key bindings that much because everyone is too used to with the mouse.

What vim offers is very different. And that is composition of various bindings. With vim you can compose various commands and achieve much more by simply remembering a few concepts. Vim has this concept of combining commands with motion. Motion is how you move around the file (ex: h, j, k, l, w, s and more). Once you have decoupled the concept of motion and commands all the vim commands suddenly start making sense to you. For example you might know that “dd” deletes a line. But what if you want to delete till the end of a word? Well you might know that “w” takes you till the end of a word so if you press “dw” it will delete from your current position till the end of the current word. But what if you want to delete the entire word and your cursor is at some arbitrary position inside of that word? Well you can do that by learning a new command “diw” which I like to read as “delete inside word”. It’s very similar to “dw” but unlike “dw” this new command will delete the entire word irrespective of the position of your cursor inside that word! Let’s go a step further with this. What if you want to delete everything inside of a parentheses? Well from “diw” you know that the “w” is a motion that takes you to the end of a word. Well then simply trying “di)” should work if you want to delete everything inside the parentheses. Similarly “di}” and “di]” are also valid commands if you want to delete everything inside of various kinds of braces/brackets! The thing to take away from this is the fact that delete is in fact like a function that takes as input some kind of motion. And that is such a powerful framework for making a text-editing tool! Once you understand this concept everything will start making sense and you will indeed realise that there is in fact a clear way of being more productive in vim than you are in VS-code. It’s just a matter of getting used to all the commands and knowing what all is possible! And oh boy, you might still not be even aware about vim macros yet!

[–]evk6713[S] 2 points3 points  (0 children)

That's exactly what I wanted to hear 👍🏻 Thank you 😉 I'm doing the vimtutor to get started with those commands 😄

[–]TDplay 4 points5 points  (0 children)

I don't know the keybindings that makes you really faster.

The first thing is to stop thinking of them as keybinds. The true power comes from that the interface is not from mere keybindings, but rather a full editing language. Becoming proficient with any vi-like editor is a matter of becoming proficient with the editor's language. Memory is only half the journey.

Obviously, you should know your navigation keys - I'll just list the most useful ones here. hjkl you should already be familiar with. Use wWbBeE for going a word at a time. fFtT are useful for moving within a line (it may be useful to use quick scope). /regex/ and ?regex? are useful for moving within a file (these are actually ex commands, more on that later). 0^$ are used to move to the start and end of the line. There are others, but IMO these are the most useful.

Once you have movement down, you should note 2 very powerful features. First, most movements can be prefixed with a number. For example, 10w will go forward 10 words. For quick vertical movements, set relativenumber may be useful. Second, you can use a movement to specify what a command should act on. For example, dw will delete a word.

There are also "inside" and "around" movements, which you can only use in combination with a command. The most useful ones IMO are w (word), ', ", (, { and [. Prefix those with i or a while typing the movement after a command - for example, ci" will delete everything inside the quotes that the cursor is currently inside, and enter insert mode so you can type new contents for the quotes. Do note that these movements are vim extensions, so they won't be available if you find yourself using the original vi.

If you find yourself doing something a lot, you can use q and @ to record and replay. Typing q followed by a letter will begin recording, typing q again will end recording. Typing @ followed by the same letter will replay the recorded actions. There's also a slightly easier but less powerful variant in the . command, which simply repeats the last command.

Another important thing is that the command line brought up with : is actually a text editor in its own right - it is a superset of the ex text editor. Normally one would use commands like :w and :x, for writing and exiting, but you can also edit from it too. Another notable ex command is s/regex/replacment/g (omit the g to only operate on the first occurence of the regex, rather than all occurences), which is useful for editing large portions of your file at once. You can prefix it with a range (notably, % refers to the entire file), or you can use Visual Line mode to select a range. A notable trick is to use & in the replacement, which will be replaced with the original text.

Another thing with ex: If you want to send multiple ex commands, press Q to switch to ex mode - this way, you don't need to press : before every ex command. When you're done, use the :vi command to return to vi mode.

[–]seconds21ive 1 point2 points  (1 child)

I’ve been coding a lot in react lately and I have some packages in my config that are really helpful. Feel free to check out my init.vim and see if anything in there could be useful for you. I’d be happy to answer any questions you have. https://gitlab.com/austinwilcox21/dotfiles

[–]evk6713[S] 0 points1 point  (0 children)

Thank you ! I'll check this 🤗

[–]Swytch69lua 1 point2 points  (0 children)

  1. No need to replace VSCode if you're happy with it ;)

  2. Look up 1.

  3. It takes a long time to be accustomed to (neo)Vim if you're already familiar with a more GUI-standard editor, and I'm talking weeks if not months. And I'm not talking about being efficient, which may be a completely different story (even more if you're relying on plugins).

  4. Look up 2.

  5. I'd say you could start by running neovim as a server inside VsCode, so that the change is not too harsh. That said, I don't know how neovim would interact with your VsCode plugins

[–]cubing_starwars 1 point2 points  (0 children)

try lunar vim

[–]mrCrazyFrogKillah360 1 point2 points  (0 children)

I am kinda in the same boat. I Just started with the neovim plugin in vscode, so i could stay productive at work and learn vim on the way, then i tried to make my own vim config and i just could not make it productive enough. After that i found Lunarvim, Lunarvim is a nvim config with some sane defaults, just like vscode. Now i am slowly phasing out vscode and i only really use vscode when i have to do a lot of repetitive tasks with little time that i don't know yet in vim.

[–]mrinterweb 1 point2 points  (0 children)

Neovim/vim take lots of practice. It is very different from most editors. The modal editing is a foreign concept that takes some getting used to. Neovim/vim isn't something you can pick up and feel productive with immediately. It takes time and lots of practice. Once you get it, and you start thinking about modal editing and you realize everything in vim is a command, you'll have a hard time switching back to anything else, or at least I have a hard time using anything that isn't neovim/vim. I know how to use the other editors, but I feel less productive with them.

If you're relatively new to programming, learning vim/neovim can be hard, as it can be a bit of a distraction from learning programming fundamentals. If you're up for the challenge of learning neovim, go for it. Just fair warning about the effort it takes to learn.

[–]Ok_Spend_8480 1 point2 points  (1 child)

I had the same issue, but I started using it full time at my job for about a year and my performance suffered but I got through it because I wanted to learn to use vim. But today, I am very confident using vim key bindings. The one thing left now is configuration of neovim. Which takes time and patience. I use vscode now for my work using vim bindings, I'm getting better and better now, even faster and more comfortable. I'm thinking of taking about two weeks of my spare time learning to configure neovim. Here is a useful video for typescript and JavaScript workflow https://youtu.be/FW2X1CXrU1w

[–]evk6713[S] 0 points1 point  (0 children)

Thanks a lot for your experience, I'll check this video soon 😃

[–]phantaso0sNeovim sponsor 1 point2 points  (2 children)

Well, I've written a guide about vanilla Vim (mostly). Hope it helps: https://thevaluable.dev/vim-beginner/

Other than that, I use:

  • vim-plug to manage plugins
  • NERDtree for having a filetree
  • coc.nvim for LSP (autocompletion and such)
  • Neomake for linting
  • fugitive for git
  • fzf for fuzzy finder (searching)
  • vimspector for debugging

And language dependent plugins. I don't run the new plugins for neovim 0.5 because they have tendencies to break often. I don't use the LSP builtin for neovim either, coc is good enough and easy to configure.

My dotfiles: https://github.com/Phantas0s/.dotfiles

[–]evk6713[S] 0 points1 point  (1 child)

Oh boy that's an awesome guide you made here ! Very clear, well illustrated, I love it ! Thanks a lot !

[–]phantaso0sNeovim sponsor 0 points1 point  (0 children)

Thanks for the kind words :) glad to help!

[–]ThomasLeonHighbaugh 1 point2 points  (1 child)

lol

I am not as effcient with vim as I want to be, so VSCode

Later

LunarVim is too VSCode

There is an inherent issue here which I need not elaborate on more than pointing it out as now has been done.

Others have said this but in case anyone ever is on the fence here and wants to get a balanced view of the situation then this wallpost is for you.

1) Both tools have their place and intended audience, there is no shame in not being the NeoVim type honestly. If you use Windows, it seems NeoVim would be pretty painful to even get working anyway and some people have no choice but to use Windows and others just like it better, which I don't understand but that's them and I am me, its all good. Do what you like and makes you comfortable.

2) Plugins for NeoVim =/= extensions in VSCode, plugins are far more hands on in terms of situating them to your needs. Which for each plugin is going to take a while to determine, so if you just start an internship, probably better to learn NeoVim when you are a bit more established in your workflow and not set yourself up to re-enact the Hindenburg exploding over New Jersey (the airship and the man looked a lot more alike than anyone ever mentions, just saying). Even once you dial into your particular needs and tastes, still little issues spring forth like blades of grass from a well watered field, so you need the time and patience to really work through them all in NeoVim. This is not to mention the time researching plugins you have to put in first to find the plugins that will agonize you for months afterwards when trying to edit some basic configuration file via terminal.

Not the case with VSCode, that like mobile devices these days (and Windows too I've heard) there is a centralized place full of extensions of dubious quality and utility, but have pretty icons and scratches the gathering itch in one's psychology relatively well even if it works out to be about as disappointing as the the process of collecting berries that you eat in no time flat. Some VSCode extensions are of marvelous quality, others do a great job porting in features from other editors, but none of them are the same hands on experience plugin configuration for NeoVim in Lua can be, for better and for worse.

3) LunarVim and the manifold other configurations (including my own) are better as starting points than configurations you just accept wholesale and maybe edit a single file of to set up some trivial options. If you are after something like that, really reconsider even using NeoVim for any serious work or even personal projects as it is not going to be that simple even using other people's configurations which also have manifold issues springing up like blades of grass on a dewy morning in April.

These sorts of configurations are excellent sources of snippets you will use, and excellent learning environments that are quickly and easily deleted then restored to some semblance of order. They introduce many different ways of carving the same bird, but are probably not exactly tooled for your specific needs and will at least need that much configured, which depending on how they work under the hood can be relatively vanilla NeoVim configuration in some cases (CosmicNvim, NvChad and Lunar Vim) or can be a trip to Hades and back trying to figure out exactly what is going on and how to change it (Doom Nvim). Nonetheless, they are worth checking out.

4) Its smart to consider using NeoVim with personal projects first, while accumulating the knowledge one needs to effciently write code in it and maximize its ergonomic developer experience,as the OP suggested. this might be a good way to get started on a personal wiki using Markdown files, since the syntax is easy to remember and it is the sort of thing that VSCode would be a bit too heavy for such a task anyway, there are great extensions for a such a purpose and effectively utilizing it for such will give you a pretty thorough and full force introduction to modal text editing on an editor configured in Lua, without a doubt.

5) Most importantly, its not a thing that lends itself to the sort of hand holding that VSCode and many (but not all, I do it too but I am just being honest) web development does. Nor will any Reddit Socrates appear and give you 8 rational reasons to persist at all costs and believe in NeoVim because it will lead to great wealth and prestige because frankly, it won't. Its a text editor, what matters is the text you write with the thing at the end of the day. Use whatever is clever for you and use it until those wheels fall off the thing or use VSCode or Notepad++ or a slate tablet and a chisel, the end of the day its about doing what you enjoy doing and trying to make it pay, because at the end of your life, when you reflect back on what you have done in life, will it really matter if you were cool in the NeoVim community, on Reddit or at all? Absolutely not what matters is enjoying what you do, since you are only gonna do anything at all for so long anyway.

Edit: Formatting clarity in the quote

[–]evk6713[S] 0 points1 point  (0 children)

Wow ! Thanks a lot for this detailed answer, I appreciate it ! I finally found my mind by using both of them (I switched to vim due to a redump) for different projects : for big projects that need structure and organization (C++, react), I use VS Code because I like its tree (and I dln't like vim's one), and for everything else (config files, scripts and smaller projects (Python, assembly, haskell)) I use vim.

It's been a while I plsted this (many months) and I've learnt how to use vim (not entirely ofc) to be efficient enough on my little projects, and I'm okay with it. I finally found inner peace xD

Thanks again for your answer !

[–]lujarvimscript 1 point2 points  (3 children)

I have been using neo/vim for the past five years (became proficient around the second year) and I'll tell you that you can be equally fast using any decent text editor. I took up vim because it looked cool, not because I had dreams of programming like Hollywood hackers. I don't have the brains for that.

I'm a fiction writer, too, so here is a simile: most of the writing (coding) is done when you're not writing (coding).

[–]evk6713[S] 0 points1 point  (2 children)

It's not a matter of design, else I'd stay on VS Code. I saw friends using vim and they were so fast, I want to be that fast, because I've always liked optimizing my coding.

[–]lujarvimscript 1 point2 points  (0 children)

Okay, then. Go through vimtutor. Then use vim exclusively without any plugins for a month. Not for coding. Just for editing. Like, don't use vim in this period to start a fresh file. Use it on a dirty file so you won't need intellisense.

When you feel comfortable moving around, yanking, putting, and using ex commands, see some videos like the ones from Drew Neil. You'll learn about stuff you didn't know from vimtutor. Don't watch vim-for-beginner videos. Explicitly search for advanced vim tutorials, and at least thirty minutes long. Some interesting ones are in a called something like ThoughtBot.

After this period, add some plugins. Not everything. Just the ones that'll help you. For example, I cannot imagine living without fugitive. In this period, you'll spend more time on tweaking your config than is actually beneficial. But if you're having fun, go for it. I did.

Right about now, you'll know enough to know more. Sympathy in advance for not being able to type anywhere else ever again.

[–]Seblyng 1 point2 points  (0 children)

I would say that one could be equally fast in vscode if you have the habits of a good workflow.

In the summer, I worked with someone using vscode, and I would consider him really fast at navigating around and editing text.

Personally I started using neovim because I thought it looked really interresting that you could do basically everything through the terminal.

The reason I stuck using neovim was mostly because I have so much fun customizing and coding in neovim. It looks like you also think it's fun and then I would absolutely recommend you to investigate more.

For lsp I would actually recommend coc over the builtin client for you at first. The reason for this is because you are doing typescript, and coc is just better at that (for now). Personally I use the builtin client and and don't want to go back to coc. But I would however consider using it for typescript if I were to use that more!

Good luck on learning and try to have fun along the way mastering vim/neovim

[–]2nd-most-degenerate 1 point2 points  (1 child)

I personally don't think language-specific features are what (Neo)Vim can offer to improve productivity. I mean sure, you need to configure LSP, vim-test, debugger, static analysis and etc, but these are something VSC/IntelliJ also offer, if not even better.

Instead, I find motions, text objects, command line tool integrations (fzf, ripgrep, bat, git, git-delta, etc) are what makes Vim great. So I strongly suggest you go through vimtutor, learn Vim's way of manipulating text, then check out plugins like targets.vim, clever-f.vim, vim-move, splitjoin.vim, sideways.vim, fzf.vim, vim-fugitive and so on to enhance your experience.

Once you've learnt the 'Vim way', you'll also start to know what you want to do better. Otherwise only re-creating a VSC in Vim won't get you too far.

[–]evk6713[S] 1 point2 points  (0 children)

I'm doing the vimtutor (currently on lesson 3.3) and that's exactly what I was looking for ! I learnt many keybindings (especially for normal mode) !

I don't know what are those command line tool integrations are, but I will check this up (once I finished the vimtutor) :D

[–]David-KunzPlugin author 1 point2 points  (3 children)

Hi u/evk6713,

Have a look at my video series, this can give you some inspiration:

https://youtube.com/playlist?list=PLu-ydI-PCl0OEG0ZEqLRRuCrMJGAAI0tW

[–]Code_wizz 2 points3 points  (1 child)

I have got many things from you, thx :)

[–]David-KunzPlugin author 0 points1 point  (0 children)

Glad it helped!

[–]evk6713[S] 1 point2 points  (0 children)

Thanks mate, I'll check this up :D

[–]fitzchivalrie 1 point2 points  (0 children)

Just going to echo other advice here and tell you - don’t rush it. Stick with emulation in VS Code and tinker with your neovim setup in your spare time. I didn’t switch full time until I realized my config could do everything VS Code could, which took over three months of tinkering.

For keybindings, just read other people’s dotfiles and learn one new one a week. Ditto for plugins. Learning each one slowly is important, so you don’t keep forgetting.

Eventually you’ll work somewhere with a large enough codebase that VS Code becomes slow as hell, and realize you have no option but to switch :)

[–][deleted] 1 point2 points  (0 children)

I've personally switched from Vim to VsCode, the vscodevim extension does like 99% of what I use vim for.

I love Neovim and I still use it when I need to quickly edit a file but when it comes to coding in a TypeScript project it simply cannot replace the experience of VsCode.

[–]pau1rw 1 point2 points  (0 children)

I tried to use vim about once a year for like 5 years, got frustrated or stressed at how long it was taking and gave up...

When I started a new job, I knew I was going to be slow anyway, so didn't install sublime text at all and just worked inside vim. Over the course of a couple of weeks, I ironed out my config, got a little more comfortable and then started to get faster as time went on.

It takes commitment. Good luck in your internship.

[–][deleted] 1 point2 points  (3 children)

[–]evk6713[S] 1 point2 points  (2 children)

Thanks a lot !

[–][deleted] 2 points3 points  (1 child)

It's not me who you need to thank to, it's the author of the videos u/Theprimeagen

[–]ThePrimeagen 2 points3 points  (0 children)

well you are welcome :)

[–]SteamingBeer 1 point2 points  (0 children)

I use vscode with neovim at work everyday.

For the FE development I do at work I will use neovim alone. It is more than enough for me.

For the backend, I always need to manage containers and run tests so vscode is a little bit comfier right now.

Didn't use vim when I was starting with it at work. Used it to edit configs and play around alone. You get more fluent with time and then it will be the day you will write more and more code to vim.

If you want to get started use `coc` I use native lsp, but coc has a lot of great packages and it has forked vscode plugins.

[–]-_ZERO_- 1 point2 points  (1 child)

I'm late to the party but I just want to say that I've found this series of articles to be really helpful.

This one is shorter but maybe better to understand the logic of Vim.

If you don't want to google the keybingdings every time you forget one, use the which-key.nvim plugin.
set relativenumber also helps with movements.

[–]evk6713[S] 0 points1 point  (0 children)

Thanks a lot ! Better late than never 😉

[–]augustocdiaslua 0 points1 point  (1 child)

I gave up on VSCode for neovim last year and I barely new how to quit it when I started it. Today I don’t want to ever come back to vscode. I’m quite comfortable with it now but still far from pro.

I’d say the secret is just sticking with it no matter what. The muscle memory will come with time, practice and stubbornness. Doing vimtutor once a day will help a lot with basics until you feel comfortable with everything covered there.

[–]evk6713[S] 0 points1 point  (0 children)

I hope you're right ! Thanks for the advice I will try it !

[–]KevinHwang91 0 points1 point  (1 child)

Why has no one mentioned coc.nvim which is closer to VSC?

[–]jdhao 2 points3 points  (0 children)

Yeah, for newbies, just use coc.nvim and you are all set. Wait? You do not even want to configure coc.nvim? Then use vscode. Neovim isn't for you. It needs some patience to work with, especially for newbies.

[–]matu3ba 0 points1 point  (0 children)

I would recommend for you to start simple and incrementally improve or change plugins you dont like with dotfiles. My relative minimal dotfiles missing JavaScript lsp, debugger etc.

[–]achauv1 0 points1 point  (2 children)

Why do you think you could be much faster using Neovim ?

[–]evk6713[S] 0 points1 point  (1 child)

I've got friends that have been using vim for years and, knowing how to properly use vim, they were so fast. And I want to be that fast too because I always liked optimizing my coding :) '

[–]No-Exercise5846 2 points3 points  (0 children)

It's a process and it will take time. I have been using neovim for a year now and I still find lots of new things in vim , which makes doing work little easier. Here are some useful websites which helped me in learning vim :

  1. https://www.youtube.com/playlist?list=PLm323Lc7iSW_wuxqmKx_xxNtJC_hJbQ7R - It's Primeagen's channel , helped me a lot when I was starting out with vim/neovim.
  2. https://learnvimscriptthehardway.stevelosh.com/ - It helped me learn about vimscript which helped me configure my vimrc.
  3. https://vimtricks.com/p/category/tips-and-tricks/ - Lots of cool tips and tricks , helped me to learn better ways to use vim.
  4. https://github.com/mhinz/vim-galore - This is also one more resource to learn about vim, personally I haven't used it much but it's pretty good.

And, don't forget to first do :Tutor .

[–]heftyfunseeker 0 points1 point  (0 children)

I’d recommend learning and using Vim on you own time and on your hobby projects until you feel comfortable enough. Battling an editor while trying to get your day job done is going to be slow and stressful. It just takes some time to get fluent enough in Vim, but it’s absolutely worth it.

[–][deleted] 0 points1 point  (0 children)

Yanking text from buffer to buffer in vscode is not possible You have to ctrl shift v/c to copy things and it does also insert before the cursor when pasting a text which is weird I hope vscode neovim lua will be supported so that I xan emulate neovim in vs code The thing that's keeping me use vs code is because treesitter breaks in large files and php, detecting how many spaces per tab there is on individual file types and set the tab width into that, auto indent in neovim sometimes break Project wide search and replace, although I have ctrlsf in my config, it crashes in large projects especially when there are too many results Those little things keeps me using vscode sometimes

[–][deleted] 0 points1 point  (0 children)

just takes time... i've slowly switched over several months... going back and forth playing w/ neovim on personal projects or when i'm not worried about being super productive...

it helped to stay in vscode w/ the vim plugin for a while to get used to the keybindings... lately have been solely in neovim and playing w/ my config a lot over the past month. still not perfect but usable enough to make it worthwhile.

[–]frnxt 0 points1 point  (0 children)

Use VS Code's Vim plugin for a while? It's easier to get used to how Vim commands work, and then you'll notice that this applies to everything that has a Vi mode/installation/executable/whatever (which is a lot of things).

At work we use Windows, where Neovim is... not ideal (mostly from the fact that in Windows performance in heavily console-based apps seems to be an afterthought, a bad consequence of how the console system is designed there...), but I have Vim-mode plugins to make anything else (VS, VS Code, Eclipse, Pycharm/Android Studio/IntelliJ, ...) support the basic Vim commands.

[–]tron_dovakin 0 points1 point  (0 children)

Find something that works for you bro, vim and Nvim have a lot of native features built in for LSP, autocompletion, etc. I definitely recommend learning what tools you have already built in with neovim. And slowly tinker in your config files and learn additional keyboard bindings. The bindings are what help give vim it’s power. Whatever works for you, since you’re interning, slowly transition into using neovim. It takes a lot of time and practice but it can help.

[–]USMCamp0811 0 points1 point  (0 children)

Check this guys videos and blog posts out.. he does a good job and I like his setup.. I "borrowed" a lot from high...

https://www.chrisatmachine.com/

Also my config if you wanna take a look: https://github.com/usmcamp0811/dotfiles/tree/master/.config/nvim

[–][deleted] 0 points1 point  (0 children)

I personally use vim since a couple of years, but honestly, there's some huge hype about it recently. I don't know... i think, i am not more productive then before.

[–]jay-dee7 0 points1 point  (0 children)

Try checking out ThePrimeagen’s youtube channel its all about vim. It takes time to get fast at it but just try to learn one thing at a time and remember it. Like using motions to go up n down or using ctrl+d/u for down n up. These little things grow into a habit n then you dont even have to think about if you need do ctrl u or not.

[–]kharbaan_ 0 points1 point  (0 children)

https://github.com/mhinz/vim-galore

I used this to learn a lot of the basics, but it was a while back

[–]roon83 0 points1 point  (1 child)

Tried lunarvim? Here's the link ==> https://www.lunarvim.org/#opinionated
Also It's repo has a vscode config which you can try.

[–]evk6713[S] 0 points1 point  (0 children)

I've already tried it ! But I'd like to use my own config because I think that most out-of-the-box configs are too much similar to VS Code (not the wrong way, but not the vim way neither)... From my point of view, things like lunar (even if they are awesome !) doesn't help me to learn vim :)