- Fresh macOS Installs
- All Fresh Installs
- tmux
- vim
- Alfred
- Bash
- less
- gh -- GitHub CLI
- Testing with Docker
- Docker bashrc
- Hammerspoon
Some of these scripts will need to be run manually on a fresh install. They may require manual intervention or be impractical to run regularly.
git clone https://github.com/oalders/dot-files.git
cd dot-files
./bin/change-dot-files-origin.sh
See https://apple.stackexchange.com/a/232983
On macOS:
sudo vi /etc/shells
Afterwards it should look something like:
# List of acceptable shells for chpass(1).
# Ftpd will not allow users to connect who are not using
# one of these shells.
/bin/bash
/bin/csh
/bin/dash
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh
/opt/homebrew/bin/bash
Then:
chsh -s /opt/homebrew/bin/bash $USER./configure/macos.shOn my personal machines after I'm logged in to the app store:
brew bundle install --file=brew/masLaunch Hammerspoon at least once before running this command. It may need
to set up some directories for the spoon installation.
./installer/spoon-installer.shThen double-click the SpoonInstall.spoon file. This fixes the following error:
Unable to load Spoon: SpoonInstall
installer/alfred-workflows.shRun after Alfred has been installed. Confirm each install individually.
Install Alfred Nord Theme Install Alfred Tokyo Night Theme
- Add
taas a keyword for Chrome Browser tab search - Record shortcuts for
divworkflow- meta + 1 - left
- meta + 2 - right
- meta + 3 - full
- meta + 4 - top
- meta + 5 - bottom
./installer/plenv.shInstall plenv as well as the latest Perl version.
ctrl-a
ctrl-a a: toggle mouse
ctrl-a + L: toggle session
ctrl-a + <space>: tmux which-key
- prefix + r # reload config
- prefix + I # install plugins
- prefix + Ctrl-s - save
- prefix + Ctrl-r - restore
rm -rf ~/.cache/tmux/resurrect- clear saved sessions
Remind myself of vim shortcuts etc.
:BCommits- git commits for the current buffer:BLines- fzf lines in current buffer:bnor]b- next buffer:bpor[b- previous buffer[cand]c- navigate to next changed hunk<space>rn- LSP renamecrr- LSP code actionctrl-l- clear highlighted search termsctrl-o- return to previous position in filectrl-w =- equalize width and height of all windowsctrl-w m- toggle zooming of splitsctrl-w r- swap splitsDiffviewOpen HEAD~1- view diff. Probably follow with:colo iceberg]d- next diagnostic[d- previous diagnosticgc- toggle commenting on a visual selectiongcc- toggle commenting on line under cursorgd- go to definition:GenTocGFM- generate GitHub flavoured markdown table of contents:GFiles-git ls-files | fzf:GFiles?-git status | fzfwith preview pane:Gitsigns reset_hunk- reset hunk at cursorgO- open a loc list with the table of contents for a help filegr- get referencesgwip- reflow a block of text and maintain cursor positiongx- in normal mode callsvim.ui.open()on whatever is under the cursor<leader>gm- show commit message for line under cursor:Lines- fzf lines in loaded buffers:Maps- fzf normal mode mappings:Splitrun precious tidy --git- run a command in a split- Terminals
- Switch between windows via
Ctrl-\ Ctrl-nand thenCtrl-wetc :vert(ical) terminal- vertical split into a terminal.exitto close the terminal:ToggleTerm to split into a terminal buffer
- Switch between windows via
:win a Git commit buffer to enable atyposlinter check
When mouse is enabled, clicking in the terminal automatically sets it to
normal mode.
:set mouse=ato enable mouse:set mouse=to disable mousectrl-a ctrl-mto toggle mouse intmux
See akinsho/bufferline.nvim for buffer config.
:LspLog displays path to log file at the top
Print results of vim.lsp.log.get_filename():
:lua print(require('vim.lsp.log').get_filename())
Print location of state directory:
:lua print(vim.fn.stdpath 'state')
:h stdpath() for args that can be passed.
Lockfiles. For instance, if it can't update or install selene, remove:
./local/share/nvim/mason/staging/selene.lock
After Alfred and Dash are installed, click the Integration tab in Dash and
then choose Alfred. If, for instance the HTTP Status Codes cheat sheet has
been downloaded via Dash, this will then be available in Alfred using http
to begin the search.
ctrl-e- open current line in$EDITORfc- open previous command in$EDITORfc 2009- open line 2009 ofhistoryin$EDITOR
When using less as a pager for psql, you can pass less directives while
viewing outpt.
-Stoggle horizontal scrolling-Ntoggle line numbers10 + arrow keywill now advance horizontal scroll by 10 characters when arrow keys are pressed
gh pr status: status of all pull requests in repogh pr view 1234: view a single pull requestgh pr view --comments 1234: view pull request and comments
gh pr checks: get status of checks for a PR in current branch
docker-compose updocker-compose run --rm app /bin/env bashIn the Docker container:
USER=root ./installer/inside-docker.sh && ./install.shdocker run --rm -it -p 5000:5000 \
-v "$HOME/dot-files/bashrc-docker:/root/.bashrc" \
--volume $PWD:/sandbox \
python:latest bashrc
Launch Seal via hyper + space
hyper + space + cr OrePAN2
Select name. Then: hyper + space + sl
Enter insert mode. Then hyper + space + xp