Skip to content

Instantly share code, notes, and snippets.

@Beatz748
Last active February 16, 2021 12:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Beatz748/d77a524caef4701a0aca25c216ca3eb3 to your computer and use it in GitHub Desktop.
Save Beatz748/d77a524caef4701a0aca25c216ca3eb3 to your computer and use it in GitHub Desktop.
set runtimepath^=~/.vim
call plug#begin('~/.vim/plugged')
" https://github.com/romainl/flattened
Plug 'romainl/flattened'
" https://github.com/itchyny/lightline.vim
Plug 'itchyny/lightline.vim'
" https://github.com/scrooloose/nerdtree
Plug 'scrooloose/nerdtree'
Plug 'scrooloose/syntastic'
" https://github.com/Shougo/neocomplete.vim
call plug#end()
nnoremap <silent> <C-d> :lclose<CR>:bdelete<CR>
cabbrev <silent> bd <C-r>=(getcmdtype()==#':' && getcmdpos()==1 ? 'lclose\|bdelete' : 'bd')<CR>
autocmd vimenter * NERDTree
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
set clipboard=unnamed
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_always_populate_loc_list = 1
set number
set laststatus=2
set noshowmode
set mouse=a
set tabstop=4
set softtabstop=4
set shiftwidth=4
set noexpandtab
autocmd TextChanged,TextChangedI <buffer> silent write
highlight ColorColumn ctermbg=green
let g:neocomplcache_enable_at_startup = 1
augroup autosave
autocmd!
autocmd BufRead * if &filetype == "" | setlocal ft=text | endif
autocmd FileType * autocmd TextChanged,InsertLeave <buffer> if &readonly == 0 | silent write | endif
augroup END
augroup project
autocmd!
autocmd BufRead,BufNewFile *.h,*.c set filetype=c.doxygen
augroup END
map <C-n> :NERDTreeToggle<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment