From ea8fe640950900697042b28c732a9012ce87c46f Mon Sep 17 00:00:00 2001 From: Jagua Date: Sun, 10 Nov 2013 23:47:52 +0900 Subject: initial release: reply to myself --- twittperator/me.tw | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100755 twittperator/me.tw (limited to 'twittperator') 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 : + -- cgit v1.2.3