Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
at the risk of sounding very thick, what is the point of having a text editor when you have a comprehensive command line?
How does the next line command work in vi or does it not exist?
Vi is not installed anymore on any modern Linux, vi improved (vim) is now installed by default. Take a look at your package manager, vi is probably not on the list. But for the old geeks, you can still use vi in commands as vim is backwards compatible.
To start a new line, put cursor on the line above where you want to add a new line in the file, hit the "o" key, this will put you in insert mode on a new line.
If you have a full version of vim installed, you can type: vim tutor in a terminal to take a half hour course on using vim. These are the man pages for vim which does the same only more comprehensive and not so easy to understand for a vi newbie compared to the tutor. These are stock quotes for man vim.
Whenever I do anything that is big (eg long command line(s) etc) or that I might want to look back on (eg email replies) I put it in a file first using emacs (or vim). I find this the most robust way to look back at what I actually said when things don't work as I expect. And I used to be quite proficient at the [korn then bash] shells, but still find that there are typos and other mistakes I have trouble seeing. Rather than sit there fighting the computer, I sometimes set the troublesome code aside for a few hours (or days).
Because I live in Emacs most of the time, I've never bothered learning command history, all the cool things you can do with (!) history substitution, etc. I just don't need them much.
Thanks for your reply, it has saved me a lot of time and motion.
If I can appeal to your good nature further; why does a text editor operate differently to a word processor, when a text editor is, presumably, meant to be a simplification.
A text editor does not use the same functions as a full word processor because of the manner in which it is saved. A text editor does not allow you to change font styles, insert pictures, etc. It is processed as ASCII language with no characters such as -> return or ...carriage space, etc. It is only text. That is why it is used for running commands and for programming, the interpretor or compiler cannot read all of the formatting characters used in a word processing programs, it is only text.