Skip to content

Instantly share code, notes, and snippets.

@kshenoy
Created March 23, 2014 07:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kshenoy/9719890 to your computer and use it in GitHub Desktop.
Save kshenoy/9719890 to your computer and use it in GitHub Desktop.
Find all the lines that contain the search term and display them in the location lis
function! myFunctions#FindAndList()
let term = input("Find: /")
let v:errmsg = ""
if term == ""
term = expand('<cword>'))
endif
if v:errmsg == ""
execute "lvimgrep! /" . term . "/ " . fnameescape(expand('%:p'))
lopen
endif
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment