DAGDA SEARCH | Back to results | Support

VimRC · GitHub

Source: https://gist.github.com/zikhan/a68f1ea5aa03a56952f5a63ddc9b7645

Instantly share code, notes, and snippets.

@zikhan

zikhan/.vimrc

Last active February 19, 2026 02:19 Show Gist options

Select an option

No results found

Learn more about clone URLs Clone this repository at <script src="https://gist.github.com/zikhan/a68f1ea5aa03a56952f5a63ddc9b7645.js"></script> Save zikhan/a68f1ea5aa03a56952f5a63ddc9b7645 to your computer and use it in GitHub Desktop. Download ZIP VimRC Raw .vimrc This file contains hidden or 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 Show hidden characters
" ConEmu
if !empty($ConEmuANSI) && empty($VSCODE)
" echom "Running in ConEmu"
inoremap <Char-0x07F> <BS>
nnoremap <Char-0x07F> <BS>
set termencoding=utf-8
set term=xterm
set t_Co=256
" Conemu 256-bit color
let &t_AB="\e[48;5;%dm"
let &t_AF="\e[38;5;%dm"
" Conemu remappings for utf8
let &t_kb="\xcex"
let &t_ku="\xceH"
let &t_kd="\xceP"
let &t_kl="\xceK"
let &t_kr="\xceM"
endif
nnoremap <C-;> mqA;<Esc>`q
map <MiddleMouse> <Nop>
imap <MiddleMouse> <Nop>
set clipboard=unnamed,unnamedplus
set number relativenumber
set hidden
set conceallevel=2
set matchpairs+=<:>
" netrw config
let g:netrw_liststyle=1
let g:netrw_sizestyle="H"
let g:netrw_preview=1
let g:netrw_winsize=30
let g:netrw_altv=1
" Match the Obsidian theme I use with Windows Terminal
highlight Normal guibg=#283033 guifg=#CDCDCD
highlight StatusLine guibg=#283033 guifg=#CDCDCD
" Setting the font to Consolas, 11pt
if has("gui_running")
if has("gui_gtk2")
set guifont=Consolas\ 11
else
set guifont=Cascadia\ Mono\ NF:h11
hi Normal guifg=#CDCDCD guibg=#283033
endif
endif
if (has("win32") && has('vcon')) || has('termguicolors')
set termguicolors
endif
if (!has("win32") && !has("win16")) && empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
" Vim 9.1 EditorConfig
packadd! editorconfig
call plug#begin('~/.vim/plugged')
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'OmniSharp/omnisharp-vim', {'for': 'cs'}
" Plug 'SirVer/ultisnips'
Plug 'flazz/vim-colorschemes'
Plug 'tpope/vim-dispatch'
Plug 'tpope/vim-surround'
" Plug 'airblade/vim-gitgutter'
Plug 'nickspoons/vim-sharpenup'
Plug 'whiteinge/diffconflicts'
" Plug 'vim-scripts/ShowMarks'
Plug 'pprovost/vim-ps1', {'for': 'ps1'}
Plug 'hashivim/vim-terraform', {'for': 'tf'}
Plug 'preservim/vim-markdown', {'for': 'md'}
Plug 'easymotion/vim-easymotion'
Plug 'github/copilot.vim'
call plug#end()
colorscheme spacegray
let g:airline_theme='peaksea'
let g:airline_powerline_fonts=1
let g:airline_skip_empty_sections=1
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#formatter = 'unique_tail_improved'
let g:airline#extensions#omnisharp#enabled = 1
if !exists('g:airline_symbols')
let g:airline_symbols = {}
endif
" powerline symbols
"let g:airline_left_sep = ''
"let g:airline_left_alt_sep = ''
"let g:airline_right_sep = ''
"let g:airline_right_alt_sep = ''
"let g:airline_symbols.branch = ''
let g:airline_symbols.readonly = '🔏'
"let g:airline_symbols.linenr = ''
"let g:airline_symbols.maxlinenr = ''
let g:airline_symbols.ellipsis = '…'
let g:airline_symbols.modified = '📝'
if has("win32") || has("win16")
set shell=pwsh
set shellcmdflag=\ -NoProfile\ -NoLogo\ -Command
set belloff=all
" To get the correct cursor shape in Windows terminal
let &t_SI="\<ESC>[5 q"
let &t_SR="\<ESC>[3 q"
let &t_EI="\<ESC>[2 q"
else
set shell=/bin/zsh
endif
" Specific tab widths
set tabstop=4 shiftwidth=4
autocmd FileType json set tabstop=2 shiftwidth=2
autocmd FileType js set tabstop=2 shiftwidth=2
" Markdown plugin settings
let g:vim_markdown_folding_disabled = 1
let g:vim_markdown_follow_anchor = 1
let g:vim_markdown_strikthrough = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment