-   Linux - Newbie (
-   -   command line//text editor (

Fred Caro 02-16-2009 03:18 AM

command line//text editor
Dear Sirs/Madams,
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?


linuxlover.chaitanya 02-16-2009 04:14 AM

What do you exactly mean? Are you trying to compare bash and vi?

Junior Hacker 02-16-2009 04:48 AM

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.

bach-fiend 02-16-2009 11:05 AM

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.

Fred Caro 02-18-2009 10:55 AM

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.


Nylex 02-18-2009 11:20 AM


Originally Posted by Fred Caro (Post 3448411)
why does a text editor operate differently to a word processor, when a text editor is, presumably, meant to be a simplification.

Have you not just answered your own question there?

rtrahan 02-18-2009 11:23 AM

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.

All times are GMT -5. The time now is 04:29 PM.