Last active
December 5, 2017 01:33
-
-
Save curtiswilkinson/77c03ef551b48de72c13896820207fb2 to your computer and use it in GitHub Desktop.
New attempt at a full vim transition
This file contains hidden or 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
set nocompatible | |
filetype off | |
call plug#begin() | |
" Themes | |
Plug 'arcticicestudio/nord-vim' | |
Plug 'dracula/vim' | |
Plug 'https://github.com/skielbasa/vim-material-monokai' | |
" Language Support | |
Plug 'sheerun/vim-polyglot' | |
Plug 'Quramy/tsuquyomi' | |
Plug 'leafgarland/typescript-vim' | |
Plug 'neovimhaskell/haskell-vim' | |
Plug 'Valloric/YouCompleteMe', { 'do': './install.py' } | |
Plug 'prettier/vim-prettier', { | |
\ 'do': 'yarn install', | |
\ 'for': ['javascript', 'typescript', 'css', 'less', 'scss', 'json', 'graphql', 'markdown'] } | |
Plug 'elmcast/elm-vim' | |
Plug 'ianks/vim-tsx' | |
" Editing Help | |
Plug 'tpope/vim-sensible' | |
Plug 'rking/ag.vim' | |
Plug 'tpope/vim-surround' | |
Plug 'tpope/vim-commentary' | |
Plug 'christoomey/vim-tmux-navigator' | |
Plug 'Shougo/vimproc.vim', {'do' : 'make'} | |
Plug 'https://github.com/ctrlpvim/ctrlp.vim' | |
Plug 'easymotion/vim-easymotion' | |
Plug 'vim-syntastic/syntastic' | |
" GUI Stuff | |
Plug 'scrooloose/nerdtree' | |
Plug 'vim-airline/vim-airline' | |
Plug 'mhinz/vim-startify' | |
Plug 'airblade/vim-gitgutter' | |
call plug#end() | |
syntax on | |
filetype plugin indent on | |
let g:ctrlp_map = '<c-p>' | |
let g:ctrlp_cmd = 'CtrlP' | |
let g:tsuquyomi_completion_detail = 1 | |
"Prettier things | |
let g:prettier#autoformat = 0 | |
autocmd BufWritePre *.js,*.jsx,*.mjs,*.ts,*.tsx,*.css,*.less,*.scss,*.json,*.graphql,*.md PrettierAsync | |
"NERDTree things | |
map <C-f> :NERDTreeToggle<CR> | |
"autocmd StdinReadPre * let s:std_in=1 | |
"autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif | |
" Elm Stuff | |
let g:ycm_semantic_triggers = { | |
\ 'elm' : ['.'], | |
\} | |
let g:polyglot_disabled = ['elm'] | |
let g:elm_detailed_complete = 1 | |
let g:elm_format_autosave = 1 | |
let g:elm_syntastic_show_warnings = 1 | |
if executable('ag') | |
" Use ag over grep | |
set grepprg=ag\ --nogroup\ --nocolor | |
" Use ag in CtrlP for listing files. Lightning fast and respects .gitignore | |
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""' | |
" ag is fast enough that CtrlP doesn't need to cache | |
let g:ctrlp_use_caching = 0 | |
" Grep for the work under the cursor | |
nnoremap <leader>\\ :grep! "\b<C-R><C-W>\b"<CR>:cw<CR> | |
" bind \ (backward slash) to grep shortcut | |
command! -nargs=+ -complete=file -bar Ag silent! grep! <args>|cwindow|redraw! | |
nnoremap \ :Ag!<SPACE> | |
endif | |
"Syntastic stuff | |
set statusline+=%#warningmsg# | |
set statusline+=%{SyntasticStatuslineFlag()} | |
set statusline+=%* | |
let g:syntastic_always_populate_loc_list = 1 | |
let g:syntastic_auto_loc_list = 1 | |
let g:syntastic_check_on_open = 1 | |
let g:syntastic_check_on_wq = 0 | |
let mapleader = " " | |
set modelines=0 | |
set number | |
set ruler | |
set visualbell | |
set encoding=utf-8 | |
set wrap | |
set textwidth=79 | |
set formatoptions=tcqrn1 | |
set tabstop=2 | |
set shiftwidth=2 | |
set softtabstop=2 | |
set expandtab | |
set noshiftround | |
set scrolloff=3 | |
set backspace=indent,eol,start | |
set matchpairs+=<:> " use % to jump between pairs | |
runtime! macros/matchit.vim | |
nnoremap j gj | |
nnoremap k gk | |
set hidden | |
set ttyfast | |
set laststatus=2 | |
set showmode | |
set showcmd | |
nnoremap / /\v | |
vnoremap / /\v | |
set hlsearch | |
set incsearch | |
set ignorecase | |
set smartcase | |
set showmatch | |
map <leader><space> :let @/=''<cr> " clear search | |
inoremap jj <Esc> | |
inoremap <F1> <ESC>:set invfullscreen<CR>a | |
nnoremap <F1> :set invfullscreen<CR> | |
vnoremap <F1> :set invfullscreen<CR> | |
map <leader>q gqip | |
set listchars=tab:▸\ ,eol:¬ | |
map <leader>l :set list!<CR> " Toggle tabs and EOL | |
highlight Normal ctermbg=NONE | |
highlight nonText ctermbg=NONE | |
highlight Normal ctermfg=grey ctermbg=darkblue | |
set t_Co=256 | |
set background=dark | |
let g:solarized_termcolors=256 | |
let g:solarized_termtrans=1 | |
colorscheme material-monokai | |
let g:airline_theme='materialmonokai' | |
set guioptions-=m "remove menu bar | |
set guioptions-=T "remove toolbar | |
set guioptions-=r "remove right-hand scroll bar | |
set guioptions-=L "remove left-hand scroll bar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment