A simple and efficient Vim configuration tailored for 1337 school standards, focusing on norm compliance and C programming comfort.
This repository provides a streamlined and carefully curated Vim configuration, specifically designed to meet the unique requirements of students at 1337 school. It emphasizes norm compliance for C projects, offering a minimal yet comfortable editing environment without unnecessary distractions.
The configuration automates the setup process, ensuring a consistent development experience across different machines. It includes essential plugins and settings to boost productivity for C programming, making it easier to adhere to strict coding guidelines while maintaining a pleasant user experience.
- Automated Setup: A single script (
setup_vim_13.sh) handles the entire installation of Vim-related files and plugins. normCompliance: Pre-configured settings liketabstop=4,shiftwidth=4,expandtab, andlistcharsassist in adhering tonormcoding style guidelines, especially crucial for C projects.- Essential Plugin Management: Integrates
vim-plugfor easy and efficient management of crucial plugins. - Key Plugins Included:
tpope/vim-sensible: Sensible Vim defaults.vim-airline/vim-airline: A lean & mean status/tabline for Vim.vim-airline/vim-airline-themes: Themes for vim-airline.itchyny/lightline.vim: A light and configurable statusline/tabline.dracula/vim: The popular Dracula dark theme for Vim.morhetz/gruvbox: A retro dark/light Gnu/Linux terminal theme.prettier/vim-prettier: An opinionated code formatter integration (requires Node.js and npm).
- Optimized UI/UX: Settings for
number,relativenumber,cursorline,incsearch, andtermguicolorsenhance code readability and navigation. - Backup System: Automatically backs up existing
.vimrcand.vim/directories (to~/.vimrc.bakand~/.vim.bak) before applying the new configuration, preventing accidental data loss. - Color Scheme Preview: Includes
preview_vim_colors.shscript to easily view and switch between installed color schemes.
- Configuration Language: VimL
- Scripting: Shell Script (Bash)
- Text Editor: Vim
- Plugin Manager: vim-plug
- Tools: Git, cURL
- Optional Dependency: Node.js & npm (for
vim-prettierplugin)
Ensure you have the following installed on your system:
- Vim: Version 8.0 or newer is recommended for optimal plugin compatibility.
- Git: For cloning the repository and managing some plugin dependencies.
- cURL: Required by
vim-plugfor downloading plugins. - Node.js & npm: Optional, but highly recommended for the
vim-prettierplugin to function correctly.
-
Clone the repository:
git clone https://github.com/Choubi-Mohammed/myconfig-vim-13.git cd myconfig-vim-13 -
Run the setup script: This script will:
- Check for Vim installation.
- Backup your existing
~/.vimrcand~/.vim/directory (to~/.vimrc.bakand~/.vim.bak). - Create a new
.vimrcfile with the custom configuration. - Install
vim-plugif it's not already present. - Install all specified Vim plugins.
sh setup_vim_13.sh
- Restart Vim: After running the setup script, simply open
vimin your terminal. All configurations and plugins should now be active. - Verify
vim-prettier(if Node.js is installed): If you installed Node.js and npm, thevim-prettierplugin should be functional. You can try formatting a supported file type (e.g., JavaScript, JSON) using its commands.
Once installed, simply open vim or vi in your terminal. You'll notice:
- Line numbers (
number,relativenumber). - Syntax highlighting and filetype detection.
- The
draculacolor scheme. - The
vim-airlineorlightline.vimstatusline at the bottom. - Automatic indentation with 4 spaces (
tabstop=4,shiftwidth=4,expandtab). - The
spacekey as your<Leader>key for plugin mappings.
You can use the preview_vim_colors.sh script to quickly see how different color schemes look without manually editing your .vimrc.
sh preview_vim_colors.shThis script will sequentially display several popular color schemes, including dracula and gruvbox (which are installed by the setup script), directly in your terminal.
myconfig-vim-13/
├── .gitignore # Specifies intentionally untracked files to ignore
├── README.md # This documentation file
├── preview_vim_colors.sh # Script to preview different Vim color schemes
└── setup_vim_13.sh # Main script for automating Vim configuration and plugin installation
The core of this configuration resides in the setup_vim_13.sh script, which generates your ~/.vimrc file.
~/.vimrc: This file contains all the Vim settings, plugin declarations, and mappings. Feel free to open~/.vimrcand modify it directly to suit your personal preferences.- UI Settings: Adjust
set number,set relativenumber,set mouse=a, etc. - Indentation: Change
tabstop,shiftwidth,expandtabvalues if your project requires different settings (though 4 spaces are standard for 1337 schoolnorm). - Color Scheme: Modify
colorscheme draculato any other installed scheme (e.g.,gruvbox) or add newPluglines for more themes. - Plugins: Add or remove
Plug 'author/plugin'lines within thecall plug#begin()andcall plug#end()block. After modifying, run:PlugInstallinside Vim to install new plugins, or:PlugCleanto remove unused ones.
- UI Settings: Adjust
We welcome contributions to improve this Vim configuration! If you have suggestions for new plugins, better settings, or scripts, please feel free to:
- Fork the repository.
- Create a new branch:
git checkout -b feature/your-feature-name. - Make your changes.
- Commit your changes:
git commit -m 'feat: Add new feature'. - Push to the branch:
git push origin feature/your-feature-name. - Open a Pull Request.
This project does not have an explicit license file declared. Users are generally advised to contact the repository owner for licensing clarification, or assume standard GitHub terms which may not grant permissions for commercial use.
- Vim: The powerful text editor itself.
- vim-plug: A minimalist Vim plugin manager.
- All the amazing plugin authors: For their contributions that make Vim even better.
- 🐛 Issues: For bug reports or feature requests, please use the GitHub Issues page.
⭐ Star this repo if you find it helpful!
Made with ❤️ by Choubi Mohammed