> Good people of this list,
>
> I ran into troubles with my desire to execute a python script from
> within gvim (Ubuntu) by merely pressing <F5>.
>
> In .vimrc I have the following lines:
>
> " Open a window and run Python code
> map <F5> :!gnome-terminal -e=python\ -i\ %<CR>
>
> However, this does not do the trick, instead I get an error message:
>
> :!gnome-terminal -e=python\ -i\ hunter_scatter-regression.py
> Failed to parse arguments: Missing argument for -e
>
> shell returned 1
>
> I don't quite understand the syntax of the mapping here, so I am a bit
> lost. Could you be so kind and hint at a solution?
I'm not sure about this because I don't have gnome-terminal
available, but according to this description of the command-line
options,
http://www.fifi.org/doc/gnome-terminal/html/gnome-terminal/C/options.html
you should be using -x rather than the -e that every other terminal
uses, you shouldn't be using =, and I don't think you need to escape
the spaces between the arguments to python. So I think this should
work, but I haven't tested it.
map <F5> :!gnome-terminal -x python -i %<CR>
HTH,
Gary
--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
No comments:
Post a Comment