SlideShare a Scribd company logo
How to become
a 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
How to become a practical Vim user
How to become a practical Vim user
Now it’s very easy
 to master Vim
How to become a practical Vim user
Practical Vim
by 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 by
useful 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 read
in 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 from
simple to advanced
Progress from
   simple to advanced
11. Macros
Progress from
   simple to advanced
11. Macros
Tip 64. Record and Execute a Macro
Progress from
   simple to advanced
11. Macros
Tip 64. Record and Execute a Macro
Tip 65. Normalize, Strike, Abort
Tip 66. Play Back with a Count
Tip 67. Repeat a Change on Contiguous Lines
Tip 68. Append Commands to a Macro
Tip 69. Act Upon a Collection of Files
Tip 70. Evaluate an Iterator to Number Items in a List
Progress from
   simple to advanced
11. Macros
Tip 64. Record and Execute a Macro
Tip 65. Normalize, Strike, Abort
Tip 66. Play Back with a Count
Tip 67. Repeat a Change on Contiguous Lines
Tip 68. Append Commands to a Macro
Tip 69. Act Upon a Collection of Files
Tip 70. Evaluate an Iterator to Number Items in a List
Tip 71. Edit the Contents of a Macro
Progress from
   simple to advanced
11. Macros
Tip 64. Record and Execute a Macro
Tip 65. Normalize, Strike, Abort
Tip 66. Play Back with a Count
Tip 67. Repeat a Change on Contiguous Lines
Tip 68. Append Commands to a Macro
Tip 69. Act Upon a Collection of Files
Tip 70. Evaluate an Iterator to Number Items in a List
Tip 71. Edit the Contents of a Macro
Progress from
   simple to advanced
11. Macros
Tip 64. Record and Execute a Macro
Tip 65. Normalize, Strike, Abort
Tip 66. Play Back with a Count
Tip 67. Repeat a Change on Contiguous Lines
Tip 68. Append Commands to a Macro
Tip 69. Act Upon a Collection of Files
Tip 70. Evaluate an Iterator to Number Items in a List
Tip 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
How to become a practical Vim user
We need “Practical Vim script”
       by Drew Neil
Q&A

More Related Content

What's hot (13)

PDF
WebAssembly Overview
Alexandr Skachkov
 
PPTX
Web performance
Samir Das
 
PPTX
T4T Training day - NodeJS
Tim Sommer
 
PPT
Extreme Javascript Minification
David Goemans
 
KEY
Smalltalk in the pocket - Building applications for the iPhone
Esteban Lorenzano
 
PDF
Auto closing parenthesis @vim conf2014
cohama
 
PPTX
Web assembly: a brief overview
Pavlo Iatsiuk
 
KEY
Gashuku Presen
guest3f1f27
 
PPTX
Web assembly with go
WangChow1
 
KEY
WordPress Multisite General Overview
Ronald Huereca
 
PDF
Emacs talk
Agam Brahma
 
PPTX
How *NOT* to firmware
Amit Serper
 
PDF
Use all the buzzwords
Jared Faris
 
WebAssembly Overview
Alexandr Skachkov
 
Web performance
Samir Das
 
T4T Training day - NodeJS
Tim Sommer
 
Extreme Javascript Minification
David Goemans
 
Smalltalk in the pocket - Building applications for the iPhone
Esteban Lorenzano
 
Auto closing parenthesis @vim conf2014
cohama
 
Web assembly: a brief overview
Pavlo Iatsiuk
 
Gashuku Presen
guest3f1f27
 
Web assembly with go
WangChow1
 
WordPress Multisite General Overview
Ronald Huereca
 
Emacs talk
Agam Brahma
 
How *NOT* to firmware
Amit Serper
 
Use all the buzzwords
Jared Faris
 

Viewers also liked (11)

PPTX
CSCOPE Tutorial
shawndaphipps
 
PPTX
Cscope and ctags
Saikat Megamind
 
ODP
Vim+cscope+ctags+taglist
Picker Weng
 
PPT
[20081118] How To Trace Code Like Source Insight Through Vim
Payton Chou
 
PPTX
Vim survival guide
Ben McCormick
 
