Skip to main content
Formatting; better title; removed extraneous material
Source Link

Get name of the current file we're editing in vimVim

I'm trying to find the name of the file I'm editing inside of vimVim. So I can use it to map F5F5 to compile this file. Would of course be great if I could recognize the file format, and choose compiler accordingly, but realyreally not necessary. If I find the name of the file, I could do that myself. But I really can't find any way to get the name of the file I'm editing.

I know of the :make:make command, and have already mapped that, but for small scripts/testing programs, I really don't want to first have to write a simple makefile.

Thank you for all your help.

Get name of the file we're editing in vim

I'm trying to find the name of the file I'm editing inside of vim. So I can use it to map F5 to compile this file. Would of course be great if I could recognize the file format, and choose compiler accordingly, but realy not necessary. If I find the name of the file, I could do that myself. But I really can't find any way to get the name of the file I'm editing.

I know of the :make command, and have already mapped that, but for small scripts/testing programs, I really don't want to first have to write a simple makefile.

Thank you for all your help.

Get name of the current file in Vim

I'm trying to find the name of the file I'm editing inside of Vim. So I can use it to map F5 to compile this file. Would of course be great if I could recognize the file format, and choose compiler accordingly, but really not necessary. If I find the name of the file, I could do that myself. But I really can't find any way to get the name of the file I'm editing.

I know of the :make command, and have already mapped that, but for small scripts/testing programs, I really don't want to first have to write a simple makefile.

this has nothing specific to linux (other edits made to fix tags)
Source Link

I'm trying to find the name of the file I'm editing inside of vim. So I can use it to map F5 to compile this file, for testing purposes. Would of course be great if I could recognize the file format, and choose compiler accordingly, but realy not necessary. If I find the name of the file, I could do that myself. But I really can't find any way to get the name of the file I'm editing.

I know of the :make command, and have already mapped that, but for small scripts/testing programs, I really don't want to first have to write a simple makefile.

Thank you for all your help.

I'm trying to find the name of the file I'm editing inside of vim. So I can use it to map F5 to compile this file, for testing purposes. Would of course be great if I could recognize the file format, and choose compiler accordingly, but realy not necessary. If I find the name of the file, I could do that myself. But I really can't find any way to get the name of the file I'm editing.

I know of the :make command, and have already mapped that, but for small scripts/testing programs, I really don't want to first have to write a simple makefile.

Thank you for all your help.

I'm trying to find the name of the file I'm editing inside of vim. So I can use it to map F5 to compile this file. Would of course be great if I could recognize the file format, and choose compiler accordingly, but realy not necessary. If I find the name of the file, I could do that myself. But I really can't find any way to get the name of the file I'm editing.

I know of the :make command, and have already mapped that, but for small scripts/testing programs, I really don't want to first have to write a simple makefile.

Thank you for all your help.

Source Link
martiert
  • 1.7k
  • 2
  • 19
  • 24

Get name of the file we're editing in vim

I'm trying to find the name of the file I'm editing inside of vim. So I can use it to map F5 to compile this file, for testing purposes. Would of course be great if I could recognize the file format, and choose compiler accordingly, but realy not necessary. If I find the name of the file, I could do that myself. But I really can't find any way to get the name of the file I'm editing.

I know of the :make command, and have already mapped that, but for small scripts/testing programs, I really don't want to first have to write a simple makefile.

Thank you for all your help.