From 3260ef7ee3cb8c107b810d4b7feb38ccc79bdfda Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 2 Jul 2018 11:17:12 +1200 Subject: Correct mapping Exclude operator mode, and restore visual/select selection. --- vim/vimrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vim/vimrc b/vim/vimrc index 15d86763..5b47d98f 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -165,7 +165,8 @@ if has('windows') endif " Stack normal/visual/select Ctrl-L to clear search highlight -noremap :nohlsearch +nnoremap :nohlsearch +vnoremap :nohlsearchgv " Stack insert Ctrl-C to undo the escaped insert operation " Default to not-quite-correct vim-tiny-compatible map if no plugin -- cgit v1.2.3 From a5b8367fd501fa2b28ea25518e8e22d905b2652f Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 2 Jul 2018 11:42:11 +1200 Subject: Add 'c' flag to 'formatoptions' for gitcommit This is so that quotes wrap pleasantly. --- vim/after/ftplugin/gitcommit.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vim/after/ftplugin/gitcommit.vim b/vim/after/ftplugin/gitcommit.vim index 761ebc81..b7538c9c 100644 --- a/vim/after/ftplugin/gitcommit.vim +++ b/vim/after/ftplugin/gitcommit.vim @@ -14,6 +14,6 @@ let b:undo_ftplugin = b:undo_ftplugin " Make angle brackets behave like mail quotes setlocal comments+=n:> -setlocal formatoptions+=or +setlocal formatoptions+=cor let b:undo_ftplugin = b:undo_ftplugin \ . '|setlocal comments< formatoptions<' -- cgit v1.2.3 From 080d0352f34f918b5a96d95798011fb57c49a68f Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 2 Jul 2018 11:47:26 +1200 Subject: Don't spellcheck &readonly text/markdown This stops annoying highlighting when I'm just reading something in Vim, rather than editing it (e.g. `view` or an unwriteable file). --- vim/after/ftplugin/markdown.vim | 10 ++++++---- vim/after/ftplugin/text.vim | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/vim/after/ftplugin/markdown.vim b/vim/after/ftplugin/markdown.vim index 29d13c71..7ec37c64 100644 --- a/vim/after/ftplugin/markdown.vim +++ b/vim/after/ftplugin/markdown.vim @@ -12,7 +12,9 @@ let b:did_ftplugin_after = 1 let b:undo_ftplugin = b:undo_ftplugin \ . '|unlet b:did_ftplugin_after' -" Spellcheck documents -setlocal spell -let b:undo_ftplugin = b:undo_ftplugin - \ . '|setlocal spell<' +" Spellcheck documents we're actually editing (not just viewing) +if !&readonly + setlocal spell + let b:undo_ftplugin = b:undo_ftplugin + \ . '|setlocal spell<' +endif diff --git a/vim/after/ftplugin/text.vim b/vim/after/ftplugin/text.vim index cd35231e..06ca464a 100644 --- a/vim/after/ftplugin/text.vim +++ b/vim/after/ftplugin/text.vim @@ -12,7 +12,9 @@ let b:did_ftplugin_after = 1 let b:undo_ftplugin = b:undo_ftplugin \ . '|unlet b:did_ftplugin_after' -" Spellcheck documents -setlocal spell -let b:undo_ftplugin = b:undo_ftplugin - \ . '|setlocal spell<' +" Spellcheck documents we're actually editing (not just viewing) +if !&readonly + setlocal spell + let b:undo_ftplugin = b:undo_ftplugin + \ . '|setlocal spell<' +endif -- cgit v1.2.3 From 613874eef2cdd7ff722b234ab94db00377c77df2 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 2 Jul 2018 13:28:42 +1200 Subject: Don't shout in CJK in README.md. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e8f6b2c1..aad12a57 100644 --- a/README.md +++ b/README.md @@ -605,7 +605,7 @@ There's some silly stuff in `install-games`: comic. * `acq(6df)` allows you to interrogate AC, the interplanetary computer. * `aesth(6df)` converts English letters to their full width CJK analogues, - for AESTHETIC PURPOSES. + for aesthetic purposes. * `squ(6df)` makes a reduced Latin square out of each line of input. * `kvlt(6df)` translates input to emulate a style of typing unique to black metal communities on the internet. -- cgit v1.2.3 From 4afefdaf2c43116b9a97b5f5ccbc2c04fb3b48a8 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 2 Jul 2018 13:38:50 +1200 Subject: Provide install-neovim target --- Makefile | 5 +++++ README.md | 15 ++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 86b3942c..4bb09b1a 100644 --- a/Makefile +++ b/Makefile @@ -430,6 +430,11 @@ install-ncmcpp: install-mpd mkdir -p -- $(HOME)/.ncmpcpp cp -p -- ncmpcpp/config $(HOME)/.ncmpcpp +install-neovim: + make install-vim \ + VIMDIR=$${XDG_CONFIG_HOME:-"$$HOME"/.config}/nvim \ + VIMRC=$${XDF_CONFIG_HOME:="$$HOME"/.config}/init.vim + install-newsboat: mkdir -p -- $(HOME)/.config/newsboat $(HOME)/.local/share/newsboat cp -p -- newsboat/config $(HOME)/.config/newsboat diff --git a/README.md b/README.md index aad12a57..85342e14 100644 --- a/README.md +++ b/README.md @@ -390,16 +390,13 @@ check of Perl scripts, and `_l` runs a Perl::Critic check. #### Neovim I test my configuration every now and then with the [Neovim -fork](https://neovim.io/). To install the configuration where Neovim will use -it, do this: +fork](https://neovim.io/). There's an `install-neovim` target to run +`install-vim` with the appropriate paths changed. - $ nvd=${XDG_CONFIG_HOME:-"$HOME"/.config}/nvim - $ make install-vim VIMRC="$nvd"/init.vim VIMDIR="$nvd" - -Neovim's [godless -arrogance](https://twitter.com/tpope/status/437019518444240896) -notwithstanding, I do rather like it overall, but I'm not presently using it as -my daily driver and so it might balk at recent addenda to my configuration. +Its [godless arrogance](https://twitter.com/tpope/status/437019518444240896) +notwithstanding, I do rather like Neovim overall, but I'm not presently using +it as my daily driver, and so it might balk at recent addenda to my +configuration. Scripts ------- -- cgit v1.2.3 From 68f676b65d776afec4acca520daef436f1e1f500 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 2 Jul 2018 14:30:20 +1200 Subject: Add vim config subfile to undo Debian's changes --- Makefile | 1 + vim/config/debian.vim | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 vim/config/debian.vim diff --git a/Makefile b/Makefile index 4bb09b1a..b42ee72c 100644 --- a/Makefile +++ b/Makefile @@ -549,6 +549,7 @@ install-vim-compiler: install-vim-config: cp -p -- vim/vimrc $(VIMRC) + cp -p -- vim/config/*.vim $(VIMDIR)/config install-vim-filetype: cp -p -- vim/filetype.vim vim/scripts.vim $(VIMDIR) diff --git a/vim/config/debian.vim b/vim/config/debian.vim new file mode 100644 index 00000000..e50fc260 --- /dev/null +++ b/vim/config/debian.vim @@ -0,0 +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 + + " Restore terminal settings to reflect terminfo + set t_Co& t_Sf& t_Sb& + + " Remove addons directories from 'runtimepath' if present + silent! set runtimepath-=/var/lib/vim/addons + silent! set runtimepath-=/var/lib/vim/addons/after + +endif -- cgit v1.2.3 From bfafe80bc4ef953ec89b3e66eb2b9668bf5f8838 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 2 Jul 2018 14:31:35 +1200 Subject: Update insert_cancel.vim plugin --- vim/bundle/insert_cancel | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vim/bundle/insert_cancel b/vim/bundle/insert_cancel index ec055122..a7aa9d44 160000 --- a/vim/bundle/insert_cancel +++ b/vim/bundle/insert_cancel @@ -1 +1 @@ -Subproject commit ec0551228a91752d2be5f9d771e2cb5a624e6ba4 +Subproject commit a7aa9d44a7dc4f604c68a1b51eb66d6c4e2789a4 -- cgit v1.2.3 From 6b2c1b039218f7a46900c9875087d20a9e7ef836 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 2 Jul 2018 14:33:36 +1200 Subject: Bump VERSION --- VERSION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 949d3df7..cea611d2 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -tejr dotfiles v1.15.0 -Sun Jul 1 23:07:26 UTC 2018 +tejr dotfiles v1.16.0 +Mon Jul 2 02:33:32 UTC 2018 -- cgit v1.2.3 From cf2ca490db72291662be6a7a7903e69d66342b53 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 2 Jul 2018 14:33:52 +1200 Subject: Rebuild dotfiles(7) manual --- man/man7/dotfiles.7df | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/man/man7/dotfiles.7df b/man/man7/dotfiles.7df index af533838..f8f6a453 100644 --- a/man/man7/dotfiles.7df +++ b/man/man7/dotfiles.7df @@ -536,20 +536,14 @@ Perl scripts, and \f[C]_l\f[] runs a Perl::Critic check. .PP I test my configuration every now and then with the Neovim fork (https://neovim.io/). -To install the configuration where Neovim will use it, do this: -.IP -.nf -\f[C] -$\ nvd=${XDG_CONFIG_HOME:\-"$HOME"/.config}/nvim -$\ make\ install\-vim\ VIMRC="$nvd"/init.vim\ VIMDIR="$nvd" -\f[] -.fi +There's an \f[C]install\-neovim\f[] target to run \f[C]install\-vim\f[] +with the appropriate paths changed. .PP -Neovim's godless +Its godless arrogance (https://twitter.com/tpope/status/437019518444240896) -notwithstanding, I do rather like it overall, but I'm not presently -using it as my daily driver and so it might balk at recent addenda to my -configuration. +notwithstanding, I do rather like Neovim overall, but I'm not presently +using it as my daily driver, and so it might balk at recent addenda to +my configuration. .SS Scripts .PP Where practical, I make short scripts into POSIX (but not Bourne) @@ -951,7 +945,7 @@ Farts (http://www.asciiartfarts.com/) comic. computer. .IP \[bu] 2 \f[C]aesth(6df)\f[] converts English letters to their full width CJK -analogues, for AESTHETIC PURPOSES. +analogues, for aesthetic purposes. .IP \[bu] 2 \f[C]squ(6df)\f[] makes a reduced Latin square out of each line of input. -- cgit v1.2.3