Skip to content

Commit 9137f89

Browse files
committed
Delete deprecated features from 1.3.0.
1 parent 7263183 commit 9137f89

File tree

3 files changed

+5
-168
lines changed

3 files changed

+5
-168
lines changed

autoload/VIntSearch.vim

Lines changed: 0 additions & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -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
725719
endfunction
@@ -946,129 +940,3 @@ function! s:get_visual_selection()
946940
let str = substitute(str, '"', '\\"', 'g')
947941
return str
948942
endfunction
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-

doc/VIntSearch.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,11 @@ Default: >
463463
==============================================================================
464464
11. Changelog *VIntSearch-changelog*
465465

466+
1.4.0 2016/04/28
467+
- Support MS Windows
468+
- Improve handling exceptional cases
469+
- Add VIntSearch#SearchCursorWithCmd()
470+
- Delete deprecated features from 1.3.0.
466471
1.3.1 2015/10/30
467472
- Bug fix for find option used by VSfile & VSbuild
468473
1.3.0 2015/08/02

plugin/VIntSearch.vim

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,6 @@ if !exists('g:vintsearch_findcmd_path')
7272
let g:vintsearch_findcmd_path = 'find'
7373
endif
7474

75-
"" deprecated global variables
76-
if exists('g:vintsearch_search_include_patterns')
77-
let g:vintsearch_includepatterns = g:vintsearch_search_include_patterns
78-
endif
79-
if exists('g:vintsearch_search_exclude_patterns')
80-
let g:vintsearch_excludepatterns = g:vintsearch_search_exclude_patterns
81-
endif
82-
8375
"" autocmd
8476
augroup VIntSearchAutoCmds
8577
autocmd!
@@ -158,34 +150,6 @@ command! -nargs=1 VScc call VIntSearch#Cc(<args>, 1)
158150
command! VScnext call VIntSearch#Cnext(1)
159151
command! VScprev call VIntSearch#Cprev(1)
160152

161-
"""""""""""""""""
162-
" deprecated - will be removed in version 1.4.0
163-
164-
command! -complete=tag -nargs=1 VIntSearchCtags call VIntSearch#SearchRawDep(<f-args>,'ctags')
165-
command! -complete=tag -nargs=1 VSctags call VIntSearch#SearchRawDep(<f-args>,'ctags')
166-
167-
" You can put grep options into <f-args>
168-
" ex) :Vsgrep -i tags
169-
" :Vsgrep tags -i
170-
" :Vsgrep -i "let tags"
171-
" :Vsgrep "let tags" -i
172-
command! -complete=tag -nargs=1 VIntSearchGrep call VIntSearch#SearchRawDep(<f-args>,'grep')
173-
command! -complete=tag -nargs=1 VSgrep call VIntSearch#SearchRawDep(<f-args>,'grep')
174-
175-
command! -complete=tag -nargs=1 VIntSearchCFGrep call VIntSearch#SearchRawDep(<f-args>,'cfgrep')
176-
command! -complete=tag -nargs=1 VScfgrep call VIntSearch#SearchRawDep(<f-args>,'cfgrep')
177-
178-
command! -complete=tag -nargs=1 VIntSearchFind call VIntSearch#SearchRawDep(<f-args>,'find')
179-
command! -complete=tag -nargs=1 VSfind call VIntSearch#SearchRawDep(<f-args>,'find')
180-
181-
command! -complete=tag -nargs=* VIntSearchCtagsCursor call VIntSearch#SearchCursorDep('ctags',<f-args>)
182-
command! -complete=tag -nargs=* VIntSearchGrepCursor call VIntSearch#SearchCursorDep('grep',<f-args>)
183-
command! -complete=tag -nargs=* VIntSearchCFGrepCursor call VIntSearch#SearchCursorDep('cfgrep',<f-args>)
184-
command! -complete=tag -nargs=* VIntSearchFindCursor call VIntSearch#SearchCursorDep('find',<f-args>)
185-
186-
command! VIntSearchBuildTag call VIntSearch#BuildTag()
187-
command! VSbtag call VIntSearch#BuildTag()
188-
189153
"""""""""""""""""""""""""""""""""""""""""""""
190154
let &cpo= s:keepcpo
191155
unlet s:keepcpo

0 commit comments

Comments
 (0)