A preface.
This article shows you how to search for specific content in the VI editor, since it is inconvenient to go directly to the vi editor to find what we need to change.
2. Specific operation methods
1. Go to the directory where the file is stored (the clk.c file is used as an example).
- Farsight @ ubuntu: ~ / Linux – 3.14 / drivers/CLK $vi CLK. C
As shown in the figure:
2. After entering the vi editor,Press the “/” key, “/” appears in the status bar at the bottom left foot of the screen, and then enter the content to find, press Enter to end.
Static bool clk_ignore_unused; As an example. (The code has been modified here for personal learning reasons)
Note: you can use the right click paste.
As shown in the figure:
Note: If the value is not directly retrieved after the press enter, you can try: Down press lowercase N, up press uppercase N.