cherrytree icon indicating copy to clipboard operation
cherrytree copied to clipboard

Feature Suggestion: VIM bindings

Open chadfurman opened this issue 6 years ago • 29 comments

Being able to use vim bindings (like navigation, insert/delete lines, search, etc) from within cherry tree would be awesome :)

chadfurman avatar Nov 11 '18 18:11 chadfurman

It would be the heaven

nil0x42 avatar Nov 27 '18 20:11 nil0x42

possible ?

arvryna avatar Mar 26 '20 14:03 arvryna

pretty please

BeatMil avatar Apr 11 '20 05:04 BeatMil

Yeah. It would be the heaven <3

janakact avatar Apr 19 '20 18:04 janakact

Any updates on this?

davehouser1 avatar May 17 '20 13:05 davehouser1

This would singlehandedly get me to switch over to Cherry Tree fully, honestly <3

bencrbcp avatar Jul 20 '20 02:07 bencrbcp

This kind of thing is usually implemented via plugins (at least in every editor ive ever used except vim :p) #393 is a request for plugin support which I like the idea of, but I don't think plugins are coming soon if they are coming

ForeverRainbow avatar Jul 20 '20 13:07 ForeverRainbow

This kind of thing is usually implemented via plugins (at least in every editor ive ever used except vim :p) #393 is a request for plugin support which I like the idea of, but I don't think plugins are coming soon if they are coming

Yes! Thanks for the link.

So maybe we can talk about what a vim plugin would need out of the box to be useful. Can we plug neovim in somehow? The image rendering in the main window would be a fun trick.

Let's assume the plugin interface exists and does what we need to accomplish what we want -- now let's talk about what we want

chadfurman avatar Jul 20 '20 14:07 chadfurman

I would say the same thing that "set -o vi" provides in ~.bashrc would be a start. I also know that notepad++ has a vim plugin that works fairly well if you want to imitate it's behavior.

On Mon, Jul 20, 2020, 10:40 AM Chad Furman [email protected] wrote:

This kind of thing is usually implemented via plugins (at least in every editor ive ever used except vim :p) #393 https://github.com/giuspen/cherrytree/issues/393 is a request for plugin support which I like the idea of, but I don't think plugins are coming soon if they are coming

Yes! Thanks for the link.

So maybe we can talk about what a vim plugin would need out of the box to be useful. Can we plug neovim in somehow? The image rendering in the main window would be a fun trick.

Let's assume the plugin interface exists and does what we need to accomplish what we want -- now let's talk about what we want

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/giuspen/cherrytree/issues/425#issuecomment-661081635, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOL4D3O5HPJDR3SJFNA44RLR4RJMVANCNFSM4GDCQNIA .

davehouser1 avatar Jul 20 '20 15:07 davehouser1

Putting my vote in for this possibility. And thank you for all you have done with Cherrytree. I really want to make it my main note program and vim bindings would seal the deal. Even only the basic navigation bindings to get around the page would be great.

geckobob avatar Mar 30 '21 20:03 geckobob

Please make this a thing

ratfink417 avatar Jun 23 '21 18:06 ratfink417

Please vote on the PR also for plugin support :)

chadfurman avatar Jun 23 '21 18:06 chadfurman

We need this <3

uunnxx avatar Jan 25 '22 10:01 uunnxx

Do you know if anyone is working on this?

MarioBross69 avatar Jun 12 '22 12:06 MarioBross69

Not that I know

giuspen avatar Jun 12 '22 12:06 giuspen

Very essential feature!

roskee avatar Apr 24 '23 13:04 roskee

Unfortunately, Neither cherrytree or zimwiki supports vim/emacs keybindings to edit text.

This forces me to use org-mode, which I don't like it much, as it requires so many tweaks to make it useful for me, and I'm not familiar and don't have much time to dig into elisp..

