Sublime Text:如何隐藏所有代码并仅显示注释 [英] Sublime Text: How to hide all code and show only comments

查看:82
本文介绍了Sublime Text:如何隐藏所有代码并仅显示注释的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我们有这样的代码:

Lets say we have code like this:

//description 1
code block 1 {
..
..
}

//description 2

code block 2 {
..
..
}

在 sublime text 中,如何只显示注释而隐藏所有代码?

In sublime text, how to show only the comments and hide all the code?

推荐答案

在您用作示例的代码中,您可以全部折叠"代码.

In a code like the one you've used as example, you can just "Fold All" the code.

在任何函数之外设置光标,然后:Ctrl + K + Ctrl + 1

Set the cursor outside any function then: Ctrl + K + Ctrl + 1

那么您将只看到注释和函数/结构签名(隐藏主体).

then you'll see only the comments and the function/struct signiatures (hidding the body).

这篇关于Sublime Text:如何隐藏所有代码并仅显示注释的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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