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

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

问题描述

我正在查看一些emacs中的一些代码,它们有一系列跨多页的for循环。作者所做的缩进是差的,所以告诉循环开始和结束是不容易的。我使用高亮括号模式来查找where循环。然而,通常情况下,循环覆盖了几页代码。因此,每当我滚动查看更多的代码时,括号中的颜色都会改变,我找不到循环结束的位置。我已经阅读了其他人关于使用标记和多窗口滚动的文章,但这似乎不适用于我的情况。在屏幕上也锁定光标位置是无用的,因为它仍然随着屏幕移动。任何建议或建议?

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 )和向后列表 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导航括号匹配的paretheses上的Emacs手动节点这个SO线上的匹配括号

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

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