C question

R

Richard

Richard Heathfield said:
Spiros Bousbouras said:
Which [vim or emacs] is best for C code?

Both are fine. If you have such a hard time deciding
just flip a coin.

Alternatively, there is a simple decision procedure for determining
which to use. Just count your fingers. If you have at least
seventeen, use emacs. Otherwise, use vim.

This advice is erroneous at best. Purposely misleading at worst.

The OP is advised to look at the EmacsWiki. Emacs is not necessarily
easy to learn but it is ultimately rewarding. Not having used them
recently I can not really suggest which of he numerous vim/vi modes it
supports is best but it would take a special form of
programmer/technical engineer not to immediately see the huge benefits
something like Emacs has over Vim if the user takes the time to master
it and its million and 1 modes.

Needless to say all key codes can be modified anyway.
 
C

Chris Dollin

Ficus said:
vi: vi, nvi, vim, elvis
emacs: xemacs, GNU/emacs, lucid emacs, joe(?)

This is so confusing!!

Which one is best for C code?

The one you're most comfortable using.
 
G

Guest

But I have never used neither. But on the computer I have to use that's
all that's available and worse, there's multiple incarnations of both:

vi:     vi, nvi, vim, elvis
emacs:  xemacs, GNU/emacs, lucid emacs, joe(?)

This is so confusing!!

