Skip to content

Latest commit

History

76 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

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

  • LSP Integration: Advanced code completion via CoC.nvim
  • DevOps Focused: Built-in support for Docker, Kubernetes, Terraform, Ansible
  • Code Quality: Automatic linting and formatting with ALE
  • Performance Optimized: Lazy loading for faster startup
  • Git Integration: Seamless version control workflow
  • Modern UI: Clean interface with file icons and status line

🚀 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
  1. Install the configuration:
cp vimrc ~/.vimrc
  1. Install vim-plug (plugin manager):
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
  1. Install plugins: Open Vim and run:
:PlugInstall

🛠 Supported Technologies

TechnologyFeatures
DockerSyntax highlighting, linting with hadolint
KubernetesYAML support, Helm charts
TerraformHCL syntax, auto-formatting, tflint integration
AnsiblePlaybook syntax, ansible-lint support
PythonBlack formatting, mypy type checking
GoFull language support via vim-go
YAML/JSONAdvanced parsing and validation
Shell ScriptsShellcheck integration
NginxConfiguration file syntax
VagrantVagrantfile support

⌨️ Key Mappings

Basic Operations

KeyAction
Ctrl+sSave file
Ctrl+wClose buffer
Ctrl+zUndo
Ctrl+rRedo

File Navigation

KeyAction
Ctrl+tToggle file explorer
Ctrl+eFind current file in explorer

IDE Features

KeyAction
Ctrl+iEnable IDE mode (Git gutter + file explorer)
Ctrl+gToggle Git gutter
Ctrl+fToggle distraction-free mode
Ctrl+dOpen terminal below

Code Intelligence (via CoC.nvim)

KeyAction
gdGo to definition
gyGo to type definition
giGo to implementation
grFind references
KShow documentation
<leader>rnRename symbol
<leader>caCode actions

Git Operations

KeyAction
<leader>gsGit status
<leader>gdGit diff split
<leader>glGit commit log

Buffer/Tab Management

KeyAction
<leader>tNew tab
<leader>nNext buffer
<leader>pPrevious buffer

Quick Toggles

KeyAction
<leader>iToggle indent lines

Comments

KeyAction
,ccComment line/selection
,cuUncomment 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:

  • Theme: Change colorscheme onedark in the theme section
  • Key mappings: Modify the "Key Mappings" section
  • Plugin settings: Adjust in the "Plugin Configs" section
  • Linters/Formatters: Update ALE configuration for your tools

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

  • File type specific plugins load for relevant files
  • UI plugins load on command
  • Heavy plugins are deferred until first use

Made with ❤️ for DevOps Engineers

About

An awesome lightweight Vim for DevOps engineers.

Topics

Resources

Stars

63 stars

Watchers

4 watching

Forks

Contributors

Languages