Skip to content

Instantly share code, notes, and snippets.

@stabenfeldt
Created September 14, 2018 10:37
Show Gist options
  • Save stabenfeldt/5a54fa8b46ccb51463e77bb403a2862d to your computer and use it in GitHub Desktop.
Save stabenfeldt/5a54fa8b46ccb51463e77bb403a2862d to your computer and use it in GitHub Desktop.
set nocompatible
syntax on
filetype plugin indent on
syntax enable
set background=dark
set t_Co=256 " force vim to use 256 colors
let g:solarized_termcolors=256 " use solarized 256 fallback
set comments=b:#
set ruler
set nu
highlight ColorColumn ctermbg=235 guibg=#2c2d27
set colorcolumn=100
" Tabs
set expandtab
set tabstop=2 shiftwidth=2 softtabstop=2
" Split window management
" Open new horizontal splits below the current one:
set splitbelow
" Highlight search incementially, while typing
set hlsearch
set incsearch
" Map space as leader
nnoremap <space> <Nop>
let mapleader = " "
" space-space remove search
nnoremap <leader><space> :noh<cr>
autocmd BufReadPost,BufNewFile *_spec.rb set syntax=rspec
map <C-n> :NERDTreeToggle<CR>
map <C-s> :Gstatus<CR>
map <C-e> :tabedit<CR>
set wildignore+=*/tmp/*,*.so,*.swp,*.zip " MacOSX/Linux
" Paste
set pastetoggle=<F2>
" Specify a directory for plugins
" - For Neovim: ~/.local/share/nvim/plugged
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.vim/plugged')
" Make sure you use single quotes
" Shorthand notation; fetches https://github.com/junegunn/vim-easy-align
Plug 'junegunn/vim-easy-align'
" Any valid git URL is allowed
Plug 'https://github.com/junegunn/vim-github-dashboard.git'
" Multiple Plug commands can be written in a single line using | separators
Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
" On-demand loading
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
" Using a non-master branch
Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' }
" Using a tagged release; wildcard allowed (requires git 1.9.2 or above)
Plug 'fatih/vim-go', { 'tag': '*' }
" Plugin options
Plug 'nsf/gocode', { 'tag': 'v.20150303', 'rtp': 'vim' }
" Plugin outside ~/.vim/plugged with post-update hook
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
" Unmanaged plugin (manually installed and updated)
Plug '~/my-prototype-plugin'
" Asynchronous linting and make framework for Neovim/Vim
Plug 'neomake/neomake'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-rails'
"Plug 'tpope/vim-rvm'
Plug 'vim-ruby/vim-ruby'
Plug 'https://github.com/kien/ctrlp.vim.git'
Plug 'mattn/webapi-vim'
Plug 'mattn/gist-vim'
" Run NeoMake on read and write operations
autocmd! BufReadPost,BufWritePost * Neomake
call neomake#configure#automake('w')
let g:neomake_open_list = 2
let g:neomake_ruby_enabled_makers = ['rubocop']
" Disable inherited syntastic
" let g:syntastic_mode_map = {
" \ "mode": "passive",
" \ "active_filetypes": [],
" \ "passive_filetypes": [] }
"
" let g:neomake_serialize = 1
" let g:neomake_serialize_abort_on_error = 1
" Initialize plugin system
call plug#end()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment