aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJagua2013-11-10 23:47:52 +0900
committerJagua2013-11-10 23:47:52 +0900
commitea8fe640950900697042b28c732a9012ce87c46f (patch)
tree86ab02bb3ace12e621857bca5a41d16a00fa6b44
parentf8e5a65f1641fcaa1a76e28ad303d242eafbe65a (diff)
downloadvimperator-plugins-ea8fe640950900697042b28c732a9012ce87c46f.tar.bz2
initial release: reply to myself
-rwxr-xr-xtwittperator/me.tw38
1 files changed, 38 insertions, 0 deletions
diff --git a/twittperator/me.tw b/twittperator/me.tw
new file mode 100755
index 0000000..e6dd41d
--- /dev/null
+++ b/twittperator/me.tw
@@ -0,0 +1,38 @@
+/*
+ * Please write the below line into .vimperatorrc.
+ * let g:twittperator_plugin_me = 1
+ *
+ */
+
+(function () {
+ const TW = liberator.plugins.twittperator;
+
+ TW.SubCommands.add(
+ TW.SubCommand({
+ command: ['me'],
+ description: 'reply to myself',
+ action: function(arg) {
+ setTimeout(
+ function () {
+ commandline.open(
+ '',
+ 'tw ' + arg + ' ',
+ modes.EX
+ );
+ },
+ 0
+ );
+ },
+ timelineComplete: true,
+ completer: TW.Completers.name_id(
+ function (s)
+ (s.user &&
+ s.user.screen_name == liberator.globalVariables.twittperator_screen_name)
+ ? s.id : false
+ )
+ })
+ );
+})();
+
+// vim: set et fdm=syntax ft=javascript sts=2 sw=2 ts=2 :
+