Get the file name without file extension in Vim function.

前端 未结 4 643
梦毁少年i
梦毁少年i 2021-01-30 10:51

I want to get the file name without the file extension in Vim.

I wrote the following functions in my .vimrc file for compile and run the Java program.

4条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-30 11:02

    I literally just read a similar question to this (in that someone else seemed to be trying to configure vim to build automagically for them with the F-key), and wrote an answer about how you can leverage the power of vim's :make command without even needing to write a Makefile. In your case, it's less directly related to the question, but I thought I'd mention it in case you were interested.

    Furthermore, someone seems to have written something on Vim Tips Wiki about how to set up vim's :make command to specifically work with Java projects built with ant. I haven't worked with Java in a while myself, but in your case specifically it might be a good place to get started.

提交回复
热议问题