summaryrefslogtreecommitdiff
path: root/ftplugin/hackernews.py
diff options
context:
space:
mode:
authorryanss2015-03-02 23:59:00 -0500
committerryanss2015-03-02 23:59:00 -0500
commitb84b66664e4e3e1fa92aef2d3f67ee626b6145b5 (patch)
tree4ac783fc15f36c42d5911bf13d91c40549823745 /ftplugin/hackernews.py
parent01c80666fcb799b1889537ea172114be3b08fc57 (diff)
downloadvim-hn-b84b66664e4e3e1fa92aef2d3f67ee626b6145b5.tar.gz
Remove use of tabs for comments layout -- spaces only
Diffstat (limited to 'ftplugin/hackernews.py')
-rw-r--r--ftplugin/hackernews.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/ftplugin/hackernews.py b/ftplugin/hackernews.py
index 1fc205c..21ffc59 100644
--- a/ftplugin/hackernews.py
+++ b/ftplugin/hackernews.py
@@ -155,7 +155,7 @@ def link(external=False):
bwrite("")
if item['type'] == "comment":
item['level'] = 0
- print_comments([item,])
+ print_comments([item])
else:
print_comments(item['comments'])
# Highlight OP username in comment titles
@@ -211,7 +211,7 @@ def link(external=False):
else:
bwrite(item['time_ago'])
if 'url' in item:
- bwrite("[http://news.ycombinator.com/item?id=" + str(id) + "]")
+ bwrite("[http://news.ycombinator.com/item?id=%s]" % id)
if 'content' in item:
bwrite("")
print_content(item['content'])
@@ -219,7 +219,7 @@ def link(external=False):
bwrite("")
if item['type'] == "comment":
item['level'] = 0
- print_comments([item,])
+ print_comments([item])
else:
print_comments(item['comments'])
# Highlight OP username in comment titles
@@ -307,7 +307,8 @@ def print_content(content):
def print_comments(comments, level=0):
for comment in comments:
bwrite("%sComment by %s %s:"
- % ("\t"*level, comment.get('user', '???'), comment['time_ago']))
+ % (" "*level*4, comment.get('user', '???'),
+ comment['time_ago']))
for p in comment['content'].split("<p>"):
if not p:
continue