Re:需要特殊编辑器支持缩进。

编程入门 行业动态 更新时间:2024-10-10 23:25:03
本文介绍了Re:需要特殊编辑器支持缩进。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

Almar Klein写道:

嗨Eric, 首先,我喜欢你的主动权。

没有什么比自我利益更能推动一个人的主动权了。 :-) 14年, 语音识别和计数。我很期待明年受伤的15周年.... 另一项举措是将语音识别环境导出到Linux 上下文。简而言之,他决定在Windows上应用程序,它将网络隧道传输到Linux机器上,并允许您剪切和粘贴来自Linux的b $ b。应用。我绝对可以使用一些高质量的志愿者 天赋来完成这项工作。这将使生活质量大大降低,而b $ b禁用开发人员。支持NaturallySpeaking的葡萄酒 项目中的人们也可以使用这项工作。

我不确定我是不是你的答案是正确的,但是你不能只是在每一行用冒号结束后增加缩进吗? 这就是我在编辑器中的表现。然后,用户只需要 来指定何时减少缩进。

这里有一个问题的例子: class foo(object): def cat (个体经营) self.x = 1 def狗 self.x = 2 这是合法的Python,但99%的时间并不是你需要的。没有 提示给编辑告诉它让我知道我真正想要的是什么: class foo(object): def cat(self) self.x = 1 def dog self.x = 2 所以应该有一种机制来说缩进先前 定义的水平。对于它的价值,这将转化为语音识别 arm in vocola pseudocode new method =< def indent> def ^ (自我):{enter}""" {enter}""" {enter}< srch backwards 并删除^> 这将允许我创建一个方法定义并让我回到一个地方 我可以说方法名称。还有其他的东西可以像 一样完成,允许你通过名称来修改各种功能,例如添加/删除 参数,修改数组索引等。如果你是不小心,我会在工作环境中通过缩小范围和相关视觉元素 来讨论 命令消除歧义。 我真的需要做这个UI的工作。 : - )

解决方案

11月14日,4:08 * pm,Eric S. Johansson < e ... @ harveewrote:

Almar Klein写道:

嗨Eric,

首先,我喜欢你的倡议。

驱使一个人的主动权并不像自我利益。 * :-) 14年, 语音识别和计数。 *我很期待明年受伤的15周年纪念.... 另一项举措是将语音识别环境导出到Linux 上下文。 *简而言之,他决定在Windows上应用程序,它将网络隧道传输到Linux机器上,并允许您剪切和粘贴 Linux应用程序。 *我绝对可以使用一些高质量的志愿者 天赋来完成这项工作。 *它会使生活质量差异很大,而且b $ b禁用了开发人员。 * *这项工作也适用于支持* NaturallySpeaking的葡萄酒 项目中的人们。

我不是确定我是否正确地理解你,但是你不能只是在每一行用冒号结束后增加缩进吗? 这就是我怎么做的我的编辑。然后,用户只需要 来指定何时减少缩进。

这里有一个问题的例子: class foo(object): * * def cat(self) * * * * self.x = 1 * * * * def dog * * * * * * self.x = 2 这是合法的Python,但99%的时间并不是你所需要的。 *没有 提示给编辑告诉它要突然给我我真正想要的东西: class foo(object): * * def cat(self) * * * * self.x = 1 * * def dog * * * * self.x = 2 因此应该有一种机制来说缩进先前 定义的级别。 *对于它的价值,这将转化为语音识别 arm in vocola pseudocode new * method =< def indent> def ^(self):{enter}""" {enter}""" {enter}< srch backwards 并删除^> 这将允许我创建一个方法定义并让我回到一个地方 我可以说方法名称。 *还有其他的东西可以像 一样,允许你通过名称修改各种功能,例如添加/删除 参数,修改数组索引等。*如果你不小心,我会在工作环境中通过缩小范围和相关的视觉元素 来讨论 命令消除歧义。 我真的需要做这个UI工作的工作。 * :-)

