UNIX Text Editor

Discussion in 'Mac Help/Tips' started by dualburn001, Mar 13, 2002.

  1. macrumors regular

    Joined:
    Feb 21, 2002
  2. macrumors 65816

    Joined:
    Jan 22, 2002
    Location:
    SFBA
    #2
    pico is great, but if you're going to be like designing a website or something, BBEdit and other more complicated text editors are really worth it

    still its cool to see something somewhat graphical show up in the terminal :D
     
  3. macrumors regular

    Joined:
    May 5, 2001
    #3
    need more than pico, well you're in luck. OS x also comes with two other text editors. Vi and emacs. pico is great for little stuff but its few short comings can be solved with vi and emacs.

    commands for starting vi is
    vi

    or vi + filename (ex. vi .configure)

    same for emacs.
     
  4. Moderator emeritus

    Rower_CPU

    Joined:
    Oct 5, 2001
    Location:
    San Diego, CA
    #4
    vi is a classic *Nix app...

    Obtuse commands abound! I've tried vi, with the help of a friend who knows it better than me, and all I can say is DAMN! Switching between command and edit mode is just weird and come on...ZZ to save and exit?!?

    Yes, it's much more powerful than pico. But it has a much higher learning curve.
     
  5. macrumors 65816

    evildead

    Joined:
    Jun 18, 2001
    Location:
    WestCost, USA
    #5
    vi

    its a very old text edditor. I use it at work all the time. Its great when your logging into a remot box and you need to whipp out a qucik #! script to fix something.
     
  6. macrumors 68020

    Beej

    Joined:
    Jan 6, 2002
    Location:
    Buffy's bedroom
    #6
    Re: vi is a classic *Nix app...

    You might want to try 'wq' to 'write' and 'quit'. Makes a bit more sense.

    Vim ('vi improved') is, as the name suggests, an improved version of vi. Still crap, though. :)
     
  7. macrumors member

    Joined:
    Dec 19, 2001
    Location:
    Lives in Melbourne, works in Sydney
  8. macrumors 68030

    irmongoose

    Joined:
    Dec 3, 2001
    Location:
    Sometimes Tokyo, sometimes California
    #8
    i would go with emacs... a quite powerful program...

    and you can also play some simple text games with it ;)





    irmongoose
     
  9. macrumors 6502a

    Joined:
    Oct 25, 2001
    #9
    emacs vs. vi

    Emacs is an incredibly powerful editor. It's absolutely ridiculous to see what you can actually do with it.

    As for vi, it's a sucky editor (IMHO) with one *very* redeeming quality. It's installed by default on every Unix box I've ever seen. Thus, it's a good idea to learn vi's mode system if you plan on working on a lot of Unix boxes.

    Personally, I've always liked the simplicity of pico, but I prefer to do my programming in BBEdit. I don't like the command line *that* much.
     
  10. macrumors newbie

    Joined:
    Feb 12, 2002
    Location:
    NJ
    #10
    Put it this way if you ever get stuck on a Solaris, or Linux box you could alway count on vi being there. I do everything in vi, Mac OS X, alo did webpages in vi along with ftping (brutal but work). vi is quick way to make shell scripting.
    Get Oreily's "Learning vi" You don't need to learn everything just have a good reference.
    Only UNIX style OS I ran into that I needed to edit files command line style that didn't have vi was Bell-Labs Plan 9 (those that created UNIX -ken thompsen and the gang made it) had ed the editor on it also sam but I was stuck in a kernel panic all I had was ed (thats was crazy). Not sure if Mac OS X have ed, will try though but all other UNIX's do.
    For Career enhancement vi is the best also a little ed. But for personal developement its your choice.
     
  11. macrumors 601

    krossfyter

    Joined:
    Jan 13, 2002
    Location:
    secret city
  12. macrumors 65816

    evildead

    Joined:
    Jun 18, 2001
    Location:
    WestCost, USA
    #12
    They all seem th same to me

    I use vi my self but i think they are all pretty much the same. Its just a matter of what you leanred and what your accustomed to.

    im a Bash man and I use vi.
     
  13. macrumors regular

    Joined:
    May 5, 2001
    #13
    wow, it didn't know there were that many terminal jockeys in the mac world. Well if i ever have a unix problem I know were to go... after the opensource irc server of course.
     
  14. macrumors 6502a

    Joined:
    Jan 5, 2002
    Location:
    CA
    #14
    vi is a powerful editor

    i have been using vi for years now.. I cursed myself when i was forced to learn..but once i mastered it, its fun, like any other unix tools (eg: grep, awk, diff, shell scripts ).. . vi and unix go together. you can edit all files in a directory with "vi *", powerful search and replace fecility with all the wildcard options, move text between those files...
     
  15. macrumors 65816

    Taft

    Joined:
    Jan 31, 2002
    Location:
    Chicago
    #15
    Emacs is, in my opinion, the user friendly version of vi. Its powerful and relatively easy to use.

    Vi on the other hand...well its powerful. Around 5-10 years ago I first tried vi and I couldn't figure out how to quit the dang thing. Great first experience. Once you do the tutorial, however, you see just how much you can do with a few keystrokes. Wow!

    For beginners, stick with pico or emacs. Pico does exactly what it advertises: edits text. Don't expect anymore...except being able to quit it without :q :zz or any other vi craziness.

    Matthew
     

Share This Page