[英]In VS code, I want the down arrow take me to end of line, if I'm in the last line of a cell, but at the end of the last line, go to next cell
In jupyter lab in anaconda:在 anaconda 的 jupyter 实验室中:
#1) The down arrow generally takes you one line down. #1) 向下箭头通常会将您向下移动一行。
#2) Unless you are at the last line of the cell, in which case it takes you to the end of the line. #2) 除非您位于单元格的最后一行,否则它将带您到行尾。
#3) Pressing the down arrow while at the end of the last line, will take you to the next cell. #3) 在最后一行的末尾按向下箭头,将带您到下一个单元格。
In VS code, by default, #2 doesn't happen.在 VS 代码中,默认情况下,#2 不会发生。 How can I make it happen, while keeping #1 and #3?
我怎样才能做到这一点,同时保持#1和#3? I managed to get #2 to happen, using this answer from a similar question:
我设法让#2发生,使用来自类似问题的答案:
For cursor to go from the beginning of the last line to the end of it when pressing arrow down (↓) instead of jumping to the next cell you should open Keyboard Shortcuts (File > Preferences > Keyboard Shortcuts [Ctrl+K Ctrl+S]) and remove or change bindings for "Notebook: Focus Next Cell Editor".对于 cursor 到 go,当按下向下箭头 (↓) 而不是跳到下一个单元格时,您应该打开键盘快捷键(文件 > 首选项 > 键盘快捷键 [Ctrl+K Ctrl+S] ) 并删除或更改“Notebook: Focus Next Cell Editor”的绑定。 Similarly you should change bindings for "Notebook: Focus Previous Cell Editor" if you want the same functionality for the up arrow (↑).
同样,如果您希望向上箭头 (↑) 具有相同的功能,您应该更改“笔记本:聚焦上一个单元格编辑器”的绑定。
but it also removed #3.但它也删除了#3。 I would also like for it to work when using the up arrow.
我也希望它在使用向上箭头时工作。
The first and third items you proposed are already satisfied in vscode.你提出的第一项和第三项在 vscode 中已经满足了。
For the second item, move to the beginning/end of the line.对于第二项,移动到行的开头/结尾。 I suggest you use Home/End according to the keyboard reference sheets to move quickly.
我建议您根据键盘参考表使用Home/End快速移动。
You can modify it in the keyboard shortcuts:您可以在键盘快捷键中修改它:
But please do not use ↓
, because it conflicts with moving line down as you mentioned first item.但请不要使用
↓
,因为它与您提到的第一项向下移动线相冲突。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.