Vim:暂时只显示特定的行

编程入门 行业动态 更新时间:2024-10-25 21:25:11
本文介绍了Vim:暂时只显示特定的行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

有时,在 Vim 中,我只想显示文件的特定部分(例如,特定方法)而隐藏其余部分.

Sometimes, in Vim, I want to show only a specific part of a file (for example, a specific method) while hiding the rest.

这有助于我专注于手头的问题.

This helps me to focus at the problem at hand.

我想这样做而不实际更改文件.知道如何做到这一点吗?

I would like to do so without actually changing the file. Any idea on how to do this?

干杯&问候,克拉斯

cheers & regards, Klaas

推荐答案

类似于前面提到的窄插件,还有 NrrwRgn.视觉选择区域,:NR,窗口被分割,所选区域在新窗口中被隔离.确实对编码非常有用.

Similar to the already mentioned narrow plug-in, there's NrrwRgn. Visual select the region, :NR and the window is split with the selected region isolated in the new window. Very useful for coding, indeed.

这篇关于Vim:暂时只显示特定的行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-27 18:09:53,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1159820.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:只显示   Vim

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!