Skip to Content
Modern Vim
book

Modern Vim

by Drew Neil
May 2018
Intermediate to advanced
168 pages
4h 2m
English
Pragmatic Bookshelf
Content preview from Modern Vim

Chapter 7Configuring Vim

You can configure Vim by setting options in your vimrc file. This file is sourced when Vim starts up, so any options you set there will be applied each time you launch Vim. This mechanism works fine for setting global options—the settings you want to apply throughout Vim. But sometimes you need to tweak your settings for different contexts. Perhaps you want to customize a setting one way for JavaScript files and another way for JSON files. Perhaps your personal preference is to always use two spaces for indentation, but you collaborate on some projects where tabs are preferred. In this chapter, you’ll discover a few different mechanisms you can use for applying settings in a particular context.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Vim Masterclass

Vim Masterclass

Jason Cannon
Mastering Vim

Mastering Vim

Ruslan Osipov

Publisher Resources

ISBN: 9781680506006Errata Page