From e6a477f97c84d84ec1ce1b80db953c84124c717e Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 11 Jun 2019 12:01:47 +1200 Subject: Rearrange a comment --- vim/vimrc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vim/vimrc b/vim/vimrc index 94af80f6..6a47f169 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -1376,12 +1376,12 @@ 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: " -" strip_trailing_whitespace.vim: -" :StripTrailingWhitespace +" keep_position.vim: +" :KeepPosition " squeeze_repeat_blanks.vim: " :SqueezeRepeatBlanks -" keep_position.vim -" :KeepPosition +" strip_trailing_whitespace.vim: +" :StripTrailingWhitespace " "" Leader,x strips trailing whitespace via a custom plugin -- cgit v1.2.3 From afd585d8758152549a6c7f5c717ccce1110ec9c8 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 11 Jun 2019 12:56:04 +1200 Subject: Correct some comments --- vim/vimrc | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/vim/vimrc b/vim/vimrc index 6a47f169..1625642d 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -652,8 +652,8 @@ endif set hidden " Do highlight matches for completed searches in the text, but clear that -" highlighting away when this vimrc is reload. Later on in this file, CTRL-L -" in normal mode is remapped to tack on a :nohlsearch as well. +" highlighting away when this vimrc is reloaded. Later on in this file, +" CTRL-L in normal mode is remapped to tack on a :nohlsearch as well. " set hlsearch nohlsearch @@ -707,8 +707,8 @@ set listchars+=nbsp:+ " Non-breaking spaces " The next pair of 'list' characters are arguably somewhat misplaced, in that " they don't really represent invisible characters in the same way as the -" others, but are hints for the presence of other characters unwrapped lines -" that are wider than the screen. They're very useful, though. +" others, but are hints for the presence of other characters on unwrapped +" lines that are wider than the screen. They're very useful, though. " " If the current encoding supports it, use these non-ASCII characters for the " markers, as they're visually distinctive: @@ -852,12 +852,12 @@ set wildmode=list:longest,full " candidates for tab completion on the command line. " " To make this list, I went right through my home directory with -" a `find`-toothed comb, counted the occurrences of every extension, forced +" a `find`-toothed comb; counted the occurrences of every extension, forced " down to lowercase; and then manually selected the ones that I was confident " would seldom contain plain text. " -" This does the trick with POSIX-compatible shell tools, giving you patterns -" for the top 50 extensions: +" The following incantation does the trick with POSIX-compatible shell tools, +" giving you patterns for the top 50 extensions: " " $ find ~ -type f -name '*.*' | " awk -F. '{exts[tolower($NF)]++} @@ -958,9 +958,9 @@ endtry " &filetype and set up by ftplugin files. " " * If a normal mode map would make sense in visual mode, take the time to -" configure that too. Use :xmap and its analogues rather :vmap to avoid -" defining unusable select-mode mappings, even though I never actually use -" selection mode directly. +" configure that too. Use :xmap and its analogues rather than :vmap to +" avoid defining unusable select-mode mappings, even though I never actually +" use selection mode directly. " " * Avoid mapping in insert mode; let characters be literal to the greatest " extent possible, and avoid "doing more" in insert mode besides merely @@ -1100,7 +1100,8 @@ nnoremap " We use :vnoremap rather than :xnoremap and thereby make the mapping apply to " select mode as well, because CTRL-L doesn't reflect a printable character, -" and so we may as well, even though I never use select mode directly. +" and so we may as well make it work, even though I don't actually use select +" mode directly. " vnoremap \ :nohlsearchgv @@ -1376,12 +1377,12 @@ 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: " -" keep_position.vim: -" :KeepPosition -" squeeze_repeat_blanks.vim: -" :SqueezeRepeatBlanks " strip_trailing_whitespace.vim: " :StripTrailingWhitespace +" squeeze_repeat_blanks.vim: +" :SqueezeRepeatBlanks +" keep_position.vim +" :KeepPosition " "" Leader,x strips trailing whitespace via a custom plugin -- cgit v1.2.3 From cc4a4b5d8351a8184e569d0d86a8516ea06166ff Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 11 Jun 2019 12:56:22 +1200 Subject: Add 'listchars' pairs simultaneously --- vim/vimrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vim/vimrc b/vim/vimrc index 1625642d..c93a50bc 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -721,9 +721,9 @@ set listchars+=nbsp:+ " Non-breaking spaces " Failing that, '<' and '>' will still do the trick. " if has('multi_byte_encoding') - set listchars+=extends:» listchars+=precedes:« + set listchars+=extends:»,precedes:« else - set listchars+=extends:> listchars+=precedes:< + set listchars+=extends:>,precedes:< endif " Don't let your editor's options be configured by content in arbitrary files! -- cgit v1.2.3 From 0e96429a9bf6268b9b956fe506287b11e0da71d2 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 11 Jun 2019 12:59:13 +1200 Subject: Refactor remaps, :v/:i in terms of :n --- vim/vimrc | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/vim/vimrc b/vim/vimrc index c93a50bc..857b96af 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -1088,7 +1088,7 @@ imap (DigraphSearch) " issuing a :nohlsearch command to stop highlighting searches on top of this. " " This gets by far the most use in normal mode, but I'd like it to work in -" visual and insert mode, too, where it's occasionally useful, especially on +" insert and visual modes, too, where it's occasionally useful, especially on " things like mobile phone terminal emulators that can be choppy and require " a lot of redrawing. " @@ -1098,20 +1098,20 @@ imap (DigraphSearch) nnoremap \ :nohlsearch -" We use :vnoremap rather than :xnoremap and thereby make the mapping apply to -" select mode as well, because CTRL-L doesn't reflect a printable character, -" and so we may as well make it work, even though I don't actually use select -" mode directly. +" The insert mode wrapper for normal CTRL-L uses CTRL-O to issue a single +" normal mode command. We intentionally use `:normal` rather than `:normal!` +" so that the normal mode mapping applies. I tried using just +" directly for this, but it didn't work; maybe i_CTRL-O doesn't respect +" mappings, but I couldn't find any documentation about this. " -vnoremap - \ :nohlsearchgv +inoremap :normal "\" -" The insert mode mapping uses CTRL-O to issue a single normal normal-mode -" command, but twice: once to issue the :nohlsearch command, and then once to -" issue an unmapped normal-mode CTRL-L. +" We use :vnoremap here rather than :xnoremap and thereby make the mapping +" apply to select mode as well, because CTRL-L doesn't reflect a printable +" character, and so we may as well make it work, even though I don't actually +" use select mode directly. " -inoremap - \ :nohlsearch +vmap gv " By default, the very-useful normal mode command '&' that repeats the " previous :substitute command doesn't preserve the flags from that -- cgit v1.2.3 From 8c6d5718a1814aba1ddf8bce4815bf9add39f0b3 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 11 Jun 2019 13:02:09 +1200 Subject: Restore 'splitbelow' and 'splitright' I just can't get used to the default. --- vim/vimrc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/vim/vimrc b/vim/vimrc index 857b96af..aa935644 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -777,6 +777,14 @@ set sessionoptions-=options " No global options or mappings " set shortmess+=I +" I find the defaults of new windows opening above or to the left of the +" previous window too jarring, because I'm used to both the i3 window manager +" and the tmux terminal multiplexer doing it the other way around, in reading +" order. I prefer the visual effect of the previous text staying where it is, +" and the new window occupying previously blank space. +" +set splitbelow splitright + " Limit the number of characters per line that syntax highlighting will " attempt to match. This is as much an effort to encourage me to break long " lines and do hard wrapping correctly as it is for efficiency. -- cgit v1.2.3 From 8f26bc878f2d3d113b2ba1800270ea0000ea9111 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 11 Jun 2019 13:02:21 +1200 Subject: Strip a comment line --- vim/vimrc | 1 - 1 file changed, 1 deletion(-) diff --git a/vim/vimrc b/vim/vimrc index aa935644..5f820fe4 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -1391,7 +1391,6 @@ nnoremap j " :SqueezeRepeatBlanks " keep_position.vim " :KeepPosition -" "" Leader,x strips trailing whitespace via a custom plugin nnoremap x -- cgit v1.2.3 From e6fc2581ed383b9ef2ba9e063b872a8bd7233fdb Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 11 Jun 2019 13:02:31 +1200 Subject: Bump VERSION --- VERSION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 4e1c6b4b..d171a808 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -tejr dotfiles v5.38.0 -Mon Jun 10 23:59:54 UTC 2019 +tejr dotfiles v5.39.0 +Tue Jun 11 01:02:31 UTC 2019 -- cgit v1.2.3