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.
* `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`.
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.
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.
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.
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.
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?
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.
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.
* 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.
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).