Skip to content
Open
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
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,16 @@ Try `:help concealcursor` and `:help conceallevel` for details.

let g:vim_markdown_toc_autofit = 1

### Choose TOC window location

- `g:vim_markdown_toc_location`

Choose location of the TOC window: left or right.
By default it's `left`

let g:vim_markdown_toc_location = 'right'


### Text emphasis restriction to single-lines

- `g:vim_markdown_emphasis_multiline`
Expand Down
4 changes: 4 additions & 0 deletions after/syntax/html.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
" fix issue with less than sign https://github.com/preservim/vim-markdown/issues/138
syn clear htmlTag
syn region htmlTag start=+<[^/]+ end=+>+ fold oneline contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster

6 changes: 5 additions & 1 deletion ftplugin/markdown.vim
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,11 @@ function! s:Toc(...)
if l:window_type ==# 'horizontal'
lopen
elseif l:window_type ==# 'vertical'
vertical lopen
if exists('g:vim_markdown_toc_location') && g:vim_markdown_toc_location ==# 'right'
vertical botright lopen
else
vertical topleft lopen
endif
" auto-fit toc window when possible to shrink it
if (&columns/2) > l:header_max_len && l:vim_markdown_toc_autofit == 1
" header_max_len + 1 space for first header + 3 spaces for line numbers
Expand Down
Loading