User forums > General (but related to Code::Blocks)
Vim plugin?
kilgore:
Greetings all,
I am seriously addicted to vim -- has anyone created a vim plugin for code blocks? Is it possible?
Thanks!
-kt.
MortenMacFly:
--- Quote from: kilgore on June 19, 2007, 07:09:33 pm ---I am seriously addicted to vim -- has anyone created a vim plugin for code blocks?
--- End quote ---
Addicted to vim and working with C::B - how is that possible...?! :lol: ;-)
Anyways - It's not quite clear what you mean. If you mean the key shortcuts than have a look at the keybinder plugin - you can re-assign the shortcuts there easily. If you mean the macros / "additional functionality" with vim then have a look at the KeyMacs plugin - you can create macros and assign them a(nother) shortcut to emulate more complex behaviour.
With regards, Morten.
David Perfors:
it is not done yet. and of course it is possible. (I suppose you mean to embed vi in C::B as an editor) But keep in mind that most of the plugins only work with the build in editor (like code completion...)
kilgore:
Yes, I meant primarily the key mappings. Thanks for the reply! I'm not yet a serious c::b user, just exploring -- I like what I see, but _really_ want what I already know (and I detest having to use that <expletive> mouse when I could do it with a keystroke or two).
Thanks -- and maybe when I get some time, I'll contribute one... ahem...
-kt.
Andrej08:
*El bumpo*
I recently found an autohotkey script which has some very basic VIM key-bindings that can be used in some editors (e.g. scintilla, which is what codeblocks uses).
I started modifying it 2 days ago and I've added a bunch of handy close-to-homerow key shortcuts. I'm not making them 100% vim compatible because emulating everything that VIM has is way too hard + a lot of those key shortcuts depend on VIM features. I'm quite inexperienced with VIM, but I do like some of it's features. I've customized the script to my own style, although anyone is free to modify it to their own style and add/edit/remove features.
The script is here: http://www.autohotkey.com/forum/viewtopic.php?p=375239#375239
You'll need to copy-paste it to a filename.ahk file and download and install AutoHotkey_L, a custom version of AHK from this website:
http://www.autohotkey.net/~Lexikos/AutoHotkey_L/
Then just run the script with AHK_L (double-click should do it). You can use caps-lock to toggle between usual editing and vim-mode (you can change the toggle key as well).
If you need to set a quick exit key, add this on any line:
^!home::ExitApp
That's Ctrl+alt+home to exit the script. Check the documentation of AHK_L. Btw if you're new to AHK, the syntax takes some time getting used to. If you have any ideas for some features then if I'm in a good mood I might try to implement them. I've used AHK for almost a year now, so I'd probably find my way around.
Anyway, hope you have a use for it..
Edit: One more thing, I've only extensively tested the script with Scite, but I've only tried it with CB for a few minutes. Most of the features seem to work fine.
Navigation
[0] Message Index
[#] Next page
Go to full version