Vim - Precision editing at the speed of thought

802afd5856ed0054d7d1851ea21cbabe?s=47 nelstrom
November 07, 2012

Vim - Precision editing at the speed of thought

802afd5856ed0054d7d1851ea21cbabe?s=128

nelstrom

November 07, 2012
Tweet

Transcript

  1. VIM precision editing at the speed of thought Drew Neil,

    @nelstrom November 7th 2012, Øredev
  2. TWO REASONS YOU DIS VIM

  3. 1. You don’t grok Vim

  4. 1. You don’t grok Vim i don’t blame you

  5. 2. You confuse Vim with vi

  6. 2. You confuse Vim with vi shame on you

  7. http://twitter.com/kentbrew/status/15419224013

  8. MODAL INTERFACES

  9. http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html

  10. why modal?

  11. MODAL INTERFACES are economical

  12. None
  13. None
  14. In a MODAL interface Every BUTTON performs a different function

    in each mode
  15. In a TOUCH interface Every PIXEL performs a different function

    in each mode
  16. MODAL INTERFACES are everywhere

  17. MODAL INTERFACES TextMate: ⌘F

  18. None
  19. MODAL INTERFACES TextMate: ⌘A

  20. None
  21. None
  22. TextMate is a MODAL EDITOR

  23. TextMate is a MODAL EDITOR not a very good one

  24. MODAL INTERFACES are everywhere

  25. h.koppdelaney http://www.flickr.com/photos/h-k-d/4490192739/

  26. http://www.flickr.com/photos/katzarella/6378185339/

  27. TARGET PRACTICE

  28. None
  29. MOUSE

  30. None
  31. the time required to rapidly move to a target area

    is a function of the distance to and the size of the target FITT’S LAW
  32. http://particletree.com/features/visualizing-fittss-law/

  33. [duh] FITT’S LAW

  34. http://particletree.com/features/visualizing-fittss-law/

  35. while (!thereYet) { keepGoing(); }

  36. http://www.flickr.com/photos/darwinbell/316668966/

  37. HUNT & PECK

  38. None
  39. None
  40. while (!thereYet) { keepGoing(); }

  41. Photograph by Hannah Adcock

  42. None
  43. VIM: PREHISTORY

  44. http://www.flickr.com/photos/splorp/6551397629/in/photostream/

  45. None
  46. None
  47. while (!thereYet) { keepGoing(); }

  48. PRECISION TARGETING

  49. None
  50. two steps along, then one step along the perpendicular axis

    The Knight can move
  51. to the closest squares that no other piece can reach

    The Knight can move
  52. None
  53. None
  54. None
  55. FINDING CHARACTERS

  56. FINDING CHARACTERS f{char} jumps to the next occurrence of {char}

  57. The Knight can move to the closest squares that no

    other piece can reach t
  58. The Knight can move to the closest squares that no

    other piece can reach t
  59. The Knight can move to the closest squares that no

    other piece can reach t v f p The Knight can move to the closest squares that no other piece can reach p
  60. http://www.flickr.com/photos/silkegb/2745580110/

  61. The Knight can move to the closest squares that no

    other piece can reach t
  62. The Knight can move to the closest squares that no

    other piece can reach t
  63. The Knight can move to the closest squares that no

    other piece can reach t The Knight can move to the closest squares that no other piece can reach t v f t
  64. The Knight can move to the closest squares that no

    other piece can reach t The Knight can move to the closest squares that no other piece can reach t v f t ;
  65. The Knight can move to the closest squares that no

    other piece can reach t The Knight can move to the closest squares that no other piece can reach t v f t ; ;
  66. The Knight can move to the closest squares that no

    other piece can reach t The Knight can move to the closest squares that no other piece can reach t v f t ; ; ;
  67. I’ve been expecting you, Mr Bond. I

  68. I’ve been expecting you, Mr Bond. I delete this

  69. I’ve been expecting you, Mr Bond. I f , I’ve

    been expecting you, Mr Bond. , delete this
  70. I’ve been expecting you, Mr Bond. I f , I’ve

    been expecting you, Mr Bond. , d t . I’ve been expecting you. . delete this
  71. http://robots.thoughtbot.com/post/13164810557/the-vim-learning-curve-is-a-myth No one ever says “I’d love to learn Street

    Fighter 2, but there are just so many combos!” Ben Orenstein
  72. Illustration by Ben Cormack

  73. Illustration by Ben Cormack

  74. define regions of text by structure TEXT OBJECTS

  75. “quotes” a” - a quoted string i” - inner quoted

    string
  76. (parentheses) a) - all of a (block) i) - inside

    of a (block)
  77. [brackets] a] - all of a [block] i] - inside

    of a [block]
  78. {braces} a} - all of a {block} i} - inside

    of a {block}
  79. <xml>tags</xml> at - all of a tag block it -

    inside of a tag block
  80. refs: { clearButton: 'button[action=clearHomeBadge]', starButton: 'button[action=pingHomeBadge]' } a

  81. refs: { clearButton: 'button[action=clearHomeBadge]', starButton: 'button[action=pingHomeBadge]' } a v i

    [
  82. refs: { clearButton: 'button[action=clearHomeBadge]', starButton: 'button[action=pingHomeBadge]' } a refs: {

    clearButton: 'button[action=clearHomeBadge]', starButton: 'button[action=pingHomeBadge]' } e v i [
  83. refs: { clearButton: 'button[action=clearHomeBadge]', starButton: 'button[action=pingHomeBadge]' } e i ‘

    refs: { clearButton: 'button[action=clearHomeBadge]', starButton: 'button[action=pingHomeBadge]' } ]
  84. a } refs: { clearButton: 'button[action=clearHomeBadge]', starButton: 'button[action=pingHomeBadge]' } ]

    refs: { clearButton: 'button[action=clearHomeBadge]', starButton: 'button[action=pingHomeBadge]' } }
  85. http://www.flickr.com/photos/liquene/3177469139/

  86. AUTOMATION

  87. Illustration by Ben Cormack

  88. QUESTIONS?

  89. None