PDF
Vim, the Way of the Keyboard
Federico Galassi
 
PPT
Power poin perswnt
apotek agam farma
 
PDF
Vim script と vimrc の正しい書き方@nagoya.vim #1
cohama
 
PPSX
vim - Tips and_tricks
Logan Palanisamy
 
PDF
Vim Rocks!
Kent Chen
 
PDF
Vim Hacks
Lin Yo-An
 
CSCOPE Tutorial
shawndaphipps
 
Cscope and ctags
Saikat Megamind
 
Vim+cscope+ctags+taglist
Picker Weng
 
[20081118] How To Trace Code Like Source Insight Through Vim
Payton Chou
 
Vim survival guide
Ben McCormick
 
Vim, the Way of the Keyboard
Federico Galassi
 
Power poin perswnt
apotek agam farma
 
Vim script と vimrc の正しい書き方@nagoya.vim #1
cohama
 
vim - Tips and_tricks
Logan Palanisamy
 
Vim Rocks!
Kent Chen
 
Vim Hacks
Lin Yo-An
 
Ad

Similar to How to become a practical Vim user (20)

KEY
VIM for the PHP Developer
John Congdon
 
PDF
Effective text editing with vim
xprayc
 
PDF
Vim
Eddie Kao
 
PDF
Mission vim possible-full
Sam Gottfried
 
PPTX
andrew's guide to vim
Andrew Yi
 
PDF
Unit 5 vim an advanced text editor
root_fibo
 
PDF
3.8.a how to - vim course book
Acácio Oliveira
 
PDF
101 3.8.1 vim course book
Acácio Oliveira
 
PDF
Tuffarsi in vim
sambismo
 
PDF
Vi survival guide
Jadesh Chanda
 
PDF
The Joy of Vim
Johan Jansson
 
PDF
VIM for Programmers
Akash Agrawal
 
PPTX
Vim knowhow
AkimitsuMurata
 
ODP
Vim and Python
majmcdonald
 
PDF
Rubizza #1 | Special Lecture. Vim
Rubizza
 
PPTX
Presentacion vim
Icalia Labs
 
PDF
Productive text editing with Vim
bryanbibat
 
PPTX
How To VIM
Diversido
 
PDF
Vi Editor
Shiwang Kalkhanda
 
PDF
vim brownbag - Richard forth
EdwardElric59
 
VIM for the PHP Developer
John Congdon
 
Effective text editing with vim
xprayc
 
Mission vim possible-full
Sam Gottfried
 
andrew's guide to vim
Andrew Yi
 
Unit 5 vim an advanced text editor
root_fibo
 
3.8.a how to - vim course book
Acácio Oliveira
 
101 3.8.1 vim course book
Acácio Oliveira
 
Tuffarsi in vim
sambismo
 
Vi survival guide
Jadesh Chanda
 
The Joy of Vim
Johan Jansson
 
VIM for Programmers
Akash Agrawal
 
Vim knowhow
AkimitsuMurata
 
Vim and Python
majmcdonald
 
Rubizza #1 | Special Lecture. Vim
Rubizza
 
Presentacion vim
Icalia Labs
 
Productive text editing with Vim
bryanbibat
 
How To VIM
Diversido
 
vim brownbag - Richard forth
EdwardElric59
 
Ad

Recently uploaded (20)

PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
July Patch Tuesday
Ivanti
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
July Patch Tuesday
Ivanti
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 

