home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


UNIX Power Tools

UNIX Power ToolsSearch this book
Previous: 30.17 Capitalizing Every Word on a Line Chapter 30
vi Tips and Tricks
Next: 30.19 Modelines: Bug or Feature?
 

30.18 Setting vi Options Automatically for Individual Files

The .exrc file ( 4.9 ) can set vi options for all files - or for files in a certain directory ( 30.6 ) . The articles listed below show other ways to set your vi setup.

  • A controversial feature because of security problems, modelines ( 30.19 ) are still handy if you use them carefully. They let you store setup commands for each file, in the file itself.

  • Instead of modelines, you can make separate setup files for each file you want to edit. These don't have the security problems of modelines because you can make the setup files read-only. See article 30.21 .

  • Article 30.20 lets you choose any one of a number of setups by typing a setup-choosing command from the shell prompt. All vi commands you start afterwards will use that setup. You can start a new setup any time.

- JP


Previous: 30.17 Capitalizing Every Word on a Line UNIX Power Tools Next: 30.19 Modelines: Bug or Feature?
30.17 Capitalizing Every Word on a Line Book Index 30.19 Modelines: Bug or Feature?

The UNIX CD Bookshelf Navigation The UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System