Skip to content

Commit

Permalink
Version 0.7.4
Browse files Browse the repository at this point in the history
* Allow users to customize timestamp format in timeline displays.
* Take Twitter's URL-wrapping into account when counting characters in tweets. You do not have to shorten URLs manually any more. Just post to Twitter with the original URLs and TwitVim will ensure that the tweet fits the 140-character limit after Twitter's t.co link-wrapping.
* Added network timeout option.
* Added Python 3 networking and OAuth code.
* Switched from page-style pagination to max_id-style pagination because page-style pagination has been deprecated. As a result, all timeline commands will cease to accept count parameters and :PreviousTwitter will return to the top page regardless of current page number.
* Switched to new API for :FollowingTwitter and :FollowersTwitter because the old API was deprecated.
* :FollowTwitter now stops you from following a user that you are already following. This is to avoid triggering a Twitter bug where the following flag reverts to 'follow request sent' if the subject's timeline is protected.
  • Loading branch information
Po Shan Cheah authored and vim-scripts committed Jan 5, 2013
1 parent 53f3c98 commit b8145b6
Show file tree
Hide file tree
Showing 2 changed files with 1,871 additions and 1,531 deletions.
177 changes: 107 additions & 70 deletions doc/twitvim.txt
Expand Up @@ -54,6 +54,7 @@ License: The Vim License applies to twitvim.vim and twitvim.txt (see
twitvim_filter_regex.................: |twitvim_filter_regex|
4. Manual.................................: |TwitVim-manual|
4.1. TwitVim's Buffers....................: |TwitVim-buffers|
twitvim_timestamp_format.............: |twitvim_timestamp_format|
4.2. Update Commands......................: |TwitVim-update-commands|
:PosttoTwitter.......................: |:PosttoTwitter|
:CPosttoTwitter......................: |:CPosttoTwitter|
Expand Down Expand Up @@ -277,6 +278,12 @@ License: The Vim License applies to twitvim.vim and twitvim.txt (see
and hmac modules. All of these are in the Python standard library as
of Python 2.5.

If you compiled Vim with Python 3, add the following to your vimrc
instead:
>
let twitvim_enable_python3 = 1
<


If you compiled Vim with Ruby, add the following to your vimrc:
>
Expand Down Expand Up @@ -566,6 +573,7 @@ License: The Vim License applies to twitvim.vim and twitvim.txt (see
>
let twitvim_enable_perl = 1
let twitvim_enable_python = 1
let twitvim_enable_python3 = 1
let twitvim_enable_ruby = 1
let twitvim_enable_tcl = 1
<
Expand All @@ -586,6 +594,7 @@ License: The Vim License applies to twitvim.vim and twitvim.txt (see


2. Python interface *twitvim_enable_python*
*twitvim_enable_python3*

To enable TwitVim's Python networking code, add the following to your
vimrc:
Expand All @@ -595,6 +604,13 @@ License: The Vim License applies to twitvim.vim and twitvim.txt (see
TwitVim requires the urllib, urllib2, and base64 modules. These
modules are in the Python standard library.

If Vim is using Python 3, add the following to your vimrc instead:
>
let twitvim_enable_python3 = 1
<
For Python 3, TwitVim requires the urllib, socket, and base64 modules.
These modules are in the Python 3 standard library.


3. Ruby interface *twitvim_enable_ruby*

Expand All @@ -606,8 +622,8 @@ License: The Vim License applies to twitvim.vim and twitvim.txt (see
TwitVim requires the net/http, uri, and Base64 modules. These modules
are in the Ruby standard library.

In addition, if using the Ruby interface, TwitVim requires Vim
7.2.360 or later to fix an if_ruby problem with Windows sockets.
In addition, TwitVim requires Vim 7.2.360 or later to fix an if_ruby
problem with Windows sockets.

Alternatively, you can add the following patch to the Vim sources:

Expand Down Expand Up @@ -709,17 +725,18 @@ License: The Vim License applies to twitvim.vim and twitvim.txt (see
To use SSL via Tcl, you need to install the SSL libraries and Tcllib.
To be more specific, TwitVim needs the tls package from Tcllib.

All known versions of Vim (up to 7.3f beta, as of this writing) have a
bug that prevents the tls package from being loaded if you compile Vim
with Tcl 8.5. This discussion thread explains the problem:
Versions of Vim up to 7.3.450 have a bug that prevents the tls package
from being loaded if you compile Vim with Tcl 8.5. This discussion
thread explains the problem:
>
http://objectmix.com/tcl/15892-tcl-interp-inside-vim-throws-error-w-clock-format.html
<
If you need to use Twitter SSL with the Tcl interface, you can try one
of the following workarounds:

a. Downgrade to Tcl 8.4.
b. Edit if_tcl.c in the Vim source code to remove the redefinition of
a. Upgrade Vim to version 7.3.451 or later.
b. Downgrade to Tcl 8.4.
c. Edit if_tcl.c in the Vim source code to remove the redefinition of
catch. Then rebuild Vim.


Expand Down Expand Up @@ -805,9 +822,20 @@ License: The Vim License applies to twitvim.vim and twitvim.txt (see
profile. Only a subset of the mappings in |:TwitVim-mappings| will
work in the info buffer.

TwitVim brings up a new timeline buffer only if one does not already
exist. Otherwise, it reuses the existing timeline buffer. The same
behavior applies to the info buffer.
TwitVim splits the window and opens a new timeline buffer only if one
does not already exist. Otherwise, it reuses the existing timeline
buffer. The same behavior applies to the info buffer.

*twitvim_timestamp_format*
You can customize the timestamp format in a timeline buffer by setting
twitvim_timestamp_format. For example, to show only the time, add this
to your vimrc:
>
let twitvim_timestamp_format = '%I:%M %p'
<
TwitVim uses |strftime()| to format timestamps, so you will need to
check the manual page of the C function strftime() to see what
formatting codes you can use here.


------------------------------------------------------------------------------
Expand Down Expand Up @@ -851,18 +879,14 @@ License: The Vim License applies to twitvim.vim and twitvim.txt (see
list of highlighting groups it uses.


:[count]UserTwitter *:UserTwitter*
:[count]UserTwitter {username}
:UserTwitter *:UserTwitter*
:UserTwitter {username}

This command displays your Twitter timeline.

If you specify a {username}, this command displays the timeline for
that user.

If you specify [count], that number is used as the page number. For
example, :2UserTwitter displays the second page from your user
timeline.

*twitvim_count*
You can configure the number of tweets returned by :UserTwitter by
setting twitvim_count. For example,
Expand All @@ -873,29 +897,21 @@ License: The Vim License applies to twitvim.vim and twitvim.txt (see
You can set twitvim_count to any integer from 1 to 200.


:[count]FriendsTwitter *:FriendsTwitter*
:FriendsTwitter *:FriendsTwitter*

This command displays your Twitter timeline with updates from friends
merged in.

If you specify [count], that number is used as the page number. For
example, :2FriendsTwitter displays the second page from your friends
timeline.

You can configure the number of tweets returned by :FriendsTwitter by
setting |twitvim_count|.


:[count]MentionsTwitter *:MentionsTwitter*
:[count]RepliesTwitter *:RepliesTwitter*
:MentionsTwitter *:MentionsTwitter*
:RepliesTwitter *:RepliesTwitter*

This command displays a timeline of mentions (updates containing
@username) that you've received from other Twitter users.

If you specify [count], that number is used as the page number. For
example, :2MentionsTwitter displays the second page from your mentions
timeline.

:RepliesTwitter is the old name for :MentionsTwitter.

You can configure the number of tweets returned by :MentionsTwitter by
Expand All @@ -906,27 +922,22 @@ License: The Vim License applies to twitvim.vim and twitvim.txt (see

This command displays the public timeline.

Note: The REST API call supporting this command has been deprecated by
Twitter. This command will cease to function on May 14, 2012.

:[count]DMTwitter *:DMTwitter*

This command displays direct messages that you've received.
:DMTwitter *:DMTwitter*

If you specify [count], that number is used as the page number. For
example, :2DMTwitter displays the second page from your direct
messages timeline.
This command displays direct messages that you've received.


:[count]DMSentTwitter *:DMSentTwitter*
:DMSentTwitter *:DMSentTwitter*

This command displays direct messages that you've sent.

If you specify [count], that number is used as the page number. For
example, :2DMSentTwitter displays the second page from your direct
messages sent timeline.


:[count]ListTwitter {list} *:ListTwitter*
:[count]ListTwitter {user} {list}
:ListTwitter {list} *:ListTwitter*
:ListTwitter {user} {list}

This command displays a Twitter list timeline.

Expand All @@ -936,37 +947,21 @@ License: The Vim License applies to twitvim.vim and twitvim.txt (see
In the second form, the command displays list {list} from user
{user}.

If you specify [count], that number is used as the page number. For
example, :2ListTwitter list1 displays the second page from the list1
list timeline.


:[count]RetweetedToMeTwitter *:RetweetedToMeTwitter*
:RetweetedToMeTwitter *:RetweetedToMeTwitter*

This command displays a timeline of retweets by others to you.

If you specify [count], that number is used as the page number. For
example, :2RetweetedToMeTwitter displays the second page from the
retweets timeline.


:[count]RetweetedByMeTwitter *:RetweetedByMeTwitter*
:RetweetedByMeTwitter *:RetweetedByMeTwitter*

This command displays a timeline of retweets by you.

If you specify [count], that number is used as the page number. For
example, :2RetweetedByMeTwitter displays the second page from the
retweets timeline.


:[count]FavTwitter *:FavTwitter*
:FavTwitter *:FavTwitter*

This command displays a timeline of your favorites.

If you specify [count], that number is used as the page number. For
example, :2FavTwitter displays the second page from the favorites
timeline.


:FollowingTwitter *:FollowingTwitter*
:FollowingTwitter {user}
Expand Down Expand Up @@ -1097,9 +1092,9 @@ License: The Vim License applies to twitvim.vim and twitvim.txt (see

:PreviousTwitter *:PreviousTwitter*

This command loads the previous (newer) page in the timeline. If the
timeline is on the first page, this command issues a warning and
doesn't do anything. See |TwitVim-C-PageUp|.
This command returns to the first (newest) page in the timeline. If
the timeline is already on the first page, this command issues a
warning and doesn't do anything. See |TwitVim-C-PageUp|.


:PreviousInfoTwitter *:PreviousInfoTwitter*
Expand Down Expand Up @@ -1449,9 +1444,9 @@ License: The Vim License applies to twitvim.vim and twitvim.txt (see
*TwitVim-previous*
Ctrl-PageUp *TwitVim-C-PageUp*

This command loads the previous (newer) page in the timeline. If the
timeline is on the first page, it issues a warning and doesn't do
anything. See |:PreviousTwitter|.
This mapping returns to the first (newest) page in the timeline. If
the timeline is already on the first page, it issues a warning and
doesn't do anything. See |:PreviousTwitter|.

This mapping also works in the info buffer but only if the list is
long enough to use more than one page. It does nothing in the user
Expand Down Expand Up @@ -1803,8 +1798,8 @@ License: The Vim License applies to twitvim.vim and twitvim.txt (see
short URL already inserted.


:[count]SearchTwitter *:SearchTwitter*
:[count]SearchTwitter {query}
:SearchTwitter *:SearchTwitter*
:SearchTwitter {query}

This command calls the Twitter Search API to search for {query}. If
{query} is not provided on the command line, the command will prompt
Expand All @@ -1814,10 +1809,6 @@ License: The Vim License applies to twitvim.vim and twitvim.txt (see
list of search operators, see:
https://support.twitter.com/groups/31-twitter-basics/topics/110-search/articles/71577-how-to-use-advanced-twitter-search

If you specify [count], that number is used as the page number. For
example, :2SearchTwitter hello displays the second page of search
results for the word hello.

You can configure the number of tweets returned by :SearchTwitter by
setting |twitvim_count|.

Expand Down Expand Up @@ -1984,10 +1975,56 @@ License: The Vim License applies to twitvim.vim and twitvim.txt (see
them with |:CPosttoTwitter|. With the line length in your status line,
you will know when you've reached the 140-character boundary.

------------------------------------------------------------------------------
6.4. Network timeout *TwitVim-network-timeout*

TwitVim may have problems connecting to Twitter sometimes. The system
default for socket timeouts may be as long as a few minutes, so
TwitVim will appear to hang for that length of time before displaying
an error message.

*twitvim_net_timeout*
You can set twitvim_net_timeout to reduce this timeout interval. For
example, add the following to your vimrc:
>
let twitvim_net_timeout = 30
<
to set the network timeout to 30 seconds.

Note: This option does not seem to work correctly if you are using
|twitvim_enable_perl|. It may take longer than that number of seconds
to time out.


==============================================================================
7. TwitVim History *TwitVim-history*

0.7.4 : 2012-05-04 * Allow users to customize timestamp format in
timeline displays. |twitvim_timestamp_format|
* Take Twitter's URL-wrapping into account when
counting characters in tweets. You do not have to
shorten URLs manually any more. Just post to
Twitter with the original URLs and TwitVim will
ensure that the tweet fits the 140-character
limit after Twitter's t.co link-wrapping.
* Added network timeout option.
|twitvim_net_timeout|
* Added Python 3 networking and OAuth code.
|twitvim_enable_python3|
* Switched from page-style pagination to
max_id-style pagination because page-style
pagination has been deprecated. As a result, all
timeline commands will cease to accept [count]
parameters and |:PreviousTwitter| will return to
the top page regardless of current page number.
* Switched to new API for |:FollowingTwitter| and
|:FollowersTwitter| because the old API was
deprecated.
* |:FollowTwitter| now stops you from following a
user that you are already following. This is to
avoid triggering a Twitter bug where the
following flag reverts to 'follow request sent'
if the subject's timeline is protected.
0.7.3 : 2012-01-17 * Switched to JSON API for Twitter Search so that
TwitVim can support t.co URL expansion and
in-reply-to in search results.
Expand Down

0 comments on commit b8145b6

Please sign in to comment.