Last active
March 7, 2024 13:36
-
-
Save bezborodow/51cb712c1f8d454d506a to your computer and use it in GitHub Desktop.
Damo's UNIX Development Environment Preferences
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Bash prompt with colour-coded exit status | |
PS1="\e[0;36m\]\h \`if [ \$? = 0 ]; then echo '\e[01;32m\]\w\e[00m\]\$ '; else echo '\e[01;31m\]\w\e[00m\]\$ '; fi\`" | |
# Or for local machine: | |
# PS1="\e[0;46m\]\h\e[00m\] \`if [ \$? = 0 ]; then echo '\e[01;32m\]\w\e[00m\]\$ '; else echo '\e[01;31m\]\w\e[00m\]\$ '; fi\`"; | |
# Ctags for Ruby | |
alias rtags='ctags -R --languages=ruby --exclude=.git --exclude=log . $(bundle list --paths)' | |
# Ctags for PHP | |
# https://github.com/shawncplus/phpcomplete.vim/wiki/Patched-ctags | |
alias phptags='ctags -R --fields=+aimS --languages=php' | |
# Git shortcuts | |
alias gg='git grep -n' | |
alias gp='git push' | |
alias cg='cd $(git rev-parse --show-toplevel)' # https://blogboard.io/blog/knowledge/cd-to-git-root/ | |
alias smd='pwd > $HOME/.config/cm-maindir' | |
alias cm='cd $(< $HOME/.config/cm-maindir)' | |
alias inst='sudo make install' # except on production servers!! | |
function lsi { | |
if [ -f ".index" ]; then | |
dir=$(fzf < .index | cut -f1 -d\ ) | |
else | |
dir=$(find . -maxdepth 1 -type d | fzf) | |
fi | |
if [ ! -z $dir ]; then | |
if [ -d $dir ]; then | |
cd $dir | |
pwd | |
fi | |
fi | |
} | |
alias tree='tree --gitignore' | |
alias ls='ls --color=auto' | |
alias grep='grep --color=auto' | |
# History size | |
export HISTFILESIZE=100000 | |
export HISTSIZE=10000 | |
HISTCONTROL=ignorespace | |
# `ls` colors for Mac | |
export CLICOLOR=1 | |
export LSCOLORS=ExFxCxDxBxegedabagacad | |
export LESS=--raw | |
# Octave | |
alias k="octave-cli -q" | |
# Arduino | |
alias a="arduino-cli" | |
# Local binaries | |
PATH=$PATH:$HOME/local/bin | |
# Homebrew | |
PATH=$PATH:/home/linuxbrew/.linuxbrew/bin | |
# Arduino | |
PATH=$PATH:$HOME/.config/composer/vendor/bin | |
# PostgreSQL | |
export PAGER="less -S" | |
# Python | |
export PYTHONPYCACHEPREFIX=/tmp/pycache | |
# Gaming cursor. | |
alias cursorlg="echo -e '+' |osd_cat -p middle -A center -d 0 -f '-*-helvetica-*-r-*-*-26-*-*-*-*-*-*-*' -O 0 -c '#f00' -o -65 -i 1" | |
alias cursorsm="echo -e '+' |osd_cat -p middle -A center -d 0 -f '-*-helvetica-*-r-*-*-11-*-*-*-*-*-*-*' -O 0 -c '#0f0' -o -27 -i 1" | |
alias cursor="echo -e '+' |osd_cat -p middle -A center -d 0 -f '-*-helvetica-*-r-*-*-11-*-*-*-*-*-*-*' -O 0 -c '#fff' -o -27 -i 1" | |
alias cursoroff="pkill osd_cat" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# example user config (see "hg help config" for more info) | |
[ui] | |
# name and email, e.g. | |
# username = Jane Doe <jdoe@example.com> | |
username = Damien Bezborodov <##########> | |
#merge = internal:merge | |
merge = vimdiff | |
[extensions] | |
# uncomment these lines to enable some popular extensions | |
# (see "hg help extensions" for more info) | |
# | |
# pager = | |
# progress = | |
color = | |
rebase = | |
shelve = | |
[merge-tools] | |
vimdiff.executable = vimdiff | |
vimdiff.args = -f -d $output -M $local $base $other -c "wincmd J" -c "set modifiable" -c "set write" | |
vimdiff.premerge = keep |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hardstatus alwayslastline "%{b kw}%H %{r}%1` %{w}| %{g}%l %{w}| %{-b kw}%u %-Lw%{= rW}%50> %n%f %t %{-}%+Lw%<" | |
termcapinfo xterm* ti@:te@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set line-graphics = utf-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax on | |
set tabstop=4 | |
set shiftwidth=4 | |
set expandtab | |
set autoindent | |
set smartindent | |
set ruler | |
set backspace=indent,eol,start | |
set hlsearch | |
set number | |
set mouse=n | |
filetype plugin on | |
filetype indent on | |
autocmd BufNewFile,BufRead Gemfile set filetype=ruby | |
autocmd FileType ruby setlocal tabstop=2 shiftwidth=2 | |
autocmd FileType eruby setlocal tabstop=2 shiftwidth=2 | |
autocmd FileType javascript setlocal tabstop=2 shiftwidth=2 | |
call plug#begin() | |
Plug 'mattn/emmet-vim' | |
Plug 'lervag/vimtex' | |
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } | |
Plug 'junegunn/fzf.vim' | |
call plug#end() | |
let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard'] | |
let g:vimtex_include_search_enabled = 0 | |
let g:user_emmet_expandabbr_key = '<c-e>' | |
nmap <C-P> :FZF<CR> | |
let $FZF_DEFAULT_COMMAND = 'ag -g ""' | |
map <F1> <Nop> | |
imap <F1> <Nop> |
.bash_profile
:
tmux
if command -v tmux &> /dev/null && [ -n "$PS1" ] && [[ ! "$TERM" =~ screen ]] && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ]; then
exec tmux
fi
https://unix.stackexchange.com/questions/43601/how-can-i-set-my-default-shell-to-start-up-tmux
screen
if [ -z "$STY" ]; then
screen -DRUq
fi
Emacs keybindings on the desktop:
gsettings set org.gnome.desktop.interface gtk-key-theme "Emacs"
OH GOD NO MORE NANO PLEASE NO MORE NOOBS DIE DIE DIE
sudo dnf remove -y nano-default-editor nano
sudo dnf install -y vim-default-editor
# Alright... if you slice it thin, then it tastes more tender!
Defaults:dbezborodov timestamp_timeout=720
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/mattn/emmet-vim
https://github.com/lervag/vimtex
https://github.com/junegunn/fzf.vim
No longer used: