Permalink
Browse files

make search term minimum length configurable

  • Loading branch information...
alexluecke committed Feb 25, 2018
1 parent 4db4903 commit 0aced9137e7614017b57cd4738b0cad2e9756449
Showing with 6 additions and 2 deletions.
  1. +2 −0 README.md
  2. +2 −2 autoload/tsuquyomi.vim
  3. +2 −0 plugin/tsuquyomi.vim
View
@@ -135,6 +135,8 @@ If you want where an interface is implemented, use `:TsuImplementation`.
#### Keyword search
Call the Ex command `:TsuSearch {keyword}` to get the list of locations which contain the keyword. This command searches the keyword from opened or referenced files in your project.
The search term minimum length can be configured with `let g:tsuquyomi_search_term_min_length = 3`.
#### Disable default mappings
If you do not want to use the above key mappings please add `let g:tsuquyomi_disable_default_mappings = 1` to your `.vimrc` file.
View
@@ -857,8 +857,8 @@ endfunction
" #### Navto {{{
function! tsuquyomi#navto(term, kindModifiers, matchKindType)
if len(a:term) < 3
echom "[Tsuquyomi] search term's length should be greater than 3."
if len(a:term) < g:tsuquyomi_search_term_min_length
echom "[Tsuquyomi] search term's length should be greater than ".g:tsuquyomi_search_term_min_length."."
return [[], 0]
endif
View
@@ -68,6 +68,8 @@ let g:tsuquyomi_use_vimproc =
\ get(g:, 'tsuquyomi_use_vimproc', 0)
let g:tsuquyomi_locale =
\ get(g:, 'tsuquyomi_locale', 'en')
let g:tsuquyomi_search_term_min_length =
\ get(g:, 'tsuquyomi_search_term_min_length', 3)
" Global options defintion. }}}
" augroup tsuquyomi_global_command_group

0 comments on commit 0aced91

Please sign in to comment.