emacs中的退格键完全符合您的要求。你有没有试过 呢? 对于python.el,与Gnu Emacs一起分发: DEL(翻译自< backspace> ;)运行命令python-backspace, 这是`python.el`中的交互式编译List函数。 对于python-mode.e,分布式使用XEmacs(但可以使用Gnu Emacs): DEL(翻译自< backspace>)运行命令py-electric- 退格, 是`python-mode.el'中的交互式编译Lisp函数。

dr ****** @ gmail 写道:

11月14日,4 :08:00,Eric S. Johansson < e ... @ harveewrote:

> Almar Klein写道:

> ;>嗨Eric,首先,我喜欢你的倡议。

没有什么比自我利益更能推动一个人的主动权了。 :-) 14年的语音识别和计数。我很期待明年受伤的15周年.... 另一项举措是将语音识别环境导出到Linux 上下文。简而言之,他决定在Windows上运行,它将网络隧道传输到Linux机器,并允许您剪切和粘贴该Linux应用程序。我绝对可以使用一些高素质的志愿者才能完成这项工作。它将为残疾开发者带来巨大的生活质量差异。葡萄酒项目中支持NaturallySpeaking的人也可以使用这项工作。

>>我不确定我是否你没有正确地理解你,但是你不能只是在用冒号结束的每一行之后增加缩进吗?这就是我在编辑器中的表现。然后,用户只需要指定何时减少缩进。

这里有一个问题的例子: class foo(对象): def cat(self) self.x = 1 def狗 self.x = 2 这是合法的Python,但99%的时间并不是你所需要的。编辑没有提示告诉它我要真正想要的是什么: 类foo(对象): def cat(self) self.x = 1 def dog self.x = 2 所以应该有一种机制来说缩进前一级的水平 >定义" ;.对于它的价值,这将转化为vocola伪代码中 arm的语音识别 新方法=< def indent> def ^(self):{enter}" ;"" {enter}""" {enter}< srch backwards 并删除^> 这将允许我创建一个方法定义并把我回到某个地方我可以说出方法名称。还有其他的东西可以像那样允许你通过添加/删除参数,修改数组索引等名称来修改各种功能。如果你不小心,我会谈谈关于命令通过缩小范围和工作环境中的相关视觉元素消除歧义。 我真的需要一份工作来做这个UI的东西。 :-)

emacs中的退格键完全符合您的要求。你有没有试过 呢?

是的,它不能正常工作。请输入: class pet(object): """ """ def cat(self): """ """ 如果碗里的食物: self.empty = True def dog(self): """ """ 如果碗里的食物: self.empty = True else: self.bark_nonstop() 在方法cat的末尾,换行符将你放在左边缘并且 后续标签用self.empty排序。在那一点按退格键, 终止if。这是合理的行为,并且当分配给封闭块时,应该是有用的。发声。但请记住,我的目标是有一个选择正确的缩进水平的各种 选项,闭着眼睛。 说出很多东西以获得一点效果是危险的为了健康的一个人的声音 线,一个文本到语音的输出并不会让你知道什么排成一行。 $ b考虑到这个问题,我想知道你有什么价值,试着弄清楚你会给那些有点耳聋和打字员不好的人说些什么。 生成您想要的代码。如果你的喉咙疼得厉害,那就弄清楚你想用同样的 情况说什么。 --- eric

11月14日下午5:27 *,Eric S. Johansson < e ... @ harveewrote:

drobi ... @ gmail写道:

11月14日下午4:08,Eric S. Johansson < e ... @ harveewrote:

Almar Klein写道:嗨Eric,首先,我喜欢你的倡议。 驾驶一个人的主动权并不像自我利益。 * :-) 14年, 语音识别和计数。 *我很期待明年受伤的15周年....

另一项举措是将语音识别环境导出到Linux 上下文。 *简而言之,他决定在Windows上应用程序,它将网络隧道传输到Linux机器上,并允许您剪切和粘贴来自Linux的Linux b / b应用。 *我绝对可以使用一些高质量的志愿者 天赋来完成这项工作。 *它会使生活质量差异很大,而且b $ b禁用了开发人员。 * *这项工作也适用于支持* NaturallySpeaking的葡萄酒 项目中的人们。

>我不确定我是否能正确看到你,但可以''你只是在以冒号结束的每一行之后增加缩进吗?这就是我在编辑器中这样做的方式。然后用户只需要指定何时减少缩进。 这里是问题的一个例子: class foo(object): * * def cat(self) * * * * self.x = 1 * * * * def dog * * * * * * self.x = 2

这是合法的Python但99%的时间并不是你所需要的。 *没有 提示给编辑告诉它让我真正想要的是:

class foo(object): * * def cat(self) * * * * self.x = 1 * * def狗 * * * * self.x = 2

所以应该有一种机制来说缩进先前 定义的水平。 *对于它的价值,这将转化为语音识别 arm in vocola pseudocode to

new * method =< def indent> def ^(self):{enter}""" {enter}""" {enter}< srch向后 并删除^>

这将允许我创建方法定义并让我回到某个地方/> 我可以说方法名称。 *还有其他的东西可以像 一样,允许你通过名称修改各种功能,例如添加/删除 参数,修改数组索引等。*如果你不小心,我会通过范围缩减和工作环境中的相关视觉元素 来讨论 命令消歧。

我真的需要做这个UI工作的工作。 * :-)

emacs中的退格键完全符合您的要求。你有没有试过 呢?

是的,它无法正常工作。 *输入以下内容: class pet(object): * *""" * *" ;"" * * def cat(self): * * * *""" * * * *""" * * * *如果碗里的食物: * * * * * * self.empty = True * * def dog(self): * * * *""" * * * *""" * * * *如果碗里的食物: * * * * * * self.empty = True * * * *: * * * * * * self.bark_nonstop() *在方法cat的末尾,换行符将你置于左边缘并且a 后续标签*用self.empty排队。 *在该点按退格键, 终止if。 *这是合理的行为,并且当分配给关闭块时,应该是有用的。发声。 *但请记住,我的目标是拥有各种 选项,以便在我闭眼的情况下选择正确的缩进级别。 说多少才能获得一点效果是对一个人的健康造成危险 绳索,一个文本到语音的输出并不会让你知道什么排成一行。

我不明白。如果您不想终止if,为什么要打退格? ?你想发生什么事?

Almar Klein wrote:

Hi Eric, First of all, I like your initiative.

there''s nothing like self interest to drive one''s initiative. :-) 14 years with speech recognition and counting. I''m so looking to my 15th anniversary of being injured next year.... another initiative is exporting the speech recognition environment to the Linux context. In a nutshell, he dictated to application on Windows, it tunnels over the network to a Linux machine, and will allow you to cut and paste to and from that Linux application. I could definitely use some high quality volunteer talent for this effort. it would make a huge quality of life difference to disabled developers. This work would also be usable by the folks in the wine project who are supporting NaturallySpeaking.

I''m not sure if I undestand you correctly, but can''t you just increase indentation after each line that ends with a colon? That''s how I do it in my editor. The user would then only need to specify when to decrease indentation.

here''s an example of the problem: class foo( object): def cat(self) self.x=1 def dog self.x=2 this is legal Python but it''s not what you need 99% of the time. There is no cue to the editor to tell it to outdent to give me what I really want which is: class foo( object): def cat(self) self.x=1 def dog self.x=2 so there should be a mechanism for saying "indent the level of the previous definition". For what it''s worth, this would translate in speech recognition of arm in vocola pseudocode to new method = <def indent>def ^(self):{enter}"""{enter}"""{enter}<srch backwards and delete ^> which would allow me to create a method definition and put me back at a place where I can speak the method name. There''s other stuff in these be done like allowing you to modify various features by names such as adding/deleting arguments, modifying array indices etc. If you are not careful, I''ll talk about command disambiguation through scope reduction and the related visual elements in the working environment. I really need a job doing this UI stuff. :-)

解决方案

On Nov 14, 4:08*pm, "Eric S. Johansson" <e...@harveewrote:

Almar Klein wrote:

Hi Eric,

First of all, I like your initiative.

there''s nothing like self interest to drive one''s initiative. *:-) 14 years with speech recognition and counting. *I''m so looking to my 15th anniversaryof being injured next year.... another initiative is exporting the speech recognition environment to theLinux context. *In a nutshell, he dictated to application on Windows, it tunnels over the network to a Linux machine, and will allow you to cut and paste to and from that Linux application. *I could definitely use some high quality volunteer talent for this effort. * it would make a huge quality of life difference to disabled developers. * *This work would also be usable by the folks in the wine project who are supporting *NaturallySpeaking.

I''m not sure if I undestand you correctly, but can''t you just increase indentation after each line that ends with a colon? That''s how I do it in my editor. The user would then only need to specify when to decrease indentation.

here''s an example of the problem: class foo( object): * * def cat(self) * * * * self.x=1 * * * * def dog * * * * * * self.x=2 this is legal Python but it''s not what you need 99% of the time. *Thereis no cue to the editor to tell it to outdent to give me what I really want which is: class foo( object): * * def cat(self) * * * * self.x=1 * * def dog * * * * self.x=2 so there should be a mechanism for saying "indent the level of the previous definition". *For what it''s worth, this would translate in speech recognition of arm in vocola pseudocode to new *method = <def indent>def ^(self):{enter}"""{enter}"""{enter}<srch backwards and delete ^> which would allow me to create a method definition and put me back at a place where I can speak the method name. *There''s other stuff in these be done like allowing you to modify various features by names such as adding/deleting arguments, modifying array indices etc. *If you are not careful, I''ll talk about command disambiguation through scope reduction and the related visual elements in the working environment. I really need a job doing this UI stuff. *:-)

The backspace key in emacs does exactly what you want. Have you tried it? For python.el, distributed with Gnu Emacs: DEL (translated from <backspace>) runs the command python-backspace, which is an interactive compiled List function in `python.el` For python-mode.e, distributed with XEmacs (but usable with Gnu Emacs): DEL (translated from <backspace>) runs the command py-electric- backspace, which is an interactive compiled Lisp function in `python-mode.el''.

