coc-explorer icon indicating copy to clipboard operation
coc-explorer copied to clipboard

Key Bindings - Not Working Properly - gotoParent

Open rbharathkumar opened this issue 3 years ago • 5 comments

Hi, I am currently using the stable version of neovim 0.4.4 in Windows 10. Installed via scoop. Followed steps to install coc.nvim and the coc-explorer. I am facing issues with a couple of items.

  1. When I cd into a folder, I am not able to get to the parent directory. 1.1. I uninstalled and tried the default config again. 1.2. I have tried setting keybindings with and without the wait option. "<bs>": ["wait", "gotoParent"] 1.3. I have restarted coc using the CocRestart option.

Please find my coc-settings as of now.

1 // coc-settings.json
 2 {
 3         "explorer.icon.enableNerdfont": true,
 4         "explorer.icon.enableVimDevicons": false,
 5         "explorer.width": 30,
 6         "explorer.quitOnOpen": true,
 7         "explorer.position": "left",
 8         "explorer.file.showHiddenFiles": true,
 9         "explorer.openAction.strategy": "tab"
10 }

I only have one mapping in my init.vim file :nnoremap e :CocCommand explorer<CR>

Kindly let me know for any further information.

rbharathkumar avatar May 15 '21 11:05 rbharathkumar

I cannot reproduce this issue in windows 10 and nvim4.4. What terminal do you use? Also, have you configured the nerdfont correctly?

weirongxu avatar May 16 '21 06:05 weirongxu

Thank you for your response. I am using the Windows Terminal running powershell. Maybe below steps to reproduce may help ?

  1. Software installation scoop install neovim scoop install nodejs npm install -g neovim
  2. Update the init.vim file and PlugInstall. Plug 'neoclide/coc.nvim', {'branch': 'release'} PlugInstall
  3. Install coc-explorer :CocInstall coc-json :CocInstall coc-explorer
  4. Update the coc-settings.json
// coc-settings.json
{
	"explorer.icon.enableNerdfont": true,
	"explorer.icon.enableVimDevicons": true,
	"explorer.width": 30,
	"explorer.quitOnOpen": true,
	"explorer.position": "left",
	"explorer.file.showHiddenFiles": true,
	"explorer.openAction.strategy": "tab"
}

Issue is as below.

  1. Pressing Enter - changes my directory as expected.
  2. But when I press Backspace - I am unable to cd back to the parent directory or even collapse back to the parent directory.
  3. When <BS> is pressed from Directory - the cursor goes to the last character of parent directory - refer Screenshot below Backspace_From_Directory
  4. When <BS> is pressed from File- the cursor goes to the last character of previous line- usually the size of that file - refer Screenshot below Backspace_From_File

This basically prevents me to moving to any other directory apart from the one I am currently in. Especially difficult when I am working with multi-level directories. 5. Kindly let me know if you need any further information. Please ignore the comments about the devicons - on reinstallation it worked fine.

rbharathkumar avatar May 16 '21 08:05 rbharathkumar

I can reproduce this in nvim 4.4 with Powershell.

Seems in this environment the <bs> doesn't work at all, but nvim 5.0 is working fine.

weirongxu avatar May 16 '21 11:05 weirongxu

You can switch to another version of nvim, or use explorer.keyMappings.global to use other keys...

weirongxu avatar May 16 '21 11:05 weirongxu

ok thank you for your efforts. I would appreciate if you can make a note of it in the readme or somewhere.. Kind of spent a lot of time researching before filing the bug. Thank you once again for all the wonderful work - I hope it gets fixed soon.

rbharathkumar avatar May 16 '21 13:05 rbharathkumar