Oops, I guess You wanted to DISABLE for files larger than a certain size, not ENABLE them. You could do the same thing in reverse, or potentially enable by default and then disable locally in a BufReadPre. I'm not sure whether that works or not.
Thanks for the suggestions Ben and John, I went with the following:
"try to disable swapfiles for large files
augroup disable_swap_large_files
autocmd!
"5 megs
autocmd BufRead * if getfsize(expand('%:p')) > 5242880 |
\ setlocal noswapfile noundofile | endif
augroup END
augroup disable_swap_large_files
autocmd!
"5 megs
autocmd BufRead * if getfsize(expand('%:p')) > 5242880 |
\ setlocal noswapfile noundofile | endif
augroup END
It seems that the backup option is a global one so I didn't change that one.
Regards,
Jorge
--
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/groups/opt_out.
No comments:
Post a Comment