Skip to content

Instantly share code, notes, and snippets.

@mospina
Created July 30, 2021 13:13
Show Gist options
  • Select an option

  • Save mospina/cac049d1e23e504fe9becc2499a672b0 to your computer and use it in GitHub Desktop.

Select an option

Save mospina/cac049d1e23e504fe9becc2499a672b0 to your computer and use it in GitHub Desktop.
vimrc
filetype plugin indent on
:set tabstop=2
:set shiftwidth=2
:set expandtab
" Make vim indent 2 spaces for ruby and elixir files only
autocmd FileType ruby set tabstop=2|set shiftwidth=2|set expandtab
autocmd FileType python set tabstop=4|set shiftwidth=4|set expandtab
autocmd FileType elixir set tabstop=2|set shiftwidth=2|set expandtab
autocmd FileType haskell set tabstop=4|set shiftwidth=4|set expandtab
augroup vimrc
au BufReadPre * setlocal foldmethod=indent
au BufWinEnter * if &fdm == 'indent' | setlocal foldmethod=manual | endif
augroup END
" Run Black on save
autocmd BufWritePre *.py execute ':Black'
" plugins via vim-plug
call plug#begin('~/.vim/plugged')
Plug 'ElmCast/elm-vim'
Plug 'pbrisbin/vim-syntax-shakespeare'
Plug 'dart-lang/dart-vim-plugin'
Plug 'leafgarland/typescript-vim'
Plug 'Quramy/vim-js-pretty-template'
Plug 'jason0x43/vim-js-indent'
Plug 'Quramy/tsuquyomi'
Plug 'peitalin/vim-jsx-typescript'
Plug 'elixir-editors/vim-elixir'
Plug 'psf/black'
Plug 'purescript-contrib/purescript-vim'
Plug 'udalov/kotlin-vim'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
call plug#end()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment