Linux - Software This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
08-01-2003, 09:25 AM
|
#1
|
LQ Newbie
Registered: May 2003
Location: Boise, Idaho
Posts: 6
Rep:
|
VIM help
I installed vim on my work computer so I could actually have a good editor to work with. Whenever I make changes and save a file VIM creates a backup.
For Example:
If I make changes to and save "example.html" VIM will create a "example.html~" file in the document root.
I spent several hours doing some RTFM but I just don't have the time to read every bit of documentation that has ever been written about VIM. Like I said, I don't have this problem with the VIM I run from ETRM at home. Is this just a windows VIM thing? Any help will be rewarded with 40 virgins and a place at the right had of Jebus.
|
|
|
08-01-2003, 09:48 AM
|
#2
|
Member
Registered: Jun 2001
Location: Houston, TX, USA
Distribution: Debian
Posts: 569
Rep:
|
Do you want it to not create a backup or what? I suggest you check out the "nobackup" page (for either case), by doing :h nobackup in vim.
|
|
|
08-01-2003, 10:28 AM
|
#3
|
LQ Newbie
Registered: May 2003
Location: Boise, Idaho
Posts: 6
Original Poster
Rep:
|
more backup issues
First of all, thank you for the advice. I am trying to get VIM to STOP making backups of all my files. My directories are getting packed with backup files that are not causing a space issue but are causing a file-management headache. I looked through the help files that you suggested and found the solution. If I do a :set nobackup from within VIM a backup is not made. However I tried to set this as a global settings by adding the line to my _vimrc file. This is how my file looks now.
set nocompatible
set shiftwidth=4
set tabstop=4
set wrap!
set nobackup
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin
set diffexpr=MyDiff()
function MyDiff()
let opt = ''
if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
silent execute '!C:\Vim\vim61\diff -a ' . opt . v:fname_in . ' ' . v:fname_new . ' > ' . v:fname_out
endfunction
It should do the same thing to have that set value in this file but it does not. With that value in there I am still getting backup files every time I save a file. Any other ideas???
|
|
|
08-01-2003, 10:58 AM
|
#4
|
LQ Newbie
Registered: May 2003
Location: Boise, Idaho
Posts: 6
Original Poster
Rep:
|
I found the fix
I figured it out but I thought I would post the results. The _vimrc file was using other config files in the fom of...
source $VIMRUNTIME/vimrc_example.vim
The vimrc_example.vim file had a line value for...
"set backup"
...which was turning the backup feature back on, even after I disabled it in the _vimrv file. So if anybody else has a problem make sure you check the other files that your _vimrc is sourced to. Thanks again for the help! Happy Hacking!
|
|
|
All times are GMT -5. The time now is 09:57 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|