-
Notifications
You must be signed in to change notification settings - Fork 16
Home
t9md edited this page Feb 28, 2017
·
24 revisions
-
narrow-editor
ornarrow-ui
: handles user input and update item list. -
narrow-provider
: Provide items to narrow and action to jump to item selected.
- User invoke
narrow:scan
- Instantiate
Scan
provider and instantiateUi
to use for this provider. - Open
narrow-editor
(Ui
holdnarrow-editor
andcontrol-bar
etc..).
Text you input on first line of narrow-editor
.
- Items in
narrow-editor
are filtered by query. - Basically query is mached as-is( No regular expression support currently ).
- Can chain multiple query separating by
whilte-space
.- e.g.
foo bar
means, select items matchesfoo
andbar
.
- e.g.
-
*
is treated as wildcard, internally converted to.*
regular expression. -
!
is treated as nagate,!foo
means 'not matchingfoo
'.- If config
negateNarrowQueryByEndingExclamation
set totrue
, you can also usefoo!
.
- If config
- Query case sensitivity is configurable with config
caseSensitivityForNarrowQuery
.- Can override global setting on each provider if you want.
- See also this issue
- Scan current editor( use
editor.scan
under the hood ) - It use first narrow query as search term( first word separated by white-spaces on query text ).
- Rest of include and exclude(
!
starting word) queries are treated as normal filter query. - To make this exceptional query handling obvious by eye, use different syntax grammar highlight for first query(= scan term).
- Search by
ag
( you need to installag
by yourself). - Need to install ag by yourself.
- Similar to
search
but use Atom'satom.workspace.scan
.
- Provide fold-starting rows as item.
- Can change fold level to show up on
narrow-editor
bynarrow-ui:fold:increase-fold-level
narrow-ui:fold:decrease-fold-level
- Show
git-diff
for current active-editor. Info source is coregit-diff
package.
- Show all modified state file across project.
- If you are comfortable with this provider, you don't need
git-diff
at all( like me ).
- Info source is core
bookmarks
package - This is toy, I don't use
bookmarks
feature heavily.
- Provide symbols for current file.
- Useful to quick previewing function definition on same file.
- Provide project-wide symbols information by reading
tags
file.
- Use message provided by linter package.