Vim autocommand on write - pass full file path

前端 未结 1 609
没有蜡笔的小新
没有蜡笔的小新 2021-01-13 14:15

I want to execute a bash script whenever I save a file in Vim. The problem is I don\'t how can I, or if it\'s possible to pass the full path to the file, rather than just th

相关标签:
1条回答
  • 2021-01-13 15:09

    I found it:

    autocmd BufWritePost * !~/.config/nvim/scripts/on_save.sh %:p  
    

    The %:p does it

    0 讨论(0)
提交回复
热议问题