Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Howto: call snippets with vscodevim keybindings? #4565

Closed
sql-koala opened this issue Feb 19, 2020 · 0 comments
Closed

Howto: call snippets with vscodevim keybindings? #4565

sql-koala opened this issue Feb 19, 2020 · 0 comments

Comments

@sql-koala
Copy link
Contributor

sql-koala commented Feb 19, 2020

Hi, can another help me with this? I want to create keybindings to call snippets from visual mode.
I start with an example from here: https://code.visualstudio.com/docs/editor/userdefinedsnippets

{
  "key": "ctrl+k 1",
  "command": "editor.action.insertSnippet",
  "when": "editorTextFocus",
  "args": {
    "langId": "sql",
    "name": "min"
  }
}

(I tested this ^^ call, it works).

Here is an example that shows a keybinding calling a vscode command with args. But I could not adapt it.
https://github.com/VSCodeVim/Vim

"vim.visualModeKeyBindingsNonRecursive": [
        {
            "before": [
                "<leader>", "v", "i", "m"
            ],
            "commands": [
                {
                    "command": "git.clone",
                    "args": [ "https://github.com/VSCodeVim/Vim.git" ]
                }
            ]
        }
    ]

Any help? My experience with json is copy + paste + try ;-)

I'll leave this open for a few days to see if i get help.

@sql-koala sql-koala changed the title Howto: call snippets with vscodevim keybindings Howto: call snippets with vscodevim keybindings? Feb 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant