Skip to content

Commit

Permalink
Escape space and backslash in filenames
Browse files Browse the repository at this point in the history
It's certainly not enough to escape only these characters.
  • Loading branch information
cless committed Jan 27, 2017
1 parent 07d023f commit 2c3f26f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ftplugin/tex.vim
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ if !exists('s:neotex_loaded')
let s:neotex_loaded = 1
endif

let b:neotex_jobexe='cd ' . expand('%:p:h') . ' && '
let b:neotex_jobexe='cd ' . escape(expand('%:p:h'), '\ ') . ' && '

if get(g:, 'neotex_latexdiff', 0)
let b:neotex_jobexe .= 'latexdiff '
if exists('neotex_latexdiff_options')
let b:neotex_jobexe .= g:neotex_latexdiff_options . ' '
endif
let b:neotex_jobexe .= expand('%:p') . ' ' . s:neotex_buffer_tempname . ' > ' . s:neotex_preview_tempname . ' && '
let b:neotex_jobexe .= escape(expand('%:p'), '\ ') . ' ' . s:neotex_buffer_tempname . ' > ' . s:neotex_preview_tempname . ' && '
endif

let b:neotex_jobexe .= 'pdflatex -jobname=' . expand('%:t:r') . ' -interaction=nonstopmode '
let b:neotex_jobexe .= 'pdflatex -jobname=' . escape(expand('%:t:r'), '\ ') . ' -interaction=nonstopmode '
if exists('neotex_pdflatex_add_options')
let b:neotex_jobexe .= g:neotex_pdflatex_add_options . ' '
endif
Expand Down

0 comments on commit 2c3f26f

Please sign in to comment.