From f2a3a9591292c3aeee04764196834d56c6ef9a66 Mon Sep 17 00:00:00 2001 From: Bill Nibz Date: Tue, 15 Aug 2017 09:41:19 -0400 Subject: [PATCH] Fidgeting --- vim/vimrc | 37 +++++++++++++++++++++---------------- vim/vimrc-plugins | 17 +++-------------- 2 files changed, 24 insertions(+), 30 deletions(-) diff --git a/vim/vimrc b/vim/vimrc index 2186987..e11ab91 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -8,36 +8,38 @@ set nocompatible " Be IMproved (https://goo.gl/2RiJoo) syntax on " Syntax hilighting filetype plugin indent on " Recognize filetype, indent, plugin files -set t_Co=256 " Set number of colors (256) set encoding=utf-8 " Character encoding set autoread " Auto-reload files changed outside Vim -set undofile " Enable persistent undo -set showcmd " Shows you which commands you're typing -set number " Enable line numbers -set scrolloff=5 " 5 lines of scroll buffer space +set hidden " Allow for un-saved buffers set autoindent " Enable auto-indentation set expandtab " Use spaces instead of tab characters set tabstop=4 " How many spaces a tab is set shiftwidth=4 " How many spaces to shift set softtabstop=4 " How many spaces to use when editing + +set number " Enable line numbers +set wrap " Wrap text set textwidth=80 " How long a line is set winwidth=90 " Minimum width of a window -set wrap " Wrap text +set scrolloff=5 " 5 lines of scroll buffer space -set foldmethod=syntax " Enable folding on a syntax level +set foldmethod=indent " Enable folding on a syntax level +set foldlevelstart=99 " Don't start with sections folded set wildmenu " Enable wildmenu set wildmode:longest:full,full " Configure wildmenu set ignorecase smartcase " Search: ignore case, unless case matters set incsearch " Zoom to search results as I type -set hlsearch " Hilight search results +set nohlsearch " Don't highlight search by default let g:netrw_liststyle=3 " Netrw Tree list style augroup ruby_settings " Settings for Ruby and Ruby-like langs autocmd! - autocmd FileType ruby,eruby,yaml set sw=2 sts=2 + autocmd FileType ruby,eruby,yaml + \ setlocal shiftwidth=2 + \ softtabstop=2 augroup END augroup spellcheckr " Spelling, for some files... @@ -47,7 +49,8 @@ augroup END augroup lintr " Simple linting, based on :make! autocmd! - autocmd BufWritePost *.rb silent make! | silent redraw! + autocmd BufWritePost *.rb,*.sh + \ silent make! | silent redraw! autocmd QuickFixCmdPost [^l]* cwindow augroup END " ============================================================================== @@ -55,23 +58,25 @@ augroup END " ============================================================================== set laststatus=2 " Enable the statusline set statusline= " Initialize it -set statusline+=%m%1*%r%0*%h " Modified, RO, Help flags +set statusline+=%3*%m%1*%r%0* " Modified, RO, Help flags set statusline+=%2*%{&spell?'[SPELL]':''} " Spell flag -set statusline+=%#StatusLine# +set statusline+=%3* " Show the Fugitive-provided status line, if Fugitive is installed set statusline+=%{exists('g:loaded_fugitive')?fugitive#statusline():''} -set statusline+=%#Pmenu# " Color change (see :hi) +set statusline+=%4* " Color change (see :hi) set statusline+=\ %F " Full-path to current buffer set statusline+=%= " Switch to right-side set statusline+=%y\ " Filetype -set statusline+=%#StatusLine# " Color change (see :hi) +set statusline+=%3* " Color change (see :hi) set statusline+=\|%4l\:%2c\| " Line and column augroup user_stl_colors autocmd! autocmd ColorScheme * \ hi User1 term=bold cterm=bold ctermfg=167 ctermbg=239 | - \ hi User2 term=bold cterm=bold ctermfg=111 ctermbg=239 + \ hi User2 term=bold cterm=bold ctermfg=111 ctermbg=239 | + \ hi User3 term=bold cterm=bold ctermfg=255 ctermbg=239 | + \ hi User4 ctermfg=255 ctermbg=0 augroup END " ============================================================================== " Mappings @@ -94,7 +99,7 @@ command! -nargs=1 -complete=help H :tabnew | :set buftype=help | :h " Simple mapping to dotfiles directory (f = current tab; F = new tab) nnoremap f :edit ~/.dotfiles/ nnoremap F :tabnew ~/.dotfiles/ -" Emulatae vinegar.vim +" Emulate vinegar.vim nnoremap - :silent edit =empty(expand('%')) ? '.' : expand('%:p:h') " ============================================================================== " Plugins diff --git a/vim/vimrc-plugins b/vim/vimrc-plugins index 761a144..7c0f163 100644 --- a/vim/vimrc-plugins +++ b/vim/vimrc-plugins @@ -16,16 +16,14 @@ call plug#begin('~/.vim/bundle') Plug 'tpope/vim-surround' Plug 'tpope/vim-unimpaired' Plug 'tpope/vim-commentary' + Plug 'tpope/vim-endwise' Plug 'vimwiki/vimwiki' Plug 'ajh17/VimCompletesMe' - Plug 'ludovicchabant/vim-gutentags' - " Ruby Related - Plug 'tpope/vim-endwise' - Plug 'vim-ruby/vim-ruby' + Plug 'sheerun/vim-polyglot' + "Plug 'ludovicchabant/vim-gutentags' " Appearance Related Plug 'junegunn/goyo.vim' " Syntax Related - Plug 'scrooloose/syntastic' Plug 'tmux-plugins/vim-tmux' call plug#end() @@ -33,15 +31,6 @@ call plug#end() " Plugin Configuration " ============================================================================== -" Syntastic configs -let g:syntastic_stl_format = "%W{ [•%w] }%E{ [!%e] }" -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 = 1 - -let g:syntastic_sh_checkers = [ 'shellcheck', 'sh' ] - " Vimwiki Configs let g:vimwiki_list = [{'path': '~/Workbench/vimwiki/', 'auto_tags': 1}] "" Insert my journal template, and the current date