Kirill Ryzhkov wrote:

Hi Vim developers!
I use vim on Linux all the time and found a problem with creating just huge swp files that can take up all the hard disk space. If you open vim and copy a large text that can cause the linux console to hang and then you force close the console, after a couple of days the swp file size can reach hundreds of gigabytes. I have already encountered this problem twice and each time I had to look for where these swp files were created in which directory.
I am using vim version 8.0.1453.
Maybe there is a new version that fixes this bug ?

No, but since you're a linux user you can handle this problem yourself with a cron job. Use  crontab -e  to edit the cron table commands. (cron is a daemon that runs at your specified times to do some work).
# # # # # /path/to/script

#1: minute (0-59)
#2: hour (0-23)
#3: day-of-month (1-31)
#4: month (1-12)
#5: day-of-week (0-6)

The shell script or command you have cron run can then check for size for those files which look like swap files, and if they're too big and too old; delete it. For example:  ...time-spec-here..  /usr/bin/find "/home/username" -type f -name '*.sw[a-z]' -atime 3 -size 2G -exec "/bin/rm" "{}" ";"

Note, I haven't tested the above line, and instead of removing the file, you may want to move it to some directory instead (to see if the command is doing what you want).
Suggested reading: man crontab, man find. UAYOR.

Chip Campbell

--
--
You received this message from the "vim_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/e7985590-7ed1-ec04-e8b7-4c66fcc4fded%40drchip.org.

Raspunde prin e-mail lui