diff options
| author | ryanss | 2015-03-19 23:59:00 -0400 |
|---|---|---|
| committer | ryanss | 2015-03-19 23:59:00 -0400 |
| commit | 972baa34d26f283a10a0cc86a11ed9211ad9c949 (patch) | |
| tree | d704901ecad3a05e913143143258616801e7875f | |
| parent | 9a9109d189d2fe00d707cbf39d0ec32f016a5a27 (diff) | |
| download | vim-hn-972baa34d26f283a10a0cc86a11ed9211ad9c949.tar.gz | |
Add hidden item id links to comment header lines
| -rw-r--r-- | ftplugin/hackernews.py | 4 | ||||
| -rw-r--r-- | syntax/hackernews.vim | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/ftplugin/hackernews.py b/ftplugin/hackernews.py index 37f1e05..65938ae 100644 --- a/ftplugin/hackernews.py +++ b/ftplugin/hackernews.py @@ -253,9 +253,9 @@ def print_comments(comments, level=0): for comment in comments: if 'level' in comment: # This is a comment (not content) so add comment header - bwrite("%sComment by %s %s:" + bwrite("%sComment by %s %s: [%s]" % (" "*level*4, comment.get('user', '???'), - comment['time_ago'])) + comment['time_ago'], comment['id'])) for p in comment['content'].split("<p>"): if not p: continue diff --git a/syntax/hackernews.vim b/syntax/hackernews.vim index 390d2a3..27c41ad 100644 --- a/syntax/hackernews.vim +++ b/syntax/hackernews.vim @@ -39,7 +39,7 @@ syn match Comment /^.*ago\s|.*comments/ syn match Comment /^[0-9an]\+\s.\+\sago$/ " Comment titles -syn match Comment /^\s*Comment\sby.\+ago:$/ contains=Question +syn match Comment /^\s*Comment\sby.\+ago:/ contains=Question " Highlight links syn region Constant start="\[http" end="\]" |
