Last active
December 23, 2020 10:22
-
-
Save MadonnaMat/a3487e74ea4f4628598bd45e86b97783 to your computer and use it in GitHub Desktop.
My VimRC
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 | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'gmarik/Vundle.vim' | |
Bundle 'vim-ruby/vim-ruby' | |
Plugin 'kchmck/vim-coffee-script' | |
Plugin 'mustache/vim-mustache-handlebars' | |
Plugin 'jeffkreeftmeijer/vim-numbertoggle' | |
Plugin 'tpope/vim-fugitive' | |
Plugin 'ctrlpvim/ctrlp.vim' | |
Plugin 'godlygeek/tabular' | |
Plugin 'elmcast/elm-vim' | |
Plugin 'luochen1990/rainbow' | |
Bundle 'yalesov/vim-emblem' | |
Plugin 'vim-airline/vim-airline' | |
Plugin 'vim-airline/vim-airline-themes' | |
Plugin 'raimondi/delimitmate' | |
Plugin 'flazz/vim-colorschemes' | |
Plugin 'scrooloose/nerdcommenter' | |
Plugin 'bkad/CamelCaseMotion' | |
Plugin 'othree/yajs.vim' | |
Plugin 'digitaltoad/vim-pug' | |
Plugin 'prettier/vim-prettier' | |
Plugin 'wfleming/vim-codeclimate' | |
Plugin 'scrooloose/syntastic' | |
Plugin 'Quramy/tsuquyomi' | |
Plugin 'leafgarland/typescript-vim' | |
Plugin 'posva/vim-vue' | |
Plugin 'pangloss/vim-javascript' | |
Plugin 'maxmellon/vim-jsx-pretty' | |
Plugin 'heavenshell/vim-jsdoc' | |
Plugin 'ycm-core/YouCompleteMe' | |
Plugin 'Chiel92/vim-autoformat' | |
Plugin 'airblade/vim-gitgutter' | |
Plugin 'metakirby5/codi.vim' | |
Plugin 'tpope/vim-surround' | |
Plugin 'rust-lang/rust.vim' | |
call vundle#end() | |
syntax enable | |
nnoremap ; : | |
map <silent> w <Plug>CamelCaseMotion_w | |
map <silent> b <Plug>CamelCaseMotion_b | |
map <silent> e <Plug>CamelCaseMotion_e | |
map <F1> :w !pbcopy<CR><CR> | |
sunmap w | |
sunmap b | |
sunmap e | |
set laststatus=2 | |
set noshowmode | |
let g:airline_theme='bubblegum' | |
set nowrap | |
set backspace=indent,eol,start | |
set autoindent | |
set copyindent | |
set relativenumber | |
set number | |
" autocmd BufReadPre,FileReadPre * execute "RltvNmbr" | |
set tabstop=2 | |
set shiftwidth=2 | |
set softtabstop=2 | |
set shiftround | |
set showmatch | |
set smartcase | |
set smarttab | |
set smartindent | |
set cindent | |
set hlsearch | |
set incsearch | |
set expandtab | |
set hidden | |
set list | |
set pastetoggle=<F2> | |
filetype plugin indent on | |
au BufNewFile,BufRead *.coffee set filetype=coffee | |
au BufNewFile,BufRead *.hbs set filetype=mustache | |
au BufNewFile,BufRead *.handlebars set filetype=mustache | |
au BufNewFile,BufRead *.elm set filetype=elm | |
au BufNewFile,BufRead *.emblem set filetype=emblem | |
au BufnewFile,BufRead *.pug set filetype=pug | |
let g:rainbow_active = 1 | |
let g:elm_format_autosave = 1 | |
autocmd Filetype elm setlocal ts=4 sts=4 sw=4 | |
function! MoveFile(newspec) | |
let old = expand('%') | |
" could be improved: | |
if (old == a:newspec) | |
return 0 | |
endif | |
exe 'sav' fnameescape(a:newspec) | |
call delete(old) | |
endfunction | |
command! -nargs=1 -complete=file -bar MoveFile call MoveFile('<args>') | |
autocmd BufWritePre *.js,*.jsx,*.mjs,*.ts,*.tsx,*.css,*.less,*.scss,*.json,*.graphql Prettier | |
let g:formatdef_autopep8 = "'autopep8 - --range '.a:firstline.' '.a:lastline" | |
let g:formatters_python = ['autopep8'] | |
autocmd FileType python let b:autoformat_autoindent=0 | |
autocmd FileType python let b:autoformat_retab=0 | |
autocmd FileType python let b:autoformat_remove_trailing_spaces=0 | |
au BufWritePre *.py Autoformat | |
function! CommandCabbr(abbreviation, expansion) | |
execute 'cabbr ' . a:abbreviation . ' <c-r>=getcmdpos() == 1 && getcmdtype() == ":" ? "' . a:expansion . '" : "' . a:abbreviation . '"<CR>' | |
endfunction | |
command! -nargs=+ CommandCabbr call CommandCabbr(<f-args>) | |
" Use it on itself to define a simpler abbreviation for itself. | |
CommandCabbr ccab CommandCabbr | |
CommandCabbr ls CtrlPBuffer | |
" store temp files in a central spot | |
set backupdir=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp | |
set directory=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp | |
nmap <Leader>aa :CodeClimateAnalyzeProject<CR> | |
nmap <Leader>ao :CodeClimateAnalyzeOpenFiles<CR> | |
nmap <Leader>af :CodeClimateAnalyzeCurrentFile<CR> | |
let g:rustfmt_autosave = 1 | |
let g:syntastic_enable_signs=1 | |
let g:syntastic_auto_loc_list=1 | |
let g:tsuquyomi_disable_quickfix = 1 | |
let g:syntastic_typescript_checkers = ['tsuquyomi'] | |
let g:syntastic_python_checkers = ['pylint'] | |
let g:syntastic_mode_map = { 'mode': 'passive', 'active_filetypes': ['.ts', '.tsx', '.py'],'passive_filetypes': [] } | |
nnoremap <C-w>E :SyntasticCheck<CR> :SyntasticToggleMode<CR> | |
let g:ycm_semantic_triggers = {'elm' : ['.']} | |
let g:ycm_autoclose_preview_window_after_insertion = 1 | |
let g:ycm_autoclose_preview_window_after_completion = 1 | |
let g:gitgutter_git_executable = '/usr/local/bin/git' | |
au BufWritePost * GitGutterEnable | |
command Ggsh GitGutterStageHunk | |
colorscheme xoria256 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment