Author Topic: Command Line Programming Editor?  (Read 6688 times)

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
Command Line Programming Editor?
« on: June 15, 2007, 02:45:13 pm »
Are there any good command line/text-based programming editors out there for C++? I've been looking, but haven't found much. Being small and not having many deps would be nice, too.

Thanks in advance.
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

jfv

  • Sr. Member
  • ****
  • Posts: 437
    • View Profile
Command Line Programming Editor?
« Reply #1 on: June 15, 2007, 04:04:19 pm »
vi?
SL 5000 D  and C860 Sharp ROM
Too many accessories...

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
Command Line Programming Editor?
« Reply #2 on: June 15, 2007, 04:51:32 pm »
Vi won't die on my Z. I'll start it, then mash buttons until it finally "closes," at which point my Z will become very slow, so I check top, which shows that it is eating 99% of the CPU. "killall vi" appears to kill it (e.g., outputs nothing), but doesn't, so I have to reboot.

Also, I have no idea what Vi's keybindings are.

EDIT: It's better on r198...Just sits there and eats 1% of my RAM, but still won't die. Still not acceptable in my book.
« Last Edit: June 15, 2007, 04:57:29 pm by Capn_Fish »
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3707
    • View Profile
Command Line Programming Editor?
« Reply #3 on: June 15, 2007, 06:01:33 pm »
have you tried ":q" or "ZZ" to exit/save vim.

it's not a wysiwyg text editor.
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
Command Line Programming Editor?
« Reply #4 on: June 15, 2007, 06:02:55 pm »
I've been using Ctrl-Z to quit, I believe.

EDIT: Oops...That doesn't quit. How do I get back to a program that I've Ctrl-Z'd?
« Last Edit: June 15, 2007, 06:06:16 pm by Capn_Fish »
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

jfv

  • Sr. Member
  • ****
  • Posts: 437
    • View Profile
Command Line Programming Editor?
« Reply #5 on: June 15, 2007, 06:07:41 pm »
Ctrl-Z is not a way to quit vi.
SL 5000 D  and C860 Sharp ROM
Too many accessories...

tanjian2

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
Command Line Programming Editor?
« Reply #6 on: June 15, 2007, 08:23:55 pm »
Quote
Ctrl-Z is not a way to quit vi.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=163260\"][{POST_SNAPBACK}][/a][/div]
No Ctrl-z suspends your foreground task. You can type fg to get it back or bg if you are happy to run it in the background.... unlikely for vi but maybe ok for other tasks.


Also look for vim (vi-improved) its better - syntax colouring etc... and still reasonably light.
Must admit I'm an emacs fan for all editing - but its not light by any means...still compile mode for jumping to compiler errors, version control (via rcs/cvs) etc...
« Last Edit: June 15, 2007, 08:29:15 pm by tanjian2 »
SL-C3000(Spitz) - pdaXii13 5.5alpha + sound enhanced kernel - MD in 1 great big partition -  Ambicom CF Wifi + USB Ethernet  and NOW Zubuntu on a 4Gb SD

T3_slider

  • Full Member
  • ***
  • Posts: 125
    • View Profile
Command Line Programming Editor?
« Reply #7 on: June 15, 2007, 10:44:49 pm »
If "killall vi" doesn't work you can always try "killall -9 vi" which should definitely work (otherwise you can use "ps aux | grep vi" to find the pid of vi and then use "kill -9 pid" to kill it for sure). I personally use pico for any editing because it's easy (I hate vi because, although I can use it if I have to, it is unintuitive to me). I like emacs but it is a little heavy for casual use on the Z.
Conics SL-C3200 running pdaXrom beta3 and XFCE with a Planex WiFi CF card.

Slackware rules!

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
Command Line Programming Editor?
« Reply #8 on: June 15, 2007, 11:38:22 pm »
How do you make it start up with C++ syntax highlighting? The example vimrc doesn't really help.

TIA.
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

tanjian2

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
Command Line Programming Editor?
« Reply #9 on: June 16, 2007, 05:14:41 am »
Quote
How do you make it start up with C++ syntax highlighting? The example vimrc doesn't really help.

TIA.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=163276\"][{POST_SNAPBACK}][/a][/div]
I believe it depends on which terminal type you are using it in. It works fine for me in aterm, xterm/gtkterm2/terminal uses bold/underline instead of colour. I think it has more to do with how your terminals are configured... I recently upgraded to pdaxii13 5.4.6 and even how 'ls' colours its listings changed.....

check your TERM environment variable - "env | grep -i term"

I have ansi - in aterm and xterm everywhere else. Vim site I looked at suggested "linux"  as the terminal. Try
export TERM=linux and then run vim and see if that helps.

Like pgas I assume you know vi is not vim - but certainly Meanie replaced vi with vim on pdaxii13....
good luck
« Last Edit: June 16, 2007, 09:11:08 am by tanjian2 »
SL-C3000(Spitz) - pdaXii13 5.5alpha + sound enhanced kernel - MD in 1 great big partition -  Ambicom CF Wifi + USB Ethernet  and NOW Zubuntu on a 4Gb SD

pgas

  • Hero Member
  • *****
  • Posts: 1097
    • View Profile
    • http://
Command Line Programming Editor?
« Reply #10 on: June 16, 2007, 06:42:56 am »
Maybe you know this but just in case:

note that vi != vim

There is a vi that comes from busybox, that doesn't do all the fancy
things vim does.

(emacs also runs in a terminal)
SLC-860 cacko / senao wifi

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
Command Line Programming Editor?
« Reply #11 on: June 16, 2007, 10:22:49 am »
Still a no-go. I exported TERM to be linux, and COLORTERM to be true (I also tried 'linux,' but to the same effect).

EDIT: Never mind, I just had to open a file with the right extention to get the highlighting to show up. It works now! Thank you, this looks promising.
« Last Edit: June 16, 2007, 10:24:58 am by Capn_Fish »
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

kopsis

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • http://kopsisengineering.com
Command Line Programming Editor?
« Reply #12 on: June 16, 2007, 12:09:24 pm »
Of course none of these suggestions are command-line editors. If you want one of those then of course THE choice is ED (click for more info) -- the one true editor

Note for the humor impaired: No, I'm definitely not being serious
« Last Edit: June 16, 2007, 12:10:33 pm by kopsis »

tanjian2

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
Command Line Programming Editor?
« Reply #13 on: June 16, 2007, 03:48:59 pm »
Quote
Still a no-go. I exported TERM to be linux, and COLORTERM to be true (I also tried 'linux,' but to the same effect).

EDIT: Never mind, I just had to open a file with the right extention to get the highlighting to show up. It works now! Thank you, this looks promising.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=163295\"][{POST_SNAPBACK}][/a][/div]
Silly me - I assumed you were editing  a .c, .h .hpp or .cpp file - broke my own rule - never assume anything!
SL-C3000(Spitz) - pdaXii13 5.5alpha + sound enhanced kernel - MD in 1 great big partition -  Ambicom CF Wifi + USB Ethernet  and NOW Zubuntu on a 4Gb SD

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
Command Line Programming Editor?
« Reply #14 on: June 16, 2007, 06:42:04 pm »
Well, I was...It just hadn't been saved yet.  
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo