EmacsPython
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
* Using Python with Emacs [#ubab6009]
[[Back>PythonForScience]]
#contents
** Introduction [#rdea2d00]
In this page, I will explain ''my'' emacs environment for...
** My computer environment [#y460d76c]
Before going into the details of the emacs setting, I wil...
|Hardware| PC (Sony VAIO type Z)|
|OS|Ubuntu 9.10 (x86-64)|
** Additional packages [#qd13cce5]
In addition to Emacs, you need to install several packages.
I took most of the information from [[here>http://www.ema...
- python-mode.el -- This is the main guy. It defines a ma...
- IPython -- [[IPython>http://ipython.scipy.org/moin/]] i...
- Folding-mode -- Folding mode is a minor mode to allow f...
- ropemacs -- Rope is a refactoring library for Python. r...
- pylint -- pylint is a grammar checker for python. To us...
- auto-complete.el -- It provides intelligent automatic c...
- yasnippet -- Code snippet insertion. http://code.google...
** .emacs file [#d98b50a0]
Once you have installed the above packages, edit your .em...
Here is an example of [[.emacs>https://granite.phys.s.u-t...
** Usage [#x2b0c669]
*** Notation [#q756e278]
In this tutorial, key bindings are explained often. The n...
Example1:~
[C-c x]
The square brackets [] indicate that this is a suit of ke...
Example2:~
[C-c C-x]
In this case, you have to keep Ctrl pressed when you hit x.
Example3:~
[M-x TAB]
M indicates a meta key. On a PC, it is usually bound to A...
Example4:~
[M-C-x]
Here you are required to press Meta and Ctrl and x at the...
Example5:~
"[M-x] emacs-function"
[M-x] is used to invoke an emacs function. After pressing...
*** Starting up [#w72b1467]
When you invoke Emacs, supply "-py" option. This is neces...
*** Python-mode [#aec8b956]
If you open a file with an extension ".py", the python-mo...
- &color(green){Starting python shell:}; Hit [C-c !] to i...
my .emacs, ipython will be started instead of the standar...
- &color(green){Execute buffer:}; [C-c C-c]. The whole bu...
- &color(green){Execute a region:}; Select a region in th...
- &color(green){Execute a line:}; Hit [C-c l] to copy the...
- &color(green){Execute the current definition:}; [C-M-x]...
- &color(green){Execute cell:}; [C-c C-j]. Execute the cu...
- &color(green){Indent region:}; [C-c TAB]. Indent a regi...
- &color(green){Complete with ipython:}; [M-TAB]. Try to ...
- &color(green){Comment/Uncomment region:}; [M-;]. You ha...
- &color(green){Get help:}; [C-c C-h]. Run py-help-at-poi...
- &color(green){Get help on python-mode:}; Show help docu...
*** Ropemacs [#b8f3880a]
If you installed ropemacs, you have access to the followi...
- &color(green){Completion with rope:}; [M-/]. Perform a ...
- &color(green){Completion with rope feeling lucky:}; [M-...
- &color(green){Get help:}; [C-c d]. Show the documentati...
- &color(green){Go to the definition:}; [C-c g]. Open the...
- &color(green){Rename object:}; [C-c r r]. Rename the ob...
Since rope is a refactoring library, you can perform many...
*** Folding mode and cells [#b99ac7ca]
I use folding-mode to realize cell functionality in emacs...
#{{{ Cell title
#}}}
By using cells, you can improve the readability of your c...
''Warning:'' Currently, folding-mode and ropemacs are not...
- &color(green){Entering the folding mode}; "[M-x] foldin...
- &color(green){Open a cell:}; [C-c C-f C-s]
- &color(green){Close a cell:}; [C-c C-f C-x]
- &color(green){Open all the cells in the buffer:}; [C-c ...
- &color(green){Close all the cells in the buffer:}; [C-c...
- &color(green){Insert a blank cell:}; [C-c C-f C-c]
*** Flymake and pylint [#z5c15d20]
Flymake is a minor-mode to compile the current code on th...
The flymake mode is turned off by default. You can turn i...
*** Parentheses check [#tbf59015]
To show the correspondence of parentheses, turn on the sh...
"[M-x] blink-matching-open" may be also useful.
*** Window management [#x38ab5c9]
An emacs frame (window in a usual sense) can be divided i...
- &color(green){Enlarge window vertically:}; [C-x ^]
- &color(green){Enlarge window horizontally:}; [C-x }]
- &color(green){Shrink window horizontally:}; [C-x {]
- &color(green){Move to the next window:}; [C-x o]
Additionally I added the following key bindings in my .em...
(global-set-key "\C-x7" 'shrink-window)
(global-set-key "\C-xl" 'previous-multiframe-window)
- &color(green){Shrink window vertically:}; [C-x 7]
- &color(green){Move to the previous window:}; [C-x l]
*** Debugger [#v5f11e2a]
You can invoke python debugger (pdb) by "[M-x] pdb". You ...
After running pdb, you will see a pdb prompt and the sour...
You can set a break point in a file by going to the sourc...
終了行:
* Using Python with Emacs [#ubab6009]
[[Back>PythonForScience]]
#contents
** Introduction [#rdea2d00]
In this page, I will explain ''my'' emacs environment for...
** My computer environment [#y460d76c]
Before going into the details of the emacs setting, I wil...
|Hardware| PC (Sony VAIO type Z)|
|OS|Ubuntu 9.10 (x86-64)|
** Additional packages [#qd13cce5]
In addition to Emacs, you need to install several packages.
I took most of the information from [[here>http://www.ema...
- python-mode.el -- This is the main guy. It defines a ma...
- IPython -- [[IPython>http://ipython.scipy.org/moin/]] i...
- Folding-mode -- Folding mode is a minor mode to allow f...
- ropemacs -- Rope is a refactoring library for Python. r...
- pylint -- pylint is a grammar checker for python. To us...
- auto-complete.el -- It provides intelligent automatic c...
- yasnippet -- Code snippet insertion. http://code.google...
** .emacs file [#d98b50a0]
Once you have installed the above packages, edit your .em...
Here is an example of [[.emacs>https://granite.phys.s.u-t...
** Usage [#x2b0c669]
*** Notation [#q756e278]
In this tutorial, key bindings are explained often. The n...
Example1:~
[C-c x]
The square brackets [] indicate that this is a suit of ke...
Example2:~
[C-c C-x]
In this case, you have to keep Ctrl pressed when you hit x.
Example3:~
[M-x TAB]
M indicates a meta key. On a PC, it is usually bound to A...
Example4:~
[M-C-x]
Here you are required to press Meta and Ctrl and x at the...
Example5:~
"[M-x] emacs-function"
[M-x] is used to invoke an emacs function. After pressing...
*** Starting up [#w72b1467]
When you invoke Emacs, supply "-py" option. This is neces...
*** Python-mode [#aec8b956]
If you open a file with an extension ".py", the python-mo...
- &color(green){Starting python shell:}; Hit [C-c !] to i...
my .emacs, ipython will be started instead of the standar...
- &color(green){Execute buffer:}; [C-c C-c]. The whole bu...
- &color(green){Execute a region:}; Select a region in th...
- &color(green){Execute a line:}; Hit [C-c l] to copy the...
- &color(green){Execute the current definition:}; [C-M-x]...
- &color(green){Execute cell:}; [C-c C-j]. Execute the cu...
- &color(green){Indent region:}; [C-c TAB]. Indent a regi...
- &color(green){Complete with ipython:}; [M-TAB]. Try to ...
- &color(green){Comment/Uncomment region:}; [M-;]. You ha...
- &color(green){Get help:}; [C-c C-h]. Run py-help-at-poi...
- &color(green){Get help on python-mode:}; Show help docu...
*** Ropemacs [#b8f3880a]
If you installed ropemacs, you have access to the followi...
- &color(green){Completion with rope:}; [M-/]. Perform a ...
- &color(green){Completion with rope feeling lucky:}; [M-...
- &color(green){Get help:}; [C-c d]. Show the documentati...
- &color(green){Go to the definition:}; [C-c g]. Open the...
- &color(green){Rename object:}; [C-c r r]. Rename the ob...
Since rope is a refactoring library, you can perform many...
*** Folding mode and cells [#b99ac7ca]
I use folding-mode to realize cell functionality in emacs...
#{{{ Cell title
#}}}
By using cells, you can improve the readability of your c...
''Warning:'' Currently, folding-mode and ropemacs are not...
- &color(green){Entering the folding mode}; "[M-x] foldin...
- &color(green){Open a cell:}; [C-c C-f C-s]
- &color(green){Close a cell:}; [C-c C-f C-x]
- &color(green){Open all the cells in the buffer:}; [C-c ...
- &color(green){Close all the cells in the buffer:}; [C-c...
- &color(green){Insert a blank cell:}; [C-c C-f C-c]
*** Flymake and pylint [#z5c15d20]
Flymake is a minor-mode to compile the current code on th...
The flymake mode is turned off by default. You can turn i...
*** Parentheses check [#tbf59015]
To show the correspondence of parentheses, turn on the sh...
"[M-x] blink-matching-open" may be also useful.
*** Window management [#x38ab5c9]
An emacs frame (window in a usual sense) can be divided i...
- &color(green){Enlarge window vertically:}; [C-x ^]
- &color(green){Enlarge window horizontally:}; [C-x }]
- &color(green){Shrink window horizontally:}; [C-x {]
- &color(green){Move to the next window:}; [C-x o]
Additionally I added the following key bindings in my .em...
(global-set-key "\C-x7" 'shrink-window)
(global-set-key "\C-xl" 'previous-multiframe-window)
- &color(green){Shrink window vertically:}; [C-x 7]
- &color(green){Move to the previous window:}; [C-x l]
*** Debugger [#v5f11e2a]
You can invoke python debugger (pdb) by "[M-x] pdb". You ...
After running pdb, you will see a pdb prompt and the sour...
You can set a break point in a file by going to the sourc...
ページ名: