Skip to content
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

update example using VimtexClean upon quit #2012

Closed
wants to merge 1 commit into from
Closed

update example using VimtexClean upon quit #2012

wants to merge 1 commit into from

Conversation

postylem
Copy link
Contributor

The example is using some outdated function (I think).
I wanted to get the behaviour described, and I got it using VimtexClean instead of call vimtex#compiler#clean(0) which didn't do anything (as I don't think that function exists?)

The example is using some outdated function (I think).
I wanted to get the behaviour described, and I got it using `VimtexClean` instead of `call vimtex#compiler#clean(0)` which didn't do anything (as I don't think that function exists?)
lervag added a commit that referenced this pull request Mar 29, 2021
@lervag
Copy link
Owner

lervag commented Mar 29, 2021

The example is using some outdated function (I think).
I wanted to get the behaviour described, and I got it using VimtexClean instead of call vimtex#compiler#clean(0) which didn't do anything (as I don't think that function exists?)

function! vimtex#compiler#clean(full) abort " {{{1
call b:vimtex.compiler.clean(a:full)
if empty(b:vimtex.compiler.build_dir) | return | endif
sleep 100m
" Remove auxilliary output directories if they are empty
let l:build_dir = (vimtex#paths#is_abs(b:vimtex.compiler.build_dir)
\ ? '' : b:vimtex.root . '/')
\ . b:vimtex.compiler.build_dir
let l:tree = glob(l:build_dir . '/**/*', 0, 1)
let l:files = filter(copy(l:tree), 'filereadable(v:val)')
if !empty(l:files) | return | endif
for l:dir in sort(l:tree) + [l:build_dir]
call delete(l:dir, 'd')
endfor
endfunction
" }}}1

The functions are not outdated and the both exist. The example is valid. However, I do agree it is probably better to refer to the already documented ex commands.

@lervag lervag closed this Mar 29, 2021
@postylem postylem deleted the patch-1 branch March 29, 2021 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants