ctrl+shift+p filters: :st2 :st3 :win :osx :linux
浏览

Auto Fold Code

Vasily-X ST3

这是一个 Sublime Text 软件包,可以自动保存和恢复文件中的折叠代码区域。

详细信息

  • 1.4.0
  • github.com
  • github.com
  • 3年前
  • 2小时前
  • 7年前

安装次数

  • 总计 9K
  • Win 6K
  • Mac 2K
  • Linux 2K
8月6日 8月5日 8月4日 8月3日 8月2日 8月1日 7月31日 7月30日 7月29日 7月28日 7月27日 7月26日 7月25日 7月24日 7月23日 7月22日 7月21日 7月20日 7月19日 7月18日 7月17日 7月16日 7月15日 7月14日 7月13日 7月12日 7月11日 7月10日 7月9日 7月8日 7月7日 7月6日 7月5日 7月4日 7月3日 7月2日 7月1日 6月30日 6月29日 6月28日 6月27日 6月26日 6月25日 6月24日 6月23日 6月22日
Windows 1 2 1 0 0 0 2 1 2 0 1 0 0 1 1 1 0 1 1 4 1 1 2 0 0 2 1 1 1 2 0 1 1 2 1 0 2 2 1 1 2 2 2 2 0 2
Mac 1 1 0 0 0 0 0 0 3 0 0 2 1 0 0 0 0 0 0 3 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 2 0 1 0 0 0 0 0 0 0
Linux 0 0 1 0 0 0 0 0 1 1 0 1 0 1 1 1 0 0 0 0 0 0 0 0 0 2 0 1 0 0 1 0 0 0 0 0 0 2 1 0 0 1 0 1 1 3
02468月6日8月3日7月31日7月28日7月25日7月22日7月19日7月16日7月13日7月10日7月7日7月4日7月1日6月28日6月25日6月22日8月6日 Linux: 0 Mac: 1 Windows: 18月5日 Linux: 0 Mac: 1 Windows: 28月4日 Linux: 1 Mac: 0 Windows: 18月3日 Linux: 0 Mac: 0 Windows: 08月2日 Linux: 0 Mac: 0 Windows: 08月1日 Linux: 0 Mac: 0 Windows: 07月31日 Linux: 0 Mac: 0 Windows: 27月30日 Linux: 0 Mac: 0 Windows: 17月29日 Linux: 1 Mac: 3 Windows: 27月28日 Linux: 1 Mac: 0 Windows: 07月27日 Linux: 0 Mac: 0 Windows: 17月26日 Linux: 1 Mac: 2 Windows: 07月25日 Linux: 0 Mac: 1 Windows: 07月24日 Linux: 1 Mac: 0 Windows: 17月23日 Linux: 1 Mac: 0 Windows: 17月22日 Linux: 1 Mac: 0 Windows: 17月21日 Linux: 0 Mac: 0 Windows: 07月20日 Linux: 0 Mac: 0 Windows: 17月19日 Linux: 0 Mac: 0 Windows: 17月18日 Linux: 0 Mac: 3 Windows: 47月17日 Linux: 0 Mac: 0 Windows: 17月16日 Linux: 0 Mac: 0 Windows: 17月15日 Linux: 0 Mac: 0 Windows: 27月14日 Linux: 0 Mac: 0 Windows: 07月13日 Linux: 0 Mac: 0 Windows: 07月12日 Linux: 2 Mac: 0 Windows: 27月11日 Linux: 0 Mac: 0 Windows: 17月10日 Linux: 1 Mac: 1 Windows: 17月9日 Linux: 0 Mac: 1 Windows: 17月8日 Linux: 0 Mac: 0 Windows: 27月7日 Linux: 1 Mac: 0 Windows: 07月6日 Linux: 0 Mac: 0 Windows: 17月5日 Linux: 0 Mac: 0 Windows: 17月4日 Linux: 0 Mac: 0 Windows: 27月3日 Linux: 0 Mac: 0 Windows: 17月2日 Linux: 0 Mac: 1 Windows: 07月1日 Linux: 0 Mac: 2 Windows: 26月30日 Linux: 2 Mac: 0 Windows: 26月29日 Linux: 1 Mac: 1 Windows: 16月28日 Linux: 0 Mac: 0 Windows: 16月27日 Linux: 0 Mac: 0 Windows: 26月26日 Linux: 1 Mac: 0 Windows: 26月25日 Linux: 0 Mac: 0 Windows: 26月24日 Linux: 1 Mac: 0 Windows: 26月23日 Linux: 1 Mac: 0 Windows: 06月22日 Linux: 3 Mac: 0 Windows: 28月6日 Linux: 0 Mac: 1 Windows: 18月5日 Linux: 0 Mac: 1 Windows: 28月4日 Linux: 1 Mac: 0 Windows: 18月3日 Linux: 0 Mac: 0 Windows: 08月2日 Linux: 0 Mac: 0 Windows: 08月1日 Linux: 0 Mac: 0 Windows: 07月31日 Linux: 0 Mac: 0 Windows: 27月30日 Linux: 0 Mac: 0 Windows: 17月29日 Linux: 1 Mac: 3 Windows: 27月28日 Linux: 1 Mac: 0 Windows: 07月27日 Linux: 0 Mac: 0 Windows: 17月26日 Linux: 1 Mac: 2 Windows: 07月25日 Linux: 0 Mac: 1 Windows: 07月24日 Linux: 1 Mac: 0 Windows: 17月23日 Linux: 1 Mac: 0 Windows: 17月22日 Linux: 1 Mac: 0 Windows: 17月21日 Linux: 0 Mac: 0 Windows: 07月20日 Linux: 0 Mac: 0 Windows: 17月19日 Linux: 0 Mac: 0 Windows: 17月18日 Linux: 0 Mac: 3 Windows: 47月17日 Linux: 0 Mac: 0 Windows: 17月16日 Linux: 0 Mac: 0 Windows: 17月15日 Linux: 0 Mac: 0 Windows: 27月14日 Linux: 0 Mac: 0 Windows: 07月13日 Linux: 0 Mac: 0 Windows: 07月12日 Linux: 2 Mac: 0 Windows: 27月11日 Linux: 0 Mac: 0 Windows: 17月10日 Linux: 1 Mac: 1 Windows: 17月9日 Linux: 0 Mac: 1 Windows: 17月8日 Linux: 0 Mac: 0 Windows: 27月7日 Linux: 1 Mac: 0 Windows: 07月6日 Linux: 0 Mac: 0 Windows: 17月5日 Linux: 0 Mac: 0 Windows: 17月4日 Linux: 0 Mac: 0 Windows: 27月3日 Linux: 0 Mac: 0 Windows: 17月2日 Linux: 0 Mac: 1 Windows: 07月1日 Linux: 0 Mac: 2 Windows: 26月30日 Linux: 2 Mac: 0 Windows: 26月29日 Linux: 1 Mac: 1 Windows: 16月28日 Linux: 0 Mac: 0 Windows: 16月27日 Linux: 0 Mac: 0 Windows: 26月26日 Linux: 1 Mac: 0 Windows: 26月25日 Linux: 0 Mac: 0 Windows: 26月24日 Linux: 1 Mac: 0 Windows: 26月23日 Linux: 1 Mac: 0 Windows: 06月22日 Linux: 3 Mac: 0 Windows: 28月6日 Linux: 0 Mac: 1 Windows: 18月5日 Linux: 0 Mac: 1 Windows: 28月4日 Linux: 1 Mac: 0 Windows: 18月3日 Linux: 0 Mac: 0 Windows: 08月2日 Linux: 0 Mac: 0 Windows: 08月1日 Linux: 0 Mac: 0 Windows: 07月31日 Linux: 0 Mac: 0 Windows: 27月30日 Linux: 0 Mac: 0 Windows: 17月29日 Linux: 1 Mac: 3 Windows: 27月28日 Linux: 1 Mac: 0 Windows: 07月27日 Linux: 0 Mac: 0 Windows: 17月26日 Linux: 1 Mac: 2 Windows: 07月25日 Linux: 0 Mac: 1 Windows: 07月24日 Linux: 1 Mac: 0 Windows: 17月23日 Linux: 1 Mac: 0 Windows: 17月22日 Linux: 1 Mac: 0 Windows: 17月21日 Linux: 0 Mac: 0 Windows: 07月20日 Linux: 0 Mac: 0 Windows: 17月19日 Linux: 0 Mac: 0 Windows: 17月18日 Linux: 0 Mac: 3 Windows: 47月17日 Linux: 0 Mac: 0 Windows: 17月16日 Linux: 0 Mac: 0 Windows: 17月15日 Linux: 0 Mac: 0 Windows: 27月14日 Linux: 0 Mac: 0 Windows: 07月13日 Linux: 0 Mac: 0 Windows: 07月12日 Linux: 2 Mac: 0 Windows: 27月11日 Linux: 0 Mac: 0 Windows: 17月10日 Linux: 1 Mac: 1 Windows: 17月9日 Linux: 0 Mac: 1 Windows: 17月8日 Linux: 0 Mac: 0 Windows: 27月7日 Linux: 1 Mac: 0 Windows: 07月6日 Linux: 0 Mac: 0 Windows: 17月5日 Linux: 0 Mac: 0 Windows: 17月4日 Linux: 0 Mac: 0 Windows: 27月3日 Linux: 0 Mac: 0 Windows: 17月2日 Linux: 0 Mac: 1 Windows: 07月1日 Linux: 0 Mac: 2 Windows: 26月30日 Linux: 2 Mac: 0 Windows: 26月29日 Linux: 1 Mac: 1 Windows: 16月28日 Linux: 0 Mac: 0 Windows: 16月27日 Linux: 0 Mac: 0 Windows: 26月26日 Linux: 1 Mac: 0 Windows: 26月25日 Linux: 0 Mac: 0 Windows: 26月24日 Linux: 1 Mac: 0 Windows: 26月23日 Linux: 1 Mac: 0 Windows: 06月22日 Linux: 3 Mac: 0 Windows: 2

