Post to Twitter or Identi.ca in Vim
TwitVim is a Vim plugin that allows you to post to Twitter and view Twitter timelines. It is an enhancement of vimscript #2124 by Travis Jeffery.
install details
For newer versions that are packaged as Vimball archives, open the vba file and then source it.
vim twitvim.vba
:source %
Then see :help TwitVim-install for further instructions.
The instructions below are for older non-vba versions:
First, you need to install cURL if it isn’t already installed. Download cURL from here: http://curl.haxx.se/
Next, add the script to your Vim plugins directory. The location is platform-dependent. See :help add-plugin for details.
Next, add the following to your .vimrc or _vimrc:
let twitvim_login = “USER:PASS”
Replace USER and PASS with your Twitter username and password.
If you access the web through a HTTP proxy, add the following line:
let twitvim_proxy = “proxyhost:proxyport”
Replace proxyhost and proxyport with your HTTP proxy address and port number.
Usage:
:PosttoTwitter – This command will prompt you for a message to send to Twitter.
:CPosttoTwitter – This command posts the current line in the current buffer to Twitter.
:BPosttoTwitter – This command posts the current buffer to Twitter.
Alt-T – In Visual select mode, the Alt-T key posts the selected text to Twitter.
(use Ctrl-T instead if menu bar is enabled)
NOTE: The T mapping was changed to Alt-T to avoid overriding the T search command.
Alt-R – Starts a @-reply. (from timeline buffer)
Alt-D – Starts a direct message. (from timeline buffer)
:FriendsTwitter – View friends timeline.
:UserTwitter – View your timeline.
:RepliesTwitter – View @-replies.
:PublicTwitter – View public timeline.
:DMTwitter – View direct messages.
:Tweetburner – Shorten a URL with Tweetburner and insert at cursor.
:ATweetburner – Same as above but insert after cursor.
:PTweetburner – Same as above but start tweet on cmdline with short URL.
And similar commands for TinyURL, SnipURL, Metamark, UrlTea.
:Summize – Search Twitter using Summize.
If you want to use identi.ca rather than twitter, add this to your .vimrc file
let twitvim_api_root = “http://identi.ca/api”







