How can I expand the full path of the current file to pass to a command in Vim?

前端 未结 6 1934
无人共我
无人共我 2020-11-30 17:39

When I go to command mode and type

:!mycommand %

I get my command executed on the current file (% is expanded to the current

6条回答
  •  爱一瞬间的悲伤
    2020-11-30 17:56

    Get the name of the current file http://vim.wikia.com/wiki/Get_the_name_of_the_current_file

    Set_working_directory_to_the_current_file http://vim.wikia.com/wiki/Set_working_directory_to_the_current_file

提交回复
热议问题