Skip to content

Instantly share code, notes, and snippets.

@Battleroid
Created April 3, 2018 14:28
Show Gist options
  • Select an option

  • Save Battleroid/5764ff4ae0594a32d115e25316262d74 to your computer and use it in GitHub Desktop.

Select an option

Save Battleroid/5764ff4ae0594a32d115e25316262d74 to your computer and use it in GitHub Desktop.
" Avoid issues with using zsh
set shell=/bin/bash
" Required
set nocompatible
" Plugins start
call plug#begin('~/.vim/plugged')
" Status
Plug 'itchyny/lightline.vim'
Plug 'bling/vim-bufferline'
Plug 'airblade/vim-gitgutter'
" Misc
Plug 'tpope/vim-fugitive'
" Completion, lint, etc
Plug 'roxma/nvim-completion-manager'
Plug 'fatih/vim-go', { 'do': ':GoInstallBinaries' }
Plug 'junegunn/goyo.vim'
Plug 'davidhalter/jedi-vim'
Plug 'roxma/ncm-rct-complete'
Plug 'plasticboy/vim-markdown'
Plug 'rodjek/vim-puppet'
" Color
Plug 'fenetikm/falcon'
Plug 'w0ng/vim-hybrid'
Plug 'morhetz/gruvbox'
call plug#end()
" Basics
filetype plugin indent on
syntax on
set backspace=indent,eol,start
set encoding=utf-8
set list
set listchars=tab:\|\ ,eol:←,trail:·
set mouse=a
set nu
set scrolloff=4
set shiftwidth=4
set smarttab
" set smartindent
set autoindent
set tabstop=4
set wildmenu
set wildmode=longest,list
set showmode
set undofile
set undodir=~/.vim/undo
set laststatus=2
set expandtab
set autoread
set splitbelow
set splitright
set shortmess+=I
set autoread
set modeline
set modelines=5
set foldmethod=indent
set foldnestmax=5
set nofoldenable
set incsearch
set nohlsearch
set conceallevel=2
set termguicolors
set updatetime=100
" Colorscheme related
let g:gruvbox_italic = 1
colorscheme gruvbox
set background=dark
set cursorline
set cursorcolumn
hi CursorLine cterm=NONE ctermbg=black
" Lightline
let g:lightline = {
\ 'active': {
\ 'right': [ ['lineinfo'], ['percent'], ['fileformat', 'fileencoding', 'filetype'] ],
\ 'left': [ ['mode', 'paste'], ['readonly', 'relativepath', 'modified', 'branch'] ],
\ },
\ 'component_function': {
\ 'branch': 'fugitive#head'
\ },
\ 'colorscheme': 'PaperColor_light',
\ }
" Misc autocmds
autocmd FileType markdown,text setlocal spell linebreak
autocmd FileType ruby setlocal sw=2 ts=2 expandtab
autocmd FileType json,yaml setlocal shiftwidth=2 tabstop=2
autocmd BufRead,BufNewFile,BufWritePre *.conf setlocal shiftwidth=2 tabstop=2 expandtab syntax=conf
autocmd BufRead,BufNewFile,BufWritePre Dockerfile,Dockerfile.tmpl setlocal ft=Dockerfile expandtab
autocmd BufRead,BufNewFile,BufWritePre notes setlocal ft=markdown
" Completion
set shortmess+=c
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
inoremap <expr> <cr> pumvisible() ? "\<C-y>\<cr>" : "\<cr>"
" use current env python 2/3 interpreter
let g:python_support_python2_venv = 0
let g:python_support_python3_venv = 0
" Go
let g:go_highlight_functions = 1
let g:go_highlight_methods = 1
let g:go_highlight_fields = 1
let g:go_highlight_types = 1
let g:go_highlight_operators = 1
let g:go_highlight_build_constraints = 1
let g:go_fmt_command = "goimports"
let g:go_fmt_fail_silently = 1
let g:go_play_open_browser = 0
" gitgutter symbols https://camo.githubusercontent.com/2fcf604967167347f15ca8be125d32b18db9bc28/687474703a2f2f692e696d6775722e636f6d2f476b496c38466e2e706e67
" use indent listchars
" fugitive / gitgutter
nmap <Leader>gc :Gcommit<CR>
nmap <Leader>ga :Gcommit --amend<CR>
# font
font_family SF Mono
font_size 15.0
italic_font auto
bold_font auto
bold_italic_font auto
# url_style double
# settings
adjust_column_width -1
term xterm-256color
tab_bar_edge top
copy_on_select yes
# mappings
map alt+left send_text all \x1b\x62
map alt+right send_text all \x1b\x66
map ctrl+shift+; previous_tab
map ctrl+shift+' next_tab
# tabs
active_tab_background #0087AF
active_tab_foreground #EEEEEE
# gruvbox dark
# https://github.com/jwilm/alacritty/wiki/Color-schemes#gruvbox
background #282828
foreground #ebdbb2
# black
color0 #282828
color8 #928374
# red
color1 #cc241d
color9 #fb4934
# green
color2 #98971a
color10 #b8bb26
# yellow
color3 #d79921
color11 #fabd2f
# blue
color4 #458588
color12 #83a598
# magenta
color5 #b16286
color13 #d3869b
# cyan
color6 #689d6a
color14 #8ec07c
# white
color7 #a89984
color15 #ebdbb2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment