Recent

Author Topic: End of the Dark Age: SynModal plugin for Vi keybindings  (Read 623 times)

fifr

  • Newbie
  • Posts: 6
End of the Dark Age: SynModal plugin for Vi keybindings
« on: March 06, 2025, 02:34:05 pm »
Ever since I started using Lazarus, our beloved IDE, there has been thing that I painfully missed: Vi like keybindings. (Or maybe they are there, but I couldn't find them.) This was very sad for me.

But these dark times are over as there is a new glimpse of light: welcome SynModal, a plugin for SynEdit, enhancing your SynEdit component with modal editing behavior. In particular, SynEdit comes with some predefined Vi like key bindings.

And the best thing: you cannot only use SynModal in your own apps but also as IDE plugin in Lazarus itself (don't forget you have to install the plugin and activate Vi bindings in the settings dialog).

Repository: https://chiselapp.com/user/fifr/repository/pas-lazsynmodal

This is the very first release of SynModal. It is neither complete nor bug free (hell no, expect tons of bugs), but it is in a state that it can be used without too much trouble in your daily work (at least for me), so it's probably I good time to make it available to others.

Here a few things that work:
  • basic motions, commands and operators
  • repeat counts (except for insert mode)
  • the dot command (yeah)
  • visual mode (kind of)
And here is a list of things that do not work (yet)/are missing:
  • ex mode: it's just not there but should be pretty orthogonal to everything else
  • insertion from visual mode
  • visual mode selection is still "exclusive" not "inclusive"
  • macro recording
  • marks
  • tons of commands/motions (that I never use?)
The plugin is developed on the main branch of Lazarus (i.e. future Lazarus 4.0), but seems to work with Lazarus 3.8 as well (but not really tested).

So although there is some light and a new hope rises, there is still a long way to go. So if you, like me, felt the same gap that might now be filled by SynModal, don't hesitate to send bug reports, patches, etc.
« Last Edit: March 07, 2025, 04:46:17 pm by fifr »

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1186
  • Professional amateur ;-P
Re: End of the Dark Age: SynModal plugin for Vi keybindings
« Reply #1 on: March 06, 2025, 08:23:49 pm »
Hey fifr,

This looks quite awesome for the vi/vim crowd. I've had many of people asking me if this was a thing that existed or even possible.

But... and I beg a ton of your pardon: The use of SVN kinda explains a person pursuing vi/vim integration ;)
Would it be possible to transfer your code to some GIT repository? I'm not asking GitHub or GitLab, but at least not SVN.
And again, excuse my utter lack at being any good at humour :D

Cheers,
Gus
Lazarus 3.99(main) FPC 3.3.1(main) Ubuntu 23.10 64b Dark Theme
Lazarus 3.0.0(stable) FPC 3.2.2(stable) Ubuntu 23.10 64b Dark Theme
http://github.com/gcarreno

fifr

  • Newbie
  • Posts: 6
Re: End of the Dark Age: SynModal plugin for Vi keybindings
« Reply #2 on: March 06, 2025, 08:45:40 pm »
Now I beg your pardon ... SVWhat? If you're talking about subversion, then I can assure you that I have no idea how to use subversion.

The code lives in a fossil repository, if this is what you mean. It is (afaik) widely compatible with git and can be converted. I think something along
Code: Bash  [Select][+][-]
  1. fossil clone https://chiselapp.com/user/fifr/repository/pas-lazsynmodal synmodal.fossil
  2. fossil git export -R synmodal.fossil synmodal-git
should do it. But I know git as much as I know subversion ... basically nothing.

dbannon

  • Hero Member
  • *****
  • Posts: 3325
    • tomboy-ng, a rewrite of the classic Tomboy
Re: End of the Dark Age: SynModal plugin for Vi keybindings
« Reply #3 on: March 07, 2025, 12:40:46 am »
Wow, when I get some time I am so going to play !

D
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1186
  • Professional amateur ;-P
Re: End of the Dark Age: SynModal plugin for Vi keybindings
« Reply #4 on: March 07, 2025, 08:40:35 pm »
Hey fifr,

Now I beg your pardon ... SVWhat? If you're talking about subversion, then I can assure you that I have no idea how to use subversion.

The code lives in a fossil repository, if this is what you mean. It is (afaik) widely compatible with git and can be converted. I think something along
Code: Bash  [Select][+][-]
  1. fossil clone https://chiselapp.com/user/fifr/repository/pas-lazsynmodal synmodal.fossil
  2. fossil git export -R synmodal.fossil synmodal-git
should do it. But I know git as much as I know subversion ... basically nothing.

Hummm... rather curious that fossil has the same folders of trunk and tags that SVN has. That's where my confusion came about.
Will have to get acquainted a bit more with this fossil thang ;)

Cheers,
Gus
Lazarus 3.99(main) FPC 3.3.1(main) Ubuntu 23.10 64b Dark Theme
Lazarus 3.0.0(stable) FPC 3.2.2(stable) Ubuntu 23.10 64b Dark Theme
http://github.com/gcarreno

 

TinyPortal © 2005-2018