A lightweight, optimized Vim configuration specifically designed for DevOps engineers with intelligent code completion, syntax highlighting, and essential tools for infrastructure management.
A lightweight, optimized Vim configuration specifically designed for DevOps engineers with intelligent code completion, syntax highlighting, and essential tools for infrastructure management.
Install Vim and required dependencies:
macOS:
brew install vim
Ubuntu/Debian:
sudo apt update && sudo apt install vim -y
git clone https://github.com/maateen/vim-for-devops.git
cd vim-for-devops
cp vimrc ~/.vimrc
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
:PlugInstall
| Technology | Features |
|---|---|
| Docker | Syntax highlighting, linting with hadolint |
| Kubernetes | YAML support, Helm charts |
| Terraform | HCL syntax, auto-formatting, tflint integration |
| Ansible | Playbook syntax, ansible-lint support |
| Python | Black formatting, mypy type checking |
| Go | Full language support via vim-go |
| YAML/JSON | Advanced parsing and validation |
| Shell Scripts | Shellcheck integration |
| Nginx | Configuration file syntax |
| Vagrant | Vagrantfile support |
| Key | Action |
|ββ|βββ|
| Ctrl+s | Save file |
| Ctrl+w | Close buffer |
| Ctrl+z | Undo |
| Ctrl+r | Redo |
| Key | Action |
|ββ|βββ|
| Ctrl+t | Toggle file explorer |
| Ctrl+e | Find current file in explorer |
| Key | Action |
|ββ|βββ|
| Ctrl+i | Enable IDE mode (Git gutter + file explorer) |
| Ctrl+g | Toggle Git gutter |
| Ctrl+f | Toggle distraction-free mode |
| Ctrl+d | Open terminal below |
| Key | Action |
|ββ|βββ|
| gd | Go to definition |
| gy | Go to type definition |
| gi | Go to implementation |
| gr | Find references |
| K | Show documentation |
| <leader>rn | Rename symbol |
| <leader>ca | Code actions |
| Key | Action |
|ββ|βββ|
| <leader>gs | Git status |
| <leader>gd | Git diff split |
| <leader>gl | Git commit log |
| Key | Action |
|ββ|βββ|
| <leader>t | New tab |
| <leader>n | Next buffer |
| <leader>p | Previous buffer |
| Key | Action |
|ββ|βββ|
| <leader>i | Toggle indent lines |
| Key | Action |
|ββ|βββ|
| ,cc | Comment line/selection |
| ,cu | Uncomment line/selection |
Leader key is comma (,)
The configuration is modular and well-documented. Key areas for customization:
colorscheme onedark in the theme section:PlugInstall in Vim:CocInstall for language serversblack, shellcheck, hadolint are installedThe configuration uses lazy loading to maintain fast startup times. Plugins load only when needed:
Made with β€οΈ for DevOps Engineers