Slide 1

Slide 1 text

VIM FOR VISUAL STUDIO VSVIM Nicola Iarocci nicolaiarocci.com

Slide 2

Slide 2 text

VSVIM FOR VISUAL STUDIO BRIEF STORY OF VIM ▸ “vi” dates back to 1976, for Unix systems ▸ “Vim” (Vi IMproved) debuts in 1991 ▸ Originally released on the Amiga ▸ Default on all *nix system (OSX, Linux, etc.) ▸ Available for all platforms, Windows included

Slide 3

Slide 3 text

VIM KEYPOINTS

Slide 4

Slide 4 text

CROSS PLATFORM

Slide 5

Slide 5 text

VERY FAST AND EFFICIENT CODE WRITING

Slide 6

Slide 6 text

NEVER HAVE TO LEAVE THE KEYBOARD

Slide 7

Slide 7 text

HERE IS WHY VIM USES HJKL AS ARROW KEYS BY THE WAY ADM-3A TERMINAL USED BY BILL JOY TO CODE THE ORIGINAL VI

Slide 8

Slide 8 text

VSVIM FOR VISUAL STUDIO VSVIM ▸ A Visual Studio 2010+ Extension ▸ Integrates familiar key binding experience of Vim directly into Visual Studio ▸ Rich set of vim features supported ▸ Created and actively maintained by Jared Parsons (MSFT) ▸ Open source, code is on GitHub ▸ Supports vim configuration files (.vimrc) ▸ ViEmu is a good alternative for previous VS versions ($)

Slide 9

Slide 9 text

TEXT VIM VERBS ▸ d: delete ▸ c: change ▸ y: yank (copy) ▸ v: visually select ▸ i: insert before the cursor ▸ I: insert at the beginning of line ▸ a: append after the cursor ▸ A: append at the end of line ▸ .: repeat last command ▸ … and more

Slide 10

Slide 10 text

TEXT VIM MODIFIERS ▸ i: inside ▸ a: around ▸ t: searches for something and stops before it (to) ▸ f: searchers for something and lands on it ▸ #: number (e.g.: 1, 2, 10) ▸ 0: begin of line ▸ ^: first word in line ▸ $: end of line ▸ … and a lot more

Slide 11

Slide 11 text

TEXT VIM NOUNS ▸ w: word ▸ W: WORD (delimited by whitespace) ▸ b: beginning of word ▸ B: beginning of WORD ▸ e: end of word ▸ E: end of WORD ▸ %: matching parenthesis ▸ p or }: paragraph ▸ t: tag (HTML/XML) ▸ b: block (think code) ▸ … and more

Slide 12

Slide 12 text

TEXT VIM “ACTIONS”: VERB+(MODIFIER)+NOUN ▸ dw: (d)elete (w)ord under cursor ▸ d2w: (d)elete two (w)ords ▸ cis: (c)hange (i)nside the (s)entence you are in ▸ yip: (y)ank/copy (i)nside the (p)aragraph you are in ▸ ct<: (c)hange (t)o open bracket ▸ d$: (d)elete until the end of the line ▸ … you get the idea

Slide 13

Slide 13 text

DEMO TIME!