VSCodeVim / VSCodeVim/Vim

Alfred snippet expansion not working

Open
#2,845 8 comments 12 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
15.2k
Forks
1.5k
Avg merge
3d 18h
Merged PRs (30d)
6

Description

Describe the bug
I use the Alfred app's snippets expansion feature where if I type a search key combination, the snippet would replace the key combination typed. This works globally in any application except for VSCode with the Vim plugin enabled.

I've tried disabling the plugin and it works fine.

To Reproduce
Steps to reproduce the behavior:

  1. In any line, type in the Alfred snippet keyword combination
  2. The snippet will appear but it does not appear correctly where it should completely override the key combination.
  3. For example when I type j;cl it should replace it and display console.log() but instead displays j;clconsole.lo

** Screen shot of the Alfred snippet expansion feature **
screen shot 2018-07-16 at 11 55 27 am

Expected behavior
Typing in the keyword should expand my snippet. In my example above I should get console.log() but instead I keep getting
j;clconsole.lo

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 0.15.0
  • VSCode version: 1.25.1
  • OS: 10.13.5
  • Alfred: 3.6.2

Additional info
There is another plugin that seems to listen for key combinations and may provide more info. There is a bug listed there that is similar:
https://github.com/neilsustc/vscode-markdown/issues/200#issuecomment-405007057

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Alfred snippet expansion in VSCode with the Vim extension enabled, then compare it with the behavior when the extension is disabled. Trace the extension's key-handling entry points and verify that a keyword such as j;cl is fully replaced by console.log() without duplicated input.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.