وبلاگ بلیان

Hacking Vim A Cookbook to get the Most out of the Latest Vim Editor: a Cookbook to Get the Most Out of the Latest Vim Editor

معرفی کتاب «Hacking Vim A Cookbook to get the Most out of the Latest Vim Editor: a Cookbook to Get the Most Out of the Latest Vim Editor» نوشتهٔ Schulz, Kim، منتشرشده توسط نشر Packt Publishing در سال 2007. این کتاب در 5 صفحه، فرمت pdf، زبان انگلیسی ارائه شده است.

Hacking Vim; Hacking Vim; Credits; About the Author; About the Reviewers; Preface; What This Book Covers; What You Need for This Book; Conventions; Reader Feedback; Customer Support; Downloading the Example Code for the Book; Errata; Questions; 1. Introduction; Vi, Vim, and Friends; vi; STEVIE; Elvis; Nvi; Vim; Vile; Compatibility; Vim is Charityware; Summary; 2. Personalizing Vim; Where are the Config Files?; vimrc; gvimrc; exrc; Adding a Menu; Work Area Personalization; Summary; 3. Better Navigation; ; Faster Navigation in a File; Navigating Long Lines; Search and You Will Find.;From personalizing Vim to productivity optimizations: Recipes to make life easier for experienced Vim users. Hacking Vim 1 Table of Contents 8 Preface 12 Chapter 1: Introduction 18 Vi, Vim, and Friends 19 vi 19 STEVIE 20 Elvis 20 Nvi 21 Vim 22 Vile 23 Compatibility 24 Vim is Charityware 25 Summary 25 Chapter 2: Personalizing Vim 26 Where are the Config Files? 27 vimrc 27 gvimrc 28 exrc 28  Changing the Fonts 29  Changing Color Scheme 30   Personal Highlighting 31   A More Informative Status Line 35 Toggle Menu and Toolbar 36  Adding Your Own Menu and Toolbar Buttons 37 Adding a Menu 38  Adding Toolbar Icons 41  Modifying Tabs 41 Work Area Personalization 45   Adding a More Visual Cursor 46   Adding Line Numbers 47   Spell Checking Your Language 48  Adding Helpful Tool Tips 51   Using Abbreviations 54   Modifying Key Bindings 56 Summary 58 Chapter 3: Better Navigation 60 Faster Navigation in a File 61   Context-Aware Navigation 61 Navigating Long Lines 66   Faster Navigation in Vim Help 66   Faster Navigation in Multiple Buffers 68   Open Referenced Files Faster 69 Search and You Will Find 70   Search the Current File 70  Search in Multiple Files 72   Search the Help System 73 X Marks the Spot 74   Visible Markers—Using Signs 75   Hidden Markers—Using Marks 77 Summary 79 Chapter 4: Production Boosters 80 Using Templates 81   Using Template Files 81   Abbreviations as Templates 83   Using Tag Lists 85 Easier Taglist Navigation 88 Other Usages of Taglists 88 Using Auto-Completion 89   Auto-Completion with Known Words 90   Auto-Completion using Dictionary Lookup 91   Omni-Completion 92   All-in-One Completion 94   Using Macro Recording 96 Using Sessions 98   Simple Session Usage 98 Satisfy your own Session Needs 101   Sessions as a Project Manager 102 Registers and Undo Branching 103   Using Registers 104 The Unnamed Register 105 The Small Delete Register 105 The Numbered Registers 105 The Named Registers 106 The Read-Only Registers 106 The Selection and Drop Registers 106 The Black Hole Register 107 Search Pattern Register 107 The Expression Register 107   Using Undo Branching 108   Folding 111   Simple Text File Outlining 115   Using Vimdiff to Track the Changes 116 Navigation in vimdiff 117   Using Diff to Track Changes 119   Open Files Anywhere 119   Faster Remote File Editing 121 Summary 122 Chapter 5: Advanced Formatting 124 Formatting Text 124   Putting Text into Paragraphs 124   Aligning Text 127   Marking Headlines 128   Creating Lists 130   Formatting Code 131 Autoindent 132 Smartindent 133 Cindent 133 Indentexpr 134   Fast Code Block Formatting 134   Auto Format Pasted Code 137   Using External Formatting Tools 138 Indent 138   Berkeley Par 139 Tidy 140 Summary 141 Chapter 6: Vim Scripting 144   Syntax-Color Schemes 144 Your First Syntax-Color File 145 Syntax Regions 146 Color Scheme and Syntax Coloring 150 Using Scripts 151 Script Types 151 Installing Scripts 152 Uninstalling Scripts 153 Script Development 154 Scripting Basics 155 Types 155 Variables 157 Conditions 160 Lists and Dictionaries 163 Loops 167 Creating Functions 171 Script Structure 175 Scripting Tips 181   Gvim or Vim? 181   Which Operating System? 182   Which Version of Vim? 182   Printing Longer Lines 184   Debugging Vim Scripts 184   Distributing Vim Scripts 188   Making Vimballs 188 Remember the Documentation 189 Using External Interpreters 192 Vim Scripting in Perl 193 Vim Scripting in Python 195 Vim Scripting in Ruby 196 Summary 198 Appendix A: Vim Can Do Everything 202 Vim Games 202   Game of Life 202   Nibbles 203   Rubik's Cube 204   Tic-Tac-Toe 204   Mines 205   Sokoban 206   Tetris 207   Programmers IDE 207   Mail Program 210   Chat With Vim 211 Appendix B: Vim Configuration Alternatives 214 Tips for Keeping your Vimrc Clean 214 A Vimrc Setup System 216   Storing Vimrc Online 220 Index 222

In Detail

Each chapter of this book 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.

