From: Eric B. <er...@go...> - 2001-05-27 21:24:06
|
> > Indentations from the left margin should be made up of tabs. > > Are you sure? Yes. That's what tabs are for. > I use Emacs and it's automatic indentation works great. I don't think so. Emacs spoils indentation. Is that what you call "works great"? It's the only text editor that I have heard of that produces such crap with indentation generating files with a mixing of spaces and tabs. > I had always problems with people using different tab stop settings. Yes, that's exactly the problem. Your classes have tabs and spaces and the indentation is screwed up. I don't understand why people think Emacs is so great and on the other hand it is not able to properly handle indentation. > I have been asking around how to solve the issue and Berend finally gave > me the best advice: Don't use tabs. And then someone else will modify your code and put tabs (because everyone, except people using Emacs, uses tabs) and then we get ugly layout again. Furthermore the advantage of tabs is that each user can set them to their favorite size. With spaces you can't. And the editors that I use works fine with autoindenting with tabs, but not with spaces. This is normal since tabs of for indentation, not spaces. Isn't it possible to do a global search/replace of spaces to tabs before you save your file or before you commit it to CVS? Something like that: sed -e 's/ /\t/g' file > file Or better, Emacs is open source, right? So why this problem has not been fixed over the years? It's not the first time that I heard about this problem with Emacs, and only with Emacs! So, even if Emacs users like the current behavior, there should be a configurable way to switch it off and use real tabs instead. That's the least I would expect from a text editor: that it saves to disk what I typed. So if I type a tab and don't want spaces to appear instead in my file. > Please also have a look at: http://www.jwz.org/doc/tabs-vs-spaces.html It just says that Emacs is crap and that you should switch to Vim ;-) -- Eric Bezault mailto:er...@go... http://www.gobosoft.com |