Skip to content

Commit

Permalink
Clean up documentation [minor]
Browse files Browse the repository at this point in the history
  • Loading branch information
cxw42 committed Oct 21, 2020
1 parent d2ff151 commit a1bf07e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 18 deletions.
35 changes: 19 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,17 @@ Use Vundle by adding to your `.vimrc` Vundle plugins section:
Plugin 'editorconfig/editorconfig-vim'
```

Then remember to call `:PluginInstall`.
Then call `:PluginInstall`.

### Install with [vim-plug][]

Use vim-plug by adding to your `.vimrc` in your plugin section:

```viml
Plug 'editorconfig/editorconfig-vim'
```
Then remember to call `:PlugInstall`.

Then call `:PlugInstall`.

### No external editorconfig core library is required

Expand All @@ -69,18 +69,19 @@ The EditorConfig Vim plugin supports the following EditorConfig [properties][]:
* `tab_width`
* `end_of_line`
* `charset`
* `insert_final_newline` (Feature +fixendofline (available on Vim 7.4.785+) or [PreserveNoEOL][] is required for this property)
* `insert_final_newline` (Feature `+fixendofline`, available on Vim 7.4.785+,
or [PreserveNoEOL][] is required for this property)
* `trim_trailing_whitespace`
* `max_line_length`
* `root` (only used by EditorConfig core)

## Recommended Options
## Selected Options

All of the options which are supported are documented in [editorconfig.txt][]
The supported options are documented in [editorconfig.txt][]
and can be viewed by executing the following: `:help editorconfig`. You may
need to execute `:helptags ALL` so that Vim is aware of editorconfig.txt.

#### Excluded patterns.
### Excluded patterns

To ensure that this plugin works well with [Tim Pope's fugitive][], use the
following patterns array:
Expand All @@ -101,21 +102,23 @@ Of course these two items could be combined into the following:
let g:EditorConfig_exclude_patterns = ['fugitive://.*', 'scp://.*']
```

#### Disable for a specific filetype
### Disable for a specific filetype

Since you can disable this plugin for a specific buffer, you can disable the
plugin for all buffer of a specific filetype. For example, to disable
You can disable this plugin for a specific buffer by setting
`b:EditorConfig_disable`. Therefore, you can disable the
plugin for all buffers of a specific filetype. For example, to disable
EditorConfig for all git commit messages (filetype `gitcommit`):

```viml
au FileType gitcommit let b:EditorConfig_disable = 1
```

#### Disable rules
### Disable rules

You might want to override some project-specific EditorConfig rules in global
In very rare cases,
you might need to override some project-specific EditorConfig rules in global
or local vimrc in some cases, e.g., to resolve conflicts of trailing whitespace
trimming and buffer autosaving.
trimming and buffer autosaving. This is not recommended, but you can:

```viml
let g:EditorConfig_disable_rules = ['trim_trailing_whitespace']
Expand All @@ -126,7 +129,7 @@ You are able to disable any supported EditorConfig properties.
## Bugs and Feature Requests

Feel free to submit bugs, feature requests, and other issues to the
[issue tracker][]. Be sure you have read the [contribution guideline][]!
[issue tracker][]. Be sure you have read the [contribution guidelines][]!

[EditorConfig]: http://editorconfig.org
[GitHub]: https://github.com/editorconfig/editorconfig-vim
Expand All @@ -135,7 +138,7 @@ Feel free to submit bugs, feature requests, and other issues to the
[Vim online]: http://www.vim.org/scripts/script.php?script_id=3934
[Vundle]: https://github.com/gmarik/Vundle.vim
[archive]: https://github.com/editorconfig/editorconfig-vim/archive/master.zip
[contribution guideline]: https://github.com/editorconfig/editorconfig/blob/master/CONTRIBUTING.md#submitting-an-issue
[contribution guidelines]: https://github.com/editorconfig/editorconfig/blob/master/CONTRIBUTING.md#submitting-an-issue
[issue tracker]: https://github.com/editorconfig/editorconfig-vim/issues
[pathogen]: https://github.com/tpope/vim-pathogen
[properties]: http://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties
Expand Down
4 changes: 2 additions & 2 deletions doc/editorconfig.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ is restarted.
This is a buffer-local variable that disables the EditorConfig plugin for a
single buffer.

Example: Disable EditorConfig for a single buffer
Example: Disable EditorConfig for the current buffer:
>
let b:EditorConfig_disable = 1
<
Example: Disable EditorConfig for all git commit messages
Example: Disable EditorConfig for all git commit messages:
>
au FileType gitcommit let b:EditorConfig_disable = 1
<
Expand Down

0 comments on commit a1bf07e

Please sign in to comment.