[
  {
    "path": ".github/workflows/dynamic-readme.yml",
    "content": "name: update-templates\n\non: \n  push:\n    branches:\n      - main\n  workflow_dispatch:\n\njobs:\n  update-templates:\n    permissions:\n      contents: write\n      pull-requests: write\n      pages: write\n    uses: thoughtbot/templates/.github/workflows/dynamic-readme.yaml@main\n    secrets:\n      token: ${{ secrets.GITHUB_TOKEN }}\n"
  },
  {
    "path": ".github/workflows/dynamic-security.yml",
    "content": "name: update-security\n\non:\n  push:\n    paths:\n      - SECURITY.md\n    branches:\n      - main\n  workflow_dispatch:\n\njobs:\n  update-security:\n    permissions:\n      contents: write\n      pull-requests: write\n      pages: write\n    uses: thoughtbot/templates/.github/workflows/dynamic-security.yaml@main\n    secrets:\n      token: ${{ secrets.GITHUB_TOKEN }}\n"
  },
  {
    "path": ".gitignore",
    "content": "!bin\nvim/bundle/\n"
  },
  {
    "path": "CODEOWNERS",
    "content": "@purinkle\n"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "content": "# Code of conduct\n\nBy participating in this project, you agree to abide by the\n[thoughtbot code of conduct][1].\n\n[1]: https://thoughtbot.com/open-source-code-of-conduct\n\n"
  },
  {
    "path": "LICENSE",
    "content": "LICENSE\n\nThe MIT License\n\nCopyright (c) 2009-2016 thoughtbot, inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n"
  },
  {
    "path": "README-ES.md",
    "content": "Los dotfiles de thoughtbot\n==========================\n\n![prompt](http://images.thoughtbot.com/thoughtbot-dotfiles-prompt.png)\n\nRequerimientos\n--------------\n\nEstablece zsh como tu shell de inicio de sesión:\n\n    chsh -s $(which zsh)\n\nInstalar\n--------\n\nClona en tu laptop:\n\n    git clone git@github.com:thoughtbot/dotfiles.git ~/dotfiles\n\n(o [haz un fork y mantenlo actualizado](http://robots.thoughtbot.com/keeping-a-github-fork-updated)).\n\nInstala [rcm](https://github.com/thoughtbot/rcm):\n\n    brew install rcm\n\nInstala los dotfiles:\n\n    env RCRC=$HOME/dotfiles/rcrc rcup\n\nDespués de la instalación inicial, puedes ejecutarlo sin establecer la variable `RCRC`\n(`rcup` establecerá un enlace simbólico (symlink) del repo `rcrc` hacia `~/.rcrc` para futuras\nejecuciones de `rcup`). [Ve el ejemplo](https://github.com/thoughtbot/dotfiles/blob/master/rcrc).\n\nEste comando creará enlaces simbólicos (symlinks) para los archivos de configuración en tu\ndirectorio principal.\n\nEstablecer la variable de entorno le dice a `rcup` que use las opciones de\nconfiguración preestablecidas:\n\n* Excluye los archivos `README.md`, `README-ES.md` y `LICENSE`, que son parte\n  del repositorio `dotfiles`, pero no necesitan enlazarse simbólicamente.\n* Le da precedencia a las modificaciones personales que por defecto están en\n  `~/dotfiles-local`\n* Por favor configura el archivo `rcrc` en caso de que quieras hacer\n  modificaciones personales en un directorio distinto.\n\n\nActualizar\n----------\n\nDe vez en cuando deberías descargar las actualizaciones de estos dotfiles, y ejectuar\n\n    rcup\n\npara ligar cualquier nuevo archivo e instalar los nuevos plugins de vim. **Nota** _Debes_ ejecutar\n`rcup` después de descargar para asegurarte que todos los archivos de los plugins\nestén instalados adecuadamente. Puedes ejecutar `rcup` con seguridad muchas veces\npara actualizar pronto y muy seguido!\n\n\nHaz tus propias modificaciones\n------------------------------\n\nCrea un directorio para tus modificaciones personales:\n\n    mkdir ~/dotfiles-local\n\nPon tus modificaciones en `~/dotfiles-local` anexado con `.local`:\n\n* `~/dotfiles-local/aliases.local`\n* `~/dotfiles-local/git_template.local/*`\n* `~/dotfiles-local/gitconfig.local`\n* `~/dotfiles-local/psqlrc.local` (proveemos `.psqlrc.local` en blanco para prevenir que `psql`\n  arroje un error, pero debes sobreescribir el archivo con tu propia copia)\n* `~/dotfiles-local/tmux.conf.local`\n* `~/dotfiles-local/vimrc.local`\n* `~/dotfiles-local/vimrc.bundles.local`\n* `~/dotfiles-local/zshrc.local`\n* `~/dotfiles-local/zsh/configs/*`\n\nPor ejemplo, tu `~/dotfiles-local/aliases.local` tal vez se vea así:\n\n    # Productivity\n    alias todo='$EDITOR ~/.todo'\n\nTu `~/dotfiles-local/gitconfig.local` tal vez se vea así:\n\n    [alias]\n      l = log --pretty=colored\n    [pretty]\n      colored = format:%Cred%h%Creset %s %Cgreen(%cr) %C(bold blue)%an%Creset\n    [user]\n      name = Dan Croak\n      email = dan@thoughtbot.com\n\nTu `~/dotfiles-local/vimrc.local` tal vez se vea así:\n\n    \" Color scheme\n    colorscheme github\n    highlight NonText guibg=#060606\n    highlight Folded  guibg=#0A0A0A guifg=#9090D0\n\nSi prefieres prevenir la instalación de un plugin predeterminado de vim en `.vimrc.bundles`,\npuedes ignorarlo sacándolo con `UnPlug` en tu `~/.vimrc.bundles.local`.\n\n    \" Don't install vim-scripts/tComment\n    UnPlug 'tComment'\n\n`UnPlug` puede ser usado para instalar tu propio fork de un plugin o para instalar\nun plugin compartido con opciones personalizadas distintas.\n\n    \" Only load vim-coffee-script if a Coffeescript buffer is created\n    UnPlug 'vim-coffee-script'\n    Plug 'kchmck/vim-coffee-script', { 'for': 'coffee' }\n\n    \" Use a personal fork of vim-run-interactive\n    UnPlug 'vim-run-interactive'\n    Plug '$HOME/plugins/vim-run-interactive'\n\nPara extender tus `git` hooks, crea scripts ejecutables en\n`~/dotfiles-local/git_template.local/hooks/*` files.\n\nTu `~/dotfiles-local/zshrc.local` tal vez se vea así:\n\n    # load pyenv if available\n    if command -v pyenv &>/dev/null ; then\n      eval \"$(pyenv init -)\"\n    fi\n\nTu `~/dotfiles-local/vimrc.bundles.local` tal vez se vea así:\n\n    Plug 'Lokaltog/vim-powerline'\n    Plug 'stephenmckinney/vim-solarized-powerline'\n\nConfiguraciones de zsh\n----------------------\n\nConfiguraciones adicionales para zsh pueden ir en el directorio `~/dotfiles-local/zsh/configs`. Este\ntiene dos subdirectorios especiales: `pre` para archivos que deben ser cargados primero y `post`\npara archivos que deben cargarse al final.\n\nPor ejemplo, `~/dotfiles-local/zsh/configs/pre/virtualenv` hace uso de varias características\nde shell que tal vez se vean afectadas por tu configuración, por lo tanto cárgalo primero:\n\n    # Load the virtualenv wrapper\n    . /usr/local/bin/virtualenvwrapper.sh\n\nEstablecer una vinculación clave puede ocurrir en `~/dotfiles-local/zsh/configs/keys`:\n\n    # Grep anywhere with ^G\n    bindkey -s '^G' ' | grep '\n\nAlgunos cambios, como `chpwd`, deben ocurrir en `~/dotfiles-local/zsh/configs/post/chpwd`:\n\n    # Show the entries in a directory whenever you cd in\n    function chpwd {\n      ls\n    }\n\nEste directorio está a la mano para combinar dotfiles de múltiples equipos; un equipo\npuede agregar el archivo `virtualenv`, otro el archivo `keys` y un tercero el archivo `chpwd`.\n\nEl archivo `~/dotfiles-local/zshrc.local` se carga después de `~/dotfiles-local/zsh/configs`.\n\nConfiguraciones de vim\n----------------------\n\nSimilar al directorio de configuración para zsh descrito arriba, vim\nautomáticamente descarga los archivos en el directorio `~/dotfiles-local/vim/plugin`. Sin embargo, este no\ntiene el mismo soporte para los subdirectorios `pre` ni `post` que tiene nuestro `zshrc`.\n\nEste es un ejemplo `~/dotfiles-local/vim/plugin/c.vim`. Se carga cada vez que inicia vim,\nsin importar de nombre del archivo:\n\n    # Indent C programs according to BSD style(9)\n    set cinoptions=:0,t0,+4,(4\n    autocmd BufNewFile,BufRead *.[ch] setlocal sw=0 ts=8 noet\n\n¿Qué viene incluido?\n-----------------\n\nConfiguración [vim](http://www.vim.org/):\n\n* [fzf](https://github.com/junegunn/fzf.vim) para hallazgo difuso de archivos/buffer/tags.\n* [Rails.vim](https://github.com/tpope/vim-rails) para una mejor navegación de la estructura\nde archivos de Rails via `gf` y `:A` (alterno), `:Rextract` parciales,`:Rinvert` migraciones, etc.\n* Ejecuta muchos tipos de pruebas [desde vim]([https://github.com/janko-m/vim-test)\n* Establece `<leader>` a un sólo espacio.\n* Navega entre los últimos dos archivos con espacio-espacio\n* Resaltado de sintaxis para Markdown, HTML, JavaScript, Ruby, Go, Elixir, y más.\n* Usa [Ag](https://github.com/ggreer/the_silver_searcher) en lugar de Grep cuando esté disponible.\n* Map `<leader>ct` para re-indexar [Exuberant Ctags](http://ctags.sourceforge.net/).\n* Usa [vim-mkdir](https://github.com/pbrisbin/vim-mkdir) para crear automáticamente directorios\n  no existentes antes de escribir el buffer.\n* Usa [vim-plug](https://github.com/junegunn/vim-plug) para administrar plugins.\n\n[tmux](http://robots.thoughtbot.com/a-tmux-crash-course)\nconfiguración:\n\n* Mejora la resolición del color.\n* Eliminar desechos administrativos(bombre de sesión, nombre de host, tiempo) en la barra de estatus.\n* Establece el prefijo a `Ctrl+s`\n* Suaviza el color de la barra de estatus de un verde chillante a un gris claro.\n\nConfiguración para [git](http://git-scm.com/):\n\n* Agrega el alias `create-branch` para crear branches.\n* Agrega el alias `delete-branch` para borrar branches.\n* Agrega el alias `merge-branch` para fusionar los branches en master.\n* Agrega el alias `up` para buscar y rebasar `origin/master` en el branch.\n  Usa `git up -i` para rebases interactivos.\n* Agrega el hook `post-{checkout,commit,merge}` para re-indexar tus ctags.\n* Agrega `pre-commit` y `prepare-commit-msg` stubs que delegan hacia tu\n  configuración local.\n* Agrega el alias `trust-bin` para anexar el `bin/` de un proyecto al `$PATH`.\n\nConfiguración de [Ruby](https://www.ruby-lang.org/en/):\n\n* Agrega binstubs confiables al `PATH`.\n* Descarga el administrador de versiones ASDF.\n\nAlias de Shell y scripts:\n\n* `b` para `bundle`.\n* `g` sin argumentos es `git status` y con argumentos funciona como `git`.\n* `migrate` para `bin/rails db:migrate db:rollback && bin/rails db:migrate db:test:prepare`.\n* `mcd` para crear un directorio e ir a él.\n* `replace foo bar **/*.rb` para buscar y reemplazar en una lista dada de archivos.\n* `tat` para adjuntar a una sesión de tmux llamada igual que el directorio actual.\n* `v` para `$VISUAL`.\n\nGracias\n-------\n\nGracias [Contribuyentes](https://github.com/thoughtbot/dotfiles/contributors)!\nAdemás, gracias a Corey Haines, Gary Bernhardt, y otros por compartir sus dotfiles\ny otros scripts de shell que derivaron en la inspiración para los artículos\nen este proyecto.\n\nLicencia\n--------\n\ndotfiles está protegida por copyright © 2009-2017 thoughtbot. Es un software gratis, y tal vez\nredistribuido bajo los términos especificados en el archivo de la [`LICENCIA`]\n[`LICENCIA`]: /LICENSE\n\nAcerca de thoughtbot\n--------------------\n\n![thoughtbot](http://presskit.thoughtbot.com/images/thoughtbot-logo-for-readmes.svg)\n\ndotfiles es mantenido y creado por thoughtbot, inc.\nLos nombres y los logos de thoughtbot son marca registrada de thoughtbot, inc.\n\nAmamos el código de fuente abiarta!\nVe [nuestros otros proyectos][community].\nEstamos [disponibles para ser contratados][hire].\n\n[community]: https://thoughtbot.com/community?utm_source=github\n[hire]: https://thoughtbot.com/hire-us?utm_source=github\n"
  },
  {
    "path": "README.md",
    "content": "# thoughtbot dotfiles\n\n![prompt](http://images.thoughtbot.com/thoughtbot-dotfiles-prompt.png)\n\n## Requirements\n\nSet zsh as your login shell:\n\n    chsh -s $(which zsh)\n\n## Install\n\nClone onto your laptop:\n\n    git clone git@github.com:thoughtbot/dotfiles.git ~/dotfiles\n\n(Or, [fork and keep your fork\nupdated](http://robots.thoughtbot.com/keeping-a-github-fork-updated)).\n\nInstall [rcm](https://github.com/thoughtbot/rcm):\n\n    brew install rcm\n\nInstall the dotfiles:\n\n    env RCRC=$HOME/dotfiles/rcrc rcup\n\nAfter the initial installation, you can run `rcup` without the one-time variable\n`RCRC` being set (`rcup` will symlink the repo's `rcrc` to `~/.rcrc` for future\nruns of `rcup`). [See\nexample](https://github.com/thoughtbot/dotfiles/blob/master/rcrc).\n\nThis command will create symlinks for config files in your home directory.\nSetting the `RCRC` environment variable tells `rcup` to use standard\nconfiguration options:\n\n- Exclude the `README.md`, `README-ES.md` and `LICENSE` files, which are part of\n  the `dotfiles` repository but do not need to be symlinked in.\n- Give precedence to personal overrides which by default are placed in\n  `~/dotfiles-local`\n- Please configure the `rcrc` file if you'd like to make personal\n  overrides in a different directory\n\n## Update\n\nFrom time to time you should pull down any updates to these dotfiles, and run\n\n    rcup\n\nto link any new files and install new vim plugins. **Note** You _must_ run\n`rcup` after pulling to ensure that all files in plugins are properly installed,\nbut you can safely run `rcup` multiple times so update early and update often!\n\n## Make your own customizations\n\nCreate a directory for your personal customizations:\n\n    mkdir ~/dotfiles-local\n\nPut your customizations in `~/dotfiles-local` appended with `.local`:\n\n- `~/dotfiles-local/aliases.local`\n- `~/dotfiles-local/git_template.local/*`\n- `~/dotfiles-local/gitconfig.local`\n- `~/dotfiles-local/psqlrc.local` (we supply a blank `.psqlrc.local` to prevent `psql` from\n  throwing an error, but you should overwrite the file with your own copy)\n- `~/dotfiles-local/tmux.conf.local`\n- `~/dotfiles-local/vimrc.local`\n- `~/dotfiles-local/vimrc.bundles.local`\n- `~/dotfiles-local/zshrc.local`\n- `~/dotfiles-local/zsh/configs/*`\n\nFor example, your `~/dotfiles-local/aliases.local` might look like this:\n\n    # Productivity\n    alias todo='$EDITOR ~/.todo'\n\nYour `~/dotfiles-local/gitconfig.local` might look like this:\n\n    [alias]\n      l = log --pretty=colored\n    [pretty]\n      colored = format:%Cred%h%Creset %s %Cgreen(%cr) %C(bold blue)%an%Creset\n    [user]\n      name = Dan Croak\n      email = dan@thoughtbot.com\n\nYour `~/dotfiles-local/vimrc.local` might look like this:\n\n    \" Color scheme\n    colorscheme github\n    highlight NonText guibg=#060606\n    highlight Folded  guibg=#0A0A0A guifg=#9090D0\n\nIf you don't wish to install a vim plugin from the default set of vim plugins in\n`.vimrc.bundles`, you can ignore the plugin by calling it out with `UnPlug` in\nyour `~/.vimrc.bundles.local`.\n\n    \" Don't install vim-scripts/tComment (notice the username of the plugin is\n    removed)\n\n    UnPlug 'tComment'\n\n`UnPlug` can be used to install your own fork of a plugin or to install a shared\nplugin with different custom options.\n\n    \" Only load vim-coffee-script if a Coffeescript buffer is created\n    UnPlug 'vim-coffee-script'\n    Plug 'kchmck/vim-coffee-script', { 'for': 'coffee' }\n\n    \" Use a personal fork of vim-run-interactive\n    UnPlug 'vim-run-interactive'\n    Plug '$HOME/plugins/vim-run-interactive'\n\nTo extend your `git` hooks, create executable scripts in\n`~/dotfiles-local/git_template.local/hooks/*` files.\n\nYour `~/dotfiles-local/zshrc.local` might look like this:\n\n    # load pyenv if available\n    if which pyenv &>/dev/null ; then\n      eval \"$(pyenv init -)\"\n    fi\n\nYour `~/dotfiles-local/vimrc.bundles.local` might look like this:\n\n    Plug 'Lokaltog/vim-powerline'\n    Plug 'stephenmckinney/vim-solarized-powerline'\n\n## zsh Configurations\n\nAdditional zsh configuration can go under the `~/dotfiles-local/zsh/configs` directory. This\nhas two special subdirectories: `pre` for files that must be loaded first, and\n`post` for files that must be loaded last.\n\nFor example, `~/dotfiles-local/zsh/configs/pre/virtualenv` makes use of various shell\nfeatures which may be affected by your settings, so load it first:\n\n    # Load the virtualenv wrapper\n    . /usr/local/bin/virtualenvwrapper.sh\n\nSetting a key binding can happen in `~/dotfiles-local/zsh/configs/keys`:\n\n    # Grep anywhere with ^G\n    bindkey -s '^G' ' | grep '\n\nSome changes, like `chpwd`, must happen in `~/dotfiles-local/zsh/configs/post/chpwd`:\n\n    # Show the entries in a directory whenever you cd in\n    function chpwd {\n      ls\n    }\n\nThis directory is handy for combining dotfiles from multiple teams; one team\ncan add the `virtualenv` file, another `keys`, and a third `chpwd`.\n\nThe `~/dotfiles-local/zshrc.local` is loaded after `~/dotfiles-local/zsh/configs`.\n\n## zsh History Configurations\n\nThe zsh history is configured with several useful options:\n\n-   `hist_ignore_all_dups`: Removes duplicate commands from history\n\n-   `hist_ignore_space`: Commands starting with a space are not saved to history\n    (useful for sensitive commands)\n\n-   `inc_append_history`: Adds commands to history as they're executed, not just\n    when the shell exits\n\n-   `share_history`: Shares history across multiple zsh sessions in real-time\n\nHistory size is set to 8,192 entries providing ample command history.\n\n## vim Configurations\n\nSimilarly to the zsh configuration directory as described above, vim\nautomatically loads all files in the `~/dotfiles-local/vim/plugin` directory. This does not\nhave the same `pre` or `post` subdirectory support that our `zshrc` has.\n\nThis is an example `~/dotfiles-local/vim/plugin/c.vim`. It is loaded every time vim starts,\nregardless of the file name:\n\n    # Indent C programs according to BSD style(9)\n    set cinoptions=:0,t0,+4,(4\n    autocmd BufNewFile,BufRead *.[ch] setlocal sw=0 ts=8 noet\n\n## What's in it?\n\n[vim](http://www.vim.org/) configuration:\n\n- [fzf](https://github.com/junegunn/fzf.vim) for fuzzy file/buffer/tag finding.\n- [Rails.vim](https://github.com/tpope/vim-rails) for enhanced navigation of\n  Rails file structure via `gf` and `:A` (alternate), `:Rextract` partials,\n  `:Rinvert` migrations, etc.\n- Run many kinds of tests [from vim]([https://github.com/janko-m/vim-test)\n- Set `<leader>` to a single space.\n- Switch between the last two files with space-space.\n- Syntax highlighting for Markdown, HTML, JavaScript, Ruby, Go, Elixir, more.\n- Use [Ag](https://github.com/ggreer/the_silver_searcher) instead of Grep when\n  available.\n- Map `<leader>ct` to re-index ctags.\n- Use [vim-mkdir](https://github.com/pbrisbin/vim-mkdir) for automatically\n  creating non-existing directories before writing the buffer.\n- Use [vim-plug](https://github.com/junegunn/vim-plug) to manage plugins.\n\n[tmux](http://robots.thoughtbot.com/a-tmux-crash-course)\nconfiguration:\n\n- Improve color resolution.\n- Remove administrative debris (session name, hostname, time) in status bar.\n- Set prefix to `Ctrl+s`\n- Soften status bar color from harsh green to light gray.\n\n[git](http://git-scm.com/) configuration:\n\n- Adds a `co-upstream-pr $PR_NUMBER $LOCAL_BRANCH_NAME` subcommand to checkout remote upstream branch into a local branch.\n- Adds a `create-branch` alias to create feature branches.\n- Adds a `delete-branch` alias to delete feature branches.\n- Adds a `merge-branch` alias to merge feature branches into master.\n- Adds an `up` alias to fetch and rebase `origin/master` into the feature\n  branch. Use `git up -i` for interactive rebases.\n- Adds `post-{checkout,commit,merge}` hooks to re-index your ctags.\n- Adds `pre-commit` and `prepare-commit-msg` stubs that delegate to your local\n  config.\n- Adds `trust-bin` alias to append a project's `bin/` directory to `$PATH`.\n\n[Ruby](https://www.ruby-lang.org/en/) configuration:\n\n- Add trusted binstubs to the `PATH`.\n- Load the ASDF version manager.\n\n[Rails](https://rubyonrails.org)\n\n- Adds [railsrc][] with the following options to integrate with [Suspenders][].\n\n```\n--database=postgresql\n--skip-test\n-m=https://raw.githubusercontent.com/thoughtbot/suspenders/main/lib/install/web.rb\n```\n\nIf you want to skip this file altogether, run `rails new my_app --no_rc`.\n\n[railsrc]: https://github.com/rails/rails/blob/7f7f9df8641e35a076fe26bd097f6a1b22cb4e2d/railties/lib/rails/generators/rails/app/USAGE#L5C1-L7\n[Suspenders]: https://github.com/thoughtbot/suspenders\n\nShell aliases and scripts:\n\n- `...` for quicker navigation to the parent's parent directory.\n- `b` for `bundle`.\n- `g` with no arguments is `git status` and with arguments acts like `git`.\n- `migrate` for `bin/rails db:migrate db:rollback && bin/rails db:migrate db:test:prepare`.\n- `mcd` to make a directory and change into it.\n- `replace foo bar **/*.rb` to find and replace within a given list of files.\n- `tat` to attach to tmux session named the same as the current directory.\n- `v` for `$VISUAL`.\n\n## Thanks\n\nThank you, [contributors](https://github.com/thoughtbot/dotfiles/contributors)!\nAlso, thank you to Corey Haines, Gary Bernhardt, and others for sharing your\ndotfiles and other shell scripts from which we derived inspiration for items\nin this project.\n\n## License\n\ndotfiles is copyright © 2009 thoughtbot. It is free software, and may be\nredistributed under the terms specified in the [`LICENSE`] file.\n\n[`LICENSE`]: /LICENSE\n\n<!-- START /templates/footer.md -->\n## About thoughtbot\n\n![thoughtbot](https://thoughtbot.com/thoughtbot-logo-for-readmes.svg)\n\nThis repo is maintained and funded by thoughtbot, inc.\nThe names and logos for thoughtbot are trademarks of thoughtbot, inc.\n\nWe love open source software!\nSee [our other projects][community].\nWe are [available for hire][hire].\n\n[community]: https://thoughtbot.com/community?utm_source=github\n[hire]: https://thoughtbot.com/hire-us?utm_source=github\n\n<!-- END /templates/footer.md -->\n"
  },
  {
    "path": "SECURITY.md",
    "content": "<!-- START /templates/security.md -->\n# Security Policy\n\n## Supported Versions\n\nOnly the the latest version of this project is supported at a given time. If\nyou find a security issue with an older version, please try updating to the\nlatest version first.\n\nIf for some reason you can't update to the latest version, please let us know\nyour reasons so that we can have a better understanding of your situation.\n\n## Reporting a Vulnerability\n\nFor security inquiries or vulnerability reports, visit\n<https://thoughtbot.com/security>.\n\nIf you have any suggestions to improve this policy, visit <https://thoughtbot.com/security>.\n<!-- END /templates/security.md -->\n"
  },
  {
    "path": "agignore",
    "content": "/vendor\n"
  },
  {
    "path": "aliases",
    "content": "# Unix\nalias ll=\"ls -al\"\nalias ln=\"ln -v\"\nalias mkdir=\"mkdir -p\"\nalias e=\"$EDITOR\"\nalias v=\"$VISUAL\"\n\n# Bundler\nalias b=\"bundle\"\n\n# Rails\nalias migrate=\"bin/rails db:migrate db:rollback && bin/rails db:migrate db:test:prepare\"\nalias s=\"rspec\"\n\n# Pretty print the path\nalias path='echo -e ${PATH//:/\\\\n}'\n\n# Easier navigation: ..., ...., ....., and -\nalias ...=\"cd ../..\"\nalias ....=\"cd ../../..\"\nalias .....=\"cd ../../../..\"\nalias -- -=\"cd -\"\n\n# Include custom aliases\nif [[ -f ~/.aliases.local ]]; then\n  source ~/.aliases.local\nfi\n"
  },
  {
    "path": "asdfrc",
    "content": "legacy_version_file = yes\n"
  },
  {
    "path": "bin/bundler-search",
    "content": "#!/bin/sh\n\n# Search your bundle for the provided pattern\n#   Requires bundler 1.8+ for execution as a bundler subcommand.\n#   Examples:\n#     bundle search Kernel.warn\n#     bundle search current_user clearance\n#     bundle search \"Change your password\" clearance\n#\n# Arguments:\n#  1. What to search for\n#  2. Which gem names to search (defaults to all gems)\n\npattern=\"$1\"; shift\nif command -v rg &>/dev/null; then\n  rg \"$pattern\" $(bundle show --paths \"$@\")\nelse\n  ag \"$pattern\" $(bundle show --paths \"$@\")\nfi\n"
  },
  {
    "path": "bin/clear-port",
    "content": "#!/bin/sh\n\n# Kills the process running on the provided port\n#\n# clear-port 3000\n\nif [ -n \"$1\" ]; then\n  port_num=\"$(lsof -ti4TCP:\"$1\")\"\n  if [ $? -eq 0 ]; then\n    kill \"$port_num\"\n  fi\nelse\n  echo >&2 Usage: clear-port port-number\n  exit 1\nfi\n"
  },
  {
    "path": "bin/git-ca",
    "content": "#!/bin/sh\n\ngit commit --amend -v --date=\"$(date +%Y-%m-%dT%H:%M:%S)\"\n"
  },
  {
    "path": "bin/git-co-upstream-pr",
    "content": "#!/bin/sh\n\nset -e\n\npull_request_number=$1\nlocal_branch_name=$2\n\nif [ -z \"$pull_request_number\" -o -z \"$local_branch_name\" ]; then\n  echo \"usage: git co-upstream-pr <pull_request_number> <local_branch_name>\"\n  exit 1\nfi\n\nif git remote -v | grep -q upstream; then\n  git fetch upstream \"pull/$pull_request_number/head:$local_branch_name\"\n  git checkout \"$local_branch_name\"\nelse\n  cat <<HELP\nYou don't have an upstream remote set.\nUse:\n  git remote add upstream {upstream_remote_url}\n\nto set the reference and then try again.\nHELP\nfi\n"
  },
  {
    "path": "bin/git-create-branch",
    "content": "#!/bin/sh\n\nset -e\n\ngit push origin \"HEAD:refs/heads/$1\"\ngit fetch origin\ngit branch --track \"$1\" \"origin/$1\"\ncd .\ngit checkout \"$1\"\n"
  },
  {
    "path": "bin/git-ctags",
    "content": "#!/bin/sh\n\nset -e\n\n[ -f .git/hooks/ctags ] || git init\n.git/hooks/ctags\n"
  },
  {
    "path": "bin/git-current-branch",
    "content": "#!/bin/sh\n\nset -e\n\ngit rev-parse --abbrev-ref HEAD\n"
  },
  {
    "path": "bin/git-delete-branch",
    "content": "#!/bin/sh\n\nset -e\n\ngit push origin :refs/heads/\"$1\"\ngit branch --delete \"$1\"\n"
  },
  {
    "path": "bin/git-merge-branch",
    "content": "#!/bin/sh\n\nset -e\n\nif git symbolic-ref --short refs/remotes/origin/HEAD >/dev/null; then\n  main_branch=\"$(git symbolic-ref --short refs/remotes/origin/HEAD | sed 's@^origin/@@')\" \"$@\"\nelse\n  echo \"You don't have a primary branch reference set for your origin remote.\n  Use:\n  git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/{name_of_your_primary_branch}\n\n  to set the reference and then try merging again.\"\n\n  exit 1\nfi\n\ngit fetch origin\nline_count=$(git diff origin/$main_branch..$main_branch | wc -l)\n\nif [ $line_count -gt 0 ]; then\n  printf \"failed: $main_branch is not up to date with origin/$main_branch\\n\"\n  exit 1\nfi\n\ngit checkout $main_branch\ngit merge \"@{-1}\"\n"
  },
  {
    "path": "bin/git-rename-branch",
    "content": "#!/bin/sh\n\nset -e\n\nold=$(git current-branch)\ngit branch -m \"$old\" \"$1\"\ngit push origin --set-upstream \"$1\"\ngit push origin --delete \"$old\"\n"
  },
  {
    "path": "bin/git-trust-bin",
    "content": "#!/bin/sh\n\nmkdir -p .git/safe\n"
  },
  {
    "path": "bin/git-up",
    "content": "#!/bin/sh\n\nset -e\n\ngit fetch origin\n\nif git symbolic-ref --short refs/remotes/origin/HEAD >/dev/null; then\n  git rebase \"$(git symbolic-ref --short refs/remotes/origin/HEAD)\" \"$@\"\nelse\n  echo \"You don't have a primary branch reference set for your origin remote.\nUse:\ngit symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/{name_of_your_primary_branch}\n\nto set the reference and then try rebasing again.\"\nfi\n"
  },
  {
    "path": "bin/replace",
    "content": "#!/bin/sh\n#\n# Find and replace by a given list of files.\n#\n# replace foo bar **/*.rb\n\nfind_this=\"$1\"\nshift\nreplace_with=\"$1\"\nshift\n\nif command -v rg &>/dev/null ; then\n  items=$(rg -l --color never \"$find_this\" \"$@\")\nelse\n  items=$(ag -l --nocolor \"$find_this\" \"$@\")\nfi\n\ntemp=\"${TMPDIR:-/tmp}/replace_temp_file.$$\"\nIFS=$'\\n'\nfor item in $items; do\n  sed \"s/$find_this/$replace_with/g\" \"$item\" > \"$temp\" && mv \"$temp\" \"$item\"\ndone\n"
  },
  {
    "path": "bin/tat",
    "content": "#!/bin/sh\n#\n# Attach or create tmux session named the same as current directory.\n\npath_name=\"$(basename \"$PWD\" | tr . -)\"\nsession_name=${1-$path_name}\n\nnot_in_tmux() {\n  [ -z \"$TMUX\" ]\n}\n\nsession_exists() {\n  tmux has-session -t \"=$session_name\"\n}\n\ncreate_detached_session() {\n  (TMUX='' tmux new-session -Ad -s \"$session_name\")\n}\n\ncreate_if_needed_and_attach() {\n  if not_in_tmux; then\n    tmux new-session -As \"$session_name\"\n  else\n    if ! session_exists; then\n      create_detached_session\n    fi\n    tmux switch-client -t \"$session_name\"\n  fi\n}\n\ncreate_if_needed_and_attach\n"
  },
  {
    "path": "bin/whats-in-port",
    "content": "#!/bin/sh\n\n# List process running on provided port\n#\n# whats-in-port 3000\n#\n# output:\n# COMMAND   PID   USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME\n# ruby    25583   root   11u  IPv4 0xee20607697a79bf7      0t0  TCP *:irdmi (LISTEN)\n\nif [ -n \"$1\" ]; then\n  lsof -ni4TCP:\"$1\"\nelse\n  echo >&2 Usage: whats-in-port port-number\n  exit 1\nfi\n"
  },
  {
    "path": "ctags",
    "content": "--regex-ruby=/(^|[:;])[ \\t]*([A-Z][[:alnum:]_]+) *=/\\2/c,class,constant/\n--regex-ruby=/^[ \\t]*attr_(reader|writer|accessor) (:[a-z0-9_]+, )*:([a-z0-9_]+)/\\3/A,attr/\n--langdef=Elixir\n--langmap=Elixir:.ex.exs\n--regex-Elixir=/^[ \\t]*def(p?)[ \\t]+([a-z_][a-zA-Z0-9_?!]*)/\\2/f,functions,functions (def ...)/\n--regex-Elixir=/^[ \\t]*defcallback[ \\t]+([a-z_][a-zA-Z0-9_?!]*)/\\1/c,callbacks,callbacks (defcallback ...)/\n--regex-Elixir=/^[ \\t]*defdelegate[ \\t]+([a-z_][a-zA-Z0-9_?!]*)/\\1/d,delegates,delegates (defdelegate ...)/\n--regex-Elixir=/^[ \\t]*defexception[ \\t]+([A-Z][a-zA-Z0-9_]*\\.)*([A-Z][a-zA-Z0-9_?!]*)/\\2/e,exceptions,exceptions (defexception ...)/\n--regex-Elixir=/^[ \\t]*defimpl[ \\t]+([A-Z][a-zA-Z0-9_]*\\.)*([A-Z][a-zA-Z0-9_?!]*)/\\2/i,implementations,implementations (defimpl ...)/\n--regex-Elixir=/^[ \\t]*defmacro(p?)[ \\t]+([a-z_][a-zA-Z0-9_?!]*)\\(/\\2/a,macros,macros (defmacro ...)/\n--regex-Elixir=/^[ \\t]*defmacro(p?)[ \\t]+([a-zA-Z0-9_?!]+)?[ \\t]+([^ \\tA-Za-z0-9_]+)[ \\t]*[a-zA-Z0-9_!?!]/\\3/o,operators,operators (e.g. \"defmacro a <<< b\")/\n--regex-Elixir=/^[ \\t]*defmodule[ \\t]+([A-Z][a-zA-Z0-9_]*\\.)*([A-Z][a-zA-Z0-9_?!]*)/\\2/m,modules,modules (defmodule ...)/\n--regex-Elixir=/^[ \\t]*defprotocol[ \\t]+([A-Z][a-zA-Z0-9_]*\\.)*([A-Z][a-zA-Z0-9_?!]*)/\\2/p,protocols,protocols (defprotocol...)/\n--regex-Elixir=/^[ \\t]*Record\\.defrecord[ \\t]+:([a-zA-Z0-9_]+)/\\1/r,records,records (defrecord...)/\n--regex-Elixir=/^[ \\t]*test[ \\t]+\\\"([a-z_][a-zA-Z0-9_?! ]*)\\\"*/\\1/t,tests,tests (test ...)/\n--exclude=bower_components\n--exclude=node_modules\n--exclude=vendor\n--languages=-javascript\n--langdef=js\n--langmap=js:.js\n--langmap=js:+.jsx\n--regex-js=/[ \\t.]([A-Z][A-Z0-9._$]+)[ \\t]*[=:][ \\t]*([0-9\"'\\[\\{]|null)/\\1/n,constant/\n"
  },
  {
    "path": "ctags.d/config.ctags",
    "content": "--regex-ruby=/(^|[:;])[ \\t]*([A-Z][[:alnum:]_]+) *=/\\2/c,class,constant/\n--exclude=bower_components\n--exclude=node_modules\n--exclude=vendor\n--languages=-javascript\n--langdef=js\n--langmap=js:.js\n--langmap=js:+.jsx\n--regex-js=/[ \\t.]([A-Z][A-Z0-9._$]+)[ \\t]*[=:][ \\t]*([0-9\"'\\[\\{]|null)/\\1/n,constant/\n"
  },
  {
    "path": "gemrc",
    "content": "gem: --no-document\n"
  },
  {
    "path": "git_template/hooks/commit-msg",
    "content": "#!/bin/sh\n\nlocal_hook=\"$HOME\"/.git_template.local/hooks/commit-msg\n\nif [ -f \"$local_hook\" ]; then\n  . \"$local_hook\"\nfi\n"
  },
  {
    "path": "git_template/hooks/ctags",
    "content": "#!/bin/sh\n\nset -e\n\nPATH=\"/usr/local/bin:$PATH\"\ndir=\"$(git rev-parse --git-dir)\"\ntrap 'rm -f \"$dir/$$.tags\"' EXIT\ngit ls-files | \\\n  \"${CTAGS:-ctags}\" --tag-relative=yes -L - -f\"$dir/$$.tags\" --languages=-javascript,sql\nmv \"$dir/$$.tags\" \"$dir/tags\"\n"
  },
  {
    "path": "git_template/hooks/post-checkout",
    "content": "#!/bin/sh\n\nlocal_hook=\"$HOME\"/.git_template.local/hooks/post-checkout\n\nif [ -f \"$local_hook\" ]; then\n  . \"$local_hook\";\nfi\n\n.git/hooks/ctags >/dev/null 2>&1 &\n"
  },
  {
    "path": "git_template/hooks/post-commit",
    "content": "#!/bin/sh\n\nlocal_hook=\"$HOME\"/.git_template.local/hooks/post-commit\n\nif [ -f \"$local_hook\" ]; then\n  . \"$local_hook\";\nfi\n\n.git/hooks/ctags >/dev/null 2>&1 &\n"
  },
  {
    "path": "git_template/hooks/post-merge",
    "content": "#!/bin/sh\n\nlocal_hook=\"$HOME\"/.git_template.local/hooks/post-merge\n\nif [ -f \"$local_hook\" ]; then\n  . \"$local_hook\";\nfi\n\n.git/hooks/ctags >/dev/null 2>&1 &\n"
  },
  {
    "path": "git_template/hooks/post-rewrite",
    "content": "#!/bin/sh\ncase \"$1\" in\n  rebase) exec .git/hooks/post-merge ;;\nesac\n"
  },
  {
    "path": "git_template/hooks/pre-commit",
    "content": "#!/bin/sh\n\nlocal_hook=\"$HOME\"/.git_template.local/hooks/pre-commit\n\nif [ -f \"$local_hook\" ]; then\n  . \"$local_hook\"\nfi\n"
  },
  {
    "path": "git_template/hooks/pre-push",
    "content": "#!/bin/sh\n\nlocal_hook=\"$HOME\"/.git_template.local/hooks/pre-push\n\nif [ -f \"$local_hook\" ]; then\n  . \"$local_hook\"\nfi\n"
  },
  {
    "path": "git_template/hooks/prepare-commit-msg",
    "content": "#!/bin/sh\n\nlocal_hook=\"$HOME\"/.git_template.local/hooks/prepare-commit-msg\n\nif [ -f \"$local_hook\" ]; then\n  . \"$local_hook\"\nfi\n"
  },
  {
    "path": "git_template/info/exclude",
    "content": "# git ls-files --others --exclude-from=.git/info/exclude\n# Lines that start with '#' are comments.\n# For a project mostly in C, the following would be a good set of\n# exclude patterns (uncomment them if you want to use them):\n# *.[oa]\n# *~\n"
  },
  {
    "path": "gitconfig",
    "content": "[init]\n  defaultBranch = main\n  templatedir = ~/.git_template\n[push]\n  default = current\n[color]\n  ui = auto\n[alias]\n  aa = add --all\n  ap = add --patch\n  branches = for-each-ref --sort=-committerdate --format=\\\"%(color:blue)%(authordate:relative)\\t%(color:red)%(authorname)\\t%(color:white)%(color:bold)%(refname:short)\\\" refs/remotes\n  ci = commit -v\n  co = checkout\n  pf = push --force-with-lease\n  st = status\n[core]\n  excludesfile = ~/.gitignore\n  autocrlf = input\n[merge]\n  ff = only\n[commit]\n  template = ~/.gitmessage\n[fetch]\n  prune = true\n[rebase]\n  autosquash = true\n[include]\n  path = ~/.gitconfig.local\n[diff]\n  colorMoved = zebra\n"
  },
  {
    "path": "gitignore",
    "content": "*.pyc\n*.sw[nop]\n.DS_Store\n.bundle\n.byebug_history\n.env\n.git/\n/bower_components/\n/log\n/node_modules/\n/tmp\ndb/*.sqlite3\nlog/*.log\nrerun.txt\ntmp/**/*\n/tags\n"
  },
  {
    "path": "gitmessage",
    "content": "\n\n# 50-character subject line\n#\n# 72-character wrapped longer description. This should answer:\n#\n# * Why was this change necessary?\n# * How does it address the problem?\n# * Are there any side effects?\n#\n# Include a link to the ticket, if any.\n#\n# Add co-authors if you worked on this code with others:\n#\n# Co-authored-by: Full Name <email@example.com>\n# Co-authored-by: Full Name <email@example.com>\n"
  },
  {
    "path": "hooks/post-up",
    "content": "#!/bin/sh\n\ntouch \"$HOME\"/.psqlrc.local\n\nif [ -e \"$HOME\"/.vim/autoload/plug.vim ]; then\n  vim -E -s +PlugUpgrade +qa\nelse\n  curl -fLo \"$HOME\"/.vim/autoload/plug.vim --create-dirs \\\n      https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim\nfi\n\nvim -u \"$HOME\"/.vimrc.bundles +PlugUpdate +PlugClean! +qa\n\nreset -Q\n\nif [ -f \"$HOME/.git_template/HEAD\" ] && \\\n  [ \"$(cat \"$HOME/.git_template/HEAD\")\" = \"ref: refs/heads/main\" ]; then\n  echo \"Removing ~/.git_template/HEAD in favor of defaultBranch\" >&2\n  rm -f ~/.git_template/HEAD\nfi\n\n# detect old OS X broken /etc/zshenv and suggest rename\nif grep -qw path_helper /etc/zshenv 2>/dev/null; then\n  dir=$(CDPATH= cd -- \"$(dirname -- \"$0\")\" && pwd -P)\n\n  cat <<MSG >&2\nWarning: \\`/etc/zshenv' configuration file on your system may cause unexpected\nPATH changes on subsequent invocations of the zsh shell. The solution is to\nrename the file to \\`zprofile':\n  sudo mv /etc/{zshenv,zprofile}\n\n(called from ${dir}/post-up:${LINENO})\n\nMSG\nfi\n"
  },
  {
    "path": "hushlogin",
    "content": ""
  },
  {
    "path": "psqlrc",
    "content": "-- Official docs: http://www.postgresql.org/docs/9.3/static/app-psql.html\n-- Unofficial docs: http://robots.thoughtbot.com/improving-the-command-line-postgres-experience\n\n-- Don't display the \"helpful\" message on startup.\n\\set QUIET 1\n\\pset null '[NULL]'\n\n-- http://www.postgresql.org/docs/9.3/static/app-psql.html#APP-PSQL-PROMPTING\n\\set PROMPT1 '%[%033[1m%]%M %n@%/%R%[%033[0m%]%# '\n-- PROMPT2 is printed when the prompt expects more input, like when you type\n-- SELECT * FROM<enter>. %R shows what type of input it expects.\n\\set PROMPT2 '[more] %R > '\n\n-- Show how long each query takes to execute\n\\timing\n\n-- Use best available output format\n\\x auto\n\\set VERBOSITY verbose\n\\set HISTFILE ~/.psql_history- :DBNAME\n\\set HISTCONTROL ignoredups\n\\set COMP_KEYWORD_CASE upper\n\\unset QUIET\n\n-- psql can't check for a file's existence, so we'll provide an empty local\n-- file that users can override with their custom dotfiles. To set your own\n-- personal settings, place your own file in ~/.psqlrc.local\n\\i ~/.psqlrc.local\n"
  },
  {
    "path": "railsrc",
    "content": "--database=postgresql\n--skip-test\n--skip-rubocop\n"
  },
  {
    "path": "rcrc",
    "content": "EXCLUDES=\"*.md LICENSE CODEOWNERS\"\nDOTFILES_DIRS=\"$HOME/dotfiles-local $HOME/dotfiles\"\nCOPY_ALWAYS=\"git_template/HEAD\"\n"
  },
  {
    "path": "rspec",
    "content": "--colour\n--order random\n"
  },
  {
    "path": "tmux.conf",
    "content": "# improve colors\nset -g default-terminal 'screen-256color'\n\n# act like vim\nsetw -g mode-keys vi\nbind-key h select-pane -L\nbind-key j select-pane -D\nbind-key k select-pane -U\nbind-key l select-pane -R\nbind-key -r C-h select-window -t :-\nbind-key -r C-l select-window -t :+\n\nset -g prefix2 C-s\n\n# start window numbers at 1 to match keyboard order with tmux window order\nset -g base-index 1\nset-window-option -g pane-base-index 1\n\n# renumber windows sequentially after closing any of them\nset -g renumber-windows on\n\n# soften status bar color from harsh green to light gray\nset -g status-style bg='#666666',fg='#aaaaaa'\n\n# remove administrative debris (session name, hostname, time) in status bar\nset -g status-left ''\nset -g status-right ''\n\n# increase scrollback lines\nset -g history-limit 10000\n\n# prefix -> back-one-character\nbind-key C-b send-prefix\n# prefix-2 -> forward-incremental-history-search\nbind-key C-s send-prefix -2\n\n# don't suspend-client\nunbind-key C-z\n\n# Local config\nif-shell \"[ -f ~/.tmux.conf.local ]\" 'source ~/.tmux.conf.local'\n"
  },
  {
    "path": "vim/ftplugin/css.vim",
    "content": "setlocal iskeyword+=-\n"
  },
  {
    "path": "vim/ftplugin/gitcommit.vim",
    "content": "\" Automatically wrap at 72 characters and spell check commit messages\nautocmd BufNewFile,BufRead PULLREQ_EDITMSG set syntax=gitcommit\nsetlocal textwidth=72\nsetlocal spell\n"
  },
  {
    "path": "vim/ftplugin/go.vim",
    "content": "let g:go_fmt_command = \"goimports\"\n\nsetlocal listchars=tab:\\ \\ ,trail:·,nbsp:·\nsetlocal noexpandtab\n\ncompiler go\n"
  },
  {
    "path": "vim/ftplugin/markdown.vim",
    "content": "\" Enable spellchecking\nsetlocal spell\n\n\" Automatically wrap at 80 characters\nsetlocal textwidth=80\n"
  },
  {
    "path": "vim/ftplugin/sass.vim",
    "content": "setlocal iskeyword+=-\n"
  },
  {
    "path": "vim/ftplugin/scss.vim",
    "content": "setlocal iskeyword+=-\n"
  },
  {
    "path": "vim/plugin/ctags.vim",
    "content": "\" Exclude Javascript files in :Rtags via rails.vim due to warnings when parsing\nlet g:Tlist_Ctags_Cmd=\"ctags --exclude='*.js'\"\n\n\" Index ctags from any project, including those outside Rails\nfunction! ReindexCtags()\n  let l:ctags_hook_file = \"$(git rev-parse --show-toplevel)/.git/hooks/ctags\"\n  let l:ctags_hook_path = system(\"echo \" . l:ctags_hook_file)\n  let l:ctags_hook_path = substitute(l:ctags_hook_path, '\\n\\+$', '', '')\n\n  if filereadable(expand(l:ctags_hook_path))\n    exec '!'. l:ctags_hook_file\n  else\n    exec \"!ctags -R .\"\n  endif\nendfunction\n\n\" to stop this mapping from being added, put this in $MYVIMRC:\n\"   let g:thoughtbot_ctags_mappings_enabled = 0\nlet g:thoughtbot_ctags_mappings_enabled = get(g:, 'thoughtbot_ctags_mappings_enabled', 1)\nif g:thoughtbot_ctags_mappings_enabled != 0\n  nmap <Leader>ct :call ReindexCtags()<CR>\nendif\n"
  },
  {
    "path": "vimrc",
    "content": "set encoding=utf-8\n\n\" Leader\nlet mapleader = \" \"\n\nset backspace=2   \" Backspace deletes like most programs in insert mode\nset nobackup\nset nowritebackup\nset noswapfile    \" http://robots.thoughtbot.com/post/18739402579/global-gitignore#comment-458413287\nset history=50\nset ruler         \" show the cursor position all the time\nset showcmd       \" display incomplete commands\nset termguicolors \" make our colors pretty\nset incsearch     \" do incremental searching\nset laststatus=2  \" Always display the status line\nset autowrite     \" Automatically :write before running commands\nset modelines=0   \" Disable modelines as a security precaution\nset nomodeline\n\n\" Switch syntax highlighting on, when the terminal has colors\n\" Also switch on highlighting the last used search pattern.\nif (&t_Co > 2 || has(\"gui_running\")) && !exists(\"syntax_on\")\n  syntax on\nendif\n\nif filereadable(expand(\"~/.vimrc.bundles\"))\n  source ~/.vimrc.bundles\nendif\n\n\" Load matchit.vim, but only if the user hasn't installed a newer version.\nif !exists('g:loaded_matchit') && findfile('plugin/matchit.vim', &rtp) ==# ''\n  runtime! macros/matchit.vim\nendif\n\nfiletype plugin indent on\n\naugroup vimrcEx\n  autocmd!\n\n  \" When editing a file, always jump to the last known cursor position.\n  \" Don't do it for commit messages, when the position is invalid, or when\n  \" inside an event handler (happens when dropping a file on gvim).\n  autocmd BufReadPost *\n    \\ if &ft != 'gitcommit' && line(\"'\\\"\") > 0 && line(\"'\\\"\") <= line(\"$\") |\n    \\   exe \"normal g`\\\"\" |\n    \\ endif\n\n  \" Set syntax highlighting for specific file types\n  autocmd BufRead,BufNewFile *.md set filetype=markdown\n  autocmd BufRead,BufNewFile .{jscs,jshint,eslint}rc set filetype=json\n  autocmd BufRead,BufNewFile\n    \\ aliases.local,\n    \\zshenv.local,zlogin.local,zlogout.local,zshrc.local,zprofile.local,\n    \\*/zsh/configs/*\n    \\ set filetype=sh\n  autocmd BufRead,BufNewFile gitconfig.local set filetype=gitconfig\n  autocmd BufRead,BufNewFile tmux.conf.local set filetype=tmux\n  autocmd BufRead,BufNewFile vimrc.local set filetype=vim\naugroup END\n\n\" ALE linting events\naugroup ale\n  autocmd!\n\n  if g:has_async\n    autocmd VimEnter *\n      \\ set updatetime=1000 |\n      \\ let g:ale_lint_on_text_changed = 0\n    autocmd CursorHold * call ale#Queue(0)\n    autocmd CursorHoldI * call ale#Queue(0)\n    autocmd InsertEnter * call ale#Queue(0)\n    autocmd InsertLeave * call ale#Queue(0)\n  else\n    echoerr \"The thoughtbot dotfiles require NeoVim or Vim 8\"\n  endif\naugroup END\n\n\" When the type of shell script is /bin/sh, assume a POSIX-compatible\n\" shell for syntax highlighting purposes.\nlet g:is_posix = 1\n\n\" Softtabs, 2 spaces\nset tabstop=2\nset shiftwidth=2\nset shiftround\nset expandtab\n\n\" Display extra whitespace\nset list listchars=tab:»·,trail:·,nbsp:·\n\n\" Use one space, not two, after punctuation.\nset nojoinspaces\n\n\" Use ripgrep https://github.com/BurntSushi/ripgrep\nif executable('rg')\n  \" Use Rg over Grep\n  set grepprg=rg\\ --vimgrep\\ --no-heading\\ --smart-case\n\n  \" Use rg in fzf for listing files. Lightning fast and respects .gitignore\n  let $FZF_DEFAULT_COMMAND = 'rg --files --hidden --follow --glob \"!.git/*\"'\n\n  nnoremap \\ :Rg<SPACE>\n\" Use The Silver Searcher https://github.com/ggreer/the_silver_searcher\nelseif executable('ag')\n  \" Use Ag over Grep\n  set grepprg=ag\\ --nogroup\\ --nocolor\n\n  \" Use ag in fzf for listing files. Lightning fast and respects .gitignore\n  let $FZF_DEFAULT_COMMAND = 'ag --literal --files-with-matches --nocolor --hidden -g \"\"'\n\n  nnoremap \\ :Ag<SPACE>\nendif\n\n\" Make it obvious where 80 characters is\nset textwidth=80\nset colorcolumn=+1\n\n\" Numbers\nset number\nset numberwidth=5\n\n\" Tab completion\n\" will insert tab at beginning of line,\n\" will use completion if not at beginning\nset wildmode=list:longest,list:full\nfunction! InsertTabWrapper()\n    let col = col('.') - 1\n    if !col || getline('.')[col - 1] !~ '\\k'\n        return \"\\<Tab>\"\n    else\n        return \"\\<C-p>\"\n    endif\nendfunction\ninoremap <Tab> <C-r>=InsertTabWrapper()<CR>\ninoremap <S-Tab> <C-n>\n\n\" Switch between the last two files\nnnoremap <Leader><Leader> <C-^>\n\n\" vim-test mappings\nnnoremap <silent> <Leader>t :TestFile<CR>\nnnoremap <silent> <Leader>s :TestNearest<CR>\nnnoremap <silent> <Leader>l :TestLast<CR>\nnnoremap <silent> <Leader>a :TestSuite<CR>\nnnoremap <silent> <Leader>gt :TestVisit<CR>\n\n\" Run commands that require an interactive shell\nnnoremap <Leader>r :RunInInteractiveShell<Space>\n\n\" Treat <li> and <p> tags like the block tags they are\nlet g:html_indent_tags = 'li\\|p'\n\n\" Set tags for vim-fugitive\nset tags^=.git/tags\n\n\" Open new split panes to right and bottom, which feels more natural\nset splitbelow\nset splitright\n\n\" Quicker window movement\nnnoremap <C-j> <C-w>j\nnnoremap <C-k> <C-w>k\nnnoremap <C-h> <C-w>h\nnnoremap <C-l> <C-w>l\n\n\" Move between linting errors\nnnoremap ]r :ALENextWrap<CR>\nnnoremap [r :ALEPreviousWrap<CR>\n\n\" Map Ctrl + p to open fuzzy find (FZF)\nnnoremap <c-p> :Files<cr>\n\n\" Set spellfile to location that is guaranteed to exist, can be symlinked to\n\" Dropbox or kept in Git and managed outside of thoughtbot/dotfiles using rcm.\nset spellfile=$HOME/.vim-spell-en.utf-8.add\n\n\" Autocomplete with dictionary words when spell check is on\nset complete+=kspell\n\n\" Always use vertical diffs\nset diffopt+=vertical\n\n\" Use Catpuccin Latte as our default color scheme\ncolorscheme catppuccin_latte\n\n\" Local config\nif filereadable($HOME . \"/.vimrc.local\")\n  source ~/.vimrc.local\nendif\n"
  },
  {
    "path": "vimrc.bundles",
    "content": "if &compatible\n  set nocompatible\nend\n\n\" Remove declared plugins\nfunction! s:UnPlug(plug_name)\n  if has_key(g:plugs, a:plug_name)\n    call remove(g:plugs, a:plug_name)\n  endif\nendfunction\ncommand!  -nargs=1 UnPlug call s:UnPlug(<args>)\n\nlet g:has_async = v:version >= 800 || has('nvim')\n\ncall plug#begin('~/.vim/bundle')\n\n\" Define bundles via Github repos\nPlug 'christoomey/vim-run-interactive'\n\n\" If fzf has already been installed via Homebrew, use the existing fzf\n\" Otherwise, install fzf. The `--all` flag makes fzf accessible outside of vim\nif executable(\"brew\")\n  let g:brew_fzf_path = trim(system(\"brew --prefix fzf\"))\nendif\n\nif exists(\"g:brew_fzf_path\") && isdirectory(g:brew_fzf_path)\n  Plug g:brew_fzf_path \nelse\n  Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }\nendif\n\nPlug 'catppuccin/vim', { 'as': 'catppuccin' }\nPlug 'junegunn/fzf.vim'\nPlug 'elixir-lang/vim-elixir'\nPlug 'fatih/vim-go'\nPlug 'janko-m/vim-test'\nPlug 'pangloss/vim-javascript'\nPlug 'pbrisbin/vim-mkdir'\nPlug 'slim-template/vim-slim'\nPlug 'tpope/vim-bundler'\nPlug 'tpope/vim-endwise'\nPlug 'tpope/vim-eunuch'\nPlug 'tpope/vim-fugitive'\nPlug 'tpope/vim-projectionist'\nPlug 'tpope/vim-rails'\nPlug 'tpope/vim-rake'\nPlug 'tpope/vim-repeat'\nPlug 'tpope/vim-rhubarb'\nPlug 'tpope/vim-surround'\nPlug 'vim-ruby/vim-ruby'\nPlug 'vim-scripts/tComment'\n\nif g:has_async\n  Plug 'dense-analysis/ale'\nendif\n\nif filereadable(expand(\"~/.vimrc.bundles.local\"))\n  source ~/.vimrc.bundles.local\nendif\n\ncall plug#end()\n"
  },
  {
    "path": "zprofile",
    "content": "if [ -d \"/opt/homebrew\" ]; then\n  eval \"$(/opt/homebrew/bin/brew shellenv)\"\nelif [ -d \"~/.linuxbrew\" ]; then\n  eval \"$(~/.linuxbrew/bin/brew shellenv)\"\nelif [ -d \"/home/linuxbrew\" ]; then\n  eval \"$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)\"\nfi\n"
  },
  {
    "path": "zsh/completion/_ag",
    "content": "#compdef ag\n\nif (( CURRENT == 2 )); then\n  compadd $(cut -f 1 tmp/tags .git/tags 2>/dev/null)\nelse;\n  _files\nfi\n"
  },
  {
    "path": "zsh/completion/_bundler",
    "content": "#compdef bundle\n\nlocal curcontext=\"$curcontext\" state line _gems _opts ret=1\n\n_arguments -C -A \"-v\" -A \"--version\" \\\n  '(- 1 *)'{-v,--version}'[display version information]' \\\n  '1: :->cmds' \\\n  '*:: :->args' && ret=0\n\ncase $state in\n  cmds)\n    _values \"bundle command\" \\\n      \"install[Install the gems specified by the Gemfile or Gemfile.lock]\" \\\n      \"update[Update dependencies to their latest versions]\" \\\n      \"package[Package the .gem files required by your application]\" \\\n      \"exec[Execute a script in the context of the current bundle]\" \\\n      \"config[Specify and read configuration options for bundler]\" \\\n      \"check[Determine whether the requirements for your application are installed]\" \\\n      \"list[Show all of the gems in the current bundle]\" \\\n      \"show[Show the source location of a particular gem in the bundle]\" \\\n      \"console[Start an IRB session in the context of the current bundle]\" \\\n      \"open[Open an installed gem in the editor]\" \\\n      \"lock[Generate a lockfile for your dependencies]\" \\\n      \"viz[Generate a visual representation of your dependencies]\" \\\n      \"init[Generate a simple Gemfile, placed in the current directory]\" \\\n      \"gem[Create a simple gem, suitable for development with bundler]\" \\\n      \"help[Describe available tasks or one specific task]\" \\\n      \"platform[Displays platform compatibility information]\" \\\n      \"outdated[Show all of the outdated gems in the current bundle]\" \\\n      \"clean[Cleans up unused gems in your bundler directory]\"\n    ret=0\n    ;;\n  args)\n    case $line[1] in\n      help)\n        _values 'commands' 'install' 'update' 'package' 'exec' 'config' 'check' 'list' 'show' 'console' 'open' 'lock' 'viz' 'init' 'gem' 'help' 'platform' 'outdated' 'clean' && ret=0\n        ;;\n      install)\n        _arguments \\\n          '(--no-color)--no-color[disable colorization in output]' \\\n          '(--local)--local[do not attempt to connect to rubygems.org]' \\\n          '(--quiet)--quiet[only output warnings and errors]' \\\n          '(--gemfile)--gemfile=-[use the specified gemfile instead of Gemfile]:gemfile' \\\n          '(--system)--system[install to the system location]' \\\n          '(--deployment)--deployment[install using defaults tuned for deployment environments]' \\\n          '(--frozen)--frozen[do not allow the Gemfile.lock to be updated after this install]' \\\n          '(--path)--path=-[specify a different path than the system default]:path:_files' \\\n          '(--binstubs)--binstubs=-[generate bin stubs for bundled gems to ./bin]:directory:_files' \\\n          '(--without)--without=-[exclude gems that are part of the specified named group]:groups'\n        ret=0\n        ;;\n      exec)\n        _normal && ret=0\n        ;;\n      (open|show)\n        _gems=( $(bundle show 2> /dev/null | sed -e '/^  \\*/!d; s/^  \\* \\([^ ]*\\) .*/\\1/') )\n        if [[ $_gems != \"\" ]]; then\n          _values 'gems' $_gems && ret=0\n        fi\n        ;;\n      *)\n        _opts=(  $(bundle help $line[1] | sed -e '/^  \\[-/!d; s/^  \\[\\(-[^=]*\\)=.*/\\1/') )\n        _opts+=( $(bundle help $line[1] | sed -e '/^  -/!d; s/^  \\(-.\\), \\[\\(-[^=]*\\)=.*/\\1 \\2/') )\n        if [[ $_opts != \"\" ]]; then\n          _values 'options' $_opts && ret=0\n        fi\n        ;;\n    esac\n    ;;\nesac\n\nreturn ret\n"
  },
  {
    "path": "zsh/completion/_g",
    "content": "#compdef g\ncompdef g=git\n"
  },
  {
    "path": "zsh/completion/_production",
    "content": "#compdef production\ncompdef production=heroku\n"
  },
  {
    "path": "zsh/completion/_rspec",
    "content": "#compdef rspec\n\ncompadd -P spec/ $(ls spec/**/*_spec.rb | sed -E \"s/spec\\///g\")\n"
  },
  {
    "path": "zsh/completion/_staging",
    "content": "#compdef staging\ncompdef staging=heroku\n"
  },
  {
    "path": "zsh/configs/color.zsh",
    "content": "# makes color constants available\nautoload -U colors\ncolors\n\n# enable colored output from ls, etc. on FreeBSD-based systems\nexport CLICOLOR=1\n"
  },
  {
    "path": "zsh/configs/editor.zsh",
    "content": "export VISUAL=vim\nexport EDITOR=$VISUAL\n"
  },
  {
    "path": "zsh/configs/fzf.zsh",
    "content": "#!/usr/bin/env zsh\n\nif command -v fzf > /dev/null; then\n  source <(fzf --zsh)\nelif [[ -x ~/.fzf/bin/fzf ]]; then\n  source <(~/.fzf/bin/fzf --zsh)\nfi\n"
  },
  {
    "path": "zsh/configs/history.zsh",
    "content": "#!/usr/bin/env zsh\n\nsetopt hist_ignore_all_dups hist_ignore_space inc_append_history share_history\n\nHISTFILE=~/.zhistory\nHISTSIZE=32768\nSAVEHIST=\"${HISTSIZE}\"\n\nexport ERL_AFLAGS=\"-kernel shell_history enabled\"\n"
  },
  {
    "path": "zsh/configs/homebrew.zsh",
    "content": "# To opt in to Homebrew analytics, `unset` this in ~/.zshrc.local .\n# Learn more about what you are opting in to at\n# https://docs.brew.sh/Analytics\nexport HOMEBREW_NO_ANALYTICS=1\n"
  },
  {
    "path": "zsh/configs/keybindings.zsh",
    "content": "# give us access to ^Q\nstty -ixon\n\n# vi mode\nbindkey -v\nbindkey \"^F\" vi-cmd-mode\n\n# handy keybindings\nbindkey \"^A\" beginning-of-line\nbindkey \"^E\" end-of-line\nbindkey \"^K\" kill-line\nbindkey \"^P\" history-search-backward\nbindkey \"^Y\" accept-and-hold\nbindkey \"^N\" insert-last-word\nbindkey \"^Q\" push-line-or-edit\nbindkey -s \"^T\" \"^[Isudo ^[A\" # \"t\" for \"toughguy\"\n"
  },
  {
    "path": "zsh/configs/options.zsh",
    "content": "# awesome cd movements from zshkit\nsetopt autocd autopushd pushdminus pushdsilent pushdtohome cdablevars\nDIRSTACKSIZE=5\n\n# Enable extended globbing\nsetopt extendedglob\n\n# Allow [ or ] whereever you want\nunsetopt nomatch\n"
  },
  {
    "path": "zsh/configs/post/completion.zsh",
    "content": "# load our own completion functions\nfpath=(~/.zsh/completion /usr/local/share/zsh/site-functions $fpath)\n\n# completion; use cache if updated within 24h\nautoload -Uz compinit\nif [[ -n $HOME/.zcompdump(#qN.mh+24) ]]; then\n  compinit -d $HOME/.zcompdump;\nelse\n  compinit -C;\nfi;\n\n# disable zsh bundled function mtools command mcd\n# which causes a conflict.\ncompdef -d mcd\n"
  },
  {
    "path": "zsh/configs/post/path.zsh",
    "content": "# ensure dotfiles bin directory is loaded first\nPATH=\"$HOME/.bin:/usr/local/sbin:$PATH\"\n\n# Try loading ASDF from the regular home dir location\nif [ -f \"$HOME/.asdf/asdf.sh\" ]; then\n  . \"$HOME/.asdf/asdf.sh\"\nelif which brew >/dev/null && [ -f \"$(brew --prefix asdf)/libexec/asdf.sh\" ]; then\n  . \"$(brew --prefix asdf)/libexec/asdf.sh\"\nfi\n\n# mkdir .git/safe in the root of repositories you trust\nPATH=\".git/safe/../../bin:$PATH\"\n\nexport -U PATH\n"
  },
  {
    "path": "zsh/configs/prompt.zsh",
    "content": "# modify the prompt to contain git branch name if applicable\ngit_prompt_info() {\n  current_branch=$(git current-branch 2> /dev/null)\n  if [[ -n $current_branch ]]; then\n    echo \" %{$fg_bold[green]%}$current_branch%{$reset_color%}\"\n  fi\n}\n\nsetopt promptsubst\n\n# Allow exported PS1 variable to override default prompt.\nif ! env | grep -q '^PS1='; then\n  PS1='${SSH_CONNECTION+\"%{$fg_bold[green]%}%n@%m:\"}%{$fg_bold[blue]%}%c%{$reset_color%}$(git_prompt_info) %# '\nfi\n"
  },
  {
    "path": "zsh/functions/_git_delete_branch",
    "content": "_git_delete_branch ()\n{\n  __gitcomp \"$(__git_heads)\"\n}\n"
  },
  {
    "path": "zsh/functions/change-extension",
    "content": "# Change file extensions recursively in current directory\n#\n#   change-extension erb haml\n\nfunction change-extension() {\n  foreach f (**/*.$1)\n    mv $f $f:r.$2\n  end\n}\n"
  },
  {
    "path": "zsh/functions/envup",
    "content": "# Load .env file into shell session for environment variables\n\nfunction envup() {\n  if [ -f .env ]; then\n    export $(sed '/^ *#/ d' .env)\n  else\n    echo 'No .env file found' 1>&2\n    return 1\n  fi\n}\n"
  },
  {
    "path": "zsh/functions/g",
    "content": "# No arguments: `git status`\n# With arguments: acts like `git`\ng() {\n  if [[ $# -gt 0 ]]; then\n    git \"$@\"\n  else\n    git status\n  fi\n}\n"
  },
  {
    "path": "zsh/functions/mcd",
    "content": "# Make directory and change into it.\n\nfunction mcd() {\n  mkdir -p \"$1\" && cd \"$1\";\n}\n"
  },
  {
    "path": "zshenv",
    "content": "local _old_path=\"$PATH\"\n\n# Local config\n[[ -f ~/.zshenv.local ]] && source ~/.zshenv.local\n\nif [[ $PATH != $_old_path ]]; then\n  # `colors` isn't initialized yet, so define a few manually\n  typeset -AHg fg fg_bold\n  if [ -t 2 ]; then\n    fg[red]=$'\\e[31m'\n    fg_bold[white]=$'\\e[1;37m'\n    reset_color=$'\\e[m'\n  else\n    fg[red]=\"\"\n    fg_bold[white]=\"\"\n    reset_color=\"\"\n  fi\n\n  cat <<MSG >&2\n${fg[red]}Warning:${reset_color} your \\`~/.zshenv.local' configuration seems to edit PATH entries.\nPlease move that configuration to \\`.zshrc.local' like so:\n  ${fg_bold[white]}cat ~/.zshenv.local >> ~/.zshrc.local && rm ~/.zshenv.local${reset_color}\n\n(called from ${(%):-%N:%i})\n\nMSG\nfi\n\nunset _old_path\n"
  },
  {
    "path": "zshrc",
    "content": "# load custom executable functions\nfor function in ~/.zsh/functions/*; do\n  source $function\ndone\n\n# extra files in ~/.zsh/configs/pre , ~/.zsh/configs , and ~/.zsh/configs/post\n# these are loaded first, second, and third, respectively.\n_load_settings() {\n  _dir=\"$1\"\n  if [ -d \"$_dir\" ]; then\n    if [ -d \"$_dir/pre\" ]; then\n      for config in \"$_dir\"/pre/**/*~*.zwc(N-.); do\n        . $config\n      done\n    fi\n\n    for config in \"$_dir\"/**/*(N-.); do\n      case \"$config\" in\n        \"$_dir\"/(pre|post)/*|*.zwc)\n          :\n          ;;\n        *)\n          . $config\n          ;;\n      esac\n    done\n\n    if [ -d \"$_dir/post\" ]; then\n      for config in \"$_dir\"/post/**/*~*.zwc(N-.); do\n        . $config\n      done\n    fi\n  fi\n}\n_load_settings \"$HOME/.zsh/configs\"\n\neval \"$(/opt/homebrew/bin/brew shellenv)\"\n\nexport PATH=\"${ASDF_DATA_DIR:-$HOME/.asdf}/shims:$PATH\"\n\n# Local config\n[[ -f ~/.zshrc.local ]] && source ~/.zshrc.local\n\n# aliases\n[[ -f ~/.aliases ]] && source ~/.aliases\n"
  }
]