读我

源代码
raw.githubusercontent.com

AutoFoldCode

这是一个 Sublime Text 软件包,可以

  • 自动保存和恢复文件中的折叠代码区域
  • 自动保存和恢复文件中的选择

此插件使得折叠代码区域和选择持续存在 - 无论您只是打开/关闭一个文件,开始/退出 Sublime Text 或重启您的计算机,AutoFoldCode 都将无麻烦地恢复您的代码折叠和选择。

安装

自动(推荐)

  1. 打开命令面板,查找 Package Control: Install Package
  2. 搜索 AutoFoldCode 并安装。

手动

# To install, clone this repository into you Sublime Packages directory:
cd /path/to/packages/directory
git clone https://github.com/Vasily-X/AutoFoldCode.git

# To update to the latest:
git pull origin master

用法

安装后,AutoFoldCode 将自动开始持久化代码折叠。

此软件包包括一些有用的命令

  • AutoFoldCode: 清除所有
    • 此命令将清除 AutoFoldCode 的缓存,并展开所有打开视图中折叠的区域。
  • AutoFoldCode: 清除当前文件
    • 此命令将从缓存中删除当前文件的折叠区域,并展开文件中的所有折叠区域。
  • AutoFoldCode: 展开所有打开文件
    • 此命令将展开所有打开窗口中的所有打开文件。
    • 如果您只想展开当前文件,Sublime Text 已经包含了对应于此的 "unfold_all" 命令。

配置

  • max_buffer_size
    • 默认情况下,当视图长度超过 MAX_BUFFER_SIZE_DEFAULT 个字符时,AutoFoldCode 不会保存折叠。您可以通过在 AutoFoldCode.sublime-settings 文件中提供 "max_buffer_size": <int> 值来覆盖此值。
  • save_selections
    • 您也可以通过在 AutoFoldCode.sublime-settings 文件中设置 "save_selections": false 来禁用保存/恢复选择的特性。

常见问题解答

  • “当我启动 Sublime Text 时,我的代码折叠/选择没有被立即恢复”
    • 这是因为 AutoFoldCode 尚未加载。一旦 Sublime Text 初始化了 AutoFoldCode,那么你的折叠/选择将被恢复。
  • “有时 AutoFoldCode 将我的代码折叠在了错误的位置”
    • 如果你曾经关闭了 Sublime Text,用另一个编辑器编辑了文件,然后再重新打开 Sublime Text,将会发生这种情况。 这个问题在插件的老版本中曾经出现过,但现在应该不会再发生了,因为现在它使用哈希来验证文件的 内容。

致谢

非常感谢以下贡献者!当然,也要感谢Sublime Text的优秀开发者。

许可证

MIT