dr******@gmail wrote:

On Nov 14, 4:08 pm, "Eric S. Johansson" <e...@harveewrote:

>Almar Klein wrote:

>>Hi Eric,First of all, I like your initiative.

there''s nothing like self interest to drive one''s initiative. :-) 14 years withspeech recognition and counting. I''m so looking to my 15th anniversary of beinginjured next year....another initiative is exporting the speech recognition environment to the Linuxcontext. In a nutshell, he dictated to application on Windows, it tunnels overthe network to a Linux machine, and will allow you to cut and paste to and fromthat Linux application. I could definitely use some high quality volunteertalent for this effort. it would make a huge quality of life difference todisabled developers. This work would also be usable by the folks in the wineproject who are supporting NaturallySpeaking.

>>I''m not sure if I undestand you correctly, but can''t you justincrease indentation after each line that ends with a colon?That''s how I do it in my editor. The user would then only needto specify when to decrease indentation.

here''s an example of the problem:class foo( object): def cat(self) self.x=1 def dog self.x=2this is legal Python but it''s not what you need 99% of the time. There is nocue to the editor to tell it to outdent to give me what I really want which is:class foo( object): def cat(self) self.x=1 def dog self.x=2so there should be a mechanism for saying "indent the level of the previousdefinition". For what it''s worth, this would translate in speech recognition ofarm in vocola pseudocode tonew method = <def indent>def ^(self):{enter}"""{enter}"""{enter}<srch backwardsand delete ^>which would allow me to create a method definition and put me back at a placewhere I can speak the method name. There''s other stuff in these be done likeallowing you to modify various features by names such as adding/deletingarguments, modifying array indices etc. If you are not careful, I''ll talk aboutcommand disambiguation through scope reduction and the related visual elementsin the working environment.I really need a job doing this UI stuff. :-)

