diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-17 00:22:36 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-17 00:22:36 +1200 |
commit | 9b53214dc18da5c54ea18435edf603d95a08f741 (patch) | |
tree | 8a280273960b7da90376928ed214b5e4c8682678 /vim | |
parent | Adjust formatting of autocmd (diff) | |
download | dotfiles-9b53214dc18da5c54ea18435edf603d95a08f741.tar.gz dotfiles-9b53214dc18da5c54ea18435edf603d95a08f741.zip |
Revert "Dispense with system-dependent files"
This reverts commit 1c51d2e98e0e0ec91da7ff3a93ad84f9767d0658.
Already found problems--trips up using the -V command line option.
Diffstat (limited to 'vim')
-rw-r--r-- | vim/system/centos.vim | 33 | ||||
-rw-r--r-- | vim/system/debian.vim | 18 | ||||
-rw-r--r-- | vim/vimrc | 4 |
3 files changed, 53 insertions, 2 deletions
diff --git a/vim/system/centos.vim b/vim/system/centos.vim new file mode 100644 index 00000000..3c1dbc48 --- /dev/null +++ b/vim/system/centos.vim @@ -0,0 +1,33 @@ +" Revert settings that CentOS might have touched +if $VIM !=# '/usr/share/vim' + \ || !filereadable('/etc/centos-release') + finish +endif + +" Set options back to appropriate defaults +set history& +if has('cmdline_info') + set ruler& +endif +if has('cscope') + set cscopeprg& + set cscopetag& + set cscopetagorder& + set cscopeverbose& + silent! cscope kill +endif +if has('gui') + set guicursor& +endif +if has('viminfo') + set viminfo& +endif + +" Restore terminal settings to reflect terminfo +set t_Co& t_Sf& t_Sb& + +" Delete autocmd groups +augroup redhat + autocmd! +augroup END +augroup! redhat diff --git a/vim/system/debian.vim b/vim/system/debian.vim new file mode 100644 index 00000000..07649f07 --- /dev/null +++ b/vim/system/debian.vim @@ -0,0 +1,18 @@ +" Revert settings that Debian might have touched +if $VIM !=# '/usr/share/vim' + \ || !filereadable('/etc/debian_version') + finish +endif + +" Set options back to appropriate defaults +set history& +set printoptions& +set ruler& +set suffixes& + +" Restore terminal settings to reflect terminfo +set t_Co& t_Sf& t_Sb& + +" Remove addons directories from 'runtimepath' if present +set runtimepath-=/var/lib/vim/addons +set runtimepath-=/var/lib/vim/addons/after @@ -1,8 +1,8 @@ " Tom Ryder (tejr)'s vimrc: <https://sanctum.geek.nz/cgit/dotfiles.git> " Requires Vim 7.0 or newer with +eval. -" Revert everything to Vim defaults -set all& +" Undo anything the operating system's vimrc may have broken +runtime system.vim " Set an environment variable for the user runtime directory if !exists('$MYVIMRUNTIME') |