Published on Aug 14, 2025
Vim: Survive, thrive, and (maybe) enjoy the chaos
It’s 2025, and I’m still using Vim! How about you? If you haven’t tried it yet, you’re not living dangerously enough. Some workflows still call for editing files directly on a remote server or container, or you might find yourself managing code on a tiny Raspberry Pi tucked in your corner. And that’s when Vim might come in handy.
I first tried it at 17. I know it can be intimidating and frustrating at first, watching true masters in action was mind-blowing. Today, I’m still no expert, but here are a few essential commands and a simple setup to keep you productive, or at least interested.
By the way, these commands also work in vi, which comes pre-installed on many Linux distros.
Exit Vim
The most important command in Vim? The one that gets you out.
When I started, the most intimidating step was opening a file in Vim. Because once you do, there’s no clue how to close it and get back to where you were. The only alternative was to close the entire terminal session.
Well, here you have it. To exit Vim, type:
Esc and then :q
After every command press Enter, of course. Remember, Vim is keyboard-based.
Force exit Vim
Very often, you’ll get an annoying message saying you can’t exit Vim. Maybe there are unsaved changes, or you don’t have permissions to write in the current directory, who cares! You only opened a file to read!
Esc and then :q!
Once you know how to open a file in Vim and exit Vim, you might feel more comfortable to take the next step:
Insert content
It often happens: you open a file in Vim, start typing, and… nothing. Then, magically, some text appears. What happened?
You probably pressed i at some point. That put Vim into insert mode, now you can insert text before the cursor!
i
Press Esc to leave insert mode.
Save changes
Esc and then :w
Wanna save your changes and exit Vim as fast as possible?
Esc and then :wq
Search
Esc and then / followed by the search term
For example, to search for the string “_cache”, type /_cache and press Enter.
n
By default, searches are case sensitive.
I managed for years with just these commands. The truth is, after a while, Vim can get addictive. It’s amazing how much you can do once you get the hang of it.
There’s so much more to learn, but plenty of excellent guides already exist—I have no intention of repeating what’s been explained far better elsewhere. Instead, let’s focus on my setup.
A minimal setup
Let’s:
- add a file navigation panel
- add syntax highlighting
- set better defaults
There are a few plugin managers for Vim. We’ll use vim-plug. Install it with:
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
Then, add the following to your ~/.vimrc file to update your Vim configuration.
" Start the vim-plug plugin manager.
" All plugins listed between plug#begin() and plug#end() will be managed by vim-plug.
call plug#begin()
Plug 'kaicataldo/material.vim', { 'branch': 'main' } " Install the Material color scheme plugin
Plug 'scrooloose/nerdtree' " Install the NERDTree plugin
" End the vim-plug plugin block
call plug#end()
set number " Show line numbers
set showcmd " Show incomplete commands in the last line of the screen as you type them
set wildmenu " Enable a visual command-line completion menu
set hlsearch " Highlight search results
set autoindent " Automatically indent new lines
set nostartofline " Keep the cursor in the same column, if possible, when moving around
set ruler " Show cursor position (line and column) in the status line
set expandtab " Convert tabs into spaces
set confirm " Raise a dialog asking if you wish to save the current file(s), instead of failing when closing unsaved files
set smartcase " Makes searches case-insensitive
set cmdheight=2 " Use 2 screen lines for the command-line, giving space for messages
set termguicolors " Enable 24-bit RGB color in the terminal for better color schemes support
set fillchars+=eob:\ " Hide tildes beyond the end of the buffer
" Enable mouse support, if possible
if has('mouse')
set mouse=a
endif
let g:material_theme_style = 'default' " Set the Material color scheme style
colorscheme material " Activate the Material color scheme
autocmd VimEnter * NERDTree | wincmd p " Open NERDTree automatically
autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() |
\ quit | endif
" Make the horizontal divider more visible
highlight StatusLine cterm=NONE ctermfg=black ctermbg=DarkYellow guifg=#1c272c guibg=#ffb04b
highlight StatusLineNC cterm=NONE ctermfg=black ctermbg=Grey guifg=#3e494f guibg=#1c272c
" Configure the vertical divider
highlight VertSplit cterm=NONE ctermfg=Yellow ctermbg=NONE guifg=#ffb04b guibg=NONE
set fillchars+=vert:│
Some of these settings really ought to be the default! Anyway, open Vim, you should see something like this:

Split your screen
Now try splitting your screen:
Esc and then :sp
You can switch between editors clicking on the desired pane. You can also try resizing the panes by dragging the separator with your mouse.
To close each pane, use our beloved :q command.
Explore
Congratulations! You survived Vim and lived a little dangerously.
Although nearly as old as I am, Vim is still very much alive, and for good reasons. It’s powerful, flexible and remains essential even to those who prefer modern IDEs, like me.
There’s a huge Vim community, explore the many plugins available, like the official Github Copilot plugin. Who knows, you might find yourself spending far more time in Vim than you planned…
Face your fears!
Vim was one of mine. So I forced myself to use it daily by making it the default Git editor for commits. If you want to try the same, here’s how to configure Git:
git config --global core.editor "vim"
“The fears we don’t face become our limits”
— Robin Sharma
I encourage you to find a workflow where Vim becomes a natural part of your day-to-day.