Emacs:防止在滚动屏幕时光标移动 [英] Emacs: prevent cursor movement when scrolling off of the screen

查看:401
本文介绍了Emacs:防止在滚动屏幕时光标移动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在检查emacs中的一些代码,它们有一系列的for循环,跨越几页。作者做的缩进很差,因此很难判断循环开始和结束的位置。我使用高亮括号模式来找到哪里循环。然而,通常情况下,该循环覆盖几页代码。因此,每当我滚动查看更多的代码括号的颜色改变,我不能找到循环结束的地方。我已经阅读其他的关于使用标记和多窗口滚动的帖子,但这似乎不工作在我的情况。还锁定光标在屏幕上的位置是没有帮助的,因为它仍然随屏幕移动。任何建议或建议?

I am reviewing some code in emacs that has a series of for loops that span several pages. The indentations done by the author are poor so it is not easy to tell where loops begin and end. I am using the highlight parenthesis mode to find where loops. However, it is often the case that the loop covers a few pages of code. Thus whenever I scroll to see more code the colors of the parenthesis change and I can't find where the loop ends. I've read other's posts about using mark and multi-window scrolling but this doesn't seem to work in my situation. Also locking the cursor position on the screen isn't helpful since it still moves with the screen. Any suggestions or advice?

推荐答案

您可以使用 forward-list CMn )和 backward-list CMp )前进和后退在括号组。 (也尝试 forward-sexp CMf )和 backward-sexp CMb ))。

You can use forward-list (C-M-n) and backward-list (C-M-p) to navigate forward and backward over a parenthetical group. (Also try forward-sexp (C-M-f) and backward-sexp (C-M-b)).

查看 EmacsWiki on Navigating Parentheses 匹配paretheses上的Emacs手动节点此SO螺纹在匹配括号上。

这篇关于Emacs:防止在滚动屏幕时光标移动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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