vnews 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/vnews.vim +7 -4
- data/lib/vnews/version.rb +1 -1
- metadata +2 -2
data/lib/vnews.vim
CHANGED
@@ -50,6 +50,7 @@ function! s:common_mappings()
|
|
50
50
|
nnoremap <buffer> <leader>u :call <SID>update_feed()<CR>
|
51
51
|
nnoremap <silent> <leader>? :call <SID>show_help()<cr>
|
52
52
|
command! -bar -nargs=0 VNUpdateFeed :call <SID>update_feed()
|
53
|
+
command! -bar -nargs=1 VNSearch :call s:search_items(<f-args>)
|
53
54
|
endfunc
|
54
55
|
|
55
56
|
function! s:create_list_window()
|
@@ -433,9 +434,13 @@ func! s:search_items(term)
|
|
433
434
|
" show item for top match
|
434
435
|
normal gg
|
435
436
|
call s:show_item_under_cursor(0)
|
436
|
-
|
437
|
+
for word in split(a:term, '\s\+')
|
438
|
+
call matchadd("VnewsSearchTerm", '\c' . word)
|
439
|
+
endfor
|
437
440
|
call s:focus_window(s:listbufnr)
|
438
|
-
|
441
|
+
for word in split(a:term, '\s\+')
|
442
|
+
call matchadd("VnewsSearchTerm", '\c' . word)
|
443
|
+
endfor
|
439
444
|
endfunc
|
440
445
|
|
441
446
|
"------------------------------------------------------------------------
|
@@ -468,8 +473,6 @@ func! s:show_help()
|
|
468
473
|
call system(command)
|
469
474
|
endfunc
|
470
475
|
|
471
|
-
command! -bar -nargs=1 VNSearch :call s:search_items(<f-args>)
|
472
|
-
|
473
476
|
|
474
477
|
call s:create_list_window()
|
475
478
|
call s:create_item_window()
|
data/lib/vnews/version.rb
CHANGED