Skip to content

Instantly share code, notes, and snippets.

@yogurt1 yogurt1/vimrc
Created Aug 7, 2018

Embed
What would you like to do?
vimrc
let g:vitality_always_assume_iterm = 1
let g:indent_guides_start_level = 2
let g:indent_guides_enable_on_vim_startup = 1
let g:pencil_neutral_code_bg = 0
let g:pencil_neutral_headings = 0
let g:pencil_higher_contrast_ui = 1
let g:pencil_terminal_italics = 1
let g:pencil_gutter_color = 1
" let g:airline_theme = 'material'
" let g:airline_theme = 'base16_apathy'
let g:airline_mode_map = {
\ '__' : '--',
\ 'n' : 'N',
\ 'i' : 'I',
\ 'R' : 'R',
\ 'c' : 'C',
\ 'v' : 'V',
\ 'V' : 'V-L',
\ '' : 'V-B',
\ 's' : 'S',
\ 'S' : 'S-L',
\ '' : 'S-B',
\ 't' : 'T',
\ }
if has("gui_running")
let g:airline_theme = 'pencil'
endif
let g:airline#extensions#whitespace#enabled = 0
let g:airline_skip_empty_sections = 1
let g:airline_section_x = '%{&filetype} %{WebDevIconsGetFileTypeSymbol()}'
let g:airline_section_y = ''
let g:airline_section_z = '%4l:%-c %3p%% / %-4L'
let g:airline_powerfile_fonts = 1
let g:airline#extensions#ale#enabled = 1
let g:webdevicons_enable_airline_tabline = 1
let g:webdevicons_enable_airline_statusline = 0
let g:webdevicons_enable_vimfiler = 1
let g:webdevicons_enable_ctrlp = 1
let g:webdevicons_enable_unite = 1
let g:acp_enableAtStartup = 0
let g:neocomplete#enable_at_startup = 1
let g:neocomplete#enable_smart_case = 1
let g:neocomplete#sources#syntax#min_keyword_length = 3
let g:ale_fixers = {
\'javascript': ['prettier']
\}
let g:ale_javascript_prettier_options = '--single-quote'
let g:ale_javascript_prettier_command = 'npx prettier'
" let g:ale_set_loclist = 0
" let g:ale_set_quickfix = 1
let g:vimfiler_as_default_explorer = 1
let g:haskellmode_completion_ghc = 0
let g:polyglot_disabled = ['javascript', 'jsx', 'javascript.jsx']
let g:jsx_ext_required = 0
" let g:vim_jsx_pretty_colorful_config = 1
let g:vim_jsx_pretty_enable_jsx_highlight = 1
let g:flow#autoclose = 1
let g:flow#omnifunc = 1
let g:flow#showquickfix = 0
call plug#begin()
" Common
Plug 'tpope/vim-dispatch'
Plug 'Shougo/vimproc.vim', { 'do': 'make' }
Plug 'SirVer/ultisnips'
Plug 'honza/vim-snippets'
Plug 'w0rp/ale' " Async lint engine
Plug 'mattn/gist-vim'
Plug 'vim-scripts/sudo.vim'
Plug 'tpope/vim-fugitive'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'spf13/vim-preview'
Plug 'Shougo/vimshell.vim'
Plug 'ujihisa/repl.vim'
Plug 'sjl/vitality.vim'
" Edit
Plug 'sheerun/vim-polyglot'
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-surround'
" Plug 'junegunn/vim-easy-align'
Plug 'ervandew/supertab'
Plug 'editorconfig/editorconfig-vim'
Plug 'jiangmiao/auto-pairs'
" Plug 'valloric/youcompleteme'
Plug 'Shougo/neocomplete.vim'
Plug 'terryma/vim-multiple-cursors'
Plug 'lilydjwg/colorizer'
" UI
Plug 'yuttie/comfortable-motion.vim'
Plug 'Yggdroot/indentLine'
Plug 'Shougo/unite.vim'
Plug 'Shougo/vimfiler'
Plug 'mhinz/vim-signify'
Plug 'airblade/vim-gitgutter'
Plug 'mhinz/vim-startify'
Plug 'flazz/vim-colorschemes'
" Plug 'chriskempson/base16-vim'
Plug 'MaxSt/FlatColor'
Plug 'reedes/vim-colors-pencil'
Plug 'hzchirs/vim-material'
Plug 'vim-airline/vim-airline-themes'
Plug 'vim-airline/vim-airline'
" HTML/CSS
Plug 'mattn/emmet-vim'
Plug 'othree/html5.vim'
" JavaScript
Plug 'prettier/vim-prettier'
Plug 'leafgarland/typescript-vim'
Plug 'Quramy/tsuquyomi'
Plug 'heavenshell/vim-jsdoc'
Plug 'moll/vim-node'
Plug 'Quramy/vim-js-pretty-template'
Plug 'gavocanov/vim-js-indent'
Plug 'othree/javascript-libraries-syntax.vim'
Plug 'othree/xml.vim'
Plug 'chemzqm/vim-jsx-improve'
Plug 'flowtype/vim-flow'
" Haskell, Idris and PureScript
Plug 'alx741/vim-hindent'
Plug 'eagletmt/ghcmod-vim'
Plug 'eagletmt/neco-ghc'
Plug 'neovimhaskell/haskell-vim'
Plug 'idris-hackers/idris-vim'
" Ruby
Plug 'tpope/vim-rails'
Plug 'tpope/vim-bundler'
" C lang
Plug 'vim-scripts/c.vim'
" Other languages
Plug 'fatih/vim-go' " Golang
Plug 'rust-lang/rust.vim' " Rust
Plug 'chrisbra/csv.vim' " CSV
Plug 'jparise/vim-graphql' " GraphQL
Plug 'ryanoasis/vim-devicons'
call plug#end()
" Stuff {{{
set incsearch " search as you type
set hlsearch
set ignorecase " case-insensetive search
set smartcase
set wildignore=log/**,node_modules/**,target/**,tmp/**,*.rbc
set wildmenu " show a navigable menu for tab completion
set wildmode=longest,list,full
" }}}
" Indent {{{
set autoindent
set cindent
set softtabstop=2
set tabstop=2
set shiftwidth=2
set smarttab
set expandtab
set foldmethod=manual
set encoding=utf8
" }}}
" UI {{{
set ttimeout
set ttimeoutlen=50
set noshowmode
set ruler " show where you are
set nolazyredraw
" set lazyredraw
set ttyfast
set mouse=niv " mouse=a
set clipboard=unnamed
set number
set linespace=1
" set t_Co=256
if has("gui_running")
set macligatures
set guifont=FuraCode_Nerd_Font:h14
set background=light
color pencil
else
set background=dark
color Dim
end
" }}}
" Split nav {{{
set splitbelow
set splitright
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
" }}}
nmap <silent> <C-O> :VimFiler<CR>
" JavaScript/TypeScript {{{
nmap <silent> <leader>gt :TsuTypeDefinition<CR>
" }}}
" Haskell {{{
" Type of expression under cursor
nmap <silent> <leader>ht :GhcModType<CR>
" Insert type of expression under cursor
nmap <silent> <leader>hT :GhcModTypeInsert<CR>
" Autoformat Haskell
autocmd FileType haskell let &formatprg="hindent --tab-size 2 -XQuasiQuotes"
" Autocomplete Haskell
autocmd FileType haskell setlocal omnifunc=necoghc#omnifunc
" }}}
" JS JSX fix
autocmd BufNewFile,BufRead *.js set filetype=javascript
autocmd BufNewFile,BufRead *.jsx set filetype=javascript
" Autocomplete {{{
" Omni
autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags
autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS
autocmd FileType python setlocal omnifunc=pythoncomplete#Complete
autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags
" }}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.