You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
set shell=C:\Windows\Sysnative\wsl.exe
set shellpipe=|
set shellredir=>
set shellcmdflag=--
set shellslash
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:
let g:ctrlp_user_command = 'rg --files %s'
let g:ctrlp_use_caching = 1
let g:ctrlp_working_path_mode = 'ra'
let g:ctrlp_switch_buffer = 'et'
BUT WAIT... this other configuration works!!
(all I did was adding any dummy command before, like pwd && )
let g:ctrlp_user_command = 'pwd && rg --files %s'
let g:ctrlp_use_caching = 1
let g:ctrlp_working_path_mode = 'ra'
let g:ctrlp_switch_buffer = 'et'
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 + P
All 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?
The text was updated successfully, but these errors were encountered:
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:
given that I've changed the shell globally to use linux paths, open results with windows paths, executing wslpath function reversed, to transform it
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 + P
All 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?
The text was updated successfully, but these errors were encountered: