command line text editing

hello,

I want to start writing my own c programs, but i can’t find any command
line text editor to create *.c files to compile them with gcc. I don’t
want to use IDE. can i create *.c files somehow in command line?

Darius

“Darius” <alpha_byte@safe-mail.net> wrote in message
news:cc71tu$1t2$1@inn.qnx.com

hello,

I want to start writing my own c programs, but i can’t find any command
line text editor to create *.c files to compile them with gcc. I don’t
want to use IDE. can i create *.c files somehow in command line?

Best is to use editor, ped can be use or even better vi :wink:
Or if you want to stick to command line only

echo “int main(void)” >>file.c
echo “{” >>file.c

ought to do it.

Darius

Darius <alpha_byte@safe-mail.net> wrote:

hello,

I want to start writing my own c programs, but i can’t find any command
line text editor to create *.c files to compile them with gcc. I don’t
want to use IDE. can i create *.c files somehow in command line?

vi is the usual choice.

-David

Please follow-up to newsgroup, rather than personal email.
David Gibbs
QNX Training Services
dagibbs@qnx.com

Mario Charest <nowheretobefound@8thdimension.com> wrote:

Or if you want to stick to command line only

echo “int main(void)” >>file.c
echo “{” >>file.c

ought to do it.

cat > file.c
int main(void) {

^D

is still pure command line, and a bit easier than repeated
echo statements.

Of course…
cat | qcc -o program

is the real-programmer way to write C code. :slight_smile:

-David

Please follow-up to newsgroup, rather than personal email.
David Gibbs
QNX Training Services
dagibbs@qnx.com

I would put in a word for jed. It can be downloaded from QNX, has syntax
coloring, and has either emacs or vi key binding
“David Gibbs” <dagibbs@qnx.com> wrote in message
news:ccekl2$p4d$1@inn.qnx.com

Darius <> alpha_byte@safe-mail.net> > wrote:
hello,

I want to start writing my own c programs, but i can’t find any command
line text editor to create *.c files to compile them with gcc. I don’t
want to use IDE. can i create *.c files somehow in command line?

vi is the usual choice.

-David

Please follow-up to newsgroup, rather than personal email.
David Gibbs
QNX Training Services
dagibbs@qnx.com

hello,

vi is the usual choice.

is there something free like vedit? full screen editor except qed?

darius

John McClurkin wrote:

I would put in a word for jed. It can be downloaded from QNX, has syntax
coloring, and has either emacs or vi key binding

jed’s great, jove and MicroEMACS should be trivial ports if they’re not
already done. I’m not sure if anyone’s ported the heavy-duty GNU EMACS
or XEMACS…

There are also things like pico, vim (vi’s already been suggested; vim
is vi with syntax colouring and other handy things), etc.


Chris Herborth (cherborth@qnx.com)
Never send a monster to do the work of an evil scientist.

hello,

jed’s great, jove and MicroEMACS should be trivial ports if they’re not
already done. I’m not sure if anyone’s ported the heavy-duty GNU EMACS
or XEMACS…

There are also things like pico, vim (vi’s already been suggested; vim
is vi with syntax colouring and other handy things), etc.

where to download these things? i can’t find them on qnx website.

darius

“alpha” <alpha_byte@safe-mail.net> wrote in message
news:ccikj8$3n$1@inn.qnx.com

hello,

jed’s great, jove and MicroEMACS should be trivial ports if they’re not
already done. I’m not sure if anyone’s ported the heavy-duty GNU EMACS
or XEMACS…
emacs has been ported but it is buggy

There are also things like pico, vim (vi’s already been suggested; vim
is vi with syntax colouring and other handy things), etc.

where to download these things? i can’t find them on qnx website.
Using the QNX software installer, you can select the QNX Online repository,

then select jed.

darius

David Gibbs <dagibbs@qnx.com> wrote:
DG > Mario Charest <nowheretobefound@8thdimension.com> wrote:

Or if you want to stick to command line only

echo “int main(void)” >>file.c
echo “{” >>file.c

ought to do it.

DG > cat > file.c
DG > int main(void) {
DG > …
DG > ^D

DG > is still pure command line, and a bit easier than repeated
DG > echo statements.

DG > Of course…
DG > cat | qcc -o program

DG > is the real-programmer way to write C code. :slight_smile:

I like this. But it’s a real bitch when you have that one type-o
on line 3762 !

Darius <alpha_byte@safe-mail.net> wrote:
D > hello,

vi is the usual choice.

D > is there something free like vedit? full screen editor except qed?

D > darius

All of the above are free from the 3rd party repository.

As someone just said, load up the QNX installer and connect to
the www repository.

Bill Caroselli wrote:
[…]

As someone just said, load up the QNX installer and connect to
the www repository.

Grab the source, “./configure && make” and hope for the best! :slight_smile:


Chris Herborth (cherborth@qnx.com)
Never send a monster to do the work of an evil scientist.

Hi Bill…

Bill Caroselli wrote:

I like this. But it’s a real bitch when you have that one type-o
on line 3762 !

I was wondering the same thing! :slight_smile:

I wonder why would any one use command line to type a file instead of
using, say, vi? I suppose that if the system is severely limited in
resources then…

Regards…

Miguel.