blob: 41450bb85efa58e1581345cbbbe260835c885ede (
plain) (
tree)
|
|
" PLUGINS
" we plug now, babey
if ! filereadable(expand('~/.config/nvim/autoload/plug.vim'))
echo "Downloading junegunn/vim-plug to manage plugins..."
silent !mkdir -p ~/.config/nvim/autoload/
silent !curl "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > ~/.config/nvim/autoload/plug.vim
endif
call plug#begin('~/.local/share/nvim/plugged')
" MatchTag
Plug 'gregsexton/matchtag'
" lightline.vim
Plug 'itchyny/lightline.vim'
" wal.vim
Plug 'dylanaraps/wal.vim'
" vim-fugitive
Plug 'tpope/vim-fugitive'
" vim-gitgutter
Plug 'airblade/vim-gitgutter'
" vim-surround
Plug 'tpope/vim-surround'
" JsBeautify
Plug 'maksimr/vim-jsbeautify'
" recognize color tags
Plug 'lilydjwg/colorizer'
" syntax checking
Plug 'vim-syntastic/syntastic'
"" VimCompletesMe
"Plug 'ajh17/VimCompletesMe'
" END PLUGINS
call plug#end()
" end of vim-plug related lines
"colo wal
colo asmanian_blood
set tgc
" productivity binds
" unbind arrow keys like some kind of neurotic chucklefuck
noremap <Up> <NOP>
noremap <Down> <NOP>
noremap <Left> <NOP>
noremap <Right> <NOP>
inoremap <Up> <NOP>
inoremap <Down> <NOP>
inoremap <Left> <NOP>
inoremap <Right> <NOP>
"" JsBeautify binds
autocmd FileType javascript noremap <buffer> <c-f> :call JsBeautify()<cr>
" for json
autocmd FileType json noremap <buffer> <c-f> :call JsonBeautify()<cr>
" for jsx
autocmd FileType jsx noremap <buffer> <c-f> :call JsxBeautify()<cr>
" for html
autocmd FileType html noremap <buffer> <c-f> :call HtmlBeautify()<cr>
" for css or scss
autocmd FileType css noremap <buffer> <c-f> :call CSSBeautify()<cr>
"" and for visual mode:
autocmd FileType javascript vnoremap <buffer> <c-f> :call RangeJsBeautify()<cr>
" for json
autocmd FileType json vnoremap <buffer> <c-f> :call RangeJsonBeautify()<cr>
" for jsx
autocmd FileType jsx vnoremap <buffer> <c-f> :call RangeJsxBeautify()<cr>
" for html
autocmd FileType html vnoremap <buffer> <c-f> :call RangeHtmlBeautify()<cr>
" for css or scss
autocmd FileType css vnoremap <buffer> <c-f> :call RangeCSSBeautify()<cr>
" syntastic config
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:syntastic_c_checkers = ["cppcheck"]
let g:syntastic_sh_checkers = ["shellcheck", "sh"]
" lightline config
set noshowmode
let g:lightline = {
\ 'colorscheme': 'selenized_dark',
\ 'separator': {
\ 'left': '',
\ 'right': ''
\ },
\ 'subseparator': {
\ 'left': '',
\ 'right': ''
\ },
\ }
" betterize
set path+=**
" add a ctags shortcut like a shitty goblin
command! MakeTags !ectags -R .
" make make work when im learning c
autocmd BufRead $HOME/src/c-practice/*.c set makeprg=cc\ --std=c89\ %
|