ideavim 插件速查

Thursday, August 19, 2021
  1. NERDTree

    o Open files, directories and bookmarks g:NERDTreeMapActivateNode
    go Open selected file, but leave cursor in the NERDTree g:NERDTreeMapPreview
    t Open selected node/bookmark in a new tab g:NERDTreeMapOpenInTab
    T Same as ’t’ but keep the focus on the current tab g:NERDTreeMapOpenInTabSilent
    i Open selected file in a split window g:NERDTreeMapOpenSplit
    gi Same as i, but leave the cursor on the NERDTree g:NERDTreeMapPreviewSplit
    s Open selected file in a new vsplit g:NERDTreeMapOpenVSplit
    gs Same as s, but leave the cursor on the NERDTree g:NERDTreeMapPreviewVSplit
    O Recursively open the selected directory g:NERDTreeMapOpenRecursively
    x Close the current nodes parent g:NERDTreeMapCloseDir
    X Recursively close all children of the current node g:NERDTreeMapCloseChildren
    P Jump to the root node g:NERDTreeMapJumpRoot
    p Jump to current nodes parent g:NERDTreeMapJumpParent
    K Jump up inside directories at the current tree depth g:NERDTreeMapJumpFirstChild
    J Jump down inside directories at the current tree depth g:NERDTreeMapJumpLastChild
    <C-J> Jump down to next sibling of the current directory g:NERDTreeMapJumpNextSibling
    <C-K> Jump up to previous sibling of the current directory g:NERDTreeMapJumpPrevSibling
    r Recursively refresh the current directory g:NERDTreeMapRefresh
    R Recursively refresh the current root g:NERDTreeMapRefreshRoot
    m Display the NERDTree menu g:NERDTreeMapMenu
    q Close the NERDTree window g:NERDTreeMapQuit
    A Zoom (maximize/minimize) the NERDTree window g:NERDTreeMapToggleZoom
  2. surround

    cs (change surround), ds (delete surround), ys (yank surround)

    1. "Hello world!"

    2. cs"' > 'Hello world!'

    3. ds' > Hello world!

    4. ysiw] > [Hello] world!

    5. cs]{ > { Hello } world! # 左括号带空格, 右括号不带空格

    6. ds{ > Hello world!

    补齐一下vim text object知识

    1. 单词 (Word)
      1. aw - a word 一个单词, 包含两边的空白
      2. iw - inner word 不包含两边空白
    2. 句子 (Sentences)
      1. as - a sentence
      2. is - inner sentence
    3. 段落 (Paragraphs)
      1. ap - a paragraph
      2. ip - inner paragraph
  3. multiple-cursors

    <A-n>, <A-x>, <A-p>, g<A-n>

    1. next: <A-n> add a new virtual cursor + selection on the next match
    2. skip: <A-x> skip the next match
    3. prev: <A-p> remove current virtual cursor + selection and go back on previous match