My dotfiles
- Linux
- macOS
- gcc (vimproc)
- make (vimproc)
- xsel (tmux-yank)
- reattach-to-user-namespace (tmux-yank)
Clone this repository:
$ git clone --recursive [email protected]:necojackarc/dotfiles.git ~/dotfilesIn case you don't want to overwrite some of your dotfiles in $HOME, edit setup.sh.
If ~/.vim or ~/.tmux already exists as a real directory, setup.sh leaves it and exits.
Execute the following commands to create symlinks to the dotfiles:
$ chmod +x ~/dotfiles/setup.sh
$ ~/dotfiles/setup.shTo make the most of it, install the following packages:
As Git with my configuration always attempts to sign a commit, you have to have a GPG key in your machine. Generate a new key if you don't have any but make sure your name and email are the same as your Git ones.
Set the generated GPG key ID in ~/.gitconfig.local (see Set computer-specific Git config):
[user]
signingkey = <YOUR GPG KEY ID>If you see an error, you can debug with GIT_TRACE=1. If you find something wrong in your GPG key, you can edit it with gpg --edit-key <KEY_ID>.
On Mac, you need to have gpg-suite installed. Plus, you also need to use gpg2:
[user]
signingkey = <YOUR GPG KEY ID>
[gpg]
program = gpg2To enable this configuration, run killall gpg-agent.
After the initial run, do Ctrl+B -> Shift+I to install all plugins.
Run PlugInstall to install all plugins.
You can install commonly used tools easily such as:
mise install nodemise install postgresmise install awsclimise install granted- See AWS Switch Roles
You can check the installed versions with mise ls.
Canonical file: ~/dotfiles/ai/AGENTS.md.
setup.sh copies it to ~/.claude/CLAUDE.md. Re-run setup.sh after you edit AGENTS.md.
Cursor User Rules are manual. Paste this into Cursor → Settings / Customize → Rules → User Rules:
Read and follow ~/dotfiles/ai/AGENTS.md on every task.
Do not paste the file. @AGENTS.md would hit the current project, not this one.
When you'd like to set environment variables that you don't like to commit to the repo but want to set as regular environment variables applied to the logged-in user, you can use a ~/.env file.
~/.env is loaded in .profile, so place .env in your home directory.
gitconfig includes ~/.gitconfig.local at the end, so put Git settings you don't want to commit there, such as your GPG key or a work account.
Git skips the file if it doesn't exist.
Values in it override gitconfig because it is included last.
For example, to use a different identity and SSH host for the repositories of an organization:
[includeIf "gitdir:~/work/ghq/github.com/<ORG_NAME>/"]
path = ~/.gitconfig-<ORG_NAME>
[url "git@github-<ORG_NAME>:<ORG_NAME>/"]
insteadOf = [email protected]:<ORG_NAME>/
insteadOf = https://github.com/<ORG_NAME>/Commits are always signed, so set the work user.signingkey in ~/.gitconfig-<ORG_NAME> as well as user.name and user.email.
Keep includeIf below your other settings in ~/.gitconfig.local, such as your personal user.signingkey. Git uses the last value it reads, so a setting placed after includeIf overrides the work one.
See Multiple GitHub Accounts for the SSH config.
direnv allows you to set directory-specific variables by placing .envrc in the target directory. That file is loaded and unloaded when you get into and get out of that directory.
Set export IS_DANGER=true in an .envrc where you'd like to display ***DANGER***.
In some environments, they still refer to the old command docker-compose. To cope with that, I'd recommend adding the following executable instead of adding an alias:
#!/bin/bash
docker compose "$@"Then run chmod +x /usr/local/bin/docker-compose.