🔍A file/directory filter plugin.
目录
Intro [↑]
Actually, tree-view-search-bar is more like a file-filter tool.
tree-view-filter is a good plugin to filter files, but there are something different between tree-view-filter and tree-view-search-bar.
tree-view-search-barcould filter directories.tree-view-search-barcould filter files without extension name.
Install [↑]
安装
apm install tree-view-search-baror https://atom.io/packages/tree-view-search-bar- command:
search-bar:toggle - or shortcut:
ctrl-cmd-shift-findarwin.ctrl-alt-shift-finwin32andlinux.- You should focus in
tree-vieworeditorfirst.
- enjoy it
☺️
Changelog [↑]
更新日志
- 0.0.2 (2016-08-22) :
- Add keyboard shortcut to toggle plugin.
ctrl-cmd-shift-findarwin.ctrl-alt-shift-finwin32andlinux.
- 0.0.3 (2016-09-22) :
- Focus after show.
- 0.1.1 (2016-10-30) :
- Auto toggle when open a new window.
- require tree-view still.
- "ctrl-alt-shift-f/ctrl-cmd-shift-f" shortcut feature now is "focus" instead "toggle".
- Now you can use this shortcut and "esc", switch the search-bar and your workspace quickly.
- When you focus search-bar and search-bar is not exist, search-bar will auto show.
- Auto toggle when open a new window.
Usage [↑]
使用方法
Match Rule
匹配规则
- Rule1 : When the input of
tree-view-search-baris not empty, all files or directories intree-viewwill be hidden.
规则1 : 当输入框不为空时,所有的文件都会隐藏。
- Rule2 : If the file or directory matches one of the expressiones, it will be visible.
规则2 : 只要符合输入的所有表达式的其中一条该文件或者文件夹就会显示。
- Rule3 : There is a directory including at least one file or directory which is matched Rule2 that will be visible.
规则3 : 当文件夹包含某个符合规则2的子文件或者子文件夹时该文件夹会显示。
- Rule4 : If this directory is collapsed, Rule3 is not suitable to this directory, Rule2 is not suitable to its subfile or subdirectory.
规则4 : 该文件夹处于收拢状态时,它的子文件或者子文件夹不会应用规则2,该文件夹不会应用规则3。
String : 字符 [↑]
- Match all files or directories which are include the string you type.
匹配包含该字符串的文件与文件夹。
- Case Insensitivity.
大小写不敏感。
tree-view-search-barincludestree.
tree-view-search-bar包含字符串tree。

atom-reveal-file-in-finder,main.js,intro.pngincludesin,libis visible becauseRule3.
atom-reveal-file-in-finder,main.js,intro.png包含字符串in,lib因为规则3而显示。

- Case Insensitivity.
大小写不敏感。

File : 文件 [↑]
- If the string you type include character
.that will search file only.
使用
.来识别文件类型.
- Support Regular Expression.
允许使用正则.
- Character
*can match all filename.
使用
*来代表任何长度的文件名.
- Character
*can match all file extension.
使用
*来代表任何长度的文件类型.
- Match all files if their extension are
md.
匹配所有后缀为
md的文件。

- Match all files if their extension are
mdand the last character of filename aree.
匹配所有后缀为
md且最后的字母为e的文件。

- All files will be match.
全部文件都会被匹配。

Path : 路径 [↑]
- If the string you type include character
/or\that will match the file path.
使用
/或者\来识别路径类型。
- Each part of path will apply as same as
String Ruleto filter the directories.
每一段路径使用
字符的匹配去过滤文件夹。
- If
/or\is the last character, all subfile or subdirectory of the match directory will display.
当以
/或者\结尾时, 默认显示该文件夹下全部文件与文件夹。
tree-view-search-barincludestree,view.lessincludesless,stylesis visible becauseRule3.
tree-view-search-bar包含字符串tree,view.less包含字符串less,styles因为规则3而显示。

tree-view-search-barincludestree, and its subfiles or subdirectories are visible because the last character is/.
tree-view-search-bar包含字符串tree,以/结尾时, 显示该文件夹下全部文件与文件夹。

tree-view-search-barincludestree,libincludeslib, and subfiles or subdirectories oflibare visible because the last character is/.
tree-view-search-bar包含字符串tree,lib包含字符串lib,以/结尾时, 显示lib下全部文件与文件夹。

Combo : 组合 [↑]
- Use
spaceto split each expression.
使用
空格分割每一条表达式。
- Match one of the expressiones will be displayed.
只要符合其中一条表达式的匹配规则则会显示。
- like this:
例子:

Notice [↑]
注意事项
- Do not match any files or directories which in the collapse directory.
收拢的文件夹内的文件不会被匹配到。
- If you collapse a directory which include matched file or directory and this directory do not match any expression, then this directory will not display in the result list.
一个文件夹本身没有被匹配只因为其包含了被匹配的文件或者文件夹而显示时,收拢该文件夹将会导致该文件夹在匹配结果列表上消失。
TODO [↑]
- 大小写敏感(Case Sensitivity)
- 匹配正则表达式(Regular Expression)
- 关键字补全(Autocomplete)
- 模糊搜索(Fuzzy)
- 匹配高亮(Highlight)
- 深度匹配(Match file in fold directory)
License [↑]
MIT