question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to map <leader>t to CMD+P (mac)

See original GitHub issue

I want to open the file picker when I hit <leader>t.

Leader is mapped:
“vim.leader”: “,”

VS Code default mapping for the command in question: { “key”: “cmd+p”, “command”: “workbench.action.quickOpenNavigateNextInFilePicker”, “when”: “inFilesPicker && inQuickOpen” }

What should be my config?

I have tried the following and few other combination and I can’t get it to work.

  "vim.otherModesKeyBindings": [
    // file picker
    {
      "before": ["<leader>", "t"],
      "after": ["cmd+p"]
    }
  ]

Please let me know if this is even possible.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

8reactions
hmpscommented, Apr 25, 2018

This works for me:

        {
            "before": [
                "<leader>",
                "t"
            ],
            "after": [],
            "commands": [
                {
                    "command": "workbench.action.quickOpen",
                    "args": []
                }
            ]
        }

As far as I understand, the workbench.action.quickOpenNavigateNextInFilePicker is used to navigate to the next entry once the quick open pane is opened. The workbench.action.quickOpen can be used to open it.

0reactions
nerdpadcommented, Jun 7, 2018

This works for me as well. Thank you for the suggestions. I just wish these shortcuts also worked without having to open a file (global in vscode).

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Use the Vim <leader> Key - Tucker Chapman
To change the leader key to the comma , add let mapleader = “,” to your vimrc (to use the space key add...
Read more >
Vim's Leader Key (wtf is it?) - Vim Works
macOS has the command key (⌘). Vim has the <Leader> key. You type it, and then usually two or three more characters to...
Read more >
In vim, leader key won't work - Apple Support Communities
I'm using vim in terminal. And the leader key won't work. I've tried to remap it to ",", only to find it not...
Read more >
How to map mac command key in vim? - Stack Overflow
iTerm2 can do this - here I mapped command enter to :wq. enter image description here.
Read more >
CONTRACT AMENDMENT 15 AHCCCS: YH15-0001 DCS
Comprehensive Medical and Dental Program (CMDP) ... AHCCCS has remained a leader in Medicaid Managed Care through the diligent pursuit of ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found