SlideShare una empresa de Scribd logo
1 de 73
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
Now it’s very easy
 to master Vim
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
We need “Practical Vim script”
       by Drew Neil
Q&A

Más contenido relacionado

La actualidad más candente

Web performance
Web performanceWeb performance
Web performanceSamir Das
 
T4T Training day - NodeJS
T4T Training day - NodeJST4T Training day - NodeJS
T4T Training day - NodeJSTim Sommer
 
Extreme Javascript Minification
Extreme Javascript MinificationExtreme Javascript Minification
Extreme Javascript MinificationDavid Goemans
 
Smalltalk in the pocket - Building applications for the iPhone
Smalltalk in the pocket - Building applications for the iPhoneSmalltalk in the pocket - Building applications for the iPhone
Smalltalk in the pocket - Building applications for the iPhoneEsteban Lorenzano
 
Auto closing parenthesis @vim conf2014
Auto closing parenthesis @vim conf2014Auto closing parenthesis @vim conf2014
Auto closing parenthesis @vim conf2014cohama
 
Web assembly: a brief overview
Web assembly: a brief overviewWeb assembly: a brief overview
Web assembly: a brief overviewPavlo Iatsiuk
 
Web assembly with go
Web assembly with goWeb assembly with go
Web assembly with goWangChow1
 
WordPress Multisite General Overview
WordPress Multisite General OverviewWordPress Multisite General Overview
WordPress Multisite General OverviewRonald Huereca
 
How *NOT* to firmware
How *NOT* to firmwareHow *NOT* to firmware
How *NOT* to firmwareAmit Serper
 
Use all the buzzwords
Use all the buzzwordsUse all the buzzwords
Use all the buzzwordsJared Faris
 

La actualidad más candente (13)

WebAssembly Overview
WebAssembly OverviewWebAssembly Overview
WebAssembly Overview
 
Web performance
Web performanceWeb performance
Web performance
 
T4T Training day - NodeJS
T4T Training day - NodeJST4T Training day - NodeJS
T4T Training day - NodeJS
 
Extreme Javascript Minification
Extreme Javascript MinificationExtreme Javascript Minification
Extreme Javascript Minification
 
Smalltalk in the pocket - Building applications for the iPhone
Smalltalk in the pocket - Building applications for the iPhoneSmalltalk in the pocket - Building applications for the iPhone
Smalltalk in the pocket - Building applications for the iPhone
 
Auto closing parenthesis @vim conf2014
Auto closing parenthesis @vim conf2014Auto closing parenthesis @vim conf2014
Auto closing parenthesis @vim conf2014
 
Web assembly: a brief overview
Web assembly: a brief overviewWeb assembly: a brief overview
Web assembly: a brief overview
 
Gashuku Presen
Gashuku PresenGashuku Presen
Gashuku Presen
 
Web assembly with go
Web assembly with goWeb assembly with go
Web assembly with go
 
WordPress Multisite General Overview
WordPress Multisite General OverviewWordPress Multisite General Overview
WordPress Multisite General Overview
 
Emacs talk
Emacs talkEmacs talk
Emacs talk
 
How *NOT* to firmware
How *NOT* to firmwareHow *NOT* to firmware
How *NOT* to firmware
 
Use all the buzzwords
Use all the buzzwordsUse all the buzzwords
Use all the buzzwords
 

Destacado

Vim+cscope+ctags+taglist
Vim+cscope+ctags+taglistVim+cscope+ctags+taglist
Vim+cscope+ctags+taglistPicker Weng
 
[20081118] How To Trace Code Like Source Insight Through Vim
[20081118] How To Trace Code Like Source Insight Through Vim[20081118] How To Trace Code Like Source Insight Through Vim
[20081118] How To Trace Code Like Source Insight Through VimPayton Chou
 
Vim, the Way of the Keyboard
Vim, the Way of the KeyboardVim, the Way of the Keyboard
Vim, the Way of the KeyboardFederico Galassi
 
Vim script と vimrc の正しい書き方@nagoya.vim #1
Vim script と vimrc の正しい書き方@nagoya.vim #1Vim script と vimrc の正しい書き方@nagoya.vim #1
Vim script と vimrc の正しい書き方@nagoya.vim #1cohama
 

Destacado (11)

CSCOPE Tutorial
CSCOPE TutorialCSCOPE Tutorial
CSCOPE Tutorial
 
Cscope and ctags
Cscope and ctagsCscope and ctags
Cscope and ctags
 
Vim+cscope+ctags+taglist
Vim+cscope+ctags+taglistVim+cscope+ctags+taglist
Vim+cscope+ctags+taglist
 
[20081118] How To Trace Code Like Source Insight Through Vim
[20081118] How To Trace Code Like Source Insight Through Vim[20081118] How To Trace Code Like Source Insight Through Vim
[20081118] How To Trace Code Like Source Insight Through Vim
 
Vim survival guide
Vim survival guideVim survival guide
Vim survival guide
 
Vim, the Way of the Keyboard
Vim, the Way of the KeyboardVim, the Way of the Keyboard
Vim, the Way of the Keyboard
 
Power poin perswnt
Power poin perswntPower poin perswnt
Power poin perswnt
 
Vim script と vimrc の正しい書き方@nagoya.vim #1
Vim script と vimrc の正しい書き方@nagoya.vim #1Vim script と vimrc の正しい書き方@nagoya.vim #1
Vim script と vimrc の正しい書き方@nagoya.vim #1
 
vim - Tips and_tricks
vim - Tips and_tricksvim - Tips and_tricks
vim - Tips and_tricks
 
Vim Rocks!
Vim Rocks!Vim Rocks!
Vim Rocks!
 
Vim Hacks
Vim HacksVim Hacks
Vim Hacks
 

