5 new lines in .vimrc
To make a default Vim installation more useful, type the following 5 lines into its .vimrc file:
Thoues 5 lines allow you to:
set hls- highlight all search results
set ic- do case insensitive search
set is- show incremental search results as you type
set nu- display line number
set noswf- disable swap file
Thoese 5 lines can be combined into a single line like below:
Vim is a powerful text editor for Unix/Linux and I often use to view and edit files. Unfortunately, Vim’s default configurations lack several important usability features compared to popular alternative text editors, such as VSCode.
The undesirable defaults are not an issue on my own computer, as I can take the time to configure them. However, often I’d find myself debugging or reading logs on near-fresh Linux installations (eg. virtual machines spun up to do integration testing, cloud env.), where Vim had not yet been configured.
Over time I start using the text editor setup that I needed the most. To set it up, I run
vim ~/.vimrc manually, add those 5 lines, save and restart vim with a new configuration.
- Helping a Million Developers Exit Vim
- Learn Vim Progressively
- VIM AFTER 11 YEARS
- Vim colors
My site is free of ads and trackers. Was this post helpful to you? Why not