How to become a practical Vim user

  • 1. How to become a practical Vim user ujihisa.vim#3 2012-11-03 @kana1
  • 2. It was very hard to master Vim
  • 3. It was very hard to master Vim • Too many features to learn
  • 4. It was very hard to master Vim • Too many features to learn • Odd behavior for backward compatibility
  • 5. It was very hard to master Vim • Too many features to learn • Odd behavior for backward compatibility • Esoteric language to customize
  • 6. Too many features to learn
  • 7. Too many Ex commands
  • 8. Too many Ex commands
  • 14. Odd behavior • Useful features are turned off by default
  • 15. Odd behavior • Useful features are turned off by default • Syntax highlighting
  • 16. Odd behavior • Useful features are turned off by default • Syntax highlighting • Automatic indentation per filetype
  • 17. Odd behavior • Useful features are turned off by default • Syntax highlighting • Automatic indentation per filetype • Command-line completion
  • 18. Odd behavior • Useful features are turned off by default • Syntax highlighting • Automatic indentation per filetype • Command-line completion • and so on
  • 20. Odd behavior • :map is recursively expanded
  • 21. Odd behavior • :map is recursively expanded • <BS> cannot delete indent by default
  • 22. Odd behavior • :map is recursively expanded • <BS> cannot delete indent by default • and so on
  • 23. Esoteric language to customize
  • 31. But... • People rumor that Vim is one of the most invaluable skill
  • 34. Now it’s very easy to master Vim
  • 37. Why Practical Vim is great
  • 38. Why Practical Vim is great • Organized well to boost your productivity
  • 39. Why Practical Vim is great • Organized well to boost your productivity • Focused on mastering built-in features
  • 41. Organized well • Organized by useful theme
  • 42. Organized well • Organized by useful theme • Can be read in any order
  • 43. Organized well • Organized by useful theme • Can be read in any order • Progress from simple to advanced
  • 45. 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?
  • 46. Can be read in any order
  • 47. Can be read in any order • If you are an experienced user: → Read interesting tips, then move the book around as you need.
  • 48. 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.
  • 50. Progress from simple to advanced 11. Macros
  • 51. Progress from simple to advanced 11. Macros Tip 64. Record and Execute a Macro
  • 52. Progress from simple to advanced 11. Macros Tip 64. Record and Execute a Macro Tip 65. Normalize, Strike, Abort Tip 66. Play Back with a Count Tip 67. Repeat a Change on Contiguous Lines Tip 68. Append Commands to a Macro Tip 69. Act Upon a Collection of Files Tip 70. Evaluate an Iterator to Number Items in a List
  • 53. Progress from simple to advanced 11. Macros Tip 64. Record and Execute a Macro Tip 65. Normalize, Strike, Abort Tip 66. Play Back with a Count Tip 67. Repeat a Change on Contiguous Lines Tip 68. Append Commands to a Macro Tip 69. Act Upon a Collection of Files Tip 70. Evaluate an Iterator to Number Items in a List Tip 71. Edit the Contents of a Macro
  • 54. Progress from simple to advanced 11. Macros Tip 64. Record and Execute a Macro Tip 65. Normalize, Strike, Abort Tip 66. Play Back with a Count Tip 67. Repeat a Change on Contiguous Lines Tip 68. Append Commands to a Macro Tip 69. Act Upon a Collection of Files Tip 70. Evaluate an Iterator to Number Items in a List Tip 71. Edit the Contents of a Macro
  • 55. Progress from simple to advanced 11. Macros Tip 64. Record and Execute a Macro Tip 65. Normalize, Strike, Abort Tip 66. Play Back with a Count Tip 67. Repeat a Change on Contiguous Lines Tip 68. Append Commands to a Macro Tip 69. Act Upon a Collection of Files Tip 70. Evaluate an Iterator to Number Items in a List Tip 71. Edit the Contents of a Macro
  • 56. Focused on mastering built-in features
  • 57. Focused on mastering built-in features • Not only how to use, but also how to combine
  • 58. Focused on mastering built-in features
  • 59. Focused on mastering built-in features • Tip 1. Meet the dot command → Learn what the dot command does dw. = dwdw
  • 60. 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
  • 61. Focused on mastering built-in features
  • 62. Focused on mastering built-in features • Tip 10. Use counts to do simple arithmetic → Learn how to use counts d2w = 2dw = dwdw
  • 63. 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
  • 65. Conclusion • If you are not a Vim wizard: → Buy Practical Vim!
  • 66. Conclusion • If you are not a Vim wizard: → Buy Practical Vim! • If you are already a Vim wizard: → Share your magics!
  • 67. But
  • 68. But • Focused on mastering built-in features
  • 69. But • Focused on mastering built-in features • Not a book for how to tune up Vim for you
  • 70. But • Focused on mastering built-in features • Not a book for how to tune up Vim for you • Therefore
  • 72. We need “Practical Vim script” by Drew Neil
  • 73. Q&A

Editor's Notes