Get the file name without file extension in a Vim function

:help expand() should give you the answer, see expand().

You should use the r modifier for %, with %:r instead of % to get the file name without extension.

If you want to write functions to build and execute files, you should also have a look at the documentation for shellescape, in order to prevent problems with spaces in file name or path.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)