Commit graph

437 commits

Author SHA1 Message Date
Dan Croak
ddfb130025 Disable Rubygem documentation to make Bundler fast 2013-11-23 15:41:23 -08:00
Dan Croak
4f5a2edc33 Spell-check Markdown by type, not file extension
Previously, only `*.md` files would get spell-checking. This change adds
`*.markdown` and decouples Markdown spell-checking by file extension.

http://robots.thoughtbot.com/vim-spell-checking/
2013-11-22 16:01:48 -08:00
Mike Burns
fd9d6354cf The user is able to type [ or ]
There are many workarounds[1] to the

    zsh: no matches found: ...

issue, but let's just stop it at its core: turn off that `nomatch`
functionality.

Apologies to all who enjoy seeing the pun around:

    % got a light?
    zsh: no matches found: light?

But all good shell puns[2] must come to an end.

[1] http://robots.thoughtbot.com/post/18129303042/how-to-use-arguments-in-a-rake-task
[2] http://www-users.cs.york.ac.uk/susan/joke/unix.htm
2013-10-08 10:02:26 +02:00
Mike Burns
11a5504dfe Add a commit message template
Using the `commit.template` setting, read in a commit message template
for each commit. This template is commented out so the commit message
author doesn't need to delete it.

The template serves as a reminder on how to write a better commit
message. The bullets are taken from Caleb's blog post[1]. There is no
_problem_ per se -- we are writing good messages these days -- but it's
handy to be reminded of things to think about. For example, people often
forget to note whether there are any side effects.

This message does not show on `git commit --amend`, only normal `git
commit`.

[1] http://bit.ly/13HWyiy
2013-10-08 09:59:44 +02:00
Joël Quenneville
82acdf7fa4 Globally ignore .env file
It is a common practice to store environment variables in a .env file in
development. This file is read by tools such as foreman and dotenv. This
file can contain sensitive information such as secret keys and should
always be excluded from version control
2013-09-20 11:12:21 -04:00
Chris Toomey
655a76a6c1 Add envup script for loading environment variables 2013-09-13 15:29:18 -04:00
Joe Ferris
81a33f78d8 Set 'autowrite'
* Automatically :write before commands such as `:next` or `:!`
* Saves keystrokes by eliminating writes before running tests, etc
* See `:help 'autowrite'` for more information
2013-09-12 15:56:12 -04:00
Dan Croak
338cc0fb92 Allow backspacing over everything in insert mode
The previous setting frequently slowed my ability to edit.
2013-09-11 14:09:52 -07:00
Joël Quenneville
a4dff5ea80 Don't cache CtrlP results when using ag
It gets very annoying to manually force CtrlP to re-index every time I
add a new file. Since ag is so fast, we can turn off caching when it
powers CtrlP without any noticeable impact on search speed.
2013-08-23 17:28:03 -04:00
Joël Quenneville
ee00ab0cbe Add rspec config file
* Colorize output
* Run tests in random order
* Profile 5 (default of 10 is too noisy)
2013-08-09 17:35:05 -04:00
Sterling Cobb
b024bdcd3a Allow for a local tmux.config file 2013-08-03 11:14:31 -07:00
David Larrabee
5994cf10eb Adds local configuration file for vim bundles 2013-08-03 10:10:51 -04:00
Dan Croak
c0a282f9a8 Remove redundant syntax highlighting
Newer versions of vim (such as 7.3.923) syntax highlight Rackup and JSON
files correctly. In the interest of keeping the dotfiles slim and our
machines up-to-date, I think the solution is to remove these from
dotfiles and install a newer version of vim in thoughtbot/laptop:

https://github.com/thoughtbot/laptop/pull/118
2013-07-29 14:14:27 -07:00
Dan Croak
989a49d2f0 Add syntax highlighting to certain file types
* Syntax highlight `Appraisals` as Ruby. Used especially for our open
  source libraries.
* Syntax highlight rackup (`config.ru`) files as Ruby. Used in all our
  Ruby web apps. Rails apps are rarely touched but some of the Sinatra
  and Middleman apps are occasionally edited.
* Syntax highlight JSON files as JavaScript. Used in our Trail Map.
2013-07-27 12:10:41 -07:00
Michael Gee
ce425d6e74 fix relative .aliases.local path 2013-07-23 15:02:05 -07:00
Sterling Cobb
3fd85abb00 List local files available to override 2013-07-22 21:38:41 -07:00
Greg Lazarev
f1c03da33a Remove old ignores
* sass gets compiled to `tmp/sass-cache` with Rails
* vendor/bundle_gems seems like an arbitrary vendor directory
* vim/.netrwhist is for a plugin we no longer use
2013-07-22 18:43:57 -07:00
Greg Lazarev
387d9142d1 Remove unused vim plugins
* haml, html and markdown highlight still work without these plugins
* treetop and textile are likely very situational
* unsure if anyone is using greplace
2013-07-19 10:34:47 -07:00
Derek Prior
edfc415f57 Make the migrate alias faster
This was loading up the environment four times when it really only needs
to happen twice.
2013-07-16 09:15:28 -04:00
Dan Croak
b7bc52ec20 Git push to current, not upstream
The primary use case for me is to `git push staging` and `git push
production` from the master branch using our typical git workflow:

https://github.com/thoughtbot/guides/tree/master/protocol#deploy
2013-07-10 23:16:27 -07:00
Dan Croak
fdbd7b5248 Remove "DO NOT EDIT BELOW THIS LINE" convention
It has been superceded by a `.local` suffix convention.
2013-07-08 22:09:44 -07:00
Dan Croak
e69f7b7995 Source ~/.zshrc.local if it exists
Follows the pattern of:

* ~/.aliases.local in ce7ad49
* ~/.gitconfig.local in 8e141fe
* ~/.vimrc.local in a666267

Use consistent:

* `source`ing style.
* commenting style.

I am using ~/.zshrc.local as a home for `eval "$(rbenv init -)"`.
2013-07-08 21:20:11 -07:00
Greg Lazarev
ce7ad494cf Include local aliases file
* `.aliases.local` should be used to add personal aliases
2013-07-06 11:08:47 -07:00
Greg Lazarev
8e141fed5e Include gitconfig.local file for personal changes
* assumes same directory existance
* allows for easier addition of personal configs
2013-06-28 13:11:08 -07:00
Adarsh Pandit
a2d8383b6a Remove double escaped spaces in vimrc
* Bash users experience errors when using the double-escaped spaces for the CtrlP-SilverSearcher integration.

Thanks to @adamyonk for raising this issue
2013-06-24 09:55:32 -07:00
Dan Croak
108476c54e Turn off banner at login
When logging into a new shell, users see a banner such as:

    Last login: Sun Jun 23 11:41:42 on ttys007

Adding an empty ~/.hushlogin file turns that banner off:

http://kb.iu.edu/data/acdd.html
2013-06-24 09:27:41 -07:00
Adarsh Pandit
f854c8d8ef Use Silver Searcher as CtrlP backend
* Use `ag` as the find method for listing files in CtrlP Vim plugin
* ag indexes and searches far faster than the native engine
* ag also respects .gitignore files on on a per-directory basis, avoiding duplication
2013-06-21 15:18:20 -07:00
Dan Croak
64e6dfa4c6 Isolate credits to README
Per @mikeburns' suggestion.
2013-06-18 16:47:01 -07:00
Dan Croak
32e79b642f git up alias and git up -i documentation 2013-06-11 14:53:15 -07:00
nXqd
830f4fed17 Add shortcut to toggle between two most recent panes
* Mimics GNU screen's ctrl+a a
2013-06-10 12:29:20 +02:00
Derek Prior
8b7e4eefa7 Consolidate autocommands into the augroup
This makes it so resourcing the vimrc file doesn't duplicate the
auto commands.
2013-05-28 09:43:10 -04:00
Dan Croak
d830652ab9 Remove reattach-to-user-namespace
This is Mac OS X-specific. Including this line in the dotfiles causes
`tmux` and `tmux new -s new-session` to break with `[exited]`.

I personally don't do copy-pasteable work inside tmux anymore.

I'm sure this is valuable to some of the thoughtbot vim users but I'm
thinking it better belongs above `DO NOT EDIT BELOW THIS LINE` as custom
configuration for those users.
2013-05-17 14:41:59 -07:00
Elliot Winkler
9a0c71eccf Add mappings to switch windows more succinctly 2013-05-15 10:27:49 -06:00
Dan Croak
cb6170d2f8 Extract dev/staging/prod binaries to parity gem
https://github.com/croaky/parity
2013-05-12 17:38:22 -07:00
Derek Prior
341b7c93dd Add syntastic for syntax checking
* enable check on open: I want to know about any broken windows from the
  start.

* disable inline highlights: the line markers are sufficient.
2013-05-10 08:58:54 -04:00
Derek Prior
5fb405217a Don't remember cursor position for commit messages
It's not very useful to be dropped into the middle of your diff when
opening a new commit. This change prevents cursor position from being
restored for the `gitcommit` filetype.
2013-04-27 10:56:18 -04:00
Caleb Thompson
deb7ee5948 Move Bundles into a separate file
I've had this in [my own dotfiles] for a while now, and really like
having the separation of what I consider to be code/configuration from
what to me feels more like a Gemfile, in that it lists out all of the
external dependencies in a single place.

