weirongxu / coc-explorer

📁 Explorer for coc.nvim
MIT License
1.14k stars 45 forks source link

How to open file on the right ? #510

Closed linrongbin16 closed 2 years ago

linrongbin16 commented 2 years ago

Hi, I'm new to coc-explorer, when I use :CocCommand explorer<CR> to open explorer the first time, it's 40 width on the left. like this: image

Then I type <C-w>l to move cursor from coc-explorer window to right (No Name buffer). Then I type :q to quit buffer, then I select some file and open with <CR>, then this file is opened on the left, but I want to open it on the right, just like the first No-Name buffer:

image

How should I do that?

weirongxu commented 2 years ago

:set splitright

linrongbin16 commented 2 years ago

hi @weirongxu , set splitright seems a global vim option. I dont want to change this global. is there an option or command to do this?

weirongxu commented 2 years ago

Not supported, may need to refactor openAction.strategy to add botright vsplit or something like that

weirongxu commented 2 years ago

If you think this feature is important, you can create a feature issue

linrongbin16 commented 2 years ago

Hi, @weirongxu , I think maybe I describe my needs in a wrong way.

Actually when coc-explorer is the only window in vim, and I open a text file with <CR>. the new-opened file window is on the left (default) or on the right (use :set splitright). Then the coc-explorer window width is equal to the new-opened file window width. like this:

image

But I want coc-explorer always stay in width 40, just like nerdtree. How should I configure coc-explorer to do this?