Improved shell environment: sane dotfiles backed by my daily work optimized for solarized theme
This is a set of opinioned dotfiles used by me in daily work and in production. The goal is to have robust, customizable and portable set of defaults for linux bash shell for daily work.
Tested on macOS and linux hosts.
Table of Contents
git clone https://github.com/denyskoch/ienv ~/.ienv && ~/.ienv/install.sh
You should also install Solarized color theme for your terminal. (ethanschoonover.com/solarized)
For faster and better fuzzy search results install ag the silver searcher:
brew install ag
You can edit and customize your .baschrc, .vimrc, .tmux.conf as usual. IENV is integrated gracefully (no symlinks, no file copies), so things should not break. Take a look at your .bashrc for example:
...
### IENV ###
[ -r ~/.ienv/entrypoint ] && source ~/.ienv/entrypoint
### VNEI ###
Since its just an include, you can simple add or override settings you like.
Simply switch terminal color theme e.g. solarized dark:
automatically cd to directory:
/work $ kitchen
cd -- kitchen
/work/kitchen $
auto correct wrong spelled directories
/work/demo $ ls
abc bar foo
/work/demo $ cd bra
/work/demo/bar $
search in bash history with arrow keys e.g.:
/work/demo/bar $ ssh<arrow up>
pw: generate strong password with help of openSSL
h: show history
hs: history search (i.e. history | grep -i)
..: go one directory up
...: go two directories up
....: go three directories up
dl: go to downloads folder i.e. cd ~/Downloads
*p: go to project directory i.e. cd ~/Projects
gp: go to GO workspace i.e. cd $GOPATH
ll: long list i.e. ls -ahl
ips: show current IPs
$ ips
Public: 95.208.248.59
Local: 192.168.0.164
Gateway: 192.168.0.1
push strategy is set to simple
default editor is vim
colors set to auto
gobal gitignore for annoying OS generated files:
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
__MACOSX
ehthumbs.db
Thumbs.db
Desktop.ini
*~
*.swp
*.swo
ctrl + j, ctrl + k, ctrl + h, ctrl + l for split movement
z to toggle fold under cursor
gd go to definition
J (shift + j) switch to next buffer
K (shift + k) switch to previous buffer
dark color theme (e.g. solarized-dark)
insert to your in your ~/.vimrc file:
set background=dark
you can simply toggle between last used directories:
/work/demo/foo $ cd /work/
/work $ cd -
/work/demo/foo $
/work/demo/foo $ cd -
/work $
cd without arguments return you back to $HOME
killall <name>
kill process by name (alternative to kill <pid>
)
Feel free to open a new issue on GitHub.
bash: shopt: autocd: invalid shell option name
bash: shopt: dirspell: invalid shell option name
bash: update_terminal_cwd: command not found
Since macOS is using a old version of bash, this errors will occur.
Bash v4+ is required, you can install it via brew brew install bash
(brew.sh)
If you use dark terminal theme, you need to add set background=dark
to your .vimrc