Code navigation tool inspired by unite.vim, emacs-helm.
More information on wiki
searchfiles in project ), you can filter items by query to narrow down further.
ag search resulton narrow-editor then apply changes to real-file ).
narrow-ui: filter items by query and render items.
narrow-provider: Provide items to narrow.
You can check GIFs for all bundled provider here.
symbols in daily-basis, for other providers I don't use much.
scan: Scan current editor.
search: Search by
ag( you need to install
atom-scan: Similar to
searchbut use Atom's
fold: Provide fold-starting rows as item.
git-diff-all: Show all modified state file across project.
symbols: Provide symbols for current file.
project-symbols: Provide project-wide symbols information by reading
To follow this quick-tour, you don't need custom keymap.
narrow-editoropened, Initial items are each lines on editor. As you type, you can narrow items.
appleas query. all
applematching items are listed.
kin read-only mode) key to quick-preview items.
enterto confirm. When confirmed,
The read-only mode is enabled by default.
narrow-editoropened. As you type, you can narrow items.
ctrl-cmd-nto move to
ctrl-cmd-pto move to
ctrl-g( no need to focus
narrow:focus) to focus
narrow:focus-prompt) to directly focus narrow-editor's query prompt row.
Direct-edit is "edit on
narrow-editor then save to real-file" feature.
Available for following providers.
⚠️ This operation is dangerous, since you can update multiple files at once. ⚠️ You have to be careful enough to use this feature, don't use this without understanding what you are doing. ⚠️ I can say sorry, but I can not recover file for you.
Narrow Search By Current Word.
hellomatching items are shows up on narrow-editor.
find-and-replace:select-all), then type
Narrow Ui: Update Real Filefrom command-palette.
Narrow Ui: Update Real File.
ctrl-cmd-f) Focus to
narrow-editor, if executed in
narrow-editor, it re-focus to original editor.
ctrl-cmd-i) Focus to
narrow-editor's query input prompt, if executed in
narrow-editor, it re-focus to original editor.
narrow:refresh: Manually refresh items in
ctrl-g) Close currently opened
narrow-editorone at a time.
ctrl-cmd-n) Move cursor to position of next-item.
ctrl-cmd-p) Move cursor to position of previous-item.
narrow:reopen: ( no default keymap ) Reopen closed narrow editor up to 10 recent closed.
ctrl-cmd-e) Replace active
narrow-editor's query with cursor word.
ctrl-cmd-[) Replace active
narrow-editor's query with previous history entry.
ctrl-cmd-]) Replace active
narrow-editor's query with next history entry.
No keymaps are provided
narrow:search: ag search. need install by your self.
!vmp followed by keymap means "which keymap is not available for vim-mode-plus user".
If you want use these keymap with
vim-mode-plus, set it by yourself.
narrow-ui:confirm-keep-open: keep open
narrow-ui:open-here: Open item at same pane of UI's pane.
narrow-ui:preview-item: Preview currently selected item manually( you don't need in most case ).
tab) Preview next-item without moving cursor from
narrow-editor's query prompt.
shift-tab) Preview next-item without moving cursor from
narrow-editor's query prompt.
ctrl-rfor non-vim-mode-plus user) Disable/enable auto-preview for this
narrow-ui:update-real-file: Apply changes made in
narrow-editorto real-file.( edit in
narrow-editorthen save it to real file. )
narrow-ui:protect: No keymap by default, Protect narrow-editor from being destroyed by
backspace, Exclude items which matches filePath of currently selected item's.
ctrl-backspace, Clear excluded files list.
cmd-backspace, interactively select which filePath's items to appear on
narrow-ui:relocate: No keymap by default, Switch location where ui opened between
No keymap to invoke narrow provider(e.g
Start it from command-palette or set keymap in
⚠️ default keymap is not yet settled, this will likely to change in future version.
narrow:SelectFiles:rememberQuery: trueconfirmOnUpdateRealFile: false
Explanation of my keymap.
cmd-f: To focus to narrow-editor AND focus-back to original-editor
cmd-i: To focus to narrow-editor's prompt AND focus-back to original-editor
narrow-edioron workspace: start
query-current-word( by default keymap).
narrow-edior's query with cursor-word.
narrow:previous-query-historyRecall previous history
narrow:next-query-history, Recall next history
shift-tab: to move to next/previous item.
;: confirm current-item without closing
narrow-editor, I can close
# From outside of narrow-editor# -------------------------# `cmd-e` start `search-by-current-word` only when workspace does NOT have `narrow-editor`.# NOTE: When workspace.has-narrow, `cmd-e` is mapped to `query-current-word` by default.'atom-workspace:not(.has-narrow) atom-text-editor.vim-mode-plus:not(.insert-mode)':'cmd-e': 'narrow:search-by-current-word''atom-text-editor.vim-mode-plus:not(.insert-mode)':'ctrl-z': 'narrow:reopen''space f': 'narrow:fold''cmd-o': 'narrow:symbols-by-current-word''cmd-shift-o': 'narrow:project-symbols-by-current-word''cmd-r': 'narrow:symbols' # Override default cmd-r'cmd-shift-r': 'narrow:project-symbols' # Override default cmd-shift-r'space l': 'narrow:scan''cmd-l': 'narrow:scan-by-current-word''space s': 'narrow:search''space G': 'narrow:git-diff-all'# When workspace has narrow-editor'atom-workspace.has-narrow atom-text-editor.vim-mode-plus.normal-mode':'cmd-f': 'narrow:focus' # focus to narrow-editor'cmd-i': 'narrow:focus-prompt' # focus to prompt of narrow-editor# Following three command have ctrl- prefixed by default to avoid conflicts.# But I don' care conflict, prefer more accessible keymap.'cmd-[': 'narrow:previous-query-history''cmd-]': 'narrow:next-query-history''cmd-e': 'narrow:query-current-word'# narrow-editor regardless of mode of vim'atom-text-editor.narrow.narrow-editor[data-grammar="source narrow"]':'cmd-f': 'narrow:focus''cmd-i': 'narrow:focus-prompt' # cmd-i to return to calling editor.# Danger: apply change on narrow-editor to real file by `cmd-s`.'cmd-s': 'narrow-ui:update-real-file'# Move ui in between bottom dock and center workspace.'cmd-t': 'narrow-ui:relocate''atom-workspace.has-narrow atom-text-editor.vim-mode-plus.normal-mode,atom-workspace.has-narrow atom-text-editor.vim-mode-plus.visual-mode':'cmd-e': 'narrow:query-current-word' # set current word as query of active ui.'atom-text-editor.narrow.narrow-editor.vim-mode-plus.normal-mode':'g g': 'narrow-ui:move-to-prompt''s': 'narrow-ui:select-files'';': 'narrow-ui:confirm-keep-open''n': 'narrow-ui:move-to-next-file-item''p': 'narrow-ui:move-to-previous-file-item'
"*":"autocomplete-plus":suppressActivationForEditorClasses: [# snip"narrow"]# snip"vim-mode-plus":highlightSearchExcludeScopes: ["narrow"]
searchprovider cause mode-change from
Learn keymap available as default.
e.g. You can move to next or previous item by
shift-tab(for this to work, you need vim-mode-plus v0.81.0 or later).
If you are vim-mode-plus user.
Following command are available from vim-mode-plus's search(
normal-modemove cursor to prompt line.
update-real-fileuse other key to enter
Iis intentionally mapped to
vim-mode-plus:activate-insert-modewhich is normally mapped to
I, you can start
In daily editing, I use.
Why I'm not using others? reason is here.
fold: Since it similar to
atom-scan: it is provided for windows user who can't use
core:close). Why I need
narrow:close? What's the difference?
The biggest difference is
narrow:close restore editor state(scrollTop, fold, active pane item) if user did only
preview from startup.
narrow-editorand restore editor state when it appropriate. Also can close
narrow-editorregardless of current active-editor.
core:close: Just destroy
Use whichever you want accordingly.
I normally use
narrow:close and occasionally use
core:close such like when I want to focus next-pane-item of
narrow-editor(so don't want to restore focus to narrow initiated editor).
backspaceto exclude particular file from result.
ctrl-backspaceclear excluded file list and refresh
narrow-editorand you are in
You can launch
cmd-backspace or clicking
folder-icon on control-bar.
narrow:search, you see lots of
select-files, all file paths are listed as item.
mdon query, you see markdown filepath that macheed
!, now your query is
md!, this is treated as all files not matching
specfolder, you can add
.jsfile only, you can set query to
narrow:symbols( or maybe you want to use
narrow-editorby drag and drop to the place where you want.
Narrow Ui: Protect. Now
narrow-editoris not closed by
narrow:close), and not closed by confirm by
cmd-wor close button on tab.
Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.