summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorryanss2015-02-08 16:38:43 -0500
committerryanss2015-02-08 16:38:43 -0500
commit592caca496dda90ab5366cbec8d9d8704ee43c6e (patch)
tree0177af3bb09a288b6a72ca02a3445df9e3c2dcfe
parent7c9b0f0ae71af7bf11553bde4c09e5a0df728df6 (diff)
downloadvim-hn-592caca496dda90ab5366cbec8d9d8704ee43c6e.tar.gz
Fix #12 Force `Ignore` highlight group to be hidden
Some colorschemes (ex. Solarized) have defined the `Ignore` syntax highlight group to not be hidden so we need to make sure this group gets hidden properly in both gui and terminal environments.
-rw-r--r--syntax/hackernews.vim8
1 files changed, 8 insertions, 0 deletions
diff --git a/syntax/hackernews.vim b/syntax/hackernews.vim
index 40240ab..bc249a2 100644
--- a/syntax/hackernews.vim
+++ b/syntax/hackernews.vim
@@ -16,6 +16,14 @@ endif
" Hide hacker news item id at end of main page lines
syn match Ignore /\s\[[0-9]\{3,}\]$/
+" Make sure `Ignore` highlight group is hidden
+" Some colorschemes do not hide the `Ignore` group (ex. Solarized)
+if has('gui_running')
+ highlight Ignore guifg=bg
+else
+ highlight Ignore ctermfg=bg
+endif
+
" 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\+)/