- 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.sh
On my personal machines after I'm logged in to the app store:
brew bundle install --file=brew/mas
./installer/spoon-installer.sh
Then double-click the SpoonInstall.spoon
file. This fixes the following error:
Unable to load Spoon: SpoonInstall
installer/alfred-workflows.sh
Run after Alfred has been installed. Confirm each install individually.
./installer/plenv.sh
Install plenv
as well as the latest Perl version.
ctrl-a
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:bn
or]b
- next buffer:bp
or[b
- previous buffer[c
and]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 | fzf
with 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-n
and thenCtrl-w
etc :vert(ical) terminal
- vertical split into a terminal.exit
to close the terminal:ToggleTerm to split into a terminal buffer
- Switch between windows via
:w
in a Git commit buffer to enable atypos
linter check
When mouse is enabled, clicking in the terminal automatically sets it to
normal
mode.
:set mouse=a
to enable mouse:set mouse=
to disable mousectrl-a ctrl-m
to 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$EDITOR
fc
- open previous command in$EDITOR
fc 2009
- open line 2009 ofhistory
in$EDITOR
When using less
as a pager for psql
, you can pass less
directives while
viewing outpt.
-S
toggle horizontal scrolling-N
toggle line numbers10 + arrow key
will 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 up
docker-compose run --rm app /bin/env bash
In the Docker container:
USER=root ./installer/inside-docker.sh && ./install.sh
docker 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