DOTFILES(1)

NAME

dotfilesvim, zsh, git, homebrew, neovim - my whole world

SYNOPSIS

$brew install neovim

INFO

2.9k stars
372 forks
0 views

DESCRIPTION

vim, zsh, git, homebrew, neovim - my whole world

README

Dotfiles

Welcome to my world! Here you'll find a collection of configuration files for various tools and programs that I use on a daily basis. These dotfiles have been carefully curated and customized to streamline my workflow and improve my productivity. Your results may vary, but feel free to give it a try! Whether you're a fellow developer looking to optimize your setup or just curious about how I organize my digital life, I hope you find something useful in these dotfiles. So take a look around and feel free to borrow, modify, or fork to your heart's content. Happy coding!

[!Note]

Did you arrive here through my YouTube talk, vim + tmux? My dotfiles have changed tremendously since then, but feel free to peruse the state of this repo at the time the video was recorded.

capture-20250802232629

Initial Setup

The first thing you need to do is to clone this repo into a location of your choosing. For example, if you have a ~/Developer directory where you clone all of your git repos, that's a good choice for this one, too. This repo is setup to not rely on the location of the dotfiles, so you can place it anywhere.

[!Note]

If you're on macOS, you'll also need to install the XCode CLI tools before continuing.

xcode-select --install
git clone git@github.com:nicknisi/dotfiles.git

[!Note]

This dotfiles configuration is set up in such a way that it shouldn't matter where the repo exists on your system.

The dot Command

This repository includes a powerful dot command for managing your dotfiles. It replaces the previous install.sh script with a more flexible and maintainable solution.

Configuration

The tool respects these environment variables:

  • DOTFILES: Path to your dotfiles directory
  • PATH: For discovering external commands

By default, the following directories are ignored when linking:

  • bin
  • applescripts
  • resources

Basic Usage

dot help                    # Show help message and available commands
dot backup                  # Backup existing dotfiles
dot link [package]          # Link all or specific package
dot unlink [package]        # Unlink all or specific package

[!important]

This command won't be in the path until ZSH is properly configured. Until that's the case, you can run the command from the dotfiles root.

bin/dot <command> <subcommand>

### Backup Options

The backup command creates a backup of your existing dotfiles before installing new ones:

