summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-03-27 20:36:35 +0100
committerw0rp <devw0rp@gmail.com>2017-03-27 20:36:35 +0100
commitc9ee3efc1111d0de61e22d1c4cd6c1a49d5ae74a (patch)
tree88d1b600d8631c6b7e833b863776c71c5d8f4418
parent4abefc189c04c70972a398254675f7ec93a8eba0 (diff)
downloadale-c9ee3efc1111d0de61e22d1c4cd6c1a49d5ae74a.zip
Enabling linting on save by default, re #333
-rw-r--r--README.md19
-rw-r--r--doc/ale.txt2
-rw-r--r--plugin/ale.vim2
-rw-r--r--test/test_ale_info.vader2
-rw-r--r--test/test_ale_toggle.vader1
5 files changed, 14 insertions, 12 deletions
diff --git a/README.md b/README.md
index 8a66eec6..e9eaf3b1 100644
--- a/README.md
+++ b/README.md
@@ -362,19 +362,21 @@ For more information, consult the online documentation with
### 5.viii. How can I run linters only when I save files?
ALE offers an option `g:ale_lint_on_save` for enabling running the linters
-when files are saved. If you wish to run linters when files are saved, not
-as you are editing files, then you can turn the option for linting
-when text is changed off too.
+when files are saved. This option is enabled by default. If you only
+wish to run linters when files are saved, you can turn the other
+options off.
```vim
" Write this in your vimrc file
-let g:ale_lint_on_save = 1
let g:ale_lint_on_text_changed = 0
" You can disable this option too
" if you don't want linters to run on opening a file
let g:ale_lint_on_enter = 0
```
+If for whatever reason you don't wish to run linters again when you save
+files, you can set `g:ale_lint_on_save` to `0`.
+
<a name="faq-quickfix"></a>
### 5.ix. How can I use the quickfix list instead of the loclist?
@@ -451,11 +453,10 @@ type, and this delay can be increased so linters are run less often. See
`:help g:ale_lint_delay` for more information.
If you don't wish to run linters while you type, you can disable that
-behaviour. Set `g:ale_lint_on_text_changed` to `0`, and consider setting
-`g:ale_lint_on_save` to `1` to enable linting when you save files. You won't
-get as frequent error checking, but ALE shouldn't block your ability to edit a
-document after you save a file, so the asynchronous nature of the plugin will
-still be an advantage.
+behaviour. Set `g:ale_lint_on_text_changed` to `0`. You won't get as frequent
+error checking, but ALE shouldn't block your ability to edit a document after
+you save a file, so the asynchronous nature of the plugin will still be an
+advantage.
If you are still concerned, you can turn the automatic linting off altogether,
including the option `g:ale_lint_on_enter`, and you can run ALE manually with
diff --git a/doc/ale.txt b/doc/ale.txt
index b09a0541..932b5204 100644
--- a/doc/ale.txt
+++ b/doc/ale.txt
@@ -279,7 +279,7 @@ g:ale_lint_on_enter *g:ale_lint_on_enter*
g:ale_lint_on_save *g:ale_lint_on_save*
Type: |Number|
- Default: `0`
+ Default: `1`
This option will make ALE run the linters whenever a file is saved when it
it set to `1` in your vimrc file. This option can be used in combination
diff --git a/plugin/ale.vim b/plugin/ale.vim
index 3033fd5c..2e593893 100644
--- a/plugin/ale.vim
+++ b/plugin/ale.vim
@@ -76,7 +76,7 @@ let g:ale_lint_on_text_changed = get(g:, 'ale_lint_on_text_changed', 1)
let g:ale_lint_on_enter = get(g:, 'ale_lint_on_enter', 1)
" This flag can be set to 1 to enable linting when a buffer is written.
-let g:ale_lint_on_save = get(g:, 'ale_lint_on_save', 0)
+let g:ale_lint_on_save = get(g:, 'ale_lint_on_save', 1)
" This flag may be set to 0 to disable ale. After ale is loaded, :ALEToggle
" should be used instead.
diff --git a/test/test_ale_info.vader b/test/test_ale_info.vader
index ecea899b..6dd6afee 100644
--- a/test/test_ale_info.vader
+++ b/test/test_ale_info.vader
@@ -18,7 +18,7 @@ Before:
\ 'let g:ale_keep_list_window_open = 0',
\ 'let g:ale_lint_delay = 200',
\ 'let g:ale_lint_on_enter = 1',
- \ 'let g:ale_lint_on_save = 0',
+ \ 'let g:ale_lint_on_save = 1',
\ 'let g:ale_lint_on_text_changed = 1',
\ 'let g:ale_linter_aliases = {}',
\ 'let g:ale_linters = {}',
diff --git a/test/test_ale_toggle.vader b/test/test_ale_toggle.vader
index 2cd0110d..e623a085 100644
--- a/test/test_ale_toggle.vader
+++ b/test/test_ale_toggle.vader
@@ -15,6 +15,7 @@ Before:
\ 'ALECursorGroup',
\ 'ALEHighlightBufferGroup',
\ 'ALERunOnEnterGroup',
+ \ 'ALERunOnSaveGroup',
\ 'ALERunOnTextChangedGroup',
\]