• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
How to become a practical Vim user
 

How to become a practical Vim user

on

  • 3,752 views

 

Statistics

Views

Total Views
3,752
Views on SlideShare
3,705
Embed Views
47

Actions

Likes
9
Downloads
28
Comments
0

2 Embeds 47

https://twitter.com 46
https://si0.twimg.com 1

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • \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 How to become a practical Vim user Presentation Transcript

  • How to becomea practical Vim user ujihisa.vim#3 2012-11-03 @kana1
  • It was very hard to master Vim
  • It was very hard to master Vim• Too many features to learn
  • It was very hard to master Vim• Too many features to learn• Odd behavior for backward compatibility
  • It was very hard to master Vim• Too many features to learn• Odd behavior for backward compatibility• Esoteric language to customize
  • Too many features to learn
  • Too many Ex commands
  • Too many Ex commands
  • Too many functions
  • Too many functions
  • Too many documents
  • Too many documents
  • Odd behavior
  • Odd behavior• Useful features are turned off by default
  • Odd behavior• Useful features are turned off by default • Syntax highlighting
  • Odd behavior• Useful features are turned off by default • Syntax highlighting • Automatic indentation per filetype
  • Odd behavior• Useful features are turned off by default • Syntax highlighting • Automatic indentation per filetype • Command-line completion
  • Odd behavior• Useful features are turned off by default • Syntax highlighting • Automatic indentation per filetype • Command-line completion • and so on
  • Odd behavior
  • Odd behavior• :map is recursively expanded
  • Odd behavior• :map is recursively expanded• <BS> cannot delete indent by default
  • Odd behavior• :map is recursively expanded• <BS> cannot delete indent by default• and so on
  • Esoteric language to customize
  • Difficult comments
  • Difficult comments
  • :endsomething
  • :endsomething
  • Higher-odder functions
  • Higher-odder functions
  • But...
  • But...• People rumor that Vim is one of the most invaluable skill
  • Now it’s very easy to master Vim
  • Practical Vimby Drew Neil
  • Why Practical Vim is great
  • Why Practical Vim is great• Organized well to boost your productivity
  • Why Practical Vim is great• Organized well to boost your productivity• Focused on mastering built-in features
  • Organized well
  • Organized well• Organized by useful theme
  • Organized well• Organized by useful theme• Can be read in any order
  • Organized well• Organized by useful theme• Can be read in any order• Progress from simple to advanced
  • Organized byuseful theme
  • 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?
  • Can be readin any order
  • Can be read in any order• If you are an experienced user: → Read interesting tips, then move the book around as you need.
  • 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.
  • Progress fromsimple to advanced
  • Progress from simple to advanced11. Macros
  • Progress from simple to advanced11. MacrosTip 64. Record and Execute a Macro
  • 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
  • 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
  • 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
  • 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
  • Focused on mastering built-in features
  • Focused on mastering built-in features• Not only how to use, but also how to combine
  • Focused on mastering built-in features
  • Focused on mastering built-in features• Tip 1. Meet the dot command → Learn what the dot command does dw. = dwdw
  • 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
  • Focused on mastering built-in features
  • Focused on mastering built-in features• Tip 10. Use counts to do simple arithmetic → Learn how to use counts d2w = 2dw = dwdw
  • 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
  • Conclusion
  • Conclusion• If you are not a Vim wizard: → Buy Practical Vim!
  • Conclusion• If you are not a Vim wizard: → Buy Practical Vim!• If you are already a Vim wizard: → Share your magics!
  • But
  • But• Focused on mastering built-in features
  • But• Focused on mastering built-in features• Not a book for how to tune up Vim for you
  • But• Focused on mastering built-in features• Not a book for how to tune up Vim for you• Therefore
  • We need “Practical Vim script” by Drew Neil
  • Q&A