vim-reference




Pay Notebook Creator: Salah Ahmed0
Set Container: Numerical CPU with TINY Memory for 10 Minutes 0
Total0

Buffers (writing text)

Buffers are files you have open in the course of your work, you can switch between buffers effortlessly.

  • :ls
    • list buffers (view buffer numbers for each file)
  • b{n}
    • switch to buffer number n

Splitting the screen between two files

  • :split {file2}
    • in a file executing this command creates a horizontal split between original file and file2
  • :vsplit {file2}
    • same as split command except that a veritcal split is created instead
  • :vertical sb {n}
    • vertical split with buffer n

cycling between files

  • ctrl + w, {movement}
    • switches between files

Tabs

  • :tabe {file}
    • create a new tab with file
  • :tabs
    • list all tabs including their displayed windows
  • :tabm 0
    • move current tab to first
  • :tabm
    • move current tab to last
  • :tabm {i}
    • move current tab to position i+1

cycling between tabs

  • :tabn
    • go to next tab
  • :tabp
    • go to previous tab
  • gt
    • go to next tab
  • gT
    • go to previous tab
  • :tabfirst
    • go to first tab
  • :tablast
    • go to last tab
  • {i}gt
    • go to tab in position i