The backspace key in emacs does exactly what you want. Have you tried it?

yes and it doesn''t work right. Type this in: class pet (object): """ """ def cat(self): """ """ if food in bowl: self.empty = True def dog(self): """ """ if food in bowl: self.empty = True else: self.bark_nonstop() at the end of the method cat, a newline puts you at the left-hand margin and a subsequent tab lines you up with self.empty. Pressing backspace at that point, terminates the if. It''s reasonable behavior and should be useful when assigned to the "close block" utterance. But remember, my goal is to have a variety of options for selecting the correct level of indentation with my eyes closed. Speaking a lot to get a little effect is dangerous to the health of one''s vocal cords and, a text-to-speech output doesn''t let you know what lines up with what. for what it''s worth, in thinking about this problem, try to figure out what you would say to someone who is slightly deaf and a poor typist to get them to generate the code you want. Then figure out what you want to say in the same situation if you had a bad sore throat. ---eric

On Nov 14, 5:27*pm, "Eric S. Johansson" <e...@harveewrote:

drobi...@gmail wrote:

On Nov 14, 4:08 pm, "Eric S. Johansson" <e...@harveewrote:

Almar Klein wrote:Hi Eric,First of all, I like your initiative. there''s nothing like self interest to drive one''s initiative. *:-) 14 years with speech recognition and counting. *I''m so looking to my 15th anniversary of being injured next year....

