aboutsummaryrefslogtreecommitdiff
path: root/.vim/after/autoload/gxfind.vim
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2022-04-13 22:20:44 +0800
committerGuangxiong Lin <[email protected]>2022-04-13 22:20:44 +0800
commit2ba3fc5be67f00aa43aac025866a0cf953f4b124 (patch)
treeefc96ce63562baf07cb0cff42f065f252b3034db /.vim/after/autoload/gxfind.vim
parent10a79ab1be6dcf4c68cbf137ad8292aac6c4bffb (diff)
downloaddotfiles-2ba3fc5be67f00aa43aac025866a0cf953f4b124.tar.gz
dotfiles-2ba3fc5be67f00aa43aac025866a0cf953f4b124.tar.bz2
dotfiles-2ba3fc5be67f00aa43aac025866a0cf953f4b124.zip
Implement my grep and find (vim)
Diffstat (limited to '.vim/after/autoload/gxfind.vim')
-rw-r--r--.vim/after/autoload/gxfind.vim9
1 files changed, 9 insertions, 0 deletions
diff --git a/.vim/after/autoload/gxfind.vim b/.vim/after/autoload/gxfind.vim
new file mode 100644
index 0000000..90923a8
--- /dev/null
+++ b/.vim/after/autoload/gxfind.vim
@@ -0,0 +1,9 @@
+function! gxfind#find(args)
+ let findcmd = 'find . -type f ' . a:args
+ if executable('fd')
+ let findcmd = 'fd --hidden --type f ' . a:args . ' . '
+ endif
+
+ :cexpr system(findcmd)
+endfunction
+