Changes

Jump to navigation Jump to search
1,017 bytes added ,  09:05, 31 October 2016
no edit summary
choice, because by default it has the same function as the <tt><right></tt> key, and it is comfortable to type:
map <space> <leader> " Use <space> as an alternative leader (backslash can still be used)
 
=== Clean up auxiliary files ===
 
The following function can be used to clean up temporary files:
fun! ConTeXtClean()
let l:currdir = expand("%:p:h")
let l:tmpdirs = ['out'] " Temporary directories
let l:suffixes = ['aux', 'bbl', 'blg', 'fls', 'log', 'tuc'] " Suffixes of temporary files
\ ]
for ff in glob(l:currdir . '/*.{' . join(l:suffixes, ',') . '}', 1, 1)
call delete(ff)
endfor
for dd in l:tmpdirs
let l:subdir = l:currdir . '/' . dd
if isdirectory(l:subdir)
for ff in glob(l:subdir . '/*.{' . join(l:suffixes, ',') . '}', 1, 1)
call delete(ff)
endfor
endif
call delete(l:subdir) " Delete directory (only if empty)
endfor
echomsg "Aux files removed"
endf
Customize <tt>l:currdir</tt> and <tt>l:suffixes</tt> to suit your needs. The following mapping
allows you to remove auxiliary files by pressing <tt>\tc</tt>:
nnoremap <silent><buffer> <leader>tc :<c-u>call ConTeXtClean()<cr>
=== Buffer-local Insert-mode macros to speed up editing ===
134

edits

Navigation menu