Similar a Master Vim with Practical Vim

Effective text editing with vim
Effective text editing with vimEffective text editing with vim
Effective text editing with vimxprayc
 
Domain Driven Design Demonstrated
Domain Driven Design Demonstrated Domain Driven Design Demonstrated
Domain Driven Design Demonstrated Alan Christensen
 
Project Tools in Web Development
Project Tools in Web DevelopmentProject Tools in Web Development
Project Tools in Web Developmentkmloomis
 
Cloud conference - mongodb
Cloud conference - mongodbCloud conference - mongodb
Cloud conference - mongodbMitch Pirtle
 
Five killer hidden features in JIRA and Confluence
Five killer hidden features in JIRA and Confluence Five killer hidden features in JIRA and Confluence
Five killer hidden features in JIRA and Confluence Atlassian
 
Becoming a more productive Rails Developer
Becoming a more productive Rails DeveloperBecoming a more productive Rails Developer
Becoming a more productive Rails DeveloperJohn McCaffrey
 
Devconf 2011 - PHP - How Yii framework is developed
Devconf 2011 - PHP - How Yii framework is developedDevconf 2011 - PHP - How Yii framework is developed
Devconf 2011 - PHP - How Yii framework is developedAlexander Makarov
 
Refactor your code: when, why and how?
Refactor your code: when, why and how?Refactor your code: when, why and how?
Refactor your code: when, why and how?Nacho Cougil
 
Keeping MongoDB Data Safe
Keeping MongoDB Data SafeKeeping MongoDB Data Safe
Keeping MongoDB Data SafeTony Tam
 
Staging and Deployment
Staging and DeploymentStaging and Deployment
Staging and Deploymentheyrocker
 
Tooling for the JavaScript Era
Tooling for the JavaScript EraTooling for the JavaScript Era
Tooling for the JavaScript Eramartinlippert
 
Inside Wordnik's Architecture
Inside Wordnik's ArchitectureInside Wordnik's Architecture
Inside Wordnik's ArchitectureTony Tam
 
Rails development environment talk
Rails development environment talkRails development environment talk
Rails development environment talkReuven Lerner
 
Austin NoSQL 2011-07-06
Austin NoSQL 2011-07-06Austin NoSQL 2011-07-06
Austin NoSQL 2011-07-06jimbojsb
 
Becoming a more Productive Rails Developer
Becoming a more Productive Rails DeveloperBecoming a more Productive Rails Developer
Becoming a more Productive Rails DeveloperJohn McCaffrey
 

Similar a Master Vim with Practical Vim (20)

Effective text editing with vim
Effective text editing with vimEffective text editing with vim
Effective text editing with vim
 
Domain Driven Design Demonstrated
Domain Driven Design Demonstrated Domain Driven Design Demonstrated
Domain Driven Design Demonstrated
 
engage 2014 - JavaBlast
engage 2014 - JavaBlastengage 2014 - JavaBlast
engage 2014 - JavaBlast
 
Project Tools in Web Development
Project Tools in Web DevelopmentProject Tools in Web Development
Project Tools in Web Development
 
Cloud conference - mongodb
Cloud conference - mongodbCloud conference - mongodb
Cloud conference - mongodb
 
Five killer hidden features in JIRA and Confluence
Five killer hidden features in JIRA and Confluence Five killer hidden features in JIRA and Confluence
Five killer hidden features in JIRA and Confluence
 
Tweakers Anonymous
Tweakers AnonymousTweakers Anonymous
Tweakers Anonymous
 
Becoming a more productive Rails Developer
Becoming a more productive Rails DeveloperBecoming a more productive Rails Developer
Becoming a more productive Rails Developer
 
Tweakers Anonymous
Tweakers AnonymousTweakers Anonymous
Tweakers Anonymous
 
Devconf 2011 - PHP - How Yii framework is developed
Devconf 2011 - PHP - How Yii framework is developedDevconf 2011 - PHP - How Yii framework is developed
Devconf 2011 - PHP - How Yii framework is developed
 
Refactor your code: when, why and how?
Refactor your code: when, why and how?Refactor your code: when, why and how?
Refactor your code: when, why and how?
 
Keeping MongoDB Data Safe
Keeping MongoDB Data SafeKeeping MongoDB Data Safe
Keeping MongoDB Data Safe
 
Why puppet? Why now?
Why puppet? Why now?Why puppet? Why now?
Why puppet? Why now?
 
Staging and Deployment
Staging and DeploymentStaging and Deployment
Staging and Deployment
 
Tooling for the JavaScript Era
Tooling for the JavaScript EraTooling for the JavaScript Era
Tooling for the JavaScript Era
 
Inside Wordnik's Architecture
Inside Wordnik's ArchitectureInside Wordnik's Architecture
Inside Wordnik's Architecture
 
Rails development environment talk
Rails development environment talkRails development environment talk
Rails development environment talk
 
Austin NoSQL 2011-07-06
Austin NoSQL 2011-07-06Austin NoSQL 2011-07-06
Austin NoSQL 2011-07-06
 
Garbage Collection .Net
Garbage Collection .NetGarbage Collection .Net
Garbage Collection .Net
 
Becoming a more Productive Rails Developer
Becoming a more Productive Rails DeveloperBecoming a more Productive Rails Developer
Becoming a more Productive Rails Developer
 

Último

The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 

Último (20)

The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 

Master Vim with Practical Vim

  • 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
  • 32.
  • 33.
  • 34. Now it’s very easy to master Vim
  • 35.
  • 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
  • 71.
  • 72. We need “Practical Vim script” by Drew Neil
  • 73. Q&A

Notas del editor

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. \n
  53. \n
  54. \n
  55. \n
  56. \n
  57. \n
  58. \n