Mimic sublime-text behaviour. Fixes #3, Fixes #4#5
Conversation
|
Looking forward to this PR to be merged! :) How could your fork be used as an extension for now? Is this sth VScode allows? |
|
Yes, you can remove ContextualDuplicate from vscode and git-clone my fork in extensions folder (~/.vscode/extensions) I can understand why @lafe is not thrilled to maintain code he mostly not write himself... Also, I think this behaviour should be native in vscode ! |
|
Just tried to remove original extension and clone yours in the specified folder. The extension appears in the list (in green btw), but when running command, I'm getting the error PS. Thumbed up ;) |
|
Ho yeah, it's written in TypeScript, you should run |
|
It worked, thanks! For others, don't forget to checkout the right branch before running above commands: https://github.com/zo/ContextualDuplicate/tree/st-like |
|
Looks like this hasn't merged, I found this extension that provides this functionality: https://marketplace.visualstudio.com/items?itemName=kkapsner.duplicateselection#review-details |
Step by step for anyone who wants to get this workingFirst, uninstall ContextualDuplicate cd ~/.vscode/extensions
git clone https://github.com/zo/ContextualDuplicate
cd ContextualDuplicate
git checkout st-like
npm install
npm run vscode:prepublishThen open keybindings.json and add this to map it to ctrl+shift+d {
"key": "ctrl+shift+d",
"command": "lafe.duplicateCode"
}all done! |
|
This worked for me: Then like @blunket And then |
Could break habits for a few, but bring back sublime-text and atom duplications for the vast majority of us.