From fe46aad17649fa1fbc3c935d801ab5b32cf6c981 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Wed, 2 Nov 2022 19:36:47 +0100 Subject: Add 'wchat' plugin Add a new `:WChat` command to quickly save temporary files based on a timestamp. I've been doing this manually to write chat messages but it occurred to me that it would be nice to save a bit of thought and effort for this. --- bundle/wchat/plugin/wchat.vim | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 bundle/wchat/plugin/wchat.vim (limited to 'bundle') diff --git a/bundle/wchat/plugin/wchat.vim b/bundle/wchat/plugin/wchat.vim new file mode 100644 index 0000000..7c17898 --- /dev/null +++ b/bundle/wchat/plugin/wchat.vim @@ -0,0 +1,8 @@ +if exists('g:loaded_wchat') + finish +endif +let g:loaded_wchat = 1 + +" Write to a temporary file labelled with the current time. +command! -nargs=0 -bang WChat + \ execute ":write\ /tmp/ch" . strftime('%H%M') -- cgit v1.2.3