An open API service indexing awesome lists of open source software.

https://github.com/code-samples-galore/config-vim

Vim configuration.
https://github.com/code-samples-galore/config-vim

config vim

Last synced: 9 months ago
JSON representation

Vim configuration.

Awesome Lists containing this project

README

          

# 📝 Vim Configuration

A modular vim configuration split into two main files for better organization and flexibility.

## 📂 Files Overview

- **`config.vim`** - Core vim settings, mappings, and basic functionality
- **`plugins.vim`** - Plugin management, installation, and plugin-specific configurations

## ⚡️ Setup Instructions

### 1️⃣ Option 1: Basic Configuration (No Plugins)

If you only want the core vim settings without plugins, add this to your `~/.vimrc`:

```vim
" Source basic vim configuration
source ~/config_vim/config.vim
```

### 2️⃣ Option 2: Full Configuration (With Plugins)

For the complete setup including automatic plugin management, add this to your `~/.vimrc`:

```vim
" Source plugin management and configurations
source ~/config_vim/plugins.vim

" Source basic vim configuration
source ~/config_vim/config.vim
```

**Note:** Source `plugins.vim` first to ensure plugins are loaded before the main configuration.

## ✨ Features

### ⚙️ Core Configuration (`config.vim`)
- Optimized display settings with line numbers and syntax highlighting
- Smart indentation and formatting rules
- Enhanced search functionality
- Custom key mappings and leader shortcuts
- Automatic file handling and backup management
- Custom status line with git branch display
- Auto-closing brackets and quotes
- File-type specific settings

### 🔌 Plugin Management (`plugins.vim`)
- Automatic vim-plug installation
- Auto-installation of missing plugins
- Periodic plugin updates (every 7 days)
- Configured plugins:
- **gruvbox** - Color scheme
- **NERDTree** - File explorer
- **vim-airline** - Enhanced status line
- **vim-polyglot** - Language pack
- **vim-commentary** - Easy commenting
- **vim-surround** - Surround text objects
- **ALE** - Asynchronous linting
- **Tagbar** - Code structure overview
- **IndentLine** - Visual indentation guides

## ⌨️ Key Mappings

- `` = `\`
- `jj` - Exit insert mode
- `` - Enter command mode
- `w` - Quick save
- `q` - Quick quit
- `` - Toggle NERDTree
- `` - Run Python script
- `` - Run current file (language-aware)
- `` - Toggle Tagbar

## 🤖 Auto-Features

- Automatic plugin installation on first run
- Periodic plugin updates (configurable interval)
- Auto-creation of necessary directories
- Trailing whitespace removal on save
- Cursor position restoration when reopening files

## 🛠️ Customization

Edit the configuration files directly or override settings in your `~/.vimrc` after sourcing these files.

## 📄 License

MIT License