2012-09-08 02:33:24 +00:00
|
|
|
|
" vim config
|
|
|
|
|
" Ryan Cavicchioni
|
|
|
|
|
|
2018-03-07 21:45:20 +00:00
|
|
|
|
silent !mkdir -p ~/.vim/{backup,swp}/
|
|
|
|
|
|
2013-12-22 22:46:52 +00:00
|
|
|
|
set nocompatible
|
|
|
|
|
filetype off
|
2014-07-03 14:59:34 +00:00
|
|
|
|
|
2022-09-18 15:04:21 +00:00
|
|
|
|
call plug#begin()
|
2013-10-22 04:28:28 +00:00
|
|
|
|
|
2018-01-28 03:32:09 +00:00
|
|
|
|
set t_Co=256 " Set to 256 color mode.
|
|
|
|
|
syntax on " Enable syntax highlighting.
|
2012-09-08 02:33:24 +00:00
|
|
|
|
|
|
|
|
|
set nowrap " Disable word wrap.
|
|
|
|
|
set tabstop=4 " Set tab to 4 characters.
|
|
|
|
|
set smartindent " Enable smart indent.
|
|
|
|
|
set autoindent
|
|
|
|
|
set shiftwidth=4 " Set smartindent width to 4 characters.
|
|
|
|
|
set hlsearch " Highlight search and increment search.
|
|
|
|
|
set incsearch
|
|
|
|
|
set showmatch " Show matching brackets.
|
|
|
|
|
set nomodeline " Disable modeline support.
|
|
|
|
|
set softtabstop=4
|
|
|
|
|
set showcmd " Show partial command in status line.
|
|
|
|
|
set ignorecase " Case insensitive searching.
|
|
|
|
|
set smartcase " Smart case matching.
|
|
|
|
|
set autowrite " Save before switching buffers.
|
|
|
|
|
set number
|
|
|
|
|
set smarttab
|
2022-09-18 14:36:48 +00:00
|
|
|
|
set fileencoding=utf-8
|
2022-09-18 15:08:04 +00:00
|
|
|
|
set listchars=eol:¬,space:·,tab:»\
|
2012-09-08 02:33:24 +00:00
|
|
|
|
set expandtab
|
|
|
|
|
set backspace=indent,eol
|
|
|
|
|
set textwidth=80
|
|
|
|
|
set spell
|
2012-10-09 19:58:51 +00:00
|
|
|
|
set ruler
|
2013-10-22 03:21:55 +00:00
|
|
|
|
set laststatus=2
|
2018-01-28 03:22:19 +00:00
|
|
|
|
set colorcolumn=80
|
2018-03-07 21:45:20 +00:00
|
|
|
|
set diffopt+=iwhite
|
|
|
|
|
set backupdir=~/.vim/backup/
|
|
|
|
|
set directory=~/.vim/swp/
|
2022-09-18 14:38:36 +00:00
|
|
|
|
if has('termguicolors')
|
|
|
|
|
set termguicolors
|
|
|
|
|
endif
|
2019-01-12 18:30:30 +00:00
|
|
|
|
set updatetime=100
|
2012-09-08 02:33:24 +00:00
|
|
|
|
|
2013-10-22 04:35:08 +00:00
|
|
|
|
nnoremap <leader>s :set spell!<CR>
|
|
|
|
|
nnoremap <leader>n :set number!<CR>
|
|
|
|
|
nnoremap <leader>rn :set relativenumber!<CR>
|
2024-07-03 04:28:27 +00:00
|
|
|
|
nnoremap <leader>b :Buffers<CR>
|
|
|
|
|
nnoremap <leader>f :Files<CR>
|
|
|
|
|
nnoremap <leader>c :Colors<CR>
|
|
|
|
|
nnoremap <leader>u :UndotreeToggle<CR>
|
2013-10-22 04:35:08 +00:00
|
|
|
|
|
2012-09-08 02:33:24 +00:00
|
|
|
|
au BufNewFile,BufRead *.txt set ft=text
|
|
|
|
|
au FileType text set tw=72 spell spelllang=en_us nonumber
|
|
|
|
|
|
|
|
|
|
au FileType mail set tw=72 spell spelllang=en_us nonumber
|
2018-01-28 03:22:34 +00:00
|
|
|
|
au FileType mail colorscheme default
|
2014-10-12 17:07:45 +00:00
|
|
|
|
au FileType gitcommit setlocal tw=72 spell spelllang=en_us nonumber
|
2012-09-08 02:33:24 +00:00
|
|
|
|
au BufNewFile,BufEnter *.phtml set tabstop=2 shiftwidth=2 softtabstop=2
|
2012-10-09 19:58:51 +00:00
|
|
|
|
au BufNewFile,BufEnter *.twig set tabstop=2 shiftwidth=2 softtabstop=2 ft=htmljinja
|
2012-09-08 02:33:24 +00:00
|
|
|
|
au FileType html set tabstop=2 shiftwidth=2 softtabstop=2
|
|
|
|
|
au FileType xml set tabstop=2 shiftwidth=2 softtabstop=2
|
|
|
|
|
au FileType ant set tabstop=2 shiftwidth=2 softtabstop=2
|
|
|
|
|
au FileType yaml set tabstop=2 shiftwidth=2 softtabstop=2
|
|
|
|
|
au FileType php set tabstop=4 shiftwidth=4 softtabstop=4
|
2013-01-15 16:20:33 +00:00
|
|
|
|
au FileType make set noexpandtab
|
2013-05-25 23:31:21 +00:00
|
|
|
|
au FileType ruby,eruby setlocal ts=2 sw=2 tw=79 et sts=2 autoindent colorcolumn=80
|
2014-07-10 05:35:49 +00:00
|
|
|
|
au FileType puppet setlocal ts=2 sw=2 tw=80 et sts=2 autoindent colorcolumn=80
|
2012-09-08 02:33:24 +00:00
|
|
|
|
|
|
|
|
|
" keyboard shortcuts
|
|
|
|
|
nmap <silent> <leader>l :set list!<CR>
|
|
|
|
|
nmap <silent> <leader>t :NERDTreeToggle<CR>
|
|
|
|
|
nmap <silent> <leader>u :GundoToggle<CR>
|
|
|
|
|
|
2016-01-18 00:14:06 +00:00
|
|
|
|
filetype off
|
2012-09-08 02:33:24 +00:00
|
|
|
|
|
2013-02-21 21:48:53 +00:00
|
|
|
|
" Plugins
|
2022-09-18 15:04:21 +00:00
|
|
|
|
Plug 'Shougo/vimproc'
|
|
|
|
|
Plug 'sjl/gundo.vim'
|
|
|
|
|
Plug 'scrooloose/nerdcommenter'
|
|
|
|
|
Plug 'scrooloose/nerdtree'
|
|
|
|
|
Plug 'msanders/snipmate.vim'
|
|
|
|
|
Plug 'godlygeek/tabular'
|
|
|
|
|
Plug 'tpope/vim-surround'
|
|
|
|
|
Plug 'tpope/vim-fugitive'
|
|
|
|
|
Plug 'kien/ctrlp.vim'
|
|
|
|
|
Plug 'vim-scripts/scratch.vim'
|
|
|
|
|
Plug 'bling/vim-airline'
|
|
|
|
|
Plug 'tpope/vim-characterize'
|
|
|
|
|
Plug 'tpope/vim-vinegar'
|
|
|
|
|
|
|
|
|
|
Plug 'jnwhiteh/vim-golang'
|
|
|
|
|
Plug 'vim-syntastic/syntastic'
|
|
|
|
|
Plug 'hashivim/vim-terraform'
|
|
|
|
|
|
|
|
|
|
Plug 'jnurmine/Zenburn'
|
|
|
|
|
Plug 'nanotech/jellybeans.vim'
|
|
|
|
|
Plug 'guns/jellyx.vim'
|
|
|
|
|
Plug 'altercation/vim-colors-solarized'
|
|
|
|
|
Plug 'atonse/vydark'
|
|
|
|
|
Plug 'vim-scripts/vylight'
|
|
|
|
|
Plug 'tpope/vim-vividchalk'
|
|
|
|
|
Plug 'ciaranm/inkpot'
|
|
|
|
|
Plug 'mrkn/mrkn256.vim'
|
|
|
|
|
Plug 'vim-scripts/twilight256.vim'
|
|
|
|
|
Plug 'vim-scripts/vilight.vim'
|
|
|
|
|
Plug 'dasch/vim-mocha'
|
|
|
|
|
Plug 'dasch/satellite'
|
|
|
|
|
Plug 'djjcast/mirodark'
|
|
|
|
|
Plug 'molok/vim-vombato-colorscheme'
|
|
|
|
|
Plug 'sjl/badwolf'
|
|
|
|
|
Plug 'shawncplus/skittles_berry'
|
|
|
|
|
Plug 'vim-scripts/Skittles-Dark'
|
|
|
|
|
Plug 'vim-scripts/tortex'
|
|
|
|
|
Plug 'vim-scripts/mayansmoke'
|
|
|
|
|
Plug 'w0ng/vim-hybrid'
|
|
|
|
|
Plug 'blackgate/tropikos-vim-theme'
|
|
|
|
|
Plug 'zaki/zazen'
|
|
|
|
|
Plug 'jonathanfilip/vim-lucius'
|
|
|
|
|
Plug 'chriskempson/vim-tomorrow-theme'
|
|
|
|
|
Plug 'nelstrom/vim-blackboard'
|
|
|
|
|
Plug 'tomasr/molokai'
|
|
|
|
|
Plug 'chriskempson/base16-vim'
|
|
|
|
|
Plug 'sk1418/last256'
|
|
|
|
|
Plug 'toupeira/vim-desertink'
|
|
|
|
|
Plug 'junegunn/seoul256.vim'
|
|
|
|
|
Plug 'lsdr/monokai'
|
|
|
|
|
Plug 'Pychimp/vim-luna'
|
|
|
|
|
Plug 'Pychimp/vim-sol'
|
|
|
|
|
Plug 'vim-scripts/wombat256.vim'
|
|
|
|
|
Plug 'vim-scripts/Wombat'
|
|
|
|
|
Plug 'reedes/vim-colors-pencil'
|
|
|
|
|
Plug 'nielsmadan/harlequin'
|
|
|
|
|
Plug 'dylanaraps/crayon'
|
|
|
|
|
Plug 'kamwitsta/flatwhite-vim'
|
|
|
|
|
Plug 'srcery-colors/srcery-vim'
|
|
|
|
|
Plug 'koirand/tokyo-metro.vim'
|
|
|
|
|
Plug 'wesgibbs/vim-irblack'
|
|
|
|
|
Plug 'agreco/vim-citylights'
|
|
|
|
|
Plug 'kaicataldo/material.vim'
|
|
|
|
|
Plug 'arcticicestudio/nord-vim'
|
|
|
|
|
Plug 'dracula/vim'
|
|
|
|
|
Plug 'airblade/vim-gitgutter'
|
|
|
|
|
Plug 'vim-airline/vim-airline-themes'
|
|
|
|
|
Plug 'fxn/vim-monochrome'
|
|
|
|
|
|
|
|
|
|
Plug 'morhetz/gruvbox'
|
|
|
|
|
Plug 'joshdick/onedark.vim'
|
|
|
|
|
Plug 'sainnhe/everforest'
|
|
|
|
|
Plug 'NLKNguyen/papercolor-theme'
|
|
|
|
|
Plug 'sainnhe/sonokai'
|
|
|
|
|
Plug 'sainnhe/gruvbox-material'
|
|
|
|
|
Plug 'Everblush/everblush.vim'
|
|
|
|
|
Plug 'yuttie/inkstained-vim'
|
|
|
|
|
Plug 'sainnhe/edge'
|
|
|
|
|
Plug 'savq/melange'
|
|
|
|
|
|
|
|
|
|
Plug 'fatih/vim-go'
|
|
|
|
|
Plug 'junegunn/fzf', {'do': {-> fzf#install()}}
|
|
|
|
|
Plug 'junegunn/fzf.vim'
|
|
|
|
|
|
2024-07-03 04:28:59 +00:00
|
|
|
|
Plug 'mbbill/undotree'
|
|
|
|
|
Plug 'tpope/vim-commentary'
|
|
|
|
|
|
|
|
|
|
|
2022-09-18 15:04:21 +00:00
|
|
|
|
call plug#end()
|
2022-09-18 14:11:16 +00:00
|
|
|
|
|
2012-09-08 02:33:24 +00:00
|
|
|
|
filetype plugin indent on
|
|
|
|
|
|
2016-01-18 00:14:06 +00:00
|
|
|
|
set background=dark
|
2022-09-18 14:12:05 +00:00
|
|
|
|
" colorscheme Tomorrow-Night-Eighties
|
|
|
|
|
set background=dark
|
|
|
|
|
let g:everforest_background = 'hard'
|
|
|
|
|
" colorscheme everforest
|
|
|
|
|
colorscheme everblush
|
|
|
|
|
let g:airline_theme='everforest'
|
2014-07-03 15:01:48 +00:00
|
|
|
|
|
2013-02-21 21:51:21 +00:00
|
|
|
|
" Force hash comments to retain their indentation level.
|
|
|
|
|
inoremap # X#
|
|
|
|
|
|
2013-10-22 03:25:29 +00:00
|
|
|
|
" Configure airline
|
2013-11-06 15:53:50 +00:00
|
|
|
|
let g:airline#extensions#tabline#enabled = 1
|
2013-10-22 03:25:29 +00:00
|
|
|
|
let g:airline_left_sep=''
|
|
|
|
|
let g:airline_right_sep=''
|
|
|
|
|
|
2018-03-07 21:48:30 +00:00
|
|
|
|
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
|
2019-01-12 18:30:30 +00:00
|
|
|
|
let g:syntastic_yaml_checkers = ['yamllint']
|
2018-03-07 21:48:30 +00:00
|
|
|
|
|
2022-09-18 14:37:19 +00:00
|
|
|
|
function SetupSyntasticAvr()
|
|
|
|
|
let g:syntastic_c_compiler = "avr-gcc"
|
|
|
|
|
let g:syntastic_c_compiler_options = "-std=c99 -Wall -g -Os -mmcu=atmega328p -DF_CPU=16000000 -I ."
|
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
|
|
if filereadable(".avr")
|
|
|
|
|
autocmd FileType c call SetupSyntasticAvr()
|
|
|
|
|
endif
|
|
|
|
|
|
2012-09-08 02:33:24 +00:00
|
|
|
|
" If it exists, include user's local vim config
|
2012-09-27 20:21:25 +00:00
|
|
|
|
if filereadable(expand("~/.vimrc.local"))
|
|
|
|
|
source ~/.vimrc.local
|
|
|
|
|
endif
|