Commit graph

413 commits

Author SHA1 Message Date
Joe Ferris
56d614f806
Initialize new repositories with a main branch
New Git repositories start out without any branches, but the HEAD
reference points to "master" by default. This means that the first
commit will create a master branch.

This change adds a HEAD file to the Git template with a different ref.
This means that new repositories will commit to a "main" branch by
default instead.

The HEAD file is added to COPY_ALWAYS, because Git's HEAD must be a
regular file and not a symbolic link.
2020-06-19 14:08:12 -04:00
Geoff Harcourt
2e3d643c54 Fetch origin and rebase against origin with git-up
In f252ba4 we lost some of the functionality of `git-up`. This change
brings back rebasing against the origin's reference and not the local
reference of the main branch. We also explicitly fetch from `origin` now
to be sure we're current before rebasing.

Close #671
2020-06-18 13:53:53 -04:00
Rob Whittaker
d499cc56db
Add fetch into Git "up" function
In [a previous commit], we removed the fetching of the "origin" remote
from the "up" Git function. With this change, developers had to fetch
manually before rebasing their branch. We added the fetch back into the
"up" Git function.

[a previous commit]: f252ba46d1 (diff-b973d5fb5d66981ace5c069881095355)
2020-06-18 14:50:10 +01:00
Daniel Barber
f07398b032 No primary branch reference is an error 2020-06-17 17:07:23 -04:00
Daniel Barber
5a10c0c096 Get the name of the main branch from remote 2020-06-17 17:07:23 -04:00
Daniel Barber
69a95f60ea Accept optional branch name
There's been a recent movement to rename the "master" branch in git
repositories to "main" to avoid to potentially problematic word
"master". Our `merge-branch` script was hard coded to "master". This PR
makes it possible to pass in the name of the branch you wish to merge
to. I've defaulted it to "master" for now, but I expect in time this
will change.
2020-06-17 17:07:23 -04:00
Geoff Harcourt
f252ba46d1 Allow flexible trunk branch for git-up
Our team is renaming the base branch of our application from `master` to
`trunk`. I had held off on doing this in the past because `git up -i`
has become such an huge muscle memory thing and I didn't want a script
to only work on some of my frequent repositories.

