forked from thoughtbot/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
1 parent
2d9e8bf
commit f02eab0
Showing
6 changed files
with
11 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
setlocal iskeyword+=- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
" Automatically wrap at 72 characters and spell check commit messages | ||
setlocal textwidth=72 | ||
setlocal spell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
" Enable spellchecking | ||
setlocal spell | ||
|
||
" Automatically wrap at 80 characters | ||
setlocal textwidth=80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
setlocal iskeyword+=- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
setlocal iskeyword+=- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters