Dotfiles
Personal dotfiles Mac OS developer setup
Install / Use
/learn @andyatkinson/DotfilesREADME
dotfiles
This is how I set up Mac OS for development.
Summary
- Mac OS <a href='http://en.wikipedia.org/wiki/Defaults_(software)'>defaults</a>.
- Manually remap Caps Lock to Control, for each keyboard!
- Manually enable Control with Accessibility + Zoom + Scroll to zoom in
- Enable tap to click on touch pad
- Other customizations in this file: e.g. key repeat rate
xcode-select --installto install compilation tools- Uninstall
Garage Band,Pagesetc. on a work machine where they won't be used - Make the bottom dock useful - remove all the content creation apps that aren't used
- Vim 9.x (mac version) with native packages install
- Vim: Attempted coc LSP and removed: https://github.com/neoclide/coc.nvim
- https://github.com/itchyny/lightline.vim
mkdir -p ~/.vim/pack/plugins/start/
cd ~/.vim/pack/plugins/start/
git clone git@github.com:tpope/vim-rails.git
git clone git@github.com:junegunn/fzf.vim.git
git clone git@github.com:tpope/vim-fugitive.git
git clone git@github.com:vim-ruby/vim-ruby.git
git clone git@github.com:tomtom/tcomment_vim.git
git clone git@github.com:NLKNguyen/papercolor-theme.git
git clone git@github.com:preservim/nerdtree.git
- iTerm
- tmux
- Fish shell
- https://stackoverflow.com/a/70203456/126688
- https://github.com/oh-my-fish/oh-my-fish
- PostgreSQL installed as Postgres.app
- Git
- Global Git aliases/config in
gitconfig - Global Git ignore in
gitignore - Fuzzy Finder https://github.com/junegunn/fzf
- https://dev.to/iggredible/how-to-search-faster-in-vim-with-fzf-vim-36ko
- ripgrep (rg)
- Formatting SQL using
pg_format(brew install pgformatter) from Vim: https://www.endpointdev.com/blog/2022/04/formatting-sql-vim-pgformat/, make selection, then:!pg_format
Installation
Make sure ENV['HOME'] points at the home directory.
Clone this directory and run one or more installation Rake tasks
$ rake -T
rake dotfiles # install the dotfiles into home directory
rake macos_defaults # replace OS X defaults
Or to run all:
rake install
Fonts
- 11 Best Programming Fonts
- I'm trying out
Hack
- Using JetBrains Mono
Release notes
2025-08-07 New things: Neovim, init.lua, equivalent plugins exploring, mapping keyboard shortcuts, GhosTTY, mise, direnv
- Copy and paste in terminal, Neovim, OS clipboard
2025-02-13 Updates 2021-11-01 Added Fonts
2021-10-20 Overhaul of setup for 2021 development on a Mac. Introduction of new things: GH CLI, Fish shell Removed: ctrl-p, ctrl-p funky, tagbar, mustache templating, goyo vim, ack vim
2017-03-24
:PluginUpdate was run to update all plugins. Should convert this setup to native plugin management soon.
2015-04-28
Switch from git bash completion script to a homebrew version
2016-03-01
Link homebrew openssl explicitly on El Capitan OS X, before installing the eventmachine 1.0.5 https://github.com/eventmachine/eventmachine/issues/602
Puma 2.9.1 (specify opt-dir or can configure bundler)
https://github.com/puma/puma/issues/783
gem install puma -v '2.9.1' -- --with-opt-dir=/usr/local/opt/openssl
Homebrew
# critcal
ripgrep
git
bash-completion
tmux
universal-ctags # instead of ctags?
tldr
gh
fzf
macvim
pg_format
# less critical
jrnl
glow
gpg
redis
reattach-to-user-namespace # not sure this is still needed (2025)
rbenv
nvm
nginx
python
wkhtmltopdf
wget
proctools
fortune
htop
watch
gcal
dos2unix
jq
mplayer
tree
markdown
tig
hg
ranger
ngrok
httpie
pgcli
ical-buddy
readline
pyenv # manage python version
wrk # load testing, use wrk2
pssh # parallel ssh
lnav # log file viewer
brew tap heroku/brew && brew install heroku
# cask
brew tap homebrew/cask-versions
brew update
brew tap caskroom/cask
# cask Mac OS apps
install --cask rectangle
install --cask iterm2
install --cask macdown # Mac OS Markdown editor
install --cask dropbox
install --cask lyricsx
brew install --cask lunar # adjust brightness of LG display
brew install --cask sourcetree
Extras
OS X
- Remap caps lock to control
| Command | Description | | ----------- | ----------- | | softwareupdate --list | find available things to install | | softwareupdate --install <product name> | update the software you named | | ctrl-arrow key | ctrl-arrow key | | command-alt-h | hide other applications' windows, alt is fn+opt |
vim
Interesting help:
:help opening-window
| Command | Description |
| ----------- | ----------- |
| :Tags | Open tags with FZF |
| de | delete to the end of the current word, INCLUDING the last character |
| ce | change until the end of word |
| 2dd | delete 2 lines |
| % | place cursor on character like ( and press % to find match |
| "_d | black hole register, e.g. "_dw to delete a word without storing the result in a register |
| Ctrl-e | execute vim-sparkup |
| gf | jump to code under cursor, rails.vim adds more
| jj | insert mode to normal mode
| jjj | insert mode to normal mode and write buffer
| Ctrl-n | on top of a word, enable multiple cursors match
| Ctrl-p | next match with multiple cursors, ctrl-x to skip a match
| Ctrl-c | in normal mode, writes to ~/.vimbuffer (copy and paste between instances)
| Ctrl-v v | paste from ~/.vimbuffer
| Ctrl-p | normal mode, CtrlP find
| Ctrl-b | CtrlP MRU buffer list
| Ctrl-f | CtrlP function matching
| Ctrl-h/j/k/l | navigate between panes
| Ctrl-^ | last buffer
| leader-n | show file in nerdtree
| Ctrl-p | insert mode, displays autocomplete suggestions
| s | in nerdtree, "s" on a file opens it in a vertical split
| i | in nerdtree, "i" opens in split
| :A | rails.vim, open alternative file
| :Rcontroller | rails.vim, open related controller
| :Rails console | rails.vim, open a console
| :Rlog | rails.vim, open rails log file in a split window
| :ctags -R ! | generate tags file for project
| leader-c | call ctags on project
| Ctrl-] | navigate via tags to item under cursor
| Ctrl-t | navigate back after jumping with ctags
| :AV | rails.vim, edit the alternate file in a vertical split
| dap | delete around paragraph
| :ta | navigate list of tags
| "*y | copy to OS X clipboard
| Ctrl-v | in ctrlp buffer list, open buffer in vertical split
| Ctrl-x | in ctrlp buffer list, open buffer in split
| leader-w | write buffer
| leader-q | quit buffer
| ^ | jump to first character of line
| leader-s | toggle spellchecking
| Ctrl-w | toggle panes
| gU | make uppercase, plus motion (w, k etc.)
| ~ | swap case
| Ctrl-o | jump back
| Ctrl-i | jump forward
| nG | jump to line n
| Ctrl-u | in insert mode, delete line before cursor
| Ctrl-w | in insert mode, delete word before cursor
| Ctrl-w H/J/K/L | re-configure split panes, cycle the splits layout
| leader-p F5 | refresh ctrlp buffer list
| :30winc > | add 30 characters of width to vertical split
| v | with ack.vim, browsing results, "v" to open result in vertical split
| Ctrl-w _ | maximize a pane vertically
| Ctrl-w | | maximize a pane horizontally
| Ctrl-w = | make the pane sizes equal
| ctrl-w = | resize all panes
| leader-t | with vimux and turbux, run test in tmux pane
| leader-T | run focused unit test in tmux pane with vimux and turbux
| :vs | open the last buffer in a vertical split
| - | first non-blank character previous line
| _ | first non-blank character current line
| Ctrl-w r | rotate/swap/cycle/switch split panes
| daw | delete around word
| fx | jump to first x, ; char repeats motion
| i and a | text objects, select inside, or select everything including delimiter, e.g. cit
| is | inside sentence
| ip | inside paragraph
| t{char} | before the char, f{char} puts cursor on the char
| mm | set a mark, with char m, m{a-zA-Z}
| m | jump to mark m | . | last change
| g; | similar to ., can be repeated | < | and `> start and end of last visual selection
| dd | cut the current line, ddp to transpose current next lines
| yyp | yank yank paste, duplicates line
| Ctrl-r{register} | e.g. Ctrl-r" or C-r0
| "+p | put from the Plus register, to avoid toggling paste option
| C-\s | on top of a method, cscope query, to find caller of a method
| :so ~/.vimrc | reload the ~/.vimrc
| visual selection + S (capital "s") | type HTML tag like <p> to surround visual selection in <p> tag, depends on surround.vim
| ctrl-r " | paste from insert mode
| d/ | hit enter after typing the selection, delete until the selection
| f [space] | ";" will repeat the motion
| pry [tab] | in a ruby file, will insert a pry binding statement, part of the built-in ruby snippets file
| y$ | yank until the end of the line without the newline
| gui | switch to GUI
| redraw! | redraw the screen when it goes black http://stackoverflow.com/a/1117742/126688
| e %:h (tab) | expands current directory. supply filename to create a new file at that point on disk.
| cc | delete entire line and enter insert mode
| ciB | change inner block (inside of {} braces)
| comment out | ctrl-slash-slash
| pgrep -f | -f is to match against full argument list, typically need this for a backgrounded rails console process name
| ctrl-o-o | open last location https://dev.to/jovica/3-little-known-but-useful-vim-tips-1pbg
bash
| Command | Description | | ----------- | ----------- | | ctrl-l | clear line | Ctrl-u | cut line | ctrl-y | paste line | Ctrl-y | restore before delete | Ctrl-a | move cursor, front of line | Ctrl-e | move cursor, end of line | Esc-b | move cursor, back one word | Esc-f | move cursor, forward one word | Ctrl-w | delete one word | option-b | back one word (OS X?) | option-f | forward one word (OS X?) | jobs | list jobs | jobs -p | list backgrounded jobs process IDs | fg 1 | bring background job 1 to the foreground | Ctrl-x Ctrl-e | edit command line command in $EDITOR | less +F path/to/log | "follow" the log file, ctrl-c to go in to searc
Related Skills
node-connect
352.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
352.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
352.5kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
