-3

When first starting out using vim, I was nervous that I'd get lost in some foreign mode that could potentially wreak havoc. I felt like there was never really any "safety net" preventing me from a major blunder, possibly leading to a catastrophe with either my system or the file I was working on.

I've built up my own personal confidence, but surely there might be other beginners who feel the same way I did when starting out. Are there safeguards that can be put in place for someone learning the ropes? Any type of sandboxing, restrictions, or safety features would be ideal.

  • 4
    In my opinion, this is both too broad (asking for just a big list) and primarily opinion based (there's no way to tell whether an answer is objectively "correct"). – Doorknob Feb 3 '15 at 19:06
  • As a beginner, u is my best friend.. Is there a reason you feel it's not enough of a safety net? – Daniel Kleinstein Feb 3 '15 at 19:07
  • backup. backup. backup... I once did a halfdrunk fumble-finger in mutt and deleted my entire INBOX (never figured out what I did exactly). These sort of errors can occur in any keyboard-based program... – Martin Tournoij Feb 3 '15 at 19:16
  • @Carpetsmoker (off-topic) D . <enter> would do it... – derobert Feb 3 '15 at 19:22
4
  • Become comfortable with vimtutor. Doesn't matter if you mess the file up, because it's a temporary version.

  • Learn to undo something with normal mode and u.

  • It's kinda difficult to have a catastrophe with your system, by accident from Vim. If you find yourself accidentally typing :! rm / -rf then you've got bigger problems than Vim. Don't do that at all. Anywhere.

  • Remember that if you run :q without saving, it won't write the file. So if you open something up and it gets ruined, don't do a :w an :x or a :wq. Quit straight out and try again.

| improve this answer | |
  • 2
    I agree with vimtutor. I learned from there. It's the best tutorial. As for the 4th bullet do not forget :x along with :wq. – gon1332 Feb 3 '15 at 19:24
  • 1
    I think a cation "do not do that, will destroy your computer" should be added to any instance of that curse you wrote there. ;) – yo' Feb 3 '15 at 19:30

Not the answer you're looking for? Browse other questions tagged or ask your own question.