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

  • Thread starter Thread starter mesa
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around the challenges faced by a user transitioning to the Vim text editor while programming in C on Ubuntu. It includes issues with the vimtutor, compiling code, and general usability concerns related to Vim versus other editors.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Homework-related

Main Points Raised

  • One participant expresses difficulty with vimtutor, noting errors and unwanted characters appearing in the text, which complicates learning Vim.
  • Another participant suggests using Atom as an alternative editor, misinterpreting the original question regarding compiling code.
  • A different participant provides a command to compile C code from within Vim, explaining the use of ESC and the command line syntax.
  • Concerns are raised about differences in code compilation results between Vim and vi, questioning whether they compile differently.
  • One participant shares a solution to their issue, indicating that they resolved their problems by accessing the terminal correctly and clarifying that they had unnecessary installations.

Areas of Agreement / Disagreement

The discussion contains multiple competing views regarding the effectiveness of Vim versus other editors, as well as unresolved questions about the compilation process and user experience with Vim.

Contextual Notes

Participants express varying levels of familiarity with Vim and Ubuntu, leading to different assumptions about installation and usage. There are indications of confusion regarding the functionality of vimtutor and the compilation process.

Who May Find This Useful

Users transitioning to Vim from other text editors, beginners in C programming, and those seeking alternatives to Vim for coding on Ubuntu may find this discussion relevant.

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   Reactions: 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 ;)
 

Similar threads

  • · Replies 12 ·
Replies
12
Views
8K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
5K
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
8K
  • · Replies 13 ·
Replies
13
Views
5K
  • · Replies 80 ·
3
Replies
80
Views
69K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 9 ·
Replies
9
Views
4K