SysTutorials

Vim Workflows and Config Tips for Linux Sysadmins

· updated April 11, 2026

Vim remains one of the most efficient editors available on Linux and Unix systems. While it has a steep learning curve, the payoff in speed and capability is substantial once you develop muscle memory. This guide covers practical configuration strategies, essential keybindings, and workflow improvements that actually matter in daily use.

Setting up your configuration

A solid .vimrc (or init.vim/init.lua for Neovim) provides the foundation for an effective setup. Rather than starting from scratch, consider using a well-maintained configuration as a base and customizing from there.

For version control, store your dotfiles in a Git repository:

cd ~
git clone https://github.com/yourusername/dotfiles.git ~/.config/nvim
# For traditional Vim:
ln -s ~/.config/nvim/init.vim ~/.vimrc

If migrating from an existing setup, carefully merge settings rather than overwriting. Key areas to configure:

Version control your dotfiles so you can sync across machines and revert problematic changes quickly.

Movement and navigation

Home row navigation keeps you efficient:

Use counts with motions: 3w moves three words forward, 5j moves five lines down. This is faster than repeated keypresses.

Text selection and editing

Vim’s selection modes give you precise control:

Combine selection with operations:

For complex edits, use visual block mode with I (insert at start) or A (append at end):

" To comment multiple lines in a config file:
1. Ctrl+V to enter block mode
2. Move down to select all lines
3. I to insert at the start
4. Type # and space
5. Esc to apply to all selected lines

Search and replace

Replace operations are powerful but need care:

Use regex patterns for complex replacements. For example, :%s/\(.*\)_old/\1_new/ swaps suffixes while preserving prefixes.

Working with multiple files and splits

Vim’s buffer and split system allows efficient multi-file editing:

Buffers (in-memory file list):

Splits (visible windows):

For working with a project directory structure, use Netrw (built-in):

" Open file browser
:e .
" Or configure a key:
nnoremap <leader>f :Explore<CR>

Alternatively, use vim-vinegar or nvim-tree for a better file browsing experience.

Neovim-specific features

Neovim 0.9+ includes native LSP support—no complex setup required. Install the nvim-lspconfig plugin and enable LSP for your languages:

-- init.lua
require('lspconfig').pyright.setup({})   -- Python
require('lspconfig').ts_ls.setup({})     -- TypeScript
require('lspconfig').rust_analyzer.setup({}) -- Rust

Pair LSP with a completion framework like nvim-cmp:

local cmp = require('cmp')
cmp.setup({
  sources = cmp.config.sources({
    { name = 'nvim_lsp' },
    { name = 'buffer' },
  })
})

Neovim also supports Lua configuration (faster and more expressive than pure VimScript):

-- init.lua
vim.opt.number = true
vim.opt.expandtab = true
vim.opt.shiftwidth = 4
vim.opt.textwidth = 80
vim.keymap.set('n', '<leader>w', ':w<CR>', { noremap = true })

Practical habits to build efficiency

Resources for deeper learning

← All posts