OpenBSD Journal

Editor?

Contributed by deanna on from the no-right-answer dept.

ed 1.0% (13 votes)


vi/vim 76.6% (970 votes)


Emacs/mg 12.2% (155 votes)


OpenOffice 1.7% (21 votes)


Other 8.5% (107 votes)


Total votes: 1266

(Comments are closed)


Comments
  1. By Anonymous Coward (151.136.100.2) on

    vi/vim is wrong. we have nvi for vi. vim is borken.

    Comments
    1. By Igor Sobrado (81.37.167.25) on

      > vi/vim is wrong. we have nvi for vi. vim is borken.

      Well... I agree with you. vim is great but nvi comes in the base system (it is a plus) and does not include non portable extensions. Anything learned on nvi is easily translated to vim. On the other hand, I introduced NetBSD on the Department of Mathematics of my University three years ago and some users install vim on it. They like its graphical front-end and macros language.

      Igor.

      Comments
      1. By Noryungi (212.11.9.139) n o r y u n g i @ y a h o o . c o m on

        > > vi/vim is wrong. we have nvi for vi. vim is borken.
        >
        > Well... I agree with you. vim is great but nvi comes in the
        > base system (it is a plus) and does not include non portable extensions.
        > Anything learned on nvi is easily translated to vim.

        What non-portable extensions?

        I am far from a vi/vim expert, but most of the functions I use daily under vim are almost the same than the functions I use on platforms that do not have vim.

        The only exceptions are "gg" to go to the top of a file and all the windows-related commands... Ctrl-W, N and the like. And of course, unlimited undo. That last point, to me, is the biggest selling point of vim. Other than that, pretty much everything works identically under vi and under vim.

        If you can think of a couple of things that are non-portable from vim to vi, I'd really like to hear of them... That's an honest request: I'd really like to know what these differences are.

        Comments
        1. By Anonymous Coward (74.115.21.120) on

          > If you can think of a couple of things that are non-portable from vim to vi, I'd really like to hear of them... That's an honest request: I'd really like to know what these differences are.

          How about "p"? Pasting in vim is broken, it moves your cursor when you paste, very aggravating.

          Comments
          1. By Anonymous Coward (64.210.30.198) on


            > How about "p"? Pasting in vim is broken, it moves your cursor when you paste, very aggravating.
            >

            Umm, this seems to behave identically for me in nvi and vim (just tried it....), so what's your problem?

    2. By Anonymous Coward (74.115.21.120) on

      > vi/vim is wrong. we have nvi for vi. vim is borken.

      Its an either or. As in, using either vi(nvi) or vim. Just like emacs/mg is for people who use either mg or emacs. There is no intended implication that vim is vi, or that mg is emacs.

  2. By Anonymous Coward (71.224.183.123) on

    I use cat > myfile.txt you insensitive clod.

    Comments
    1. By Sean Brown (65.174.122.201) on

      > I use cat > myfile.txt you insensitive clod.

      Wouldn't that be

      echo > myfile.txt << EOF
      [your file here]

      EOF

      Not really great for reading it beforehand, but you already knew what was in the file right?

  3. By Brad (81.173.31.18) on

    nano!

    Comments
    1. By Nico Meijer (82.215.29.108) on

      > nano!

      Fully seconded.

  4. By mho (130.237.209.52) on

    Emacs. Though I have been caught running ed inside M-x terminal (for a one-line fix...)

    - mho

  5. By freedom fighter (82.150.62.62) on

    OpenOffice is actually OpenOffice.org. And OpenOffice.org is not an editor, but an word processor. Apple to Orange.

    Comments
    1. By Johan (213.114.133.99) tybollt solace miun se on

      > OpenOffice is actually OpenOffice.org. And OpenOffice.org is not an editor, but an word processor. Apple to Orange.

      ls -la /usr/ports/editors/ | grep openoffice
      drwxr-xr-x 6 root wheel 512 Nov 19 18:45 openoffice

      So, there...

      Comments
      1. By Anonymous Coward (84.0.0.137) on

        > ls -la /usr/ports/editors/ | grep openoffice > drwxr-xr-x 6 root wheel 512 Nov 19 18:45 openoffice > > So, there... FYI: (from openoffice.org: "OpenOffice.org is a multiplatform and multilingual office suite and an open-source project."

  6. By Anonymous Coward (82.64.82.156) on

    I enjoy Vim, I've never tryed Emacs, maybe I will soon.

    Comments
    1. By Nate (74.13.44.100) on

      > I enjoy Vim, I've never tryed Emacs, maybe I will soon.

      It's not worth it, I mean, you can do a lot in Emacs - surf the internet, play games and other random things - but the text editor is awful.

  7. By Anonymous Coward (70.48.230.140) on

    I am happy to see that I am not the only Emacs and mg user around here. Sometimes it seems like the OpenBSD community is nothing but vi cowboys. :-)

    Comments
    1. By Igor Sobrado (81.37.167.25) on

      > I am happy to see that I am not the only Emacs and mg user around here. Sometimes it seems like the OpenBSD community is nothing but vi cowboys. :-)

      mg(1) is great. One of the thinks I really do not like on emacs is that it is too big... a mail user agent, news client, lisp interpreter, multi-language editor, a platform to play games... mg is lightweigth and powerful, but it has some minor problems (e.g., formatting the "Global bindings" help page we see too many blank lines in the "ESC [ <number> ~" sequences). This formatting problem is ugly and challenging on an -usually- small window.

      emacs is excellent (I got the "Learning GNU Emacs" book from O'Reilly about a year ago) but, for my goals, mg is better.

      And... I think that not all OpenBSD users prefer vi. I certainly prefer nvi for simple tasks (e.g., editing system configuration files), but mg is better for writing large documents (like papers in LaTeX).

      Just a question: does mg(1) support internationalization? As a Spanish citizen, I sometimes want to type special symbols used in my language. vi/nvi is excellent for this goal but it seems that mg(1) does not like these characters. Am I wrong?

      Cheers,
      Igor.

      Comments
      1. By Anonymous Coward (70.48.230.140) on

        > mg(1) is great. One of the thinks I really do not like on emacs is that it is too big... a mail user agent, news client, lisp interpreter, multi-language editor, a platform to play games... mg is lightweigth and powerful

        Well, mg is like a bike; you use it to get to places nearby. Vim is like an economy car; you use it to get to work and back. Emacs is like a FTL spacecraft you use to get to any place you can imagine. :-)

        Comments
        1. By Anonymous Coward (74.115.21.120) on

          > Well, mg is like a bike; you use it to get to places nearby. Vim is like an economy car; you use it to get to work and back. Emacs is like a FTL spacecraft you use to get to any place you can imagine. :-)

          And its prone to explosions.

          Comments
          1. By Noryungi (212.11.9.139) n o r y u n g i @ y a h o o . c o m on

            > > Well, mg is like a bike; you use it to get to places nearby.
            > > Vim is like an economy car; you use it to get to work and back.
            > > Emacs is like a FTL spacecraft you use to get to any place you
            > > can imagine. :-)
            >
            > And its prone to explosions.

            Not to mention it's really, really cramped, since it contains everything *and* the kitchen sink...

      2. By shef (212.58.214.69) on

        Also, you can try Jed. Very nice editor!

  8. By Anonymous Coward (156.34.220.47) on

    I have a tendency to different editors for different tasks, especially vi and emac/mg. I use vi for quick edits, and mg for tasks that require cut and paste. If I'm writing a document I use GNU Emacs (because mg doesn't keep the cursor postion like it should when text is reflowed with an ESC-q). I even use Kate if I need a columnized block selection, or specialized HTML editors for converting html to xhtml. Ironically, I've found no single editor that performs all my text-editing tasks.

  9. By Anonymous Coward (69.193.163.47) on

    nano is as good as I've found for the command line, but I wish I could find an editor that was as intuitive as UltraEdit for Win32 systems. Surely I'm not the only one in existence that wants an editor where PgUp, PgDn, Home, End, and Del keys consistently do what they're supposed to do. Vi? Sorry, but it sucks. Yes, I will stand up with my asbestos underwear and say it again. Vi sucks! I will use it if I have to, but the interface raises my blood pressure 20mmHg. :q! (?) Who came up with such nonsense, and what pathology resulted in his need to inflict it upon the world? Don't get me started on Emacs.

    Comments
    1. By Nate (74.13.44.100) on

      > Who came up with such nonsense, and what pathology resulted in his need to inflict it upon the world? Don't get me started on Emacs.

      That'd be Bill Joy, one of the grand daddies of BSD.

      Plus pico/nano are balls compared to the sane and clean feel of vi.

    2. By Anonymous Coward (63.237.125.20) on

      try SciTE or nedit

    3. By Anonymous Coward (207.157.220.40) on

      if you would actually take the time to learn vi/emacs, you would understand how powerful and efficient they can be.

    4. By Chris (194.193.52.249) on http://www.chriswareham.demon.co.uk/

      > nano is as good as I've found for the command line, but I wish I could find an editor that was as intuitive as UltraEdit for Win32 systems.

      Someone else mentioned it, but I'll second their suggestion - try NEdit. It's a proper GUI programming editor, with syntax highlighting, macros and decent search/replace functionality. Multiple files open in tabs, which can be "undocked" if desired, and each file can have multiple panes viewing different sections at the same time. Unlike the GUI versions of emacs, NEdit's behaviour is intuitive and doesn't need an understanding of Lisp to configure.

      Chris

      Comments
      1. By Anonymous Coward (66.92.16.195) ben@flyingwalrus.net on


        > Someone else mentioned it, but I'll second their suggestion - try NEdit.

        NEdit is fine, if you assume you're always in a gui...

        and if you're not already a (n)vi(m) user. I find that editing a document in anything not decended from vi results in a lot of extranious ':w's scatterd randomly throughout.

  10. By Anonymous Coward (84.186.42.224) on

    I use joe for everything. Page up, page down, home, end keys work as expected.

    Comments
    1. By Anonymous Coward (203.206.121.126) on

      > I use joe for everything. Page up, page down, home, end keys work as expected.

      Same here. Never really ventured into trying much else. Does me just fine.

  11. By ehks (148.129.74.41) david dot hisel at thinkingcomputer dot com on http://www.thinkingcomputer.com/

    TECO is the one, true editor. I was 'raised' on the command line. :-)

    However, I use emacs where available, otherwise vi; nvi and vim are acceptable too.

    The smallest emacs-like editor I used was 'TM' and was 4K in size. Contrast that to XEmacs which takes ~80MB for a useful developer installation.

    The smallest vi-like editor I used was 'e3' and was 12K in size.

    When do i choose one over the other? It depends on the environment I'm working in and the task i need to accomplish. On my main computer, I use XEmacs, and when I'm logged in remotely, I use mostly vi.

    Just my 2 cents.

    .ehks.

  12. By Anonymous Coward (24.226.123.233) on

    I learnt early how to use vi-like editors some time ago simply because it was usually the only thing available on some early BSD systems. Lately I've used editors like GNU's Nano-Editor or SciTE when using an X Window Environment.

  13. By dr3amca5t (89.137.40.23) on

    as for me i use joe never managed to get along with vi

  14. By Wu (88.11.185.245) wu@e-shell.org on http://www.e-shell.org

    vi for config files editing (vi, never vim)

    emacs for coding (C, Python, whatever...)

  15. By Anonymous Coward (135.214.40.162) on

    I tend to like nano for the quick edit, and OO.o for the novel.

  16. By Kernigh (69.138.228.251) on http://kernigh.pbwiki.com

    Sometimes I want to edit several files and I want syntax coloring. I tend to use Kate and Adie (thus my vote for 'other').

    I always install 'kdebase' for browsing the web with Konqueror. This also gives me Kate, KDE's "Advanced Text Editor", to edit multiple files. Kate gives a nice warning whenever I rm a file open in Kate. During search and replace, if I need to check my regex, I use KDE's regex editor. When I visit text files with Konqueror, it uses the same syntax colors as Kate. However Kate is relatively slow and mysterious. http://www.kate-editor.org/

    Adie has a filesystem browser but only one buffer, so I like how it prompts me to save whenever I switch files. Adie is part of the 'fox' package, but from habit do I build the fox source myself instead of adding the OpenBSD package. Also Adie comes with syntax coloring but no colors; most recently, I dragged and dropped some colors from Kate. Because Adie is so hard to set up, I often do not have it installed, but when I do have it installed, I tend to use it often. I cannot explain why. http://www.fox-toolkit.org/adie.html

  17. By Anonymous Coward (82.83.56.145) on

    emacs/mg is wrong.

    mg(1) is a tiny, smart, and fast editor which is available in OpenBSD's base system. it is heavilly used and improved by some OpenBSD developers.

    emacs is a bloated and slow lisp application environment. in OpenBSD, you have to install it from the ports tree... wait wait... run it... wait wait...

    i voted for mg, but against emacs.

    Comments
    1. By Anonymous Coward (70.48.233.13) on


      > emacs is a bloated and slow lisp application environment. in OpenBSD, you have to install it from the ports tree... wait wait... run it... wait wait...

      Umm..mg only faster on startup. If you already have an Emacs session running, you don't gain any speed from editing the same file in mg instead. This is a really silly argument usually put forth by people who are afraid to learn Emacs.

      mg is a very fast and excellent pager, though.. something I'd never use Emacs for. mg +line number is invaluable.

      Comments
      1. By myst (212.98.167.157) StasMyasnikov@gmail.com on

        > > emacs is a bloated and slow lisp application environment. in OpenBSD, you have to install it from the ports tree... wait wait... run it... wait wait...
        >
        > Umm..mg only faster on startup. If you already have an Emacs session running, you don't gain any speed from editing the same file in mg instead.
        > This is a really silly argument usually put forth by people who are afraid to learn Emacs.
        >
        > mg is a very fast and excellent pager, though.. something I'd never use Emacs for. mg +line number is invaluable.

        Installed 4.0 recently. Found mg there. mg is *the* type of Emacs I always wanted. A cute little and verty fast app. But my fingers are too binded for vi... :)

      2. By Kernigh (69.138.228.251) on http://kernigh.pbwiki.com

        > mg is a very fast and excellent pager, though.. something I'd never use Emacs for. mg +line number is invaluable.

        Up to now, I would start less(1), then type '50g' to jump to that line. So I wondered if I should switch from less(1) to mg(1) now. Checking the less(1) manual page, I learn that I can do 'less +command'. So I guess that I will do 'less +50g /some/file' now.

  18. By niallo (82.195.149.9) on

    I use vi, vim or Emacs in Viper mode for everything except email, depending on what features I feel like using. Emacs has some very nice diff editing capabilities, and can do some useful things with source control. Oh, Emacs flyspell mode is cool too.

    I use mg for writing email since its very fast and I find its auto-format feature (M-q) smarter than vi's line wrapping.

    Comments
    1. By Anonymous Coward (193.137.208.250) on

      > I use vi, vim or Emacs in Viper mode for everything except email, depending on what features I feel like using. Emacs has some very nice diff editing capabilities, and can do some useful things with source control. Oh, Emacs flyspell mode is cool too.
      >
      > I use mg for writing email since its very fast and I find its auto-format feature (M-q) smarter than vi's line wrapping.

      you clearly never used vim! <shift><v><g><q>

  19. By inc (80.251.175.25) on

    I'm deeply offended. Joe is not included in the poll!

    Ctrl-k [ 0
    :P

    Ctrl-k ]
    Ctrl-\ 1000 Ctrl-k 0

    Comments
    1. By Anonymous Coward (87.79.237.121) on

      > I'm deeply offended. Joe is not included in the poll!

      That's why I voted for ed, which I use when I'm on a
      system where it's not installed.

      > Ctrl-k [ 0
      > :P
      >
      > Ctrl-k ]
      > Ctrl-\ 1000 Ctrl-k 0

      Now that's why I don't like stock joe. I prefer the
      wordstar-like key combinations from Turbo Pascal and
      DR Editor R2.00, so I'm using http://mirbsd.de/jupp
      instead.

  20. By Miguel (212.17.145.167) on

    maybe I am not the right geek, but I personally like pico.. maybe it is because the word in my native language (czech) is similar to some really bad word.. but I like it..
    just my opinion.. and I have to say - I was confused from vi, but maybe I did not give it the right amount of time...

    Comments
    1. By Lennie (82.75.20.12) on

      > maybe I am not the right geek, but I personally like pico.. maybe it is because the word in my native language (czech) is similar to some really bad word.. but I like it..
      > just my opinion.. and I have to say - I was confused from vi, but maybe I did not give it the right amount of time...
      >

      I prefer not to use it, because of the license:

      http://www.linuxtoday.com/news_story.php3?ltsn=2001-07-02-025-21-OP-CY-DB&tbovrmode=1

      Comments
      1. By Miguel (217.168.208.62) on

        > > maybe I am not the right geek, but I personally like pico.. maybe it is because the word in my native language (czech) is similar to some really bad word.. but I like it..
        > > just my opinion.. and I have to say - I was confused from vi, but maybe I did not give it the right amount of time...
        > >
        >
        > I prefer not to use it, because of the license:
        >
        > http://www.linuxtoday.com/news_story.php3?ltsn=2001-07-02-025-21-OP-CY-DB&tbovrmode=1
        >

        Thanks for the link, I did not know it.. and I am surprised, i was REALLY thinking the PINE&PICO are free... :(

        thanks again.
        Miguel

  21. By scot bontager (216.62.11.163) on

    I use vi (not nvi or vim) for system admin and editing code (C, PHP, Java). 15+ years after learning vi I still have little need or patience for anything else when working with simple text files.

    I use Mellel on OS X for writing my theology papers with Greek and Hebrew in them because it actually does Hebrew vowel an canting marks correctly. Mellel prints out some beautiful documents. Besides, typing Unicode in LaTeX isn't my idea of fun when I'm already trying to think in 3 or 4 "natural" languages.

    There is a major difference in requirements between a text editor and a word processor. It's nice to have both tools.

    Comments
    1. By Anonymous Coward (122.49.141.212) on

      > I use vi (not nvi or vim)
      vi(1) tells me that nex/nvi is ex/vi since 4.4BSD.

  22. By Ted (24.62.45.164) on

    Anything you can't do with sed or awk isn't worth doing :)

    That said, I generally use vi for quick edits or when there's no X, or NEdit for anything more substantial when there is. My usual mode of operation is to use vi to get X and NEdit installed, then NEdit from there on out.

    As others have pointed out, NEdit is intuitive and has a great set of features, in server mode it can't be beat. I do use XEmacs for makefiles, though, because it seems to understand them best, and I'll use it on source/text/config files in a pinch if NEdit's not there.

    Text mode emacs is just a path to insanity.

  23. By Jedi/Sector One (82.224.188.215) on http://forum.manucure.info

    I use Jed for 10 years, and I can't live without it. It does everything Emacs does, including automatic indentation.

    Jed is also small and fast, and it uses a comprehensive language (S-Lang) instead of Emacs-LISP.

    On a freshly installed system, I use mg.

    I can't stand Vi(m). I tried, but no... really no. Vim is powerful, but switching is difficult. After using the same text editor for years, my fingers move by themselves to the editor's bindings. I really feel unconfortable while using a totally different system.

  24. By Alexey Vatchenko (82.207.119.5) on www.bsdua.org

    I use vim for editing every text file :). I've been using it for 5+ years. In the begining, i used emacs and xemacs. Emacs is not good for me. As a UNIX fan, i thought about vi. Vi is good but not for source code editing. I switched to vim because of syntax highlighting.
    Syntax highlighting feature is great for both source code editing and config files editing (why? i do less mistakes).

    For editing japanese or chinese your can use gvim (vim for X). Personally, i don't need it yet :)

    BTW, i use vim not only under UNIX. When i forced to use windows i use vim there. My girlfriend has OS X with vim installed by default :)

    Another great (but sometimes buggy) editor is bvi. It helped me a couple of times. Does your emacs edit in hex? :)

    So, i voted for vi/vim!

  25. By Dennis Decker Jensen (85.83.52.4) dennis@cyg.dk on

    I've used both Emacs, some microemacs, vi, vim and other editors extensively in the past.

    For a short while I tried with mg because it is a small and fast editor, but I simply cannot work as fast and efficient as I do in vi (not vim). Emacs/mg simply hurts my arms and wrists even after a short while.

    However, lately I find myself spending more and more time in ed and sam (the plan 9 editor of Rob Pike), since they hurt my wrists even lesser than vi (and that is telling a lot!), are simple, efficient and such a pleasure to use!

    Glad to see, people use many different editors.

    By the way: How come ed is whole whopping 156KiB on OpenBSD, when the GNU version is below 50KiB?! That is unusual given the normally smaller sizes of other binaries on OpenBSD.

    Ciao!

    Comments
    1. By Anonymous Coward (85.214.73.63) on

      > By the way: How come ed is whole whopping 156KiB on OpenBSD, when the GNU version is below 50KiB?! That is unusual given the normally smaller sizes of other binaries on OpenBSD.

      It is statically linked so that it can be used in places like the install media and in single user with only / mounted.

      Linux's version probably only exists as a curiosity.

  26. By Anonymous Coward (212.56.2.206) on

    I have worked long time with ncedit /from norton commander's packet/ and today i preffer mcedit

  27. By André Luiz Facina (189.16.34.130) on

    vi/vim is the best :-)

Credits

Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]