From 98f53b337d7a7318ee159694d24405a57476209e Mon Sep 17 00:00:00 2001 From: Claude Becker <becker@phys.ethz.ch> Date: Thu, 29 Sep 2022 15:13:09 +0200 Subject: [PATCH] rm obsolete profiles --- profile/schmid/.vimrc | 111 --------------------------- profile/schmid/envrcd.d/00-config | 7 -- profile/schmid/envrcd.d/10-envvars | 14 ---- profile/schmid/envrcd.d/30-prompt | 60 --------------- profile/schneich/.vimrc | 19 ----- profile/schneich/envrcd.d/00-config | 7 -- profile/schneich/envrcd.d/10-envvars | 11 --- profile/schneich/envrcd.d/30-prompt | 55 ------------- 8 files changed, 284 deletions(-) delete mode 100644 profile/schmid/.vimrc delete mode 100644 profile/schmid/envrcd.d/00-config delete mode 100644 profile/schmid/envrcd.d/10-envvars delete mode 100644 profile/schmid/envrcd.d/30-prompt delete mode 100644 profile/schneich/.vimrc delete mode 100644 profile/schneich/envrcd.d/00-config delete mode 100644 profile/schneich/envrcd.d/10-envvars delete mode 100644 profile/schneich/envrcd.d/30-prompt diff --git a/profile/schmid/.vimrc b/profile/schmid/.vimrc deleted file mode 100644 index 1e23217..0000000 --- a/profile/schmid/.vimrc +++ /dev/null @@ -1,111 +0,0 @@ -" --- general settings ---{{{ -" load debian settings from $VIMRUNTIME/debian.vim -runtime! debian.vim - -" insert custom path to &runtimepath -let &runtimepath=$ENVRCD_VIM_PATH.','.&runtimepath - -syntax on "enable syntax highlighting -set nocompatible "use vim defaults instead of 100% vi compatibility -set encoding=utf8 "default file encoding -set ttyfast "fast terminal -set mouse= "disable mouse mode -filetype plugin on "enable filetype plugins -filetype indent on "automatic indentation according to filetype -"set autoindent "preserve indentation on new line -set backspace=eol,start,indent "allow backspace at end of line etc -set showmatch "show matching parenthesis -"set linebreak "break line at end of a word -"set textwidth=0 "don't break text after a certain length -set tabstop=4 "show existing tab with 4 spaces width -set shiftwidth=4 "when indenting with '>', use 4 spaces width -set softtabstop=4 "use 4 spaces per tab when editing -set expandtab "when pressing tab, insert 4 spaces -set smarttab "use sw at beginning of line, ts otherwise -set incsearch "incremental search -set wrapscan "continue search from top when reaching the end -set ignorecase "search is not case-sensitive -set smartcase "search case-sensitive for uppercase patterns -set hlsearch "search pattern highlighting -set magic "enable extended regexes -set spellsuggest=7 "show 7 suggestions when spellchecking -set nopaste "fix middlemouse button paste (seems default setting) -set history=999 "increase history (default = 20) -set undolevels=999 "more undo (default=100) -set nobackup "toggle keeping ~ backups of files when saving -set swapfile "use swp file while a file is open -set modeline "scan first/last lines of file for vim commands -set modelines=5 "number of lines checked for modelines -set display=lastline "show beginning of broken line at bottom of window instead of displaying @ -"set clipboard=unnamed "make all operations such as yy, dd, p work with the clipboard -set wildmenu "show matches for command-line completion -set wildmode=longest:full,full "define how tab completion proceeds on partial match -set wildignore+=*.o,*.pdf "Let tab completion ignore certain file types -set fillchars=fold:- - -" temporary workaround for jessie's old vim version -if v:version >704 || v:version==704 && has('patch710') - set listchars=eol:¬,tab:>-,trail:~,space:· "define replacement for invisible characters (set invlist) -endif - -" Disable auto-comment after breaking lines with formatoptions -au FileType * setl fo-=c fo-=r fo-=o -"}}} - -" --- functions ---{{{ -" --- map key to toggle opt --- -function MapToggle(key, opt) - let cmd = ':set '.a:opt.'! \| set '.a:opt."?\<CR>" - exec 'nnoremap '.a:key.' '.cmd - exec 'inoremap '.a:key." \<C-O>".cmd -endfunction -command -nargs=+ MapToggle call MapToggle(<f-args>) - -" --- toggle mouse=i on/off --- -function ToggleMouse() - if (&mouse == 'i') || (&mouse == 'a') - set mouse= - else - set mouse=i - endif -endfunc - -" --- Clean trailing spaces --- -function! CleanSpaces() - %s/\s\+$//e -endfunction -"}}} - -" --- keyboard mappings ---{{{ -" --- F key toggles --- -" toggle paste mode (normal/insert) -MapToggle <F2> paste -set pastetoggle=<F2> -" toggle mouse mode (normal/insert) -nnoremap <F3> :call ToggleMouse()<CR> -inoremap <F3> <C-O>:call ToggleMouse()<CR> -" toggle list mode (normal/insert) -MapToggle <F4> list - -" --- normal mappings --- -" toggle paste mode -MapToggle <Leader>p paste -" set mouse modes -nnoremap <Leader>m :set mouse=<CR> -nnoremap <Leader>mi :set mouse=i<CR> -nnoremap <Leader>ma :set mouse=a<CR> -" toggle list of invisible characters -MapToggle <Leader>w list -" remap space to fold/unfold -map <space> za -" remap \s to toggle spellchecking -map <Leader>s :set invspell<CR> -" remap \n to toggle display of line numbers -map <Leader>n :set invnu<CR> -" remap \h to stop hlsearch until next search -map <Leader>h :noh<CR> -"}}} - -" --- vim modeline ---{{{ -" vim: set foldmethod=marker: -"}}} diff --git a/profile/schmid/envrcd.d/00-config b/profile/schmid/envrcd.d/00-config deleted file mode 100644 index 17d5e36..0000000 --- a/profile/schmid/envrcd.d/00-config +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -# load the defaults -source_profile_if_exists "default" - -# set the path to this profile -export ENVRCD_PROFILE_PATH="${ENVRCD_PATH}/profile/schmid" diff --git a/profile/schmid/envrcd.d/10-envvars b/profile/schmid/envrcd.d/10-envvars deleted file mode 100644 index 5919b36..0000000 --- a/profile/schmid/envrcd.d/10-envvars +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -# --- path --- -export PATH=~/bin:${ENVRCD_PROFILE_PATH}/bin:${PATH}:/opt/BaNG - -# --- 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" diff --git a/profile/schmid/envrcd.d/30-prompt b/profile/schmid/envrcd.d/30-prompt deleted file mode 100644 index dd3f649..0000000 --- a/profile/schmid/envrcd.d/30-prompt +++ /dev/null @@ -1,60 +0,0 @@ -#!/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_schmid { - # 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 - if [ "${HOSTNAME}" == "phd-bkp-gw" ]; then - # set root color to yellow (for this host) - local RC=${YE} - else - # set root color to red (production) - local RC=${RE} - fi - 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 "${GR}${GR}" "${YE}±${YE}" "" "${GR}[" "${YE}[" "]${NO}${YE}" "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}\h${NO}:${BO}${BL}${TRUNCPWD}${NO}${YE}${GITSTAT}${VENV}${CHROOT}${NO}# " - local ENVRCD_PS1_USER="${BO}${GR}\u@\h${NO}:${BO}${BL}${TRUNCPWD}${NO}${YE}${GITSTAT}${VENV}${CHROOT}${NO}$ " - local ENVRCD_PS1_SUDO="${BO}${RC}\u@\h${NO}:${BO}${BL}${TRUNCPWD}${NO}${YE}${GITSTAT}${VENV}${CHROOT}${NO}$ " - - 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_schmid" diff --git a/profile/schneich/.vimrc b/profile/schneich/.vimrc deleted file mode 100644 index b4ecab5..0000000 --- a/profile/schneich/.vimrc +++ /dev/null @@ -1,19 +0,0 @@ -" 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 diff --git a/profile/schneich/envrcd.d/00-config b/profile/schneich/envrcd.d/00-config deleted file mode 100644 index d569854..0000000 --- a/profile/schneich/envrcd.d/00-config +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -# load the defaults -source_profile_if_exists "default" - -# set the path to this profile -export ENVRCD_PROFILE_PATH="${ENVRCD_PATH}/profile/schneich" diff --git a/profile/schneich/envrcd.d/10-envvars b/profile/schneich/envrcd.d/10-envvars deleted file mode 100644 index be24fb8..0000000 --- a/profile/schneich/envrcd.d/10-envvars +++ /dev/null @@ -1,11 +0,0 @@ -#!/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" diff --git a/profile/schneich/envrcd.d/30-prompt b/profile/schneich/envrcd.d/30-prompt deleted file mode 100644 index 47a4637..0000000 --- a/profile/schneich/envrcd.d/30-prompt +++ /dev/null @@ -1,55 +0,0 @@ -#!/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" -- GitLab