diff options
-rw-r--r-- | IDEAS.md | 2 | ||||
-rw-r--r-- | VERSION | 4 | ||||
-rw-r--r-- | vim/filetype.vim | 6 | ||||
-rw-r--r-- | vim/ftplugin/textarea.vim | 10 |
4 files changed, 19 insertions, 3 deletions
@@ -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. @@ -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 diff --git a/vim/filetype.vim b/vim/filetype.vim index 19094374..8a477ecc 100644 --- a/vim/filetype.vim +++ b/vim/filetype.vim @@ -383,7 +383,11 @@ augroup filetypedetect " Terminfo autocmd BufNewFile,BufRead \ ?*.ti - \ setf terminfo + \ 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 <buffer> <LocalLeader>f + \ :<C-U>setlocal filetype=mail<CR> +let b:undo_ftplugin = '|nunmap <buffer> <LocalLeader>f' |