" VIM Configuration File " Description: created for C/C++ development, but useful for Python too " Author: Bhaskar Tallamraju " Original version: https://tbhaskar78.github.io/vimrc/ " Last modified by Jeff Elkner 13 Sept 2024 to remove things we don't use " I like the desert theme the best color desert " turn syntax highlighting on set t_Co=256 syntax on " set the hightlight for search, with background black and red font set hlsearch hi Search ctermbg=black hi Search ctermfg=Red " Set no backup, avoids creating extra files by vim set nobackup "folding settings " zc folds at the current place " zM folds everything " zR unfolds everything " za toggle folding set foldmethod=indent "fold based on indent set foldnestmax=10 "deepest fold is 10 levels set nofoldenable "dont fold by default set foldlevel=2 "this is just what i use " set UTF-8 encoding set enc=utf-8 set fenc=utf-8 set termencoding=utf-8 " disable vi compatibility (emulation of old bugs) set nocompatible "enable filetype filetype plugin on " use indentation of previous line set autoindent " use intelligent indentation for C set smartindent " configure tabwidth and insert spaces instead of tabs set tabstop=4 " tab width is 4 spaces set shiftwidth=4 " indent also with 4 spaces set expandtab " expand tabs to spaces " wrap lines at 79 chars. set textwidth=79 " turn line numbers on " set number " highlight matching braces set showmatch " intelligent comments set comments=sl:/*,mb:\ *,elx:\ */ " c++ indent set cindent set cinoptions=g0 retab "enable python syntax let python_highlight_all = 1 " Build gcc, g++ or python code from here autocmd FileType c nnoremap :update!gcc -Werror % && ./a.out autocmd FileType c nnoremap :update!gcc -g -Werror % && gdb ./a.out autocmd FileType cpp nnoremap :update!g++ -Werror -std=c++17 % && ./a.out autocmd FileType cpp nnoremap :update!g++ -g -Werror % && gdb ./a.out autocmd FileType python nnoremap :update!python3 % " Auto build using make with map :make " Auto build using make with map :make clean all