How to become a practical Vim user

4,497 views

Published on

Published in: Technology
0 Comments
11 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
4,497
On SlideShare
0
From Embeds
0
Number of Embeds
69
Actions
Shares
0
Downloads
43
Comments
0
Likes
11
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • How to become a practical Vim user

    1. 1. How to becomea practical Vim user ujihisa.vim#3 2012-11-03 @kana1
    2. 2. It was very hard to master Vim
    3. 3. It was very hard to master Vim• Too many features to learn
    4. 4. It was very hard to master Vim• Too many features to learn• Odd behavior for backward compatibility
    5. 5. It was very hard to master Vim• Too many features to learn• Odd behavior for backward compatibility• Esoteric language to customize
    6. 6. Too many features to learn
    7. 7. Too many Ex commands
    8. 8. Too many Ex commands
    9. 9. Too many functions
    10. 10. Too many functions
    11. 11. Too many documents
    12. 12. Too many documents
    13. 13. Odd behavior
    14. 14. Odd behavior• Useful features are turned off by default
    15. 15. Odd behavior• Useful features are turned off by default • Syntax highlighting
    16. 16. Odd behavior• Useful features are turned off by default • Syntax highlighting • Automatic indentation per filetype
    17. 17. Odd behavior• Useful features are turned off by default • Syntax highlighting • Automatic indentation per filetype • Command-line completion
    18. 18. Odd behavior• Useful features are turned off by default • Syntax highlighting • Automatic indentation per filetype • Command-line completion • and so on
    19. 19. Odd behavior
    20. 20. Odd behavior• :map is recursively expanded
    21. 21. Odd behavior• :map is recursively expanded• <BS> cannot delete indent by default
    22. 22. Odd behavior• :map is recursively expanded• <BS> cannot delete indent by default• and so on
    23. 23. Esoteric language to customize
    24. 24. Difficult comments
    25. 25. Difficult comments
    26. 26. :endsomething
    27. 27. :endsomething
    28. 28. Higher-odder functions
    29. 29. Higher-odder functions
    30. 30. But...
    31. 31. But...• People rumor that Vim is one of the most invaluable skill
    32. 32. Now it’s very easy to master Vim
    33. 33. Practical Vimby Drew Neil
    34. 34. Why Practical Vim is great
    35. 35. Why Practical Vim is great• Organized well to boost your productivity
    36. 36. Why Practical Vim is great• Organized well to boost your productivity• Focused on mastering built-in features
    37. 37. Organized well
    38. 38. Organized well• Organized by useful theme
    39. 39. Organized well• Organized by useful theme• Can be read in any order
    40. 40. Organized well• Organized by useful theme• Can be read in any order• Progress from simple to advanced
    41. 41. Organized byuseful theme
    42. 42. Organized by useful theme• 1. The Vim Way • 12. Matching Patterns and Literals• 2. Normal Mode • 13. Search• 3. Insert Mode • 14. Substitution• 4.Visual Mode • 15. Global Commands• 5. Command-Line Mode • 16. Index and Navigate Source Code with ctags• 6. Manage Multiple Files • 17. Compile Code and Navigate Errors with the Quickfix List• 7. Open Files and Save Them to Disk • 18. Search Project-Wide with grep, vimgrep,• 8. Navigate Inside Files with Motions and Others• 9. Navigate Between Files with Jumps • 19. Dial X for Autocompletion• 10. Copy and Paste • 20. Find and Fix Typos with Vim’s Spell Checker• 11. Macros • 21. Now What?
    43. 43. Can be readin any order
    44. 44. Can be read in any order• If you are an experienced user: → Read interesting tips, then move the book around as you need.
    45. 45. Can be read in any order• If you are an experienced user: → Read interesting tips, then move the book around as you need.• If you are a novice: → Read from the first to the last. Chapters are organized so.
    46. 46. Progress fromsimple to advanced
    47. 47. Progress from simple to advanced11. Macros
    48. 48. Progress from simple to advanced11. MacrosTip 64. Record and Execute a Macro
    49. 49. Progress from simple to advanced11. MacrosTip 64. Record and Execute a MacroTip 65. Normalize, Strike, AbortTip 66. Play Back with a CountTip 67. Repeat a Change on Contiguous LinesTip 68. Append Commands to a MacroTip 69. Act Upon a Collection of FilesTip 70. Evaluate an Iterator to Number Items in a List
    50. 50. Progress from simple to advanced11. MacrosTip 64. Record and Execute a MacroTip 65. Normalize, Strike, AbortTip 66. Play Back with a CountTip 67. Repeat a Change on Contiguous LinesTip 68. Append Commands to a MacroTip 69. Act Upon a Collection of FilesTip 70. Evaluate an Iterator to Number Items in a ListTip 71. Edit the Contents of a Macro
    51. 51. Progress from simple to advanced11. MacrosTip 64. Record and Execute a MacroTip 65. Normalize, Strike, AbortTip 66. Play Back with a CountTip 67. Repeat a Change on Contiguous LinesTip 68. Append Commands to a MacroTip 69. Act Upon a Collection of FilesTip 70. Evaluate an Iterator to Number Items in a ListTip 71. Edit the Contents of a Macro
    52. 52. Progress from simple to advanced11. MacrosTip 64. Record and Execute a MacroTip 65. Normalize, Strike, AbortTip 66. Play Back with a CountTip 67. Repeat a Change on Contiguous LinesTip 68. Append Commands to a MacroTip 69. Act Upon a Collection of FilesTip 70. Evaluate an Iterator to Number Items in a ListTip 71. Edit the Contents of a Macro
    53. 53. Focused on mastering built-in features
    54. 54. Focused on mastering built-in features• Not only how to use, but also how to combine
    55. 55. Focused on mastering built-in features
    56. 56. Focused on mastering built-in features• Tip 1. Meet the dot command → Learn what the dot command does dw. = dwdw
    57. 57. Focused on mastering built-in features• Tip 1. Meet the dot command → Learn what the dot command does dw. = dwdw• Tip 9. Compose repeatable changes → Learn how to effectively use the dot Bad: dbx, bdw Good: daw
    58. 58. Focused on mastering built-in features
    59. 59. Focused on mastering built-in features• Tip 10. Use counts to do simple arithmetic → Learn how to use counts d2w = 2dw = dwdw
    60. 60. Focused on mastering built-in features• Tip 10. Use counts to do simple arithmetic → Learn how to use counts d2w = 2dw = dwdw• Tip 11. Don’t count if you can repeat → Learn when to use counts dw... rather than d4w and 4dw
    61. 61. Conclusion
    62. 62. Conclusion• If you are not a Vim wizard: → Buy Practical Vim!
    63. 63. Conclusion• If you are not a Vim wizard: → Buy Practical Vim!• If you are already a Vim wizard: → Share your magics!
    64. 64. But
    65. 65. But• Focused on mastering built-in features
    66. 66. But• Focused on mastering built-in features• Not a book for how to tune up Vim for you
    67. 67. But• Focused on mastering built-in features• Not a book for how to tune up Vim for you• Therefore
    68. 68. We need “Practical Vim script” by Drew Neil
    69. 69. Q&A

    ×