Commit graph

104 commits

Author SHA1 Message Date
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
Greg Lazarev
96249050bd Add a config line required by vundle 2013-04-08 23:29:14 -07:00
Greg Lazarev
3ef486f915 Increase tmux scrollback lines 2013-04-06 11:33:48 -07:00
Greg Lazarev
a666267322 Move .vimrc.local to the bottom of .vimrc
Having this file be sourced last allows user to
overwrite the configs in `.vimrc` without having to modify it.

* fixed file's path to work with `filereadable`
2013-04-03 21:56:27 -07:00
Greg Lazarev
b9d216a7de Extract rspec vim bindings to thoughtbot/vim-rspec 2013-04-02 21:00:40 -07:00
Derek Prior
7b76714de0 Change the 'git commit --amend' alias to 'git ca' 2013-03-08 17:17:57 -08:00
Dan Croak
b0ab55d50d Rename current file in vim buffer
* Retain relative path.
* Save file.
* Do not keep old file open in buffer.

Usage:

    :e old_file_name.rb
    :Rename new_file_name.rb
2013-03-08 16:50:47 -08:00
Chris Hunt
21ca138751 Fix contributors link in README 2013-03-06 11:01:26 -08:00
Dan Croak
734d43c830 Explain what's in dotfiles
* Link to fork/upstream process.
* Remove RVM reference.
* Don't create ~/.README.md in `install.sh` script.
2013-03-06 09:26:56 -08:00
Gabe Berke-Williams
89b60fcb49 g alias for git
With arguments, g acts like git.
Without arguments, it runs `git status`.

* Source functions/* after loading ZSH completion so `compdef` is available to g
  alias
2013-03-03 17:14:16 -05:00
Gabe Berke-Williams
1f4e6d1370 Use ag instead of ack
https://github.com/ggreer/the_silver_searcher

* ag is faster than ack
* ag searches all files by default (but still ignores gitignored files). This
  removes the need for ack's `--type-add=` options.
* The command is 33% shorter than ack!
2013-03-01 23:28:36 -05:00
Dan Croak
99c8831c94 Add replace script
Find and replace by a given list of files.
2013-02-28 10:24:36 -08:00
Dan Croak
a045888278 Add e alias for $EDITOR, v for $VISUAL
* Goal is to quickly open current project in vim to v.
* This is a dozens-of-times-per-day kind of task for me.

Lively discussion here:

https://github.com/thoughtbot/dotfiles/pull/100
2013-02-26 21:50:20 -08:00
Dan Croak
d251e63bcf Renumber tmux windows after closing any of them 2013-02-23 19:19:19 -08:00
Joshua Clayton
68fe4b1d4c Update git's push.default from tracking to upstream
The 'tracking' value has been deprecated in favor of 'upstream'.
2013-02-23 19:08:08 -08:00
Dan Croak
a639b11303 Start tmux window numbers at 1
The keyboard from left to right is 1 2 3 4 5 6 7 8 9 0. Make tmux
windows match this order.
2013-02-23 19:00:46 -08:00
Joe Ferris
e35064bcee Revert to default Git log style
* Our current style hides message details
* Default style shows details and one-line versions as appropriate
2013-02-21 10:51:12 -05:00
Mike Burns
390a383b6b Set $VISUAL
Most tools look for $VISUAL before $EDITOR, and we tend to want that
anyway. This allows people to customize the two, for example using GUI
vim for $VISUAL and normal vim for $EDITOR, or more extreme: `ex -v` for
$VISUAL and `ex` for $EDITOR.
2013-02-15 10:22:41 +01:00
Dan Croak
aa31dd7ad3 Add change-extension script
Add ability to change file extensions of files recursively in current
directory.
2013-02-14 11:05:26 -08:00
Greg Lazarev
f243090e1e Add git alias branch as br 2013-02-13 09:36:50 -08:00
Dan Croak
bc6d3e6202 Make directory and change into it 2013-02-12 10:22:27 -08:00
Dan Croak
64e3c09e51 Pass arguments from rake shell function when not using zeus
Non-zeus path didn't pass arguments, so it just ran `rake`.
2013-02-12 10:10:04 -08:00
Dan Croak
9f9a577408 Bundle Ctrl+P
Full path fuzzy file, buffer, mru, tag, ... finder for Vim.
https://github.com/kien/ctrlp.vim
2013-01-28 23:50:26 -08:00
Joe Ferris
81d40fe855 Pass arguments from rspec shell function when not using zeus
* Non-zeus path didn't pass arguments, so it just ran `rspec`
2013-01-21 10:49:12 -05:00
Dan Croak
0d43fe5246 Use Zeus via aliases, rake
* Create `rake` function and `rk` alias.
* Add `z` alias for `zeus`.
* Alias `migrate` to `m` given how common a task it is.
2013-01-21 06:43:30 -08:00
Dan Croak
bc2bc89cde Add aliases for most common git commands 2013-01-18 11:36:50 -08:00
Dan Croak
fca03f7252 Merge branch 'dc-github-color' into upstream 2013-01-18 11:34:25 -08:00
Joe Ferris
6603b694b0 Replace s shell script with rspec shell function and alias
* Use a regular alias to make `s` short for `rspec`
* Use an `rspec` shell function to route to zeus when appropriate
* Removes confusion from `s` working differently than `rspec`
* Removes need to use a special alias to get zeus working
2013-01-18 13:24:53 -05:00
Dan Croak
17b174e8fc Bundle Github color scheme
Fixes https://github.com/thoughtbot/dotfiles/issues/79
2013-01-17 21:53:33 -08:00
Dan Croak
8649403044 Add Heroku scripts
staging:

    staging console
    staging migrate
    staging process
    staging open
    watch staging ps
    staging tail

production:

    production backup
    production console
    production migrate
    production open
    watch production ps
    production tail

load-backup-into:

    load-backup-into staging
    load-backup-into development

Notes on the last command:

* Copy latest production database backup into development database using
  preferred pgbackups + pg_restore method recommended by Heroku.
* Do not assume local development database name.
* Get local database name from config/database.yml.
* This did not previously exist in dotfiles.

Supporting change for these commands:

* Add ~/.bin to the PATH.

https://github.com/thoughtbot/dotfiles/pull/76
2013-01-12 18:06:12 -08:00
Dan Croak
df3dd5129b Attach to tmux session w/ current directory name
I've been experimenting with a workflow where I only run long-running
processes in tmux. Examples:

    zeus start
    foreman start
    rake

tmux (or screen) are good at that: maintaining a long-running process
across shell sessions.

Instead of opening another tmux pane for vim and another for git
commands, Rails generators, test runs, etc., I do all of that outside of
tmux in my normal shell window. Those are all targeted, quick, actions.
They are what I am doing *right now*. It's my workspace.

While experimenting with this process, I noticed, I do jump into tmux
more often. Therefore, I wanted a shorter command for attaching to the
tmux session with the same name as the current directory.
2013-01-08 16:45:28 -08:00
Adarsh Pandit
a63b2ac15c Update copyright year to 2013 2013-01-06 01:24:19 -08:00
Joe Ferris
7adb1160a9 Easier editing for Markdown files
* Automatically enable spellchecking
* Automatically wrap at 80 characters
2012-12-05 13:00:34 -05:00
Greg Lazarev
9de82eb791 Pass all parameters to the executable 2012-12-03 09:07:14 -08:00