diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-07-02 20:03:58 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-07-02 20:03:58 +1200 |
commit | 2f27201a89b3a8c51ad1bb9f6198a0a5b347a4ed (patch) | |
tree | e47a62300a27558a46680e6d5b912c90757c01d0 | |
parent | Merge branch 'hotfix/v1.16.1' (diff) | |
parent | Bump VERSION (diff) | |
download | dotfiles-1.17.0.tar.gz (sig) dotfiles-1.17.0.zip |
Merge branch 'release/v1.17.0'v1.17.0
* release/v1.17.0:
Bump VERSION
Use if not && for conditional install
Add CentOS and Debian .vim tweaks
Map \e in Vim to force a buffer to be editable
-rw-r--r-- | Makefile | 7 | ||||
-rw-r--r-- | VERSION | 4 | ||||
-rw-r--r-- | vim/config/centos.vim | 29 | ||||
-rw-r--r-- | vim/config/debian.vim | 34 | ||||
-rw-r--r-- | vim/vimrc | 2 |
5 files changed, 56 insertions, 20 deletions
@@ -550,7 +550,12 @@ install-vim-compiler: install-vim-config: mkdir -p -- $(VIMDIR)/config cp -p -- vim/vimrc $(VIMRC) - cp -p -- vim/config/*.vim $(VIMDIR)/config + if [ -e /etc/debian_version ] ; then \ + cp -p -- vim/config/debian.vim $(VIMDIR)/config ; \ + fi + if [ -e /etc/centos-release ] ; then \ + cp -p -- vim/config/centos.vim $(VIMDIR)/config ; \ + fi install-vim-filetype: cp -p -- vim/filetype.vim vim/scripts.vim $(VIMDIR) @@ -1,2 +1,2 @@ -tejr dotfiles v1.16.1 -Mon Jul 2 07:19:48 UTC 2018 +tejr dotfiles v1.17.0 +Mon Jul 2 08:03:40 UTC 2018 diff --git a/vim/config/centos.vim b/vim/config/centos.vim new file mode 100644 index 00000000..26289bf8 --- /dev/null +++ b/vim/config/centos.vim @@ -0,0 +1,29 @@ +" 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 csprg& cst& csto& csverb& + silent! cs 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/config/debian.vim b/vim/config/debian.vim index e50fc260..125a9240 100644 --- a/vim/config/debian.vim +++ b/vim/config/debian.vim @@ -1,21 +1,21 @@ " Revert settings that Debian might have touched -if $VIM ==# '/usr/share/vim' && filereadable('/etc/debian_version') - - " Set options back to appropriate defaults - set history& - set suffixes& - if has('cmdline_info') - set ruler& - endif - if has('printoptions') - set printoptions& - endif +if $VIM !=# '/usr/share/vim' || !filereadable('/etc/debian_version') + finish +endif - " Restore terminal settings to reflect terminfo - set t_Co& t_Sf& t_Sb& +" Set options back to appropriate defaults +set history& +set suffixes& +if has('cmdline_info') + set ruler& +endif +if has('printoptions') + set printoptions& +endif - " Remove addons directories from 'runtimepath' if present - silent! set runtimepath-=/var/lib/vim/addons - silent! set runtimepath-=/var/lib/vim/addons/after +" Restore terminal settings to reflect terminfo +set t_Co& t_Sf& t_Sb& -endif +" Remove addons directories from 'runtimepath' if present +silent! set runtimepath-=/var/lib/vim/addons +silent! set runtimepath-=/var/lib/vim/addons/after @@ -225,6 +225,8 @@ nnoremap <Bslash>C :<C-U>set cursorcolumn! cursorcolumn?<CR> nnoremap <Bslash>d :read !date<CR> " \D inserts the UTC date (POSIX date) nnoremap <Bslash>D :read !date -u<CR> +" \e forces a buffer to be editable +nnoremap <Bslash>e :set modifiable noreadonly<CR> " \f shows the current 'formatoptions' at a glance nnoremap <Bslash>f :<C-U>set formatoptions?<CR> " \g changes directory to the current file's location |