aboutsummaryrefslogtreecommitdiff
path: root/plugin/big_file_options.vim
blob: 89b65c22bd80f54fae42358dde84389bd1898bf3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
"
" 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 || 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