Skip to content

Made concealing configurable #104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 15, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions doc/notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,42 @@ name of this program is assumed to be simply 'markdown'. If you want to use a
different program for Markdown to HTML conversion, set this option to the name
of the program.

-------------------------------------------------------------------------------
The *g:notes_coneal_code* option

Setting this option stops vim-notes from hiding the characters that declare
blocks of code. In the following example, the brackets would visible in the
editor.

{{{javascript
console.log("Hello") ;
}}}

-------------------------------------------------------------------------------
The *g:notes_coneal_italics* option

Setting this option stops vim-notes from hiding the characters that declare
italic text. In the following example, the underscores would visible in the
editor.

_Italics text_

-------------------------------------------------------------------------------
The *g:notes_coneal_bold* option

Setting this option stops vim-notes from hiding the characters that declare bold
text. In the following example, the asterisks would visible in the editor.

*Bold text*

-------------------------------------------------------------------------------
The *g:notes_coneal_url* option

Setting this option stops vim-notes from hiding the protocol in urls. In the
following example, the "http://" would visible in the editor.

https://github.com/xolox/vim-notes

===============================================================================
*notes-commands*
Commands ~
Expand Down
8 changes: 4 additions & 4 deletions syntax/notes.vim
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ highlight def link notesSingleQuoted Special
highlight def link notesDoubleQuoted String

" Highlight inline code fragments (same as Markdown syntax). {{{2
if has('conceal')
if has('conceal') && !exists('g:notes_conceal_code')
syntax region notesInlineCode matchgroup=notesInlineCodeMarker start=/`/ end=/`/ concealends
highlight link notesItalicMarker notesInlineCodeMarker
else
Expand All @@ -67,7 +67,7 @@ syntax cluster notesInline add=notesInlineCode
highlight def link notesInlineCode Special

" Highlight text emphasized in italic font. {{{2
if has('conceal')
if has('conceal') && !exists('g:notes_conceal_italics')
syntax region notesItalic matchgroup=notesItalicMarker start=/\<_\k\@=/ end=/_\>\|\n/ contains=@Spell concealends
highlight link notesItalicMarker notesHiddenMarker
else
Expand All @@ -77,7 +77,7 @@ syntax cluster notesInline add=notesItalic
highlight notesItalic gui=italic cterm=italic

" Highlight text emphasized in bold font. {{{2
if has('conceal')
if has('conceal') && !exists('g:notes_conceal_bold')
syntax region notesBold matchgroup=notesBoldMarker start=/\*\k\@=/ end=/\S\@<=\*/ contains=@Spell concealends
highlight link notesBoldMarker notesHiddenMarker
else
Expand All @@ -97,7 +97,7 @@ highlight def link notesTextURL notesSubtleURL
execute printf('syntax match notesRealURL @%s@', g:xolox#notes#url_pattern)
syntax cluster notesInline add=notesRealURL
highlight def link notesRealURL notesSubtleURL
if has('conceal')
if has('conceal') && !exists('g:notes_conceal_url')
syntax match notesUrlScheme @\(mailto:\|javascript:\|\w\{3,}://\)@ contained containedin=notesRealURL conceal
highlight def link notesUrlScheme notesRealURL
endif
Expand Down