Open eduardoarandah opened 5 years ago
I've managed to list all files properly with this config:
let g:ctrlp_user_command = 'rg --files "`wslpath %s`"'
wslpath
converts windows paths into linux paths
BUT when you open a file, it's opened with the "linux" path, so "/mnt/c/users/lalo/file.txt" is opened as "C:/mnt/c/users/lalo/file.txt" which is incorrect.
So... I guess there's two options:
1) given that I've changed the shell globally to use linux paths, open results with windows paths, executing wslpath function reversed, to transform it
2) not use WSL shell with ctrlp, instead of that, use native windows shell, ignoring global shell
A hint with why this config could be working:
let g:ctrlp_user_command = 'pwd && rg --files %s'
MAYBE... pwd is executed with wsl shell and the second command is executed with native windows shell....
Hi!
I'm trying to use the new Windows Subsystem for Linux with gvim (windows 10, ubuntu console)
So far, all works great using this configuration:
Using that, I can do
:!ls
or any linux command and it works great.Problem is, now CtrlP executes user command with wsl.
if you press Ctrl+p, nothing happens
This configuration doesn't work:
BUT WAIT... this other configuration works!!
(all I did was adding any dummy command before, like pwd && )
I have no idea how to debug that, I tried logging everything with:
gvim -V9vimlog.txt
but it doesn't tell me exactly what is happening when I click Ctrl + PAll I want is GVim to use the linux console in windows for everything, but I can't help myself to debug the commands run by CtrlP,
any ideas?