From c451b411134f97b9cbfc7bea57b034d28e29d351 Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Tue, 8 Jul 2014 10:40:06 +0200 Subject: [PATCH] Use location for :Toc list instead of quickfix. --- ftplugin/mkd.vim | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ftplugin/mkd.vim b/ftplugin/mkd.vim index 4744512..41787f0 100644 --- a/ftplugin/mkd.vim +++ b/ftplugin/mkd.vim @@ -302,21 +302,21 @@ function! s:Markdown_Toc(...) endif try - silent vimgrep /\(^\S.*\(\n[=-]\+\n\)\@=\|^#\+\)/ % + silent lvimgrep /\(^\S.*\(\n[=-]\+\n\)\@=\|^#\+\)/ % catch /E480/ echom "Toc: No headers." return endtry if l:window_type ==# 'horizontal' - copen + lopen elseif l:window_type ==# 'vertical' - vertical copen + vertical lopen let &winwidth=(&columns/2) elseif l:window_type ==# 'tab' - tab copen + tab lopen else - copen + lopen endif set modifiable %s/\v^([^|]*\|){2,2} #// -- 2.39.5