Slashdot Mirror


User: psyllo

psyllo's activity in the archive.

Stories
0
Comments
1
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 1

  1. Emacs Myths on (Stupid) Useful Emacs Tricks? · · Score: 1

    I want to dispel some myths that are recurring here. I make reference to vi, vim and Eclipse to help explain.

    First of: To answer the question:
    A great command is M-Q. This is a minimal requirement for any good text editor IMPO.

    My recommended .emacs settings are the first things I turn off in emacs:
    (custom-set-variables
    '(make-backup-files nil)
    '(inhibit-splash-screen t))

    Emacs is a pig?

    There is some talk about Emacs being a heavy text editor and that installs lots of stuff when you install it. In response to that:
    - For the Windows binary (http://ftp.gnu.org/gnu/emacs/windows/emacs-22.3-bin-i386.zip) is 37MB. There is no installation required, you just extract the zip and run the 'runemacs.exe' command in the bin directory.
    - If you want to build Emacs on FreeBSD (for example) you will have to install all of it's build and runtime dependencies. That's a lot of stuff. It will want gnu build tools and X etc. If you pkg_add -r emacs to get the binary, you are not going to have to install as much. The point is: Depending on your OS and package manager you may have a different experience installing Emacs. In the case of Windows it's super easy. Not using Emacs because installing it is difficult just isn't a reality. (sure there are edge cases)
    - Emacs 22.3(latest) runs at about 20 or 25 MB resident memory in the latest Ubuntu(ubuntu8041) package and FreeBSD(7.0-R) port. To get a perspective, this is about as much as gnome-terminal. If you don't know if you are using gnome-terminal: If you use gnome2 (Ubuntu) the default terminal is gnome-terminal. (I personally use xterm with some .Xresources settings)
    - Emacs loads quickly (depending at what you want to run at init) and is small enough for most jobs. You will always be able to make the argument the vi is lighter. Yet for me I use Emacs everywhere someone might use vi.
    - Emacs also has an emacsclient executable that connects to an emacs server. This allows multiple 'clients' to connect to the server. It makes loading emacs quicker and multiple instances can share memory. I never use it because Emacs isn't that resource intensive in a modern Desktop environment. Even in my VMs.

    Emacs vs. Vi (and [insert editor here]):

    For the programmer and for text editing intensive work: From what I can tell comparing vi to Emacs, Emacs wins. Comparing vim to Emacs might be more appropriate.

    Power in text editors vary. Because there is variance we can say that one is more powerful than the other. That said, Emacs is the more powerful than vi (Remember I said this is a general statement. Such statements are helpful for newcomers to get a perspective not to state a holy war). Textmate, Vim, Eclipse and Visual Studio are all great at many different things. I think the reason we talk about vi and Emacs so much as because they run in terminals and fit into the average Unix user's work-flow much better. They are also old school as well as new school. Those other editors are better described as GUI IDEs. Of all of these vi is the lightest (smaller install, less memory). This is not a statement about what is better. Better is much more relative to the task at hand and the user's preference.

    The power of Emacs reveals itself when the editing is beyond basic conf file editing. One could even argue that vi is also too powerful for editing a conf file. But I guess that all depends on how you want to edit conf files. If you do a lot of other things in Emacs (as most users do) then editing a conf file is just one more thing you are doing. I guess it's important to ask why you would use vi if you already have an Emacs instance running? (Remember you can even edit a file over ssh or even FTP)

    Emacs as an OS?

    In some contexts it's a fair comparison. A better comparison would be to a development platform. Eclipse and Eclipse RCP come to mind (http://wiki.eclipse.org/index.php/Rich_Client_Platform).

    Emacs does have dired