-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Visual #653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Visual #653
Conversation
Allow using '0' for move caret to beginnig of the line.
Added option to webview for selection enabled caret mode. In status bar checking value of this option to identificate about it. Added bindings: <Space> for toggle selection mode, <Ctrl+Space> drop selection and keep selection mode enabled. In webview added javascript snippet to position caret at top of the viewport after caret enabling. This code mostly was taken from cVim sources.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should probably be removed now, or replaced by a debug log command 😉
Added option to webview for selection enabled caret mode. In status bar checking value of this option to identificate about it. Added bindings: <Space> for toggle selection mode, <Ctrl+Space> drop selection and keep selection mode enabled. In webview added javascript snippet to position caret at top of the viewport after caret enabling. This code mostly was taken from cVim sources.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nitpick: That should be self.caret_selection_active in the comment.
|
The javascript snippet is a good workaround! 😄 I suggest moving it to its own file (e.g. at |
|
Oops... I was a bit rushed. About counts I think yes, it can be usefull, but have you any ideas how to use '0' for jumping to start of line? |
|
I just looked at the cVim sources, and I think there's enough changed so we don't have to explicitely put their (MIT) license in. I suggest adding a comment with the usual GPL header (like in the other files), and then a comment mentioning some code was taken from https://github.com/1995eaton/chromium-vim/blob/master/content_scripts/visual.js which also makes it easier to find in the future. Regarding binding of 0, that's currently not possible as it's handled as count, but I think it shouldn't be too hard to edit some stuff in |
|
Ok. Thanks for info, everything noticed, will look at it... 😄 |
|
Ok, made some changes. I hope nothing was forgotten. 😄 |
|
Thanks and sorry for the delay! Merging this into the One small change: I'll change |
|
Very nice. Thank you.
|
|
|
Okay, I'll re-add it then. Sorry for the confusion! What about handling enter similiar to what tmux does? I'd like this workflow:
I can add that if you agree. Also, thanks for your patience! As you can see, I'm a perfectionist, so I'm sorry this takes some time until it's merged. After those changes, I have one or two places in the code I want to take a closer look at, and after that's done I'll finally merge. 😄 |
|
He he, this is nice to be perfectionist. And don't worry about that, I'm fine with it. For me better workflow is:
|
When trying to add a new binding with multiple values, the bindings were added immediately and the next _is_new() check returned False because the command was already bound. With this change, the new bindings first get added to a temporary dict so _is_new() returns the correct result. See #653.
When trying to add a new binding with multiple values, the bindings were added immediately and the next _is_new() check returned False because the command was already bound. With this change, the new bindings first get added to a temporary dict so _is_new() returns the correct result. See #653.
When trying to add a new binding with multiple values, the bindings were added immediately and the next _is_new() check returned False because the command was already bound. With this change, the new bindings first get added to a temporary dict so _is_new() returns the correct result. See #653.
|
Okay! I changed I also fixed a bug which caused Can you please delete the |
|
Yeah, everything is nice as I want it. 😄
|
|
It's now all merged, thank you again! 👍 |
|
Nice, thank you too! 😄
|
|
Have you seen #675? I wonder if that happened for you during testing as well... And if you feel like and have some time, I'd still be glad about a spatial navigation mode 😄 |
|
Yeah, I saw that. Will try to reproduce it little bit later.
About spatial, of cause I'll be glad to implement. But I need to
understand exactly, what do we want from that.
|
|
So, I recently found this mode, but find it a very un-vim like. To select text in Caret Selection Mode, I must hold down shift. Might we consider adding the three vim visual block modes? These could 'lock' you into selecting without holding shift, and line/block modes are nice. I also notice I can't use "/", "f", "F", "t", "T", or other vim fast navigation tricks in this mode. I think adding such bindings would make our caret mode quiet epic. |
|
@demure Is this on QtWebEngine, where caret mode isn't implemented at all yet? 😉 |
|
Ah, sorry. When I saw that #626 linked here, I assumed this was the current ticket to comment on. |
Added option to webview for selection enabled caret mode.
In status bar checking value of this option to identificate about it.
Added bindings: for toggle selection mode, <Ctrl+Space> drop
selection and keep selection mode enabled.
In webview added javascript snippet to position caret at top of the
viewport after caret enabling. This code mostly was taken from cVim sources. (Maybe should be moved to somewhere better place?)
This change is