11
luper
6y

So I'm trying to get used to using vim and I've spent a couple of days setting up my vimrc and practising commands and what not.

Come today I'm doing my first proper coding session and my codes sending back weird errors and I can't work out why

Then when I read very carefully I find :w somewhere it's not supposed to be... Of course I'd forgetten to enter normal mode a ton of times and now my code is littered with :wq and :w so I spent a few minutes combing my code to find them all and it all works now.

Am I an elite hacker now?

Comments
  • 1
    @AlexDeLarge what's the next step? I'll make Kali Linux my daily driver, I'll do anything!
  • 5
    @luper Kali is only "cringy" when not used for what it was made for :)

    Good luck for Vim, you should soon be more comfortable with it!

    By the way, for this kind of error, I suggest using the embedded "sed" command (if you haven't already).

    A little: ":%s/\:w//g" and your code should be clean. (Don't forget to change the regex if needed)
  • 2
    @Jilano oh totally joking about the Kali/hacker thing...

    Although I am gonna use that regex! Thanks for that
  • 5
    :%s/:wq?//gi

    Yawn.
  • 2
    @Jilano Oops. didn't see yours
  • 3
    @Root No worries, it was far from covering every possibilities anyway! :)
Add Comment