Skip to content

Commit 34541a0

Browse files
committed
Enable showing code block markers
Fixes #107
1 parent 1c652cd commit 34541a0

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ The `:NoteToHtml` command requires the [Markdown] [markdown] program. By default
128128

129129
### The `g:notes_conceal_code` option
130130

131-
By default the backticks that mark inline code snippets are hidden when your version of Vim supports concealing of text. By setting this option to zero you stop vim-notes from hiding those backticks. In the following example, the backticks would be visible in the editor when this option is set to zero:
131+
By default the backticks that mark inline code snippets and the curly quotes that mark code blocks are hidden when your version of Vim supports concealing of text. By setting this option to zero you stop vim-notes from hiding these markers. For example in the following sentence, the backticks would be visible in the editor when this option is set to zero:
132132

133133
This is a sentence with an `inline code` fragment.
134134

autoload/xolox/notes.vim

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
" Vim auto-load script
22
" Author: Peter Odding <peter@peterodding.com>
3-
" Last Change: March 15, 2015
3+
" Last Change: April 1, 2015
44
" URL: http://peterodding.com/code/vim/notes/
55

66
" Note: This file is encoded in UTF-8 including a byte order mark so
77
" that Vim loads the script using the right encoding transparently.
88

9-
let g:xolox#notes#version = '0.32'
9+
let g:xolox#notes#version = '0.33'
1010
let g:xolox#notes#url_pattern = '\<\(mailto:\|javascript:\|\w\{3,}://\)\(\S*\w\)\+/\?'
1111
let s:scriptdir = expand('<sfile>:p:h')
1212

@@ -1180,8 +1180,9 @@ function! xolox#notes#highlight_sources(force) " {{{3
11801180
let group = 'notesSnippet' . toupper(ft)
11811181
let include = s:syntax_include(ft)
11821182
for [startmarker, endmarker] in [['{{{', '}}}'], ['```', '```']]
1183+
let conceal = has('conceal') && xolox#misc#option#get('notes_conceal_code', 1)
11831184
let command = 'syntax region %s matchgroup=%s start="%s%s \?" matchgroup=%s end="%s" keepend contains=%s%s'
1184-
execute printf(command, group, startgroup, startmarker, ft, endgroup, endmarker, include, has('conceal') ? ' concealends' : '')
1185+
execute printf(command, group, startgroup, startmarker, ft, endgroup, endmarker, include, conceal ? ' concealends' : '')
11851186
endfor
11861187
endfor
11871188
if &vbs >= 1

doc/notes.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -335,10 +335,11 @@ of the program.
335335
-------------------------------------------------------------------------------
336336
The *g:notes_conceal_code* option
337337

338-
By default the backticks that mark inline code snippets are hidden when your
339-
version of Vim supports concealing of text. By setting this option to zero you
340-
stop vim-notes from hiding those backticks. In the following example, the
341-
backticks would be visible in the editor when this option is set to zero:
338+
By default the backticks that mark inline code snippets and the curly quotes
339+
that mark code blocks are hidden when your version of Vim supports concealing
340+
of text. By setting this option to zero you stop vim-notes from hiding these
341+
markers. For example in the following sentence, the backticks would be visible
342+
in the editor when this option is set to zero:
342343
>
343344
This is a sentence with an `inline code` fragment.
344345
<

0 commit comments

Comments
 (0)