Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
Hi people.. how do i get the 'Backspace' key working in vi editor and also how do i get colours in the vi editor when I write C code? please ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2005
    Location
    INDIA
    Posts
    28

    Vi editior help


    Hi people..
    how do i get the 'Backspace' key working in vi editor
    and also how do i get colours in the vi editor when I write C code?
    please help

  2. #2
    Linux Guru anomie's Avatar
    Join Date
    Mar 2005
    Location
    Texas
    Posts
    1,692
    If by "backspace" you mean "move left one position and delete the character currently in that position", it's Shift + x.

  3. #3
    Linux Guru kkubasik's Avatar
    Join Date
    Mar 2004
    Location
    Lat: 39:03:51N Lon: 77:14:37W
    Posts
    2,396
    while in normal mode (press escape to make sure) type
    :syntax on

    to turn on syntax highlighting.

    try typing

    vimtutor

    into a terminal to get a 30 minute tutorial on use of vim, its a big help.
    Avoid the Gates of Hell. Use Linux
    A Penny for your Thoughts

    Formerly Known as qub333

  4. #4
    Linux User
    Join Date
    Jul 2005
    Posts
    369
    use the x key in command mode.

  5. #5
    Linux Engineer psic's Avatar
    Join Date
    Nov 2004
    Location
    Ljubljana, Slovenia
    Posts
    1,205
    Also, check out the man page
    Stumbling around the 'net:
    www.cloudyuseful.com

  6. #6
    Just Joined!
    Join Date
    Jun 2005
    Location
    INDIA
    Posts
    28
    Hello..
    Im really in trouble..
    i've tried the suggested advice, but in vain they didnt work out
    whenever I open the Vi editor..there is a "^[34m~" thing on the screen
    When I type the "backspace" key on my keyboard, a "^[34m^?" thing is getting printed
    what is this all

    I cant code properly with all this mess..please help
    Thanks

  7. #7
    Linux Guru techieMoe's Avatar
    Join Date
    Aug 2004
    Location
    Texas
    Posts
    9,496
    Quote Originally Posted by vinny_gryffindor
    I cant code properly with all this mess..please help
    Thanks
    Have you thought about using a different editor for the time being, until you're more comfortable using Vi? If you want a more word-processor-like editor you could try pico or nano. They're very simple and don't offer syntax highlighting. Emacs is a syntax-highlighting editor but the commands are not any more intuitive than VI. Backspace works the way you'd expect it to, though.
    Registered Linux user #270181
    TechieMoe's Tech Rants

  8. #8
    Linux Newbie
    Join Date
    Feb 2005
    Location
    Texas
    Posts
    168
    jed is another simple syntax highlighting editor.

    When you installed Linux, which keyboard did you select in setup?

    Jeff
    Registered Linux User #391940

  9. #9
    Just Joined!
    Join Date
    Jun 2005
    Location
    INDIA
    Posts
    28
    Hii..
    I tried out nano..
    its simple and superb...no probs as of now
    i'll try jed now..see what it is..its good that it has syntax hilighting
    thanks people..
    but what about the Vi editor thing?

  10. #10
    Just Joined!
    Join Date
    Jun 2005
    Location
    Beaverton, OR
    Posts
    45
    There are a lot of tutorials and/or .vimrc examples on the internet.

    if you spend some time looking through them, you can get vim/vi working very much however youd' like.

    Here is my config, to get you started.

    http://maniacallaughter.com/software/vim/vimrc

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •