没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
Buyer: xiujuan lu (luxiujuan@gmail.com)
Transaction ID: 85W16630AD8515549
Vim 101 Hacks www.thegeekstuff.com
2
Table of Contents
Introduction ............................................................. 8
About the Author ....................................................... 9
Copyright & Disclaimer ............................................... 10
Foreword ............................................................... 11
Version .................................................................. 12
Chapter 1: Vim Basics ................................................ 13
Opening a File ..................................................................... 13
Saving a File ....................................................................... 13
Closing a File ...................................................................... 14
Types of Vim Modes .............................................................. 14
Moving around a File ............................................................. 16
Vim Configuration File (~/.vimrc)............................................. 17
Vim Version ........................................................................ 19
Vim Installation ................................................................... 20
All About Vim Help ............................................................... 21
Use Vimtutor for Practice ...................................................... 22
Chapter 2: Basic Navigation ......................................... 23
Hack 1. Scroll Full Page or Half Page ........................................ 23
Hack 2. Word Navigation ........................................................ 24
Hack 3. Position cursor at specific location within a line ............... 25
Hack 4. Paragraph, Section, Sentence Navigations ....................... 26
Chapter 3: Advanced Navigation ................................... 27
Hack 5. Screen Navigation...................................................... 27
Hack 6. Redraw Screen with Current Line on Top, Bottom or Middle 27
Buyer: xiujuan lu (luxiujuan@gmail.com)
Transaction ID: 85W16630AD8515549
Vim 101 Hacks www.thegeekstuff.com
3
Hack 7. Navigate to Top and Bottom of the File .......................... 28
Hack 8. Navigate to N
th
Character, N
th
Percentage of a File ............ 28
Hack 9. Line Number Navigation .............................................. 29
Hack 10. Source Code Navigation ............................................. 30
Hack 11. Navigate From Insert Mode ........................................ 31
Chapter 4: Expert Navigation ....................................... 32
Hack 12. Jump Using CTRL-O and CTRL-I ................................... 32
Hack 13. Navigate Within a Very Long Line ................................ 33
Hack 14. Vim Command Line Navigation .................................... 34
Hack 15. Create Local Bookmarks inside file using Marks .............. 35
Hack 16. Create Global Bookmarks inside Vim File ....................... 37
Hack 17. How to Display all Bookmarks ..................................... 38
Hack 18. Navigate any Source Code effectively using Ctags ............ 41
Hack 19. Convert Vim Editor to Beautiful Source Code Browser for Any
Programming Language ......................................................... 44
Chapter 5: Basic Text Manipulation ............................... 49
Hack 20. Insert or Append Text ............................................... 49
Hack 21. Replace Text .......................................................... 50
Hack 22. Substitute Text ....................................................... 51
Hack 23. Change Text ........................................................... 52
Hack 24. Join Lines Using nojoinspaces Option ........................... 52
Chapter 6: Advanced Text Manipulation ......................... 54
Hack 25. Copy One Character, or Word, or Line, or up to a Position 54
Hack 26. Paste before or after the copied Line / Word / Others ...... 55
Hack 27. Delete Single Char, or Word, or Line ............................ 56
Hack 28. Inserting Content from Clipboard Buffer ....................... 57
Hack 29. Insert Content to Clipboard from File ........................... 57
Hack 30. Write Part of File to another File ................................ 58
Hack 31. Swap Adjacent Characters ......................................... 58
Hack 32. The power of the . (dot) Command .............................. 59
Hack 33. Visual Mode Commands ............................................. 60
Buyer: xiujuan lu (luxiujuan@gmail.com)
Transaction ID: 85W16630AD8515549
Vim 101 Hacks www.thegeekstuff.com
4
Hack 34. Editing with :g ........................................................ 62
Chapter 7: Expert Text Manipulation ............................. 65
Hack 35. Copy Lines to Named Buffer for Later Use ..................... 65
Hack 36. Convert Inserted Text to Normal Mode Commands ........... 65
Hack 37. Abbreviation and Unabbreviation ................................ 66
Hack 38. Automatic Spelling Correction .................................... 67
Hack 39. Record and Play Using Macros ..................................... 69
Hack 40. Sort File Content ..................................................... 74
Hack 41. Recover Deleted Text ............................................... 75
Hack 42. Add Automatic Headers to Files Using........................... 76
Chapter 8: Vim as a Programmers Editor ......................... 81
Hack 43. Make Vim Highlight Your Code Smartly ......................... 81
Hack 44. Smart Indentation .................................................... 82
Hack 45. Access Unix Man page for Functions from Vim ................ 83
Hack 46. Jump to Variable Declaration ..................................... 84
Hack 47. Align the Variable Assignment .................................... 84
Hack 48. Increment and Decrement Number Using CTRL Keys ........ 85
Hack 49. Execute One Vim Command in Insert Mode .................... 86
Hack 50. View Current File Details ........................................... 86
Hack 51. Take Control of the Vim Status Bar .............................. 87
Hack 52. Change Case ........................................................... 88
Hack 53. Spell Check ............................................................ 90
Hack 54. Setup Quit Confirmation ............................................ 91
Hack 55. Use :up and Avoid :w ................................................ 91
Hack 56. Edit Current Buffer Content ....................................... 92
Hack 57. Tabs and Spaces ...................................................... 92
Chapter 9: Vim Command Line Hacks ............................. 94
Hack 58. Open File in Read Only Mode ...................................... 94
Hack 59. Recover Swap File Explicitly ....................................... 94
Hack 60. Execute any Vim Command when opening a file ............. 97
Hack 61. Execute Commands Stored in a File ............................. 97
Buyer: xiujuan lu (luxiujuan@gmail.com)
Transaction ID: 85W16630AD8515549
Vim 101 Hacks www.thegeekstuff.com
5
Hack 62. Skip Loading Plugins Temporarily ................................ 98
Hack 63. Enter Restricted Mode in Vim ..................................... 98
Chapter 10: gVim Hacks ............................................. 99
Hack 64. Display and Hide gVim Menu and Toolbar ...................... 99
Hack 65. Adding a Custom Menu or Menu Items to gVim ...............100
Hack 66. Change Font in gVim ................................................102
Chapter 11: Vim Look and Feel, Tabs, and Windows ........ 103
Hack 67. Split Windows Horizontally and Vertically .....................103
Hack 68. Change Window Title ...............................................105
Hack 69. Change Vim Colors ..................................................106
Hack 70. Edit Multiple Files in Tabs .........................................107
Chapter 12: Additional Features in Vim Editor ................ 109
Hack 71. Repeat an Operation N number of times ......................109
Hack 72. Undo and Redo Action .............................................109
Hack 73. Open the File whose Name is under the Cursor .............110
Hack 74. Edit Multiple Files Using the Traditional Method ............112
Hack 75. Saving Files Automatically ........................................113
Hack 76. Encrypt File in Vim .................................................114
Hack 77. Save and Resume Vim Sessions ..................................114
Hack 78. Execute Unix Shell Command Inside Vim ......................116
Hack 79. Review the Differences between Files using Vimdiff .......117
Hack 80. Vim Map Command ..................................................118
Hack 81. Make Bash Shell work like Vim Editor ..........................121
Hack 82. Set Vim Options ......................................................122
Hack 83. Unset Vim Options ..................................................122
Hack 84. Default registers and their uses .................................123
Hack 85. Numeric Registers and Recovering Deletes ...................124
Hack 86. Vim Directory Operation ..........................................124
Chapter 13: Power of Search ..................................... 127
Hack 87. Navigation by Search ...............................................127
Buyer: xiujuan lu (luxiujuan@gmail.com)
Transaction ID: 85W16630AD8515549
剩余166页未读,继续阅读
资源评论
- honghuanglongge2014-11-14有中文版的就更好了
- HeiMaoChuMei2015-03-03很好的书,很有帮助
kibazen.cn
- 粉丝: 10
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功