what have you used before? I'm afraid editor wars are just one of
those things that can't be resolved. Both support syntax hilighting
and such. emacs is probably more configurable (don't shoot me!)
but has a steeper learning curve.
Which one is best for C code?

they're just editors either is fine.

[actually I hate them both so maybe I shouldn't have answered]
 
G

Guest

Richard Heathfield said:
Spiros Bousbouras said:
Which [vim or emacs] is best for C code?
Both are fine. If you have such a hard time deciding
just flip a coin.
Alternatively, there is a simple decision procedure for determining
which to use. Just count your fingers. If you have at least
seventeen, use emacs. Otherwise, use vim.

This advice is erroneous at best. Purposely misleading at worst.

The OP is advised to look at the EmacsWiki. Emacs is not necessarily
easy to learn but it is ultimately rewarding. Not having used them
recently I can not really suggest which of he numerous vim/vi modes it
supports is best but it would take a special form of
programmer/technical engineer not to immediately see the huge benefits
something like Emacs has over Vim if the user takes the time to master
it and its million and 1 modes.

me! I don't see the huge advantage

Needless to say all key codes can be modified anyway.

right. So why not use something that Just Works right out
of the box? [and, no, vim/vi doesn't meet my criteria- I'd rather
use Word]
 
R

Richard

Richard Heathfield said:
Spiros Bousbouras said:

Which [vim or emacs] is best for C code?
Both are fine. If you have such a hard time deciding
just flip a coin.
Alternatively, there is a simple decision procedure for determining
which to use. Just count your fingers. If you have at least
seventeen, use emacs. Otherwise, use vim.

This advice is erroneous at best. Purposely misleading at worst.

The OP is advised to look at the EmacsWiki. Emacs is not necessarily
easy to learn but it is ultimately rewarding. Not having used them
recently I can not really suggest which of he numerous vim/vi modes it
supports is best but it would take a special form of
programmer/technical engineer not to immediately see the huge benefits
something like Emacs has over Vim if the user takes the time to master
it and its million and 1 modes.

me! I don't see the huge advantage

Because you don't know about Emacs and what it can do. In the same way I
don't feel qualified to quote the Standard most times - I simply do not
know it well enough and am only really familiar with C as a practical
programming language after many years of being a professional
programmer.
Needless to say all key codes can be modified anyway.

right. So why not use something that Just Works right out
of the box? [and, no, vim/vi doesn't meet my criteria- I'd rather
use Word]

Because Notepad works "right out of the box" does not make it a good
editor.

I can only state that having taken the time to Learn a bit about Emacs
then it is clearly a superior, more complicated admittedly, product for
many reasons. If you want something out of the box because you are
unwilling or unable to take the time to learn new skills then fair
enough - just do not think you are qualified to criticise something like
Emacs from a position of ignorance. By all means say "it takes a lot of
work to learn and I am not willing to do that therefore I do not use
it", but to term it "rubbish" because of your own limitations (whatever
they might be) is simply ludicrous.

Caveat :: some people prefer having multiple programs to do multiple
things. As a programmer I like the fact that Emacs integrates most if
not all of the common development tools and I can work without moving
between disjoint applications. What kind of things? Well, the same
things a lot of Vim add ons address too..... but better.
 
B

blmblm

But I have never used neither. But on the computer I have to use that's
all that's available and worse, there's multiple incarnations of both:

vi: vi, nvi, vim, elvis
emacs: xemacs, GNU/emacs, lucid emacs, joe(?)

This is so confusing!!

Which one is best for C code?

You've probably figured out by now that this is a subject on which
people have strong and differing opinions. I'm a long-time user
of vi and then vim, but I'm more than willing to agree with the
emacs advocates that it also is a fine editor for programmers --
indeed, if didn't have so many hours invested in mastering vi(m)
I'd probably consider switching.

My suggestion would be that you try out one of each (a
vi-or-similar and an emacs-or-similar) and see which one appeals
to you -- and by "try out" I mean something like spending at
least half an hour, more if you reasonably can, working through a
tutorial introduction [*]. That plus the opinions you're getting
here may help you make an informed decision.

[*] For vim, there should be a command "vimtutor". For emacs,
starting it up and then pressing control-h and then control-t
should get you a tutorial.

My two cents' worth / hope it helps.
 
F

Ficus Elastica

Richard said:
Spiros Bousbouras said:
Which [vim or emacs] is best for C code?

Both are fine. If you have such a hard time deciding
just flip a coin.

Alternatively, there is a simple decision procedure for determining
which to use. Just count your fingers. If you have at least
seventeen, use emacs.

Sounds bad. Are there any Emacs users who are smokers? How do
these two habits interfere?
 
U

user923005

But I have never used neither. But on the computer I have to use that's
all that's available and worse, there's multiple incarnations of both:
vi:     vi, nvi, vim, elvis
emacs:  xemacs, GNU/emacs, lucid emacs, joe(?)
This is so confusing!!

what have you used before? I'm afraid editor wars are just one of
those things that can't be resolved. Both support syntax hilighting
and such. emacs is probably more configurable (don't shoot me!)
but has a steeper learning curve.
Which one is best for C code?

they're just editors either is fine.

[actually I hate them both so maybe I shouldn't have answered]

I use UltraEdit, and for every non-windows platform, I just edit via
FTP.
Neatest thing since sliced bread. Works great on all the POSIX
platforms, OpenVMS, MVS, you name it.
 
C

CBFalconer

Richard said:
Richard Heathfield said:
Spiros Bousbouras said:


<snip>

Which [vim or emacs] is best for C code?

Both are fine. If you have such a hard time deciding
just flip a coin.

Alternatively, there is a simple decision procedure for
determining which to use. Just count your fingers. If you have
at least seventeen, use emacs. Otherwise, use vim.

This advice is erroneous at best. Purposely misleading at worst.

The OP is advised to look at the EmacsWiki. Emacs is not
necessarily easy to learn but it is ultimately rewarding. Not
having used them recently I can not really suggest which of he
numerous vim/vi modes it supports is best but it would take a
special form of programmer/technical engineer not to immediately
see the huge benefits something like Emacs has over Vim if the
user takes the time to master it and its million and 1 modes.

me! I don't see the huge advantage
Needless to say all key codes can be modified anyway.

right. So why not use something that Just Works right out
of the box? [and, no, vim/vi doesn't meet my criteria- I'd rather
use Word]

You are attempting to have a serious discussion with a troll, who
is unable to recognize humour and sarcasm. Best to ignore the
troll.
 
R

Richard

Mark McIntyre said:
This isn't a C question.

Yes it is. The clue is in the "for C code".

While best is clearly a personal issue you could easily explain WHY you
think your editor is best. One would hope that as a professional
programmer you pick your editor of choice for reasons relating to your
chosen language and profession.

It might be context help, auto indenting for C, built in programs to
check ISO compliance, inbuilt C templates. etc etc. All directly related
to C as a language.
The answer is "whichever one you find best". Personally I use vi,
gvim, notepad, eclipse, visualC, edt, tpu and on occasion cat and
echo.

You must be incredibly inefficient.
 
S

Stephen Sprunk

Ficus said:
But I have never used neither. But on the computer I have to use that's
all that's available and worse, there's multiple incarnations of both:

vi: vi, nvi, vim, elvis
emacs: xemacs, GNU/emacs, lucid emacs, joe(?)

This is so confusing!!

Which one is best for C code?

The best editor is the one you know how to use well.

If you don't know how to use any editor well, learn the ones that your
coworkers, friends, or other associates use.

If you don't have coworkers, friends, or other associates, flip a coin.

S
 
R

Richard

Stephen Sprunk said:
The best editor is the one you know how to use well.

If you don't know how to use any editor well, learn the ones that your
coworkers, friends, or other associates use.

If you don't have coworkers, friends, or other associates, flip a coin.

S

What useless advice.

Akin to "try them and see".

To the op : Look into emacs. It becomes a way of life and your ability
to do things like debug (gdb), compile etc in the editor itself can save
a lot of time. Combine that with org mode for project planning,
bookmarks, w3m as a buil in text web browser for APIs etc, latex
processing, cscope and tags integration etc etc and before long you will
be astonished as how emacs disappears into the background to leave you a
lean mean coding machine.
 
J

Jens Thoms Toerring

Ficus Elastica said:
Richard said:
Spiros Bousbouras said:
On 17 Feb, 00:07, Ficus Elastica <[email protected]> wrote:

Which [vim or emacs] is best for C code?

Both are fine. If you have such a hard time deciding
just flip a coin.

Alternatively, there is a simple decision procedure for determining
which to use. Just count your fingers. If you have at least
seventeen, use emacs.
Sounds bad. Are there any Emacs users who are smokers? How do
these two habits interfere?

No problem, I use my third hand for holding the cigarette.
And then there's still one left to stroke the cat.

Regards, Jens
 
T

Tim Rentsch

Ficus Elastica said:
But I have never used neither. But on the computer I have to use that's
all that's available and worse, there's multiple incarnations of both:

vi: vi, nvi, vim, elvis
emacs: xemacs, GNU/emacs, lucid emacs, joe(?)

This is so confusing!!

Which one is best for C code?

I suggest doing this: first, pick one representative on each line
(probably vim, and either xemacs or GNU/emacs, although I'm sure other
people have different opinions), and try them out for a while; switch
back and forth often enough so that you don't get locked in to either
one (that will be somewhat painful, but it helps make the test more
fruitful). The differences between the two groups will far outweigh
the differences between members of the same group (at least, that's
been true with all the different representatives that I've tried).

Second, after you tried the two styles for a while, think about
several different aspects. What do you want your editor to do? What
qualities of the tool are important to what you'll be doing? What
personal factors are important? What tasks will you be doing in the
editor, especially on a regular basis? Is there a community in which
you'll be doing this? What editor(s) are used in that community?
Based on answers to the above, pick one or the other (perhaps
keep using both, but switching on a less frequent basis).

Third, three to six months later, after you've had some experience
using the one you've chosen to do C development, force yourself
to use the other one for at least a month. After the month is
up, re-evaluate.

At the end of all that you'll know more about the editors, more
about what you're looking for, more about what you need to do
C development, and will be in a much better position to make
a decision that actually provides a good fit.

Good luck!
 
R

Richard Bos

Spiros Bousbouras said:
Both are fine.

For values of "fine" equal to "painful, and only deemed acceptable for
reasons of nostalgia and wannabe-hacker posturing".
If you have such a hard time deciding just flip a coin.

With both vi and eMacs, the coin lands on its side, in your eye.

Find a real editor, already.

Richard
 
T

Tim Rentsch

For values of "fine" equal to "painful, and only deemed acceptable for
reasons of nostalgia and wannabe-hacker posturing".

Oh, absolutely not. Emacs is not FINE; vi is not FINE;
and FINE Is Not Emacs.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top