From 3b047a794853fa49eb6c21da6d31ce8d0e9d863e Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 12 Jun 2019 14:12:59 +1200 Subject: Add an issue --- ISSUES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ISSUES.md b/ISSUES.md index 8e214ff1..f2ef2ef9 100644 --- a/ISSUES.md +++ b/ISSUES.md @@ -32,3 +32,5 @@ Known issues newlines in their names. Can it be made to? * Something in the mail ftplugin is butchering the headers, probably something that strips whitespace or quotes +* Might be able to work out what's up with the TZ environment variable + "sticking" for the date insertion commands in bleeding-edge Vim -- cgit v1.2.3 From 758b5c7fd57238adb7fcdb57f19b6e769a297954 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 12 Jun 2019 14:53:51 +1200 Subject: Adjust plugin comment --- vim/vimrc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/vim/vimrc b/vim/vimrc index bc6d7875..73179dfe 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -1403,12 +1403,13 @@ nnoremap j " This ground defines mappings for filtering and batch operations to clean up " buffer text. All of these mappings use commands from my custom plugins: " -" -" :StripTrailingWhitespace -" -" :SqueezeRepeatBlanks -" -" :KeepPosition +" :KeepPosition +" +" :SqueezeRepeatBlanks +" +" :StripTrailingWhitespace +" +" "" Leader,x strips trailing whitespace nnoremap x -- cgit v1.2.3 From 063fd411908a497bcceb611594e5fe27b341c9f7 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 12 Jun 2019 16:18:21 +1200 Subject: Remove a fixed issue --- ISSUES.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/ISSUES.md b/ISSUES.md index f2ef2ef9..8e214ff1 100644 --- a/ISSUES.md +++ b/ISSUES.md @@ -32,5 +32,3 @@ Known issues newlines in their names. Can it be made to? * Something in the mail ftplugin is butchering the headers, probably something that strips whitespace or quotes -* Might be able to work out what's up with the TZ environment variable - "sticking" for the date insertion commands in bleeding-edge Vim -- cgit v1.2.3 From 6266d077aee5dccf981b9e839883766d216517ad Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 12 Jun 2019 17:09:59 +1200 Subject: Correct example ext-finder shell script in vimrc --- vim/vimrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vim/vimrc b/vim/vimrc index 73179dfe..4f52ff2f 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -902,7 +902,7 @@ set wildmode=list:longest,full " sh -c 'for fn ; do " ext=${fn##*.} " case $ext in -" *[^[:alnum:]]*) continue ;; +" *[![:alnum:]]*) continue ;; " ?*) printf "%s\n" "$ext" ;; " esac " done' _ {} + | -- cgit v1.2.3 From 1d4c812ae3cb5e9682a23bf7525dcaf57c4efc06 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 13 Jun 2019 09:35:43 +1200 Subject: Add a missing quote in a comment --- vim/vimrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vim/vimrc b/vim/vimrc index 4f52ff2f..501b32d6 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -351,7 +351,7 @@ endif " default of writing them to the same directory as the buffer file. Add two " trailing slashes to the path to prompt Vim to use the full escaped path in " its name, in order to avoid filename collisions, since the 'directory' -" option has supported that hint for much longer than 'backupdir has. We +" option has supported that hint for much longer than 'backupdir' has. We " apply :Establish to attempt to create the path first, if needed. " Establish $MYVIM/cache/swap -- cgit v1.2.3 From 10f7e2258ea0d4fa3b4c3b169259da26e0ad2492 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 13 Jun 2019 09:35:51 +1200 Subject: Change 'backupskip' reset to reflect Vim patch --- vim/vimrc | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/vim/vimrc b/vim/vimrc index 501b32d6..18e9167c 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -324,14 +324,19 @@ else set backupdir^=$MYVIM/cache/backup endif -" Vim doesn't seem to check patterns added to 'backupskip' for uniqueness, so -" adding them repeatedly if this file is reloaded results in duplicate strings -" in the value, due to the absence of the P_NODUP flag for the option's -" definition in src/option.c in the Vim source code. This is likely a bug in -" Vim. For the moment, to work around the problem, we reset the path back to -" its default first. -" -set backupskip& +" Prior to v8.1.1519, Vim didn't check patterns added to 'backupskip' for +" uniqueness, so adding the same path repeatedly resulted in duplicate strings +" in the value. This was due to the absence of the P_NODUP flag for the +" option's definition in src/option.c in the Vim source code. If we're using +" a version older than v8.1.1519, we'll need to explicitly reset 'backupskip' +" to its default value, so that reloading this file doesn't stack up multiple +" copies of any added paths. +" +" +" +if !has('patch-8.1.1519') + set backupskip& +endif " Files in certain directories on Unix-compatible filesystems should not be " backed up, for security reasons. This is particularly important if editing -- cgit v1.2.3 From 65be8b99efbb704b3849f80e27a4309183cc0fd5 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 13 Jun 2019 11:22:38 +1200 Subject: Create Vim cache dir for new 'spellfile' location Commit c0bab95, released in v5.31.0, moved the location of the 'spellfile' from the default of the "spell" subdir in the path in the first element of &runtimedir to a custom path of $MYVIM/cache/spell. The applicable code includes an attempt to create that directory should it not already exist, but it's appropriate to create it at install time anyway. --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 64fbabe8..e2bd73aa 100644 --- a/Makefile +++ b/Makefile @@ -593,6 +593,7 @@ install-vim-bundle: install-vim-config install-vim-cache: mkdir -p -- \ $(VIMDIR)/cache/backup \ + $(VIMDIR)/cache/spell \ $(VIMDIR)/cache/swap \ $(VIMDIR)/cache/undo -- cgit v1.2.3 From f338a8093998a70de5d642d584baf48f50474dc0 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 13 Jun 2019 11:24:28 +1200 Subject: Explicitly create Vim $MYVIM/cache dir This directory would be created incidentally if it doesn't already exist, due to the presence of the `-p` flag for the `mkdir` call, but it's a little clearer what we're doing if we explicitly create it as the first argument. --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index e2bd73aa..fae2722a 100644 --- a/Makefile +++ b/Makefile @@ -592,6 +592,7 @@ install-vim-bundle: install-vim-config install-vim-cache: mkdir -p -- \ + $(VIMDIR)/cache \ $(VIMDIR)/cache/backup \ $(VIMDIR)/cache/spell \ $(VIMDIR)/cache/swap \ -- cgit v1.2.3 From 4ea0f851568e10f538374c4dad0d88cae4df1476 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 13 Jun 2019 11:40:52 +1200 Subject: Drop support for Neovim It's just annoying. --- Makefile | 6 ------ README.md | 13 +++---------- vim/vimrc | 41 +++++------------------------------------ 3 files changed, 8 insertions(+), 52 deletions(-) diff --git a/Makefile b/Makefile index fae2722a..f6a2ae02 100644 --- a/Makefile +++ b/Makefile @@ -550,12 +550,6 @@ install-vim: install-vim-after \ install-vim-plugin \ install-vim-syntax -install-neovim: - make install-vim \ - VIM=nvim \ - VIMDIR="$${XDG_CONFIG_HOME:-"$$HOME"/.config}/nvim" \ - VIMRC="$${XDG_CONFIG_HOME:-"$$HOME"/.config}/nvim/init.vim" - install-vim-after: install-vim-after-ftplugin \ install-vim-after-indent \ install-vim-after-plugin \ diff --git a/README.md b/README.md index 8599b04c..827fb81e 100644 --- a/README.md +++ b/README.md @@ -112,7 +112,6 @@ Configuration is included for: * [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 - * [Neovim](https://neovim.io/) -- An "emphatic fork" of Vim * [X11](https://www.x.org/wiki/) -- Windowing system with network transparency for Unix @@ -384,16 +383,10 @@ compile?) and linting (is it correct and well-written?) are separate processes for me, I bind them separately with local leader maps; for example, for `perl` filetypes, `,c` switches `makprg` to `perl -c`, and `,l` to `perlcritic`. -#### Neovim +#### No Neovim support -I test my configuration every now and then with the [Neovim -fork](https://neovim.io/). There's an `install-neovim` target to run -`install-vim` with the appropriate paths changed. - -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. +The configuration doesn't explicitly support Neovim, although most of it will +probably work. Scripts ------- diff --git a/vim/vimrc b/vim/vimrc index 18e9167c..0c29ecfb 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -553,13 +553,7 @@ set confirm " most or maybe all of the terminals I use, but I don't want those keys in " insert mode, anyway. All of this works fine in the GUI, of course. " -" There's no such option as 'esckeys' in Neovim. I gather that the fork has -" completely overhauled its method of keyboard event handling, so we need to -" check whether the option exists before we try to unset it. -" -if exists('+esckeys') - set noesckeys -endif +set noesckeys " By default, I prefer that figuring out where a region of text to fold away " should be done by the indent level of its lines, since I tend to be careful @@ -704,19 +698,6 @@ nohlsearch " set incsearch -" If there's only one window, I don't need a status line to appear beneath it. -" I very often edit only a few files in one window in a Vim session. I like the -" initial screen for a call to Vim with no arguments to be empty, save for the -" trademark tildes. It gives me an extra screen line, too. It's a reflex for -" me to press CTRL-G in normal mode if I need to see the buffer name, so I don't -" really lose anything. -" -" This value reflects the Vim default, but Neovim changed its default to '2' -" for an 'always-on' status line, so we'll explicitly set it to the original -" Vim default here in case we're using Neovim. -" -set laststatus=1 - " Don't waste cycles and bandwidth redrawing the screen during execution of " aggregate commands in e.g. macros. I think this does amount to the " occasional :redraw needing to be in a script, but it's not too bad, and last @@ -728,13 +709,6 @@ set lazyredraw " Define meta-characters to show in place of characters that are otherwise " invisible, or line wrapping attributes when the 'list' option is enabled. " -" We need to reset the option to its default value first, because the current -" Neovim version at the time of writing (v0.3.5) doesn't check these for -" uniqueness, resulting in duplicates if this file is reloaded. 'backupskip' -" has similar problems in the original Vim v8.1.1487 and earlier. -" -set listchars&vi - " These 'list' characters all correspond to invisible or indistinguishable " characters. We leave the default eol:$ in place to show newlines, and add " a few more. @@ -786,10 +760,10 @@ set nrformats-=octal " the Vim default of 'noruler'. CTRL-G shows me everything I need to know, " and is near-instinctive now. " -" Rude system vimrc files tend to switch this back on, though, and Neovim has -" it on by default, and so we force it off here. +" Rude system vimrc files tend to switch this back on, though, so we force it +" back to the default here. " -set noruler +set ruler& " Sessions preserve window, tab, and buffer layout, and are thereby great for " more complex and longer-term projects like books, but they don't play @@ -848,12 +822,7 @@ endif " The manual suggests that disabling this should be done by clearing 't_RV', " but that didn't actually seem to work when I tried it. " -" We have to check for the existence of the option first, as it doesn't exist -" in Neovim. -" -if exists('+ttymouse') - set ttymouse= -endif +set ttymouse= " While using virtual block mode, allow me to navigate to any column of the " buffer window; don't confine the boundaries of the block to the coordinates -- cgit v1.2.3 From 267535086fd934f96a5826278001ec4f58da2416 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 13 Jun 2019 11:41:35 +1200 Subject: Update README.md to reflect Vim configuration --- README.md | 39 ++++++++++++++++++--------------------- vim/vimrc | 4 ++-- 2 files changed, 20 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 827fb81e..92f53c87 100644 --- a/README.md +++ b/README.md @@ -343,17 +343,14 @@ key combination to detach. The majority of the Vim configuration is just setting options, with a fair few mappings and remappings, both global and buffer-local. I try not to deviate too much from the Vim defaults behavior in terms of interactive behavior and -keybindings. It's extensively commented, mostly because I was reading through -it one day and realized I'd forgotten what half of it did. System-specific -configuration files go in `~/.vim/config`. +keybindings. It's extensively commented. #### Filetypes I define my own `filetype.vim` and `scripts.vim`, so that filetype detection -works in a way I like, and loads quickly. They are very unlikely to suit you -as they are, but you might be able to extend them with your favourite -filetypes. If you delete both of them from `~/.vim`, you'll get the stock -filetype detection back. +works in a way I like, and loads quickly. They are unlikely to suit you as +they are, but if you want to use it, you can extend them with your favourite +filetypes in custom `ftdetect` rules. #### Plugins @@ -362,26 +359,26 @@ structures like functions, I like to implement it as a plugin in `~/.vim/plugin` and/or `~/.vim/autoload`, with documentation for each in `~/.vim/doc`. -They eventually get either discarded or spun off into their own repositories, -added to this repository as submodules under `vim/bundle` instead, and uploaded -to [vim.org](https://www.vim.org/account/profile.php?user_id=73687). +They eventually get either discarded if I stop using them, or spun off into +their own repositories if I don't, and added to this repository as submodules +under `vim/bundle` instead. Some of them I upload to +[vim.org](https://www.vim.org/account/profile.php?user_id=73687). #### Filetype plugins -I also define a few rules specific to file types I often edit in -`~/.vim/after/ftplugin`, including some buffer-local mapping targets for -checking, linting, and tidying, and a few more in `~/.vim/after/indent`. There -are also a few tweaks to core syntax files in `~/.vim/after/syntax`, especially -for shell script (`sh.vim`). Some of these filetype plugins are also due to be -separately distributed and installed via submodules instead. +I apply some replacement or supplementary configuration specific to file types +I often edit in `~/.vim` and `~/.vim/after`, in the `ftplugin`, `indent`, and +`syntax` subdirectories. Some of these filetype plugins or extensions will +also eventually be removed to be separately distributed, and installed via +submodules instead. #### Compilers -I define a few of my own `:compiler` scripts for `~/.vim/compiler`, for use for -checking and linting of appropriate filetypes. Because checking (does it -compile?) and linting (is it correct and well-written?) are separate processes -for me, I bind them separately with local leader maps; for example, for `perl` -filetypes, `,c` switches `makprg` to `perl -c`, and `,l` to `perlcritic`. +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, +`c` switches `makeprg` to `perl -c` for checking, and +`l` to `perlcritic` for linting. #### No Neovim support diff --git a/vim/vimrc b/vim/vimrc index 0c29ecfb..629ab631 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -761,9 +761,9 @@ set nrformats-=octal " and is near-instinctive now. " " Rude system vimrc files tend to switch this back on, though, so we force it -" back to the default here. +" off here. " -set ruler& +set noruler " Sessions preserve window, tab, and buffer layout, and are thereby great for " more complex and longer-term projects like books, but they don't play -- cgit v1.2.3 From 6b032ea45196788391bedbfff290c288d852653c Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 13 Jun 2019 11:45:44 +1200 Subject: Bump VERSION --- VERSION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 700e8f77..5940fdd2 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -tejr dotfiles v5.42.1 -Wed Jun 12 01:41:55 UTC 2019 +tejr dotfiles v5.43.0 +Wed Jun 12 23:45:44 UTC 2019 -- cgit v1.2.3 From da2c041d99db14556ef41a98fa10619e73e3323e Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 13 Jun 2019 11:45:44 +1200 Subject: Update --- man/man7/dotfiles.7df | 64 ++++++++++++++++++--------------------------------- 1 file changed, 23 insertions(+), 41 deletions(-) diff --git a/man/man7/dotfiles.7df b/man/man7/dotfiles.7df index fcdb9416..16110f76 100644 --- a/man/man7/dotfiles.7df +++ b/man/man7/dotfiles.7df @@ -170,10 +170,6 @@ tmux (https://tmux.github.io/) \[en] Terminal multiplexer similar to GNU Screen .IP \[bu] 2 Vim (https://www.vim.org/) \[en] Vi IMproved, a text editor -.RS 2 -.IP \[bu] 2 -Neovim (https://neovim.io/) \[en] An \[lq]emphatic fork\[rq] of Vim -.RE .IP \[bu] 2 X11 (https://www.x.org/wiki/) \[en] Windowing system with network transparency for Unix @@ -494,17 +490,14 @@ The majority of the Vim configuration is just setting options, with a fair few mappings and remappings, both global and buffer\-local. I try not to deviate too much from the Vim defaults behavior in terms of interactive behavior and keybindings. -It's extensively commented, mostly because I was reading through it one -day and realized I'd forgotten what half of it did. -System\-specific configuration files go in \f[C]~/.vim/config\f[]. +It's extensively commented. .SS Filetypes .PP I define my own \f[C]filetype.vim\f[] and \f[C]scripts.vim\f[], so that filetype detection works in a way I like, and loads quickly. -They are very unlikely to suit you as they are, but you might be able to -extend them with your favourite filetypes. -If you delete both of them from \f[C]~/.vim\f[], you'll get the stock -filetype detection back. +They are unlikely to suit you as they are, but if you want to use it, +you can extend them with your favourite filetypes in custom +\f[C]ftdetect\f[] rules. .SS Plugins .PP If the logic for doing something involves more than a few lines or any @@ -512,43 +505,32 @@ structures like functions, I like to implement it as a plugin in \f[C]~/.vim/plugin\f[] and/or \f[C]~/.vim/autoload\f[], with documentation for each in \f[C]~/.vim/doc\f[]. .PP -They eventually get either discarded or spun off into their own -repositories, added to this repository as submodules under -\f[C]vim/bundle\f[] instead, and uploaded to +They eventually get either discarded if I stop using them, or spun off +into their own repositories if I don't, and added to this repository as +submodules under \f[C]vim/bundle\f[] instead. +Some of them I upload to vim.org (https://www.vim.org/account/profile.php?user_id=73687). .SS Filetype plugins .PP -I also define a few rules specific to file types I often edit in -\f[C]~/.vim/after/ftplugin\f[], including some buffer\-local mapping -targets for checking, linting, and tidying, and a few more in -\f[C]~/.vim/after/indent\f[]. -There are also a few tweaks to core syntax files in -\f[C]~/.vim/after/syntax\f[], especially for shell script -(\f[C]sh.vim\f[]). -Some of these filetype plugins are also due to be separately distributed -and installed via submodules instead. +I apply some replacement or supplementary configuration specific to file +types I often edit in \f[C]~/.vim\f[] and \f[C]~/.vim/after\f[], in the +\f[C]ftplugin\f[], \f[C]indent\f[], and \f[C]syntax\f[] subdirectories. +Some of these filetype plugins or extensions will also eventually be +removed to be separately distributed, and installed via submodules +instead. .SS Compilers .PP I define a few of my own \f[C]:compiler\f[] scripts for -\f[C]~/.vim/compiler\f[], for use for checking and linting of -appropriate filetypes. -Because checking (does it compile?) and linting (is it correct and -well\-written?) are separate processes for me, I bind them separately -with local leader maps; for example, for \f[C]perl\f[] filetypes, -\f[C],c\f[] switches \f[C]makprg\f[] to \f[C]perl\ \-c\f[], and -\f[C],l\f[] to \f[C]perlcritic\f[]. -.SS Neovim -.PP -I test my configuration every now and then with the Neovim -fork (https://neovim.io/). -There's an \f[C]install\-neovim\f[] target to run \f[C]install\-vim\f[] -with the appropriate paths changed. +\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 +\f[C]perl\f[] filetypes, \f[C]c\f[] switches +\f[C]makeprg\f[] to \f[C]perl\ \-c\f[] for checking, and +\f[C]l\f[] to \f[C]perlcritic\f[] for linting. +.SS No Neovim support .PP -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. +The configuration doesn't explicitly support Neovim, although most of it +will probably work. .SS Scripts .PP Where practical, I make short scripts into POSIX (but not Bourne) -- cgit v1.2.3