aboutsummaryrefslogtreecommitdiffstats
path: root/twittperator
diff options
context:
space:
mode:
authoranekos2012-06-24 08:49:38 +0900
committeranekos2012-06-24 08:50:16 +0900
commit0aaded344f1c7b1718c7575455f675ddd6718879 (patch)
tree753112023e5bbdd25c731dc07e957a35fd7f17b1 /twittperator
parentc90a1d7e9804e720fd228e735196008ecf609177 (diff)
downloadvimperator-plugins-0aaded344f1c7b1718c7575455f675ddd6718879.tar.bz2
twittperator でツイートをクリップボードにコピー! (サブコマンド)
Diffstat (limited to 'twittperator')
-rw-r--r--twittperator/copy.tw24
1 files changed, 24 insertions, 0 deletions
diff --git a/twittperator/copy.tw b/twittperator/copy.tw
new file mode 100644
index 0000000..50a280a
--- /dev/null
+++ b/twittperator/copy.tw
@@ -0,0 +1,24 @@
+/*
+ * Please write the below line into .vimperatorrc.
+ * let g:twittperator_plugin_copy = 1
+ *
+ */
+
+(function () {
+ const TW = liberator.plugins.twittperator;
+
+ TW.SubCommands.add(
+ TW.SubCommand({
+ command: ['copy'],
+ description: "Copy a tweet",
+ action: function(arg) {
+ util.copyToClipboard(arg);
+ },
+ timelineComplete: true,
+ completer: TW.Completers.text(function(s) s.id)
+ })
+ );
+})();
+
+// vim: set et fdm=syntax fenc= ft=javascript sts=2 sw=2 ts=2 :
+