(defun python
-
shell()
"
make a python shell
"
(interactive)
(
switch
-
to
-
buffer (make
-
comint
"
python
"
"
python
"
nil
"
-i
"
)))
(defun groovy
-
shell()
"
make a groovy shell
"
(interactive)
(
switch
-
to
-
buffer (make
-
comint
"
groovy
"
"
groovysh
"
nil)))
(defun perl
-
shell()
"
make a perl db shell
"
(interactive)
(
switch
-
to
-
buffer (make
-
comint
"
perl
"
"
perl
"
nil
"
-d -e''
"
)))
(require
'
ruby-mode)
(require
'
inf-ruby)
(require
'
jde)
如果你是emacs用户,这几个定制是相当必要的。。
没有什么shell的操控能力能
与emacs的comint相比~(想想emacs内置的搜索,mark系统,macro系统)
不光是perl/python/XXXX,用这个方法可以轻易地将emacs强大的文本编辑
功能施加到任何一个interactive shell当中。
另外多唠叨几句:
通过使用,觉得python-shell表现是最好的(加上-i之后)
再来第二名是inf-ruby模块中的run-ruby
区区最敬爱的perl君,没有内置shell,只能用pdb来代替,
这样一来对表达式求值就没前面两位那么生猛了,算第三吧~
第四名到jde-bsh-run。(每行都要用print(x)来打印太恶心了)
最后一名是赫赫有名的groovy,因为每次go完之后就丢掉所有的bindings比
bean shell还恶心~~~
这些shell感觉做得都不如erlang.el好。。但是因为小e还不太红,
就不提她了。