diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-24 16:12:54 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-24 16:12:54 +1200 |
commit | d9ed6b7353ea63bb3120458b5f748b258399546e (patch) | |
tree | e319139a1b456cf083fc7bcc9accd337803b9d59 | |
parent | Merge branch 'release/v4.44.0' (diff) | |
parent | Bump VERSION (diff) | |
download | dotfiles-d9ed6b7353ea63bb3120458b5f748b258399546e.tar.gz dotfiles-d9ed6b7353ea63bb3120458b5f748b258399546e.zip |
Merge branch 'release/v4.45.0'v4.45.0
* release/v4.45.0:
Bump VERSION
Remove overzealous checks
Use simple string check for 'runtimepath'
Adjust comment layout
Only set 'background' if not already set right
Switch to a hyphen for trailing whitespace
Amend a couple of comments
Use correct capitalisation for Neovim
Use comma-separated syntax for multiple appends
Restore ternary syntax for $VIM setting
Remove per-system vimrc fixing
Tolerate spaces for final reply move
-rw-r--r-- | Makefile | 5 | ||||
-rw-r--r-- | VERSION | 4 | ||||
-rw-r--r-- | vim/after/ftplugin/mail.vim | 2 | ||||
-rw-r--r-- | vim/system/centos.vim | 33 | ||||
-rw-r--r-- | vim/system/debian.vim | 18 | ||||
-rw-r--r-- | vim/vimrc | 72 |
6 files changed, 42 insertions, 92 deletions
@@ -588,11 +588,6 @@ install-vim-compiler: install-vim-config: install-vim-cache cp -p -- vim/vimrc.stub.vim $(HOME)/.vimrc cp -p -- vim/vimrc $(VIMRC) - if [ -e /etc/debian_version ] ; then \ - cp -p -- vim/system/debian.vim $(VIMDIR)/system.vim ; \ - elif [ -e /etc/centos-release ] ; then \ - cp -p -- vim/system/centos.vim $(VIMDIR)/system.vim ; \ - fi install-vim-filetype: cp -p -- vim/filetype.vim vim/scripts.vim $(VIMDIR) @@ -1,2 +1,2 @@ -tejr dotfiles v4.44.0 -Thu May 23 23:30:11 UTC 2019 +tejr dotfiles v4.45.0 +Fri May 24 04:12:54 UTC 2019 diff --git a/vim/after/ftplugin/mail.vim b/vim/after/ftplugin/mail.vim index 47c82bb6..2e63c449 100644 --- a/vim/after/ftplugin/mail.vim +++ b/vim/after/ftplugin/mail.vim @@ -34,7 +34,7 @@ if line('.') == 1 && col('.') == 1 endwhile " Now move to the first quoted or unquoted blank line - call search('\m^>\=$', 'c') + call search('\m^>\= *$', 'c') endif diff --git a/vim/system/centos.vim b/vim/system/centos.vim deleted file mode 100644 index 3c1dbc48..00000000 --- a/vim/system/centos.vim +++ /dev/null @@ -1,33 +0,0 @@ -" 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 deleted file mode 100644 index 07649f07..00000000 --- a/vim/system/debian.vim +++ /dev/null @@ -1,18 +0,0 @@ -" 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,16 +1,13 @@ " Tom Ryder (tejr)'s vimrc: <https://sanctum.geek.nz/cgit/dotfiles.git> " Requires Vim 7.0 or newer with +eval. -" Undo anything the operating system's vimrc may have broken -runtime system.vim - " Set an environment variable for the user runtime directory if !exists('$MYVIM') - if has('win32') || has('win64') - let $MYVIM = expand('~/vimfiles') - else - let $MYVIM = expand('~/.vim') - endif + let $MYVIM = expand( + \ has('win32') || has('win64') + \ ? '~/vimfiles' + \ : '~/.vim' + \ ) endif " The all-important default indent settings; filetypes to tweak @@ -37,11 +34,16 @@ else set backupdir^=$MYVIM/cache/backup endif +" Restore insert mode 'backspace' limits to the stringent Vim default, if a +" system vimrc or Neovim's heretical defaults has messed with it +set backspace= + " Add some *nix paths not to back up +" /dev/shm: Shared memory RAM disk +" /usr/tmp: Hard-coded path for `sudo -e` 1/2 +" /var/tmp: Hard-coded path for `sudo -e` 2/2 if has('unix') - set backupskip^=/dev/shm/* " Shared memory RAM disk - set backupskip^=/usr/tmp/* " Hard-coded path for `sudo -e` 1/2 - set backupskip^=/var/tmp/* " Hard-coded path for `sudo -e` 2/2 + set backupskip^=/dev/shm/*,/usr/tmp/*,/var/tmp/* endif " Indent wrapped lines if supported (v7.4.338) @@ -54,8 +56,9 @@ set comments= set commentstring= " Add completion options -set completeopt+=longest " Insert longest common substring -set completeopt+=menuone " Show the menu even if only one match +" longest: Insert longest common substring +" menuone: Show the menu even if only one match +set completeopt+=longest,menuone " Give me a prompt instead of just rejecting risky :write, :saveas set confirm @@ -75,7 +78,7 @@ if has('multi_byte') endif " Don't wait for a key after Escape in insert mode -" Not in NeoVim +" Not in Neovim if exists('+esckeys') set noesckeys endif @@ -118,10 +121,8 @@ set include= set incsearch " Don't show a status line if there's only one window -" This is Vim's default, but not NeoVim's -if &laststatus != 1 - set laststatus=1 -endif +" This is Vim's default, but not Neovim's +set laststatus=1 " Don't redraw the screen during batch execution set lazyredraw @@ -130,11 +131,12 @@ set lazyredraw set linebreak " Define extra 'list' display characters -set listchars+=extends:> " Unwrapped text to screen right -set listchars+=nbsp:+ " Non-breaking spaces -set listchars+=precedes:< " Unwrapped text to screen left -set listchars+=tab:>- " Tab characters, preserve width -set listchars+=trail:_ " Trailing spaces +" extends: Unwrapped text to screen right +" nbsp: Non-breaking spaces +" precedes: Unwrapped text to screen left +" tab: Tab characters, preserve width +" trail: Trailing spaces +set listchars+=extends:>,nbsp:+,precedes:<,tab:>-,trail:- " Don't allow setting options via buffer content set nomodeline @@ -145,11 +147,13 @@ set nrformats-=octal " Don't search /usr/include by default set path-=/usr/include -" Disable command line display of file position -" This is Vim's default, but not NeoVim's -if &ruler - set noruler -endif +" Disable command line display of file position if a system vimrc or Neovim +" has switched it on +set noruler + +" Remove Debian's 'runtimepath' nonsense if present +set runtimepath-=/var/lib/vim/addons +set runtimepath-=/var/lib/vim/addons/after " Make sessions usable set sessionoptions-=localoptions " No buffer options or mappings @@ -168,15 +172,15 @@ set splitright " Right of the current window, not left " Don't try to syntax highlight run-on lines set synmaxcol=500 -" PuTTY is a fast terminal +" PuTTY is a fast terminal, but Vim doesn't know that yet if &term =~# '^putty' set ttyfast endif " No terminal mouse, even if we could; the manual says to set 't_RV', but -" doing that doesn't seem to prevent 'ttyfast' from being set -" Not in NeoVim -if exists('+ttymouse') && &ttymouse !=# '' +" doing that doesn't seem to prevent 'ttyfast' from being set; check for +" option existence as this is not an option in Neovim +if exists('+ttymouse') set ttymouse= endif @@ -236,7 +240,9 @@ try colorscheme sahara set cursorline catch - set background=dark + if &background != 'dark' " Avoid reloading syntax files unnecessarily + set background=dark + endif endtry " Remap normal space to scroll down a page |