我可以在 Sublime Text 2 中保存折叠的代码吗? [英] Can I save collapsed code in Sublime Text 2?

查看:44
本文介绍了我可以在 Sublime Text 2 中保存折叠的代码吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以忘记所有看起来不错的代码:

Have code I can forget about all looking nice:

但是,在关闭文件并重新打开它时:

However, upon closing the file and reopening it:

我怎样才能折叠这个我多年都不会编辑的代码(希望如此!)并无限期地隐藏它?

How can I collapse this code I'm not going to edit for years(hopefully!) and keep it hidden indefinitely?

推荐答案

我认为 BufferScroll 插件可以满足您的需求.

I think the BufferScroll plugin will do what you want.

Buffer Scroll 是一个简单的 Sublime Text 插件,它可以记住和恢复滚动、光标位置、选择、标记、书签、折叠、选定的语法和可选的配色方案,当你打开一个文件.还会记住不同的数据,具体取决于文件在应用程序中的位置(window1 中的示例 file1 有滚动第 30 行,window2 中的文件 1 在第 40 行滚动)

Buffer Scroll is a simple Sublime Text plug-in which remembers and restores the scroll, cursor positions, also the selections, marks, bookmarks, foldings, selected syntax and optionally the colour scheme, when you open a file. Will also remember different data depending the position of the file in the application (example file1 in window1 has scroll line 30, file1 in window2 has scroll in line 40)

此外,通过首选项,允许同步滚动、书签、复制视图之间的标记和折叠,实时.

Also, via preferences, allows to enable syncing of scroll, bookmarks, marks and folds between cloned views, live.

更新:

要在 ST2 上安装此软件包,您必须将存储库添加到您的 PackageControl 用户设置中:

To install this package on ST2, you have to add the repository to your PackageControl user settings:

"repositories":
    [
        "https://github.com/titoBouzout/BufferScroll"
    ]

现在您应该能够从 ST2 进行标准安装.

Now you should be able to do a standard install from ST2.

这篇关于我可以在 Sublime Text 2 中保存折叠的代码吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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