How do I get the name of the current file without the extension?

You can get the name of the current file without the extension using:

    :echo expand("%:r")

With some commands, you can use the file name modifiers directly:

    :cd %:p:h

    :!gcc -o %:r.o %

    :!xpdf %<.pdf

Read free Software Algorithms and Computer Science Books by CodeAhoy Learn.

Introduction to Recursion and Backtracking

Sorting Algorithms

Introduction to C Programming Language

And More...

Speak Your Mind