This [trick from Stack Overflow](https://stackoverflow.com/a/49384283/1190970)
shows how to grab the name of the primary branch for a remote branch without an
expensive git operation. It'll allow a rebase against the tip of the primary
remote branch regardless of its name.
2020-06-12 13:27:17 -04:00
Tyson Gach
aaa2c3cd09 Configure asdf's legacy_version_file setting
asdf has a very useful configuration setting called
`legacy_version_file`. When it is set to `yes`, asdf will read the
version files used by other version managers (e.g. `.ruby-version`) in
addition to asdf's own `.tool-versions` file. This makes the migration
to asdf much smoother, as many projects only specify these 'legacy'
dotfiles for versioning.

Documentation: https://asdf-vm.com/#/core-configuration?id=homeasdfrc

Closes https://github.com/thoughtbot/dotfiles/issues/654
2020-03-01 22:21:42 -05:00
Kevin Burnett
d657a32ba5 ensure good exit status for aliases script 2020-01-17 18:36:32 -05:00
Tyson Gach
0f6351367a
Remove FUNDING.yml
We have instead moved thoughtbot's global `FUNDING.yml` to the
[`thoughtbot/.github`][.github-repo] repo. It's a special repo that
GitHub supports for [setting default community health
files][github-docs].

[.github-repo]: https://github.com/thoughtbot/.github
[github-docs]: https://help.github.com/en/github/building-a-strong-community/creating-a-default-community-health-file-for-your-organization
2019-12-12 13:49:11 -05:00
Tyson Gach
6c21745753
Configure GitHub Sponsors
https://help.github.com/en/github/administering-a-repository/displaying-a-sponsor-button-in-your-repository
2019-12-12 11:25:01 -05:00
Eebs Kobeissi
eeb52a87f6 Adds a commit-msg git hook
People may wish to configure a `commit-msg` hook in their local
dotfiles.

This allows them to do so by adding a [`commit-msg` git hook][1] that
checks for the presence of a local `commit-msg` hook, and runs it if
present. This hook follows the existing pattern we use for other git
hooks.

[1]: https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks
2019-11-18 09:29:31 -05:00
Stephanie Viccari
d27cceb0be Revise how we check for existing FZF executable
Summary:
This change addresses an error that occurs when we've instructed vim to
reference the wrong path for an existing FZF executable.

Additional Details:
In the previous approach, when checking if FZF has already been
installed, we make the assumption that if FZF is `executable` it was
installed via Homebrew. Then, based on that assumption, we set vim's
`runtimepath` to reference the directory where Homebrew creates symlinks
for installed packages (`/user/local/opt`).

Because of this assumption, anyone that has FZF installed in a different
directory, and available as an executable in their $PATH, attempting to
use FZF within vim will result in an error. The reason vim errors is
because `Plug` has instructed vim's `runtimepath` to look in the wrong
location for FZF (in this case, we told vim to look for FZF within
`/user/local/opt` when the FZF executable lives somewhere else).

The revised approach still attempts to find an existing FZF package
before proceeding with installing FZF.
2019-10-14 23:12:28 -04:00
Carles Jove i Buxeda
0d9416f19c Set tags for vim-fugitive 2019-10-11 09:38:29 -04:00
Jesse Bailey
e38b069478 Update description of migrate alias
Update the README description of the `migrate` alias to match the actual alias
2019-10-11 09:35:41 -04:00
Stephanie Viccari
3001fd3d65 Replace CtrlP with FZF
Summary:
Using CtrlP has proven to be slower and has fewer features. We've been
switching over to FZF on a frequent enough basis that it feels
appropriate to make FZF the new default for fuzzy searching.

By swapping out Ctrlp in favor of FZF, this should not break anyone's
fuzzy search but it will replace the tool that executes the search.

Co-authored-by: Chris Toomey <chris@ctoomey.com>
2019-08-21 14:37:31 -04:00
Roman Frołow
2e49faecfe has-session - only exact matches
from man
>If the session name is prefixed with an ‘=’, only an exact match is accepted (so ‘=mysess’ will only match exactly ‘mysess’, not ‘mysession’).
2019-08-20 14:37:10 -04:00
Alan Yee
cdc55ef186 Disable modeline magic
The modelines option has a history of security issues, particularly with
arbitrary code execution. Best to disable modelines explicitly as a
securiy precaution. More details here:
https://security.stackexchange.com/questions/36001/vim-modeline-vulnerabilities
2019-08-20 14:28:05 -04:00
Geoff Harcourt
e729b1deb3 Update ALE location on Github
ALE has moved to an organization, so the old repository location gets
redirected.
2019-08-20 14:23:43 -04:00
Geoff Harcourt
107bf0b17d Remove vim-coffeescript from default plugins
With the popularity of Babel and ES6, it seems like Coffeescript is no
longer a standard, frequently-used part of the thoughtbot toolset. This
change removes the vim-coffeescript plugin from our default set. Users
who want to retain it can add it back to their `vimrc.bundles.local`.
2019-07-22 08:41:56 -04:00
Daniel Barber
57e23e0e67 Dirname is clearer here 2019-07-17 17:53:22 -04:00
Daniel Barber
52ee922459 Use the location of brew to determine where asdf is 2019-07-17 17:40:42 -04:00
Daniel Barber
dbbae5752b brew --prefix will return something whether ASDF is installed or not
So we should check that the file exists before we try calling it.
2019-07-17 10:09:26 -04:00
Daniel Barber
cdd0d2ced8 Assume people don't change their Homebrew dir
It checks the home directory location and the default Homebrew location
before falling back to `brew --prefix` (Sloooow!)

This also accounts for non macOS systems that don't have Homebrew.
2019-07-17 10:09:26 -04:00
Daniel Barber
2af1b50124 Account for asdf being installed by Homebrew
If `asdf` has been installed via Homebrew the completions file is in a
different place. This PR takes that possibility into account.
2019-07-17 10:09:26 -04:00
Robert Speicher
b1356a9d00 Use tmux 1.9+ syntax for status styling (#635)
As of tmux 1.9, the `-bg`, `-fg`, and `-attr` options were condensed
into a single `-style` option, which takes a comma-separated list of
options.

In tmux 2.9, the old options were fully removed.

See https://git.io/fjR7c for more information.
2019-06-18 09:57:12 +01:00
Mike Burns
6c8205bad4
Make Homebrew analytics opt-in
Currently [Homebrew implements analytics] as opt-out, forcing it on its
users without their enthusiastic consent or a full understanding of the
implications.

This changes it to opt-in: we opt-out by default, and to opt in to
Homebrew analytics we can override it in `~/.zshrc.local`:

```sh
unset HOMEBREW_NO_ANALYTICS
```

[Homebrew implements analytics]: https://docs.brew.sh/Analytics
2019-05-03 10:45:53 -04:00
Roman Frołow
dbb2a3dc51 Use tmux has-session 2019-02-25 20:33:13 -05:00
Benjamin Eskola
46af61168b Make _load_settings() more concise
- Use the `~` glob operator to exclude *.zwc insead of a separate test
  (requires `setopt extendedglob`).
- Exclude both `pre` and `post` in one case alternative.
2019-01-21 20:25:14 -05:00
RJ Dellecese
42c8204e6c Allow easy disabling of all ALE configs
Set `updatetime` option and `g:ale_lint_on_text_changed` variable in an Vim startup autocommand so that they won't be set when the user disables the `ale` augroup (with something like `silent! augroup! ale` or `augroup \ autocmd! \ augroup END`) in their local vimrc.

This allows users to use ALE with its default linting settings without needing to manually `unlet` the `updatetime` option and `g:ale_lint_on_text_changed` variable also.
2019-01-21 20:22:25 -05:00
Carles Jove i Buxeda
a4da3e4523 Add UTF-8 encoding
I started getting errors after a recent Vim upgrade because of line:

`set list listchars=tab:»·,trail:·,nbsp:·`

Adding UTF-8 encoding fixes it.

```text
:h encoding

NOTE: For GTK+ 2 or later, it is highly recommended to set 'encoding'
        to "utf-8".  Although care has been taken to allow different values of
        'encoding', "utf-8" is the natural choice for the environment and
        avoids unnecessary conversion overhead.  "utf-8" has not been made
        the default to prevent different behavior of the GUI and terminal
        versions, and to avoid changing the encoding of newly created files
        without your knowledge (in case 'fileencodings' is empty).
```
2019-01-21 20:17:32 -05:00
Rodrigo Bermúdez Schettino
8a63372e57 README: Mention excluded README-ES
Mention README-ES.md in section of excludes, which is already mentioned in the spanish version of the README (README-ES.md).
2019-01-21 16:10:56 -05:00
Rodrigo Bermúdez Schettino
3fc51be897 README-ES: Improve translation in heading
Add missing question mark and improve existing translation.
2019-01-21 16:10:28 -05:00
Andy Waite
f00e803052 Clarify ctags mapping
`vim/plugin/ctags.vim` shells out to ctags, but this could be Universal
Ctags (see #605).
2018-12-30 20:34:39 -05:00
Ian C. Anderson
2bbb3518f9 Update README-ES.md to use command -v for consistency 2018-12-27 14:01:59 -05:00
Ian C. Anderson
005324f802 Use command -v instead of which
https://stackoverflow.com/questions/592620/how-to-check-if-a-program-exists-from-a-bash-script/677212#677212
2018-12-27 14:01:59 -05:00
Ian C. Anderson
b132c644be Use rg if it's present in bin/replace
I like this `bin/replace` script, but I've recently switched from `ag`
to [ripgrep](https://github.com/BurntSushi/ripgrep). This checks for the
presence of `rg` and uses it in `bin/replace`, passing the correct
parameter to disable colors.
2018-12-27 14:01:59 -05:00
Geoff Harcourt
013f9711af Move from agignore to gitignore
Per @andyw8 in #588:
https://github.com/ggreer/the_silver_searcher/wiki/Advanced-Usage

`agignore` is now deprecated as the place to declare ignored files for
search. We'll put these files into `gitignore` rather than `ignore` so
that we have consistently ignored files between ag, git, etc.

Recommended by @croaky:
bcfa239b31

Close #588
2018-12-16 14:06:13 -05:00
Jared Smith
80972c9b6e Replace ale#lint with ale#queue - ale#lint no longer supported (#615) 2018-10-31 10:56:28 -04:00
Ashwin Vidiyala
695d92f50e Isolate ALE settings into its own augroup 2018-10-01 21:27:00 -04:00
Stephen Hanson
319f1284f9 Set vim syntax for local dotfiles overrides 2018-10-01 20:17:46 -05:00
Jared Smith
88d70fcd12 Fix vim ctag plugin 2018-08-26 21:28:08 -04:00
Jared Smith
51669fc552 Add universal ctags config support 2018-08-26 21:22:41 -04:00
Geoff Harcourt
2b58323de6 Use gitcommit syntax for Github pull requests
This change leverages the existing `gitcommit` syntax rules to apply the
same formatting and highlighting settings to pull request messages when
they are edited from Vim.
2018-07-15 15:50:48 -04:00
Brett MacDonald
d69b67004e Improve successive startup time; fix conflict.
- Don't update completion dump if it has been updated within 24hrs.
- Unload Completion for zsh bundled function mcd to prevent conflict. #594
2018-07-15 15:49:04 -04:00
Geoff Harcourt
ee30830241 Remove no-longer functional git-pr script
The Github `hub` utilty has added a `pr` subcommand, which takes
precedence over `git-pr` in execution order, so this script is no longer
accessible with `git pr` or `hub pr`.
2018-07-13 16:03:07 -04:00
Daniel Colson
6e1c567653
Merge pull request #598 from sublimecoder/master
Change ctag git hook to use universal-ctags tag-relative syntax
2018-06-22 14:17:34 -04:00
Jared Smith
5489e166ee Change ctag git hook to use universal-ctags tag-relative syntax 2018-06-13 00:59:34 -07:00
Derek Prior
21055dff63
Appraisal file is supported by vim-ruby
See: 04fabcc1d5/ftdetect/ruby_extra.vim (L12)
2018-02-25 21:57:42 -05:00
Tyson Gach
ef58e42a24 Add co-author prompt to gitmessage template
GitHub now supports trailers for co-authors. The syntax isn't the
easiest to remember, so having it as a prompt when commiting makes the
process easier.

More info: https://github.com/blog/2496-commit-together-with-co-authors
2018-02-03 15:10:18 -05:00