Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Stuck in Vim

Stuck in Vim

See what’s possible with the Vim text editor! A demo of how an engineer who couldn’t quit Vim uses this customizable text editor during their day-to-day work, a peek into the Vim plugin development community, and some DIY shortcut tricks.

Avatar for Loraine Kanervisto

Loraine Kanervisto

October 10, 2018
Tweet

More Decks by Loraine Kanervisto

Other Decks in Technology

Transcript

  1. Disclaimers • Vim's just a text editor. Don't wanna get

    caught up in "text editor wars" • High initial learning curve • Everyone's vim journey is different
  2. Toolbox • Everything within reach • command line is my

    Integrated Dev Environment • vim mode on command line
  3. Toolbox Example: API call from your text editor :read !curl

    -s "https://en.wikipedia.org/w/api.php?action=query&titl es=Frida_Kahlo&prop=pageimages&format=json&pithumbsiz e=500"
  4. Home row a - append s - substitute d -

    delete action f - find next character g(g), G - go to top or bottom of file
  5. Home row (continued) h - left j - up k

    - down l - right vim maze.txt
  6. Example: Mnemonics! ciw - change inner word ci" - change

    in quotes d$ - delete until end of line cs"' - change surrounding " to ' d} - delete until end of block
  7. Example: Search and replace open test replace a frequent word

    with something else Find keys in json blob: \("\w\+":\) Delete keys in json blob: %s/\("\w\+":\)//g Delete values in json blob %s/\("\w\+":\).*$/\1/g Advanced Regex
  8. How to get started! - vimtutor - use vim all

    the time! - vim mode on Atom / Sublime / VSCode - watch other vim users (YouTube, shoulder surfing) - look at .vimrc