Comments (5)
Oh my… I'm terrible at choosing correct default keybindings for Windows / Linux. So, checking at this official list of top keybindings I see that all simple combinations are taken.
I'll set it to Shift + Ctrl + Alt + ↑/↓
. It's more complex, but it seems to be free. Unless you have a better suggestion 😄
I'll ship that with this week release, so it should come by the end of the week. In the meantime, you can override Abracadabra keybinding like all other VS Code keybinding, so hopefully it stops clashing. Sorry for that, I understand how annoying it is 😉
from abracadabra.
@nicoespeon Thanks for your quick reply... please don't change to Shift + Ctrl + Alt + ↑/↓ as that is used by Gnome desktop to change workspace! Gnome is used by all the main distributions including Ubuntu and Fedora. If you use that then Gnome overrides it, so it effectively makes the shortcut do nothing.
It's 9 am here in the UK, I see you made the change already, but I am afraid it does not work for Linux users :(
I had a look and think you can change key bindings per OS, but I have never tried this:
https://code.visualstudio.com/docs/getstarted/keybindings#_when-clause-contexts
I don't know if that would be a good idea or not, probably not as it might confuse things.
I know it is hard to decide shortcuts when they are all taken! I don't know what to suggest for move statement
. I had a look, and saw you are emulating the sublime text config? I don't think VS Code people move statements up and down :)
from abracadabra.
that is used by Gnome desktop to change workspace
Arf, damned 😆
That's fine, I didn't released it yet as I wanted to get your feedback.
So yes, it can be configured per OS. I've set a different one on MacOS (it's the one I use). I could set Shift + Ctrl + Alt + ↑/↓
for Windows, then find another one for Linux. But I'd still need to find a shortcut for Linux users…
And yeah, "move statements" has a top-level shortcut in IntelliJ and Sublime, but it was not implemented by VS Code. So people don't move statements up and down… but I think that would be cool if they could. Which is why this extension is doing—it's the "slide statements" refactoring.
But apparently, VS Code has taken all other relevant combinations for things like "duplicate the line" or "insert cursor when multicursor" 🤔
Is there any other special key on Linux that I could use? On Mac we have Cmd
, but we can't use that on Window because it's reserved for OS stuff.
If we don't have a better idea, I'll fallback to something like Shift + Alt + U / D
for Linux 🤷♂
Re-opening the issue until a solution is found.
from abracadabra.
It is a real shame that the VS Code moveLines
actions don't just move the whole statement. I have no idea why anyone would want to move just a line, this would be a good pull request for the editor.
Not sure what shortcut would be good I am afraid, no special Linux key comes to mind, Shift + Alt + U / D
would be as good as anything else I guess.
from abracadabra.
this would be a good pull request for the editor
I think so indeed. I want to improve the UX of "move statements" before suggesting the feature to the main repo. Also, I'm not sure that would be integrated soon considering some related issues are more than 1 year old: microsoft/vscode#54829
So I went for Alt + Shift + U / D
as Alt & Shift are easier to press than Ctrl & Shift. Also, I think U / D is a good compromise for Up and Down.
from abracadabra.
Related Issues (20)
- Automatically "Convert to Template String" if we write ${} in a string HOT 2
- Abracadabra does not play nice with cursorless HOT 29
- Inlining JSX removes curly braces HOT 1
- Extract refactoring runs on JSX attribute HOT 3
- Inline async arrow function misses braces HOT 1
- Abracadabra replaces system key binding HOT 3
- Extract Variable insert position doesn't right HOT 2
- change activationEvent to onLanguage
- Idea: Migrate to TypeScript plugin HOT 4
- "Change Signature" doesn't work on a nested function HOT 3
- "Add explicit type" refactoring HOT 1
- Inline variable if ternary misses parens HOT 5
- split declaration & init when working inside class
- JS and TS code without `;` is broken after refactoring HOT 3
- Abracadabra extension causes performance issues with other extensions (prettier formatting, etc.) HOT 7
- More inline variable missing parentheses edge-cases HOT 1
- Can't move class to an existing file HOT 2
- Move to new file: configure case of the new filename HOT 3
- Upgrade babel/traverse ti eliminate vulnerability. HOT 1
- Convert to Arrow Function: Does not work with a `export default function` HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from abracadabra.