aboutsummaryrefslogtreecommitdiffstats
path: root/ls-grep.vim
diff options
context:
space:
mode:
authorTeddy Wing2014-11-23 12:54:12 -0500
committerTeddy Wing2014-11-23 12:54:12 -0500
commit0628f6a9f2567d3a25c9088123c9195877915a4b (patch)
tree22aa8d9c78f3cde7e86a7acc7b5775f67cadfb85 /ls-grep.vim
downloadvim-ls-grep-0628f6a9f2567d3a25c9088123c9195877915a4b.tar.bz2
Initial commit. Proof of concept.
Get :ls output and grep it.
Diffstat (limited to 'ls-grep.vim')
-rw-r--r--ls-grep.vim12
1 files changed, 12 insertions, 0 deletions
diff --git a/ls-grep.vim b/ls-grep.vim
new file mode 100644
index 0000000..c369c1d
--- /dev/null
+++ b/ls-grep.vim
@@ -0,0 +1,12 @@
+function! LsGrep()
+ redir => ls_output
+ silent ls
+ redir END
+
+ let ls_output = system("echo " . shellescape(ls_output) . " | grep " . "ls")
+
+ echo ls_output
+endfunction
+
+
+call LsGrep()