..:: MacHacking.net ::.. Article from MacHacking.net Knowledge Base: http://kb.machacking.net ********** Title: vi how-to Author: vaccine ********** This is a tutorial from The Shared Forums (undergroundmac.com/forums) All material is © UndergroundMac.com (If you use this on your site, please do not edit anything, including this information at the top.) *************************************************************************** Posted by: vaccine May 10 2003, 11:17 AM On another thread there was some discussion on using vi, and that it was a bit intimidating to use. Speaking from experience, once you get pretty well-versed with vi, you won't want to use anything else. You can search and replace, copy and even read in other files with just a couple keystrokes! Vim also has syntax highlighting which is great for coding. I was going to write a high level how-to with very basic intro commands for folks here, but I found one that is exactly what I was going to do. They also have some other how-to's that come in handy (although the project is aimed at debian users), such as grep and joe. Check out http://newbiedoc.sourceforge.net/text_editing/vi.html for the short vi how-to. It is just what you need to get you on your way! The other how-to's are at http://newbiedoc.sourceforge.net/. Lastly, www.tldp.org has more how-to's then you can shake a windows box at. Just about anything you can think of is here. Make sure you also check out http://www.macosxhints.com/ for info on UNIX aimed at OSX (this was where I found the info on how to fix sendmail once the 10.2.6 updater killed it). If anyone else has some favorite unix/osx-unix type how-to's.. make sure you post them here! -=Vaccine Posted by: schmurtz May 13 2003, 05:14 PM Why using an ugly command line editor when there exists free and powerfull tools for the beautifull aqua interface? Furthermore, if you absolutely want to use a command line editor, use a more advanced tool like emacs (which can also be run under X11 with a graphical interface). Posted by: vaccine May 13 2003, 09:47 PM *gasp* ugly?? Well.. I really don't want to start an emacs vs vi war. Mostly I use vi because my job requires it. I'm responsible for about 25 linux/unix servers. Not all of them have X, not all of them have pico. Some don't even have emacs. If I'm at home or one the road someplace, all I need is a computer that can connect to the internet to handle my business. X requires lots of overhead and there isn't much need to bog down a box with X or a gui interface for just a file editor. Plus once you get the hang of it, like anything else, vi becomes second nature. vi also has some kewl features, for example, I really like the search and replace functions as customizable as what vi offers. Like everything else *nix has to offer, it's just a matter of personal preference. I started out with pico.. then used joe for a while, and now Im a huge fan of vi. Just my opinion. -=Vaccine Posted by: schmurtz May 14 2003, 07:48 PM If it is to remotely configure computers and/or servers, you are excused because I don't think there's other good solutions using graphical tools. I've post this because I've some friends who use command line text editors with non standard keyboard shortcut on linux for editing their local files whereas there exists graphical editors (using XWindow) packaged with the OS. I didn't want to initiate an emacs versus vi war but a graphical UI versus text UI war. Posted by: vaccine May 14 2003, 08:53 PM Even with a good GUI, I would take vi over any text editor. Occasionally I have to break down and use something else when I don't want just ASCII files (word, textedit, etc). But since I work with txt files all day, it's all about vi -=Vaccine Posted by: Istrosrf May 17 2003, 03:34 PM damn vaccine, you use Linux/Unix a lot. Hope i can get into those two systems, just so little time with all my school work Posted by: vaccine May 17 2003, 11:19 PM Like I've said in the past.. there are a couple really good ways to start getting familiar with it.. 1. If you are using OSX, try limiting what you do to as much of the command line as possible. For example, cp/mv files via the command line, start using a text editor (whichever you prefer) instead of textedit, things like that. 2. Get your own cheap x86 box, and a free copy of any distro, install it, and just go to town. -=Vaccine ********** Article from MacHacking.net Knowledge Base: http://kb.machacking.net