dot backup -d &lt;directory&gt;   # Specify backup directory (default: ~/dotfiles-backup)
dot backup -v               # Verbose output
</code></pre>
<p>This will back up important files and directories including:</p>
<ul>
<li>Existing dotfiles in your home directory</li>
<li>Neovim configuration (<code>~/.config/nvim/</code>)</li>
<li>Vim configuration (<code>~/.vim/</code> and <code>~/.vimrc</code>)</li>
</ul>
<h3>Link/Unlink Options</h3>
<pre><code class="language-bash">dot link -v                # Verbose output
dot link -t &lt;target&gt;       # Specify target directory
dot link &lt;package&gt;         # Link specific package
dot link all               # Link all packages
</code></pre>
<h3>Built-in Commands</h3>
<h4>Git Configuration (<code>dot git</code>)</h4>
<pre><code class="language-bash">dot git setup    # Configure git user settings interactively
</code></pre>
<p>Sets up personalized Git configuration including name, email, and Github username. The configuration is saved to <code>~/.gitconfig-local</code>.</p>
<h4>macOS Settings (<code>dot macos</code>)</h4>
<pre><code class="language-bash">dot macos defaults    # Configure recommended macOS system defaults
</code></pre>
<p>Configures various macOS system settings including:</p>
<ul>
<li>Finder: show all filename extensions</li>
<li>Show hidden files by default</li>
<li>Only use UTF-8 in Terminal.app</li>
<li>Expand save dialog by default</li>
<li>Enable full keyboard access for all controls</li>
<li>Enable subpixel font rendering on non-Apple LCDs</li>
<li>Use current directory as default search scope in Finder</li>
<li>Show Path bar and Status bar in Finder</li>
<li>Optimize keyboard settings for development</li>
</ul>
<h4>Shell Configuration (<code>dot shell</code>)</h4>
<pre><code class="language-bash">dot shell change     # Change default shell to zsh
dot shell terminfo   # Install terminal information files
</code></pre>
<p>These commands may not always be reqired. For example, macOS now sets the default shell to ZSH. And, the terminfo is only requried if you&#39;re interested in having italic support in Neovim.</p>
<h4>Homebrew Management (<code>dot homebrew</code>)</h4>
<pre><code class="language-bash">dot homebrew install    # Install Homebrew package manager
dot homebrew bundle     # Install packages from Brewfile
</code></pre>
<p>Using this command is only needed if your machine does not currently have Homebrew installed. You can also install if the main way by following the <a href="https://brew.sh">instructions on their website</a>.</p>
<h4>Legacy Cleanup (<code>dot legacy</code>)</h4>
<pre><code class="language-bash">dot legacy clean    # Clean up broken legacy symlinks
</code></pre>
<p>This legacy command specifically cleans up the old symlinks that might exist from rpevious iterations of this repository.</p>
<h3>Extending with Custom Commands</h3>
<p>The <code>dot</code> command is extensible. You can add custom commands by:</p>
<ol>
<li>Creating executable scripts named <code>dot-&lt;command&gt;</code> in your <code>$PATH</code></li>
<li>Adding a &quot;Description:&quot; comment for help text</li>
<li>The command will then be available as <code>dot &lt;command&gt;</code></li>
</ol>
<h2>ZSH Configuration</h2>
<p>The prompt for ZSH is configured in the <code>cnofig/zsh/zshrc</code> file and performs the
following operations.</p>
<ul>
<li>Sets <code>EDITOR</code> to <code>nvim</code></li>
<li>Loads any <code>~/.terminfo</code> setup</li>
<li>Sets <code>CODE_DIR</code> to <code>~/Developer</code>. This can be changed to the location you use
to put your git checkouts, and enables fast <code>cd</code>-ing into it via the <code>c</code>
command</li>
<li>Recursively searches the <code>$DOTFILES/zsh</code> directory for any <code>.zsh</code> files and
sources them</li>
<li>Sources a <code>~/.localrc</code>, if available for configuration that is
machine-specific and/or should not ever be checked into git</li>
<li>Adds <code>~/bin</code> and <code>$DOTFILES/bin</code> to the <code>PATH</code></li>
</ul>
<h3>ZSH plugins</h3>
<p>There are a number of plugins in use for ZSH, and they are installed and
maintained separately via the <code>zfetch</code> command. <code>zfetch</code> is a custom plugin
manager available <a href="./zsh/functions/zfetch">here</a>. The plugins that are used are
listed in the <code>.zshrc</code> and include</p>
<ul>
<li><a href="https://github.com/mafredri/zsh-async">zsh-async</a></li>
<li><a href="https://github.com/zsh-users/zsh-syntax-highlighting">zsh-syntax-highlighting</a></li>
<li><a href="https://github.com/zsh-users/zsh-autosuggestions">zsh-autosuggestions</a></li>
<li><a href="https://github.com/grigorii-zander/zsh-npm-scripts-autocomplete">zsh-npm-scripts-autocomplete</a></li>
<li><a href="https://github.com/Aloxaf/fzf-tab">fzf-tab</a></li>
</ul>
<p>Additional plugins can be added to the <code>~/.zshrc</code>, or to <code>~/.localrc</code> if you
want them to stay out of git.</p>
<pre><code class="language-bash"># Add a line like this and the plugin will automatically be downloaded and sourced
zfetch nicknisi/work-scripts
</code></pre>
<h3>Prompt</h3>
<p>The ZSH prompt is designed to be minimal and fast, focusing on essential information
without git repository details. The prompt displays the current working directory,
Node.js version (when in a Node.js project), and suspended job indicators on the first line.
The second line shows a simple colored space character that indicates the success of
the last command (cyan for success, red for failure).</p>
<h4>Jobs Prompt</h4>
<p>The prompt will also display a <code>✱</code> character indicating that there is a suspended
job that exists in the background. This is helpful in keeping track of putting
vim in the background by pressing CTRL-Z.</p>
<h4>Node Prompt</h4>
<p>If a <code>package.json</code> file or a <code>node_modules</code> directory exists in the current
working directory, display the node symbol, along with the current version of
Node. This is useful information when switching between projects that depend on
different versions of Node.</p>
<h2>Neovim setup</h2>
<blockquote>
<p>[!Note]</p>
<p>This is no longer a vim setup. The configuration has been moved to be
Neovim-specific and (mostly) written in <a href="https://www.lua.org/">Lua</a>. <code>vim</code> is
also set up as an alias to <code>nvim</code> to help with muscle memory.</p>
</blockquote>
<p>The simplest way to install Neovim is to install it from homebrew.</p>
<pre><code class="language-bash">brew install neovim
</code></pre>
<p>However, it was likely installed already if you ran the <code>dot homebrew bundle</code>
command provided in the dotfiles.</p>
<p>All of the configuration for Neovim starts at <code>config/nvim/init.lua</code>, which is
symlinked into the <code>~/.config/nvim</code> directory.</p>
<blockquote>
<p>[!Warning]</p>
<p>The first time you run <code>nvim</code> with this configuration, it will likely have a
lot of errors. This is because it is dependent on a number of plugins being
installed.</p>
</blockquote>
<h3>Installing plugins</h3>
<p>On the first run, all required plugins should automaticaly by installed by
<a href="https://github.com/folke/lazy.nvim">lazy.nvim</a>, a plugin manager for neovim.</p>
<p>Plugins are organized in multiple files under <code>config/nvim/lua/nisi/plugins/</code> for better
maintainability. When a plugin is added, it will automatically be installed by lazy.nvim.
To interface with lazy.nvim, simply run <code>:Lazy</code> from within vim.</p>
<blockquote>
<p>[!Note]</p>
<p>Plugins can be synced in a headless way from the command line using the <code>vimu</code>
alias.</p>
</blockquote>
<h2>tmux configuration</h2>
<p>I prefer to run everything inside of <a href="https://github.com/tmux/tmux">tmux</a>. I
typically use a large pane on the top for neovim and then multiple panes along
the bottom or right side for various commands I may need to run. There are no
pre-configured layouts in this repository, as I tend to create them on-the-fly
and as needed.</p>
<p>This repo ships with a <code>tm</code> command which provides a list of active session, or
provides prompts to create a new one.</p>
<pre><code class="language-bash">&gt; tm
Available sessions
------------------

