From 217cd1fb3180eb5650280a6b1a62eac61f7f08f7 Mon Sep 17 00:00:00 2001 From: DarkWiiPlayer Date: Thu, 23 Aug 2018 10:58:18 +0200 Subject: [PATCH] Add List command Searches for a pattern and adds all occurrences to the location list --- vimrc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vimrc b/vimrc index 9fafd6b..03bebbc 100644 --- a/vimrc +++ b/vimrc @@ -261,6 +261,8 @@ function! MatchingLinesDict(pattern) silent! exec "g/".a:pattern."/ call s:mld_helper(list, a:pattern)" return list endfunc +com! -nargs=1 List call setloclist(0, MatchingLinesDict()) + \ | lopen function! LocationAddLineCol(filename, lnum, text, col) call setloclist(0, [{'filename': a:filename, 'lnum': a:lnum, 'desc': a:text, 'col': a:col}], 'a')