Skip to content

Vim PHP IDE for dummies

mouneyrac edited this page Dec 18, 2012 · 19 revisions

List of all useful shortcuts for Vim beginner

Mac OS Vim

Switch file

  • Open file: e: filepath
  • next file: :bn
  • previous file: :bp
  • list of opened files: :buffers
  • go to an opened file: :buffer X

Search

  • Search for function declaration in all projects:
  • Search for string in all projects:
  • Search for string in file: /xxxx
  • Search for next string in file: n
  • Next occurence of a word: *
  • Previous occurence of a word: #

Moving

  • Page down: Control-f
  • Page Up: Control-b
  • Bottom of the file: G
  • Top of the file: gg
  • Go to the matching bracket: %
  • Beginning of the line: 0
  • Move around: Shift-arrows

Windows

  • retract left window: F7
  • retract right window: F8
  • Right window: Control-w right_arrow
  • Left window: Control-w left_arrow
  • close current window: :clo
  • From navigator open in new windows: s

Git

  • diff:
Clone this wiki locally