Skip to content

Berry484/Vim_config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 

Repository files navigation

Vim C/C++ Config

This repository contains my personal daily drive Vim configuration for C/C++ development.


Installation

  1. Download the vimrc file
wget https://raw.githubusercontent.com/Berry484/VimConfig/refs/heads/main/vimrc
  1. Move it to correct location
mv vimrc ~/.vimrc
  1. Install vim-plug if not already installed:
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
       https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
  1. Open Vim and install plugins
:PlugInstall

Features

  • Color Schemes & Syntax Highlighting
    • Uses onedark color scheme
    • Custom highlights for comments, strings, and standard C library functions
  • Cursor
    • Distinct cursor shapes for normal and insert modes
    • Visual cues using vim-cursorword for better focus
  • Editing Enhancements
    • Smart indentation for C/C++ (smartindent, autoindent)
    • auto-pairs for automatic closing of brackets and quotes
  • File Navigation
    • NERDTree file explorer with toggle mappings
    • Easy toggling of NERDTree focus without moving editing cursor
  • Tags Support
    • Preconfigured tags for C/C++ projects to enable navigation and completion

Key Mappings

Mode Key Action
Normal Ctrl-n Toggle NERDTree
Normal F9 In diff mode: open a new buffer and read svn diff
Normal Alt-Down In diff mode: jump to next diff hunk (]c)
Normal Alt-Up In diff mode: jump to previous diff hunk ([c)
Normal Alt-Left In diff mode: do (get changes from other window)
Normal Alt-Right In diff mode: dp (put changes to other window)
Normal Alt-Down In spell mode: jump to next spelling error (]s)
Normal Alt-Up In spell mode: jump to previous spelling error ([s)

Plugins


Helpful notes (Ubuntu/Debian)
On Ubuntu/Debian, the default Vim package is often a minimal build (vim-tiny) that lacks support for plugins like vim-plug.
To fix this, first uninstall the minimal version, then install a full build such as vim-nox or vim-gtk3:

sudo apt remove --purge vim vim-tiny
sudo apt autoremove
sudo apt update && sudo apt install vim-nox

Helpful notes (macOS)
The default Vim that comes preinstalled on macOS is outdated and missing many features required for plugin managers like vim-plug.
It’s recommended to install a modern build via Homebrew:

brew install vim

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published