I read the book Practical Vim: Edit Text at the Speed of Thought, it's pretty awesome! so I want to do a note for this book.I will write all the tips in this article relared to the book.
Please read this article first Seven habits of effective text editing,which is very good for editor using.
The beginner tutorial for vim, run command vimtutor
in your terminal(install vim fisrt if you don't have this command) and have a fun.
You also can find the 中文(coming soon,maybe) version
- 1. Meet the Dot Command
- 2. Don't Repeat Yourself
- 3. Take One Step Back, Then Three Forward
- 4. Act,Repear,Reverse
- 5. Find and Replace by Hand
- 6. Meet the Dot Formula
- 7. Pause with Your Brush Off the Page
- 8. Chunk Your Undos
- 9. Compose Repeatable Changes
- 10. Use Counts to Do Simple Arithmetic
- 11. Don’t Count If You Can Repeat
- 12. Combine and Conquer
- 13. Make Corrections Instantly from Insert Mode
- 14. Get Back to Normal Mode
- 15. Paste from a Register Without Leaving Insert Mode
- 16. Do Back-of-the-Envelope Calculations in Place
- 17. Insert Unusual Characters by Character Code
- 18. Insert Unusual Characters by Digraph
- 19. Overwrite Existing Text with Replace Mode
- 20. Grok Visual Mode
- 21. Define a Visual Selection
- 22. Repeat Line-Wise Visual Commands
- 23. Prefer Operators to Visual Commands Where Possible
- 24. Edit Tabular Data with Visual-Block Mode
- 25. Change Columns of Text
- 26. Append After a Ragged Visual Block
- 27. Meet Vim’s Command Line
- 28. Execute a Command on One or More Consecutive Lines
- 29. Duplicate or Move Lines Using ‘:t’ and ‘:m’ Commands
- 30. Run Normal Mode Commands Across a Range
- 31. Repeat the Last Ex Command
- 32. Tab-Complete Your Ex Commands
- 33. Insert the Current Word at the Command Prompt
- 34. Recall Commands from History
- 35. Run Commands in the Shell
- 36. Track Open Files with the Buffer List
- 37. Group Buffers into a Collection with the Argument List
- 38. Manage Hidden Files
- 39. Divide Your Workspace into Split Windows
- 40. Organize Your Window Layouts with Tab Pages
- 41. Open a File by Its Filepath Using ‘:edit’
- 42. Open a File by Its Filename Using ‘:find’
- 43. Explore the File System with netrw
- 44. Save Files to Nonexistent Directories
- 45. Save a File as the Super User
- 46. Keep Your Fingers on the Home Row
- 47. Distinguish Between Real Lines and Display Lines
- 48. Move Word-Wise
- 49. Find by Character
- 50. Search to Navigate
- 51. Trace Your Selection with Precision Text Objects
- 52. Delete Around, or Change Inside
- 53. Mark Your Place and Snap Back to It
- 54. Jump Between Matching Parentheses
- 55. Traverse the Jump List
- 56. Traverse the Change List
- 57. Jump to the Filename Under the Cursor
- 58. Snap Between Files Using Global Marks
- 59. Delete, Yank, and Put with Vim’s Unnamed Register
- 60. Grok Vim’s Registers
- 61. Replace a Visual Selection with a Register
- 62. Paste from a Register
- 63. Interact with the System Clipboard
- 64. Record and Execute a Macro
- 65. Normalize, Strike, Abort
- 66. play back with a count
- 67. Repeat a Change on Contiguous Lines
- 68. Append Commands to a Macro
- 69. Act Upon a Collection of Files
- 70. Evaluate an Iterator to Number Items in a List
- 71. Edit the Contents of a Macro
- 72. Tune the Case Sensitivity of Search Patterns
- 73. Use the \v Pattern Switch for Regex Searches
- 74. Use the \V Literal Switch for Verbatim Searches
- 75. Use Parentheses to Capture Submatches
- 76. Stake the Boundaries of a Word
- 77. Stake the Boundaries of a Match
- 78. Escape Problem Characters
- 79. Meet the Search Command
- 80. Highlight Search Matches
- 81. Preview the First Match Before Execution
- 82. Count the Matches for the Current Pattern
- 83. Offset the Cursor to the End of a Search Match
- 84. Operate on a Complete Search Match
- 85. Create Complex Patterns by Iterating upon Search History
- 86. Search for the Current Visual Selection
- 87. Meet the Substitute Command
- 88. Find and Replace Every Match in a File
- 89. Eyeball Each Substitution
- 90. Reuse the Last Search Pattern
- 91. Replace with the Contents of a Register
- 92. Repeat the Previous Substitute Command
- 93. Rearrange CSV Fields Using Submatches
- 94. Perform Arithmetic on the Replacement
- 95. Swap Two or More Words
- 96. Find and Replace Across Multiple Files
- 97. Meet the Global Command
- 98. Delete Lines Containing a Pattern
- 99. Collect TODO Items in a Register
- 100. Alphabetize the Properties of Each Rule in a CSS File
- 101. Meet ctags
- 102. Configure Vim to Work with ctags
- 103. Navigate Keyword Definitions with Vim’s Tag Navigation Commands
- 104. Compile Code Without Leaving Vim
- 105. Browse the Quickfix List
- 106. Recall Results from a Previous Quickfix List
- 107. Customize the External Compiler
- 108. Call grep Without Leaving Vim
- 109. Customize the grep Program
- 110. Grep with Vim’s Internal Search Engine