I need a keybinding (either a key like
F12 or a mnemonic key sequence like
SPC f12) in Spacemacs. When hitting the keybinding in a window containing a file in its buffer the shell script
script in the directory the file is located in shall be executed.
Which one of the alternatives to define key bindings should I use? I thought about calling a function when the key binding is triggered. How could I get the directory the file in the current window buffer is located in when this function is executed? But probably there is another way to solve this problem.