Tuesday, January 10, 2017

Re: VIM 8.0.69 not honoring "backupdir" and "directory"

On Thursday, December 22, 2016 at 2:11:30 PM UTC-6, Kyle Libbert wrote:
> Hello,
>
>
>
> I have been a vim and gvim user on Windows
> forever. I recently upgraded to VIM 8.0.69 and noticed it is creating backup
> and swap files in the same folder as the file I'm editing, even though
> I have both "backupdir" and "directory" set to a different
> location in "vimrc". I happen to be using Window 7 at my current
> client.
>
>
>
> Any suggestions on what I might be doing
> wrong? Below are the settings I have in my vimrc if that helps.
>
>
>
> if !isdirectory("c:\\temp\\vim_backups")
>
>     call mkdir("c:\\temp\\vim_backups",
> "p")
>
> endif
>
>
>
> set lines=50      "screen
> height
>
> set columns=180   "screen
> width
>
> set nowrap
>
> set number        "line
> numbers
>
> set tabstop=2
>
> set shiftwidth=2
>
> set expandtab
>
> set autoindent
>
> set ic        
>  "ignore case
>
>
>
> " How to treat backup and swap
> files
>
> set bdir=c:\\temp\\vim_backups,.
>
> set dir=c:\\temp\\vim_backups
>
>
>
> set smartindent
>
>
>
> " Remove this if there are tabbing
> problems
>
> " May want to try cindent instead
>
> set smartindent
>
>
>
> " Turn 'Show file types' in Syntax
> menu
>
> if has('gui_running')
>
>   " Always show file types
> in menu
>
>   :let do_syntax_sel_menu = 1|runtime!
> synmenu.vim|aunmenu &Syntax.&Show\ filetypes\ in\ menu
>
>   :amenu T&abs.&NewTab<Tab>:tabnew
> :tabnew<CR>
>
>   :amenu T&abs.&CloseTab<Tab>:tabc
> :tabc<CR>
>
>   :amenu &Syntax.-SEP1- <nul>
>
>   :amenu &Syntax.XAML<Tab>:XAML
> :cal SetSyn("xml")<CR>
>
>   :amenu &Syntax.C#<Tab>:C#
> :cal SetSyn("cs")<CR>
>
>   ":amenu &Syntax.PERL<Tab>:PERL
> :cal SetSyn("perl")<CR>
>
>   :amenu &Syntax.JAVASCRIPT<Tab>:JAVASCRIPT
> :cal SetSyn("javascript")<CR>
>
>   ":amenu &Syntax.makefile<Tab>:makefile
> :cal SetSyn("make")<CR>
>
>   :amenu &Syntax.SQL<Tab>:sqlanywhere
> :cal SetSyn("sqlanywhere")<CR>
>
>   ":amenu &Lang.&Espanol<Tab>
> :set spl=es spell<CR>
>
>   ":amenu &Lang.English-&us<Tab>
> :set spl=en_us spell<CR>
>
>   :amenu &Tools.SPELLes<Tab>:SPELLes
> :set spl=es spell<CR>
>
>   :amenu &Tools.SPELLen_us<Tab>:SPELLen_us
> :set spl=en_us spell<CR>
>
> endif
>
>
>
> 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
>
>   if $VIMRUNTIME =~ ' '
>
>     if &sh =~ '\<cmd'
>
>       if empty(&shellxquote)
>
>         let l:shxq_sav
> = ''
>
>         set shellxquote&
>
>       endif
>
>       let cmd = '"'
> . $VIMRUNTIME . '\diff"'
>
>     else
>
>       let cmd = substitute($VIMRUNTIME,
> ' ', '" ', '') . '\diff"'
>
>     endif
>
>   else
>
>     let cmd = $VIMRUNTIME
> . '\diff'
>
>   endif
>
>   silent execute '!' . cmd . '
> ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3
>
>   if exists('l:shxq_sav')
>
>     let &shellxquote=l:shxq_sav
>
>   endif
>
> endfunction

My issue was actually with the "undodir" setting. I mistakenly thought those turds were temp files. After setting "undodir" everything was copacetic.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: