Created
September 28, 2023 00:19
-
-
Save cherryramatisdev/06463e55a01e1e3f5c2e08a0cd8fd86c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! project#Switch(path) abort | |
if tabpagenr('$') == 1 | |
%bd | |
endif | |
execute 'cd ' . a:path | |
execute 'Dirvish' | |
endfunction | |
function! project#ListProjects(arg,cmdline,curpos) abort | |
let l:repos_dir = expand('~/Repos/*') | |
let l:directories = extend(systemlist('ls -d ~/Repos/*'), [expand('~/.vim')]) | |
if a:arg->len() > 0 | |
return l:directories->matchfuzzy(a:arg) | |
else | |
return l:directories | |
endif | |
endfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment