""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Style """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Editor Style set number " Show number column set nowrap " Don't wrap text set list " Display tabs and trailing space let &colorcolumn="80,150" " Show color columns " Color set termguicolors color rbdr " Tab Style (Always override with editorconfig) set tabstop=2 " 2 Spaces per tab set shiftwidth=2 " Spaces used in Autoindent set softtabstop=2 " Spaces used when soft tabbing set expandtab " Always use spaces """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Behavior """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Search Behavior set ignorecase " Ignore case when searching set smartcase " Unless we use both cases in search " Autocomplete Behavior set wildmode=list:longest,list:full " Autocomplete common matching string " first, and then the full match. " Folding Behavior set foldmethod=syntax " Use syntax highlight to define folds set foldnestmax=10 " Max 10 folds set foldlevelstart=99 " Start with all folds open " Relative Number Behavior autocmd FocusLost * :set norelativenumber autocmd InsertEnter * :set norelativenumber autocmd InsertLeave * :set relativenumber autocmd CursorMoved * :set relativenumber function! NumberToggle() if(&relativenumber == 1) set norelativenumber else set relativenumber endif endfunction nnoremap :call NumberToggle() " Move lines / blocks up and down using Ctrl + Shift nnoremap :m .+1== nnoremap :m .-2== inoremap :m .+1==gi inoremap :m .-2==gi vnoremap :m '>+1gv=gv vnoremap :m '<-2gv=gv """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " File Specific Behavior """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Makefiles au FileType make set noexpandtab " Makefiles need real tabs " SNES files au BufNewFile,BufRead *.asm,*.s set filetype=snes" " """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Local Overrides """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" if filereadable(expand("~/.init.local.vim")) source ~/.init.local.vim endif """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Plugin Specific Behavior """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " FZF set rtp+=$FZF_VIM_PATH " Load FZF vim plugin noremap :FZF let g:fzf_layout = { 'down': '40%' } let g:fzf_colors = \ { 'fg': ['fg', 'Normal'], \ 'bg': ['bg', 'Normal'], \ 'hl': ['fg', 'Comment'], \ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'], \ 'bg+': ['bg', 'CursorLine', 'CursorColumn'], \ 'hl+': ['fg', 'Statement'], \ 'info': ['fg', 'PreProc'], \ 'border': ['fg', 'Ignore'], \ 'prompt': ['fg', 'Conditional'], \ 'pointer': ['fg', 'Exception'], \ 'marker': ['fg', 'Keyword'], \ 'spinner': ['fg', 'Label'], \ 'header': ['fg', 'Comment'] } " Svelte Config let g:vim_svelte_plugin_use_typescript = 1 " Limelight / Goyo config let g:limelight_conceal_ctermfg = 'gray' let g:limelight_conceal_guifg = 'DarkGray' autocmd! User GoyoEnter Limelight autocmd! User GoyoLeave Limelight! nnoremap i :Limelight!!== inoremap i :Limelight!!==gi vnoremap i :Limelight!!gv=gv nnoremap g :Goyo== inoremap g :Goyo==gi vnoremap g :Goyogv=gv " Plug runtime plugins.vim