1
0
Fork 0

Suda support for CDC

This commit is contained in:
Vivianne 2022-03-09 00:02:50 -08:00
parent c5f70a427a
commit 04d97575a7
1 changed files with 9 additions and 1 deletions

View File

@ -97,7 +97,15 @@ nnoremap <leader>fq <cmd>Telescope quickfix<cr>
nnoremap <leader>fc <cmd>Telescope command_history<cr>
nnoremap <leader>fs <cmd>Telescope search_history<cr>
command CDC cd %:p:h
function! StripSuda(p)
return substitute(a:p, 'suda://', '', '')
endfunction
function! ChangeCurDir()
execute 'cd ' . StripSuda(expand('%:p:h'))
endfunction
command CDC execute "cd " . StripSuda(expand('%:p:h'))
let g:lt_location_list_toggle_map = '<leader>l'
let g:lt_quickfix_list_toggle_map = '<leader>L' " unsure if I'm using this