diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-12-08 22:59:42 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-12-08 22:59:42 +1300 |
commit | be35b0336de42ff13fd111593ae77d1348c0d7b5 (patch) | |
tree | 4f470b8a3ce409bc4a68913ed27075f45f05b1bf | |
parent | Merge branch 'release/v7.23.0' (diff) | |
parent | Bump VERSION (diff) | |
download | dotfiles-8.0.0.tar.gz (sig) dotfiles-8.0.0.zip |
Merge branch 'release/v8.0.0'v8.0.0
* release/v8.0.0:
Switch to default tabs, spaces for some filetypes
Don't use cache for phpcsff(1df)
-rw-r--r-- | VERSION | 4 | ||||
-rwxr-xr-x | bin/phpcsff.mi5 | 2 | ||||
-rw-r--r-- | vim/after/indent/c.vim | 15 | ||||
-rw-r--r-- | vim/after/indent/gitconfig.vim | 15 | ||||
-rw-r--r-- | vim/after/indent/html.vim | 9 | ||||
-rw-r--r-- | vim/after/indent/make.vim | 14 | ||||
-rw-r--r-- | vim/after/indent/perl.vim | 8 | ||||
-rw-r--r-- | vim/after/indent/php.vim | 8 | ||||
-rw-r--r-- | vim/after/indent/sh.vim | 8 | ||||
-rw-r--r-- | vim/after/indent/vim.vim | 3 | ||||
-rw-r--r-- | vim/indent/csv.vim | 24 | ||||
-rw-r--r-- | vim/indent/help.vim | 20 | ||||
-rw-r--r-- | vim/indent/tsv.vim | 2 | ||||
-rw-r--r-- | vim/vimrc | 38 |
14 files changed, 43 insertions, 127 deletions
@@ -1,2 +1,2 @@ -tejr dotfiles v7.23.0 -Fri, 29 Nov 2019 03:12:16 +0000 +tejr dotfiles v8.0.0 +Sun, 08 Dec 2019 09:59:39 +0000 diff --git a/bin/phpcsff.mi5 b/bin/phpcsff.mi5 index 5e33f047..49f00759 100755 --- a/bin/phpcsff.mi5 +++ b/bin/phpcsff.mi5 @@ -11,5 +11,5 @@ if ! command -v php-cs-fixer >/dev/null 2>&1 ; then exit 1 fi cat -- "${@:--}" > "$td"/src.php -php-cs-fixer fix --quiet -- "$td"/src.php +php-cs-fixer fix --quiet --using-cache=no -- "$td"/src.php cat -- "$td"/src.php diff --git a/vim/after/indent/c.vim b/vim/after/indent/c.vim index 9cea0a2d..45db2ebc 100644 --- a/vim/after/indent/c.vim +++ b/vim/after/indent/c.vim @@ -1,18 +1,3 @@ -" Use plain old tabs for indent in C files -setlocal noexpandtab -let b:undo_indent .= '|setlocal expandtab<' -if v:version > 703 - \ || v:version == 703 && has('patch629') - setlocal shiftwidth=0 -else - let &l:shiftwidth = &l:tabstop -endif -let b:undo_indent .= '|setlocal shiftwidth<' -if &softtabstop != -1 - let &l:softtabstop = &l:shiftwidth - let b:undo_indent .= '|setlocal softtabstop<' -endif - " If the path to the file looks like the Vim sources, set 'shiftwidth' to 4 if expand('%:p') =~# '/vim.*src/' setlocal shiftwidth=4 diff --git a/vim/after/indent/gitconfig.vim b/vim/after/indent/gitconfig.vim deleted file mode 100644 index 943e78ea..00000000 --- a/vim/after/indent/gitconfig.vim +++ /dev/null @@ -1,15 +0,0 @@ -" Use tabs for indent in Git config files, rather than fighting with the -" frontend tool -setlocal noexpandtab -let b:undo_indent .= '|setlocal expandtab<' -if v:version > 703 - \ || v:version == 703 && has('patch629') - setlocal shiftwidth=0 -else - let &l:shiftwidth = &l:tabstop -endif -let b:undo_indent .= '|setlocal shiftwidth<' -if &softtabstop != -1 - let &l:softtabstop = &l:shiftwidth - let b:undo_indent .= '|setlocal softtabstop<' -endif diff --git a/vim/after/indent/html.vim b/vim/after/indent/html.vim index a7a085fe..72c92d21 100644 --- a/vim/after/indent/html.vim +++ b/vim/after/indent/html.vim @@ -4,3 +4,12 @@ unlet html_indent_inctags " Don't re-indent lines on right-angle-bracket or enter setlocal indentkeys-=<>>,<Return> let b:undo_ftplugin .= '|setlocal indentkeys<' + +" Use four spaces for indentation +setlocal expandtab +setlocal shiftwidth=4 +let b:undo_ftplugin .= '|setlocal expandtab< shiftwidth<' +if &l:softtabstop != -1 + let &l:softtabstop = &l:shiftwidth + let b:undo_ftplugin .= '|setlocal softtabstop<' +endif diff --git a/vim/after/indent/make.vim b/vim/after/indent/make.vim deleted file mode 100644 index 116ea25c..00000000 --- a/vim/after/indent/make.vim +++ /dev/null @@ -1,14 +0,0 @@ -" Use plain old tabs for Makefiles (of course) -setlocal noexpandtab -let b:undo_indent = 'setlocal expandtab<' -if v:version > 703 - \ || v:version == 703 && has('patch629') - setlocal shiftwidth=0 -else - let &l:shiftwidth = &l:tabstop -endif -let b:undo_indent .= '|setlocal shiftwidth<' -if &softtabstop != -1 - let &l:softtabstop = &l:shiftwidth - let b:undo_indent .= '|setlocal softtabstop<' -endif diff --git a/vim/after/indent/perl.vim b/vim/after/indent/perl.vim new file mode 100644 index 00000000..ba6dfdeb --- /dev/null +++ b/vim/after/indent/perl.vim @@ -0,0 +1,8 @@ +" Use four spaces for indentation +setlocal expandtab +setlocal shiftwidth=4 +let b:undo_ftplugin .= '|setlocal expandtab< shiftwidth<' +if &l:softtabstop != -1 + let &l:softtabstop = &l:shiftwidth + let b:undo_ftplugin .= '|setlocal softtabstop<' +endif diff --git a/vim/after/indent/php.vim b/vim/after/indent/php.vim new file mode 100644 index 00000000..ba6dfdeb --- /dev/null +++ b/vim/after/indent/php.vim @@ -0,0 +1,8 @@ +" Use four spaces for indentation +setlocal expandtab +setlocal shiftwidth=4 +let b:undo_ftplugin .= '|setlocal expandtab< shiftwidth<' +if &l:softtabstop != -1 + let &l:softtabstop = &l:shiftwidth + let b:undo_ftplugin .= '|setlocal softtabstop<' +endif diff --git a/vim/after/indent/sh.vim b/vim/after/indent/sh.vim new file mode 100644 index 00000000..ba6dfdeb --- /dev/null +++ b/vim/after/indent/sh.vim @@ -0,0 +1,8 @@ +" Use four spaces for indentation +setlocal expandtab +setlocal shiftwidth=4 +let b:undo_ftplugin .= '|setlocal expandtab< shiftwidth<' +if &l:softtabstop != -1 + let &l:softtabstop = &l:shiftwidth + let b:undo_ftplugin .= '|setlocal softtabstop<' +endif diff --git a/vim/after/indent/vim.vim b/vim/after/indent/vim.vim index 0767bca0..320e5d7d 100644 --- a/vim/after/indent/vim.vim +++ b/vim/after/indent/vim.vim @@ -6,8 +6,9 @@ if !exists('b:undo_indent') endif " Observe VimL conventions for two-space indents +setlocal expandtab setlocal shiftwidth=2 -let b:undo_indent .= '|setlocal shiftwidth<' +let b:undo_indent .= '|setlocal expandtab< shiftwidth<' if &softtabstop != -1 let &l:softtabstop = &l:shiftwidth let b:undo_indent .= '|setlocal softtabstop<' diff --git a/vim/indent/csv.vim b/vim/indent/csv.vim deleted file mode 100644 index e97ab29e..00000000 --- a/vim/indent/csv.vim +++ /dev/null @@ -1,24 +0,0 @@ -" Only do this when not done yet for this buffer -if exists('b:did_indent') - finish -endif -let b:did_indent = 1 - -" Manual indenting -setlocal noautoindent -let b:undo_indent = 'setlocal autoindent<' - -" Literal tabs -setlocal noexpandtab -let b:undo_indent .= '|setlocal expandtab<' -if v:version > 703 - \ || v:version == 703 && has('patch629') - setlocal shiftwidth=0 -else - let &l:shiftwidth = &l:tabstop -endif -let b:undo_indent .= '|setlocal shiftwidth<' -if &softtabstop != -1 - let &l:softtabstop = &l:shiftwidth - let b:undo_indent .= '|setlocal softtabstop<' -endif diff --git a/vim/indent/help.vim b/vim/indent/help.vim deleted file mode 100644 index 78de85d0..00000000 --- a/vim/indent/help.vim +++ /dev/null @@ -1,20 +0,0 @@ -" Only do this when not done yet for this buffer -if exists('b:did_indent') - finish -endif -let b:did_indent = 1 - -" Literal tabs -setlocal noexpandtab -let b:undo_indent = 'setlocal expandtab<' -if v:version > 703 - \ || v:version == 703 && has('patch629') - setlocal shiftwidth=0 -else - let &l:shiftwidth = &l:tabstop -endif -let b:undo_indent .= '|setlocal shiftwidth<' -if &softtabstop != -1 - let &l:softtabstop = &l:shiftwidth - let b:undo_indent .= '|setlocal softtabstop<' -endif diff --git a/vim/indent/tsv.vim b/vim/indent/tsv.vim deleted file mode 100644 index ae72397c..00000000 --- a/vim/indent/tsv.vim +++ /dev/null @@ -1,2 +0,0 @@ -" TSVs have the same indent options as CSVs -runtime! indent/csv.vim @@ -257,12 +257,11 @@ command! -bar ReloadFileType " first. Surely just `:source $MYVIMRC` would be good enough? " " The problem is there are potential side effects to the current buffer when -" the vimrc is reloaded. The :set commands for options like 'expandtab' and -" 'shiftwidth' may trample over different buffer-local settings that were -" specified by filetype and indent plugins. To ensure these local values are -" reinstated, we'll define the new command wrapper around an autoloaded -" function that itself issues a :ReloadFileType command after the vimrc file -" is sourced. +" the vimrc is reloaded. The global :set commands for some options may +" trample over different buffer-local settings that were specified by filetype +" and indent plugins. To ensure these local values are reinstated, we'll +" define the new command wrapper around an autoloaded function that itself +" issues a :ReloadFileType command after the vimrc file is sourced. " " We can't put the actual :source command into the script-local function we " define here, because Vim would get upset that we're trying to redefine @@ -415,33 +414,6 @@ endtry set comments= commentstring= define= include= set path-=/usr/include -" Next, we’ll adjust the global indentation settings. In general and as -" a default, I prefer spaces to tabs, and I like to use four of them, for -" a more distinct visual structure. Should you happen to disagree with this, -" I cordially invite you to fite me irl. -" -" <https://sanctum.geek.nz/blinkenlights/spaces.webm> -" -" Filetype indent plugins will often refine these settings for individual -" buffers. For example, 'expandtab' is not appropriate for Makefiles, nor for -" the Go programming language. For another, two-space indents are more -" traditional for Vim script. -" -set autoindent -set expandtab -set shiftwidth=4 -set smarttab - -" Apply 'softtabstop' option to make a tab key press in insert mode insert the -" same number of spaces as defined by the indent depth in 'shiftwidth'. If -" Vim is new enough to support it (v7.3.693), apply a negative value to do -" this dynamically if 'shiftwidth' changes. -" -" <https://github.com/vim/vim/releases/tag/v7.3.693> -" -execute 'set softtabstop=' - \ . escape#Arg(has#('patch-7.3.693') ? -1 : &shiftwidth) - " Relax traditional vi’s harsh standards over what regions of the buffer can " be removed with backspace in insert mode. While this admittedly allows bad " habits to continue, since insert mode by definition is not really intended |