在高亮括号下,我从 “{ ” 开始滚动屏幕想浏览至 “}”,然而光标却跟着翻页跑了,“}”还没找到“{ ”位置也跟丢了,这种情况大神是怎么解决的。
在高亮括号下,我从 “{ ” 开始滚动屏幕想浏览至 “}”,然而光标却跟着翻页跑了,“}”还没找到“{ ”位置也跟丢了,这种情况大神是怎么解决的。
|
wdFeb 10, 2019 via iPhone
1
我记得有一个按照括号移动的快捷键的 ctrl-alt-p/f 是不是看看
|
|
piminFeb 10, 2019 via Android
2
亲,我们这里建议您百度一下呢
|
|
wdFeb 10, 2019 via iPhone
5
@frylkrttj #4 这个似乎没办法达成。往下移动的时候,光标会尽量保持同列,但是如果你的括号不在一列上 那是没有办法的。据我经验,应该没有哪个编辑器会按你说的做吧?
|
|
wdFeb 10, 2019 via iPhone
7
不懂你这个需求。如果编辑器做成这样,那不是有人会觉得光标老自动跳吗?往下移动的时候会自动跳到括号那
|
|
wdFeb 10, 2019 via iPhone
11
@frylkrttj #10 「 Emacs: scroll buffer not point - Stack Overflow 」 https://stackoverflow.com/questions/8993183/emacs-scroll-buffer-not-point 这个试过吗。
|
|
wdFeb 10, 2019 via iPhone
14
你多按几次 Ctrl-u 1 Alt-v
|
|
wdFeb 11, 2019
16
https://www.gnu.org/software/emacs/manual/html_node/emacs/Scrolling.html
Some users like scroll commands to keep point at the same screen position, so that scrolling back to the same screen conveniently returns point to its original position. You can enable this behavior via the variable scroll-preserve-screen-position. If the value is t, Emacs adjusts point to keep the cursor at the same screen position whenever a scroll command moves it off-window, rather than moving it to the topmost or bottommost line. With any other non-nil value, Emacs adjusts point this way even if the scroll command leaves point in the window. This variable affects all the scroll commands documented in this section, as well as scrolling with the mouse wheel (see Mouse Commands); in general, it affects any command that has a non-nil scroll-command property. See Property Lists. 查了一下,可能这个 scroll-preserve-screen-position 对你有用,让你在再次滚动回来的时候,光标位于滚动前的那个位置,我感觉应该满足你的需求。 在你的配置文件里面增加一行 (setq scroll-preserve-screen-position t) 或者 (setq scroll-preserve-screen-position 'always) 这两个据说效果不一样,你都可以试试看。 |
|
wisetcOct 31, 2021 via iPhone
17
%解决问题,evil mode
|