Best text editor?

Status
Not open for further replies.

clm100

Ars Legatus Legionis
13,874
Subscriptor
This is a general question. What text editor do you find easiest to code in. This is probably most applicable for things like html, php, perl and what not. Any platform, just specify which one.

To start things off...
Win32: Textpad, but I just discovered Editplus and it looks really nice.
*nix: currently pico, but it is waaaaaaay underpowered.
Mac: I haven't been able to get BBedit pro, but BBedit lite is respectable, although lite. (Who woulda thought?)

How about you guys?
 

w.anders

Ars Tribunus Angusticlavius
6,957
For the languages I use, it can't hold a candle to Emacs.

Still not happy with the O'Caml indentation engine, I take it? You really should take a shot at improving it, then.

Python indentation seems perfectly fine to me, though.

(Shameless Advocacy of the Day: Vim has block selection -- it works remarkably well, pasting blocks is most enjoying.)

-edit-

That reminds me: Vimscript reference documentation

[This message was edited by w.anders on January 04, 2002 at 04:33.]
 
D

Deleted member 5324

Guest
Originally posted by w.anders:
Still not happy with the O'Caml indentation engine, I take it? You really should take a shot at improving it, then.

To paraphrase the maintainer of the O'Caml syntax file for vim: the O'Caml mode I use in emacs is more than 3,000 lines of Emacs LISP, and entire turing complete language. To emulate it in whatever configuration language vim provides for such things would be virtually impossible.

Why should I use an editor so hard to configure, when emacs provides everything I need? :)

Jeremy
 

jmmv

Ars Scholae Palatinae
970
I like to use vim when I edit single files or short code, maybe because I'm not used too much to it...

But when it comes to real programming, emacs is the absolute winner. You can edit lots of files with the same instance of emacs relatively easy and when you learn to touch the piano :D you can use emacs really well ;)

Auto-indentation of C code (for example) is _really_ good. I haven't seen any editor better at this point. Code colorization is good too. Customization... even better.

And for your info, I've just seen that emacs21 is available!! :D
 

w.anders

Ars Tribunus Angusticlavius
6,957
jemfinch:

I am fairly certain that vimscript is Turing complete -- it's certainly possible to do most things in it. I've seen anything from autocompletion to text-mode fractal picture generators through buffer management and the towers of hanoi implemented in it.

Did you read the reference? It's a bit beyond a configuration language.

If you're unsatisfied, there's always the possiblity of plugging in Perl, TCL, Ruby or Python and do your work in that. I've seen a bunch of Ruby scripts on the Source Forge Vim page.

-.-

I have to say that, by default, Emacs has horrid C/C++/Java indentation -- it's only works properly with vile, vile K&R style. Vim's cindent mode is far better.
 
D

Deleted member 5324

Guest
Originally posted by w.anders:
I have to say that, by default, Emacs has horrid C/C++/Java indentation -- it's only works properly with vile, vile K&R style. Vim's cindent mode is far better.

Of course K&R is the chosen standard for Java, and it's most common indentation method for C in *nix.

And I seriously doubt Emacs has problem indenting C "the official GNU way":

foo()
{
blah;
}

because I've had it do that to me before.

There's nothing vile about K&R.

Jeremy
 

w.anders

Ars Tribunus Angusticlavius
6,957
There's nothing vile about K&R.
Yes. Yes there is. Namely, the bracket placement that makes code ugly and hard to read. Horrid.

And I seriously doubt Emacs has problem indenting C "the official GNU way"

Code tags gooood. The official GNU way, most likely, baaaad.

What I get by default in Emacs is approximately the following (this is taken from memory):

Code:
<code><big>
int foo()
  {
    bar();
  }
</big></code>

That, is ridiculous. And I've searched many times for a way to make it do the right thing, with no luck. Chalk it up to my unfamiliarity with lisp, perhaps. While we're at it, I'm not exactly thrilled about using lisp as a universal configuration language.

And don't get me started on how Emacs mixes tabs and spaces. That is just fucking repugnant behaviour.
 

jmmv

Ars Scholae Palatinae
970
GNU coding standards are evil. Just follow the Linux Coding Standards and: print out a copy of the GNU coding-standards and then... burn it.

I always did the GNU way because emacs did it by default... but heh, try this with emacs:
code:<HR>
Code:
(add-hook 'c-mode-common-hook
	  (function (lambda ()
		      (c-set-style "linux"))))<P>(add-hook 'c++-mode-common-hook
	  (function (lambda ()
		      (c-set-style "linux"))))

It is so much better... will vim do the same, as easier as emacs? ;)
 

w.anders

Ars Tribunus Angusticlavius
6,957
Vim offers fine-grained control of how C/C++ is indented, with the option of adding general rules through the custom syntax file.

However, I don't think it offers syntax highlighting schemes. There could be custom syntax files available for download at the sourceforge page, however.

By the way, could you exemplify how the Linux coding standard places braces?
 

jmmv

Ars Scholae Palatinae
970
I do not use the electric commands that make the { and } characters to be placed automatically. I place them by hand on new line or on the current one, but the indentation is automatic:
code:<HR>
Code:
int
main ()
{
        int a;<P>        if (condition) {
                // Statments
        } else {
                // Statments
        }
}

As I said, the electric commands will place { and } on new lines when needed automatically, but I haven't used them.

Of course, you can customize all this behavivour, number of indentation spaces, wheter you want spaces or tabs, placement of braces, etc... you just need to read the info manual... (i think)

HTH
 

Prototyped

Ars Legatus Legionis
11,126
On Windows, I use EditPad for quick hacks; the VS.NET beta 2 IDE for more involved stuff.
With X11, I use NEdit, which is deceptively simple. It's actually quite powerful, and has a macro language, and there are macros available for things like code folding.
For CLI, I end up using jed when it deals with the terminal settings correctly; jove (a lightweight alternative to Emacs) otherwise. ANd when neither is at hand, straight vi.

And my C and C++ code is K&R-=intended, because that's the One True Way to indent stuff. :p
 
D

Deleted member 5324

Guest
Originally posted by w.anders:
Yes. Yes there is. Namely, the bracket placement that makes code ugly and hard to read. Horrid.

Of the C styles, it's the easiest for me to read. And it's the easiest for a lot of other people to read, too -- it's the standard for every BSD and for Java (of the projects I know for sure...)

I can stipulate that you have trouble reading it, but to say, blanketly, that it's harder to read is simply untrue.

Code tags gooood. The official GNU way, most likely, baaaad.

I can't say I'm quite sure what you mean by "code tags."

And I agree, the GNU way is horrible.

What I get by default in Emacs is approximately the following (this is taken from memory):

Code:
<code><big>
int foo()
  {
    bar();
  }
</big></code>

That's the GNU way.

And don't get me started on how Emacs mixes tabs and spaces. That is just fucking repugnant behaviour.

I guess it's all about saving disk space and/or bandwidth. It's never caused me a problem (and I do program in Python, :)) and it's customizable besides. A non-issue.

Jeremy
 

w.anders

Ars Tribunus Angusticlavius
6,957
:confused:

I frankly don't understand how one can prefer a wild mix of different horrid ways of placing brackets:
Code:
<code><big>
f() {
  if () {
  } else {
  }
}
</big></code>

When there's a style that places brackets with constant grace:
Code:
<code><big>
f()
{
  if ()
  {
  }
  else
  {
  }
}
</big></code>

-.-

I guess it's all about saving disk space and/or bandwidth.
:rolleyes:
I would guess it's all about not thinking for five seconds about what is a reasonable way to indent code. Reminds me of K&R style, that.

A non-issue.

'I can stipulate that you never have had trouble working with it, but to say, blanketly, that it's a non-issue is simply untrue.'
 

gumbo

Ars Tribunus Angusticlavius
6,107
Originally posted by w.anders:
f() {
if () {
} else {
}
}

Or this:

code:<HR>
Code:
f() {
  if () 
  {
    blah {
    } 
  }
  else {
  }  
}

A mix of user defined and auto-typed statements using different brace styles. Ugh. I'm too lazy to change it though, or change my style. :)

It's almost as like we want to save screen space - less scrolling around programs, and if your editor matches braces for you, then it is no less confusing. :)

gubmo
 

EgalitarianBovine

Ars Tribunus Angusticlavius
8,086
I prefer vim. It's a good text editing interface. Non modal editing interfaces just seem slow after you get to know vim.

w.anders:

vim's macro language may be turing complete, but it's optimized for matching regular patterns, not context free. And then there's stuff like perl, for which the syntax is not even CFL. Vim could seriously use an attributed grammar way of matching things to highlight and indent. It would make a lot of things nicer and more configurable.

-EB
 
Status
Not open for further replies.