From: Ciro Santilli Date: Tue, 8 Jul 2014 08:40:06 +0000 (+0200) Subject: Use location for :Toc list instead of quickfix. X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/c451b411134f97b9cbfc7bea57b034d28e29d351?ds=sidebyside Use location for :Toc list instead of quickfix. --- 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} #//