Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

This is intended to be a vim turd file reference (please improve!)

34 views
Skip to first unread message

Roy Tremblay

unread,
Jun 1, 2017, 9:58:03 AM6/1/17
to
Please add information so that this serves as a vim turd file reference.

Moving my vim setup over from Windows XP to Windows 10, I ran a few
experiments today trying to figure out how best to set up vim on Windows 10
so that the turd files it leaves (a) don't jump around, and (b) don't
clutter up the current directory.

0. https://s12.postimg.org/nezeiaxi5/00_gvim_setup.jpg
1. https://s13.postimg.org/heacohyfr/01_gvim_setup.jpg
2. https://s1.postimg.org/etb4r7nbj/02_gvim_setup.jpg
3. https://s24.postimg.org/4ubjqqo91/03_gvim_setup.jpg
4. https://s2.postimg.org/mxku3cuy1/04_gvim_setup.jpg
5. https://s18.postimg.org/6a1wh5t55/05_gvim_setup.jpg
6. https://s18.postimg.org/j11l1p4x5/06_gvim_setup.jpg
7. https://s29.postimg.org/auknub1uf/07_gvim_setup.jpg

0. Here are my _vimrc turd-file settings (also included below).
C:\apps\editor\txt\gvim\_vimrc
set directory=C:\\tmp\vim\directory//,%TMP%,C:\WINDOWS\Temp//,$HOME,.
set backupdir=C:\\tmp\vim\backupdir//,%TMP%,C:\WINDOWS\Temp//,$HOME,.
set undodir=C:\\tmp\vim\undodir//,%TMP%,C:\WINDOWS\Temp//,$HOME,.
https://s12.postimg.org/nezeiaxi5/00_gvim_setup.jpg

1. The file simply exists (there are no turd files)
FILE = C:\data\test\foo.txt
swap turd = C:\tmp\vim\directory\{empty}
backup turd = C:\tmp\vim\backupdir\{empty}
undo turd = C:\tmp\vim\undodir\{empty}
https://s13.postimg.org/heacohyfr/01_gvim_setup.jpg

2. The file is opened for edit
A swap file is created in "directory", named C:%%data%test%foo.txt.swp
FILE = C:\data\test\foo.txt
swap turd = C:\tmp\vim\directory\C:%%data%test%foo.txt.swp
backup turd = C:\tmp\vim\backupdir\{empty}
undo turd = C:\tmp\vim\undodir\{empty}
https://s1.postimg.org/etb4r7nbj/02_gvim_setup.jpg

3. The swap file is a lock turd that contains crash-recovery information:
https://s24.postimg.org/4ubjqqo91/03_gvim_setup.jpg

4. The file is saved
A backup file is created in "backupdir", named foo.txt~
FILE = C:\data\test\foo.txt
swap turd = C:\tmp\vim\directory\C:%%data%test%foo.txt.swp
backup turd = C:\tmp\vim\backupdir\foo.txt~
undo turd = C:\tmp\vim\undodir\{empty}
https://s2.postimg.org/mxku3cuy1/04_gvim_setup.jpg

5. This backup is just a copy of the original file before any edits
https://s18.postimg.org/6a1wh5t55/05_gvim_setup.jpg

6. An edit is introduced
This creates an undo file in "undodir", named C%%data%test%foo.txt
FILE = C:\data\test\foo.txt
swap turd = C:\tmp\vim\directory\C:%%data%test%foo.txt.swp
backup turd = C:\tmp\vim\backupdir\foo.txt~
undo turd = C:\tmp\vim\undodir\C%%data%test%foo.txt
https://s18.postimg.org/j11l1p4x5/06_gvim_setup.jpg

7. The undo file contains undo changes
https://s29.postimg.org/auknub1uf/07_gvim_setup.jpg

Please improve so that this thread serves as a vim turd file reference.
(Note: Linux added as their users know vim rather well so they can help!)
" " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " "
" My user edits are below this line (where doublequote starts a comment)
" The default vimrc is located at: " C:\Program Files (x86)\Vim\_vimrc
" Typing the ":version" command lists rc file locations.
" Vim settings are in _givmrc (which is always sourced)
" GVim settings are in _gvmrc (which is also sourced if the GUI is invoked)
" Using separate _vimrc & _gvimrc files avoids if-then-else clutter:
" if has("win32") || has("win64")
" set directory=$TEMP,. " swap filescurrent dir
" set backupdir=C:\temp,$HOME,. " backup files
" set undodir=C:\temp,$HOME,. " undo files
" endif
" if has("gui_win32") || has("gui_win64")
" syntax on
" colo desert
" set guifont=Consolas:h12
" endif
" " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " "
" Given a file being edited that is named foo.txt, the defaults are:
" .foo.txt.swap is a temporary swap file while editing (& lock/undo file)
" .foo.txt~ is a temporary backup of the original file before editing
" .foo.txt.un~ is a temporary undo file after editing
" " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " "
" Default Windows temporary directories are:
" Start > Run > %TMP% is C:\Users\usr1\AppData\Local\Temp
" Start > Run > %TEMP% is C:\Users\usr1\AppData\Local\Temp
" " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " "
" Double trailing slashes make the otherwise centralized swap files use
" filenames that are based on the full pathname of the edited file
" (this prevents swap file name collisions when editing two files of the
" same name at the same time, e.g., README files)
" EXAMPLE: set directory=c:\\tmp//,c:\\temp//
" Comma-separated values sequence in case directories don't exist
" A dot (.) means the current directory of the file being edited
" " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " "
" The "backupdir" is for backup files .foo.txt~
" The backup file is the last copy of the file as opened before new edits.
" Default vim behavior upon writing with "backup" turned on, is to "jump":
" a. Write the buffer to a new file name
" b. Delete the original file
" c. Rename the new file to the original file name
" With "nobackup", vim writes the buffer directly to the original file.
" set backup
" set nobackup
" set nowritebackup
set backupdir=C:\\tmp\vim\backupdir//,%TMP%,C:\WINDOWS\Temp//,$HOME,.
" " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " "
" The "directory" is for temporary swap files .foo.txt.swp
" Temporary swap files only exist during edits.
" The swap file is a lock file & a crash-recovery file.
" set swapfile
" set noswapfile
" set directory-=. (removes the directory from the sequence list)
set directory=C:\\tmp\vim\directory//,%TMP%,C:\WINDOWS\Temp//,$HOME,.
" " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " "
" The "undodir" is for undo files .foo.txt.un~
" set undofile
" set noundofile
set undodir=C:\\tmp\vim\undodir//,%TMP%,C:\WINDOWS\Temp//,$HOME,.
" " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " "

