Master Vim Editing: Get Help & Tips for Beginners | Ubuntu Download

  • Thread starter Thread starter mesa
  • Start date Start date
AI Thread Summary
The discussion revolves around the challenges faced while transitioning from vi to Vim for C programming. The user encountered errors when trying to access the vimtutor, which displayed unexpected characters and formatting issues. Despite these challenges, they found Vim to be a good editor but struggled with compiling code. A solution was suggested to compile directly from the Vim interface using the command `:! cc %`, which compiles the current file. However, the user noted that code that previously had no errors in vi now showed multiple errors in Vim, raising questions about differences in compilation. The user also discovered that the issues stemmed from unnecessary installations and learned how to access the terminal in Ubuntu, which helped resolve some problems. Overall, the user expressed frustration with the complexity of instructions found online and hinted at potential abandonment of the software if difficulties persist.
mesa
Gold Member
Messages
694
Reaction score
36
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.
 
Computer science news on Phys.org
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).
 
  • Like
Likes jedishrfu
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.
 
jedishrfu said:
If you're just looking for an editor to use for development then checkout atom at atom.io. Its easily gotten on ubuntu via the apt get command.

(misread OP question and thought he wanted to compile the vim code to get the vimtutor to work, oh well...)

https://github.com/Valloric/YouCompleteMe/wiki/Building-Vim-from-source
How do you install these, "libraries". Assume I no nothing ;)
 
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 ;)
 
In my discussions elsewhere, I've noticed a lot of disagreement regarding AI. A question that comes up is, "Is AI hype?" Unfortunately, when this question is asked, the one asking, as far as I can tell, may mean one of three things which can lead to lots of confusion. I'll list them out now for clarity. 1. Can AI do everything a human can do and how close are we to that? 2. Are corporations and governments using the promise of AI to gain more power for themselves? 3. Are AI and transhumans...
Sorry if 'Profile Badge' is not the correct term. I have an MS 365 subscription and I've noticed on my Word documents the small circle with my initials in it is sometimes different in colour document to document (it's the circle at the top right of the doc, that, when you hover over it it tells you you're signed in; if you click on it you get a bit more info). Last night I had four docs with a red circle, one with blue. When I closed the blue and opened it again it was red. Today I have 3...
Back
Top