I was just doing a chapter in a unix book of mine about the vi editor and it was pretty... uh.. different. It has two different modes, append and command mode. You start out in command mode and you switch to append mode by hitting "a". Append mode is the mode you use to add text, you add text to the place in the document that your marker at. You change your marker in command mode, you go back to command mode by hitting "esc". You move your marker by either the arrow keys or "hjkl" keys. The settings command is ":set", the search document is "/" then what word you want. Most of the deleting happens in command mode, "x" deletes a single character, "dd" deletes a whole line. Searches only happen in command.
Ok, you had your crash course in vi, now go open a document by using "vi" [document] and mess around a bit. Google if you want more commands because most of what I tell you is off the top of my head.What I found interesting in vi is how many different keys you can navigate around a document.
No more noobish editing with nano or kwrite!Your using the oldest editor now.
-
I like emacs better. Especially the 'chained' hotkeys. Although emacs a pain to configure properly. Couldn't ever bring myself to using vi and I guess never will
-
vi is easy when you learn it i find nano hard never tried emacs though
-
Are you sure this wasn't in response to http://forum.notebookreview.com/showthread.php?t=262957 ? ;/
Anyway, what you're referring to is called 'insert mode', not 'append mode'. If you use 'a', the cursor is inserted after the current character, whereas if you use 'i', the cursor is inserted before the current character.
If you want to learn how to use vim, there's a program installed alongside it (on Ubuntu, at least) called 'vimtutor'. It can be pretty useful for a first time user.
Also, vi isn't the oldest text editor. That would be ed ( http://en.wikipedia.org/wiki/Ed_(text_editor)). vi is based on ex, which is based on ed. Besides, what is referred to as vi nowadays is actually Vim, which is just one of many extended versions of vi; it just happens to be the most popular one. -
also, don't forget these tips:
to save and exit a document you have made changes to hit 'esc' ':x!' (without quotes)
to exit a document without saving hit 'esc' ':q!' -
vi (VIsual editor) was designed as a programmer's editor rather than as a word processor. When you're working with code, you don't want to have that file writable by default. It requires a conscious action on the part of the user to write to the file.
It's a matter of the right tool for the right job; and vi is an excellent choice as a programmer's text editor. -
-
Maybe I can be a vi-p too?
-
As for it not being the oldest editor, I think they've meant it was around in some form or another. Not necessarily the same name. Same goes for Vim, just a newer version. Both vim and vi call up the same program.
As for vi vs. emacs. Vi comes with every unix version in some way or another. Emacs has to be downloaded if you want to use it. So if your on a machine that doesn't have a internet connection you're basically screwed.
Also I noticed that emacs has an annoying welcome screen, does anyone know how to get rid of it? Just display have it display the file rather then show me info about the editor. It gives me a really bad impression everytime I see that, it reminds me of some kinda of windows shareware.
Some more commands to quit vi ":wq" and ":q!" or ":!q". The first one means write quit and the last one means quit without writing. -
Eh, vi and emacs are a little too over my head. Too much to memorize
I think for command line text editing I'll just stick to nano.... -
Many modern linux users have no need to use a text editor, they tend to appeal more to system administrators, programmers and shell users.
Vim (and emacs to a lesser extent) can be overwhelming, the answer is don't feel that you need to remember all the commands at once , you can start using Vim with only a handful of commands. To aid memory, there are also lots of Vim quick reference cards and sheets (too many to list here), that you can download and print off to keep handy by your computer. -
wearetheborg Notebook Virtuoso
Hell yeah, I know like 0.1% of the commands of vi/emacs.
To start off one needs to know how to opena file, save file, delete chracter, search and quit.
And I use vi/emacs regularlyThey are my only editors.
vi editor - crash course
Discussion in 'Linux Compatibility and Software' started by Tailic, Jun 20, 2008.