Find the answer to your Linux question:
Results 1 to 8 of 8
Hi, I am very new to linux. I am developing a c++ project in linux environment. I want to use some nice editor for c++ which highlights the syntax etc. ...
  1. #1
    Just Joined!
    Join Date
    Feb 2007
    Posts
    29

    C++ and VIM editor in linux

    Hi,
    I am very new to linux. I am developing a c++ project in linux environment. I want to use some nice editor for c++ which highlights the syntax etc. I tried VIM but it doesn't color/highlight the syntax. Is there some special command I need to give to make it highlight the syantax?

  2. #2
    Linux User tech_man's Avatar
    Join Date
    Jan 2007
    Location
    USA
    Posts
    385
    'Tis better to be silent and be thought a fool, than to speak and remove all doubt.'
    --Abraham Lincoln

  3. #3
    Just Joined! fatalexception's Avatar
    Join Date
    Feb 2007
    Posts
    34
    Quote Originally Posted by balli
    Hi,
    I am very new to linux. I am developing a c++ project in linux environment. I want to use some nice editor for c++ which highlights the syntax etc. I tried VIM but it doesn't color/highlight the syntax. Is there some special command I need to give to make it highlight the syantax?
    Yep. Type
    Code:
    :syntax on
    You can also put it in ~/.vimrc, and syntax highlighting will be on by default from now on. I also suggest
    Code:
    set number
    to show the lines before your code which makes debugging a lot easier.

  4. #4
    Trusted Penguin Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,230
    vi has syntax highlighting, as does Emacs. If you're looking for a more normally-styled editor, you can try kate (KDE) or gedit (Gnome), both of which are also intended for development use.
    DISTRO=Arch
    Registered Linux User #388732

  5. #5
    Just Joined!
    Join Date
    Feb 2007
    Posts
    29
    Thanks a lot for ur replies.

    tech_man: I am using linux from putty so I dont know how I can replace the file.

    Fatalexception: I opened the "vim" editor and typed the command ":syntax on" after hitting the ESC key, but it gave me an error "Sorry, the command is not available in this version"

    Thanks for the "set number" command. That is helpful.

    Cabhan: I am using putty so can't use xwindows stuff.

    Thanks for ur replies though.

    Also, I am tyring to use mandrak one CD on my laptop now (cuz I dont wanna work on PUTTY). Mandrake doesn't have g++ compiler in it. Can anybdy help me with that....like where to get it? do i have to pay for it? and ofcourse how to install it?

    Thanks a lot guys.

  6. #6
    Linux User tech_man's Avatar
    Join Date
    Jan 2007
    Location
    USA
    Posts
    385
    g++ is totally free. Did you mean Mandrake 1 or Mandriva One?
    'Tis better to be silent and be thought a fool, than to speak and remove all doubt.'
    --Abraham Lincoln

  7. #7
    Just Joined!
    Join Date
    Feb 2007
    Posts
    29
    I m using mandriva one (i.e. its a CD which we can insert in CD-ROM and it runs from the CD-ROM without installing everything to system).

    http://www.mandriva.com/en/download/mandrivaone

    Hope that helps.

  8. #8
    Linux User tech_man's Avatar
    Join Date
    Jan 2007
    Location
    USA
    Posts
    385
    Here you go.
    'Tis better to be silent and be thought a fool, than to speak and remove all doubt.'
    --Abraham Lincoln

Posting Permissions

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