Vim Tips Wiki


8 Edits since joining this wiki
August 3, 2007

Willkommen, bienvenue, welcome, welkomEdit

Welcome to the Vim Tips wiki! We hope you can help improve the articles by fixing typos, adding comments (at the bottom of each tip page), rewriting tips, joining in discussions, or making other improvements.

Be sure to visit the community portal for information about our site, with links to how to pages.

Keep an eye on recent changes to check progress.

Our policy guidelines may be useful. We'd like you to join the very low-volume mailing list.



Hi Hansfn - welcome to our Vim wiki! Please see my reply at User_talk:JohnBeckett.

Stupidly, I fixed the 'if' indents (while investigating the virtues of pre tags versus space prefix), and only tried the tip after saving. I haven't been able to make it work (it works, but isn't trimming the trailing tag, nor is it inserting '/').

If I get time I'll investigate it some more ... I would like to use this tip for my work.

--JohnBeckett 08:51, 4 August 2007 (UTC)

It works for me on ViM 6.3 and ViM 7.0 (patches 1-122). What exactly doesn't work for you? --Hansfn 13:43, 4 August 2007 (UTC)

Very strange ... I just tried it again, and now it works. I did get myself in a muddle before - I guess I was using some dodgy copy of the script. When I copied the version of the script with the leading space on each line, I got some runtime errors because there are two lines including '' and the wiki interpreted that as italics. That's when I started looking at pre.

The script relies on :set selection=include. We should probably fix that in the 'save' and 'restore' sections of the code.

Hope to see you on the mailing list. --JohnBeckett 09:13, 5 August 2007 (UTC)

Also on Fandom

Random Wiki