From 751214f93b38940097bc2e0e22e8a1dad3838fdf Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 28 Mar 2019 15:00:15 +1300 Subject: Correct short :setf to :setfiletype command --- vim/filetype.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vim/filetype.vim b/vim/filetype.vim index 19094374..8a86ac1d 100644 --- a/vim/filetype.vim +++ b/vim/filetype.vim @@ -383,7 +383,7 @@ augroup filetypedetect " Terminfo autocmd BufNewFile,BufRead \ ?*.ti - \ setf terminfo + \ setfiletype terminfo " Tidy config autocmd BufNewFile,BufRead \ .tidyrc -- cgit v1.2.3 From 80b398502a752dafdbb8187f72e85d8c1f7fc5ae Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 28 Mar 2019 15:26:31 +1300 Subject: Add textarea filetype This custom filetype is just a hook to hang functionality for TextEditorAnywhere documents under Windows. Most of the time, it's me writing email, or comments that benefit from email formatting, so I've configured f to switch to the mail filetype. This switching could probably benefit from a plugin, actually. --- vim/filetype.vim | 4 ++++ vim/ftplugin/textarea.vim | 10 ++++++++++ 2 files changed, 14 insertions(+) create mode 100644 vim/ftplugin/textarea.vim diff --git a/vim/filetype.vim b/vim/filetype.vim index 8a86ac1d..8a477ecc 100644 --- a/vim/filetype.vim +++ b/vim/filetype.vim @@ -384,6 +384,10 @@ augroup filetypedetect autocmd BufNewFile,BufRead \ ?*.ti \ setfiletype terminfo + " TextEditorAnywhere text field + autocmd BufNewFile,BufRead + \ TextEditorAnywhere_??_??_??.txt + \ setfiletype textarea " Tidy config autocmd BufNewFile,BufRead \ .tidyrc diff --git a/vim/ftplugin/textarea.vim b/vim/ftplugin/textarea.vim new file mode 100644 index 00000000..b5c5ca98 --- /dev/null +++ b/vim/ftplugin/textarea.vim @@ -0,0 +1,10 @@ +" Stop here if the user doesn't want ftplugin mappings +if exists('g:no_plugin_maps') || exists('g:no_textarea_maps') + finish +endif + +" Switch to mail filetype, just because that's very often the contents of text +" areas I edit using TextEditorAnywhere +nnoremap f + \ :setlocal filetype=mail +let b:undo_ftplugin = '|nunmap f' -- cgit v1.2.3 From 147a6f858cf18f866e586c37a1d33002868f0ce0 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 28 Mar 2019 15:32:36 +1300 Subject: Add a note with a plugin idea --- IDEAS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/IDEAS.md b/IDEAS.md index d79a635f..8e30f48d 100644 --- a/IDEAS.md +++ b/IDEAS.md @@ -23,3 +23,5 @@ Ideas * Ideally, the .awk and/or .sed scripts in the bin and games dirs 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. +* Alternate buffer type switching would probably work rather well as a simple + plugin. -- cgit v1.2.3 From e4936f383f5756703c0c89626d0b8c640cefb6a3 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 28 Mar 2019 15:32:54 +1300 Subject: Bump VERSION --- VERSION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index fce10a84..301d1d19 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -tejr dotfiles v4.16.0 -Thu Feb 28 02:15:08 UTC 2019 +tejr dotfiles v4.17.0 +Thu Mar 28 02:32:54 UTC 2019 -- cgit v1.2.3