FileSystemExplorer 写好了 - Jacky Liu's Blog

FileSystemExplorer 写好了

Jacky Liu posted @ 2011年4月23日 05:25 in Vim with tags python vim , 5688 阅读

        ---- 感谢 依云 解决了 Py3 接口内存泄漏的问题。已经下了 firefox 的源码来测试,一共 11 级目录 45000 多个节点,用扩展输出形式,一次打开花费 13 秒左右,反复关闭打开最多用 350 MB 内存,不会一直增加。

        ---- 左边是收藏夹功能,右边是文件结构浏览功能。可以建多个实例浏览不同路径,收藏夹只有一个。


        ---- 收藏夹界面里的操作:

  'O':   添加同级标题
  'o':   添加下级标题
  '\a':  将当前主窗口内的路径加入收藏
  '\s':  显示当前条目的信息
  '\d':  删除当前光标下的标题(recursive)或节点
  '\r':  修改当前标题


        ---- 浏览界面里的操作:

设置属性:
	:Set hidden	不显示隐藏文件(默认)
	:Set nohidden	显示隐藏文件
	:Set byname	按名称排序(默认)
	:Set bysize	按大小排序
	:Set bymtime	按修改时间排序
	:Set byatime	按访问时间排序
	:Set desc	逆序
	:Set asc	正序(默认)
	:Set basic	显示基本信息(只有文件或目录名)
	:Set extend	显示扩展信息(默认,包括大小、修改时间、访问时间)
	:Set lock	锁定当前根节点,只能在其内部浏览
	:Set unlock	解除根节点锁定(默认)
浏览:
	:CD {dir}	切换到指定节点
	"Enter":	打开/关闭目录,打开文件。
	"Shift-Enter":	递归式打开/关闭目录,打开文件。
	"\r":		刷新显示。原来打开的节点仍打开,原来关闭的仍关闭
	"\f":		显示当前节点的信息。
	"\s":		把根节点切换到指定节点。
	"\c":		关闭所有目录节点,除了当前节点和它的上级节点以外
	"Alt-i, Alt-k" 定位到上一个/下一个节点。
		1. 当前光标位于缩进部分的第 i 个 Tab 上时,定位到上一个/下一个 i 级节点。
		2. 当光标位于其它位置时,定位到上一个/下一个同级节点。
文件操作:
	"o":		在指定目录下新建一个节点。
	"O":		建立一个指定节点的同级节点。
	"\d":		删除指定的节点。
	"\t":		在指定目录或指定文件所在的目录下开启一个终端。 


        ---- 源文件在 “Vim 插件” 页面里。但是自用插件写的时候完全没考虑通用性,所以换一台电脑八成是不能用的,只给感兴趣的人作参考。

Avatar_small
依云 说:
2011年4月23日 16:35

好吧,我放弃,让它在 HOME 以外的地方跑起来太难了。。。

Avatar_small
蓝色基因 说:
2011年4月23日 22:45

@依云: 我试过了,在 ModuleManager.vim 里有两个全局变量,vim 部分的是 g:__dir_modules__ ,python 部分的是 __dir_modules__ ,存放的是插件系统所在的路径。只要改成想要的路径就可以放到其它地方了。另外 vimrc 里 source ModuleManager 的路径也要改一下。我过会再写一个细点的介绍放上来。你有别的什么要求没有。

Avatar_small
hotmail sign up 说:
2018年8月24日 15:25

你太酷了! 我之前不想学习这样的东西。 感谢您分享这一点

Avatar_small
winstarst 说:
2020年2月16日 12:15

@蓝色基因:

您好,几年前在您开始写 FSF 的时候就关注过,最近想写 VIM 插件,有关于窗口布局的内容,找到了您这儿。

我已经把您的 FSF 在 Windows 下跑起来了,版本是 GVIM 8.1,看了一下代码,可能用的不全,但至少能跑起来了,手动用 source 加载几个 vim 文件后,执行 :MM 或者是 :py3 g_ModuleManager._ui_default.open() 能够显示出界面,然后回车打开文件。

另外,想请教您一下,现在已经 2020 了, VIM 也有了很大的发展,支持异步、支持 Popup 窗口、支持内置 Terminal,并且对 Python 的支持更加完善,是不是更加适合作为一个程序的 Viewer 呢?

我个人想要像您一样,用 VIM 作为 View 层,然后用 Python + Cython 作为 Controler,然后用一些轻量的 KV 库之类的作为 Model,毕竟现在有 viminspector 和 vimquickui 中有多个窗口相互间既独立又分工协作,并且是异步通信,还可以有自己的“菜单”,所以想基于上面的 MVC 思路实现一些像您这样的看盘、任务管理之类的工具,比如说 taskcoach 那样的,包括了类别窗口(含子类)、任务(子任务)窗口、任务花费窗口,彼此相互联动。

想听听您的建议,麻烦您了

122612183@qq.com

Avatar_small
Emma 说:
2023年1月27日 02:09

Kudos to Evian for resolving the issue of Py3 interface memory leak! I recently downloaded the source code of firefox to test the performance of FileSystemExplorer. To my surprise, the 11-level directory had more than 45,000 nodes, and with the extended output format, it took 13 seconds to open once. What’s more, the program would not increase the memory usage over time, despite repeated closing and opening. It is also important to note that the left side of the interface is the favorite function, and the right is the file structure browsing diamond rings function. With FileSystemExplorer, users can create multiple instances to browse different paths, and there is only a single favorite section.

Avatar_small
प्रश्नपत्र.com 说:
2023年5月18日 20:18

High School Examination for CGBSE 6th, 7th, 8th, and 9th Model Paper 2023 Will Be Conducted by the Chhattisgarh Board of Secondary Education (CGBSE) Overview of the Chhattisgarh Board 5th, 6th, 7th, and 8th Exam Schedule Details Board's name is the Chhattisgarh प्रश्नपत्र.com School Examination Board, or CGBSE. Fifth Chhattisgarh Board Exam Name Overview of the Chhattisgarh Board's 5th, 6th, 7th, 8th, and 9th Exam Schedule Details Name of the Board: Chhattisgarh Board of Secondary Education, also known as CGBSE, will conduct high school examinations for the CGBSE 6th, 7th, 8th, and 9th Model Paper 2023.

Avatar_small
anonymous 说:
2023年8月12日 14:26

Cool you inscribe, the info is really salubrious further fascinating, I'll give you a connect to my scene.  Wildlife Removal Kissimmee

Avatar_small
anonymous 说:
2023年8月21日 00:48

I use basically superior fabrics : you will discover these products by: Wildlife Removal Orlando

Avatar_small
anonymous 说:
2023年8月21日 00:50

Your texts on this subject are correct, see how I wrote        this site is really very good. Oviedo Squirrel Removal


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter
Host by is-Programmer.com | Power by Chito 1.3.3 beta | © 2007 LinuxGem | Design by Matthew "Agent Spork" McGee