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
Suggestion for Editor enhancement Vi Vim #205
Comments
Thank you for your suggestion. Any volunteers? :) |
Trust me If I knew how I'd be all over it. I know there is an API for hooking into neovim. that may be the easiest way to get it in. then the plugins and full function of vim would be added to qownnotes. |
And how should that work? Is there even a GUI version of neovim? |
This version that runs in atom works but you have to have the nvim socket open.. |
I will close this issue until there is / are more information / volunteers. |
I would also like QOwnNotes to have a Vim-Mode. Using vim hotkeys everywhere else makes the use of QOwnNotes a bit annoying at times. It's the one thing I'm missing! |
Yes please. QOwnNotes would be a great tool to use, but without a real editor, it's not something I could work with efficiently. |
It would very nice to have vim mode in qownnotes editor. :) |
Since we have a read-only mode now I maybe will implement some basic vim-shortcuts. :) |
Any suggestions? Like:
|
Those, but also: o: open new line below; But also stuff like "ciw" for "change inside word" or "ci(" for "change inside parenthesis", etc.. |
I first need to get a Text Cursor in read only Mode to make most of those Shortcuts useful |
there are a lot of useful key bindings in vim :) It looks like you are developping in C++ ? Here some addition useful keybinding : in Normal mode :
|
maybe it exists some library which does already the job because there are a lot of key bindings :) |
There might be https://github.com/hluk/FakeVim if I can get it running. |
So far I had no luck with the library, it crashes for me (see hluk/FakeVim#40). |
I got it to run now. It seems that if we are using FakeVim then most of the shortcuts of OOwnNotes to work inside notes will not work properly... But there vi shortcuts seem to work. Is that a price we want to pay? |
I finally got a basic Vim mode working. 18.08.0
|
There now is a new release, could you please test it and report if it works for you? |
WOW! That's the best thing that happened to QOwnNotes in a loooong time! 👯 Thanks, and cheers! |
It doesn't seem to build on Windows (AppVeyor) yet... 😬 More work to do... |
V-Block mode doesn't seem to work (Ctrl+v). EDIT:
|
Can you please explain in more detail and step by step what you did, what happened and what you expected. |
Sure @pbek: Let's say you've a document with the following text: " If you put the cursor on the first "b", then click on "ctrl+v" and go down and right, you should be able to select all the "b"s at once. You can then press "x" to delete them. Well, visual-block mode doesn't seem to work in qownnotes, that is, you can't select columns in visual mode. |
Scratch that, V-Block mode seems to work. There's just no visual feedback to it. I can do what I mentioned in the previous post, but the block should be highlighted and it currently is not (I am using the dark theme). (See an example here, in the 2:55 mark) |
I didn't even play with dark mode yet... |
18.08.2
|
There now is a new release, could you please test it and report if it works for you? |
Wow !! Thank you @pbek It works very well on my side with the latest version. Even other command like I've tested almost all functions mentioned and it all works :) Great work ! Here is some minor feedbacks :
|
I guess that's because the cursor is drawn manually and depends on the size of the character
I'm not sure what can cause this yet... |
|
Thank you for your feedback. Sounds like you want to post some issues / feature requests on https://github.com/hluk/FakeVim/issues. ;) |
Sorry @pbek. I thought these were things you could change. It looks great though, thank you for supporting vim-mode. |
technically everyone can, the FakeVim library is FLOSS ;) as well as QOwnNotes is...
thank you, I had to spend a lot of time for fixes and integration work :) |
about cursor width it can be solved using monospace / fixed-width font in the editor like DejaVu Sans Mono. |
@valvin, thank you! It does not completely fix the issue (when there's no character, the cursor is different) but it's much better now! |
I tested the vim mode after finding it here: https://www.qownnotes.org/blog/2018-08-07-Vim-mode.html |
For me, j/k moves the cursor one line up or down. |
VI/VIM Key mode, Integration or embedding of vim/neovim as the editor
The text was updated successfully, but these errors were encountered: