Skip to content
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

ctrl+V still act as paste in visual mode and is not as block choose as in Vim inOneNote #105

Open
M-seas opened this issue Jan 9, 2025 · 5 comments

Comments

@M-seas
Copy link

M-seas commented Jan 9, 2025

Hi ,
I am using this plug most for block choose in OneNote, but when i change into Visual mode and use ctrl+v to choose the block, it still asc as paste function.
is there any way to act ctrl + v as the same as in Vim?

@rcmdnk
Copy link
Owner

rcmdnk commented Jan 9, 2025

I'm sorry but block-wise select is not possible on apps other than vim, then it is not mapped in vim_ahk.

You can disable "paste" at Visual mode by changing
"Disable unused keys in the normal mode" as "3" in vim ahk settings.

It is welcome any idea to realize "block-wise" select!

@M-seas
Copy link
Author

M-seas commented Jan 10, 2025

Hi rcmdnk,
In daily onenote using i using ctrl + mouse left select the content to simulate the 'block-select'
I have a idea in some mode whether we can use alt or ctrl+Arrow(up/down/left/right) to achieve the ctrl + mouse left select
upload a gif
PixPin_2025-01-10_17-48-16

@rcmdnk
Copy link
Owner

rcmdnk commented Jan 10, 2025

I tried on OneNote app version 2412 (build 18324.20168) (Windows11),
but Ctrl + mouse does not work.

How did you get working block select function?

@M-seas
Copy link
Author

M-seas commented Jan 11, 2025

i am on Microsoft OneNote 2024MSO(2412 Build 16.0.18324.20092) 64 (Win10)
And Onenote 2021 one Win11 it all work
Just hold Ctrl + hold mouse left to slip the line or content it will like block-select
use Shift + mouse click will select the whole line
let me use the screen keyboard to show you
please see the gif
PixPin_2025-01-11_10-13-01

@rcmdnk
Copy link
Owner

rcmdnk commented Jan 11, 2025

Ah, I got it.
To select multiple block, I shold release after each block selection.

It may need to implement something like:

  • Get cursor position on OneNote in the monitor, and move the mouse cursor there
  • Ctrl-Down and mouse click (keep their down)
  • Define character width (could be taken from OneNone's information...? though, most of fonts have different width for different characters...) and move the mouse cursor 1 width by l or any movement keys.
  • Need to remember how many characters it moves.
  • When d or any line change command comes, release mouse, and change the line, move back number of characters moved above, then click down, move forward the same number of characters
  • If h or any backward key is pushed,...

Although it is interesting and it may be possible,
I'm sory but I cannot make enough time for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants