I would like to capture the result of a shell command into a vim variable inside of my vimrc file.
I tried using
let myvar = system("DIR") however it seems to crash vim when I put it in my vimrc file. I launch vim and then it just returns immediately without any error message.
So instead I was wondering if I can do something like
let exe_path = <expr> :!pwd ? This is obviously the wrong way to do it so I was wondering if something like that is possible?