Vim: Support for breadcrumbs

Created on 22 Aug 2018  路  1Comment  路  Source: VSCodeVim/Vim

The 1.26 release introduced breadcrumbs. Would it be possible to add navigation support for this new feature?

kinfeature

Most helpful comment

For anyone who wasn't aware, you first need to enable breadcrumbs.enabled. I wasn't sure how to navigate them (without this plugin). On OS X, you can press Cmd+Shift+. to open the breadcrumbs for the current file. I found you can then press Option+Left to choose parent directory breadcrumbs.

If this plugin were to do anything, I'd think it would be using H/J/K/L to navigate the list, and maybe Shift+H and Shift+L to navigate breadcrumb items (folders). It would need to override find-as-you-type also, and maybe then allow find-as-you-type if you press F?

You can get pretty reasonable hotkeys if you don't mind using Cmd+Shift:

  {
    "key": "cmd+shift+h",
    "command": "breadcrumbs.focusPrevious",
    "when": "breadcrumbsActive && breadcrumbsVisible"
  },
  {
    "key": "cmd+shift+l",
    "command": "breadcrumbs.focusNext",
    "when": "breadcrumbsActive && breadcrumbsVisible"
  },
  {
    "key": "cmd+shift+j",
    "command": "list.focusDown",
    "when": "listFocus && !inputFocus"
  },
  {
    "key": "cmd+shift+k",
    "command": "list.focusUp",
    "when": "listFocus && !inputFocus"
  },
  {
    "key": "cmd+shift+.",
    "command": "breadcrumbs.focusAndSelect",
    "when": "breadcrumbsVisible"
  },
  {
    "key": "cmd+shift+;",
    "command": "breadcrumbs.focus",
    "when": "breadcrumbsVisible"
  },
  • Press cmd+shift+. to make the breadcrumbs visible
  • Press cmd+shift+h to select parent folder breadcrumbs
  • Let go of cmd+shift and type some characters to find in the list
  • Press enter to jump to that file/location

You can also use cmd+shift+; to select breadcrumbs without the dropdown immediately visible, which allows arrow key navigation of breadcrumbs at least without these mappings.

>All comments

For anyone who wasn't aware, you first need to enable breadcrumbs.enabled. I wasn't sure how to navigate them (without this plugin). On OS X, you can press Cmd+Shift+. to open the breadcrumbs for the current file. I found you can then press Option+Left to choose parent directory breadcrumbs.

If this plugin were to do anything, I'd think it would be using H/J/K/L to navigate the list, and maybe Shift+H and Shift+L to navigate breadcrumb items (folders). It would need to override find-as-you-type also, and maybe then allow find-as-you-type if you press F?

You can get pretty reasonable hotkeys if you don't mind using Cmd+Shift:

  {
    "key": "cmd+shift+h",
    "command": "breadcrumbs.focusPrevious",
    "when": "breadcrumbsActive && breadcrumbsVisible"
  },
  {
    "key": "cmd+shift+l",
    "command": "breadcrumbs.focusNext",
    "when": "breadcrumbsActive && breadcrumbsVisible"
  },
  {
    "key": "cmd+shift+j",
    "command": "list.focusDown",
    "when": "listFocus && !inputFocus"
  },
  {
    "key": "cmd+shift+k",
    "command": "list.focusUp",
    "when": "listFocus && !inputFocus"
  },
  {
    "key": "cmd+shift+.",
    "command": "breadcrumbs.focusAndSelect",
    "when": "breadcrumbsVisible"
  },
  {
    "key": "cmd+shift+;",
    "command": "breadcrumbs.focus",
    "when": "breadcrumbsVisible"
  },
  • Press cmd+shift+. to make the breadcrumbs visible
  • Press cmd+shift+h to select parent folder breadcrumbs
  • Let go of cmd+shift and type some characters to find in the list
  • Press enter to jump to that file/location

You can also use cmd+shift+; to select breadcrumbs without the dropdown immediately visible, which allows arrow key navigation of breadcrumbs at least without these mappings.

Was this page helpful?
0 / 5 - 0 ratings