I have to replace all occurrences of a specific macro inside some (only some of the dozens) functions of C. Since the file lasts thousands of lines, and all functions have several instances of the macro, I would like to replace all occurrences in the specific function that the cursor is currently placing . I know that VIM provides navigation commands (for example, [[go to the beginning of the current function, and then% to find its suitable closing bracket), but I cannot figure out how to use them to search for the required search, replace the command. Can anyone help?
source
share