Vim

for the common people

By Gonzalo Serrano / @gonzaloserrano

Say what?

History

  • 1978: vi
  • 1991: Vim, Bram Moolenaar @ Google
  • 2001: Gonzalo learns Vim thanks to @gallir and @davitenio
  • 2014: You learn vim!

Objective: need for speed

  • No mouse
  • Few keystrokes as possible (vimgolf!)
  • DRY

Pros

  • Modal
  • Extensible
  • Found in every UNIX system

Cons

  • Needs config tunning, but spf13 ftw
  • Cut/paste, but homebrew ftw
  • Tough, but your brain ftw

Modes

Plugins

Plugin management

Demo

Before and after

Overview

Meheheh

Vim 101

Vim 101

The basics

  • Start
  • Insert & Command modes
  • Save and quit

Demo

quick edit

Vim 101

Grammar

Verbs aka Actions

  • v for Visual
  • c for Change
  • d for Delete
  • y for Yank (Copy)
  • p for Paste
  • etc

Nouns aka Objects

  • w for Word
  • s for Sentence
  • p for Paragraphs
  • b for Blocks
  • t for Tags
  • etc

Complements aka Modifiers

  • i for Inside
  • a for Around
  • t for Til find a character
  • f for Find a character
  • / for Find a regex
  • Others: 0, _, $, %, gg, G, {, }

+

Numbers for

repetition

Lets play

Vim 201

Cool stuff

  • Star and search/replace
  • Repetition aka the dot
  • Macros
  • Folding
  • Marks
  • Visual column changes
  • Indentation

Cool plugins

  • Fugitive
  • Syntastic
  • Ctags
  • CtrlP
  • NERDTree
  • NERDCommenter
  • Taglist
  • EasyAlign

Whatever

Vim "integration"

  • emacs Vim-mode
  • Sublime Vintage mode
  • PHPStorm vim plugin
  • Eclipse's eclim
  • hjkl:
    • GMail
    • Facebook
    • Twitter
    • Google Plus

Reference links

The end

Questions?