Comments (16)
I really want to remove the defaut conflict, the problem here is what's the most convent shortcut for us to use the commands. Is ctrl+l, down, down....for selecting down, and ctrl+l, up,up... for select up ok? are there better way? what's your suggestion.
from metago.
By Ctrl+L, up
, do you mean first Ctrl+L
(then release) then up
?
Because if so, the user would need to constantly press and release Ctrl+L
before every up
to select a line up, I think this would be a little slow.
How about Alt+Shif+K
for up and Alt+Shift+J
for down instead ?
This follows the classic vim keybind for up and down.
from metago.
I'm thinking make Ctrl+L into a line comand trigger: if the user press i(means up, configurable), triggers the selecting up subcomand, in this subcomand the user can press i again or press k (mean down) several times. Ctrl+L, k is select down subcomand triger. any other key other than i,k would escape this comand. This is the idea, I would evelate the possiblility to make it happen. this also opens the possibility to make other line related subcomands, any better idea?
from metago.
from metago.
From what I understand of command triggers, we need to press the trigger (Ctrl+L
), release the keys and press the next key and release. To repeat the command, you need to do everything else again and not just the last key:
Press Ctrl+L
, release Ctrl+L
, press up
, release up
-> Select line up is ran.
Press Ctrl+L
, release Ctrl+L
, press up
, release up
-> Select line up is ran. -> press up
, release up
-> Select line up is not ran and the previous selection is removed because the user pressed up
which caused the cursor to go up (default action for up
is cursorUp
).
Press Ctrl+L
, release Ctrl+L
, press up
, release up
-> Select line up is ran. -> Press Ctrl+L
, release Ctrl+L
, press up
, release up
-> Select line up is ran again.
The forces the user to keep pressing and releasing Ctrl+L
and then pressing and releasing up
to select the line up.
But to tell you the truth, I don't really see any benefit in having this command. We can just use the normal Shift+up
to select the line up and Home
while holding Shift
to select until the start of the line.
from metago.
@Ranguna thank you for your detail description.
in vscode, we could create a command that last for a while, and when execute the command, we can read the user's key stroke and do task accordingly.
the only one problem in my idea is the escape of the command. I could make the escape occurs when user type key that is not 'i' or 'k', and also add a timeout after user press 'i' or 'k' to do escape, it's a kind of over engineering, but opens an opportunity to other line related commands(Ctrl+L, 'key'): search-in-line?.....
for now, I prefer leave this feature with a low priority.
and consider other shortcut to avoid the collision
from metago.
Yes. Maybe to quickly close this issue, you can just assign a non conflicting shortcut, then you can explore other options in the future.
As I said above, Alt+Shif+K
for up and Alt+Shift+J
for down are good for me.
from metago.
I prefer to keep use the current default setting; Ctrl+L is the default shortcut for select line down.
you could press ctrl+K, ctrl+s and search metago, find the command and assign the shortcut that you like. note: you could also right click and select delete, to remove the metago default assignment, the the defaut vscode command for ctrl+shift+l shorcut would be used:
from metago.
Yes, I locally deleted metago keybinding before posting this issue.
That new key is fine by me as long as it doesn't overwrite vscode's default ones π
from metago.
@Ranguna new implementation:
- Ctrl+l to select current line or extend selection by one line below.
- Ctrl+o to extend selection by one line above.
note: Ctrl+o triggers open file by default, and it triggers extend line selection when there is selection in active editor.
if you want to select line up, you should press Ctrl+l to select current line and then press Ctrl+o to extend line selection up.
by default selectLineUp command is configed as:
{
"command": "metaGo.selectLineUp",
"key": "ctrl+o",
"mac": "cmd+o",
"when": "editorTextFocus && editorHasSelection"
}
you could asign a shortcut key not collision with default vscode ones, and remove the editorHasSelection
condition, so it would work even no selection in editor.
I have done the implementation, would be released in the next versionπ
from metago.
So the original issue was about a metaGo keyboard shortcut conflicting with a default vscode one. Your solution is to remove the old conflicting and replace it with a, even worse and widely used, default vscode keyboard shortcut ?
Should I change the issue name to be more generic, something like "remove all metaGo keyboard shortcut conflict with default vscode keyboard shortcuts", or should I close this issue and open a new one right after ?
I'm sorry to say this but... This is a bad "solution" to this issue.
from metago.
@Ranguna I think you misunderstand what I mean.
there is no conflict after my modification, It's better than my original solution.
the ctrl+o to open a file still works, it just works as the extending selection up when there is selection.
from metago.
let me build a special release for you, have an evaluation:
v3.6.1
from metago.
the ctrl+o to open a file still works, it just works as the extending selection up when there is selection.
Hmm.. Now I feel stupid. I'm sorry for what I said.
Users will still see a weird behavior when they have selected something and are trying to open a file though, but either way, the original command doesn't conflict anymore.
Also v3.6.1 works as described. I'm good with closing this issue once the next version has been released. Thanks π
from metago.
I'm glad you accept it. And also to remind if you want you can bind other shortcuts as you described before, just to make sure to remove 'editorHasSelection' condition for 'selectLineUp' to make it works even without selection.(you need edit json file to modify condition). I think the default key bindings are better, the collision is minor than the convenience it brings.
from metago.
close this issue after publish V3.6.6
from metago.
Related Issues (20)
- Scroll to cursor on alt+a
- Rapidfire Cursor Placement?
- place cursors without selecting search character everytime?
- The default keybinding for "metaGo.gotoAfter" can't be removed
- Command for metaJump + Go to definition HOT 1
- Configurable "jump to bracket" characters/words (based on indentation, do/end, etc.)
- [error] TypeError: t.surroundPairs.map is not a function HOT 2
- Metajump does not cover whole view HOT 1
- Is there a way of enabling jumping to word easily without any other features? HOT 1
- Is This Extension is dead?? HOT 1
- Feature Request: implement "clever-f-like" functionality HOT 3
- Feature Request: Add licencing terms HOT 2
- Jumping Highlights stay visible after jump
- Can't jump to char with end comment
- Consider adding a Lightspeed implementation for MetaJump HOT 1
- Integration with vscodevim: how to run `metaGo.gotoBefore` in command line mode?
- Adjustable font+size (or at least size) for label display
- Related to #84, would be nice to have adjustable delay for period labels/target are displayed.
- Also related to #84, to further enhance letter discrimination, allow users to customize label fgnd/bkgnd colors HOT 1
- Rename "select Empty Line Move Up"
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 metago.