View Full Version : [ubuntu] C++

August 16th, 2011, 07:33 PM
I have started using the terminal to program C++ using the G++ editor, now the problem is in the "insert" mode when i press the arrow keys it starts to display A,B,C respectively. Also the back space is not working, what should I do????

August 16th, 2011, 07:45 PM
With respect, why not use gEdit? It's installed by default. You can still use the g++ compiler; it's what I do. ;)

I'm assuming you mean you use Vim or Emacs.

August 16th, 2011, 07:50 PM
I actually havent heard of a G++ editor.

Anyway you might want to try using an IDE or if you want to stick to CLI then use nano to edit your code and use g++ to compile. The new nano on ubuntu 11.04 even supports syntax highlighting.

August 16th, 2011, 07:51 PM
Neither had I, it was 'insert mode' which put me on to Vim or Emacs. Nano's just as good. Can you use 'less' as well?

August 16th, 2011, 07:55 PM
When coding i prefer nano because of the syntax highlighting and you dont need to know any key combos to navigate through it.

August 16th, 2011, 07:57 PM
If you use the arrow keys in vim, you are really missing the point of using vim.
Vim has more powerful navigation features that should not be ignored.
Vim should have no problem with the arrow keys, maybe the problems comes from your terminal. What terminal program do you use?

You may want to take a look at emacs too, great support for C languages. You should consider both before mastering one.

Now, learning Vim and C++ in the same time a bit too much to handle, so I recommend a more simple GUI editor such as Geany.

August 16th, 2011, 08:03 PM
Hello :)
Open a terminal and do

sudo apt-get install vim
...and the problem is gone ;) It's the 'vi' compatible mod of vim, that is installed by default on Ubuntu and...

"Release early, release often"

August 22nd, 2011, 06:04 PM
i use vim, and i used geany, it seems to be pretty good, lets see. Thanks a lot for all the help.