1) New Session
Please choose your session: 1
Enter new session name: open-source
</code></pre>
<p>This configuration features a custom theme system that automatically adapts to macOS 
dark/light mode settings. The status bar includes rich git repository information, 
currently playing music (from Apple Music or Spotify), session name, and system time.
The theme uses powerline-style separators and modern styling with support for Nerd Font icons.</p>
<blockquote>
<p>[!Note]</p>
<p>It also changes the prefix from <code>⌃-b</code> to <code>⌃-a</code> (⌃ is the <em>control</em> key). This
is because I tend to remap the Caps Lock button to Control, and then having
the prefix makes more sense.</p>
</blockquote>
<h3>tmux key commands</h3>
<p>Pressing the Prefix followed by the following will have the following actions in
tmux.</p>
<table>
<thead>
<tr>
<th>Command</th>
<th>Description</th>
</tr>
</thead>
<tbody><tr>
<td><code>h</code></td>
<td>Select the pane to the left</td>
</tr>
<tr>
<td><code>j</code></td>
<td>Select the pane to the bottom</td>
</tr>
<tr>
<td><code>k</code></td>
<td>Select the pane to the top</td>
</tr>
<tr>
<td><code>l</code></td>
<td>Select the pane to the right</td>
</tr>
<tr>
<td><code>⇧-H</code></td>
<td>Enlarge the pane to the left</td>
</tr>
<tr>
<td><code>⇧-J</code></td>
<td>Enlarge the pane to the bottom</td>
</tr>
<tr>
<td><code>⇧-K</code></td>
<td>Enlarge the pane to the top</td>
</tr>
<tr>
<td><code>⇧-L</code></td>
<td>Enlarge the pane to the right</td>
</tr>
<tr>
<td><code>-</code> (dash)</td>
<td>Create a vertical split</td>
</tr>
<tr>
<td><code>|</code> (pipe)</td>
<td>Create a horizontal split</td>
</tr>
</tbody></table>
<h3>Git Status Integration</h3>
<p>The tmux status bar includes comprehensive git repository information with the following indicators.
The status bar also displays currently playing music from Apple Music or Spotify, and Claude
working status when applicable:</p>
<table>
<thead>
<tr>
<th>Symbol</th>
<th>Description</th>
</tr>
</thead>
<tbody><tr>
<td>󰐖</td>
<td>Untracked files exist</td>
</tr>
<tr>
<td>󰜎</td>
<td>Files added/staged for commit</td>
</tr>
<tr>
<td>󰏫</td>
<td>Modified files</td>
</tr>
<tr>
<td>󰑕</td>
<td>Files renamed</td>
</tr>
<tr>
<td>󰮉</td>
<td>Files deleted</td>
</tr>
<tr>
<td>󰘓</td>
<td>Stashed changes exist</td>
</tr>
<tr>
<td>󰧁</td>
<td>Unmerged conflicts</td>
</tr>
<tr>
<td>󰁞</td>
<td>Branch ahead of remote</td>
</tr>
<tr>
<td>󰁅</td>
<td>Branch behind remote</td>
</tr>
<tr>
<td>󰧈</td>
<td>Branch diverged from remote</td>
</tr>
<tr>
<td>󰸞</td>
<td>Working directory clean</td>
</tr>
</tbody></table>
<blockquote>
<p>[!Note]</p>
<p>Git status indicators require a Nerd Font to display properly. The status updates automatically as you work with git repositories.</p>
</blockquote>
<h3>Minimal tmux UI</h3>
<p>Setting a <code>$TMUX_MINIMAL</code> environment variable will do some extra work to hide
the tmux status bar when there is only a single tmux window open. This is not
the default in this repo because it can be confusing, but it is my preferred way
to work. To set this, you can use the <code>~/.localrc</code> file to set it in the
following way.</p>
<pre><code class="language-shell">export TMUX_MINIMAL=1
</code></pre>
<h2>Docker Setup</h2>
<p>A Dockerfile exists in the repository as a testing ground for linux support. To
set up the image, make sure you have Docker installed and then run the following
command.</p>
<pre><code class="language-bash">docker build -t dotfiles --force-rm --build-arg PRIVATE_KEY=&quot;$(cat ~/.ssh/id_rsa)&quot; --build-arg PUBLIC_KEY=&quot;$(cat ~/.ssh/id_rsa.pub)&quot; .
</code></pre>
<p>This should create a <code>dotfiles</code> image which will set up the base environment
with the dotfiles repo cloned. To run, execute the following command.</p>
<pre><code class="language-bash">docker run -it --rm dotfiles
</code></pre>
<p>This will open a bash shell in the container which can then be used to manually
test the dotfiles installation process with linux.</p>
<h2>Preferred software</h2>
<p>I almost exclusively work on macOS, so this list will be specific to that
operating system, but several of these reccomendations are also available,
cross-platform. For a full and up-to-date list of the software and gear that I use today, check out my
<a href="https://nicknisi.com/uses">/uses</a> page.</p>
<ul>
<li><a href="https://wezfurlong.org/wezterm/index.html">WezTerm</a> - A GPU-based terminal emulator</li>
<li><a href="https://github.com/nikitabobko/AeroSpace">Aerospace</a> - An i3-like tiling window manager for macOS.</li>
<li><a href="https://raycast.com">Raycast</a></li>
</ul>
<h2>Questions</h2>
<p>If you have questions, notice issues, or would like to see improvements, please
open a new <a href="https://github.com/nicknisi/dotfiles/discussions/new">discussion</a>
and I&#39;m happy to help you out!</p>

SEE ALSO

clihub3/4/2026DOTFILES(1)