From 3d6a063b0702de236b3ffc6c5b40eef0cd76e56d Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Fri, 10 Nov 2017 21:15:10 +1300 Subject: Merge encoding.vim and file.vim into files.vim --- vim/config/encoding.vim | 4 ---- vim/config/file.vim | 40 ---------------------------------------- vim/config/files.vim | 45 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 44 deletions(-) delete mode 100644 vim/config/encoding.vim delete mode 100644 vim/config/file.vim create mode 100644 vim/config/files.vim diff --git a/vim/config/encoding.vim b/vim/config/encoding.vim deleted file mode 100644 index 72f2d40e..00000000 --- a/vim/config/encoding.vim +++ /dev/null @@ -1,4 +0,0 @@ -" Use UTF-8 by default wherever possible -if has('multi_byte') - set encoding=utf-8 -endif diff --git a/vim/config/file.vim b/vim/config/file.vim deleted file mode 100644 index a0c99f6c..00000000 --- a/vim/config/file.vim +++ /dev/null @@ -1,40 +0,0 @@ -" Load plugins for file types -if has('autocmd') - filetype plugin indent on -endif - -" Bind \p to show filetype -nnoremap - \ p - \ :set filetype? - -" Use all ancestors of current directory for :find -if has('file_in_path') - set path=** -endif - -" Try Mac line-endings if UNIX or DOS don't make sense; this has never -" happened to me but who knows, it might one day -set fileformats+=mac - -" If the Vim buffer for a file doesn't have any changes and Vim detects the -" file has been altered, quietly update it -set autoread - -" Save a file automatically if I change buffers or perform operations with the -" argument list; this is particularly helpful for me as I don't use 'hidden' -set autowrite - -" Don't use modelines at all, they're apparently potential security problems -" and I've never used them anyway -set nomodeline - -" I really like ZZ and ZQ, so I wrote a couple more mappings; ZW forces a -" write of the current buffer, but doesn't quit, and ZA forces a write of all -" buffers but doesn't quit -nnoremap - \ ZW - \ :write! -nnoremap - \ ZA - \ :wall! diff --git a/vim/config/files.vim b/vim/config/files.vim new file mode 100644 index 00000000..7a23b4c5 --- /dev/null +++ b/vim/config/files.vim @@ -0,0 +1,45 @@ +" Load plugins for file types +if has('autocmd') + filetype plugin indent on +endif + +" Bind \p to show filetype +nnoremap + \ p + \ :set filetype? + +" Use UTF-8 by default wherever possible +if has('multi_byte') + set encoding=utf-8 +endif + +" Use all ancestors of current directory for :find +if has('file_in_path') + set path=** +endif + +" Try Mac line-endings if UNIX or DOS don't make sense; this has never +" happened to me but who knows, it might one day +set fileformats+=mac + +" If the Vim buffer for a file doesn't have any changes and Vim detects the +" file has been altered, quietly update it +set autoread + +" Save a file automatically if I change buffers or perform operations with the +" argument list; this is particularly helpful for me as I don't use 'hidden' +set autowrite + +" Don't use modelines at all, they're apparently potential security problems +" and I've never used them anyway +set nomodeline + +" I really like ZZ and ZQ, so I wrote a couple more mappings; ZW forces a +" write of the current buffer, but doesn't quit, and ZA forces a write of all +" buffers but doesn't quit +nnoremap + \ ZW + \ :write! +nnoremap + \ ZA + \ :wall! -- cgit v1.2.3