A collection of dotfiles for developers using macOS and Linux.
Screenshot captured in iTerm2 with Vanity Dark
Profile
Warning: Use at your own risk!
-
You can clone the repository wherever you want, and run the bootstrap script.
git clone https://github.com/dongminkim/dotfiles.git ~/.dotfiles && ~/.dotfiles/bootstrap.sh
-
You may be asked your password to do
sudo
once or twice. -
And after oh-my-zsh installed, in order to continue to the next steps, you should type
exit
in oh-my-zsh interactive shell prompt. -
When the bootstrap script finishes, you can see the instructions how to load iTerm2 profiles.
-
Quit and restart iTerm2.
That's it!
- OS Specific
- Terminal & Shell
- zsh
- tmux - a terminal multiplexer
- Vim - the editor
- Languages
- fd - an alternative to
find
- fzf - a general-purpose command-line fuzzy finder
- will be installed via Homebrew
- FYI, you may want to take a look at fzf Examples
- fasd - offers quick access to files and directories for POSIX shells
- ripgrep (rg) - a line-oriented search tool that recursively searches the current directory for a regex pattern
- bat - a cat clone with syntax highlighting and git integration
- diff-so-fancy - makes diff output more humal readable
- difftastic - a structural diff tool that compares files based on their syntax
- tldr - a collection of community-maintained help pages for command-line tools
- readline - provides a set of functions for use by applications that allow users to edit command lines as they are typed in
- dotfiles
._shrc
(for both zsh and bash),.zshrc
,.bashrc
,.profile
,.inputrc
.vimrc
(my old.vimrc
has been rewritten with that of timss/vimconf).tmux.conf
.screenrc
- Vim
- junegunn/vim-plug - a vim plugin manager
- colorschemes
- status line
- mhinz/vim-startify - a fancy start screen
- tpope/vim-unimpaired - pairs of handy bracket mappings, (more...)
- tpope/vim-surround - provides mappings to easily delete, change and add surroundings in pairs
- junegunn/vim-peekaboo - extends
"
and@
in normal mode and<CTRL-R>
in insert mode so you can see the contents of the registers - mbbill/undotree - visualizes undo history,
:UndotreeToggle
,,tU
- Git inside Vim
- tpope/vim-fugitive -
:Git
- tpope/vim-rhubarb -
:GBrowse
to open GitHub URLs - junegunn/gv.vim - a git commit browser,
:GV
- tpope/vim-fugitive -
- Gist inside Vim
- mattn/webapi-vim
- mattn/gist-vim -
:Gist
,:Gist -l dongminkim
- mhinz/vim-signify - uses the sign column to indicate added, modified and removed lines in a file that is managed by a version control system (VCS)
- scrooloose/syntastic - a syntax checking plugin
- scrooloose/nerdtree - a file system explorer,
:NERDTreeToggle
,,t.
- majutsushi/tagbar - a class outline viewer,
:TagbarToggle
,,tT
- junegunn/fzf.vim - a fzf integration plugin,
:Buffers
,:GFiles
,:Windows
,:Rg [PATTERN]
- Completion
- neoclide/coc.nvim - supports snippet and additional text editing, (coc extensions)
- with
coc-tabnine
extension
- with
- wellle/tmux-complete.vim - a plugin for insert mode completion of words in adjacent tmux panes
- neoclide/coc.nvim - supports snippet and additional text editing, (coc extensions)
- Additional Language Supports
- sheerun/vim-polyglot - a collection of language packs
- plasticboy/vim-markdown - markdown
- mattn/emmet-vim - html template
- tpope/vim-characterize - reveals a character representation in decimal, octal, and hex,
ga
🔍
- Shell rc files with
.os.$(uname -s)
prefix will be loaded.os.$(uname -s)._shrc
(for both zsh and bash),.os.$(uname -s).zshrc
,.os.$(uname -s).bashrc
- e.g.
.os.Darwin.zshrc
will be loaded in Mac OS X zsh
- e.g.
- Shell rc files with
.host.$(uname -n)
prefix will be loaded.host.$(uname -n)._shrc
(for both zsh and bash),.host.$(uname -n).zshrc
,.host.$(uname -n).bashrc
- e.g.
.host.github.com.bashrc
will be loaded in bash at host github.com
- e.g.
- Shell rc files with
.local
prefix will be loaded.local._shrc
(for both zsh and bash),.local.zshrc
,.local.bashrc
- Screen rc files with
.host.$(uname -n)
prefix will be loaded.host.$(uname -n).screenrc
- e.g.
.host.github.com.screenrc
will be used when run screen at host github.com
- e.g.
- Vim rc files with
.local
prefix will be loaded.local.plugins.vimrc
will be loaded in Vundle's loading step.local.pre.vimrc
will be loaded just before the main .vimrc settings and just after vim-plug loading step.local.vimrc
will be loaded after the main .vimrc settings
tmux
key bindings are heavily modified to be similar with GNU screen
and vim
.
First of all, prefix changed from C-b
to C-a
.
Here are all the modified key bindings:
key bindings | action |
---|---|
a |
send-prefix |
C-r |
reload conf |
* |
list-clients |
C-l |
refresh-client |
d , C-d |
detach |
M-s |
rename-session |
M-q |
kill-session |
c , C-c |
new-window |
A |
rename-window |
C-a |
last-window |
C-n |
next-window |
p , C-p , BSpace |
previous-window |
w , C-w , " , Space |
choose-window |
C-k |
kill-window |
S |
split-window horizontally |
V |
split-window vertically |
T |
break-pane into new window |
_ , Enter |
resize-pane to zoom in & out |
Tab , BTab |
select-pane next, previous |
h , j , k , l |
select-pane left, down, up, right |
M-h , M-j , M-k , M-l |
resize-pane left, down, up, right |
L |
next-layout |
C-x |
kill-pane |
R |
respawn-pane |
(copy mode) Space , v |
begin-selection |
(copy mode) Enter , y |
copy-selection |
And I made tmx
shell function that does run the user-defined startup script, attach to existing session or duplicate and open duplicated session.
tmx -l
tmx ls
- equivalent to
tmux ls
tmx foo
- if there is a tmux session with name
foo
,- attach to the existing
foo
session with detaching the old ttys
- attach to the existing
- if there is no tmux session with name
foo
,- if there is a runnable function or command
tmx-foo
,- run
tmx-foo foo
that might make a tmux session with namefoo
- run
- if there is no function or command
tmx-foo
,- just create new tmux session with name
foo
- just create new tmux session with name
- if there is a runnable function or command
tmx -a foo
- if there is a tmux session with name
foo
,- attach to the existing
foo
session without detaching the old ttys - the attached ttys are synchronized
- attach to the existing
- if there is no tmux session with name
foo
,- just print error message
tmx -d foo
- if there is a tmux session with name
foo
,- duplicate the existing
foo
session and name itfoo~1
and attach to it
- duplicate the existing
- if there is no tmux session with name
foo
,- just print error message
Here is a sample tmx startup script tmx-foo
function tmx-foo {
local ses_name=foo
local work_dirs="~/work:$HOME/tmp:/var/log"
tmx-new -t $ses_name -r -w "$work_dirs"
}
aka vanity
or diego