Navigate to Explorer File view from keyboard

Hello, I am using Cursor with VIM keybindings. So far so good!

The one thing I don’t yet know how to to do is to focus the cursor into the file tree explorer instead of using my mouse. I have already tried Control + H which would normally do that in Neovim running the LazyVim distro.

My initial searches online and in this forum didn’t find any results on the matter.

Thanks in advance!

I think you can just use <C-w>h, <C-w>j, <C-w>h=k and <C-w>l; to navigate to and from the splits you have.

I normally map <C-h> to <C-w>h to save one keystroke but I couldn’t figure out a way of doing this purely with vim(neovim and neovim extension in my case)

I got the same functionality that I am used to with the below mappings in the keybinding.json file

  {
    "key": "ctrl+h",
    "command": "workbench.action.navigateLeft"
  },
  {
    "key": "ctrl+l",
    "command": "workbench.action.navigateRight"
  },
  {
    "key": "ctrl+k",
    "command": "workbench.action.navigateUp"
  },
  {
    "key": "ctrl+j",
    "command": "workbench.action.navigateDown"
  },

I support this with the following to get a similar experience with my keymappings in file tree plugins.

{
    "key": "\\",
    "command": "explorer.openToSide",
    "when": "explorerViewletFocus && explorerViewletVisible && !inputFocus"
  },
1 Like

Thank you, I will give this a shot when I have free time!
It’s like the only thing keeping me from using my trackpad.

Other than pasting this in the keybindings.json and restarting Cursor is there anything else I need to do to activate these?

Hard to say without knowing your setup but I think the above user keymaps should work even if you do not use neovim/vim on vscode. As you see in the screenshot below, this is a user level keymap while the neovim extension below is coming from the plugin.

One thing to note here is you need to set the activity bar orientation to vertical for these to work.

Are you using { import = “lazyvim.plugins.extras.vscode” } in lazy.lua?