PDA

View Full Version : UNIX Text Editor


dualburn001
Mar 13, 2002, 09:11 PM
I was watching TechTV and mac geek Brett Larson showed this thing:

http://www.techtv.com/callforhelp/answerstips/story/0,24330,3375935,00.html

Choppaface
Mar 13, 2002, 09:45 PM
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

Onyxx
Mar 13, 2002, 10:02 PM
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.

Rower_CPU
Mar 13, 2002, 11:20 PM
Originally posted by Onyxx
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.

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.

evildead
Mar 13, 2002, 11:49 PM
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.

Beej
Mar 14, 2002, 01:49 AM
Originally posted by Rower_CPU
come on...ZZ to save and exit?!?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. :)

MaxRool
Mar 14, 2002, 02:05 AM
I use joe on linux and osx
http://www.apple.com/downloads/macosx/unix_apps_utilities/joetexteditor.html

irmongoose
Mar 14, 2002, 05:45 AM
i would go with emacs... a quite powerful program...

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





irmongoose

oldMac
Mar 14, 2002, 08:04 AM
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.

brojohnson
Mar 14, 2002, 08:21 AM
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.

krossfyter
Mar 14, 2002, 08:55 AM
my friend still digs them amigas!

evildead
Mar 14, 2002, 11:32 AM
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.

Onyxx
Mar 14, 2002, 10:04 PM
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.

jaykk
Mar 14, 2002, 10:53 PM
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...

Taft
Mar 14, 2002, 11:01 PM
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