summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ftplugin/hackernews.py4
-rw-r--r--syntax/hackernews.vim2
2 files changed, 5 insertions, 1 deletions
diff --git a/ftplugin/hackernews.py b/ftplugin/hackernews.py
index 47c798f..26cfa62 100644
--- a/ftplugin/hackernews.py
+++ b/ftplugin/hackernews.py
@@ -158,6 +158,8 @@ def link(external=False):
print_comments([item,])
else:
print_comments(item['comments'])
+ # Highlight OP username in comment titles
+ vim.command("syn match Question /%s/ contained" % item['user'])
return
# Search for [http] link
@@ -220,6 +222,8 @@ def link(external=False):
print_comments([item,])
else:
print_comments(item['comments'])
+ # Highlight OP username in comment titles
+ vim.command("syn match Question /%s/ contained" % item['user'])
return
if external:
diff --git a/syntax/hackernews.vim b/syntax/hackernews.vim
index 7525ed2..818421c 100644
--- a/syntax/hackernews.vim
+++ b/syntax/hackernews.vim
@@ -38,7 +38,7 @@ syn match Comment /^.*ago\s|.*comments/
syn match Comment /^[0-9an]\+\s.\+\sago$/
" Comment titles
-syn match Comment /^\s*Comment\sby.\+ago:$/
+syn match Comment /^\s*Comment\sby.\+ago:$/ contains=Question
" Highlight links
syn region Constant start="\[http" end="\]"