Tuesday, September 4, 2007

Other plugins

I took some time to put my hands on other scripts before release the TownkVisualMarks one.

I create a little script that auto complete the (, {, [, " and ' character, just like Eclipse editor do.

Take a look at it here, download it, test it and if you find any bug, just let me know that I'll fix it as soon as possible!

BTW, I also made a little improve on other, already good, script: Autohi (another Eclipse envy :P)


Kamil Dworakowski said...

Awesome script! One problem I noticed is that it is not compatible with . (dot) command. I use dot quite often.


start in normal mode
enter insert mode and type
esc to leave insert mode

now I would expect that pressing dot would insert '123' but instead it inserts 123 without enclosing '' :(

Thiago Alves said...

Hi Kamil, I'm pretty sure that this is not happen. I tried just as you said: Normal mode; [i]123[ESC][.] and 123 is inserted again.

Did you try this script without any other script in your vim?
perhaps some other stuff is causing that.

Anyway, thanks for your comment!

Kamil Dworakowski said...

Probably the qoutes misled you.

REPRO once again, this time with parens instead of quotes

enter insert mode and type

this results in (123)

now I would expect that after pressing dot anywhere I would get (123) pasted, but instead I get bare and naked 123.


Thiago Alves said...

Now I got it! I'll look at this see what I can get on this.

And once again, thanks for your help on this!

Thiago Alves said...

Ok, I found what this bug is but I don't have good news!

It seems to be a Vim behavior/bug, to see this try this:

on insert mode:

now if you press [.] it will insert 1234567890 on cursor position.

Now comes the behavior/bug, on insert mode:

now if you press [.] it will only insert 789. Its look like Vim lost insert chars after a movement key is inserted through this way (which is the way that my plugin works).

I will try to contact some Vim developer this weekend and see if I discover more about this.

Anonymous said...


great plugin! Thank you!

Would you consider adding <> too?