Roy Tremblay

unread,
Jun 1, 2017, 4:14:54 PM6/1/17
to
Roy Tremblay <rembla...@nlnet.nl> actually wrote:

> Moving my vim setup over from Windows XP to Windows 10, I ran a few
> experiments today trying to figure out how best to set up vim on Windows 10
> so that the turd files it leaves (a) don't jump around, and (b) don't
> clutter up the current directory.

BTW, here is an example of the turd files jumping about by default:
https://s9.postimg.org/70klfzqgf/gvim_turd_files.gif

Roy Tremblay

unread,
Jun 1, 2017, 4:14:58 PM6/1/17
to
"J.O. Aho" <us...@example.net> actually wrote:

> We don't use it on microsoft infected machines, so there is no help we
> can offer you, so please keep us out of you migration

Are you sure vim isn't the "vi" that is included with most linux systems?
And that the dotfile setup is almost exactly the same?

Putting it bluntly, my research implies your statement is factually wrong.
Or am I wrong?

This says the vi on "most UNIX systems" is vim!
http://www.vim.org/

This says the default vi on Ubuntu is vim!
https://askubuntu.com/questions/111019/how-to-make-vi-default#111022

Even if it's not the default Ubuntu editor, it's on Ubuntu for sure:
https://www.cyberciti.biz/faq/howto-install-vim-on-ubuntu-linux/

This article says it's the top text editor on Linux:
Top 5 Best Linux Text Editors
http://www.thegeekstuff.com/2009/07/top-5-best-linux-text-editors

This article says vim is just a newer version of vi on Linux:
http://www.hostingadvice.com/blog/5-popular-text-editors-linux/

Linux.org also equates vim as a newer version of vi on Linux:
https://www.linux.org/threads/text-editors.4134/

This shows that VIM is on Redhat/Centos/Fedora & Debian/Ubuntu:
http://www.yolinux.com/TUTORIALS/LinuxTutorialAdvanced_vi.html

How can you claim, in the wake of that evidence, that most Linux "vi"
installations aren't just "vim" with an alias to vi?

Good Guy

unread,
Jun 1, 2017, 4:21:24 PM6/1/17
to

For ( a )  I assume you are talking about Desktop Icons.  If this is so then Right-Click on your Desktop and then change the settings as shown in this picture:


https://i.cubeupload.com/DuT1Xn.png



--
With over 500 million devices now running Windows 10, customer satisfaction is higher than any previous version of windows.

Roy Tremblay

unread,
Jun 1, 2017, 4:41:12 PM6/1/17
to
Marek Novotny <marek....@marspolar.com> actually wrote:

> Now you can check for yourself if you're so inclined. We'd all
> appreciate it if you'd keep your Windows bullshit off the linux group.
> If you have a *linux* question feel free to ask in the *linux* group.
> Otherwise, we're not interested.

I researched and lurked BEFORE I had asked the question and written the
tutorial to help others, like you often do.

So, respectfully, I have to say that the evidence shows that VIM is on
Linux in a very common way.

BTW, I respect you Marek, from lurking on a.o.l where I know your opinion
and code-writing help is always respected (I hope the warfarin is working
well as you had everyone scared for a few weeks a while ago when you
disappeared for a few months).

Respectfully, I note that you addressed "a" question, but not the key
question.

However, you didn't address the key question, which I very respectfully
repeat which is whether vim is on Linux, where you and J.O. Aho imply it's
not, but that's like denying that the sky is blue.

It seems overwhelimingly so that Vim is on Linux and, in fact, it's the
default vi editor on some Linux variants.

Is that not a true statement overall?

NOTE: I will set the followup to exclude a.o.l and I will NOT reply to
a.o.l again on this subject, so if you want to answer the basic question,
then it will have to be on the windows ng as you suggested we do.
0 new messages