🔍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-bar
could filter directories.tree-view-search-bar
could filter files without extension name.
Install [↑]
安装
apm install tree-view-search-bar
or https://atom.io/packages/tree-view-search-bar- command:
search-bar:toggle
- or shortcut:
ctrl-cmd-shift-f
indarwin
.ctrl-alt-shift-f
inwin32
andlinux
.- You should focus in
tree-view
oreditor
first.
- enjoy it
☺️
Changelog [↑]
更新日志
- 0.0.2 (2016-08-22) :
- Add keyboard shortcut to toggle plugin.
ctrl-cmd-shift-f
indarwin
.ctrl-alt-shift-f
inwin32
andlinux
.
- 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-bar
is not empty, all files or directories intree-view
will 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-bar
includestree
.
tree-view-search-bar
包含字符串tree
。
![](https://raw.githubusercontent.com/lixinliang/tree-view-search-bar/master/images/string-1.png)
atom-reveal-file-in-finder
,main.js
,intro.png
includesin
,lib
is visible becauseRule3
.
atom-reveal-file-in-finder
,main.js
,intro.png
包含字符串in
,lib
因为规则3
而显示。
![](https://raw.githubusercontent.com/lixinliang/tree-view-search-bar/master/images/string-2.png)
- Case Insensitivity.
大小写不敏感。
![](https://raw.githubusercontent.com/lixinliang/tree-view-search-bar/master/images/string-3.png)
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
的文件。
![](https://raw.githubusercontent.com/lixinliang/tree-view-search-bar/master/images/file-1.png)
- Match all files if their extension are
md
and the last character of filename aree
.
匹配所有后缀为
md
且最后的字母为e
的文件。
![](https://raw.githubusercontent.com/lixinliang/tree-view-search-bar/master/images/file-2.png)
- All files will be match.
全部文件都会被匹配。
![](https://raw.githubusercontent.com/lixinliang/tree-view-search-bar/master/images/file-3.png)
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 Rule
to filter the directories.
每一段路径使用
字符
的匹配去过滤文件夹。
- If
/
or\
is the last character, all subfile or subdirectory of the match directory will display.
当以
/
或者\
结尾时, 默认显示该文件夹下全部文件与文件夹。
tree-view-search-bar
includestree
,view.less
includesless
,styles
is visible becauseRule3
.
tree-view-search-bar
包含字符串tree
,view.less
包含字符串less
,styles
因为规则3
而显示。
![](https://raw.githubusercontent.com/lixinliang/tree-view-search-bar/master/images/path-1.png)
tree-view-search-bar
includestree
, and its subfiles or subdirectories are visible because the last character is/
.
tree-view-search-bar
包含字符串tree
,以/
结尾时, 显示该文件夹下全部文件与文件夹。
![](https://raw.githubusercontent.com/lixinliang/tree-view-search-bar/master/images/path-2.png)
tree-view-search-bar
includestree
,lib
includeslib
, and subfiles or subdirectories oflib
are visible because the last character is/
.
tree-view-search-bar
包含字符串tree
,lib
包含字符串lib
,以/
结尾时, 显示lib
下全部文件与文件夹。
![](https://raw.githubusercontent.com/lixinliang/tree-view-search-bar/master/images/path-3.png)
Combo : 组合 [↑]
- Use
space
to split each expression.
使用
空格
分割每一条表达式。
- Match one of the expressiones will be displayed.
只要符合其中一条表达式的匹配规则则会显示。
- like this:
例子:
![](https://raw.githubusercontent.com/lixinliang/tree-view-search-bar/master/images/combo-1.png)
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