
Learning the vi and Vim Editors
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
Among the text editors being used in the programming community, perhaps the most important family is vi and its derivatives. With this updated edition, Unix and Linux users will learn text editing basics for both vi and Vim ("vi improved") before moving on to advanced editing tools for each editor. Authors Arnold Robbins and Elbert Hannah cover the latest major releases of Vim, including 8.0 and 8.2.
If you''re a programmer or computer analyst, or you work with browsers or command-line interfaces, using Vim can speed up your work and make complex tasks easier. You''ll examine multiwindow editing, global search and replacement, and power tools for programmers, and learn how to write interactive macros and scripts to extend the editor--all in the easy-to-follow style that''s made this book a classic.
- Go beyond the basics to learn which vi commands fit your specific needs
- Learn advanced vi tools that shift most of the editing burden to the computer
- Explore Vim tools that provide major improvements over vi
- Examine Vimâ??s multiwindow editing feature, a significant upgrade over vi
- Use Vim scripts to customize and tailor Vim to your needs
- Look at Vim in modern GUI environments with Graphical Vim (gvim)
- See Vim in the broader programming milieu, including usingit as an IDE
More details
Other editions
Additional editions

Content
- Cover
- Copyright
- Table of Contents
- Preface
- Scope of This Book
- How the Material Is Presented
- Discussion of vi Commands
- Conventions
- Keystrokes
- Cautions, Notes, and Tips
- Problem Checklists
- What You Need to Know Before Starting
- Using Code Examples
- O'Reilly Online Learning
- How to Contact Us
- About the Previous Editions
- About the Eighth Edition
- What's New
- Versions
- Acknowledgments from the Sixth Edition
- Acknowledgments from the Seventh Edition
- Acknowledgments for the Eighth Edition
- Part I. vi and Vim Fundamentals
- Chapter 1. Introducing vi and Vim
- Text Editors and Text Editing
- Text Editors
- Text Editing
- A Brief Historical Perspective
- Opening and Closing Files
- Opening a File from the Command Line
- Opening a File from the GUI
- Problems Opening Files
- Modus Operandi
- Saving and Quitting a File
- Quitting Without Saving Edits
- Problems Saving Files
- Exercises
- Chapter 2. Simple Editing
- vi Commands
- Moving the Cursor in Command Mode
- Single Movements
- Numeric Arguments
- Movement Within a Line
- Movement by Text Blocks
- Simple Edits
- Inserting New Text
- Appending Text
- Changing Text
- Changing Case
- Deleting Text
- Moving Text
- Copying Text
- Repeating or Undoing Your Last Command
- More Ways to Insert Text
- Numeric Arguments for Insert Commands
- Joining Two Lines with J
- Problems with vi Commands
- Mode Indicators
- Review of Basic vi Commands
- Chapter 3. Moving Around in a Hurry
- Movement by Screens
- Scrolling the Screen
- Repositioning the Screen with z
- Redrawing the Screen
- Movement Within a Screen
- Movement by Line
- Movement by Text Blocks
- Movement by Searches
- Repeating Searches
- Current Line Searches
- Movement by Line Number
- The G (Go To) Command
- Review of vi Motion Commands
- Chapter 4. Beyond the Basics
- More Command Combinations
- Options When Starting vi and Vim
- Advancing to a Specific Place
- Read-Only Mode
- Recovering a Buffer
- Making Use of Registers
- Recovering Deletions
- Yanking to Named Registers
- Marking Your Place
- Other Advanced Edits
- Review of Register and Marking Commands
- Chapter 5. Introducing the ex Editor
- ex Commands
- Exercise: The ex Editor
- Problem Getting to Visual Mode
- Editing with ex
- Line Addresses
- Defining a Range of Lines
- Line-Addressing Symbols
- Search Patterns
- Redefining the Current Line Position
- Global Searches
- Combining ex Commands
- Saving and Exiting Files
- Renaming the Buffer
- Saving Part of a File
- Appending to a Saved File
- Copying a File into Another File
- Editing Multiple Files
- Invoking Vim on Multiple Files
- Using the Argument List
- Calling in New Files
- Filename Shortcuts
- Switching Files from Command Mode
- Edits Between Files
- ex Command Summaries
- Chapter 6. Global Replacement
- The Substitute Command
- Confirming Substitutions
- Doing Things Globally Across the File
- Context-Sensitive Replacement
- Pattern-Matching Rules
- Metacharacters Used in Search Patterns
- POSIX Bracket Expressions
- Metacharacters Used in Replacement Strings
- More Substitution Tricks
- Pattern-Matching Examples
- Search for General Class of Words
- Block Move by Patterns
- More Examples
- A Final Look at Pattern Matching
- Deleting an Unknown Block of Text
- Switching Items in a Textual Database
- Using :g to Repeat a Command
- Collecting Lines
- Chapter 7. Advanced Editing
- Customizing vi and Vim
- The :set Command
- The .exrc File
- Alternate Environments
- Some Useful Options
- Executing Unix Commands
- Filtering Text Through a Command
- Saving Commands
- Word Abbreviation
- Using the map Command
- Mapping with a Leader
- Protecting Keys from Interpretation by ex
- A Complex Mapping Example
- More Examples of Mapping Keys
- Mapping Keys for Insert Mode
- Mapping Function Keys
- Mapping Other Special Keys
- Mapping Multiple Input Keys
- @-Functions
- Executing Registers from ex
- Using ex Scripts
- Looping in a Shell Script
- Here Documents
- Sorting Text Blocks: A Sample ex Script
- Comments in ex Scripts
- Beyond ex
- Editing Program Source Code
- Indentation Control
- A Special Search Command
- Using Tags
- Enhanced Tags
- Part II. Vim
- Chapter 8. Vim (vi Improved): Overview and Improvements over vi
- About Vim
- Overview
- Author and History
- Why Vim?
- Compare and Contrast with vi
- Categories of Features
- Philosophy
- Aids and Easy Modes for New Users
- Built-In Help
- Startup and Initialization Options
- Command-Line Options
- Behaviors Associated to Command Name
- System and User Configuration Files
- Environment Variables
- New Motion Commands
- Visual Mode Motion
- Extended Regular Expressions
- Extended Undo
- Incremental Searching
- Left-Right Scrolling
- Summary
- Chapter 9. Graphical Vim (gvim)
- General Introduction to gvim
- Starting gvim
- Using the Mouse
- Useful Menus
- Customizing Scrollbars, Menus, and Toolbars
- Scrollbars
- Menus
- Toolbars
- Tooltips
- gvim in Microsoft Windows
- gvim in the X Window System
- Running gvim in Microsoft Windows WSL
- Installing gvim in WSL 2
- Installing an X Server for Windows
- Configuring the X Server for Windows
- GUI Options and Command Synopsis
- Chapter 10. Multiple Windows in Vim
- Initiating Multiwindow Editing
- Multiwindow Initiation from the Command Line
- Multiwindow Editing Inside Vim
- Opening Windows
- New Windows
- Options During Splits
- Conditional Split Commands
- Window Command Summary
- Moving Around Windows (Getting Your Cursor from Here to There)
- Moving Windows Around
- Moving Windows (Rotate or Exchange)
- Moving Windows and Changing Their Layout
- Window Move Commands: Synopsis
- Resizing Windows
- Window Resize Commands
- Window Sizing Options
- Resizing Command Synopsis
- Buffers and Their Interaction with Windows
- Vim's Special Buffers
- Hidden Buffers
- Buffer Commands
- Buffer Command Synopsis
- Playing Tag with Windows
- Tabbed Editing
- Closing and Quitting Windows
- Summary
- Chapter 11. Vim Enhancements for Programmers
- Folding and Outlining (Outline Mode)
- The Fold Commands
- Manual Folding
- Outlining
- A Few Words About the Other Fold Methods
- Auto and Smart Indenting
- Vim autoindent Extensions to vi's autoindent
- smartindent
- cindent
- indentexpr
- A Final Word on Indentation
- Keyword and Dictionary Word Completion
- Insertion Completion Commands
- Some Final Comments on Vim Autocompletion
- Tag Stacking
- Syntax Highlighting
- Getting Started
- Customization
- Rolling Your Own
- Compiling and Checking Errors with Vim
- More Uses for the Quickfix List Window
- Some Final Thoughts on Vim for Writing Programs
- Chapter 12. Vim Scripts
- What's Your Favorite Color (Scheme)?
- Conditional Execution
- Variables
- The execute Command
- Defining Functions
- A Nice Vim Piggybacking Trick
- Tuning a Vim Script with Global Variables
- Arrays
- Dynamic File Type Configuration Through Scripting
- Autocommands
- Checking Options
- Buffer Variables
- The exists() Function
- Autocommands and Groups
- Deleting Autocommands
- Some Additional Thoughts About Vim Scripting
- A Useful Vim Script Example
- More About Variables
- Expressions
- Extensions
- A Few More Comments About autocmd
- Internal Functions
- Resources
- Chapter 13. Other Cool Stuff in Vim
- Spell It! (i-t)
- For a Different Take on Words, Try Thesaurus
- Editing Binary Files
- Digraphs: Non-ASCII Characters
- Editing Files in Other Places
- Navigating and Changing Directories
- Backups with Vim
- HTML Your Text
- What's the Difference?
- viminfo: Now, Where Was I?
- The viminfo Option
- The mksession Command
- What's My Line (Size)?
- Abbreviations of Vim Commands and Options
- A Few Quickies (Not Necessarily Vim-Specific)
- More Resources
- Chapter 14. Some Vim Power Techniques
- Several Convenience Maps
- Exiting Vim Simplified
- Resize Your Window
- Double Your Fun
- Moving into the Fast Lane
- Finding a Hard-to-Remember Command
- Analyzing a Famous Speech
- Some More Use Cases
- Hitting the Speed Limit
- Enhancing the Status Line
- Summary
- Part III. Vim in the Larger Milieu
- Chapter 15. Vim as IDE: Some Assembly Required
- Plug-In Managers
- Finding Just the Right Plug-In
- Why Do We Want an IDE?
- Doing It Yourself
- EditorConfig: Consistent Text Editing Setup
- NERDTree: File Tree Traversal Within Vim
- nerdtree-git-plug-in: NERDTree with Git Status Indicators
- Fugitive: Running Git from Within Vim
- Completion
- Termdebug: Use GDB Directly Within Vim
- All-in-One IDEs
- Coding Is Great, but What If I'm a Writer?
- Conclusion
- Chapter 16. vi Is Everywhere
- Introduction
- Improving the Command-Line Experience
- Sharing Multiple Shells
- The readline Library
- The Bash Shell
- Other Programs
- The .inputrc File
- Other Unix Shells
- The Z Shell (zsh)
- Keep As Much History As You Can
- Command-Line Editing: Some Closing Thoughts
- Windows PowerShell
- Developer Tools
- The Clewn GDB Driver
- CGDB: Curses GDB
- Vim Inside Visual Studio
- Vim for Visual Studio Code
- Unix Utilities
- More or Less?
- screen
- And ., Browsers!
- Wasavi
- Vim + Chromium = Vimium
- vi for MS Word and Outlook
- Honorable Mention: Tools with Some vi Features
- Google Mail
- Microsoft PowerToys
- Summary
- Chapter 17. Epilogue
- Part IV. Appendixes
- Appendix A. The vi, ex, and Vim Editors
- Command-Line Syntax
- Command-Line Options
- Review of vi Operations
- Command Mode
- Insert Mode
- Syntax of vi Commands
- Status-Line Commands
- vi Commands
- Movement Commands
- Insert Commands
- Edit Commands
- Saving and Exiting
- Accessing Multiple Files
- Window Commands (Vim)
- Interacting with the System
- Macros
- Miscellaneous Commands
- vi Configuration
- The :set Command
- Example .exrc File
- ex Basics
- Syntax of ex Commands
- Addresses
- Address Symbols
- Options
- Alphabetical Summary of ex Commands
- Appendix B. Setting Options
- Heirloom and Solaris vi Options
- Vim 8.2 Options
- Appendix C. The Lighter Side of vi
- Accessing the Files
- Example Files
- Source for clewn
- Online vi Tutorial
- vi Powered!
- vi for Java Lovers
- The Vim Clutch
- Amaze Your Friends!
- The Vi Lovers Home Page
- A Different vi Clone
- Tastes Great, Less Filling
- vi Quotes
- Appendix D. vi and Vim: Source Code and Building
- Nothing Like the Original
- Where to Get Vim
- Getting Vim for Unix and GNU/Linux
- Getting Vim for Windows Environments
- Getting Vim for the Macintosh Environment
- Other Operating Systems
- Index
- About the Authors
- Colophon
System requirements
File format: PDF
Copy-Protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (only limited: Kindle).
The file format PDF always displays a book page identically on any hardware. This makes PDF suitable for complex layouts such as those used in textbooks and reference books (images, tables, columns, footnotes). Unfortunately, on the small screens of e-readers or smartphones, PDFs are rather annoying, requiring too much scrolling.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our eBook Help page.