Skip to content

Instantly share code, notes, and snippets.

@XayOn
Created April 4, 2017 06:29
Show Gist options
  • Save XayOn/f37b76005c9f03165a42388250d0b416 to your computer and use it in GitHub Desktop.
Save XayOn/f37b76005c9f03165a42388250d0b416 to your computer and use it in GitHub Desktop.
" Bundle Plugins
set nocompatible
set hidden
set encoding=utf-8
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
set rtp+=~/.fzf
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
" Git
Plugin 'tpope/vim-fugitive'
" Can't get it to work in vim-8. No time to look at it =(
" Plugin 'airblade/vim-gitgutter'
" Syntax highlight
Plugin 'scrooloose/syntastic'
" JS
Plugin 'Shutnik/jshint2.vim'
" Python
Plugin 'davidhalter/jedi-vim'
Plugin 'jmcantrell/vim-virtualenv'
" Nerdtree + git + tabs
Plugin 'scrooloose/nerdtree'
Plugin 'Xuyuanp/nerdtree-git-plugin'
Plugin 'jistr/vim-nerdtree-tabs'
" Tagbar
Plugin 'majutsushi/tagbar'
" Vim test + vimux as dependency
Plugin 'janko-m/vim-test'
Plugin 'benmills/vimux'
" Distraction free
Plugin 'junegunn/goyo.vim'
" Vim fuzzy finder
Plugin 'junegunn/fzf.vim'
" Theme
Plugin 'jdkanani/vim-material-theme'
Plugin 'kristijanhusak/vim-hybrid-material'
" Lightline
Plugin 'itchyny/lightline.vim'
let g:lightline = {
\ 'colorscheme': 'jellybeans',
\ 'component': {
\ 'readonly': '%{&readonly?"":""}',
\ },
\ 'separator': { 'left': '', 'right': '' },
\ 'subseparator': { 'left': '', 'right': '' }
\ }
" Grep
Plugin 'rking/ag.vim'
Plugin 'Chun-Yang/vim-action-ag'
call vundle#end()
filetype plugin indent on
" Theme config
let g:enable_bold_font = 1
set laststatus=2
set bg=dark
colorscheme hybrid_material
" Basic vim configuration
set mouse=a
set expandtab
set wrap
set linebreak
set showbreak=>\ \ \
let mapleader=","
set syntax=auto
syntax on
" Remove extra spaces
autocmd BufWritePre * :%s/\s\+$//e
" Standard python configuration
autocmd FileType python set ts=4
highlight OverLength ctermbg=red ctermfg=white guibg=#592929
autocmd FileType python match OverLength /\%79v.\+/
autocmd FileType python autocmd BufWritePre * :%s/\s\+$//e
highlight OverLengthDoc ctermbg=green ctermfg=white guibg=#592929
autocmd FileType python match OverLengthDoc /\%75v.\+/
" Basic config
" Sintastic configuration
let g:syntastic_python_python_exec = '/usr/bin/python3.5'
" Basic mappings
nmap <F5> :NERDTreeTabsToggle<CR> " f5 Nerdtree
nmap <F8> :TagbarToggle<CR> " f8 for tagbar
" VIm ag
nmap * <Plug>AgActionWord
" vim test, set bindings, configure to use tmux and pytest + vagrant
nmap <silent> <leader>t :TestNearest<CR>
nmap <silent> <leader>T :TestFile<CR>
nmap <silent> <leader>a :TestSuite<CR>
nmap <silent> <leader>l :TestLast<CR>
nmap <silent> <leader>g :TestVisit<CR>
let test#strategy = "vimux"
let test#python#runner = 'pytest'
function! VagrantTransform(cmd) abort
return 'vagrant ssh --command '.shellescape("cd /vagrant; ". a:cmd)
endfunction
let g:test#custom_transformations = {'vagrant': function('VagrantTransform')}
let g:test#transformation = 'vagrant'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment