aboutsummaryrefslogtreecommitdiff
path: root/plugin/big_file_options.vim
blob: d78077a37c7163bd27775432fb21655488341641 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
"
" big_file_options.vim: When opening a large file, take some measures to keep
" things loading quickly.
"
" Author: Tom Ryder <tom@sanctum.geek.nz>
" License: Same as Vim itself
"
if exists('loaded_big_file_options') || &compatible
  finish
endif
if !has('autocmd') || v:version < 700
  finish
endif
let loaded_big_file_options = 1

" Define autocmd for calling to check filesize
augroup big_file_options
  autocmd!
  autocmd BufReadPre,StdinReadPre
        \ *
        \ call big_file_options#CheckPre(expand('<afile>'))
  autocmd BufReadPost,StdinReadPost
        \ *
        \ call big_file_options#CheckPost()
augroup end