Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Need help with vimtutor

  1. Mar 15, 2016 #1
    Okay, so I am trying to use C again, but this time it was recommended I try Vim since I was having a lot of trouble with vi (have terrible typing habits that are not conducive to this type of editing software).

    I downloaded ubuntu and vim but when I go to the shell and type in vimtutor it comes up with a bunch of errors in the text. For example, "[5,6HVim is a powerful...".

    The tutor is full of extra brackets and numbers, plus it wants me to run through the hjkl, which is exactly what I am trying to avoid by switching to vim.

    I have tried just jumping into the editor (which has been great!) but can't for the life of me figure out how to compile the code. At this point I am fine with skipping the tutor if someone can tell me how to compile.
     
  2. jcsd
  3. Mar 15, 2016 #2

    jedishrfu

    Staff: Mentor

  4. Mar 15, 2016 #3

    DrDu

    User Avatar
    Science Advisor

    From inside the vi(m) window where you write your c file, hit ESC, then enter :! cc %
    ! performs a command in the shell, while % is all the text you have been typing (i.e. your whole program).
     
  5. Mar 15, 2016 #4
    Well, it compiles but code that had no errors with vi is now full of them? Do things compile differently with vim? I thought they were the same.
     
  6. Mar 15, 2016 #5
    How do you install these, "libraries". Assume I no nothing ;)
     
  7. Mar 15, 2016 #6
    Never mind, got it guys.

    Apparently it was a simple matter of using the search and inputting 'ter' followed by clicking on the 'terminal' icon. I had downloaded the vim editor and that just was not necessary with ubuntu which was causing all the issues.

    Thank you both for the input. Perhaps things will go smoother in the future, although with most instructions online speaking in 'code' I get the feeling this software will ultimately find its way to the recycling bin ;)
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Need help with vimtutor
  1. Need help (Replies: 5)

  2. Need HTML help (Replies: 5)

  3. New to GPS and need help (Replies: 19)

Loading...