Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I edit a header file with the same name as the corresponding C source file?

edit file header source
0
Posted

How do I edit a header file with the same name as the corresponding C source file?

0

:e %:t:r.h You can use the following command to edit the file in a new split window: :sp %:t:r.h 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: :sfind %:t:r.h This command will search for the header file in the directories specified in the ‘path’ option. For more information, read :help cmdline-special :help filename-modifiers :help :sfind :help ‘path’ 27.10.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123