Jump to content
xisto Community
BCD

Help With Vi Editor In Ubuntu Or Fedora

Recommended Posts

In our university I am currently learning Unix OS and Data Structures in C. In the labs we are supposed to code, compile and execute the C programs in vi editor. In labs they have Fedora installed. But I have Ubuntu 9.04 running on my PC. The problem is that I am unable to code properly in Ubuntu. The issue seems to be with the arrows keys, when I use them to move around the code, vi editor interprets it as some printable character and prints them. Are there any settings in vi editor to change the arrow keys behavior back to the usual ones?

 

In Fedora, the usual process is something like this:

vi filename.c

Press i to get into input mode

Press Esc and :wq to save and exit

 

In Ubuntu, when I press i, there isn't any visual clue telling me whether I am in input or command mode, or is there any other key for getting into input mode in Ubuntu?

Share this post


Link to post
Share on other sites

A quick google showed: http://forums.xisto.com/no_longer_exists/

Other than that dual boot with fedora :lol:

Share this post


Link to post
Share on other sites

I found the solution on the Ubuntu forums. Here is the link.

Ubuntu comes with only the minimal version of vim. Installing the complete version of vim did the job. I also installed the vim-gnome as mentioned in the post.

 

I entered the apt:vim in the browser address bar for installing vim, that's it. I also installed the vim-gnome (apt:vim-gnome).

 

Now it shows at the bottom of the editor that it is in input mode. Also, it highlights the code for C. Pretty useful. Now I should be searching Ubuntu forums for any more problems with Ubuntu.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.