@@ -714,12 +714,6 @@ function! s:DoFinishingWork(qflist, keyword, searchtype, searchcmd, options, jum
714714 endif
715715
716716 redraw
717- if exists (' g:vintsearch_search_include_patterns' )
718- echom ' VIntSearch: g:vintsearch_search_include_patterns is deprecated. Please use g:vintsearch_includepatterns instead.'
719- endif
720- if exists (' g:vintsearch_search_exclude_patterns' )
721- echom ' VIntSearch: g:vintsearch_search_exclude_patterns is deprecated. Please use g:vintsearch_excludepatterns instead.'
722- endif
723717
724718 echom message
725719endfunction
@@ -946,129 +940,3 @@ function! s:get_visual_selection()
946940 let str = substitute (str, ' "' , ' \\"' , ' g' )
947941 return str
948942endfunction
949-
950-
951- " """"""""""""""""""""""""""""""""""""""""""""
952- " deprecated
953- function ! VIntSearch#SearchRawDep (keyword_and_options, cmd)
954- let dblquota_indices = []
955- for i in range (len (a: keyword_and_options ))
956- if a: keyword_and_options [i ]== #' "'
957- if i >0 && a: keyword_and_options [i - 1 ]== #' \'
958- else
959- call add (dblquota_indices, i )
960- endif
961- endif
962- endfor
963-
964- if len (dblquota_indices)== 0
965- let [keyword , options ] = s: SplitKeywordOptions (a: keyword_and_options )
966- elseif len (dblquota_indices)== 2
967- let keyword = a: keyword_and_options [dblquota_indices[0 ]:dblquota_indices[1 ]]
968- let options_raw = a: keyword_and_options [:dblquota_indices[0 ]-1 ].a: keyword_and_options [dblquota_indices[1 ]+ 1 :]
969- let [non, options ] = s: SplitKeywordOptions (options_raw)
970- else
971- echom ' VIntSearch: Only two quotation marks are allowed: ' .a: keyword_and_options
972- return
973- endif
974-
975- " echo dblquota_tokens
976- " echo keyword is_literal options
977- call s: SearchDep (keyword , a: cmd , options , 0 , 1 )
978- endfunction
979-
980- " vimmode: 'n'(normal mode), 'v'(visual selection mode)
981- " action: 'j'(jump), 'l'(list)
982- function ! VIntSearch#SearchCursorDep (cmd, vimmode, action)
983- if a: vimmode== #' n'
984- let keyword = expand (' <cword>' )
985- let options = ' -wF'
986- elseif a: vimmode== #' v'
987- let keyword = ' "' .s: get_visual_selection ().' "'
988- let options = ' -F'
989- else
990- echom ' VIntSearch: ' .a: vimmode .' : Unsupported vim mode.'
991- return
992- endif
993-
994- if a: cmd== #' find'
995- let keyword = ' *' .keyword .' *'
996- endif
997-
998- if a: action== #' j'
999- let jump_to_firstitem = 1
1000- let open_result_win = 0
1001- elseif a: action== #' l'
1002- let jump_to_firstitem = 0
1003- let open_result_win = 1
1004- else
1005- echom ' VIntSearch: ' .a: action .' : Unsupported action.'
1006- return
1007- endif
1008-
1009- call s: SearchDep (keyword , a: cmd , options , jump_to_firstitem, open_result_win)
1010- endfunction
1011-
1012- function ! s: SearchDep (keyword , cmd, options , jump_to_firstitem, open_result_win)
1013- let search_keyword = a: keyword
1014- let real_keyword = substitute (search_keyword, ' %' , ' \\%' , ' g' )
1015- let real_keyword = substitute (real_keyword, ' #' , ' \\#' , ' g' )
1016-
1017- if a: cmd== #' ctags'
1018- let qflist = s: GetCtagsQFList (real_keyword)
1019- elseif a: cmd== #' grep'
1020- let qflist = s: GetGrepQFList (real_keyword, a: options , 1 )
1021- elseif a: cmd== #' cfgrep'
1022- let qflist = s: GetGrepQFList (real_keyword, a: options , 1 , expand (' %:p' ))
1023- elseif a: cmd== #' find'
1024- let qflist = s: GetFindQFList (real_keyword, a: options )
1025- else
1026- echom ' VIntSearch: ' .a: cmd .' : Unsupported command.'
1027- return
1028- endif
1029-
1030- call s: DoFinishingWorkDep (qflist, search_keyword, a: cmd , a: options , a: jump_to_firstitem , a: open_result_win , 1 )
1031- endfunction
1032-
1033- function ! s: DoFinishingWorkDep (qflist, keyword , cmd, options , jump_to_firstitem, open_result_win, use_quickfix, ... )
1034- let numresults = len (a: qflist )
1035- if len (a: options )>0
1036- let optionstr = ' ' .a: options
1037- else
1038- let optionstr = a: options
1039- endif
1040-
1041- if a: 0 > 0
1042- let message = ' VIntSearch [Local: ' .fnamemodify (a: 1 , ' :t' ).' ] (by ' .a: cmd .optionstr.' ): ' .numresults.' results are found for: ' .a: keyword
1043- else
1044- let message = ' VIntSearch (by ' .a: cmd .optionstr.' ): ' .numresults.' results are found for: ' .a: keyword
1045- endif
1046-
1047- if numresults>0
1048- call insert (a: qflist , {' text' :message}, 0 )
1049- if a: use_quickfix
1050- call setqflist (a: qflist )
1051- else
1052- call setloclist (0 , a: qflist )
1053- endif
1054-
1055- call s: SetToCurStackLevel (a: keyword , a: cmd .optionstr, expand (' %' ), line (' .' ), getline (line (' .' )), a: qflist )
1056- call s: UncheckJumpAfterSearch ()
1057- call s: ManipulateQFWindow (a: jump_to_firstitem , a: open_result_win , g: vintsearch_qfsplitcmd , a: use_quickfix )
1058-
1059- if g: vintsearch_highlight_group !=# ' '
1060- exec ' :match ' .g: vintsearch_highlight_group .' /' .a: keyword .' /'
1061- endif
1062- endif
1063-
1064- redraw
1065- echom ' VIntSearch: Old style command (e.g., VSctags, etc) is used. Please use new style commands (e.g., VSsymbol, etc) instead.'
1066-
1067- echom message
1068- endfunction
1069-
1070- function ! VIntSearch#BuildTag ()
1071- call s: BuildTag ()
1072- echom ' VIntSearch: :VIntSearchBuildTag is deprecated. Please use :VIntSearchBuildSymbolDB instead.'
1073- endfunction
1074-
0 commit comments