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!
Notices
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Originally posted by Thaidog The only thing I ever see myself needing to do in vi is edit config files... (I like pico but it's not on all my machines.)
What I need to know is how to edit a doc once I'm in it...
I'm guessing it starts the the i command to go to insert mode....
but what I need to know is simple.... how to move up, down, left and right and how to delete text and how to write text. As simple as possible.
A) invoque 'vi' as VIM, on most of the distros VI is an alias to VIM, but some set's the 'vi' mode in vim.
B) Go to edit mode using:
Code:
CTRL :a
Now you will be able to move around with the cursors and the rest of the keyboard as expected until you exit using the ESC key.
From what I've learned thus far once your into the program and you hit your insert key you can then move around the text like you normally would. Once you finish and are ready to exit what I do(could be the long way but it works) is hit escape. Next I type in write and that saves it then I type in quit and that's it.
Originally posted by Thaidog So what do I do to save changes? (after I hit esc)
To save an ordinary document:
ESC :w
To save a write protected doc:
ESC :w!
Save and Exit:
ESC :wq
The '!' sign at the end of an argument forces an action.
For more and better info, here's a quick command table: http://arioch.unomaha.edu/~jclark/vim.html
It's quite handy, it would be a good idea to save it as a PS/PDF file or even printing it.
Distribution: Mandrake 10.0 & Window XP professional
Posts: 32
Rep:
why use Vim or vi
hi,
soory for interrupting, but if u only have to edit config files, and no script editing etc, why go for vi,vim or emacs. i know most of the linux guys would scoff at not using one the above mentioned editors, but pico is far more simpler. as far as it not being on all machines, i think a RPM is available for pine for most distributiion and pico gets installed with it. Would'nt it be a simpler option.
also , if u are editing from with in x, then try nedit , its pretty simple and easy to work with.
regards
Originally posted by uzairkhan hi,
[...]why go for vi,vim or emacs. i know most of the linux guys would scoff at not using one the above mentioned editors, but pico is far more simpler [...] if u are editing from with in x, then try nedit , its pretty simple and easy to work with.
Or another widespread simple to use editor is the one shipped with good ol' Midnight Commander, you can invoque it with
Code:
mc -e FILE
or
me FILE
Easy, nice and comes at no cost with the MC.
Or the traditional Gentoo editor: nano.
I myself prefer VIm on the command line, but most fellow Gentoo users likes nano better.
And ¿Why limit ourselves to the console? There is a superb killer-editor which is both powerfull and easy to use... ¡Kate!
An editor with all the bells and whistels but still easy to use and fast. Not to talk about Kate's reincarnation as a LaTeX editor called Kile, simply the best.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.