Due to my muscle memory(aquired from vim-latex and other code compilation, so <F10>
is universal compiler for me), I prefer singleshot calculation. I do have given a shot to \ll
and then just save to compile, but unfortunate my muscle memory rejects that.
So, I have created this map:
autocmd Filetype tex imap <buffer> <f10> <Esc>:w<CR> <plug>(vimtex-compile-ss)<CR><Esc>
Unfortunately, this doesnot open quickfix as \ll
does.
Is it possible to open quickfix when there is some error using this map?
I have also tried
autocmd Filetype tex imap <buffer> <f10> <Esc>:w<CR> :VimtexCompileSS<CR><Esc>
with no change.
Disclaimer: VimtexCompileSs or vimtex-compile-ss is a command from vimtex plugin, popular for latex use
:cw
? Something likeinoremap <buffer> <f10> <Esc>:w<CR> <plug>(vimtex-compile-ss)<CR>:cw<CR>
? See:h :cw
Open the quickfix window when there are recognized errors. If the window is already open and there are no recognized errors, close the window.
Also you should not use an autocomand but a custom ftplugin to create your mapping and your mapping should be not recursive (inoremap
instead ofimap
) but that's not the point of your question :)normal <Plug>...
or usefeedkeys()
. You might wantinoremap <buffer> <f10> <C-o>:write | VimtexCompileSS | cwindow<CR>
. cf. How to debug a mapping