Skip to content
Snippets Groups Projects
Commit 6d35a5c9 authored by Sven Mäder's avatar Sven Mäder :speech_balloon:
Browse files

Add profile schneich

parent e1c9b060
No related branches found
No related tags found
No related merge requests found
" load debian settings from $VIMRUNTIME/debian.vim
runtime! debian.vim
" insert custom path to &runtimepath
let &runtimepath=$ENVRCD_VIM_PATH.','.&runtimepath
set mouse=r
set nocompatible
" nur Leerzeichen nutzen
set expandtab
" 4 Leerzeichen werden von einem Tab gemacht
set tabstop=4
set shiftwidth=4
set softtabstop=4
"set textwidth=79
if has("syntax")
syntax on
endif
#!/bin/bash
# load the defaults
source_profile_if_exists "default"
# set the path to this profile
export ENVRCD_PROFILE_PATH="${ENVRCD_PATH}/profile/schneich"
#!/bin/bash
# --- vim ---
export EDITOR=vim
# source vimrc from cutom location during init
export VIMINIT="source ${ENVRCD_PROFILE_PATH}/.vimrc"
# MYVIMRC: is normally set to the location of the first found vimrc during init
# but when we use VIMINIT to source vimrc, we need to set it manually
export MYVIMRC="${ENVRCD_PROFILE_PATH}/.vimrc"
# profile specific `.vim` directory path for use in `.vimrc` in envrcd
export ENVRCD_VIM_PATH="${ENVRCD_PROFILE_PATH}/.vim"
#!/bin/bash
#source_if_exists "${ENVRCD_PATH}/profile/_assets/functions/truncate_pwd"
source_if_exists "${ENVRCD_PATH}/profile/_assets/functions/git_status"
function envrcd_prompt_schneich {
# truncate the directory path if it exceeds a certain length. arguments: spacefree pwdminlen
#envrcd_function_truncate_pwd
if [ -z "${ENVRCD_COLOR_OFF}" ]; then
local NO="\[\e[0m\]" # NORMAL FONT
local BO="\[\e[1m\]" # BOLD FONT
local LI="\[\e[2m\]" # LIGHT FONT
local BL="\[\e[30m\]" # BLACK
local RE="\[\e[31m\]" # RED
local GR="\[\e[32m\]" # GREEN
local YE="\[\e[33m\]" # YELLOW
local BL="\[\e[34m\]" # BLUE
local MA="\[\e[35m\]" # MAGENTA
local CY="\[\e[36m\]" # CYAN
local WH="\[\e[37m\]" # WHITE
if [ -z "${ENVRCD_INVENTORY}" ] || [ "${ENVRCD_INVENTORY}" = "production" ]; then
# set root color to red (production)
local RC=${RE}
else
# set root color to yellow (testing)
local RC=${YE}
fi
fi
# display git branch and dirty status. arguments: clean, dirty, delimiter, pre_clean, pre_dirty, post, master
envrcd_function_git_status "+" "±" "" "(" "(" ")" "master"
# Check for python virtualenv
local VENV="${VIRTUAL_ENV##*/}"
VENV="${VENV:+(${VENV})}"
# Check for chroot
local CHROOT="${debian_chroot:+($debian_chroot)}"
local ENVRCD_PS1_ROOT="[ ${BO}${RC}\u@\h:\w/ ${NO}${GITSTAT}${VENV}${CHROOT}${NO} >\n# "
local ENVRCD_PS1_USER="[ ${BO}${GR}\u@\h:\w/ ${NO}${GITSTAT}${VENV}${CHROOT}${NO} >\n$ "
local ENVRCD_PS1_SUDO="[ ${BO}${RC}\u@\h:\w/ ${NO}${GITSTAT}${VENV}${CHROOT}${NO} >\n$ "
if [ -z "${ENVRCD_UID_NUM}" ]; then
export PS1="${ENVRCD_PS1_ROOT}"
else
export PS1="${ENVRCD_PS1_USER}"
fi
export SUDO_PS1="${ENVRCD_PS1_SUDO}"
}
PROMPT_COMMAND="${ENVRCD_NAME}_prompt_schneich"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment