Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uwm.edu!spool.mu.edu!munnari.oz.au!metro!seagoon.newcastle.edu.au!frey.newcastle.edu.au!cerberus!mips!fozzy From: fozzy@mips.bhpese.oz.au (Andrew Steele) Newsgroups: comp.editors Subject: Restricted Searches in VI Message-ID: <1991Apr22.071658.1059@cerberus.bhpese.oz.au> Date: 22 Apr 91 07:16:58 GMT Sender: news@cerberus.bhpese.oz.au (News System) Organization: BHP, Newcastle, Australia Lines: 12 In vi is it possible to restrict the range of a search. Specifically I want to be able to search through just one function in a .c file. I've inherited some badly written code that has functions that just go on and on and I'm trying to break them up into smaller units. To do this I need to be able to find where local variables are used but not if that name is also used in some other function later on. If it's too much of a hassel I'll continue as I have been by checking with "[[" to see which function I am in, but I thought there may be some way of combining either "[[" or "%" with a "/" to give a restricted search. Thanx