diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-11-11 01:07:14 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-11-11 01:07:14 +1300 |
commit | aaf04871d944646225875d5e9cc31a967947c3fe (patch) | |
tree | 787efb73dabb6b9cda660ccde51e838b507a3dbd /vim/config/files.vim | |
parent | Merge branch 'hotfix/v0.12.2' (diff) | |
parent | Bump version number to 0.13.0 (diff) | |
download | dotfiles-aaf04871d944646225875d5e9cc31a967947c3fe.tar.gz dotfiles-aaf04871d944646225875d5e9cc31a967947c3fe.zip |
Merge branch 'release/v0.13.0'v0.13.0
* release/v0.13.0: (30 commits)
Bump version number to 0.13.0
Move mutt_mail.vim line select logic into plugin
Add new mail_mutt.vim plugin, apply mappings
Sort 'shortmess' flag settings alphabetically
Add 'o' and 'O' back into 'shortmess'
Set up individual flags for 'shortmess'
Fix oii(1df) so it works as a pipe
Use exists+ test rather than exists&
Adjust some whitespace and comment layout
Move matchit.vim sourcing into plugin.vim
Rename netrw.vim to plugin.vim
Remove 'shellslash' setting
Move fedora.vim into os.vim
Remove 'tildeop' setting
Rearrange three smaller files into display.vim
Move 'paste' options into terminal.vim
Move wildmenu config into completion.vim
Rename complete.vim to completion.vim
Rename term.vim to terminal.vim
Rename yank.vim to registers.vim
...
Diffstat (limited to 'vim/config/files.vim')
-rw-r--r-- | vim/config/files.vim | 45 |
1 files changed, 45 insertions, 0 deletions
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 <silent> + \ <Leader>p + \ :<C-U>set filetype?<CR> + +" 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 <silent> + \ ZW + \ :<C-U>write!<CR> +nnoremap <silent> + \ ZA + \ :<C-U>wall!<CR> |