On Wed, Dec 3, 2008 at 3:39 AM, Krzysiek Goj <[EMAIL PROTECTED]> wrote:
> I haven't seen your keymap before. If I have, I wouldn't post this
> enter_autoindent
> patch. I agree that this patch is probably forcing it's behaviour too
> much.

No worries; I hadn't realized that was enabled by "autoindent" in vim
until just yesterday! Heck, half your patches point me to some vim
feature I never knew about. I've used the same, relatively unchanged,
vimrc for *years* and just forgot about it. haha

That said I kinda have a philosophy towards my development efforts on
Yi: Whenever possible I figure out how to make it so a new feature I
want to add can be added via a user's keymap instead of internalized
in Yi's core functionality. This isn't always possible or makes sense,
but has led to some nice bonuses.

> What I think we *really* need to have is some kind of options that can
> be tweaked at runtime and
> 'autoindent' should be one of those. I'd like to turn it on and off
> without recompiling Yi,
> eg. based on type of a file I'm currently editing.

Doh! Yes, you are right. It really does need to be a runtime and
mode-dependent option. Though, I think there is a scheme partially in
place that does this. A mode can specify a modeKeymap which is buffer
local. The issue with the modeKeymap last I looked into it was that
they should only apply when in insert mode if the user is using the
vim keymap. I don't think this is taken into consideration right now.
This is a endomorphism on a keymap and a dynamic property of a buffer.
Which means, in theory, an operation like so could be done:
 - Take current buffer's modeKeymap
 - Extend with autoindent functionality
 - Set current buffer's modeKeymap

Cheers,
Corey

--~--~---------~--~----~------------~-------~--~----~
Yi development mailing list
yi-devel@googlegroups.com
http://groups.google.com/group/yi-devel
-~----------~----~----~----~------~----~------~--~---

Reply via email to