使用emacs / wordstar键绑定进行Python编辑。 [英] Python editing with emacs/wordstar key bindings.

查看:69
本文介绍了使用emacs / wordstar键绑定进行Python编辑。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人将emacs与WordStar键绑定和python

模式一起使用?我担心Wordstar的编辑键命令被刻录到我的

指关节!


我想用emacs来编辑Python但是我有(2)

问题。


1)当我加载.py文件时,emacs会自动覆盖我的wordstar模式

使用python-mode,强制所有键绑定回到emacs本机键。

为什么?


为什么python-mode关心什么密钥绑定正在使用中?


2)我们得到< tab>用于块缩进而不是我喜欢的空格。


是否有一个更好的python模式脚本我应该使用除了emacs附带的

默认值?


任何提示/提示表示赞赏。

Thomas Bartkus

解决方案

Thomas Bartkus <第*********** @ comcast.net>写道:

[...]


1)当我加载.py文件时,emacs会自动覆盖我的wordstar模式
-mode,强制所有的键绑定回到emacs本机键。
为什么?

为什么python-mode会关心使用什么键绑定?


不知道。很奇怪。


2)我们得到< tab>用于块缩进而不是我喜欢的空格。


这很奇怪,我得到四个空格除非我正在编辑现有的文件

已经使用了其他约定,在这种情况下python - 模式是

通常很聪明,可以搞清楚。我没有使用wordstar模式。


是否有一个更好的python模式脚本我应该使用除了emacs附带的
默认值?



我假设您使用的是X / Emacs,而不是GNU Emacs?


IIRC,还有一个单独的现在是python-mode的sourceforge项目,所以

你可以尝试一下这个版本。

John


" Thomas Bartkus" <第*********** @ comcast.net>写道:

[...]


1)当我加载.py文件时,emacs会自动覆盖我的wordstar模式
-mode,强制所有键绑定回到emacs本机键。
为什么?

为什么python-mode应该关注哪些键绑定正在使用?

2 )我们得到< tab> for block indentation而不是我喜欢的空格。



[...]


你有没有试过emacs邮件列表/新闻组这些点?你可以在那里获得更多帮助......

John


Thomas Bartkus写道:< blockquote class =post_quotes>有没有人将emacs与WordStar键绑定和python
模式一起使用?我担心Wordstar编辑关键命令会将R / O刻录到我的指关节!


老Borland C用户?


我想使用emacs进行Python编辑,但我有(2)
1)当我加载一个.py文件时,emacs会自动覆盖我的wordstar-mode
和python-mode,强制所有的键绑定回到emacs本机键。 />为什么?

为什么python-mode应该关注哪些键绑定正在使用?


Python和wordstar都是主要模式。当加载python-mode时,

它取代了(不是位于wordstar-mode之上);你不能同时加载两种主要的

模式。


如果你只想使用wordstar模式,你可以阻止Emacs

通过在第一行放置 - * - mode:wordstar - * - 加载python模式
Python文件的
(如果使用#!则为第二行)。或者,您可以从.emacs文件中的auto-mode-alist和interpreter-mode-alists

中移除python模式,我将其留作练习。


2)我们得到< tab>用于块缩进而不是我喜欢的空格。


在.emacs文件中:


(setq indent-tabs-mode nil)


是否有一个更好的python模式脚本我应该使用除了emacs附带的
默认值?




我怀疑是否有一个解决了你的问题。

Carl Banks


Does anyone use emacs together with both WordStar key bindings and python
mode? I''m afraid that Wordstar editing key commands are burned R/O into my
knuckles!

I would like to play with emacs for Python editing but I''m having (2)
problems.

1) When I load a .py file, emacs automatically overrides my wordstar-mode
with python-mode, forcing all the keybindings back to emacs native keys.
Why?

Why should a python-mode care what key bindings are in use?

2) We get <tab> for block indentation instead of the spaces I prefer.

Is there a better python-mode script I should be using other than the
default that came with emacs?

Any tips/hints appreciated.
Thomas Bartkus

解决方案

"Thomas Bartkus" <th***********@comcast.net> writes:
[...]


1) When I load a .py file, emacs automatically overrides my wordstar-mode
with python-mode, forcing all the keybindings back to emacs native keys.
Why?

Why should a python-mode care what key bindings are in use?
No idea. Quite odd.

2) We get <tab> for block indentation instead of the spaces I prefer.
That''s odd, I get four spaces unless I''m editing an existing file that
already uses some other convention, in which case python-mode is
usuall smart enough to figure that out. I don''t use wordstar-mode.

Is there a better python-mode script I should be using other than the
default that came with emacs?



I assume you''re using X/Emacs, then, rather than GNU Emacs?

IIRC, there''s a separate sourceforge project for python-mode now, so
you could give that version a try.
John


"Thomas Bartkus" <th***********@comcast.net> writes:
[...]


1) When I load a .py file, emacs automatically overrides my wordstar-mode
with python-mode, forcing all the keybindings back to emacs native keys.
Why?

Why should a python-mode care what key bindings are in use?

2) We get <tab> for block indentation instead of the spaces I prefer.


[...]

Have you tried an emacs mailing list / newsgroup re these points? You
might get more help there...
John


Thomas Bartkus wrote:

Does anyone use emacs together with both WordStar key bindings and python
mode? I''m afraid that Wordstar editing key commands are burned R/O into my
knuckles!
Old Borland C user?

I would like to play with emacs for Python editing but I''m having (2)
problems.

1) When I load a .py file, emacs automatically overrides my wordstar-mode
with python-mode, forcing all the keybindings back to emacs native keys.
Why?

Why should a python-mode care what key bindings are in use?
Python and wordstar are both major modes. When python-mode is loaded,
it replaces (not sits atop of) wordstar-mode; you can''t have two major
modes loaded at the same time.

If you want just want to use wordstar mode, you can prevent Emacs from
loading python mode by putting -*- mode: wordstar -*- on the first line
of the Python file (or second line if it uses a #!). Or, you could
remove python mode from the auto-mode-alist and interpreter-mode-alists
in your .emacs file, which I leave as an exercise.

2) We get <tab> for block indentation instead of the spaces I prefer.
In your .emacs file:

(setq indent-tabs-mode nil)

Is there a better python-mode script I should be using other than the
default that came with emacs?



I doubt there''s one that solves your problem.
Carl Banks


这篇关于使用emacs / wordstar键绑定进行Python编辑。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