aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-06-14 17:20:15 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-06-14 17:20:15 +1200
commita553f6312852c3d5f5cb1890c85b94e87a0980e8 (patch)
tree0bdf1458aeb27558d67146d988d53093d6d06d5c
parentMerge branch 'release/v5.46.0' (diff)
parentBump VERSION (diff)
downloaddotfiles-a553f6312852c3d5f5cb1890c85b94e87a0980e8.tar.gz
dotfiles-a553f6312852c3d5f5cb1890c85b94e87a0980e8.zip
Merge branch 'release/v6.0.0'v6.0.0
* release/v6.0.0: Use script-local runtimepath list Refactor &runtimepath split a bit more Two-space markdown files Add possible fix for mail ftplugin issue Amend some commentary on backups Add detail on backslashed commas Add links to plugin pages
-rw-r--r--IDEAS.md4
-rw-r--r--ISSUES.md7
-rw-r--r--VERSION4
-rw-r--r--vim/vimrc51
4 files changed, 47 insertions, 19 deletions
diff --git a/IDEAS.md b/IDEAS.md
index 3d25a512..49f49548 100644
--- a/IDEAS.md
+++ b/IDEAS.md
@@ -22,8 +22,8 @@ Ideas
that wraps around `mktd(1df)` and generates shell script to run, and calls
that via `eval`.
* Ideally, the AWK and/or sed scripts in the bin and games directories should
- be syntax-checked or linted. I could at least add some patient application of
- appropriate `gawk --lint` calls for each of the .awk scripts.
+ be syntax-checked or linted. I could at least add some patient application
+ of appropriate `gawk --lint` calls for each of the .awk scripts.
* Alternate buffer type switching would probably work rather well as a simple
plugin.
* Write a ftplugin for Perl to switch between punctuation variable names and
diff --git a/ISSUES.md b/ISSUES.md
index 8e214ff1..e046856a 100644
--- a/ISSUES.md
+++ b/ISSUES.md
@@ -24,11 +24,12 @@ Known issues
* The custom shell functions really should be documented, but it's not clear to
me exactly where this should happen, because the commands' availability
depends on which shell you're using; the `sd` function isn't available when
- you're not using Bash. Maybe I should try to extend `help` without breaking
+ you're not using Bash. Maybe I should try to extend `help` without breaking
it?
* The `b:undo\_indent` definition for the `perl` filetype can probably be
pushed upstream.
* The `_text_filenames` completion handler for Bash won't work on files with
- newlines in their names. Can it be made to?
+ 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
+ that strips whitespace or quotes. It would probably be better to make the
+ cleanup it does an explicit action with a buffer-local map.
diff --git a/VERSION b/VERSION
index fee99ce1..c6a5dfe6 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-tejr dotfiles v5.46.0
-Thu Jun 13 13:26:44 UTC 2019
+tejr dotfiles v6.0.0
+Fri Jun 14 05:20:15 UTC 2019
diff --git a/vim/vimrc b/vim/vimrc
index ff46a151..7a67920a 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -83,19 +83,30 @@ scriptencoding utf-8
" , <- Literal comma
" [, ]* <- Any number of commas and spaces
"
-" We don't have to deal with escaped backslashes. You can read the source
-" code for the ad-hoc tokenizer in copy_option_part() in src/misc2.c in Vim's
-" source code and test it with some values of your own if you want to
-" understand why.
-"
" For the edge case of a blank 'runtimepath', MYVIM will be set to the empty
" string, due to the way that split() works by default without its third
" parameter {keepempty} set to false.
"
+" Once we have the path elements, we have to remove the escaping for periods,
+" specifically remove up to one backslash before all periods. We do that with
+" a map() over substitute(), string-eval style to accommodate older Vim before
+" Funcref variables were added.
+"
+" We don't, however, have to deal with escaped backslashes, or any other
+" character; you can read the source code for the ad-hoc tokenizer in
+" copy_option_part() in src/misc2.c in Vim's source code and test it with some
+" values of your own if you want to understand why.
+"
+" I'll factor this out into a global function if I ever need it anywhere else.
+"
" Vim, I love you, but you are really weird.
"
+let s:runtimepath = map(
+ \ split(&runtimepath, '\\\@<!,[, ]*'),
+ \ "substitute(v:val, '\\\\,', '', 'g')"
+ \ )
if !exists('$MYVIM')
- let $MYVIM = split(&runtimepath, '\\\@<!,[, ]*')[0]
+ let $MYVIM = s:runtimepath[0]
endif
" Having either imported or defined a value for the MYVIM environment
@@ -292,13 +303,14 @@ set viminfo+=n$MYVIM/cache/viminfo
"
set history=10000
-" Enable automatic backups of most file buffers. In practice, I don't need
-" these backups very much if I'm using version control sensibly, but they have
-" still saved my bacon a few times.
+" We'll now enable automatic backups of most file buffers, since that's off by
+" default. In practice, I don't need these backups very much, at least if I'm
+" using version control sensibly, but they have still saved my bacon a few
+" times.
"
" We'll try to keep the backup files in a dedicated cache directory, to stop
" them popping up next to the file to which they correspond, and getting
-" committed to version control.
+" accidentally committed to version control.
"
" If Vim is new enough, we'll add two trailing slashes to the path we're
" inserting, which prompts Vim to incorporate the full escaped path of the
@@ -1138,6 +1150,8 @@ xnoremap &
" didn't seem to be an analogue for a motion to filter text through an
" internal command like :sort, so I wrote one.
"
+" <https://sanctum.geek.nz/cgit/vim-colon-operator.git/about/>
+"
nmap g: <Plug>(ColonOperator)
" I used Tim Pope's unimpaired.vim plugin for ages, and I liked some of these
@@ -1172,6 +1186,8 @@ nnoremap ]l
" put_blank_lines.vim. These use operator functions so that they're
" repeatable without repeat.vim. They accept count prefixes, too.
"
+" <https://sanctum.geek.nz/cgit/vim-put-blank-lines.git/about/>
+"
nmap [<Space> <Plug>(PutBlankLinesAbove)
nmap ]<Space> <Plug>(PutBlankLinesBelow)
@@ -1277,6 +1293,8 @@ nnoremap <Leader>z
" larger blocks of text or for manipulating the text as it leaves the buffer,
" it makes more sense to use :! commands.
"
+" <https://sanctum.geek.nz/cgit/vim-copy-linebreak.git/about/>
+"
"" Leader,b toggles settings friendly to copying and pasting
nmap <Leader>b <Plug>(CopyLinebreakToggle)
@@ -1423,9 +1441,13 @@ onoremap <Leader>_
onoremap <Leader>%
\ :<C-U>execute 'normal! 1GVG'<CR>
-" This group defines some useful motions.
+" This group defines some useful motions, including navigating by indent
+" block using a custom plugin:
+"
+" <https://sanctum.geek.nz/cgit/vim-vertical-region.git/about/>
+"
-" Leader,{ and Leader,} move to top and bottom of indent region
+"" Leader,{ and Leader,} move to top and bottom of indent region
map <Leader>{ <Plug>(VerticalRegionUp)
sunmap <Leader>{
map <Leader>} <Plug>(VerticalRegionDown)
@@ -1454,6 +1476,11 @@ nnoremap <Leader>?
" This group contains miscellaneous mappings for which I couldn't find any
" other place. The plugin mappings probably require their own documentation
" comment block, but my hands are getting tired from all this typing.
+"
+" * <https://sanctum.geek.nz/cgit/vim-paste-open.git/about/>
+" * <https://sanctum.geek.nz/cgit/vim-replace-operator.git/about/>
+" * <https://sanctum.geek.nz/cgit/vim-regex-escape.git/about/>
+"
"" Leader,. runs the configured make program into the location list
nnoremap <Leader>.