Vim, .profile: Lots of changes, like tablines and prefixes

This commit is contained in:
Salt 2019-02-05 15:17:50 -06:00
parent 76465119f7
commit 9531d1672a
4 changed files with 26 additions and 7 deletions

3
.gitmodules vendored
View File

@ -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

View File

@ -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='\$ '
;;
*)

@ -0,0 +1 @@
Subproject commit 69c9698a3240860adaba93615f44778a9ab724b4

12
.vimrc
View File

@ -1,7 +1,10 @@
execute pathogen#infect()
" 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 <C-H> <C-W><C-H>
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
set splitbelow
set splitright
" Enable modelines
set modeline
set modelines=5