Created
July 7, 2017 13:49
-
-
Save mjs2600/773db38aab535aef32daada48c3424eb to your computer and use it in GitHub Desktop.
My `.vimrc`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if !filereadable(glob("~/.config/nvim/autoload/plug.vim")) | |
!curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
endif | |
let g:python_host_prog = $HOME . '/.pyenv/versions/neovim2/bin/python' | |
let g:python3_host_prog = $HOME . '/.pyenv/versions/neovim3/bin/python' | |
let mapleader = ' ' | |
silent !mkdir -p ~/.vim/undo > /dev/null 2>&1 | |
call plug#begin('~/.vim/plugged') | |
Plug 'w0rp/ale' | |
Plug 'sbdchd/neoformat' | |
Plug 'sheerun/vim-polyglot' | |
Plug 'vimwiki/vimwiki' | |
Plug 'itchyny/lightline.vim' | |
" Plug 'elixir-lang/vim-elixir' | |
Plug 'slashmili/alchemist.vim' | |
Plug 'maralla/completor.vim' | |
" Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } | |
" Plug 'zchee/deoplete-jedi' | |
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } | |
Plug 'junegunn/fzf.vim' | |
Plug 'tpope/vim-commentary' | |
Plug 'tpope/vim-vinegar' | |
Plug 'tpope/vim-fugitive' | |
Plug 'tpope/vim-surround' | |
Plug 'nanotech/jellybeans.vim' | |
Plug 'ludovicchabant/vim-gutentags' | |
Plug 'elmcast/elm-vim' | |
" Plug 'rust-lang/rust.vim' | |
Plug 'racer-rust/vim-racer' | |
Plug 'jalvesaq/Nvim-R' | |
call plug#end() | |
set expandtab | |
set shiftwidth=2 | |
set softtabstop=2 | |
set ignorecase | |
set smartcase | |
set hlsearch | |
set incsearch | |
set number | |
set encoding=utf-8 " Necessary to show Unicode glyphs | |
set list listchars=tab:>>,eol:¬,trail:· | |
set undofile | |
set undodir=~/.vim/undo | |
set shell=zsh | |
set mouse=a | |
set vb | |
set guioptions-=T "remove toolbar | |
set clipboard+=unnamedplus | |
command! -bang -nargs=* Rg | |
\ call fzf#vim#grep( | |
\ 'rg --column --line-number --no-heading --color=always '.shellescape(<q-args>), 1, | |
\ <bang>0 ? fzf#vim#with_preview('up:60%') | |
\ : fzf#vim#with_preview('right:50%:hidden', '?'), | |
\ <bang>0) | |
nnoremap Y y$ | |
noremap <silent> <Right> <c-w>l | |
noremap <silent> <Left> <c-w>h | |
noremap <silent> <Up> <c-w>k | |
noremap <silent> <Down> <c-w>j | |
noremap <silent> <c-l> <c-w>l | |
noremap <silent> <c-h> <c-w>h | |
noremap <silent> <c-k> <c-w>k | |
noremap <silent> <c-j> <c-w>j | |
noremap <leader>$ :setlocal spell! spelllang=en_us<CR> | |
noremap <leader>f :Files<CR> | |
noremap <leader>b :Buffers<CR> | |
noremap <leader>/ :Ag<CR> | |
noremap <leader>t :Tags<CR> | |
nnoremap <leader><cr> :nohlsearch<cr> | |
syntax enable | |
filetype plugin indent on | |
noremap <leader>. :e ~/.config/nvim/init.vim<CR> | |
"Elixir | |
autocmd FileType elixir noremap <buffer> <leader>` :!mix test<cr> | |
"Elm | |
let g:elm_format_autosave = 1 | |
" Auto Formatting | |
" Formatting | |
" autocmd BufWritePre *.js Neoformat | |
" autocmd BufWritePre *.json Neoformat | |
" autocmd BufWritePre *.rs Neoformat | |
let g:ale_virtualenv_dir_names = ['.env', 'env', 've', 've-py3', 'virtualenv', '.direnv/python-2.7.13'] | |
let g:neoformat_enabled_python = [] | |
augroup fmt | |
autocmd! | |
autocmd BufWritePre * Neoformat | |
augroup END | |
" Use deoplete. | |
" let g:deoplete#enable_at_startup = 1 | |
let g:gutentags_cache_dir = '~/.tags_cache' | |
let g:polyglot_disabled = ['elm', 'r'] | |
let g:jellybeans_background_color_256='NONE' | |
colorscheme jellybeans |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment