Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

allow searching with list-return through copen #43

Merged
merged 2 commits into from

2 participants

@0robustus1
Collaborator

Includes the following new commands:

  • SWSearchList which search the same way as SWSearch does but directly presents the user with a list of matches through copen (quickfix-list).
  • SWSL is an alias for SWSearchList
  • directly add SWS as alias for SWSearch to prevent ambiguous commands.

should successfully implement #41.

0robustus1 added some commits
@0robustus1 0robustus1 allow searching with list-return through copen
Includes the following new commands:

  - SWSearchList which search the same way as SWSearch does
    but directly presents the user with a list of matches
    through copen (quickfix-list).
  - SWSL is an alias for SWSearchList
  - directly add SWS as alias for SWSearch to prevent
    ambiguous commands.
1691127
@0robustus1 0robustus1 Merge branch 'master' into 41-present_search_list_option 8fa4a19
@0robustus1
Collaborator

As with pull-request #42 i have released a pre-version of the soywiki gem, called 0.9.8.2.pre.1.

This can again be installed with gem install soywiki --pre.

@robrechtdr

Works.

Yuup, much better like this imo!

@0robustus1 0robustus1 merged commit a901227 into from
@0robustus1 0robustus1 deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 25, 2014
  1. @0robustus1

    allow searching with list-return through copen

    0robustus1 authored
    Includes the following new commands:
    
      - SWSearchList which search the same way as SWSearch does
        but directly presents the user with a list of matches
        through copen (quickfix-list).
      - SWSL is an alias for SWSearchList
      - directly add SWS as alias for SWSearch to prevent
        ambiguous commands.
  2. @0robustus1
This page is out of date. Refresh to see the latest.
Showing with 9 additions and 3 deletions.
  1. +9 −3 lib/soywiki.vim
View
12 lib/soywiki.vim
@@ -570,13 +570,16 @@ func! s:insert_divider()
endfunc
"------------------------------------------------------------------------
" SEARCH
-func! s:wiki_search(pattern, in_this_namespace)
+func! s:wiki_search(pattern, in_this_namespace, display_list)
let pattern = (empty(a:pattern) ? @/ : a:pattern)
if a:in_this_namespace
execute printf('vimgrep/\c%s/ %s', pattern, s:page_namespace()."/*")
else
execute printf('vimgrep/\c%s/ %s', pattern, "*/*")
endif
+ if a:display_list
+ execute 'copen'
+ endif
endfunc
"------------------------------------------------------------------------
@@ -682,8 +685,11 @@ func! s:global_mappings()
command! -bar -nargs=1 -range -complete=file SWLinkAppend :<line1>,<line2>call s:extract(<f-args>, 'append', 1)
command! -bar -nargs=1 -range -complete=file SWLinkInsert :<line1>,<line2>call s:extract(<f-args>, 'insert', 1)
- command! -bar -nargs=1 SWSearch :call s:wiki_search(<f-args>, 0)
- command! -bar -nargs=1 SWNamespaceSearch :call s:wiki_search(<f-args>, 1)
+ command! -bar -nargs=1 SWSearch :call s:wiki_search(<f-args>, 0, 0)
+ command! -bar -nargs=1 SWS SWSearch <args>
+ command! -bar -nargs=1 SWSearchList :call s:wiki_search(<f-args>, 0, 1)
+ command! -bar -nargs=1 SWSL SWSearchList <args>
+ command! -bar -nargs=1 SWNamespaceSearch :call s:wiki_search(<f-args>, 1, 0)
autocmd BufReadPost,BufNewFile,WinEnter,BufEnter,BufNew,BufAdd * call s:highlight_wikiwords()
autocmd BufReadPost,BufNewFile,WinEnter,BufEnter,BufNew,BufAdd * call s:prep_buffer()
Something went wrong with that request. Please try again.