Closed waderyan closed 5 years ago
Is super mapped to ctrl or alt? Surely they don't bind win+<num>
super is win or cmd
@waderyan just looked, I don't see any super
in the default keybindings on Windows. Is the above the OSX version?
(Hopefully) new VSCode convert here! One of my most used commands in sublime is shift
+ cmd
+ l
which sublimes calls 'Split into Lines' (under "Selection" menu).
It creates a new cursor for each line of a given selection. Does this functionality exist in VSCode? I cannot see it in the list of missing bindings @waderyan compiled above, but I also cannot seem to find it in VSCode.
@JamesHenry not sure how I missed that one. Added now. I don't know of an equivalent command in VS Code.
Great, thanks. Consider this my +1 :)
@JamesHenry In vscode we can used:
cmd + i and
option + shift + i
But I'm very much like the shortcut key to Sublime Text.
Ah, awesome thanks @yisibl!
Yeah, I have just made it my first ever shortcut override :D
By the way, VS Code not support cmd + j
It would be awesome if we have all these in vscode :+1:
@kabirbaidhya you can install the Sublime Keymap extension that @waderyan built right now. If you find any issues you can file them to the repo https://github.com/Microsoft/vscode-sublime-keybindings/issues
My #1 most used sublime shortcut is:
Ctrl + ⇧ + ↑ Move line/selection up Ctrl + ⇧ + ↓ Move line/selection down
Any chance of adding these to the extension?
I wrote an implementation of Join Lines and Transpose (and some other Sublime commands) which are more faithful to how Sublime implements them:
https://marketplace.visualstudio.com/items?itemName=Zarel.sublime-commands
I generally don't think it's a big deal to copy another editor's behavior exactly, but in this case, the main difference is that Sublime's behavior is less buggy. Specifically:
If you agree that these are better, could you update the readme in https://github.com/Microsoft/vscode-sublime-keybindings and this issue to refer to those?
Also: Would you be opposed to pull requests adding these features directly into VS Code itself? These features are presumably broadly useful enough to be built-in to Sublime, and then we wouldn't need to install extensions to get access to them.
@nnur I have been itching for the same thing. Transpose sort of does it, but not the way we're used to.
:+1: to @Zarel's sublime-commands. The behavior for joining lines and adding cursors to selected lines are closer to Sublime Text's.
Please also add the crtl + click to add a new cursor.
BTW great work with the extension!
@claudio4 added!
To all - any thoughts on prioritizing the above table? I think join lines is high, followed by ctrl+click to add new cursor. From my experience, I really miss paste and indent. More feedback is appreciated. We have working through a couple of these on our iteration plan for this month.
@waderyan for #9415, we already have all support.
FWIW, the two main Sublime features I would terribly miss are:
Project > Quick Switch Project
)(But, of course, it is are more about missing functionality than just missing shortcuts.)
Hi, tell me please, i'm binding moving up and down on shortcuts (like alt+j, alt+k), in sublime i can moving up and down with this hotkeys when suggestion menu is open (or another menu). Can i realize it in VS ?
@gkalpak I recommend checking out one of the project manager extensions for that, I use Git Project Manager personally.
Hot exit is coming in the next version, see #101
@Omen-X that is not currently supported, but I have added it to my list.
@Tyriar, awesome to see hot-exit making it into VSCode 👍 :dancing_men:
Git Project Manager is pretty nice actually, but I miss a more flexible "project" abstraction (mainly for multi-directory projects). Fortunately, it is on the roadmap (and I can leave without it for a while :smiley:).
#AboutToSwitch
:+1:, FYI @gkalpak multiple folder workspaces is tracked in https://github.com/Microsoft/vscode/issues/396
FYI there is a PR out to add functionality here - https://github.com/Microsoft/vscode/pull/15787
Can a shortcut be added to toggle case along with upper and lowercase, as this makes life easier to have just one shortcut to toggle case.
Which is what IDEA follows
@thekalinga that is in the PR mentioned above 👍
Hi,
I see only these two
Upper case https://github.com/Microsoft/vscode/issues/14096 Lower case https://github.com/Microsoft/vscode/issues/14096
What I was asking is to have an action that can toggle. i.e if the shortcut is ctrl+t
, this toggles the current selection to uppercase by default, if you press it again, the selected text would be converted to lowercase.
This is how things are handled in IntelliJ
Can u please confirm
Thanks
@thekalinga thanks for the clarification. Can you open a separate issue for that? This issue is specific to keyboard shortcuts in Sublime Text. Sublime Text has separate commands for upper and lower case.
Sure. I'll open one for that.
The reason why I added a comment here is because since upper & lower are getting implemented, it would be easy for contributors to make the change in one shot.
Thanks in anycase
@thekalinga makes sense. Thanks for your feedback!
Note that we closed on some of these issues for VS Code 1.8 release.
Your join lines implementation doesn't work the same way Sublime does when text is selected, and neither does your transpose implementation. :( The join lines difference is minor, but are you open to pull requests changing Transpose?
@Zarel we are definitely open to pull requests. The reason that you are seeing differences is
If you'd like to file pull requests, please describe what kind of behavior in your new implementation and why you think it's better or more reasonable than the original one. Thanks!
@rebornix There still exists a Sublime Text 3 behavior VS Code doesn't mimic.
Sublime Text 3 will, if some selections aren't empty, transpose the selections, putting the contents of the first selection into the second, the second into the third, etc, and the last into the first.
For instance, if you have foo bar
, and you select foo
and bar
and do a transpose, you will have bar foo
.
The use-case is stuff like:
if (key === 'up') goUp();
if (key === 'down') goDown();
I can doubleclick on goUp
, alt+doubleclick (or cmd+doubleclick in Sublime) on goDown
, and then ctrl+t to get:
if (key === 'up') goDown();
if (key === 'down') goUp();
In general, being able to easily swap two variables or two literals is surprisingly useful. Without this, the swap is pretty annoying to do. Something like, double-click goUp, cmd+c, double-click goDown, left, cmd+v, shift+alt+right, cmd+c, click where goUp used to be (a much smaller click target than before), cmd+v. I'd often retype them rather than deal with that mess.
That's the behavior my plugin implements, and the behavior I'd like to pullreq.
@Zarel basically I like the idea. I did implement the word transposing at the beginning but since it requires more consideration about multi cursor mode so I didn't rush it in. We do have API for you to detect word boundary so it would be not difficult to add this feature, but like I said, multi cursor is kind of the monster. As you have already have implemented it in your extension, it would be awesome if you can contribute to the core.
Customize keybinding support in viewlets (see this #4557)
This is added for February via https://github.com/Microsoft/vscode/issues/4557 and https://github.com/Microsoft/vscode/issues/11517
How about ctrl +shift + d for duplicating the current line?
On Windows, Sublime Text has a very useful "keybinding" to switch editor tabs with right mouse button
+scroll wheel up/down
. I wonder how difficult it would be to add support for this?
Seems related to #3130, however there's no mention of pure mouse keybindings.
I'd like to see this: Add other column(s) to selection by click & drag: Ctrl + Shift + RightMouseBtn. -> windows hotkey
ctrl
+shift
+up
/down
https://www.jflh.ca/2016-07-10-move-lines-up-and-down-in-visual-studio-code
@RamyElkest those actually exist... they're Move Line Up
and Move Line Down
.
Edit: note that the issue is for "missing" keyboard shortcuts.
Ctrl-K/Ctrl-Y for yank on macOS.
Ctrl-K cuts to end of line Ctrl-Y yanks it back
This is ideally separate from the normal cut&paste buffer i.e. Ctrl-K followed by Cmd-V will paste the last normally cut/copied text, not the Ctrl-K buffer which can only be retrieved by Ctrl-Y
shift key down + righ mouse down + dragging, this is very useful for editing multi-lines at the same time.
i really like sublime's ⌘+T that shows a Go To File... dialog... you then start typing characters in then dialog and files that contain those characters get listed... like a very fuzzy autocomplete
super useful for heavily-foldered projects (rails, react)
edit: never mind! this shortcut is available in Sublime Text Pack!
ctrl+shift+d : duplicate selection (not the whole line) extension sublime-duplicate-text (not working on VSCode 1.17.2)
The "duplicate selection" exists in vscode. It's called copy line down
.
BTW, it copies the entire line, not only the selected text.
This is exactly what I'm talking about : duplicate selection
, not the whole line ;-)
I created an extension to port Sublime keybindings to VS Code keybindings. I made a list of all the key bindings that were missing analogous commands in VS Code.
Here is the list roughly ordered by importance. Please let me know about more I missed in the comments. If an extension exists with the functionality I added it in the far right column.
Additionally, here are other actions that are not bound to a keyboard shortcut: