From ff0e67952894ed091081f8f783726f5d04f755df Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 11 Jun 2019 13:40:59 +1200 Subject: Fix a couple of comments --- vim/vimrc | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/vim/vimrc b/vim/vimrc index 5f820fe4..3bcc10d8 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -81,7 +81,7 @@ scriptencoding utf-8 " " We don't have to deal with escaped backslashes; read the source of " copy_option_part() in vim/src/misc2.c to see why. As an edge case, if -" &runtimepath is blank, $MYVIM will be set to the empty string, which will +" &runtimepath is blank, MYVIM will be set to the empty string, which will " throw an error in the next block, due to the way that split() works by " default. " @@ -96,13 +96,12 @@ endif " " Firstly, it can't be empty. " -" Secondly, if the path specified in the MYVIM environment variable contains -" a comma, its use in comma-separated option values will confuse Vim into -" thinking more than one directory is being specified, per normal :set -" semantics. It's possible to work around this with some careful escaping, -" either at :set time with an :execute abstraction or with a separate -" environment variable for that particular context, but it's not really worth -" the extra complexity for such a niche situation. +" Secondly, if it contains a comma, its use in comma-separated option values +" will confuse Vim into thinking more than one directory is being specified, +" per normal :set semantics. It's possible to work around this with some +" careful escaping, either at :set time with an :execute abstraction or with +" a separate environment variable for that particular context, but it's not +" really worth the extra complexity for such a niche situation. " " Thirdly, some versions of Vim prior to v7.2.0 exhibit bizarre behaviour with " escaping with the backslash character on the command line, so on these older @@ -110,7 +109,7 @@ endif " level that this was fixed yet, nor the true reason for the bug. " " If any of those conditions are meant, throw an explanatory error and stop -" reading this file. Most of the file doesn't depend on $MYVIM, but there's +" reading this file. Most of the file doesn't depend on MYVIM, but there's " no point catering to these edge cases. " if $MYVIM ==# '' @@ -1165,7 +1164,7 @@ nnoremap [l nnoremap ]l \ :lnext -" Here's another mapping I particularly liked from unimpaired.vim here; insert +" Here's another mapping I particularly liked from unimpaired.vim; insert " blank lines from normal mode, using a custom plugin of mine called " put_blank_lines.vim. These use operator functions so that they're " repeatable without repeat.vim. They accept count prefixes, too. -- cgit v1.2.3 From 624c6d439a75c9fd9f46a603783d125b79cd06d7 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 11 Jun 2019 13:52:35 +1200 Subject: Correct a bunch of spelling problems --- vim/vimrc | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/vim/vimrc b/vim/vimrc index 3bcc10d8..ff8a0d6b 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -51,7 +51,7 @@ scriptencoding utf-8 " variable MYVIM for the user runtime directory, if such a variable does not " already exist in the environment, and there's a value in 'runtimepath' from " which to glean a useable path. We'll use the path nominated in the MYVIM -" variable as the root of our 'nackupdir', 'directory', 'undodir', and +" variable as the root of our 'backupdir', 'directory', 'undodir', and " 'viminfofile' caches, and anywhere else we need a sensible writeable " location for Vim-related files. Having it available as an environment " variable makes assignments with :set more convenient, without requiring @@ -644,9 +644,9 @@ endif " " However, the option really is required for batch operations performed with " commands like :argdo or :bufdo, because Vim won't otherwise tolerate unsaved -" changes to a litany of undisplayed buffers. After I started using such -" command maps a bit more often, I realised I finally had a reason to turn -" this on permanently. +" changes to a litany of buffers that are not displayed in any window. After +" I started using such command maps a bit more often, I realised I finally had +" a reason to turn this on permanently. " set hidden @@ -843,12 +843,12 @@ set visualbell t_vb= " When Ex command line completion is started with Tab, list valid completions " and complete the command line to the longest common substring, just as Bash -" does, with just the one keypress. +" does, with just the one key press. " " The default value of 'full' for the 'wildmode' option puts the full " completion onto the line immediately, which I tolerate for insert mode " completion but don't really like on the Ex command line. Instead, I arrange -" for that with a second keypress if I ever want it, which isn't often. I did +" for that with a second key press if I ever want it, which isn't often. I did " without using it at all for years. " set wildmenu @@ -1077,7 +1077,7 @@ endif " > Á A' LATIN CAPITAL LETTER A WITH ACUTE " > É E' LATIN CAPITAL LETTER E WITH ACUTE " > Í I' LATIN CAPITAL LETTER I WITH ACUTE -" > ... etc ... +" > ...etc... " " " @@ -1262,8 +1262,8 @@ nnoremap u nnoremap z \ :setlocal spelllang=en_nz -" The next mapping is another option toggler, but it's more complicated; it -" uses a simple plugin of mine called copy_linebreak.vim to manage several +" The next mapping is also for toggling an option, but it's more complicated; +" it uses a simple plugin of mine called copy_linebreak.vim to manage several " options at once, related to the 'wrap' option that soft-wraps text. " " It's designed for usage in terminal emulators and multiplexers to @@ -1272,8 +1272,8 @@ nnoremap z " including 'breakindent', 'linebreak', and 'showbreak' artifacts. " " This is really handy for quick selections of small regions of text. For -" larger blocks of text or for programatically manipulating the text as it -" leaves the buffer, it makes more sense to use :! commands. +" larger blocks of text or for manipulating the text as it leaves the buffer, +" it makes more sense to use :! commands. " "" Leader,b toggles settings friendly to copying and pasting @@ -1498,7 +1498,7 @@ inoreabbrev THere There " " > Consequently, it is soon recognised that they write for the sake of " > filling up the paper, and this is the case sometimes with the best -" > authors... as soon as this is perceived the book should be thrown away, +" > authors...as soon as this is perceived the book should be thrown away, " > for time is precious. " > -- Schopenhauer " -- cgit v1.2.3 From d82bedec805226a4c4d75057dc986d65450cc4be Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 11 Jun 2019 14:49:48 +1200 Subject: Add visual mode mapping for spellfiles --- vim/plugin/spellfile_local.vim | 1 + 1 file changed, 1 insertion(+) diff --git a/vim/plugin/spellfile_local.vim b/vim/plugin/spellfile_local.vim index 0ded3fc1..bb6421f2 100644 --- a/vim/plugin/spellfile_local.vim +++ b/vim/plugin/spellfile_local.vim @@ -22,6 +22,7 @@ function! AddLocalSpellFile() abort setlocal spellfile< execute 'setlocal spellfile+=$MYVIM/cache/spell/local/'.spellfile nnoremap zG 2zg + xnoremap zG 2zg endfunction command! AddLocalSpellFile -- cgit v1.2.3 From fc6e46ce8dd7c5ae924237a67af9c9fa958a6e86 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 11 Jun 2019 15:04:38 +1200 Subject: Correct usage of :normal in mappings --- vim/vimrc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/vim/vimrc b/vim/vimrc index ff8a0d6b..1ba3805e 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -1111,7 +1111,7 @@ nnoremap " 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. " -inoremap :normal "\" +inoremap :execute "normal \" " 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 @@ -1403,10 +1403,10 @@ xnoremap X \ :SqueezeRepeatBlanks "" Leader,= runs the whole buffer through =, preserving position nnoremap = - \ :KeepPosition normal! 1G=G + \ :KeepPosition execute 'normal! 1G=G' "" Leader,+ runs the whole buffer through gq, preserving position nnoremap + - \ :KeepPosition normal! 1GgqG + \ :KeepPosition execute 'normal! 1GgqG' " This group defines a few :onoremap commands to make my own text objects. " I should probably make some more of these, as they've proven to be @@ -1414,10 +1414,10 @@ nnoremap + "" Leader,_ uses last changed or yanked text as an object onoremap _ - \ :normal! `[v`] + \ :execute 'normal! `[v`]' "" Leader,% uses entire buffer as an object onoremap % - \ :normal! 1GVG + \ :execute 'normal! 1GVG' " This group defines some useful motions. -- cgit v1.2.3 From 89319926947b0d67e196d7843bf375f8cff3c0de Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 11 Jun 2019 15:04:55 +1200 Subject: Bump VERSION --- VERSION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index d171a808..de47937d 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -tejr dotfiles v5.39.0 -Tue Jun 11 01:02:31 UTC 2019 +tejr dotfiles v5.40.0 +Tue Jun 11 03:04:55 UTC 2019 -- cgit v1.2.3