Last active
August 3, 2024 09:49
-
-
Save CharFractal/bb4c3c44f943241658e51bc89edd050b to your computer and use it in GitHub Desktop.
minimalist vim config for c/c++ devs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax on | |
set number | |
set linebreak | |
set showbreak=+++ | |
set textwidth=100 | |
set showmatch | |
set hlsearch | |
set smartcase | |
set ignorecase | |
set incsearch | |
set autoindent | |
set cindent | |
set tabstop=3 | |
set shiftwidth=3 | |
set softtabstop=3 | |
set undolevels=1000 | |
set scrolloff=3 | |
set backspace=indent,eol,start | |
set mouse=a | |
set clipboard=unnamed | |
let mapleader = "\<Space>" | |
let &t_SI = "\e[6 q" | |
let &t_EI = "\e[3 q" | |
" Map leader > to switch to the next tab | |
nnoremap <leader>. :tabnext<CR> | |
" Map leader < to switch to the previous tab | |
nnoremap <leader>, :tabprevious<CR> | |
inoremap { {}<Esc>ha | |
inoremap ( ()<Esc>ha | |
inoremap [ []<Esc>ha | |
inoremap " ""<Esc>ha | |
inoremap ' ''<Esc>ha | |
inoremap ` ``<Esc>ha | |
call plug#begin() | |
Plug 'preservim/nerdtree' | |
Plug 'octol/vim-cpp-enhanced-highlight' | |
Plug 'tpope/vim-surround' | |
Plug 'bfrg/vim-cpp-modern' | |
Plug 'bluz71/vim-moonfly-colors', { 'as': 'moonfly' } | |
call plug#end() | |
nnoremap <leader><leader> :NERDTreeToggle<CR> | |
set timeoutlen=1000 | |
colorscheme moonfly | |
highlight MatchParen ctermbg=lightblue guibg=#FFFF80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment