sagemath/sage

Meta-ticket: document configuring IDEs and text editors

Opened this issue · 22 comments

slel commented

Document configuring each common IDE or text editor
for using and/or developing Sage.

and maybe others such as

What to document:

  • setting up syntax highlighting for .py, .pyx, .spyx, .sage files
  • telling the editor or IDE to use Sage's Python
  • making Sage execute fragments of code

Workflow:

Existing material:

  • some answers to questions, or discussions,
    on Ask Sage, sage-devel, sage-support, Stack Overflow

Related:

CC: @tobiasdiez @trevorkarn @fchapoton

Component: documentation

Issue created by migration from https://trac.sagemath.org/ticket/30500

slel commented
comment:1

Maybe this is better done on the wiki, and the wiki should have
a summary page pointing to a page for each IDE or text editor.

slel commented

Description changed:

--- 
+++ 
@@ -6,28 +6,44 @@
 - JupyterLab text editor
 - PyCharm
 - Spyder
+- Sublime Text
 - vi / vim
 - VSCode / vscodium
 
-and maybe others.
+and maybe others such as
+
+- Alpha, Alphatk
+- ATOM + Hydrogen
+- Blender
+- Eclipse
+- IDLE
+- Leo
+- PyDev
+- PyScripter
+- Wing
+- Xcode
 
 What to document:
 
-- setting up syntax highlighting for .sage files
-- ways to make Sage execute fragments of code
+- setting up syntax highlighting for .py, .pyx, .spyx, .sage files
 - telling the editor or IDE to use Sage's Python
+- making Sage execute fragments of code
 
 Maybe one ticket per IDE or text editor?
 
 Existing material:
 
 - some wiki pages
-- some answers to questions, or discussions, on
-  - Ask Sage
-  - sage-devel
-  - sage-support
-  - Stack Overflow
+  - https://wiki.sagemath.org/PyCharm
+  - https://wiki.sagemath.org/SpyderInstructions
 
+- some answers to questions, or discussions,
+  on Ask Sage, sage-devel, sage-support, Stack Overflow
+
+  - [Ask Sage question 39742: Make PyCharm recognise the Sage Python interpreter](https://ask.sagemath.org/question/39742)
+  - [Stack Overflow question 47378147: Use PyCharm (or any Windows IDE) to run SageMath scripts](https://stackoverflow.com/q/47378147)
+  - [sage-devel discussion, 2017-12, started by PHPirate: Running Sage from an IDE like PyCharm on Windows](https://groups.google.com/d/topic/sage-devel/iKQY5Em-QpY/discussion)
+  - [Ask Sage question 38750: How to use Sage in PyCharm in Ubuntu](https://ask.sagemath.org/question/38750)
 Related:
 
 - Syntax highlighting mode for Sage syntax,
slel commented

Description changed:

--- 
+++ 
@@ -42,7 +42,7 @@
 
   - [Ask Sage question 39742: Make PyCharm recognise the Sage Python interpreter](https://ask.sagemath.org/question/39742)
   - [Stack Overflow question 47378147: Use PyCharm (or any Windows IDE) to run SageMath scripts](https://stackoverflow.com/q/47378147)
-  - [sage-devel discussion, 2017-12, started by PHPirate: Running Sage from an IDE like PyCharm on Windows](https://groups.google.com/d/topic/sage-devel/iKQY5Em-QpY/discussion)
+  - [sage-devel discussion, 2017-12: Running Sage from an IDE like PyCharm on Windows](https://groups.google.com/d/topic/sage-devel/iKQY5Em-QpY/discussion)
   - [Ask Sage question 38750: How to use Sage in PyCharm in Ubuntu](https://ask.sagemath.org/question/38750)
 Related:
 

Description changed:

--- 
+++ 
@@ -8,7 +8,7 @@
 - Spyder
 - Sublime Text
 - vi / vim
-- VSCode / vscodium
+- VSCode / vscodium - #30484
 
 and maybe others such as
 
comment:5

Maybe the part about vim could mention :set backupcopy=yes (see #21739) to avoid issues with the attach command (well, it's in my vimrc since 2015, but I don't know if it is still needed).

comment:6

Replying to @slel:

Maybe this is better done on the wiki, and the wiki should have
a summary page pointing to a page for each IDE or text editor.

-1 for wiki - it's unmaintainable

+1 for extending the developer documentation

slel commented

Description changed:

--- 
+++ 
@@ -44,8 +44,12 @@
   - [Stack Overflow question 47378147: Use PyCharm (or any Windows IDE) to run SageMath scripts](https://stackoverflow.com/q/47378147)
   - [sage-devel discussion, 2017-12: Running Sage from an IDE like PyCharm on Windows](https://groups.google.com/d/topic/sage-devel/iKQY5Em-QpY/discussion)
   - [Ask Sage question 38750: How to use Sage in PyCharm in Ubuntu](https://ask.sagemath.org/question/38750)
+
 Related:
 
-- Syntax highlighting mode for Sage syntax,
+- #30501: Syntax highlighting mode for Sage syntax,
   aware of the syntactic sugar Sage adds to Python syntax
 
+- [GitHub applies Python syntax highlighting to .sage and .sagews files](https://github.com/github/linguist/blob/402ff3e42bd93362727ab9083f66239b008ea29d/lib/linguist/languages.yml#L5025)
+
+- [Request to apply Python syntax highlighting to questions tagged sage on Stack Overflow](https://meta.stackoverflow.com/q/269537)

Description changed:

--- 
+++ 
@@ -53,3 +53,6 @@
 - [GitHub applies Python syntax highlighting to .sage and .sagews files](https://github.com/github/linguist/blob/402ff3e42bd93362727ab9083f66239b008ea29d/lib/linguist/languages.yml#L5025)
 
 - [Request to apply Python syntax highlighting to questions tagged sage on Stack Overflow](https://meta.stackoverflow.com/q/269537)
+
+- #30453 - Document `sage -tox`
+
slel commented

Description changed:

--- 
+++ 
@@ -56,3 +56,4 @@
 
 - #30453 - Document `sage -tox`
 
+- [Martin Albrecht: Conda, Jupyter and Emacs](https://martinralbrecht.wordpress.com/2020/08/23/conda-jupyter-and-emacs/)

Description changed:

--- 
+++ 
@@ -34,6 +34,7 @@
 Existing material:
 
 - some wiki pages
+  - https://wiki.sagemath.org/IDE
   - https://wiki.sagemath.org/PyCharm
   - https://wiki.sagemath.org/SpyderInstructions
 

Description changed:

--- 
+++ 
@@ -29,14 +29,15 @@
 - telling the editor or IDE to use Sage's Python
 - making Sage execute fragments of code
 
-Maybe one ticket per IDE or text editor?
+Workflow:
+
+- Collect info on the Wiki - https://wiki.sagemath.org/IDE
+
+- Migrate good info to the Sage developer guide, one ticket per IDE / text editor
 
 Existing material:
 
-- some wiki pages
-  - https://wiki.sagemath.org/IDE
-  - https://wiki.sagemath.org/PyCharm
-  - https://wiki.sagemath.org/SpyderInstructions
+- some wiki pages - see https://wiki.sagemath.org/IDE and linked pages
 
 - some answers to questions, or discussions,
   on Ask Sage, sage-devel, sage-support, Stack Overflow
comment:12

Replying to @slel:

New blog post:

I've added this to https://wiki.sagemath.org/Emacs

Description changed:

--- 
+++ 
@@ -5,7 +5,7 @@
 - Emacs + sage-shell-mode
 - JupyterLab text editor
 - PyCharm
-- Spyder
+- [Spyder](https://wiki.sagemath.org/SpyderInstructions) (Sage wiki)
 - Sublime Text
 - vi / vim
 - VSCode / vscodium - #30484

Description changed:

--- 
+++ 
@@ -2,7 +2,7 @@
 for using and/or developing Sage.
 
 - CodeMirror
-- Emacs + sage-shell-mode
+- [Emacs](https://wiki.sagemath.org/Emacs) with  `sage-shell-mode` or `emacs-jupyter` (Sage wiki)
 - JupyterLab text editor
 - PyCharm
 - [Spyder](https://wiki.sagemath.org/SpyderInstructions) (Sage wiki)

Description changed:

--- 
+++ 
@@ -5,6 +5,11 @@
 - [Emacs](https://wiki.sagemath.org/Emacs) with  `sage-shell-mode` or `emacs-jupyter` (Sage wiki)
 - JupyterLab text editor
 - PyCharm
+  - Just open SAGE_ROOT as a project
+  - [Ask Sage question 39742: Make PyCharm recognise the Sage Python interpreter](https://ask.sagemath.org/question/39742)
+  - [Stack Overflow question 47378147: Use PyCharm (or any Windows IDE) to run SageMath scripts](https://stackoverflow.com/q/47378147)
+  - [sage-devel discussion, 2017-12: Running Sage from an IDE like PyCharm on Windows](https://groups.google.com/d/topic/sage-devel/iKQY5Em-QpY/discussion)
+  - [Ask Sage question 38750: How to use Sage in PyCharm in Ubuntu](https://ask.sagemath.org/question/38750)
 - [Spyder](https://wiki.sagemath.org/SpyderInstructions) (Sage wiki)
 - Sublime Text
 - vi / vim
@@ -16,8 +21,12 @@
 - ATOM + Hydrogen
 - Blender
 - Eclipse
+- Geany 
+  - http://wiki.geany.org/config/sage
+  - http://docs.huihoo.com/geany/0.16/index.html#filetype-extensions
 - IDLE
 - Leo
+- [Netbeans](https://wiki.sagemath.org/Netbeans) (Sage wiki, 2010)
 - PyDev
 - PyScripter
 - Wing
@@ -42,11 +51,6 @@
 - some answers to questions, or discussions,
   on Ask Sage, sage-devel, sage-support, Stack Overflow
 
-  - [Ask Sage question 39742: Make PyCharm recognise the Sage Python interpreter](https://ask.sagemath.org/question/39742)
-  - [Stack Overflow question 47378147: Use PyCharm (or any Windows IDE) to run SageMath scripts](https://stackoverflow.com/q/47378147)
-  - [sage-devel discussion, 2017-12: Running Sage from an IDE like PyCharm on Windows](https://groups.google.com/d/topic/sage-devel/iKQY5Em-QpY/discussion)
-  - [Ask Sage question 38750: How to use Sage in PyCharm in Ubuntu](https://ask.sagemath.org/question/38750)
-
 Related:
 
 - #30501: Syntax highlighting mode for Sage syntax,

Description changed:

--- 
+++ 
@@ -40,19 +40,14 @@
 
 Workflow:
 
-- Collect info on the Wiki - https://wiki.sagemath.org/IDE
-
+- Collect info here on this Meta-ticket
 - Migrate good info to the Sage developer guide, one ticket per IDE / text editor
 
 Existing material:
-
-- some wiki pages - see https://wiki.sagemath.org/IDE and linked pages
-
 - some answers to questions, or discussions,
   on Ask Sage, sage-devel, sage-support, Stack Overflow
 
 Related:
-
 - #30501: Syntax highlighting mode for Sage syntax,
   aware of the syntactic sugar Sage adds to Python syntax
 
@@ -62,4 +57,4 @@
 
 - #30453 - Document `sage -tox`
 
-- [Martin Albrecht: Conda, Jupyter and Emacs](https://martinralbrecht.wordpress.com/2020/08/23/conda-jupyter-and-emacs/)
+

Description changed:

--- 
+++ 
@@ -41,7 +41,7 @@
 Workflow:
 
 - Collect info here on this Meta-ticket
-- Migrate good info to the Sage developer guide, one ticket per IDE / text editor
+- Migrate good info to the Sage developer guide in https://github.com/sagemath/sage-prod/blob/develop/src/doc/en/developer/workspace.rst, one ticket per IDE / text editor
 
 Existing material:
 - some answers to questions, or discussions,

Description changed:

--- 
+++ 
@@ -12,7 +12,7 @@
   - [Ask Sage question 38750: How to use Sage in PyCharm in Ubuntu](https://ask.sagemath.org/question/38750)
 - [Spyder](https://wiki.sagemath.org/SpyderInstructions) (Sage wiki)
 - Sublime Text
-- vi / vim
+- vi / [vim](https://wiki.sagemath.org/Tips) (Sage wiki)
 - VSCode / vscodium - #30484
 
 and maybe others such as
slel commented

Description changed:

--- 
+++ 
@@ -12,6 +12,7 @@
   - [Ask Sage question 38750: How to use Sage in PyCharm in Ubuntu](https://ask.sagemath.org/question/38750)
 - [Spyder](https://wiki.sagemath.org/SpyderInstructions) (Sage wiki)
 - Sublime Text
+  - [Stack Overflow question 36436785: Syntax highlighting for .sage in sublime](https://stackoverflow.com/q/36436785)
 - vi / [vim](https://wiki.sagemath.org/Tips) (Sage wiki)
 - VSCode / vscodium - #30484
 
@@ -48,13 +49,11 @@
   on Ask Sage, sage-devel, sage-support, Stack Overflow
 
 Related:
+
 - #30501: Syntax highlighting mode for Sage syntax,
   aware of the syntactic sugar Sage adds to Python syntax
+- [GitHub applies Python syntax highlighting to .sage and .sagews files](https://github.com/github/linguist/blob/402ff3e42bd93362727ab9083f66239b008ea29d/lib/linguist/languages.yml#L5025)
+- [Request to apply Python syntax highlighting to questions tagged sage on Stack Overflow](https://meta.stackoverflow.com/q/269537)
+- #30453 - Document `sage -tox`
+- [Ask Sage question 63071: create a file with .sage extension](https://ask.sagemath.org/question/63071)
 
-- [GitHub applies Python syntax highlighting to .sage and .sagews files](https://github.com/github/linguist/blob/402ff3e42bd93362727ab9083f66239b008ea29d/lib/linguist/languages.yml#L5025)
-
-- [Request to apply Python syntax highlighting to questions tagged sage on Stack Overflow](https://meta.stackoverflow.com/q/269537)
-
-- #30453 - Document `sage -tox`
-
-
comment:21

Replying to @slel:

Maybe this is better done on the wiki, and the wiki should have
a summary page pointing to a page for each IDE or text editor.

I agree with this. There are too many moving targets to keep this in the regular documentation, and crowd-sourcing it on the wiki will allow more flexibility. Anyone who is familiar with a particular editor (even including the losers those who use vi instead of emacs) can chime in as needed.