Commit graph

381 commits

Author SHA1 Message Date
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
Dan Croak
80b77cdefc Run specs directly from vim
* Run current spec file.
* Run spec nearest cursor.
* Run last spec that was run.
* Convert s alias to s script, use Zeus if present.
2012-11-19 09:04:34 -08:00
Dan Croak
126344c3cb Install Vundle
* Set up Vundle in vimrc.
* Delete old copies of vim scripts.
* Bundles are automatically set up as referenced submodules.
* Ignore .netrwhist files given presence of submodules.
* Set up vundle in install script.
2012-11-16 10:00:33 -08:00
Dan Croak
d8adb07377 Add git-churn script
After you commit a bug fix to a feature branch, find out if the code
you changed to fix the bug is in files that change often:

    git-churn

If the buggy code changes often, find smells and refactor them. Separate
the parts that change often from the parts that don't.

Conversely, avoid refactoring areas with low churn. Refactoring changes
code, and with each change, you risk introducing new bugs.

Example:

     [feature-branch][~/dev/rails-app] churn
     2 app/controllers/accepts_controller.rb
     2 config/database.yml
     4 app/helpers/application_helper.rb
     4 config/application.rb
     9 spec/models/user_spec.rb
     9 spec/spec_helper.rb
    12 spec/requests/dashboard_spec.rb
    13 spec/models/feedback_spec.rb
    19 app/models/feedback.rb
    21 app/models/user.rb
2012-11-15 22:46:10 -08:00
Joe Ferris
84ce5cc1ba Improve Markdown integration
* Default Vim configuration detects .md files as modula
* Replaces default config so that .md is detected as markdown

Resolves #71.
2012-11-14 13:51:11 -05:00
Dan Croak
9b3e09e962 Switch between the last two files 2012-11-10 17:50:08 -08:00
Christian Schlensker
5a4eb4661b Implement a smarter tab completion function
Credit: Gary Bernhardt
2012-11-10 15:34:01 -08:00
Dan Croak
397312ee8b Simplify tmux status bar
* Remove administrative debris (session name, hostname, time).
* Soften colors from harsh green to grayscale.
2012-11-07 17:31:20 -08:00
Dan Croak
675f4d808a Map Leader to Space
Many others map Leader to ,. However, , is a built-in command which repeats the
last character find backwards, which can be quite useful.
2012-10-31 22:46:58 -07:00
Dan Croak
c7efed4f0c Fix tab completion
* Add mapping for tab completion so Ctrl+P isn't necessary.
* Add a mapping to re-index ctags quickly from vim.
* Add explaining comment to Tlist.
2012-10-24 21:36:56 -07:00
Dan Croak
d836af8afd Add fugitive.vim
Features include:

* :Gblame for interactive vertical split with git blame output.
* :Ggrep to search the work tree (or any arbitrary commit) with git grep,
  skipping over that which is not tracked in the repository.
* :Glog loads all previous revisions of a file into the quickfix list so
  you can iterate over them and watch the file evolve.
* :Gbrowse to open the current file on GitHub, with optional line range
  (try it in visual mode).
2012-10-23 23:26:21 -07:00
Dan Croak
52b2ee106e Document "DO NOT EDIT BELOW THIS LINE" convention 2012-10-21 15:10:47 -07:00
Dan Croak
0060e0ab25 Add .gitignore 2012-10-21 14:54:19 -07:00
Gabe Berke-Williams
61222a432e Direct link to why we set noswap 2012-10-15 15:36:51 -04:00
Dan Croak
f893537686 Add basic git aliases
* Fast commits.
* Fast rebase of origin into feature branch.
* Fast merge feature branch into master.
* Fast branch creation.
* Fast branch deletion.

Conflicts:

	gitconfig
2012-10-08 20:30:29 -07:00
Joshua Clayton
d16a4fe36c Tab-complete ack by looking at the tags file 2012-09-27 08:28:13 -04:00
Dan Croak
3ef63fef9a Set tmux to use reattach-to-user-namespace
* Improves tmux compatibility with other systems.
* Better copy-paste: http://goo.gl/DN82E.
* Better RubyMotion: http://goo.gl/WDlCy.
2012-09-25 22:06:48 -07:00
Dan Croak
6c9bdf8f69 Tell vim to not create swap files 2012-09-22 19:32:22 -07:00
Adarsh Pandit
5476eaf7aa Update README and add MIT-LICENSE
* Update copyright year
* Add Credits section
* Add MIT license file
2012-09-18 23:10:20 -07:00
Dan Croak
17c91b2dbb Add .ackrc
Certain files, such as Haml, Cucumber, Sass, and Coffeescript are not
searchable by `ack`. The `.ackrc` file adjusts this.
2012-09-15 13:59:19 -07:00
Dan Croak
4882c418fd Improve Rails-related aliases
* Remove `help-strftime` (rarely call it).
* Remove `be` and `bundle exec` (using `bundle --binstubs` now).
* Add `t` command for running isolated `Test::Unit` tests.
* Remove MongoDB migrate (rarely use Mongo).
* Rename `staging` to `staging-console` to better reveal intent.
* Remove `db-pull-*` commands (`pg_restore` is new best practice).
2012-09-15 12:07:10 -07:00
Dan Croak
87b528b8f3 need to rake in the migrate, remigrate, and remongrate tasks. 2011-12-21 10:55:41 -05:00
Dan Croak
87685f1fbf improve documentation to make suggestions about where to put your own customizations 2011-12-07 18:35:29 -05:00
Dan Croak
352dcade99 don't require heroku to be in your project's bundle 2011-12-04 18:30:18 -05:00