[my own dotfiles](https://github.com/calebthompson/dotfiles/blob/master/vim/vimrc.bundles.symlink)

* Awesomer vundle integration:
  * Refactor .vimrc and .vimrc.bundles to support standalone
    BundleInstall.
  * Install vim bundles as part of install.sh without sourcing the
    normal vimrc, which prevents error messages from uninstalled
    plugins referenced in the main vimrc.
2013-04-26 09:25:32 -04:00
Caleb Thompson
910a156ad8 Ignore new things in vim/bundle/ 2013-04-24 09:57:14 -04:00
Caleb Thompson
5a92f26bcc Fix issue with submodules
dotfiles[master]/
    ↪ git submodule init
    No submodule mapping found in .gitmodules for path 'vim/bundle/ctags.vim'

Git requires a `.gitmodules` file for submodules, but these aren’t
needed as `vundle` handles finding and cloning vim plugins.

There’s also not really any benefit to locking down a version as vim
plugins don’t have a standardized versioning system. Many don’t have
version numbers at all.

I've added a `.gitkeep` file, which is something I generally don’t like
having, but we need to have the directory around for vundle. I’d be up
for removing that and creating the directory in `install.sh`. Thoughts?
2013-04-24 09:57:14 -04:00
Dan Croak
ed2c8ef0bc Fix reference to non-existent file
Link to it for easy access in GitHub.
2013-04-22 21:04:57 -07:00
Greg Lazarev
59bdc8d237 Don't use suffix flag for zsh compadd command
* Fixes an issue where tab completing specs that start with the same
words(s) makes tab completion freak out and stop working.

* The con is that we'll see "_spec.rb" in the output, like:

```zsh
$ rspec spec/models/
models/calendar_spec.rb
models/event_closer_spec.rb
...
```
2013-04-19 12:12:42 -07:00
Dan Croak
49f16b16c3 Bundle vim-ruby/vim-ruby
vim-ruby is where Vim's support for Ruby comes from - file type
detection, syntax highlighting, etc. Vim bundles vim-ruby, but the
GitHub project is always ahead of what's released with Vim.
2013-04-19 10:21:05 -07:00
Dan Croak
bb757b4a23 Add g pr alias for hub pull-request 2013-04-18 21:44:18 -07:00
Dan Croak
e5a38c353a Remove git br alias
I almost never use `git branch`.
2013-04-14 11:30:48 -07:00
Adarsh Pandit
d754170e4f Open new splits to the right/bottom
* Feels more natural than Vim's default
2013-04-14 09:14:25 -07:00
Caleb Thompson
739497840b Add vim-rspec mappings
Compliments https://github.com/thoughtbot/vim-rspec/pull/7
2013-04-12 11:45:16 -04:00
Dan Croak
c04243741f Always merge with ff = only
@jferris:

This has the effect that Git will never implicitly do a merge commit,
including while doing git pull. If I'm unexpectedly out of sync when I
git pull, I get this message:

> fatal: Not possible to fast-forward, aborting.

At that point, I know that I've forgotten to do something in my normal
workflow, and I retrace my steps.

@gylaz:

I like the value of seeing a failure message if a pull (or just merge)
fails due to not being able to get fast-forwarded. Then I can look to
see whose changes went out, that I may have not expected to be there.
2013-04-10 10:17:07 -07:00
Greg Lazarev
7aac1f8e98 Remove --noheading flag from ag execution
The flag isn't needed, and seems to cause strange output.

Output with flag in vim:

app/models/group.rb|4| validates :yammer_group_id, :name, presence: true
||·
app/models/event.rb|24| validates :name, presence: ...

---

Output without:

app/models/event.rb|24| validates :name, presence: ...
app/models/event.rb|25| validates :name, length: ...
app/models/event.rb|26| validates :open, inclusion: ...
2013-04-09 14:47:43 -07:00
Dan Croak
b0ac70898a Use bundler.vim
Includes features such as:

* `:Bundle`, which wraps `bundle`.
* An internalized version of `bundle open`: `:Bopen` (and `:Bsplit`,
  `:Btabedit`, etc.).
* `'path'` and `'tags'` are automatically altered to include all gems
  from your bundle.  (Generate those tags with
  [gem-ctags](https://github.com/tpope/gem-ctags)!)
* Highlight Bundler keywords in `Gemfile`.
* Support for `gf` in `Gemfile.lock`, plus syntax highlighting that
  distinguishes between installed and missing gems.
2013-04-09 10:53:18 -07:00
Greg Lazarev
31231c812a Use color.ui = auto setting to color git output 2013-04-08 23:32:50 -07:00