VIM for DevOps

Logo

A lightweight, optimized Vim configuration specifically designed for DevOps engineers with intelligent code completion, syntax highlighting, and essential tools for infrastructure management.

View the Project on GitHub maateen/vim-for-devops

VIM for DevOps

A lightweight, optimized Vim configuration specifically designed for DevOps engineers with intelligent code completion, syntax highlighting, and essential tools for infrastructure management.

✨ Features

πŸš€ Quick Setup

Prerequisites

Install Vim and required dependencies:

macOS:

brew install vim

Ubuntu/Debian:

sudo apt update && sudo apt install vim -y

Installation

  1. Clone the repository:
    git clone https://github.com/maateen/vim-for-devops.git
    cd vim-for-devops
    
  2. Install the configuration:
    cp vimrc ~/.vimrc
    
  3. Install vim-plug (plugin manager):
    curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
     https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
    
  4. Install plugins: Open Vim and run:
    :PlugInstall
    

πŸ›  Supported Technologies

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 Mappings

Basic Operations

| Key | Action | |—–|——–| | Ctrl+s | Save file | | Ctrl+w | Close buffer | | Ctrl+z | Undo | | Ctrl+r | Redo |

File Navigation

| Key | Action | |—–|——–| | Ctrl+t | Toggle file explorer | | Ctrl+e | Find current file in explorer |

IDE Features

| 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 |

Code Intelligence (via CoC.nvim)

| 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 |

Git Operations

| Key | Action | |—–|——–| | <leader>gs | Git status | | <leader>gd | Git diff split | | <leader>gl | Git commit log |

Buffer/Tab Management

| Key | Action | |—–|——–| | <leader>t | New tab | | <leader>n | Next buffer | | <leader>p | Previous buffer |

Quick Toggles

| Key | Action | |—–|——–| | <leader>i | Toggle indent lines |

Comments

| Key | Action | |—–|——–| | ,cc | Comment line/selection | | ,cu | Uncomment line/selection |

Leader key is comma (,)

πŸ”Œ Plugin Architecture

Theme & UI

Code Intelligence

DevOps Tools

Language Support

Utilities

🎨 Customization

The configuration is modular and well-documented. Key areas for customization:

πŸ› Troubleshooting

Common Issues

  1. Plugins not loading: Run :PlugInstall in Vim
  2. CoC.nvim errors: Install Node.js and run :CocInstall for language servers
  3. Linting not working: Ensure tools like black, shellcheck, hadolint are installed
  4. Icons not showing: Install a Nerd Font and configure your terminal

Performance

The configuration uses lazy loading to maintain fast startup times. Plugins load only when needed:


Made with ❀️ for DevOps Engineers