Skip to content

Latest commit

 

History

History
149 lines (96 loc) · 3.04 KB

Tips.VIM.md

File metadata and controls

149 lines (96 loc) · 3.04 KB

VIM (Vi IMproved) Tips

My Personal Vim configuration

Reference

Release Notes

Tutorials

From Commandline:

  • Vim Version
    • vim --version

Within Vim:

  • View Runtimepath (inside Vim)

    • :echo &runtimepath
  • Which scripts are loaded

    • :scriptnames
  • View where a setting was loaded from

    • :verbose set <setting name> (for example: :verbose set background)

Navigation

  • Navigating

    • Move to top of screen (Higher)
      • shft-h
    • Move to Middle of screen
      • shift-m
    • Move to Lower of screen
      • shift-l
  • What Line # am I on?

    • :set number
  • GOTO Line #

    • <esc>
    • #
    • shift-g
  • GOTO Line #

    • :#
  • GOTO Last Line

    • shift-g
  • Input Mode

    • [ESC] - to end inut
    • . - repeat last editing command
    • # command - repeat command, # times
    • /string/ - find pattern
    • a - append character mode
    • A - append at EOL
    • cw - change word
    • d - delete one character
    • dd - deline line
    • dw - delete word
    • G - End of File
    • i - insert
    • O - open/insert line
    • p - paste/put buffer (re: paste a yanked line)
    • r - replace character
    • R - Replace Characters
    • x - delete one character
    • y - yank (copy) a line
    • yy - copy line in buffer
  • Command Mode

    • :q - quit
    • :q! - quit, no save
    • :u - Undo last command
    • :redo - redo
    • :w - write
    • :wq - write & quit
  • Line Numbering

    • ON
    • OFF
      • :set nonumber | nonu
  • Copy Selection, with Mouse

    • In the vim command line to enable copy/paste of text selected using the mouse.
    • :set mouse&
  • Replace text

Language Plugins

Tutorials & Quick References