aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2018-04-07 15:15:33 +0200
committerTeddy Wing2018-04-07 15:15:33 +0200
commit335e80b618f5fd7667c12ec3c0da8baa39430e3f (patch)
tree625be9415bdb57320b36d6490be78633d157656e
parenta4dc3a953586e70d12a401385f3ce516d2d27d37 (diff)
downloadvim-tabs-grep-335e80b618f5fd7667c12ec3c0da8baa39430e3f.tar.bz2
s:MatchString(): Fix line continuation problem
I had had trouble with the line continuation in this function, but it turns out what I had written the first time was fine. It's just that I was sourcing my plugin incorrectly and that's the reason why I was getting errors. Before I was doing: $ vim --cmd 'so ~/Documents/Development/vim-tabs-grep/plugin/tabs_grep.vim' -p bin/imagebin.ca.sh bin/fucking-orange.sh functions/frequency w3m-tabs.exp Using the `-c` flag instead completely fixed the problem: $ vim -c 'so ~/Documents/Development/vim-tabs-grep/plugin/tabs_grep.vim' -p bin/imagebin.ca.sh bin/fucking-orange.sh functions/frequency w3m-tabs.exp Revert back to the original code in this function.
-rw-r--r--plugin/tabs_grep.vim17
1 files changed, 2 insertions, 15 deletions
diff --git a/plugin/tabs_grep.vim b/plugin/tabs_grep.vim
index f7ce1b2..8b98f1b 100644
--- a/plugin/tabs_grep.vim
+++ b/plugin/tabs_grep.vim
@@ -21,21 +21,8 @@ function! TabsGrep(search)
endfunction
function! s:MatchString(search, index, value)
- " let matched = match(a:value, a:search) != -1 ||
- " \ match(a:value, '\vTab page \d+') != -1
- " let matched = 0
- " \ || 1
- " return matched
- " return (
- " \
- " \ match(a:value, '\vTab page \d+') != -1
- " \ )
- " return match(a:value, a:search) != -1 ||
- " \ match(a:value, '\vTab page \d+') != -1
- echo 'test'
- echo a:search
- return 0 ||
- \ 1
+ return match(a:value, a:search) != -1 ||
+ \ match(a:value, '\vTab page \d+') != -1
endfunction
command! -nargs=1 TabsGrep :call TabsGrep(<f-args>)