spaceemacs 学习笔记

  1. gg moves to the beginning of the buffer.
    G moves to the end of the buffer.
    : followed by a line number the moves to that line number .

    1. typing / followed by a pharse searches FORWARD for the pharse.
      typing ? followed by a pharse searches BACKWORD for the pharse.
      After a search type n to find the next occurrence in the same direction
      or N to search in the opposite direction.

    2. typing % while the cursor is on a(,),[,],{,or} locates its matching pair.

    3. To substitute new for the first old on a line type :s/old/new
      To substitute new for all ‘old’s on a line type :s/old/new/g
      To substitute phrases between two line #’s type :#,#s/old/new/g
      To substitute all occurrences in the file type :%s/old/new/g
      To ask for confirmation each time add ‘c’ :%s/old/new/gc

    4. To save part of a file type :#,# w filename

文章目录