> or change these lines > > if a:mode[1] == "T" > ... > elseif a:mode[1] == "t" > > to > > if a:mode[1] ==# "T" > ... > elseif a:mode[1] ==# "t"
Well, yes, after this correction, the script has became my good friend ;-) What I like most is it's ability to recognize (), [], {}, and /* */. To make it perfect, I would suggest it should behave reasonably if the user changes his mind (or makes a mistake) and only hits enter or esc when he is expected to enter the opening tag. Something like if opentag == "" or maybe if opentag ==~ "[\s\r\e]*" should do. (I didn't test the regexp, it's only my first idea. Maybe \r's and \e's are handled differently.) When this works OK, I think the script should be entered into Vim's script database. > Well, this makes me wonder how many scripts I've written/posted with the > assumption that 'ignorecase' is not set :) > > Do most of you script writers keep this in mind? Well, in my opinion, Vim should take care about this and run the scripts downloaded from the Internet (typically scripts in the plugin directory) in some kind of 'standardized' environment. It would alleviate the plugin writers from taking care about cpoptions and like. If the plugin writer changes an option, the change should be local to the script. It's just what I think would be best, I have in fact no idea how easy/difficult this would be to implement. -- Peter