From 2c92a488e13aecc4cee757b200a74d099eb0fdd3 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 24 Jul 2018 17:09:23 +1200 Subject: Spin quickfix_auto_open.vim out into a plugin --- .gitmodules | 3 +++ vim/bundle/quickfix_auto_open | 1 + vim/plugin/quickfix_auto_open.vim | 22 ---------------------- 3 files changed, 4 insertions(+), 22 deletions(-) create mode 160000 vim/bundle/quickfix_auto_open delete mode 100644 vim/plugin/quickfix_auto_open.vim diff --git a/.gitmodules b/.gitmodules index 972ca896..46179fab 100644 --- a/.gitmodules +++ b/.gitmodules @@ -29,6 +29,9 @@ [submodule "vim/bundle/put_blank_lines"] path = vim/bundle/put_blank_lines url = https://sanctum.geek.nz/code/vim-put-blank-lines.git +[submodule "vim/bundle/quickfix_auto_open"] + path = vim/bundle/quickfix_auto_open + url = https://sanctum.geek.nz/code/vim-quickfix-auto-open.git [submodule "vim/bundle/redact_pass"] path = vim/bundle/redact_pass url = https://sanctum.geek.nz/code/vim-redact-pass.git diff --git a/vim/bundle/quickfix_auto_open b/vim/bundle/quickfix_auto_open new file mode 160000 index 00000000..a2eccef1 --- /dev/null +++ b/vim/bundle/quickfix_auto_open @@ -0,0 +1 @@ +Subproject commit a2eccef1861e2c0be988bc182d7b14be94ebc9ed diff --git a/vim/plugin/quickfix_auto_open.vim b/vim/plugin/quickfix_auto_open.vim deleted file mode 100644 index e2f111fb..00000000 --- a/vim/plugin/quickfix_auto_open.vim +++ /dev/null @@ -1,22 +0,0 @@ -" -" quickfix_auto_open.vim: Always pop open the quickfix list or location list -" when they're changed. Dispassionately stolen from romainl's minivimrc. -" -" Author: Tom Ryder -" License: Same as Vim itself -" -if exists('g:loaded_quickfix_auto_open') || &compatible - finish -endif -if !exists('##QuickfixCmdPost') || !exists('##VimEnter') - finish -endif -let g:loaded_quickfix_auto_open = 1 - -" Always pop open quickfix and location lists when changed -augroup quickfix_auto_open - autocmd! - autocmd QuickfixCmdPost [^l]* cwindow - autocmd QuickfixCmdPost l* lwindow - autocmd VimEnter * cwindow -augroup END -- cgit v1.2.3 From 5a9fbcf87cdf4513d3598700b6c6c4ec83dca139 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 25 Jul 2018 12:50:49 +1200 Subject: Remove & remaps I didn't know about g&, which is good enough. --- vim/vimrc | 6 ------ 1 file changed, 6 deletions(-) diff --git a/vim/vimrc b/vim/vimrc index 3dadba76..5cd69d14 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -189,12 +189,6 @@ imap (DigraphSearch) nnoremap nnoremap -" Remap normal/visual & to preserve substitution flags -nnoremap & :&& -if exists(':xnoremap') - xnoremap & :&& -endif - " Map g: as a 'colon operator' nmap g: (ColonOperator) -- cgit v1.2.3 From acb8034af9a1e0cf93b8f4ee614d9c9eaeaf8cd7 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 25 Jul 2018 12:51:01 +1200 Subject: Update colon_operator.vim plugin --- vim/bundle/colon_operator | 2 +- vim/bundle/surround | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vim/bundle/colon_operator b/vim/bundle/colon_operator index 5525627d..f9664112 160000 --- a/vim/bundle/colon_operator +++ b/vim/bundle/colon_operator @@ -1 +1 @@ -Subproject commit 5525627dd9727f2ee713e3a06145a145410bcd7c +Subproject commit f966411229eae27333166a2e13ff868f1bf2b705 diff --git a/vim/bundle/surround b/vim/bundle/surround index aa1f120a..59706887 160000 --- a/vim/bundle/surround +++ b/vim/bundle/surround @@ -1 +1 @@ -Subproject commit aa1f120ad3a29c27cc41d581cda3751c59343cce +Subproject commit 597068870b8f093a8b2d11536c62ff31222ee8d0 -- cgit v1.2.3 From df054c2839260c6b3de1328c9f7a47900c0db1e8 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 25 Jul 2018 14:52:52 +1200 Subject: Stamp down three new ShellCheck 0.5.0 errors All of these are false positives. --- bash/bashrc.d/pushd.bash | 2 +- bash/bashrc.d/vared.bash | 2 +- ksh/shrc.d/ksh.sh | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bash/bashrc.d/pushd.bash b/bash/bashrc.d/pushd.bash index ec621037..4a6e4be3 100644 --- a/bash/bashrc.d/pushd.bash +++ b/bash/bashrc.d/pushd.bash @@ -1,4 +1,4 @@ # Make pushd default to $HOME if no arguments given, much like cd pushd() { - builtin pushd "${@:-"$HOME"}" + builtin pushd "${@:-"$HOME"}" || return } diff --git a/bash/bashrc.d/vared.bash b/bash/bashrc.d/vared.bash index 9159485b..e024f48a 100644 --- a/bash/bashrc.d/vared.bash +++ b/bash/bashrc.d/vared.bash @@ -25,6 +25,6 @@ vared() { fi local name for name ; do - IFS= read -e -i "${!name}" -p "${prompt:-"$name"=}" -r -- "$name" + IFS= read -e -i "${!name}" -p "${prompt:-"$name"=}" -r -- "${name?}" done } diff --git a/ksh/shrc.d/ksh.sh b/ksh/shrc.d/ksh.sh index b591f37c..cc6eeb32 100644 --- a/ksh/shrc.d/ksh.sh +++ b/ksh/shrc.d/ksh.sh @@ -21,6 +21,7 @@ if [ -z "$KSH_VERSION" ] ; then # Test whether we have content in the .sh.version variable. Suppress errors # and run it in a subshell to work around parsing error precedence. + # shellcheck disable=SC2234 ( test -n "${.sh.version}" ) 2>/dev/null || return # If that peculiarly named variable was set, then that's our KSH_VERSION -- cgit v1.2.3 From 3a6793b57f7b99e2cc7fed016f1a9f8b0bc15495 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 25 Jul 2018 16:31:36 +1200 Subject: Correct VIMRC path for NeoVim install target --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 507221a8..acf0bab7 100644 --- a/Makefile +++ b/Makefile @@ -512,7 +512,7 @@ install-neovim: make install-vim \ VIM=nvim \ VIMDIR=$${XDG_CONFIG_HOME:-"$$HOME"/.config}/nvim \ - VIMRC=$${XDF_CONFIG_HOME:="$$HOME"/.config}/init.vim + VIMRC=$${XDG_CONFIG_HOME:="$$HOME"/.config}/nvim/init.vim install-vim-after: install-vim-after-ftplugin \ install-vim-after-indent \ -- cgit v1.2.3 From f1472da575d606556bf963156c0ab193529f7d0b Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 25 Jul 2018 16:31:48 +1200 Subject: Set 'ttymouse' silently It's not in NeoVim. --- vim/vimrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vim/vimrc b/vim/vimrc index 5cd69d14..93621ac2 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -138,7 +138,7 @@ set splitright set timeoutlen=3000 " No terminal mouse, even if we could -set ttymouse= +silent! set ttymouse= " Wildmenu settings; see also plugin/wildignore.vim set wildmenu " Use wildmenu -- cgit v1.2.3 From 062e5d765443c09778d889a4a2ef58dd4248af8c Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 25 Jul 2018 16:45:55 +1200 Subject: Set 'noruler' in .vimrc It's off by default in Vim, but NeoVim changed it. --- vim/vimrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vim/vimrc b/vim/vimrc index 93621ac2..cd8b0293 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -124,6 +124,9 @@ set nrformats-=octal set path-=/usr/include " Let the C/C++ filetypes set that set path+=** " Search current directory's whole tree +" Disable the ruler +set noruler + " Don't show startup splash screen (I donated) set shortmess+=I -- cgit v1.2.3 From a4484bd1444f51154840fe2be12e9dde6414d1ec Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 26 Jul 2018 09:42:15 +1200 Subject: Move NeoVim-specific config to subfile --- Makefile | 5 +++-- vim/nvim.vim | 7 +++++++ vim/vimrc | 11 +++++------ 3 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 vim/nvim.vim diff --git a/Makefile b/Makefile index acf0bab7..a19e87d8 100644 --- a/Makefile +++ b/Makefile @@ -511,8 +511,9 @@ install-vim: install-vim-after \ install-neovim: make install-vim \ VIM=nvim \ - VIMDIR=$${XDG_CONFIG_HOME:-"$$HOME"/.config}/nvim \ - VIMRC=$${XDG_CONFIG_HOME:="$$HOME"/.config}/nvim/init.vim + VIMDIR="$${XDG_CONFIG_HOME:-"$$HOME"/.config}/nvim" \ + VIMRC="$${XDG_CONFIG_HOME:="$$HOME"/.config}/nvim/init.vim" + cp -p -- vim/nvim.vim "$${XDG_CONFIG_HOME:-"$$HOME"/.config}/nvim" install-vim-after: install-vim-after-ftplugin \ install-vim-after-indent \ diff --git a/vim/nvim.vim b/vim/nvim.vim new file mode 100644 index 00000000..3ad54f57 --- /dev/null +++ b/vim/nvim.vim @@ -0,0 +1,7 @@ +" Configuration specific to NeoVim + +" Don't show a statusline if there's only one window +set laststatus=1 + +" Disable command line display of file position +set noruler diff --git a/vim/vimrc b/vim/vimrc index cd8b0293..1ffb3e09 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -98,9 +98,6 @@ set incsearch " Don't join lines with two spaces at the end of sentences set nojoinspaces -" Don't show a statusline if there's only one window -set laststatus=1 - " Don't redraw the screen during batch execution set lazyredraw @@ -124,9 +121,6 @@ set nrformats-=octal set path-=/usr/include " Let the C/C++ filetypes set that set path+=** " Search current directory's whole tree -" Disable the ruler -set noruler - " Don't show startup splash screen (I donated) set shortmess+=I @@ -300,5 +294,10 @@ nnoremap :bdelete " \INS edits a new buffer nnoremap :enew +" If we're running NeoVim, source some extra configuration +if has('nvim') + runtime nvim.vim +endif + " Source any .vim files from ~/.vim/config runtime! config/*.vim -- cgit v1.2.3 From 764911bcf9e3a204d44dcf95280c900d02b62b77 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 26 Jul 2018 19:20:12 +1200 Subject: Bump VERSION --- VERSION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index d84a24f6..35c33467 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -tejr dotfiles v1.40.0 -Tue Jul 24 03:12:33 UTC 2018 +tejr dotfiles v1.41.0 +Thu Jul 26 07:20:03 UTC 2018 -- cgit v1.2.3