2021年1月21日星期四

Define vim command to open current filename with another extension

I'm trying a simple way to compile pdfs in LaTeX and open them with zathura from a single autocmd inside vim, so far I tried:

command Latex !pdflatex %:t  command Za !zathura @%.pdf  autocmd FileType tex map <leader>pdf :w<CR>:Latex<CR>:Za <CR>  

Obviously, @%.pdf is wrong, but I've had no luck in finding how to append an extension to the file name. I'm newbie in vim scripting so please point out any other errors.

https://stackoverflow.com/questions/65821158/define-vim-command-to-open-current-filename-with-another-extension January 21, 2021 at 12:21PM

没有评论:

发表评论