ضيق شيء.
أداة التنقل رمز مستوحاة من unite.vim ، emacs-helm.
مزيد من المعلومات حول ويكي
search في المشروع) ، يمكنك تصفية العناصر عن طريق الاستعلام لتضييق نطاقًا أكثر.ag search result على المحرر الضيق ثم تطبيق التغييرات على الملف الحقيقي).narrow-editor أو narrow-ui : تصفية عناصر عن طريق الاستعلام وتقديم عناصر.narrow-provider : توفير العناصر لتضييق. يمكنك التحقق من صور GIF لجميع المزود المجمعة هنا.
يمكنني استخدام scan ، search ، git-diff-all ، symbols في Basis اليومية ، لمقدمي الخدمات الآخرين الذين لا أستخدمهم كثيرًا.
scan : مسح المحرر الحالي.search : ابحث بواسطة ag (تحتاج إلى تثبيت ag بنفسك).atom-scan : على غرار search ولكن استخدم Atom's atom.workspace.scan .fold : توفير صفوف الظهر للطي كعنصر.git-diff-all : أظهر جميع ملف الحالة المعدلة عبر المشروع.symbols : توفير رموز للملف الحالي.project-symbols : توفير معلومات الرموز على مستوى المشروع عن طريق قراءة ملف tags .لمتابعة هذا السرعة ، لا تحتاج إلى مفتاح مخصص.
narrow:scanNarrow Scan .narrow-editor ، والعناصر الأولية هي كل خطوط على المحرر. أثناء الكتابة ، يمكنك تضييق العناصر.apple كاستعلام. يتم سرد جميع عناصر مطابقة apple .up أو down (أو j ، k في وضع القراءة فقط) إلى عناصر الحفر السريع.enter للتأكيد. عند تأكيد ، أغلقت narrow-editor .يتم تمكين وضع القراءة فقط افتراضيًا.
narrow-editor .Narrow Scan .narrow-editor . أثناء الكتابة ، يمكنك تضييق العناصر.narrow-editor تلقائيًا.ctrl-cmd-n للانتقال إلى next-item ، ctrl-cmd-p للانتقال إلى previous-item .tab و shift-tab .narrow-editor بواسطة ctrl-g (لا حاجة إلى التركيز على narrow-editor ).narrow-editorctrl-cmd-f ( narrow:focus ) لتركيز narrow-editor .ctrl-cmd-i ( narrow:focus-prompt ) للتركيز مباشرة على صف الاستعلام الضيق المحرر.search ، fold الخ). الحمير المباشرة "تحرير على narrow-editor ثم حفظ إلى الملف الحقيقي".
متاح لمقدمي الخدمات التالية.
scansearchatom-scanhelloNarrow Search By Current Word .hello على محرر ضيق.hello . ثم ctrl-cmd-g ( find-and-replace:select-all ) ، ثم اكتب world .Narrow Ui: Update Real File من أوامر palette.Narrow Ui: Update Real File .Search.startByDoubleClick إلى true من Settings-View.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 ) نقل المؤشر إلى وضع العنصر التالي.narrow:previous-item : ( ctrl-cmd-p ) نقل المؤشر إلى وضع العنصر السابق.narrow:reopen : (لا يوجد مفتاح افتراضي) إعادة فتح محرر ضيق مغلق حتى 10 مغلق حديث.narrow:query-current-word : ( ctrl-cmd-e ) استبدل استعلام narrow-editor النشط بكلمة المؤشر.narrow:previous-query-history : ( ctrl-cmd-[ ) استبدل استعلام narrow-editor النشط مع إدخال التاريخ السابق.narrow:next-query-history : ( ctrl-cmd-] ) استبدل استعلام narrow-editor النشط مع إدخال التاريخ التالي. لا يتم توفير keymaps
narrow:scannarrow:scan-by-current-wordnarrow:foldnarrow:fold-by-current-wordnarrow:search : Ag Search. تحتاج إلى التثبيت بنفك.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
إذا كنت ترغب في استخدام هذه المفاتيح مع vim-mode-plus ، فقم بتعيينها بنفسك.
انظر ويكي
core:confirm : ( enter ) إغلاق narrow-editornarrow-ui:confirm-keep-open : الحفاظ على narrow-editor مفتوحnarrow-ui:open-here : عنصر مفتوح في نفس جزء من جزء UI's.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 : ( 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 : لا يوجد مفتاح المفتاح افتراضيًا ، حيث تم فتح واجهة المستخدم بين مساحة العمل center و Dock bottom . لا يوجد Keymap لاستدعاء مزود ضيق (على سبيل المثال narrow:scan ).
ابدأها من أوامر palette أو تعيين keymap في keymap.cson .
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 (بشكل افتراضي keymap).narrow-edior مع مؤشر كلمة.cmd-[ : narrow:previous-query-history استدعاء التاريخ السابقcmd-] : narrow:next-query-history ، أذكر التاريخ التاليctrl-g : إغلاق narrow-editor من أي مكان.tab ، shift-tab : للانتقال إلى العنصر التالي/السابق.; : تأكيد العنصر الحالي دون إغلاق narrow-editor ، يمكنني إغلاق narrow-editor بواسطة ctrl-g . # 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. يتوفر الأمر التالي من محرر Mini-Imiator ( / أو ? ).
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:activate-insert-mode الذي يتم تعيينه عادة إلى i .I .I ، يمكنك البدء insert-mode A ، c ، إلخ ..في التحرير اليومي ، أنا أستخدم.
scan ، search ، git-diff-all ، symbols .
لماذا لا أستخدم الآخرين؟ السبب هنا.
fold : لأنه يشبه symbols .atom-scan : يتم توفيره لمستخدم Windows الذي لا يمكنه استخدام search (Need ag أو rg ).narrow-editor بواسطة cmd-w العادي ( core:close ). لماذا أحتاج narrow:close ؟ ما الفرق؟ الفرق الأكبر هو narrow:close Restore Editor State (Scrolltop ، Fold ، Active pane item) إذا كان المستخدم قد قام فقط preview من بدء التشغيل.
narrow:close : إغلاق narrow-editor واستعادة المحرر عندما يكون ذلك مناسبًا. يمكن أيضًا إغلاق narrow-editor بغض النظر عن المحرر النشط الحالي.core:close : فقط تدمير narrow-editor . استخدم أيهما تريد وفقًا لذلك. عادةً ما أستخدمها narrow:close وأحيانًا استخدم core:close مثلما أرغب في التركيز على عنصر في الجزء التالي من narrow-editor (لذلك لا تريد استعادة التركيز إلى محرر ضيقة مبدأ).
narrow:search backspace على العنصرbackspace لاستبعاد ملف معين من النتيجة.ctrl-backspace قائمة ملفات واضحةnarrow-editor وأنت في read-only-mode select-filesselect-files بواسطة cmd-backspace أو النقر فوق folder-icon على شريط التحكم .editor البحث عن طريق narrow:search ، ترى الكثير من العناصر editor المكررةselect-files ، يتم سرد جميع مسارات الملفات كعنصر.md على الاستعلام ، ترى Marmdown FilePath أن Macheed md .! ، الآن استفسارك هو md! ، يتم التعامل مع هذا لأن جميع الملفات لا تتطابق مع md .enter للتأكيد.select-files .spec ، يمكنك إضافة spec/! كاستعلام..js فقط ، يمكنك تعيين استعلام على .js .next-file ، previous-filen ، p في وضع read-only .narrow:symbols دائمًا في جزء يمينًا ولا تريد الإغلاق.narrow:symbols (أو ربما تريد استخدام narrow:fold )narrow-editor عن طريق السحب والإسقاط إلى المكان الذي تريده.Narrow Ui: Protect . الآن narrow-editor محمي.narrow-editor المحمي بواسطة ctrl-g ( narrow:close ) ، وليس مغلقًا بواسطة التأكيد بواسطة enter .cmd-w العادي أو إغلاق في علامة التبويب.