?
Solved

VIM file names

Posted on 2011-02-22
5
Medium Priority
?
317 Views
Last Modified: 2012-06-21
When I open a file and edit it ie: "vim_test.sql" using VIM, it gets saved as vim_test.sql~
So that now I have two files in the same place:
1. vim_test.sql
2. vim_test.sql~

Sometimes I'll end up with the above plus:
vim_test.sql~~

Why?
Is this so I can revert to an older version of my file. ie: VIM is providing this as a service?
Is there way to avoid this extra file creation?
0
Comment
Question by:claghorn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 1

Expert Comment

by:hermidae
ID: 34953037
It's a backup file. Try to put this in your .vimrc file.

set nobackup
0
 
LVL 1

Expert Comment

by:hermidae
ID: 34953049
sorry.

And also:

set noswapfile
set nowritebackup  
0
 

Author Comment

by:claghorn
ID: 34953181
Its still doing it. I'm running on Windows.
I put those three entries in my _vimrc file @ C:\Program Files\Vim
0
 

Author Comment

by:claghorn
ID: 34953198
Here's the contents:

set nobackup
set noswapfile
set nowritebackup  
set nocompatible
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin

set diffexpr=MyDiff()
function MyDiff()
  let opt = '-a --binary '
  if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
  if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
  let arg1 = v:fname_in
  if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
  let arg2 = v:fname_new
  if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
  let arg3 = v:fname_out
  if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
  let eq = ''
  if $VIMRUNTIME =~ ' '
    if &sh =~ '\<cmd'
      let cmd = '""' . $VIMRUNTIME . '\diff"'
      let eq = '"'
    else
      let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'
    endif
  else
    let cmd = $VIMRUNTIME . '\diff'
  endif
  silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq
endfunction

0
 
LVL 1

Accepted Solution

by:
hermidae earned 800 total points
ID: 34953354
Try to put it after the source.... lines
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand column That will then direct you to their download page. From that p…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question