Last active
May 27, 2025 08:24
-
-
Save bezborodow/51cb712c1f8d454d506a to your computer and use it in GitHub Desktop.
Damo's UNIX Development Environment Preferences
This file contains hidden or 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 | |
alias rbtags='ctags -R --languages=ruby --exclude=.git --exclude=log . $(bundle list --paths)' | |
alias pytags='ctags -R --languages=python' | |
# 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 --accept-nth 1 < .index) | |
else | |
dir=$(fzf --walker=dir) | |
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 | |
# Local binaries | |
PATH=$PATH:$HOME/local/bin | |
# PostgreSQL | |
export PAGER="less -S" | |
# Python | |
export PYTHONPYCACHEPREFIX=/tmp/pycache | |
This file contains hidden or 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@ | |
# Don't retain output after quitting vim/less/etc | |
altscreen on | |
# More scrollback | |
scrollback 100000 |
This file contains hidden or 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 hidden or 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 | |
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim' | |
if empty(glob(data_dir . '/autoload/plug.vim')) | |
silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' | |
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC | |
endif | |
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>' | |
let $FZF_DEFAULT_COMMAND = 'ag -g ""' | |
nmap <C-P> :FZF<CR> | |
map <F1> <Nop> | |
imap <F1> <Nop> |
This file contains hidden or 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
Host * | |
ControlPath ~/.ssh/_ctrlmasters/%r@%h:%p | |
ControlMaster auto | |
ControlPersist 1m |
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
Emacs keybindings on the desktop:
gsettings set org.gnome.desktop.interface gtk-key-theme "Emacs"