From 015b70f8e75fac8086226cbb9b82adc71bcd42fe Mon Sep 17 00:00:00 2001 From: Jordan Orelli Date: Mon, 29 May 2017 13:16:22 -0500 Subject: [PATCH] whitespace and installation tweaks --- .vimrc | 49 ++++++++++++++++++++++++++++--------------------- install.sh | 5 ++++- 2 files changed, 32 insertions(+), 22 deletions(-) diff --git a/.vimrc b/.vimrc index cf988cb..7884a05 100644 --- a/.vimrc +++ b/.vimrc @@ -37,11 +37,25 @@ call vundle#end() " required filetype plugin indent on " ---------------------------------------------------------------------------}}} +" Character Encoding --------------------------------------------------------{{{ +" sets the character encoding used inside of vim itself. does not change how +" files are written to disk. +set encoding=utf-8 + +if has("multi_byte") + " termencoding specifies what character encoding the keyboard produces and + " the display will understand + if &termencoding == "" + let &termencoding = &encoding + endif +endif +" ---------------------------------------------------------------------------}}} + " Whitespace ----------------------------------------------------------------{{{ " allow backspacing over line breaks set backspace=indent,eol,start -" copy indent form current line when starting a new line +" copy indent from current line when starting a new line set autoindent " automatically add an indent after block-opening symbols like { @@ -62,7 +76,12 @@ set expandtab set smarttab " set whitespace characters -set listchars=tab:>-,trail:.,extends:# +if has("multi_byte") + set listchars=tab:▸\ ,trail:·,precedes:←,extends:→ + let &showbreak='↪ ' +else + set listchars=tab:>-,trail:.,precedes:#,extends:# +endif " ---------------------------------------------------------------------------}}} " Search --------------------------------------------------------------------{{{ @@ -180,20 +199,6 @@ else endif " ---------------------------------------------------------------------------}}} -" Character Encoding --------------------------------------------------------{{{ -" sets the character encoding used inside of vim itself. does not change how -" files are written to disk. -set encoding=utf-8 - -if has("multi_byte") - " termencoding specifies what character encoding the keyboard produces and - " the display will understand - if &termencoding == "" - let &termencoding = &encoding - endif -endif -" ---------------------------------------------------------------------------}}} - " Status Line ---------------------------------------------------------------{{{ " always show the status line set laststatus=2 @@ -311,11 +316,13 @@ let g:ctrlp_user_command = [ " ---------------------------------------------------------------------------}}} " NERDTree ------------------------------------------------------------------{{{ -" fix windows arrows. This gets rid of the pretty arrows on other systems, -" will have to restore that properly. The default switching behavior is broken -" inside of msys2. -let g:NERDTreeDirArrowExpandable = '+' -let g:NERDTreeDirArrowCollapsible = '-' +if has("multi_byte") + let g:NERDTreeDirArrowExpandable = '▸' + let g:NERDTreeDirArrowCollapsible = '▾' +else + let g:NERDTreeDirArrowExpandable = '+' + let g:NERDTreeDirArrowCollapsible = '-' +endif " enable dir tree arrows let g:NERDTreeDirArrows = 1 diff --git a/install.sh b/install.sh index d12e37e..febcc1d 100755 --- a/install.sh +++ b/install.sh @@ -5,12 +5,15 @@ base_dir="$home/.dotfiles" backup_dir="$home/.dotfiles/backup" vim_plugins_dir="$home/.vim/bundle" vundle_dir="$vim_plugins_dir/Vundle.vim" + +# don't include all of .vim, it winds up re-downloading plugins if you do it +# that way. include=( .bash_profile .bashrc .screenrc .tmux.conf - .vim/ftplugin/*.vim + .vim/ftplugin .vimrc )