Created
August 8, 2019 08:32
-
-
Save arturkot/760aec12e91739f4f96d132cf3d48e54 to your computer and use it in GitHub Desktop.
Vim settings
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
set number | |
set autoread | |
set tabstop=2 | |
runtime macros/matchit.vim | |
" Ignores | |
set wildignore+=*/tmp/*,*/node_modules/*,*/dist/*,*.so,*.swp,*.zip | |
" Prettier | |
function RunPrettier() | |
let lineNumber = line('.') | |
execute "w | %d" | |
execute "r !npx prettier %" | |
execute lineNumber | |
endfunction | |
command Pr call RunPrettier() | |
" ALE | |
let g:ale_fixers = { | |
\ '*': ['remove_trailing_lines', 'trim_whitespace'], | |
\ 'javascript': ['prettier', 'eslint'], | |
\} | |
" NERDTree | |
map <C-n> :NERDTreeToggle<CR> | |
function OpenNERDTreeWhereFile() | |
let filePath = expand('%p') | |
execute "NERDTreeToggle" | |
execute "NERDTreeFind " . filePath | |
endfunction | |
command Nt call OpenNERDTreeWhereFile() | |
" ctrlp | |
let g:ctrlp_custom_ignore = { | |
\ 'dir': '\v[\/]\.(git|hg|svn)$', | |
\ } | |
" vim-plug | |
call plug#begin() | |
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } | |
Plug 'pangloss/vim-javascript' | |
Plug 'mxw/vim-jsx' | |
Plug 'mattn/emmet-vim' | |
Plug 'w0rp/ale' | |
Plug 'editorconfig/editorconfig-vim' | |
Plug 'Galooshi/vim-import-js' | |
Plug 'mustache/vim-mustache-handlebars' | |
Plug 'ctrlpvim/ctrlp.vim' | |
Plug 'altercation/vim-colors-solarized' | |
Plug 'tpope/vim-surround' | |
Plug 'leafgarland/typescript-vim' | |
call plug#end() | |
syntax on | |
set background=dark | |
colorscheme solarized |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment