From 4ff81411383ae372f88caa58a87ee997332c872b Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 19 May 2019 16:28:59 +1200 Subject: Add mapping to create path for current file Might also make a BufWritePre hook for this that prompts. --- vim/vimrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vim/vimrc b/vim/vimrc index 136c775a..3df8f97f 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -360,6 +360,9 @@ nmap O (PasteOpenAbove) " \p toggles paste mode nnoremap p :set paste! paste? +" \P creates the path to the current file +nnoremap P :call mkdir(expand('%:h'), 'p') + " \q formats the current paragraph nnoremap q gqap -- cgit v1.2.3 From 3b612af537d2b861c5f6a8eec0fe864bc76d69d3 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 19 May 2019 16:30:23 +1200 Subject: Add an idea --- IDEAS.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/IDEAS.md b/IDEAS.md index 38ea9d47..feac7e10 100644 --- a/IDEAS.md +++ b/IDEAS.md @@ -26,3 +26,6 @@ Ideas appropriate `gawk --lint` calls for each of the .awk scripts. * Alternate buffer type switching would probably work rather well as a simple plugin. +* Write my own take on a plugin that creates paths if they don't exist before + saving a file. I already have \P, but it might be nice to automate it, maybe + with a prompt for security raisins. -- cgit v1.2.3 From 9c5ddc8364c46b7b2b93b3febb110ade621131ff Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 19 May 2019 16:37:09 +1200 Subject: Add an idea --- IDEAS.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/IDEAS.md b/IDEAS.md index feac7e10..146f7b95 100644 --- a/IDEAS.md +++ b/IDEAS.md @@ -29,3 +29,6 @@ Ideas * Write my own take on a plugin that creates paths if they don't exist before saving a file. I already have \P, but it might be nice to automate it, maybe with a prompt for security raisins. +* Write a ftplugin for Perl to switch between punctuation variable names and + English variable names., i.e. \e on `$?` would change to `$CHILD_ERROR`, and + vice-versa. -- cgit v1.2.3 From 3515ff636f2233acbfb0a4ee28601f317d21f82d Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 19 May 2019 17:16:07 +1200 Subject: Add a spelling abbreviation --- vim/vimrc | 1 + 1 file changed, 1 insertion(+) diff --git a/vim/vimrc b/vim/vimrc index 3df8f97f..795906ab 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -462,6 +462,7 @@ nnoremap ! ^"zyg_:!z " Things I almsot always type wrnog inoreabbrev almsot almost inoreabbrev wrnog wrong +inoreabbrev Fielding Feilding " Source any .vim files from ~/.vim/config runtime! config/*.vim -- cgit v1.2.3 From 02e063a3f3b687e01c1b74647507b20e07560669 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 19 May 2019 17:20:22 +1200 Subject: Don't bother checking for the 'spell' feature --- vim/after/ftplugin/markdown.vim | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/vim/after/ftplugin/markdown.vim b/vim/after/ftplugin/markdown.vim index b5919b20..7189a09a 100644 --- a/vim/after/ftplugin/markdown.vim +++ b/vim/after/ftplugin/markdown.vim @@ -1,19 +1,14 @@ -" Spellchecking features -if has('spell') - - " Spellcheck documents we're actually editing (not just viewing) - if &modifiable && !&readonly - setlocal spell - let b:undo_ftplugin .= '|setlocal spell<' - endif - - " Tolerate leading lowercase letters in README.md files, for things like - " headings being filenames - if expand('%:t') ==# 'README.md' - setlocal spellcapcheck= - let b:undo_ftplugin .= '|setlocal spellcapcheck<' - endif +" Spellcheck documents we're actually editing (not just viewing) +if &modifiable && !&readonly + setlocal spell + let b:undo_ftplugin .= '|setlocal spell<' +endif +" Tolerate leading lowercase letters in README.md files, for things like +" headings being filenames +if expand('%:t') ==# 'README.md' + setlocal spellcapcheck= + let b:undo_ftplugin .= '|setlocal spellcapcheck<' endif " Stop here if the user doesn't want ftplugin mappings -- cgit v1.2.3 From 47f997529d8b9ec09d6d7f8c3db34c7a402d4347 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 19 May 2019 17:21:50 +1200 Subject: Start spell-checking HTML --- vim/after/ftplugin/html.vim | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vim/after/ftplugin/html.vim b/vim/after/ftplugin/html.vim index 203e3f46..8b390528 100644 --- a/vim/after/ftplugin/html.vim +++ b/vim/after/ftplugin/html.vim @@ -3,6 +3,12 @@ if &filetype !=# 'html' finish endif +" Spellcheck documents we're actually editing (not just viewing) +if &modifiable && !&readonly + setlocal spell + let b:undo_ftplugin .= '|setlocal spell<' +endif + " Use tidy(1) for checking compiler tidy let b:undo_ftplugin .= '|unlet b:current_compiler' -- cgit v1.2.3 From c9f9bbc408cd245a46a014735050d3dcea0a941a Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 19 May 2019 19:59:40 +1200 Subject: Remove a redundant sentence --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index ffaa23db..8599b04c 100644 --- a/README.md +++ b/README.md @@ -33,8 +33,7 @@ directory so you can explore: $ env -i HOME="$tmpdir" TERM="$TERM" "$SHELL" -l The default `install` target will install these targets and all their -dependencies. Note that you don't actually have to have any of this except -`sh` installed. +dependencies: * `install-bin` * `install-bin-man` -- cgit v1.2.3 From 9ae78fdbc8ca553628cc61d43cdb2b30134fdb2e Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 20 May 2019 10:26:59 +1200 Subject: Follow the manual's instructions for 'ttymouse' --- vim/vimrc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/vim/vimrc b/vim/vimrc index 795906ab..96d45fc8 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -175,12 +175,8 @@ if &term =~# '^putty' set ttyfast endif -" No terminal mouse, even if we could; the manual says to set 't_RV', but I -" don't like that -" Not in NeoVim -if exists('+ttymouse') && &ttymouse !=# '' - set ttymouse= -endif +" No 'ttymouse' (terminal mouse), even if we could +set t_RV= " Try to keep persistent undo files in one system-appropriate directory " (v7.2.438), including full encoded path in filename (trailing double slash) -- cgit v1.2.3 From fac932a73316e792529993c79bdf7382c6ea174d Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 20 May 2019 10:28:03 +1200 Subject: Revert "Follow the manual's instructions for 't... This reverts commit 9ae78fdbc8ca553628cc61d43cdb2b30134fdb2e. Setting t_RV to blank doesn't work, at least, not in .vimrc. If TERM is xterm, it gets set anyway. --- vim/vimrc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vim/vimrc b/vim/vimrc index 96d45fc8..0a00b27f 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -175,8 +175,12 @@ if &term =~# '^putty' set ttyfast endif -" No 'ttymouse' (terminal mouse), even if we could -set t_RV= +" No terminal mouse, even if we could; the manual says to set 't_RV', but that +" doesn't seem to work +" Not in NeoVim +if exists('+ttymouse') && &ttymouse !=# '' + set ttymouse= +endif " Try to keep persistent undo files in one system-appropriate directory " (v7.2.438), including full encoded path in filename (trailing double slash) -- cgit v1.2.3 From fe1383d5e597e01dd52bf62bcc816f43ee07171e Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 20 May 2019 17:00:29 +1200 Subject: Use nicer patch-checking syntax This syntax is supported for 7.4.237 and above. --- vim/after/ftplugin/sh.vim | 4 +--- vim/vimrc | 6 ++---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/vim/after/ftplugin/sh.vim b/vim/after/ftplugin/sh.vim index e7bd21dc..9afd5086 100644 --- a/vim/after/ftplugin/sh.vim +++ b/vim/after/ftplugin/sh.vim @@ -23,9 +23,7 @@ let b:undo_ftplugin .= '|unlet b:current_compiler b:sh_check_compiler' " Resort to g:is_posix for correct syntax on older runtime files " 8.1.257 updated the runtime files to include a fix for this -if exists('b:is_posix') - \ && (v:version < 800 - \ || v:version == 800 && !has('patch257')) +if exists('b:is_posix') && !has('patch-8.0.257') let is_posix = 1 endif diff --git a/vim/vimrc b/vim/vimrc index 0a00b27f..7932e1de 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -31,8 +31,7 @@ endif " Try to keep backups in one system-appropriate directory, including full " encoded path in filename (trailing double slash) if supported (v8.1.251) set backup -if v:version > 801 - \ || v:version == 801 && has('patch251') +if has('patch-8.1.251') set backupdir^=$MYVIMRUNTIME/cache/backup// else set backupdir^=$MYVIMRUNTIME/cache/backup @@ -92,8 +91,7 @@ if v:version > 703 endif " Don't break a single space after a period, if supported (v8.1.728) -if v:version > 801 - \ || v:version == 801 && has('patch728') +if has('patch-8.1.728') set formatoptions+=p endif -- cgit v1.2.3 From 706be9469987b44e5e65d76c7e100a44e60bd0e3 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 20 May 2019 17:01:08 +1200 Subject: Bump VERSION --- VERSION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 71330ff8..c20057e0 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -tejr dotfiles v4.33.0 -Sun May 19 02:39:54 UTC 2019 +tejr dotfiles v4.34.0 +Mon May 20 05:01:08 UTC 2019 -- cgit v1.2.3