From e0a6b713baac1a688280ebc31d8fbc872a1fe70f Mon Sep 17 00:00:00 2001 From: natemaia Date: Sat, 14 Jul 2018 22:11:15 -0700 Subject: [PATCH] Update some scripts, chnages to vimrc --- home/.vimrc | 47 ++++++++++++++++++++++++++++++++-------------- home/bin/rofr.sh | 5 +++-- home/bin/toggle.sh | 12 +++++++++--- 3 files changed, 45 insertions(+), 19 deletions(-) diff --git a/home/.vimrc b/home/.vimrc index 91b4f7fc..e9919e22 100644 --- a/home/.vimrc +++ b/home/.vimrc @@ -3,6 +3,7 @@ " Arch defaults runtime! archlinux.vim +" additional settings set modeline " enable vim modelines set clipboard^=unnamedplus " system clipboard (requires +clipboard) set number " enable line numbers @@ -13,12 +14,15 @@ set softtabstop=4 " spaces to enter for each tab set shiftwidth=4 " amount of spaces for indentation set shortmess+=aAcIws " Hide or shorten certain messages +let g:netrw_altv = 1 +let g:netrw_liststyle = 3 +let g:netrw_browse_split = 3 + " ------ leader mapping ------ let g:mapleader = ',' map , - " ------ enable additional features ------ " enable mouse @@ -32,14 +36,19 @@ endif syntax enable if has('termguicolors') && $DISPLAY !=? '' && &t_Co == 256 - let g:jinx_colors = 'night' " night or day (shift-t to change on the fly) - " true color in the terminal - set termguicolors - colorscheme jinx + try + " true colors in the terminal + set termguicolors + colorscheme jinx + catch + set nocursorline + set notermguicolors + colorscheme evening + endtry - " fix true color in some terminals (nvim doesn't have this issue) + " fix true colors in some terminals (neovim doesn't seem to have this issue) if !has('nvim') && !($TERM =~? 'xterm' || &term =~? 'xterm') let $TERM = 'xterm-256color' let &term = 'xterm-256color' @@ -51,16 +60,26 @@ else endif " change cursor shape for different editing modes (nvim does this by default) -if !has('nvim') && exists('$TMUX') - let &t_SI = "\Ptmux;\\e[5 q\\\" - let &t_SR = "\Ptmux;\\e[4 q\\\" - let &t_EI = "\Ptmux;\\e[2 q\\\" -elseif !has('nvim') - let &t_SI = "\e[6 q" - let &t_SR = "\e[4 q" - let &t_EI = "\e[2 q" +if !has('nvim') + if exists('$TMUX') + let &t_SI = "\Ptmux;\\e[5 q\\\" + let &t_SR = "\Ptmux;\\e[4 q\\\" + let &t_EI = "\Ptmux;\\e[2 q\\\" + else + let &t_SI = "\e[6 q" + let &t_SR = "\e[4 q" + let &t_EI = "\e[2 q" + endif endif +set linebreak +set breakindent +set list listchars=tab:>>,trail:~ + +if has('multi_byte') + set listchars=tab:»»,trail:• + set fillchars=vert:┃ showbreak=↪ +endif " ------ basic maps ------ diff --git a/home/bin/rofr.sh b/home/bin/rofr.sh index 85dc11c4..c69ad35b 100755 --- a/home/bin/rofr.sh +++ b/home/bin/rofr.sh @@ -5,9 +5,10 @@ VER="0.3" usage() { cat <<- EOF -USAGE: $NAME [OPTIONS] -OPTIONS: + USAGE: $NAME [OPTIONS] + + OPTIONS: -h,--help Display this message diff --git a/home/bin/toggle.sh b/home/bin/toggle.sh index 2abd9fe9..a5a3f00d 100755 --- a/home/bin/toggle.sh +++ b/home/bin/toggle.sh @@ -1,23 +1,29 @@ #!/usr/bin/env bash Name=$(basename "$0") -Version="0.2" +Version="0.3" _usage() { cat <