37 howm-mode.vim (2-15) VimGrepSearch ã®åé¤
以å VimGrepSearch() ä½ææã«ä¿®æ£ãã GrepSearch() å¼ã³åºãé¨åãåã³ä¿®æ£ã以åã®å½¢ã«è¿ããã®ã«æ»ã£ããããã§VimGrepSearch() ã¸ã®å¼ã³åºãããªããªã£ãã®ã§ãVimGrepSearch() ãåé¤ããã
" TODO: å¼æ°ãèãç´ããæ¹ããããã " " searchWordType: searchWord ã®ç¨®é¡ " 0: åºå®æåå " 1: æ£è¦è¡¨ç¾ ( grep ) " 2: æ£è¦è¡¨ç¾ ( Vim ) function! s:FullTextSearch(searchWord, searchWordType) if a:searchWord == '' | return 0 | endif call s:OpenSearchWindow(a:searchWord, a:searchWordType) let path = s:HowmExpand(a:searchWord) if !filereadable(path) || isdirectory(path) let path = '' endif if s:ParseSearchResult(s:GrepSearch(a:searchWord, a:searchWordType)) > 0 || path != '' call s:SortByMtime() " æ¤ç´¢èªã«ããããããã¡ã¤ã«ãããå ´å " TODO:æ±ããªã⦠if path != '' let i = b:searchResultNum while i >= 1 let b:file{i + 1} = b:file{i} let b:line{i + 1} = b:line{i} let b:content{i + 1} = b:content{i} let i = i - 1 endwhile let b:file1 = path let b:line1 = 0 let b:content1 = "" let b:searchResultNum = b:searchResultNum + 1 endif call s:FormatSearchResult() call cursor(1, 1) let retval = 1 else redraw! echo s:prefix_howm.s:msg_ftnomatch call s:SafeClose() let retval = 0 endif return retval endfunction