ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 13 Jul 2018 12:26:25 -0500Running VIM inside Sage Shellhttp://ask.sagemath.org/question/42962/running-vim-inside-sage-shell/Is this possible? I want to work in Sage shell but I want to use VIM while typing up stuff in sage shell. Thu, 12 Jul 2018 09:28:54 -0500http://ask.sagemath.org/question/42962/running-vim-inside-sage-shell/Comment by slelievre for <p>Is this possible? I want to work in Sage shell but I want to use VIM while typing up stuff in sage shell. </p>
http://ask.sagemath.org/question/42962/running-vim-inside-sage-shell/?comment=42979#post-id-42979Do you mean in the Sage shell, started by running `sage -sh` in
the terminal, or in the Sage REPL (read-eval-print loop), started
by running `sage` in the terminal?Thu, 12 Jul 2018 13:05:04 -0500http://ask.sagemath.org/question/42962/running-vim-inside-sage-shell/?comment=42979#post-id-42979Answer by Iguananaut for <p>Is this possible? I want to work in Sage shell but I want to use VIM while typing up stuff in sage shell. </p>
http://ask.sagemath.org/question/42962/running-vim-inside-sage-shell/?answer=43004#post-id-43004You can also run
sage: %edit
which will open whatever you have `$EDITOR` set to first, and then fall back on `vi` otherwise.
The file is then saved to a temporary file and run when you exit, unless you do `%edit -x` (then it doesn't execute). While you're in your editor you can also write out to another file if you prefer.Fri, 13 Jul 2018 12:26:25 -0500http://ask.sagemath.org/question/42962/running-vim-inside-sage-shell/?answer=43004#post-id-43004Answer by tmonteil for <p>Is this possible? I want to work in Sage shell but I want to use VIM while typing up stuff in sage shell. </p>
http://ask.sagemath.org/question/42962/running-vim-inside-sage-shell/?answer=42963#post-id-42963You can use any bash command by starting with `!`, in you case:
sage: !vim my_file.txtThu, 12 Jul 2018 09:41:42 -0500http://ask.sagemath.org/question/42962/running-vim-inside-sage-shell/?answer=42963#post-id-42963