Skip to content

Instantly share code, notes, and snippets.

@sdebnath
Created August 3, 2024 06:46
Show Gist options
  • Save sdebnath/ed5be72593e3c5dfcd476b085efc284b to your computer and use it in GitHub Desktop.
Save sdebnath/ed5be72593e3c5dfcd476b085efc284b to your computer and use it in GitHub Desktop.
vimrc
"
" vim: set foldmarker={,} foldlevel=0 foldmethod=marker spell:
"
" Basics {
set nocompatible " always first...no Vi mode!
filetype off
" }
" Infect with Vundle (Plugin command) {
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" }
" Bundles {
" Let Vundle manage Vundle (Required!)
Plugin 'gmarik/vundle'
" Window/Buffer Management
Plugin 'jlanzarotta/bufexplorer'
Plugin 'zhaocai/GoldenView.Vim'
Plugin 'kien/ctrlp.vim'
" SCM Integration
Plugin 'airblade/vim-gitgutter'
Plugin 'tpope/vim-fugitive'
" UI Plugins
Plugin 'morhetz/gruvbox' " replace with COLORSCHEME of choice
Plugin 'vim-airline/vim-airline'
Plugin 'xiyaowong/transparent.nvim'
" Code Completion/Navigation/Styling
Plugin 'Valloric/YouCompleteMe'
Plugin 'rhysd/vim-clang-format'
"}
" General {
filetype plugin indent on
syntax on
scriptencoding utf-8
if has ('gui')
if has ('x')
set clipboard=unamedplus " Use '+' register for copy-paste (Linux)
else
" set clipboard=unamed " Use '*' for Mac
endif
endif
set shortmess+=filmnrxoOtT " Shorter messages
set history=1000 " Bigger history
set nospell " Spell checking
set hidden " Buffer switching without saving
" Instead of reverting the cursor to the last position in the buffer, we
" set it to the first line when editing a git commit message
au FileType gitcommit au! BufEnter COMMIT_EDITMSG call setpos('.', [0, 1, 1, 0])
" }
" User Interface {
"set termguicolors " Possibly needed for colorization in some terminals
set bg=dark
let g:airline_powerline_fonts = 1
let g:airline#extensions#tabline#enabled = 1
if &t_Co > 2 || has("gui_running")
set hlsearch " Highlight search terms
set showmatch " Highlight matching braces
colorscheme gruvbox
let &colorcolumn=join(range(121,999),",") " Disincentivize long lines
endif
set nofoldenable " Do not generate fold markers
set showmode " Display current mode
"set cursorline " Highlight the current line
highlight clear SignColumn " SignColumn background matching
" allow backspacing over autoindent, line endings and start of insert
"set autoindent
set backspace=indent,eol,start
set linespace=0 " No extra line space
set nu " Line numbering
set incsearch " do incremental searching
set ic " ignore case when searching
set nobackup " do not keep a backup file, use versions instead
set noswf " do not keep a swap file
set nowrapscan " do no wrap the EOF when searching
set ruler " show the cursor position all the time
set showcmd " display incomplete commands
set smartcase " ignore ic when upper case letter is used
let c_space_errors=1 " Highlight a whitespace error
set shiftwidth=4 " Possibly set in a ft plugin...
set expandtab
set nowrap " do not wrap lines at terminal edge
" }
" Ignore some files in CTRL-P
set wildignore+=*.P,*.cpp-chk,*.h-chk,*.o,*.class,*/linux-x86_64.debug/*,*/CMakeFiles/*,*/build/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment