How do I edit a header file with the same name as the corresponding C
source file? You can use the following command to edit a header file with the same name as the corresponding C source file:
You can use the following command to edit the file in a new split window:
In the above commands, the percent sign expands to the name of the current file. The “:t” modifier extracts the tail (last component) of the filename. The “:r” modifier extracts the root of the filename. The .h is appended to the resulting name to get the header filename. Another approach is to use the following command:
This command will search for the header file in the directories specified in the ‘path’ option.