From 9531d1672afbf6978569624a900cf9f379c3f830 Mon Sep 17 00:00:00 2001 From: Salt Date: Tue, 5 Feb 2019 15:17:50 -0600 Subject: [PATCH] Vim, .profile: Lots of changes, like tablines and prefixes --- .gitmodules | 3 +++ .profile | 13 ++++++++----- .vim/bundle/tabline.vim | 1 + .vimrc | 16 ++++++++++++++-- 4 files changed, 26 insertions(+), 7 deletions(-) create mode 160000 .vim/bundle/tabline.vim diff --git a/.gitmodules b/.gitmodules index 03ac46cc..2ca12b43 100644 --- a/.gitmodules +++ b/.gitmodules @@ -40,3 +40,6 @@ [submodule ".local/share/dsk"] path = .local/share/dsk url = git@gitlab.com:rehashedsalt/dsk +[submodule ".vim/bundle/tabline.vim"] + path = .vim/bundle/tabline.vim + url = https://github.com/mkitt/tabline.vim diff --git a/.profile b/.profile index 7e875e72..1b2907ea 100755 --- a/.profile +++ b/.profile @@ -58,7 +58,10 @@ PATH="$desiredpath:$PATH" [ -f "/etc/profile.d/bash_completion.sh" ] && . "/etc/profile.d/bash_completion.sh" # Source ~/.functions, if it exists -[ -r "$HOME/.functions" ] && [ "$_baseshell" != "sh" ] && . "$HOME/.functions" +[ -r "$HOME/.functions" ] \ + && [ "$_baseshell" != "sh" ] \ + && [ "$_baseshell" != "dash" ] \ + && . "$HOME/.functions" # Define a require function has() { @@ -200,9 +203,9 @@ _ps1() { if [ "$SSH_CLIENT" ]; then prefix="${fg_bold}${fg_red}$(hostname)${r}${fg_red}:${r}${prefix}" fi - # Append a "restricted" prefix in rbash - if [ "$0" = "rbash" ]; then - prefix="${fg_bold}${fg_grey}rbash${r}:" + # Append "vim" in Vim + if [ -n "$VIM_TERMINAL" ]; then + prefix="${fg_bold}${fg_green}*${r}" fi # Change PWD color depending on the shell case $0 in @@ -239,7 +242,7 @@ case "$_baseshell" in # Don't do this on ZSH # I have a custom theme for that ;; - sh) + sh|dash) export PS1='\$ ' ;; *) diff --git a/.vim/bundle/tabline.vim b/.vim/bundle/tabline.vim new file mode 160000 index 00000000..69c9698a --- /dev/null +++ b/.vim/bundle/tabline.vim @@ -0,0 +1 @@ +Subproject commit 69c9698a3240860adaba93615f44778a9ab724b4 diff --git a/.vimrc b/.vimrc index 903f1060..ccbae999 100644 --- a/.vimrc +++ b/.vimrc @@ -1,7 +1,10 @@ execute pathogen#infect() -set background=dark -colorscheme solarized +" Theming +if $TERM != 'linux' + set background=dark + colorscheme solarized +endif syntax on filetype plugin indent on @@ -32,6 +35,15 @@ set autoread " Allow buffer switching without saving set hidden +" Split and tab configuration +nnoremap +nnoremap +nnoremap +nnoremap + +set splitbelow +set splitright + " Enable modelines set modeline set modelines=5