another initiative is exporting the speech recognition environment to the Linux context. *In a nutshell, he dictated to application on Windows, it tunnels over the network to a Linux machine, and will allow you to cut and paste toand from that Linux application. *I could definitely use some high quality volunteer talent for this effort. * it would make a huge quality of life difference to disabled developers. * *This work would also be usable by the folks in the wine project who are supporting *NaturallySpeaking.

>I''m not sure if I undestand you correctly, but can''t you justincrease indentation after each line that ends with a colon?That''s how I do it in my editor. The user would then only needto specify when to decrease indentation. here''s an example of the problem: class foo( object): * * def cat(self) * * * * self.x=1 * * * * def dog * * * * * * self.x=2

this is legal Python but it''s not what you need 99% of the time. *There is no cue to the editor to tell it to outdent to give me what I really want which is:

class foo( object): * * def cat(self) * * * * self.x=1 * * def dog * * * * self.x=2

so there should be a mechanism for saying "indent the level of the previous definition". *For what it''s worth, this would translate in speech recognition of arm in vocola pseudocode to

new *method = <def indent>def ^(self):{enter}"""{enter}"""{enter}<srch backwards and delete ^>

which would allow me to create a method definition and put me back at a place where I can speak the method name. *There''s other stuff in these be done like allowing you to modify various features by names such as adding/deleting arguments, modifying array indices etc. *If you are not careful, I''ll talk about command disambiguation through scope reduction and the related visual elements in the working environment.

I really need a job doing this UI stuff. *:-)

The backspace key in emacs does exactly what you want. Have you tried it?

yes and it doesn''t work right. *Type this in: class pet (object): * * """ * * """ * * def cat(self): * * * * """ * * * * """ * * * * if food in bowl: * * * * * * self.empty = True * * def dog(self): * * * * """ * * * * """ * * * * if food in bowl: * * * * * * self.empty = True * * * * else: * * * * * * self.bark_nonstop() *at the end of the method cat, a newline puts you at the left-hand margin and a subsequent tab *lines you up with self.empty. *Pressing backspace at that point, terminates the if. *It''s reasonable behavior and should be useful when assigned to the "close block" utterance. *But remember, my goal is to have a variety of options for selecting the correct level of indentation with my eyes closed. Speaking a lot to get a little effect is dangerous to the health of one''svocal cords and, a text-to-speech output doesn''t let you know what lines up with what.

I don''t understand. If you don''t want to terminate the "if", why do you hit backspace? What is it that you would like to have happen?

更多推荐

Re:需要特殊编辑器支持缩进。

本文发布于:2023-11-07 19:13:02,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1567192.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:编辑器

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!