In my .vimrc
, I want to execute a bash file test.sh
when I save a specific file, say test.txt
.
However, both files are in /long/list/of/folders/which/makes/an/ugly/looking/line/
.
Hence I would like to have:
let fold="/long/list/of/folders/which/makes/an/ugly/looking/line/"
autocmd BufWritePost fold."test.tex" execute "!".fold."test.sh"
Or that second line won't work because fold."test.tex"
is supposed to be a pattern matcher and not a vim variable.
Is there any way to achieve my desired result ?