Vim

  • 만약에 ,%s 를 4번 반복해서 입력하고 싶다면.
    ESC + 4 + i + ,%s + ESC
    
  • BOM 제거
    :%s/[\uFEFF]//g
    

multiple windows

 :e filename      - edit another file
 :split filename  - split window and load another file
 ctrl-w up arrow  - move cursor up a window
 ctrl-w ctrl-w    - move cursor to another window (cycle)
 ctrl-w_          - maximize current window
 ctrl-w=          - make all equal size
 10 ctrl-w+       - increase window size by 10 lines
 :vsplit file     - vertical split
 :sview file      - same as split, but readonly
 :hide            - close current window
 :only            - keep only this window open
 :ls              - show current buffers
 :b 2             - open buffer #2 in this window
  • swap windows
    • Ctrl + w and J: move one to bottom
    • Ctrl + w and L: move one to left
  • rotate windows
    • Ctrl + w Ctrl + r

etc command

  • autocomplete: Ctrl + n
  • run current script: :! sh %
  • autowrite: :set autowrite
Last modified 3 years ago Last modified on 11/01/16 18:15:23