Блог пользователя gradnos

Автор gradnos, история, 14 месяцев назад, По-английски

Hello, I want to learn vim, but I am hesitating to start because my current goal is to reach icpc finals. Thus I don't want to spend time on something that will make me slower at typing without Vim motions.

I want to know if there is a way to have vim motions and c++ autocomplete like IntelliSense and if so how can i do it.

I tried but i couldn't find a way to have Vim motions and autocomplete in icpc because vs code plugins were disabled there, and I couldn't find a way to enable autocomplete in Vim without plugins as well and I don't know if I can use plugins there. Is there a way that I can have Vim motions and autocomplete in icpc and if yes can you tell me how? or tell me where to look as I couldn't find it anywhere

thank you

  • Проголосовать: нравится
  • +3
  • Проголосовать: не нравится

»
14 месяцев назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

I also use vim but i don't use auto completion in neovim it is actually very nice if you got used to it.

Auto completion is a bit overrated tbh, and for small things vim builtin completion can suffice .

  • »
    »
    14 месяцев назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    do you think that typing everything fully in vim is still faster than autocomplete? also counting the time you spend on fixing typos, which most likely is avoided by autocomplete? also when i tried with no autocomplete i had more compilation errors as i didnt notice them while typing and rinning the code and looking for errors and finding the line then fixing and so on took some time. do you have fixes for there things or maybe i just make too many mistakes and i have skill issues

    • »
      »
      »
      14 месяцев назад, скрыть # ^ |
       
      Проголосовать: нравится +3 Проголосовать: не нравится

      You just need some practice writing without autocomplete.

      Autocomplete saves you at most a couple of keystrokes, so it's not that significant especially if you're fast at typing.

      I agree that at the beginning, you'll face more compilation errors and typos, but with time, your muscle memory will help you avoid such mistakes.

      Also, Vim has built-in spelling suggestions, which can be quite helpful if you're unsure about something.

      so my only advice is to take your time. It will be annoying at first but now it keeps me more focused on the code i guess.

»
14 месяцев назад, скрыть # |
Rev. 2  
Проголосовать: нравится +3 Проголосовать: не нравится

Most ICPC regionals use some (pretty standardized) image for the computers. For example almost all ICPC contests I attended had the vscode c++ and the vim extensions (although I don't use the vim one). You could ask your organizers to add it too.

»
14 месяцев назад, скрыть # |
Rev. 3  
Проголосовать: нравится +3 Проголосовать: не нравится

I think it's a trade-off, but you need to get decent typing skills first. If you type with all your fingers, blah blah blah — Vim will eventually be great. If not, learning Vim motions might not be a good idea. It can work, but you'll probably spend a lot of time learning it, and it might not be worth it.

Personally, I started learning Vim motions when I was still bad at typing, but I improved gradually, and kept increasing my WPM over time. I would say that all the shortcuts that Vim provides you are great in general and it's all about muscle memory (practice).

For autocomplete and stuff like that, there are tons of LSP tutorials out there using Neovim, this videos series is really good.

I'm talking from my experience, maybe for you could be different, but I should say that, if you don't have a lot of time, just use whatever you feel better.