how to use vi editor: i need to c programming in ubuntu

Asked by kiran

when i open a file for programming in c using the format

vi filename.c

the arrow keys and backspace are not serving it's purpose,
certain alphabets appear when i press arrow keys for navigation.
please tell me what to do.

i have installed the c compilers.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu vim Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#1

Please use more easy editor

nano filename.c

or

gedit filename.c

Then learn vi (google is your friend)

http://www.unix-manuals.com/refs/vi-ref/vi-ref.htm
http://www.dc.turkuamk.fi/docs/soft/vim/vim.html

Hth

Revision history for this message
Vikram Dhillon (dhillon-v10) said :
#2

On Wed, Jan 13, 2010 at 8:33 AM, marcobra (Marco Braida)
<email address hidden> wrote:
> Question #97263 on vim in ubuntu changed:
> https://answers.edge.launchpad.net/ubuntu/+source/vim/+question/97263
>
> Summary changed to:
> how to use vi editor: i need to c programming in ubuntu
>
> --
> You received this question notification because you are an answer
> contact for Ubuntu.
>

You can try this too: http://www.eng.hawaii.edu/Tutor/vi.html

--
Regards,
Vikram Dhillon

~~~
There are lots of Linux users who don't care how the kernel works, but
only want to use it. That is a tribute to how good Linux is.
-- Linus Torvalds

Revision history for this message
anatoly techtonik (techtonik) said :
#3

Arrow keys don't work in `vi` - it uses `hjkl` for navigation. You need `vim` for this and other improved features.

Can you help with this problem?

Provide an answer of your own, or ask kiran for more information if necessary.

To post a message you must log in.