狹窄的東西。
代碼導航工具靈感來自unite.vim,emacs-helm。
有關Wiki的更多信息
search文件),您可以通過查詢過濾項目以進一步縮小。ag search result進行編輯,然後將更改應用於真實文件)。narrow-editor或narrow-ui :通過查詢和渲染項目進行過濾項目。narrow-provider :提供狹窄的物品。您可以在此處查看所有捆綁提供商的GIF。
我使用scan , search , git-diff-all ,日常基礎中的symbols ,對於其他提供商,我使用的不是太多。
scan :掃描當前編輯器。search : ag搜索(您需要自己安裝ag )。atom-scan :類似於search ,但使用Atom的atom.workspace.scan 。fold :提供折疊行作為項目。git-diff-all :在項目中顯示所有修改的狀態文件。symbols :提供當前文件的符號。project-symbols :通過讀取tags文件提供項目範圍的符號信息。要遵循此快速旅行,您不需要自定義Keymap。
narrow:scanNarrow Scan 。narrow-editor打開,初始項目是編輯器上的各行。當您鍵入時,您可以縮小物品。apple鍵入查詢時。列出了所有apple匹配項。up移動, down (或以讀取模式為j ,k,k,k,k,k,k k k,k,k,k,k,k,k,k,k,k,k k k in for Read-hody Mode)鍵轉到快速瀏覽項目。enter以確認。確認後, narrow-editor關閉。默認情況下啟用了僅讀取模式。
narrow-editor的外部導航。Narrow Scan 。narrow-editor打開。當您鍵入時,您可以縮小物品。narrow-editor 。ctrl-cmd-n移至next-item , ctrl-cmd-p轉到previous-item 。tab和shift-tab 。ctrl-g關閉narrow-editor (無需集中narrow-editor )。narrow-editorctrl-cmd-f ( narrow:focus )來焦點narrow-editor 。ctrl-cmd-i ( narrow:focus-prompt )直接聚焦窄編輯器的查詢提示行。search , fold等)。Direct-Edit是“在narrow-editor上編輯,然後保存到實實際文件”功能。
可用於以下提供商。
scansearchatom-scanhelloNarrow Search By Current Word 。hello匹配項目都顯示在窄編輯器上。hello上。然後ctrl-cmd-g ( find-and-replace:select-all ),然後鍵入world 。Narrow Ui: Update Real File 。Narrow Ui: Update Real File 。Search.startByDoubleClick true為“從設置”視圖。narrow:focus :( ctrl-cmd-f )將重點放在narrow-editor上,如果在narrow-editor中執行,則重新聚焦於原始編輯器。narrow:focus-prompt :( ctrl-cmd-i )專注於narrow-editor的查詢輸入提示,如果在narrow-editor中執行,則將其重點放在原始編輯器中。narrow:refresh :在narrow-editor中手動刷新項目。narrow:close :( ctrl-g )當前關閉一次narrow-editor一次。narrow:next-item :( ctrl-cmd-n )將光標移至Next-Sutem的位置。narrow:previous-item :( ctrl-cmd-p )將光標移至上一個項目的位置。narrow:reopen :(無默認的keymap)重新打開了封閉的狹窄編輯器,最多可直至10個關閉。narrow:query-current-word :( ctrl-cmd-e )用光標單詞替換活躍的narrow-editor的查詢。narrow:previous-query-history :( ctrl-cmd-[ )用以前的歷史記錄輸入替換Active narrow-editor的查詢。narrow:next-query-history :( ctrl-cmd-] )用下一個歷史記錄輸入替換活躍的narrow-editor的查詢。 沒有提供keymaps
narrow:scannarrow:scan-by-current-wordnarrow:foldnarrow:fold-by-current-wordnarrow:search :AG搜索。需要按照自己的安裝。narrow:search-by-current-wordnarrow:search-current-projectnarrow:search-current-project-by-current-wordnarrow:atom-scannarrow:atom-scan-by-current-wordnarrow:symbolsnarrow:symbols-by-current-wordnarrow:project-symbols :narrow:project-symbols-by-current-word :narrow:git-diff-all!vmp之後的keymap表示“哪個KeyMap不適合Vim-Mode-Plus用戶使用”。
如果您想將這些keymap與vim-mode-plus一起使用,請自己設置。
參見Wiki
core:confirm :( enter )關閉narrow-editornarrow-ui:confirm-keep-open :保持開放式narrow-editornarrow-ui:open-here :在UI窗格的同一窗格上打開物品。narrow-ui:preview-item :當前手動選擇的項目(在大多數情況下您不需要)。narrow-ui:preview-next-item :( tab )預覽下一個項目,而無需從narrow-editor的查詢提示中移動光標。narrow-ui:preview-previous-item :( shift-tab )預覽下一個項目,而無需從narrow-editor的查詢提示中移動光標。narrow-ui:toggle-auto-preview :(非vim-mode-plus用戶的ctrl-r )禁用/啟用此narrow-editor的自動瀏覽。narrow-ui:move-to-prompt : ctrl-cmd-inarrow-ui:stop-insert : escapenarrow-ui:update-real-file :應用narrow-editor中所做的更改對實實際文件。 (在narrow-editor中進行編輯,然後將其保存到真實文件中。)narrow-ui:protect :默認情況下沒有keymap,保護狹窄的編輯器免於被narrow:close ( ctrl-g )摧毀。narrow-ui:exclude-file : backspace ,排除與當前選擇項目的filepath相匹配的項目。narrow-ui:clear-excluded-files : ctrl-backspace ,清晰的排除文件列表。narrow-ui:select-files : cmd-backspace ,交互式選擇哪些FilePath的項目出現在narrow-editor上。narrow-ui:toggle-search-whole-word : alt-cmd-wnarrow-ui:toggle-search-ignore-case : alt-cmd-cnarrow-ui:toggle-search-use-regex : alt-cmd-/narrow-ui:start-insert : I ( !vmp ), a ( !vmp )narrow-ui:move-to-next-file-item : n ( !vmp )narrow-ui:move-to-previous-file-item : p ( !vmp )narrow-ui:relocate :默認情況下沒有keymap,在center工作區和bottom碼頭之間打開UI的開關位置。沒有keymap調用狹窄的提供商(例如narrow:scan )。
從Command-Palette或keymap.cson中的Keymap啟動。
config.cson narrow :
SelectFiles :
rememberQuery : true
confirmOnUpdateRealFile : false keymap.cson解釋我的keymap。
cmd-f :專注於狹窄編輯器,並將重點放在原始編輯中cmd-i :專注於縮小編輯的及時及重點放在原始編輯中cmd-e :narrow-edior時:開始narrow:search-by-current-word 。narrow-edior : query-current-word (默認情況下)。narrow-edior查詢。cmd-[ : narrow:previous-query-history記憶以前的歷史cmd-] : narrow:next-query-history ,回想下一個歷史ctrl-g :在任何地方關閉narrow-editor 。tab , shift-tab :移至下一個/上一個項目。; :確認電流項目而不關閉narrow-editor ,我可以通過ctrl-g關閉narrow-editor 。 # 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 "
]vim-mode-plus.automaticallyEscapeInsertModeOnActivePaneItemChangesearch提供程序的窄編輯器上的每個查詢輸入從insert-mode到normal-mode 。學習默認情況下可用的keymap。
例如,您可以通過tab ( shift-tab移動到下一個或上一個項目(為此,您需要vim-mode-plus v0.81.0或更高版本)。
如果您是vim-mode-plus用戶。以下命令可從VIM-Mode-Plus的搜索( /或? )迷你版中獲得。
vim-mode-plus-user:narrow:scanvim-mode-plus-user:narrow:searchvim-mode-plus-user:narrow:search-current-projectvim-mode-plus-user:narrow:atom-scan i , a normal-mode移動光標以提示線路。direct-edit和update-real-file時,請使用其他密鑰輸入insert-mode 。I有意映射到vim-mode-plus:通常映射到i vim-mode-plus:activate-insert-mode 。II ,您還可以通過A , c等開始insert-mode 。在日常編輯中,我使用。
scan , search , git-diff-all , symbols 。
為什麼我不使用別人?原因在這裡。
fold :因為它類似於symbols 。atom-scan :為無法使用search的Windows用戶提供(需要ag或rg )。cmd-w關閉narrow-editor ( core:close )。為什麼我需要narrow:close ?有什麼區別?最大的區別是narrow:close如果用戶僅從啟動中preview ,則關閉還原編輯器狀態(scrolltop,fold,活動窗格項目)。
narrow:close :合適時關閉narrow-editor和還原編輯狀態。無論當前的活動編輯器如何,都可以關閉narrow-editor 。core:close :只需銷毀narrow-editor 。使用任何您想要的。我通常使用narrow:close和偶爾使用core:close諸如我想集中narrow-editor的下一窗格項目時(因此,不要恢復焦點以縮小啟動編輯器)。
narrow:search中排除特定文件backspacebackspace將特定文件排除在結果之外。ctrl-backspace清除排除的文件列表和刷新narrow-editor中可用,您在read-only-mode中select-files提供商cmd-backspace啟動select-files ,也可以在Control-bar上單擊folder-icon 。editor narrow:search ,您會看到許多editor器手機select-files ,所有文件路徑均列為項目。md ,您會看到Macheed md的Markdown Filepath。! ,現在您的查詢是md! ,這被視為所有文件都不匹配md 。enter以確認。select-files重新加密文件來排除。spec文件夾,您可以添加spec/!作為查詢。.js文件,您可以將查詢設置為.js 。next-file , previous-fileread-only模式下使用n , p 。narrow:symbols總是以最正確的窗格出現,並且不想關閉。narrow:symbols (或者您想使用narrow:fold )narrow-editor移動。Narrow Ui: Protect 。現在narrow-editor受到保護。narrow-editor不會被ctrl-g ( narrow:close )關閉,也不會通過enter確認封閉。cmd-w或關閉按鈕。