Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
after saving a file and quiting from vi editor, why the 'filename.swp ' files are obtained? is there any problem with the commands that i give?
ie, when trying to open the same file in the next time, the editor shows some dodumentations and give options for recover(R), Edit(E), Read only( ) etc? why this happens.
I've only had that happen when I exited vi incorretly. The .swp files are auto backups that vi is making for you incase you crash the program or are working remotely and get disconnected.
If you are using a graphical frontend (Gnome or KDE), you can use any other GUI based text editor. Gedit for Gnome, my personal favourite is kwrite on KDE as it does syntax highlighting for you as well.
If you are on Debian, the console based text editor "nano" is a delight. However I have not yet looked around for a nano type editor for redhat.
Distribution: #1 PCLinuxOS -- for laughs -> Ubuntu, Suse, Mepis
Posts: 315
Rep:
nano is pos ..
vi is fine ..it's a modal editor better suited to some dispostions than nano ( a rather dumb hack .. where commands make NO sense)
or emacs .. large executable and steep learing curve though great for variety of uses.
in the terms of vi .. it's yank and put .. "<buff-name><number of lines>yy will yank and <buf-name>p will put .
so
"a10yy will yank 10 lines and put into buffer a .. and
ap will put the buffer a where the cursor is.
Editors are generally personal preferences. After having to use vi on a restricted console for a few weeks, I have become quite acustomed to it and find myself using it even while working on Gnome.
For those who are not comfortable with remembering commands, nano may be a reasonable alternative. I discovered pico on my old redhat 7.3 boxes. Pico is very similar to nano. If interested in a simple editor, it can be extracted from the pine rpm. More info and rpm at
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.