Vim stands for Vi IMproved and is the editor of choice for programmers looking for a highly configurable, stable, open-source, multi-platform text editor. It is included with almost every Linux distribution as the standard text editor, and can be used to work with source code from any language. A big advantage of using Vim is that it can be extensively customized; you can control the basic interface, define personalized key mappings, implement macros, and call external or user-defined scripts. Vim has its own scripting language that allows for plug-in like extensions to enable IDE behavior, syntax scripts and highlighting, color schemes, themes, and utility scripts that can add a wide range of features and functionality. Vim 7.0, for which this book is written, includes spell-checking, code completion, document tabs, current line and column highlighting, undo branches, and more.

This book contains hacks that cover everything from personalizing Vim according to the user's work cycle to optimizations that will boost the user's productivity. It does not cover the basic tasks of using the editor but instead focuses on making life easier for experienced Vim users. It is written for Vim 7.0 , the latest stable version.

Approach

This is a cookbook packed with ready-to-use hacks that give solutions for some of the commonest problems users of the Vim editor encounter during their daily use. Each recipe 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 reader can read any of the hacks in this book without having to read any of the other hacks, where necessary they include cross-references to other relevant hacks. The minimum version of Vim required for each hack is clearly indicated.

Who this book is for

It does not cover the basic tasks of using the editor but instead focuses on making life easier for more experienced Vim users.

In Detail Each chapter of this book 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. Vim stands for Vi IMproved and is the editor of choice for programmers looking for a highly configurable, stable, open-source, multi-platform text editor. It is included with almost every Linux distribution as the standard text editor, and can be used to work with source code from any language. A big advantage of using Vim is that it can be extensively customized; you can control the basic interface, define personalized key mappings, implement macros, and call external or user-defined scripts. Vim has its own scripting language that allows for plug-in like extensions to enable IDE behavior, syntax scripts and highlighting, color schemes, themes, and utility scripts that can add a wide range of features and functionality. Vim 7.0, for which this book is written, includes spell-checking, code completion, document tabs, current line and column highlighting, undo branches, and more. This book contains hacks that cover everything from personalizing Vim according to the user's work cycle to optimizations that will boost the user's productivity. It does not cover the basic tasks of using the editor but instead focuses on making life easier for experienced Vim users. It is written for Vim 7.0 , the latest stable version.Approach This is a cookbook packed with ready-to-use hacks that give solutions for some of the commonest problems users of the Vim editor encounter during their daily use. Each recipe 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 reader can read any of the hacks in this book without having to read any of the other hacks, where necessary they include cross-references to other relevant hacks. The minimum version of Vim required for each hack is clearly indicated.Who this book is for It does not cover the basic tasks of using the editor but instead focuses on making life easier for more experienced Vim users Hacking Vim Hacking Vim Credits About the Author About the Reviewers Preface What This Book Covers What You Need for This Book Conventions Reader Feedback Customer Support Downloading the Example Code for the Book Errata Questions 1. Introduction Vi, Vim, and Friends vi STEVIE Elvis Nvi Vim Vile Compatibility Vim is Charityware Summary 2. Personalizing Vim Where are the Config Files? vimrc gvimrc exrc Adding a Menu Work Area Personalization Summary 3. Better Navigation Faster Navigation in a File Navigating Long Lines Search and You Will Find. X Marks the SpotSummary 4. Production Boosters Using Templates Easier Taglist Navigation Other Usages of Taglists Using Auto-Completion Using Sessions Satisfy your own Session Needs Registers and Undo Branching The Unnamed Register The Small Delete Register The Numbered Registers The Named Registers The Read-Only Registers The Selection and Drop Registers The Black Hole Register Search Pattern Register The Expression Register Navigation in vimdiff Summary 5. Advanced Formatting Formatting Text Autoindent Smartindent Cindent Indentexpr Indent Tidy Summary. 6. Vim Scripting Your First Syntax-Color File Syntax Regions Color Scheme and Syntax Coloring Using Scripts Script Types Installing Scripts Uninstalling Scripts Script Development Scripting Basics Types Variables Conditions Lists and Dictionaries Loops Creating Functions Script Structure Scripting Tips Remember the Documentation Using External Interpreters Vim Scripting in Perl Vim Scripting in Python Vim Scripting in Ruby Summary A. Vim Can Do Everything Vim Games B. Vim Configuration Alternatives Tips for Keeping your Vimrc Clean A Vimrc Setup System. Annotation Each chapter of this book 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. Vim stands for Vi IMproved and is the editor of choice for programmers looking for a highly configurable, stable, open-source, multi-platform text editor. It is included with almost every Linux distribution as the standard text editor, and can be used to work with source code from any language. A big advantage of using Vim is that it can be extensively customized; you can control the basic interface, define personalized key mappings, implement macros, and call external or user-defined scripts. Vim has its own scripting language that allows for plug-in like extensions to enable IDE behavior, syntax scripts and highlighting, color schemes, themes, and utility scripts that can add a wide range of features and functionality. Vim 7.0, for which this book is written, includes spell-checking, code completion, document tabs, current line and column highlighting, undo branches, and more This book contains hacks that cover everything from personalizing Vim according to the user's work cycle to optimizations that will boost the user's productivity. It does not cover the basic tasks of using the editor but instead focuses on making life easier for experienced Vim users. It is written for Vim 7.0, the latest stable version. Anyone who has worked with Vim and wants to get more out of this legendary text editor can use the hacks from this book. It does not cover the basic tasks of using the editor but instead focuses on making life easier for more experienced Vim users
دانلود کتاب Hacking Vim A Cookbook to get the Most out of the Latest Vim Editor: a Cookbook to Get the Most Out of the Latest Vim Editor