diff options
| author | Teddy Wing | 2014-11-23 15:21:57 -0500 |
|---|---|---|
| committer | Teddy Wing | 2014-11-23 15:21:57 -0500 |
| commit | 3f0a724625c9f3bea3cf6c5123da0fa3154cdb7a (patch) | |
| tree | e90276f0523ac2fc8183c44cb5d46debb3aa5037 /autoload/ls_grep.vim | |
| parent | deaa58fdc40cec7590b3a5eb9818a710bde865ba (diff) | |
| download | vim-ls-grep-3f0a724625c9f3bea3cf6c5123da0fa3154cdb7a.tar.bz2 | |
Move `LsGrep` function to autoload/
* Change filename to use an underscore (in order to be able to use it in
the autoload function name)
* Split the function and the command between autoload and plugin files
Diffstat (limited to 'autoload/ls_grep.vim')
| -rw-r--r-- | autoload/ls_grep.vim | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/autoload/ls_grep.vim b/autoload/ls_grep.vim new file mode 100644 index 0000000..eb4882a --- /dev/null +++ b/autoload/ls_grep.vim @@ -0,0 +1,12 @@ +function! ls_grep#LsGrep(search) + " Store :ls output + redir => ls_output + silent ls + redir END + + " Grep :ls output + let ls_output = system("echo " . shellescape(ls_output) . " | grep -i " . shellescape(a:search)) + + " Display + echo ls_output +endfunction |
