Skip to content

Code-Samples-Galore/Config-Vim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

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

" 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

  • <leader> = \
  • jj - Exit insert mode
  • <space> - Enter command mode
  • <leader>w - Quick save
  • <leader>q - Quick quit
  • <Ctrl-t> - Toggle NERDTree
  • <F5> - Run Python script
  • <F6> - Run current file (language-aware)
  • <F8> - 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

About

Vim configuration.

Topics

Resources

License

Stars

Watchers

Forks