Commit graph

22 commits

Author SHA1 Message Date
Jared Smith
88d70fcd12 Fix vim ctag plugin 2018-08-26 21:28:08 -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
Greg Lazarev
f25b410bba Avoid expanding tabs to spaces for Golang files
* `noexpandtab` will ensure tabs are used instead of staces when tabbing
or auto-indenting.
* `softtabstop=2` isn't needed because we are already setting
`tabstop=2` in our `.vimrc`.
2016-04-08 13:33:31 -04:00
Caleb Thompson
fe31b3943b
Add golang configuration samples
Add suggested Go configuration for Vim into the `ftplugin` folder and
the vim-go plugin. We may use this as a template for adding further
language-specific settings in the future for languages that aren't
universally used by the team.

* `fatih/vim-go`: The de-facto Golang Vim plugin.
* `softtabstop=2`: As a side effect of setting how "large" a tab is in
  insert mode, Vim is able to delete tabs with the backspace key in
  Insert mode.
* `compiler go`: Necessary for plugins using the `make` command, such as
  vim-dispatch.
* `listchars=tab:\ \ `: Don't highlight tabs as "»·" as if they were
  problem characters in go files. Also recommended for *sh files and any
  others which which should also be using tabs.
* `go_fmt_command = "goimports"`: Tell vim-go to use the `goimports`
  command rather than `gofmt`, which attempts to find dependencies and
  adds them to your import statement.
2016-01-08 11:22:01 -06:00
Geoff Harcourt
f02eab0354 Extract filetype-specific setups to ftplugin
Vim's documentation advises that buffer-specific configuration based on
a filetype should be performed via a file in `$HOME/.vim/ftplugin`:
http://vimdoc.sourceforge.net/htmldoc/usr_41.html#41.12

This change moves CSS/Sass-, Git commit message-, and Markdown-related
editor settings into `ftplugin/gitcommit.vim` and
`ftplugin/markdown.vim`, and rewrites those settings to avoid using
`autocmd`, letting Vim execute `setlocal` when a file of the filetype is
determined or set.
2015-12-18 16:18:32 -05:00
Geoff Harcourt
76aa931b77 Set <leader>ct shortcut to use Git ctags hook
In cbdcbce01d we introduced a Tim
Pope-inspired Git template scheme that automatically ran `ctags`
asynchronously through a hook after certain source control operations.
This hook is bypassed if a user uses `<leader>ct` to reindex their tags
from within Vim.

This change binds `<leader>ct` to use a Vimscript function that will
identify if the `ctags` hook exists in the local repository and executes
it. The function falls back to existing functionality if the hook does
not exist. We are moving the function out of `vimrc` as a first step
toward breaking our Vim configuration up by topic area.
2015-11-29 08:45:46 -05:00
Greg Lazarev
85e9f22e48 Remove old doc directory
Resolves #276
2014-09-12 11:49:58 -07:00
Sean Doyle
3cb5ef5ccb Adds vim-ruby back to vimrc.bundles
Removal in deb7ee5948
was accidental.

Also, removes `vim/bundle` directory as it is no longer useful to us, since
`vundle` creates it when it needs to.
2014-06-26 14:26:52 -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
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
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
b9d216a7de Extract rspec vim bindings to thoughtbot/vim-rspec 2013-04-02 21:00:40 -07: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
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
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
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
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
de071e9c34 switch to github vim color scheme 2011-12-04 14:51:53 -05:00
Dan Croak
1a8d7cf5f6 coffeescript detection, indentation, and syntax highlighting for vim 2011-10-22 19:59:14 -04:00
Joe Ferris
e168efc810 Use vividchalk by default 2011-03-24 13:07:46 -04:00
Joe Ferris
ae6386f8ce Removed duplicate files 2011-01-13 18:05:16 -05:00
Joe Ferris
b291659f29 Vim configuration 2011-01-13 17:54:08 -05:00