Life is tough for most of the time, I gotta say. :(

IceAsteroid avatar May 09 '23 17:05 IceAsteroid

I honestly have very basic knowledge of vi and use nano when available. I'm not understanding, is this an exact terminal-like experience that you are looking for or the non-terminal vim behaves differently? I'm aware that there is a window based vim editor but haven't used it yet. If you could point me to something brief that emphasizes the most important rules for a first implementation that would help this cause

giuspen avatar May 12 '23 18:05 giuspen

I honestly have very basic knowledge of vi and use nano when available. I'm not understanding, is this an exact terminal-like experience that you are looking for or the non-terminal vim behaves differently? I'm aware that there is a window based vim editor but haven't used it yet. If you could point me to something brief that emphasizes the most important rules for a first implementation that would help this cause

The needed feature is the possibility to have the key bindings that are at the core of Vim. This has been one of the most asked features on almost all popular editors and it has been implemented by most of them. for example, VSCode and IntelliJ have extensions to change the typing experience to Vim-like key bindings (even though they don't support all key bindings). You don't have to change anything on how CherryTree looks like, we just need a setting that changes how keyboard keys are handled while typing text -> the normal way and the vim way. for example, on the vim way. the keys h,j,k,l are used to move the cursor left,down,up and right respectively, i is used to enter insert mode as it is called in vim, et cetera.

roskee avatar May 12 '23 18:05 roskee

@giuspen. Actually, the essential of either Vim or Emacs is to give you the ability to "lazily yet quickly" move around and edit text.

For example: In Vim, you can move to the beginning or the end of a phrase or a paragraph with just a certain key combo.

While using the arrow keys for moving around text like in most text edition programs, you can only move between word to word(arrow keys with Ctrl key), or character to character, or just C-a with left or right arrow key to move to the beginning or the end of the whole text, as you can see, this way of editing text is very limited.

Whereas in Vim or Emacs, you can move to the beginning or the end of a word, a phrase, a sentence, a paragraph, or the whole text in a buffer, with just a certain key combo. This is why some people desire having either Vim or Emacs keybindings in a text edition program when they want to be efficient and very fast.

Yet, I haven't introduced the ability for deletion and pasting getting combined with those motions(motions in text), completely and yet efficiently without the annoying mouse. The reason why mouse is annoying to be involved when editing text is because you have to switch your hand between keyboard and mouse, while you have a better choice yet quicker and lazier to solely work on the keyboard.

Another reason to be more lazier and accurate by using those key combos in either Vim or Emacs is that your both hands will always and mainly on the area of 26 letters in a keyboard, which means, you don't even have to move your hand between the letter area and the area of those four arrow keys, to reach the ultimate speed and ease.

OK, I'm not a developer that's capable to contribute, I shouldn't ask more. I just want to tell that the power of such keybindings of either Vim or Emacs, which is the most efficient way to edit text on earth.

You may ask me why don't I just use Vim or Emacs? That's because I'm not that smart and having much time to configure them to be as useful as cherrytree or zimwiki to be the ultimate personal wiki for myself, which the latter two can be used out of the box. (Configuring one of them to be as excellent as Zim or Cherrytree, is really, really a time-consuming black hole)

Sad :(

IceAsteroid avatar May 23 '23 22:05 IceAsteroid

We need VIM bindings !!!

DoctorKnowsBetter avatar Sep 20 '23 20:09 DoctorKnowsBetter

It's been 5 years since the first comment and still no updates on this?

AlexanderPershin avatar Oct 27 '23 01:10 AlexanderPershin

I absolutely adore the fanaticism around both cherrytree and vim.

For what it's worth, embedding Neovim as an editor option inside cherrytree is an interesting challenge. Let's collect some links to where in cherry tree this would be possible and maybe some documentation from Neovim and any code examples from open source editors that have done this.

chadfurman avatar Oct 27 '23 02:10 chadfurman

For example: https://github.com/giuspen/cherrytree/blob/master/pygtk2/modules/core.py

It looks like there's a message bus for eventing in some cases and a "buffer" object where images and other things get added. A set of vim key bindings might be an extension to the message bus somehow, and/or embedding Neovim might be possible with some sort of interface to the buffer object.

Note that Neovim itself doesn't have the same rendering capabilities as cherrytree so the buffer isn't a 1:1 mapping

chadfurman avatar Oct 27 '23 02:10 chadfurman

@chadfurman don't look at the pygtk2 folder that's the old python version, I should remove that as it's leading to confusion, I have left it so far only because the import from some note taking types have never been ported to the C++ version

giuspen avatar Oct 28 '23 15:10 giuspen

bro please I beg for this to happen 💀

deadshxll avatar Jul 02 '24 19:07 deadshxll

😁 I will give this a try soon @deadshxll

giuspen avatar Jul 02 '24 21:07 giuspen

Thanks

El mar, 2 jul 2024 a las 23:16, Giuseppe Penone @.***>) escribió:

😁 I will give this a try soon @deadshxll https://github.com/deadshxll

— Reply to this email directly, view it on GitHub https://github.com/giuspen/cherrytree/issues/425#issuecomment-2204446450, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF2SOX3A2KGH4LSUBQDMOV3ZKMKELAVCNFSM6AAAAABKIGBX62VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBUGQ2DMNBVGA . You are receiving this because you commented.Message ID: @.***>

MarioBross69 avatar Jul 02 '24 21:07 MarioBross69