summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorryanss2015-02-02 23:59:00 -0500
committerryanss2015-02-02 23:59:00 -0500
commitd6c1e11d45c1a3cc7067643eabd73994cd441c36 (patch)
tree03c7c78c61603abaede758bb710dc540692f341a
parentc392e92e1e36b0a202a8fcf417b7f8ba48e10bd6 (diff)
downloadvim-hn-d6c1e11d45c1a3cc7067643eabd73994cd441c36.tar.gz
Improve job posting format/syntax on main page
-rw-r--r--plugin/hackernews.py5
-rw-r--r--syntax/hackernews.vim1
2 files changed, 4 insertions, 2 deletions
diff --git a/plugin/hackernews.py b/plugin/hackernews.py
index 7781d72..8dc0a97 100644
--- a/plugin/hackernews.py
+++ b/plugin/hackernews.py
@@ -66,8 +66,9 @@ def hacker_news():
item['comments_count'], item['id'])
bwrite(line)
elif item['type'] == "job":
- line = "%s%d. %s [%d]"
- line %= (" " if i+1 < 10 else "", i+1, item['title'], item['id'])
+ line = "%s%d. %s (%s) [%d]"
+ line %= (" " if i+1 < 10 else "", i+1, item['title'],
+ item['domain'], item['id'])
bwrite(line)
line = "%s%s [%d]"
line %= (" "*4, item['time_ago'], item['id'])
diff --git a/syntax/hackernews.vim b/syntax/hackernews.vim
index b59dac9..d199f1a 100644
--- a/syntax/hackernews.vim
+++ b/syntax/hackernews.vim
@@ -12,6 +12,7 @@ syn match Ignore /\s\[[0-9]\{3,}\]$/
" Remove emphesis from all components of main page item except title
syn match Comment /^\s*[0-9]\{1,2}\.\s/
syn match Comment /\s(\S\+\.\S\+)/
+syn match Comment /^\s\{4}.*ago/
syn match Comment /^.*ago\s|.*comments/
" Comment titles