aboutsummaryrefslogtreecommitdiffstats
path: root/bundle/wchat/plugin
diff options
context:
space:
mode:
authorTeddy Wing2022-11-02 19:36:47 +0100
committerTeddy Wing2022-11-09 23:15:53 +0100
commitfe46aad17649fa1fbc3c935d801ab5b32cf6c981 (patch)
tree2d52215548724045bd3ce15c0ff3147627e62f51 /bundle/wchat/plugin
parent1394a4287b7aa0aa3d89bb2fd66fd77f0d3e15f3 (diff)
downloaddotvim-fe46aad17649fa1fbc3c935d801ab5b32cf6c981.tar.bz2
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.
Diffstat (limited to 'bundle/wchat/plugin')
-rw-r--r--bundle/wchat/plugin/wchat.vim8
1 files changed, 8 insertions, 0 deletions
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\<bang> /tmp/ch" . strftime('%H%M')