Skip to content

Instantly share code, notes, and snippets.

@leonrinkel
Last active October 15, 2023 17:17
Show Gist options
  • Save leonrinkel/afe749560f148e89891f7371afa4a327 to your computer and use it in GitHub Desktop.
Save leonrinkel/afe749560f148e89891f7371afa4a327 to your computer and use it in GitHub Desktop.
" disable vi compatibility
set nocompatible
" enable mouse support
set mouse=a
" use utf-8 encoding
set encoding=utf-8
" highlight search matches
set hlsearch
" ignore case except when using capital letters
set ignorecase
set smartcase
" raise confirm dialog instead of failing commands
set confirm
" highlight matching brackets/braces
set showmatch
" allow backspacing over everything
set backspace=indent,eol,start
" wrap long lines
set wrap
" show line numbers
set number
" file-type dependent indentation
if has('filetype')
filetype indent plugin on
endif
" start line at proper indentation
set autoindent
" file-type dependent syntax highlighting
if has('syntax')
syntax on
endif
" command-line completion
set wildmenu
" display tabs and spaces
set list
set listchars=tab:>·,space:·
" don't show mode in bottom line
set noshowmode
" highlight current line
set cursorline
hi CursorLineNr cterm=standout ctermfg=yellow ctermbg=none
call plug#begin()
Plug 'tpope/vim-fugitive'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'scrooloose/nerdtree'
Plug 'airblade/vim-gitgutter'
Plug 'Shougo/vimproc.vim', {'do' : 'make'}
Plug 'Shougo/unite.vim'
Plug 'jreybert/vimagit'
Plug 'ryanoasis/vim-devicons'
call plug#end()
let g:airline_theme = 'minimalist'
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#hunks#enabled = 0
let g:airline#extensions#branch#enabled = 1
let g:airline_powerline_fonts = 1
" Start NERDTree when Vim is started without file arguments.
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 0 && !exists('s:std_in') | NERDTree | endif
" Open the existing NERDTree on each new tab.
autocmd BufWinEnter * if getcmdwintype() == '' | silent NERDTreeMirror | endif
" sign column colors
highlight SignColumn ctermbg=none
highlight GitGutterAdd ctermbg=none ctermfg=green
highlight GitGutterChange ctermbg=none ctermfg=yellow
highlight GitGutterDelete ctermbg=none ctermfg=red
" always show sign column
set signcolumn=yes
" make grep work on mac
call unite#util#set_default(
\ 'g:unite_source_grep_default_opts', '-inHa')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment