I have a function in VIM that calls mksession. I wanted to make it use a function argument, but it takes the variable as literal:
func! MakeFullSession(name)
execute mksession! a:name
[...]
The session is saved to a file called “a:name”. Can I change that behaviour? The best would even be with a prepended directory:
~/.vim/sessions/.a:name
You’ll want to put everything to be executed in quotes, then concatenate the value of
a:name. Try this: