diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2020-06-04 09:33:19 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2020-06-04 09:33:19 +1200 |
commit | 5c2ce160da03254e9744d7c1ad075a8932ab33da (patch) | |
tree | bcd43b4cd0f51a54d27d9bbe3e7c491130a79873 | |
parent | Merge branch 'hotfix/v9.16.2' (diff) | |
parent | Update dotfiles(7) manual page (diff) | |
download | dotfiles-5c2ce160da03254e9744d7c1ad075a8932ab33da.tar.gz dotfiles-5c2ce160da03254e9744d7c1ad075a8932ab33da.zip |
Merge branch 'release/v9.17.0'v9.17.0
* release/v9.17.0:
Update dotfiles(7) manual page
Add workaround for bad map settings in mail.vim
Prevent Vim spell checking of code blocks in mail
Add an idea
Remove two resolved/discarded ideas
Update detect_indent.vim plugin to v0.1.2
Remove two outdated comments
Reference don't copy vimrc source/save checks
Correct the vimrc SourceCmd hook path
Add an issue
Remove fortune.vim plugin
Use three dashes for em-dash
-rw-r--r-- | IDEAS.md | 2 | ||||
-rw-r--r-- | ISSUES.md | 1 | ||||
-rw-r--r-- | README.md | 63 | ||||
-rw-r--r-- | VERSION | 4 | ||||
-rw-r--r-- | man/man7/dotfiles.7df | 56 | ||||
-rw-r--r-- | vim/after/ftplugin/mail.vim | 10 | ||||
-rw-r--r-- | vim/after/syntax/mail.vim | 3 | ||||
-rw-r--r-- | vim/autoload/fortune.vim | 59 | ||||
-rw-r--r-- | vim/ftplugin/mail.vim | 15 | ||||
-rw-r--r-- | vim/plugin/fortune.vim | 8 | ||||
-rw-r--r-- | vim/vimrc | 19 |
11 files changed, 96 insertions, 144 deletions
@@ -30,5 +30,3 @@ Ideas * I'd like a Git hook that pre-fills out "Version X.Y.Z" if making an annotated tag named `vX.Y.Z`. * There's no reason to limit `digraph_search.vim` to insert mode only -* fortune.vim can be spun out into its own repository -* put\_date.vim can be spun out into its own repository @@ -33,3 +33,4 @@ Known issues * Typing the normal mode mapping for `paste_open.vim` *twice* causes an error. * Highlighting the variable name in e.g. `unset -v VARNAME` works with `bash` highlighting, but not with `sh` highlighting +* `detect_indent.vim` doesn't need to check e.g. help buffers @@ -78,40 +78,41 @@ Configuration is included for: * [GNU Bash](https://www.gnu.org/software/bash/) (v3.0 or newer) * [Korn shell](http://www.kornshell.com/) (`ksh93`, `pdksh`, `mksh`) * [Z shell](https://www.zsh.org/) -* [Abook](http://abook.sourceforge.net/)--curses address book program -* [cURL](https://curl.haxx.se/)--Command-line tool for transferring data with +* [Abook](http://abook.sourceforge.net/)---curses address book program +* [cURL](https://curl.haxx.se/)---Command-line tool for transferring data with URL syntax -* [Dillo](https://www.dillo.org/)--A lightweight web browser -* [Dunst](https://dunst-project.org/)--A lightweight X11 notification daemon +* [Dillo](https://www.dillo.org/)---A lightweight web browser +* [Dunst](https://dunst-project.org/)---A lightweight X11 notification daemon that works with `libnotify` -* `finger(1)`--User information lookup program -* [Git](https://git-scm.com/)--Distributed version control system -* [GNU Emacs](https://www.gnu.org/software/emacs/)--Extensible text editor -* [GnuPG](https://www.gnupg.org/)--GNU Privacy Guard, for private communication - and file encryption -* [GTK+](https://www.gtk.org/)--GIMP Toolkit, for graphical user interface +* `finger(1)`---User information lookup program +* [Git](https://git-scm.com/)---Distributed version control system +* [GNU Emacs](https://www.gnu.org/software/emacs/)---Extensible text editor +* [GnuPG](https://www.gnupg.org/)---GNU Privacy Guard, for private + communication and file encryption +* [GTK+](https://www.gtk.org/)---GIMP Toolkit, for graphical user interface elements -* [i3](https://i3wm.org/)--Tiling window manager -* [less](https://www.gnu.org/software/less/)--Terminal pager -* [mpv](https://mpv.io/)--Media player -* [Mutt](http://www.mutt.org/)--Terminal mail user agent -* [`mysql(1)`](https://linux.die.net/man/1/mysql)--Command-line MySQL client -* [Ncmpcpp](https://rybczak.net/ncmpcpp/)--ncurses music player client -* [Newsboat](https://newsboat.org/)--Terminal RSS/Atom feed reader -* [`psql(1)`](https://linux.die.net/man/1/psql)--Command-line PostgreSQL client -* [Perl::Critic](http://perlcritic.com/)--static source code analysis engine +* [i3](https://i3wm.org/)---Tiling window manager +* [less](https://www.gnu.org/software/less/)---Terminal pager +* [mpv](https://mpv.io/)---Media player +* [Mutt](http://www.mutt.org/)---Terminal mail user agent +* [`mysql(1)`](https://linux.die.net/man/1/mysql)---Command-line MySQL client +* [Ncmpcpp](https://rybczak.net/ncmpcpp/)---ncurses music player client +* [Newsboat](https://newsboat.org/)---Terminal RSS/Atom feed reader +* [`psql(1)`](https://linux.die.net/man/1/psql)---Command-line PostgreSQL + client +* [Perl::Critic](http://perlcritic.com/)---static source code analysis engine for Perl -* [Perl::Tidy](http://perltidy.sourceforge.net/)--reformats Perl source code -* [Readline](https://tiswww.case.edu/php/chet/readline/rltop.html)--GNU library - for user input used by Bash, MySQL, and others -* [rxvt-unicode](http://software.schmorp.de/pkg/rxvt-unicode.html)--Fork of the - rxvt terminal emulator with Unicode support -* [Subversion](https://subversion.apache.org/)--Apache Subversion, a version +* [Perl::Tidy](http://perltidy.sourceforge.net/)---reformats Perl source code +* [Readline](https://tiswww.case.edu/php/chet/readline/rltop.html)---GNU + library for user input used by Bash, MySQL, and others +* [rxvt-unicode](http://software.schmorp.de/pkg/rxvt-unicode.html)---Fork of + the rxvt terminal emulator with Unicode support +* [Subversion](https://subversion.apache.org/)---Apache Subversion, a version control system -* [tidy](http://www.html-tidy.org/)--HTML/XHTML linter and tidier -* [tmux](https://tmux.github.io/)--Terminal multiplexer similar to GNU Screen -* [Vim](https://www.vim.org/)--Vi IMproved, a text editor -* [X11](https://www.x.org/wiki/)--Windowing system with network transparency +* [tidy](http://www.html-tidy.org/)---HTML/XHTML linter and tidier +* [tmux](https://tmux.github.io/)---Terminal multiplexer similar to GNU Screen +* [Vim](https://www.vim.org/)---Vi IMproved, a text editor +* [X11](https://www.x.org/wiki/)---Windowing system with network transparency for Unix The configurations for shells, Mutt, tmux, and Vim are the most likely to be of @@ -383,8 +384,8 @@ submodules instead. #### Compilers I define a few of my own `:compiler` scripts for `~/.vim/compiler` to check and -lint appropriate filetypes. I bind checking--"does it run?"--and linting--"is -it good?"--with separate local leader maps; for example, for `perl` filetypes, +lint appropriate filetypes. I bind checking---"does it run?"---and linting---"is +it good?"---with separate local leader maps; for example, for `perl` filetypes, `<LocalLeader>c` switches `makeprg` to `perl -c` for checking, and `<LocalLeader>l` to `perlcritic` for linting. @@ -1,2 +1,2 @@ -tejr dotfiles v9.16.2 -Wed, 03 Jun 2020 21:20:59 +0000 +tejr dotfiles v9.17.0 +Wed, 03 Jun 2020 21:33:16 +0000 diff --git a/man/man7/dotfiles.7df b/man/man7/dotfiles.7df index 8de509f5..f0e82fe2 100644 --- a/man/man7/dotfiles.7df +++ b/man/man7/dotfiles.7df @@ -109,70 +109,70 @@ Korn shell (http://www.kornshell.com/) (\f[C]ksh93\f[], \f[C]pdksh\f[], Z shell (https://www.zsh.org/) .RE .IP \[bu] 2 -Abook (http://abook.sourceforge.net/)\[en]curses address book program +Abook (http://abook.sourceforge.net/)\[em]curses address book program .IP \[bu] 2 -cURL (https://curl.haxx.se/)\[en]Command\-line tool for transferring +cURL (https://curl.haxx.se/)\[em]Command\-line tool for transferring data with URL syntax .IP \[bu] 2 -Dillo (https://www.dillo.org/)\[en]A lightweight web browser +Dillo (https://www.dillo.org/)\[em]A lightweight web browser .IP \[bu] 2 -Dunst (https://dunst-project.org/)\[en]A lightweight X11 notification +Dunst (https://dunst-project.org/)\[em]A lightweight X11 notification daemon that works with \f[C]libnotify\f[] .IP \[bu] 2 -\f[C]finger(1)\f[]\[en]User information lookup program +\f[C]finger(1)\f[]\[em]User information lookup program .IP \[bu] 2 -Git (https://git-scm.com/)\[en]Distributed version control system +Git (https://git-scm.com/)\[em]Distributed version control system .IP \[bu] 2 -GNU Emacs (https://www.gnu.org/software/emacs/)\[en]Extensible text +GNU Emacs (https://www.gnu.org/software/emacs/)\[em]Extensible text editor .IP \[bu] 2 -GnuPG (https://www.gnupg.org/)\[en]GNU Privacy Guard, for private +GnuPG (https://www.gnupg.org/)\[em]GNU Privacy Guard, for private communication and file encryption .IP \[bu] 2 -GTK+ (https://www.gtk.org/)\[en]GIMP Toolkit, for graphical user +GTK+ (https://www.gtk.org/)\[em]GIMP Toolkit, for graphical user interface elements .IP \[bu] 2 -i3 (https://i3wm.org/)\[en]Tiling window manager +i3 (https://i3wm.org/)\[em]Tiling window manager .IP \[bu] 2 -less (https://www.gnu.org/software/less/)\[en]Terminal pager +less (https://www.gnu.org/software/less/)\[em]Terminal pager .IP \[bu] 2 -mpv (https://mpv.io/)\[en]Media player +mpv (https://mpv.io/)\[em]Media player .IP \[bu] 2 -Mutt (http://www.mutt.org/)\[en]Terminal mail user agent +Mutt (http://www.mutt.org/)\[em]Terminal mail user agent .IP \[bu] 2 -\f[C]mysql(1)\f[] (https://linux.die.net/man/1/mysql)\[en]Command\-line +\f[C]mysql(1)\f[] (https://linux.die.net/man/1/mysql)\[em]Command\-line MySQL client .IP \[bu] 2 -Ncmpcpp (https://rybczak.net/ncmpcpp/)\[en]ncurses music player client +Ncmpcpp (https://rybczak.net/ncmpcpp/)\[em]ncurses music player client .IP \[bu] 2 -Newsboat (https://newsboat.org/)\[en]Terminal RSS/Atom feed reader +Newsboat (https://newsboat.org/)\[em]Terminal RSS/Atom feed reader .IP \[bu] 2 -\f[C]psql(1)\f[] (https://linux.die.net/man/1/psql)\[en]Command\-line +\f[C]psql(1)\f[] (https://linux.die.net/man/1/psql)\[em]Command\-line PostgreSQL client .IP \[bu] 2 -Perl::Critic (http://perlcritic.com/)\[en]static source code analysis +Perl::Critic (http://perlcritic.com/)\[em]static source code analysis engine for Perl .IP \[bu] 2 -Perl::Tidy (http://perltidy.sourceforge.net/)\[en]reformats Perl source +Perl::Tidy (http://perltidy.sourceforge.net/)\[em]reformats Perl source code .IP \[bu] 2 -Readline (https://tiswww.case.edu/php/chet/readline/rltop.html)\[en]GNU +Readline (https://tiswww.case.edu/php/chet/readline/rltop.html)\[em]GNU library for user input used by Bash, MySQL, and others .IP \[bu] 2 -rxvt\-unicode (http://software.schmorp.de/pkg/rxvt-unicode.html)\[en]Fork +rxvt\-unicode (http://software.schmorp.de/pkg/rxvt-unicode.html)\[em]Fork of the rxvt terminal emulator with Unicode support .IP \[bu] 2 -Subversion (https://subversion.apache.org/)\[en]Apache Subversion, a +Subversion (https://subversion.apache.org/)\[em]Apache Subversion, a version control system .IP \[bu] 2 -tidy (http://www.html-tidy.org/)\[en]HTML/XHTML linter and tidier +tidy (http://www.html-tidy.org/)\[em]HTML/XHTML linter and tidier .IP \[bu] 2 -tmux (https://tmux.github.io/)\[en]Terminal multiplexer similar to GNU +tmux (https://tmux.github.io/)\[em]Terminal multiplexer similar to GNU Screen .IP \[bu] 2 -Vim (https://www.vim.org/)\[en]Vi IMproved, a text editor +Vim (https://www.vim.org/)\[em]Vi IMproved, a text editor .IP \[bu] 2 -X11 (https://www.x.org/wiki/)\[en]Windowing system with network +X11 (https://www.x.org/wiki/)\[em]Windowing system with network transparency for Unix .PP The configurations for shells, Mutt, tmux, and Vim are the most likely @@ -533,8 +533,8 @@ instead. .PP I define a few of my own \f[C]:compiler\f[] scripts for \f[C]~/.vim/compiler\f[] to check and lint appropriate filetypes. -I bind checking\[en]\[lq]does it run?\[rq]\[en]and linting\[en]\[lq]is -it good?\[rq]\[en]with separate local leader maps; for example, for +I bind checking\[em]\[lq]does it run?\[rq]\[em]and linting\[em]\[lq]is +it good?\[rq]\[em]with separate local leader maps; for example, for \f[C]perl\f[] filetypes, \f[C]<LocalLeader>c\f[] switches \f[C]makeprg\f[] to \f[C]perl\ \-c\f[] for checking, and \f[C]<LocalLeader>l\f[] to \f[C]perlcritic\f[] for linting. diff --git a/vim/after/ftplugin/mail.vim b/vim/after/ftplugin/mail.vim index 1ed5a71f..4c07bac3 100644 --- a/vim/after/ftplugin/mail.vim +++ b/vim/after/ftplugin/mail.vim @@ -1,3 +1,13 @@ +" Restore global value for no_mail_maps that we set in +" ~/.vim/ftplugin/mail.vim to work around the bad maps set in +" $VIMRUNTIME/ftplugin/mail.vim +" +if exists('b:no_mail_maps') + let no_mail_maps = b:no_mail_maps +elseif exists('no_mail_maps') + unlet no_mail_maps +endif + " Don't append spaces after quote chars, for strict compliance with " format=flowed let b:quote_space = 0 diff --git a/vim/after/syntax/mail.vim b/vim/after/syntax/mail.vim new file mode 100644 index 00000000..77c76f00 --- /dev/null +++ b/vim/after/syntax/mail.vim @@ -0,0 +1,3 @@ +" Don't spellcheck code in mail messages +syntax region mailCode start='`' end='`' keepend contains=@NoSpell +syntax region mailCodeBlock start=' \{4\}' end='$' contains=@NoSpell diff --git a/vim/autoload/fortune.vim b/vim/autoload/fortune.vim deleted file mode 100644 index da6e2fa3..00000000 --- a/vim/autoload/fortune.vim +++ /dev/null @@ -1,59 +0,0 @@ -" Declare paths to check for fortune files -let s:paths = [ - \ $HOME.'/.fortunes', - \ $HOME.'/.local/share/games/fortunes', - \] - -" List of executables for which we need to check -let s:executables = [ - \ 'fortune', - \ 'timeout', - \] - -" Entry point for plugin -function! fortune#() abort - - " Check we have all of the executables we need - for executable in s:executables - if !executable(executable) - echoerr 'Missing executable "'.executable.'"' - endif - endfor - - " Maximum length of fortunes is the width of the screen minus 1; characters - " wider than one column will break this - " - let limit = &columns - 1 - - " Some implementations of fortune(6) thrash the disk if they can't meet the - " length limit, so we need to rap this invocation in a timeout(1) call - let command = [ - \ 'timeout', - \ '0.3s', - \ 'fortune', - \ '-s', - \ '-n', - \ limit, - \] - - " Find a path for custom fortunes and add it on to the command if found - for path in s:paths - if isdirectory(path) - call add(command, path) - break - endif - endfor - - " Run the command and condense any control or space character groups into - " just one space - let fortune = substitute( - \ system(join(command)), - \ '[[:cntrl:][:space:]]\+', - \ ' ', - \ 'g', - \) - - " Show the fortune message! - echomsg fortune - -endfunction diff --git a/vim/ftplugin/mail.vim b/vim/ftplugin/mail.vim new file mode 100644 index 00000000..bc10a2ec --- /dev/null +++ b/vim/ftplugin/mail.vim @@ -0,0 +1,15 @@ +" Only do this when not yet done for this buffer--but don't set the flag +" ourselves, either; this is intended to be a prelude to +" $VIMRUNTIME/ftplugin/mail.vim +" +if exists('b:did_ftplugin') + finish +endif + +" Force no_mail_maps value on to work around loading bad maps in +" $VIMRUNTIME/ftplugin/mail.vim +" +if exists('no_mail_maps') + let b:no_mail_maps = no_mail_maps +endif +let no_mail_maps = 1 diff --git a/vim/plugin/fortune.vim b/vim/plugin/fortune.vim deleted file mode 100644 index be4abdff..00000000 --- a/vim/plugin/fortune.vim +++ /dev/null @@ -1,8 +0,0 @@ -if exists('loaded_fortune') || &compatible - finish -endif -let loaded_fortune = 1 -command! -bar Fortune - \ call fortune#() -nnoremap <silent> <Plug>(Fortune) - \ :<C-U>Fortune<CR> @@ -2,7 +2,7 @@ " Tom Ryder (tejr)’s Literate Vimrc " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ " -" Last updated: Sun, 24 May 2020 10:00:15 UTC +" Last updated: Mon, 01 Jun 2020 21:38:45 UTC " " │ And I was lifted up in heart, and thought " │ Of all my late-shown prowess in the lists, @@ -325,7 +325,7 @@ filetype plugin indent on " There are a couple of contexts in which it's useful to reload filetypes for " the current buffer, quietly doing nothing if filetypes aren't enabled. " We'll set up a user command named :ReloadFileType to do this, with -" a script-local function backing it. +" an autloaded function backing it. " command! -bar ReloadFileType \ call reload#FileType() @@ -340,10 +340,6 @@ command! -bar ReloadFileType " 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 -" a function as it executes! -" command! -bar ReloadVimrc \ call reload#Vimrc() @@ -364,7 +360,7 @@ autocmd vimrc BufWritePost $MYVIMRC \ ReloadVimrc if $MYVIM !=# '' autocmd vimrc BufWritePost $MYVIM/vimrc - \ ReloadVimrc + \ doautocmd vimrc BufWritePost $MYVIMRC endif " If Vim is new enough (v7.0.187) to support the ##SourceCmd event for @@ -375,11 +371,11 @@ endif " <https://github.com/vim/vim/releases/tag/v7.0.187> " if exists('##SourceCmd') - autocmd vimrc SourceCmd $MYVIMRC/vimrc + autocmd vimrc SourceCmd $MYVIMRC \ ReloadVimrc if $MYVIM !=# '' autocmd vimrc SourceCmd $MYVIM/vimrc - \ ReloadVimrc + \ doautocmd vimrc SourceCmd $MYVIMRC endif endif @@ -1548,11 +1544,6 @@ nmap <Leader># \ <Plug>(AlternateFileType) nmap <Leader>3 \ <Leader># -"" Leader,$/4 gives me my fortune -nmap <Leader>$ - \ <Plug>(Fortune) -nmap <Leader>4 - \ <Leader>$ "" Leader,&/7 escapes regex metacharacters map <Leader>& \ <Plug>(RegexEscape) |