Skip to content

Instantly share code, notes, and snippets.

@samwx
Created September 24, 2022 14:11
Show Gist options
  • Save samwx/3fcd3e3d7d19e832b1e9e2c307e6f2aa to your computer and use it in GitHub Desktop.
Save samwx/3fcd3e3d7d19e832b1e9e2c307e6f2aa to your computer and use it in GitHub Desktop.
call plug#begin('~/.vim/plugged')
Plug 'mattn/emmet-vim'
Plug 'prettier/vim-prettier'
Plug 'sheerun/vim-polyglot'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'dense-analysis/ale'
Plug 'preservim/nerdtree'
" Themes
Plug 'rakr/vim-one'
call plug#end()
" Configuration
syntax on
" Use new regular expression engine
set re=0
set number
filetype plugin indent on
set tabstop=4 shiftwidth=2 expandtab
set backspace=indent,eol,start
let g:airline#extensions#tabline#enabled = 1
" Theme configuration
colorscheme one
set background=dark
let g:one_allow_italics = 1
" ALE config
" use ale as a deoplete source
let g:ale_completion_enabled = 1
" use eslint, prettier, and stylelint
let g:ale_fixers = {
\ 'javascript': ['eslint', 'prettier'],
\ 'typescript': ['eslint', 'prettier'],
\ 'css': ['stylelint', 'prettier'],
\ 'html': ['prettier']
\}
" use eslint for ts and js
let g:ale_linters = {
\ 'typescript': [ 'eslint' ],
\ 'javascript': [ 'eslint' ]
\}
" Key Mappings
" Tabs
map <leader>tn :tabnew<cr>
map <leader>t<leader> :tabnext
map <leader>tm :tabmove
map <leader>tc :tabclose<cr>
map <leader>to :tabonly<cr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment