In vim how to search for line that contain letter “foo” above the line.
Example file snippet:
class A {
int a;
}
class B {
int a;
}
// something else with 5 spaces
In this example I want to be able to search for class B since it followed by exactly 5 spaces in next line but do not my search to find Class A or the comment with 5 spaces.
Your question is not very clear but may be this search will work for you in vim:
That will search for keyword class in one line followed by exact 5 spaces in next line.