New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

:cfdo does not run on more than one file #1316

Closed
tomspeak opened this Issue Jan 25, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@tomspeak

tomspeak commented Jan 25, 2018

Information

VIM version

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jan 17 2018 11:06:39)
macOS version

Operating System: WHAT OS WERE YOU USING?
macOS

:ALEInfo

Current Filetype:
Available Linters: []
Enabled Linters: []
Linter Variables:

Global Variables:

let g:ale_cache_executable_check_failures = 0
let g:ale_change_sign_column_color = 0
let g:ale_command_wrapper = ''
let g:ale_completion_delay = 100
let g:ale_completion_enabled = 0
let g:ale_completion_max_suggestions = 50
let g:ale_echo_cursor = 1
let g:ale_echo_msg_error_str = 'Error'
let g:ale_echo_msg_format = '%code: %%s'
let g:ale_echo_msg_info_str = 'Info'
let g:ale_echo_msg_warning_str = 'Warning'
let g:ale_enabled = 1
let g:ale_fix_on_save = 0
let g:ale_fixers = {'markdown': ['prettier'], 'scss': ['prettier'], 'json': ['prettier'], 'javascript': ['prettier'], 'css': ['prettier']}
let g:ale_history_enabled = 1
let g:ale_history_log_output = 1
let g:ale_keep_list_window_open = 0
let g:ale_lint_delay = 1000
let g:ale_lint_on_enter = 1
let g:ale_lint_on_filetype_changed = 1
let g:ale_lint_on_save = 1
let g:ale_lint_on_text_changed = 'always'
let g:ale_lint_on_insert_leave = 0
let g:ale_linter_aliases = {}
let g:ale_linters = {'typescript': [''], 'scss': ['sass-lint'], 'html': [''], 'javascript': ['eslint']}
let g:ale_linters_explicit = 0
let g:ale_list_window_size = 10
let g:ale_loclist_msg_format = '%code: %%s'
let g:ale_max_buffer_history_size = 20
let g:ale_max_signs = -1
let g:ale_maximum_file_size = 0
let g:ale_open_list = 0
let g:ale_pattern_options = {}
let g:ale_pattern_options_enabled = 0
let g:ale_set_balloons = 0
let g:ale_set_highlights = 1
let g:ale_set_loclist = 0
let g:ale_set_quickfix = 1
let g:ale_set_signs = 1
let g:ale_sign_column_always = 1
let g:ale_sign_error = '🔺'
let g:ale_sign_info = '🔸'
let g:ale_sign_offset = 1000000
let g:ale_sign_style_error = '🔺'
let g:ale_sign_style_warning = '🔸'
let g:ale_sign_warning = '🔸'
let g:ale_statusline_format = ['%d error(s)', '%d warning(s)', 'OK']
let g:ale_type_map = {}
let g:ale_warn_about_trailing_blank_lines = 1
let g:ale_warn_about_trailing_whitespace = 1
Command History:

What went wrong

With ale installed, it does not seem possible for me to run :cfdo on multiple files. After one file, it errors out.

I believe this could be due to linting or fixing on file save.

There are is a work around:

:cfdo %s/match/replace/ge | noau update

I do have other autocmd's that may interfere, they can be found here: https://github.com/tomspeak/dotfiles/blob/master/vim/vimrc

But disabling Ale immediately fixes the issue.

Reproducing the bug

Steps for repeating the bug:

  1. Install ALE
  2. Grep/Ag/Ack/Rg to populate quickfix list with results
  3. run :cfdo %s/match/change/ge | update

Is it possible to run :cfdo on multiple files and also have lint/fix on save enabled?

@w0rp

This comment has been minimized.

Owner

w0rp commented Jan 25, 2018

If you're populating the quickfix list with search results, you should probably set let g:ale_set_quickfix = 0 and use the loclist for displaying problems instead.

@tomspeak

This comment has been minimized.

tomspeak commented Jan 25, 2018

Indeed, switching to loclist fixes the issue.

Thanks for the quick feedback.

@tomspeak tomspeak closed this Jan 25, 2018

@w0rp

This comment has been minimized.

Owner

w0rp commented Jan 25, 2018

Okay, cool. 👍 I might update the documentation with a note about this.

w0rp added a commit that referenced this issue Jan 25, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment