• Klicnik@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 hours ago

    I tried using VScode to play around with Golang. I had to quit coding to take care of something else. I hit save, and suddenly I have way fewer lines of code. WTF? Why did/would saving delete code? After much digging, it turns out because the all knowing VSCode thought because I had not yet referenced my variables, I never would, and since my code I wanted to save and continue later wouldn’t compile, it must be quelled. Off with its head!

    Anyway, I decided to use vim instead. When I did :wq, the file was saved exactly as I had typed it.