John Beckett wrote: >>> 316 Using /pattern/ search in a script > ... >> # The original title DOES say about searching in a script but >> # it is irrelevant - you can search anything using this tip. >> # IMO the point of this tip is to run a set of vim commands >> # on text found by a search regexp pattern. >> # So maybe along these line: >> --> 316 Modify search results automatically >> --> 316 Run commands on found search pattern >> --> 316 Search and modify text pattern automatically >> --> 316 Use advanced search functions > > I still think that the tip is about using a Vim script to search anything. > The author points out that there is a built-in search() script function, but > claims that using 'normal /...' can be more flexible. Perhaps the tip is > more about using the normal command in a script, so the title might be one > of: > > 316 Search using a script > # The above title would be good if the tip were > # expanded, with more info on using search(). > 316 Using the normal command to search with a script > >> Anyway I think this tip should be merged with 802 and 14, >> so maybe this title does not matter so much. > > But 802 and 14 are about searching using commands, not using a script. Tip > 316 has ':normal /...'. You put that in a script; you wouldn't type such a > command.
I read the tip once again carefully and must admit you were right. I got confused by the equivocal meaning of "in script": search for something inside a script ie. block of code vs. using vim search features programmatically when coding vim script. But then your titles '316 Search using a script' and '316 Using the normal command to search with a script' suggest a script is created especially for searching purposes, which may or may not be true: the script might be on any subject and it might just use search functionality for some task. Now when I understand the tip, I think the original title 'Using /pattern/ search in a script' got the point pretty well. Maybe we could tweak it only a little to get around the slashes: --> 316 Using pattern search in a script --> 316 Using regex search in a script --> 316 Using normal command in a script for searching I have also set the Scripting category on this tip to make sure it's not misunderstood again. Regards, Santhalus _______________________________________________ Vim-l mailing list Vim-l@wikia.com http://lists.wikia.com/mailman/listinfo/vim-l