Hacking Vim 7.2
Formats:
save 15%!
save 37%!
Free Shipping!
| Also available on: |
|
- Create, install, and use Vim scripts to extend Vim's functionality
- Personalize your work-area to fit your workflow
- Optimize your Vim editor to be faster and more responsive
- Packed with tips and tricks based on the author's practical experience
Book Details
Language : EnglishPaperback : 244 pages [ 235mm x 191mm ]
Release Date : April 2010
ISBN : 1849510504
ISBN 13 : 9781849510509
Author(s) : Kim Schulz
Topics and Technologies : All Books, Linux Servers, Open Source
Table of Contents
Preface
Chapter 1: Getting Started with Vim
Chapter 2: Personalizing Vim
Chapter 3: Better Navigation
Chapter 4: Production Boosters
Chapter 5: Advanced Formatting
Chapter 6: Basic Vim Scripting
Chapter 7: Extended Vim Scripting
Appendix A: Vim Can Do Everything
Appendix B: Vim Configuration Alternatives
Index
Kim Schulz
Code Downloads
Download the code and support files for this book.
Submit Errata
Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.
Errata
- 9 submitted: last submission 03 Jan 2013Errata type: Typo| Page number:54
The title "Moving around within a code file" should be "Moving around within a text file"
Errata type:Code | Page number: 79
for (i = 0; I < count; i++) { /* code */ } It should be: for (i = 0; i < count; i++) { /* code */ }
Errata type:Typo | Page number:91
qa: Record from now on into register a. Any register can be used, but q is often used for simplicity. It should be: qa: Record from now on into register a. Any register can be used, but a is often used for simplicity
Errata type:Others | Page number:83
link to taglist.vim was wrong.The correct link is http://www.vim.org/scripts/script.php?script_id=273
Errata type: code| Page number: 109
There is a missing endfunction. The correct code is: function! MyFoldFunction() let line = getline(v:foldstart) " cleanup unwanted things in first line let sub = substitute(line, '/\*\|\*/\|^\s+', '', 'g') " calculate lines in folded text let lines = v:foldend - v:foldstart + 1 return v:folddashes.sub.'...'.lines.' Lines...'.getline(v:foldend) endfunction
Errata type: Typo | Page number: 56
In the note : "If you want ... For example, 5g to go to the place you changed something five changes ago."
There is a ";" missing, you need to type 5g; not 5g
Errata type: Typo | Page number: 57
In the last paragraph, the instructions about pressing [ key and pressing ]] are inverted, it must be as follows:
"So if you have two or more functions in the file and the cursor is currently at the beginning of the first function, pressing ] key twice will take you to the beginning of the next function, and so on. If you want to go back to the previous function, you just have to press [[ and Vim will take you right back to the beginning of the previous function."
Errata type: Typo | Page number: 97
In the Last sentence:
"just remember to save the the session again ..."
It should be as follows:
"just remember to save the session again ..."
Errata type : Technical | Page number : 99
In the Last paragraph the commands are inverted :
"You can simply use the P (after cursor) and p (before cursor) commands to paste ..."
It should be :
"You can simply use the P (before cursor) and p (after cursor) commands to paste ..."
Sample chapters
You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.
- Gain a deep understanding of Vim to master the editor
- Personalize Vim to suit your needs
- Navigate through files faster while editing multiple files
- Boost your productivity by using templates, auto-completion, folding, sessions, and registers
- Improve the formatting of your text and code by mastering simple tricks
- Extend Vim with scripts
- Retain your Vim configuration across computers by storing an online copy
Vim is one of the most powerful open-source editors used by programmers and system administrators around the world. While Vim itself is inherently a powerful editor, personalizing it to suit your needs can be a daunting task. However, it is possible to do so with the help of this book.
This book contains examples that cover everything from personalizing Vim according to the your work cycle to optimizations that will boost the your productivity. The main focus of this book is to make your life, as a Vim user, easier.
Each chapter deals with a different aspect, and provides recipes for easy-to-use hacks to customize and simplify your Vim experience. After an introduction covering the derivation of Vim and its relatives from the vi editor, the author explains basic changes that you can make to the appearance of the Vim editor. Further chapters cover improved navigation through files and buffers in Vim; speeding up your work with templates, auto-completion, folding, sessions, and registers; and formatting text and code, including using external formatting scripts. The final comprehensive chapter covers everything about using Vim scripts and scripting to extend functionality.
This book is written for Vim 7.2, the latest stable version. This latest version of Vim includes many new features like spell-checking, code completion, document tabs, current line and column highlighting, undo branches, and much more.
Getting the most out of the Vim editor
This book is a tutorial packed with ready-to-use hacks that give solutions for common problems faced by Vim users in their everyday life. Every chapter covers a set of recipes, each of which follows a systematic approach with a self-contained description of the task it covers, how to use it, and what you gain by using it. The minimum version of Vim required for each hack is clearly indicated.
If you are a Vim user who wants to get more out of this legendary text editor, this book is for you. It focuses on making life easier for intermediate to experienced Vim users.

