简体   繁体   English

蚀:使“向下”键到最后一行(如果它的最后一行)

[英]eclipse: make 'down' key go to end of line IF its the last line

simple eclipse question: is there a way i can make the 'down' key move to the end of the line (like the 'end' key binding) IF im editing the last line of the file (so it continues to behave like before, if its not the last line of the file)? 一个简单的日食问题:如果我在编辑文件的最后一行时,有没有办法使“向下”键移动到该行的末尾(例如“结束”键绑定)(因此它的行为仍像以前一样, (如果不是文件的最后一行)?

pretty much like visual studio works, move up and down lines if its not the last line, but acts like 'end' if its the last line. 就像Visual Studio的工作原理一样,如果不是最后一行,则上下移动,但如果是最后一行,则类似于“结束”。 thanks. 谢谢。

Not with the eclipse as it is currently distributed: a command like "Line Down", associated to the key, will always move down the lines, not jump at the end of one. 与当前分发的日食不同:与键关联的“ Line Down”之类的命令将始终沿行向下移动,而不跳到一行的末尾。

You would need to define your own keyboard shortcut , like the one describe in this Eclipse wiki entry , associated to your own key-binding configuration . 您将需要定义自己的键盘快捷方式 ,如该Eclipse Wiki条目中描述的那样,该快捷方式与您自己的键绑定配置相关联。 It would be similar to: 它类似于:

   <extension
         point="org.eclipse.ui.bindings">
      <key
            commandId="org.eclipse.ui.examples.contributions.view.edit"
            contextId="org.eclipse.ui.examples.contributions.view.context"
            sequence="ARROW_DOWN"
            schemeId="org.eclipse.ui.examples.contributions.scheme">
      </key>
   </extension>

See also the help page . 另请参阅帮助页面

then you would run your patched version of eclipse, with the relevant action taken when ARROW_DOWN is pressed. 那么您将运行修补版本的eclipse,并在按下ARROW_DOWN时执行相关操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM