summaryrefslogtreecommitdiff
path: root/ftplugin/hackernews.py
diff options
context:
space:
mode:
Diffstat (limited to 'ftplugin/hackernews.py')
-rw-r--r--ftplugin/hackernews.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/ftplugin/hackernews.py b/ftplugin/hackernews.py
index f081733..94f1a90 100644
--- a/ftplugin/hackernews.py
+++ b/ftplugin/hackernews.py
@@ -215,10 +215,12 @@ def link(external=False):
print_comments([item])
else:
print_comments(item['comments'])
+ # Prevent syntax issues in long comment threads with code blocks
+ vim.command("syntax sync fromstart")
# Highlight OP username in comment titles
if 'level' not in item:
- vim.command("syn clear Question")
- vim.command("syn match Question /%s/ contained" % item['user'])
+ vim.command("syntax clear Question")
+ vim.command("syntax match Question /%s/ contained" % item['user'])
elif url:
if external: