In gvim, you can create custom menus easily. Those extra lines in my gvimrc add a small python 'utilities' menu.
menu Python.Run <ESC>:Shell python %<cr>
menu Python.Run\.\.\. <ESC>:Shell python %:p
menu Python.Pyflakes <ESC>:Shell pyflakes %<cr>
menu Python.Pychecker <ESC>:Shell pychecker %<cr>
menu Python.Pep-8 <ESC>:call Flake8() %<cr>
menu Python.FixTabs <ESC>:ret<cr>
With this line, I'm triyng to have this displayed in the command line :shell python my/file/full/path/myfile.py
so that I can make some modifications to the path before hitting 'return'
But I can't get the full path evaluated in any way; this does not work:
menu Python.Run\.\.\. <ESC>:Shell python %:p
I tried to call a separate function that would expand the path and echo the correct command but although it actually echoes the right stuff in Vim's command line, neither the text can be executed nor does the focus go to the command line.
I also tried this syntax found in vim tips, (wich I don't understand BTW) but with no more succes :
menu Python.Run\.\.\. <ESC>:Shell python <C-R>1<C-G>
Has anybody encountered a similar issue?