I am using vim with vimtex, to use the background compilation.

When I use the command :VimTexCompileSS, I am then unable to write anything on vim, unless I press CTRL+C to stop it. To click on the screen doesn't have any effect too.

Do you have an idea of the reason I could have this problem?

I tested it with gnome and i3wm environement, and I am using Ubuntu 22.04.2 LTS

My vim configuration is:

VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Jan 11 2023 23:53:12)
Included patches: 1-3995, 4563, 4646, 4774, 4895, 4899, 4901, 4919
Modified by team+vim@tracker.debian.org
Compiled by team+vim@tracker.debian.org
Huge version without GUI.  Features included (+) or not (-):
+acl               +file_in_path      +mouse_urxvt       -tag_any_white
+arabic            +find_in_path      +mouse_xterm       -tcl
+autocmd           +float             +multi_byte        +termguicolors
+autochdir         +folding           +multi_lang        +terminal
-autoservername    -footer            -mzscheme          +terminfo
-balloon_eval      +fork()            +netbeans_intg     +termresponse
+balloon_eval_term +gettext           +num64             +textobjects
-browse            -hangul_input      +packages          +textprop
++builtin_terms    +iconv             +path_extra        +timers
+byte_offset       +insert_expand     -perl              +title
+channel           +ipv6              +persistent_undo   -toolbar
+cindent           +job               +popupwin          +user_commands
-clientserver      +jumplist          +postscript        +vartabs
-clipboard         +keymap            +printer           +vertsplit
+cmdline_compl     +lambda            +profile           +vim9script
+cmdline_hist      +langmap           -python            +viminfo
+cmdline_info      +libcall           +python3           +virtualedit
+comments          +linebreak         +quickfix          +visual
+conceal           +lispindent        +reltime           +visualextra
+cryptv            +listcmds          +rightleft         +vreplace
+cscope            +localmap          -ruby              +wildignore
+cursorbind        -lua               +scrollbind        +wildmenu
+cursorshape       +menu              +signs             +windows
+dialog_con        +mksession         +smartindent       +writebackup
+diff              +modify_fname      +sodium            -X11
+digraphs          +mouse             -sound             -xfontset
-dnd               -mouseshape        +spell             -xim
-ebcdic            +mouse_dec         +startuptime       -xpm
+emacs_tags        +mouse_gpm         +statusline        -xsmp
+eval              -mouse_jsbterm     -sun_workshop      -xterm_clipboard
+ex_extra          +mouse_netterm     +syntax            -xterm_save
+extra_search      +mouse_sgr         +tag_binary        
-farsi             -mouse_sysmouse    -tag_old_static    
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -Wdate-time -g -O2 -ffile-prefix-map=/build/vim-XHiCvL/vim-8.2.3995=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 
Linking: gcc -Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim -lm -ltinfo -lselinux -lsodium -lacl -lattr -lgpm -L/usr/lib/python3.10/config-3.10-x86_64-linux-gnu -lpython3.10 -lcrypt -ldl -lm -lm 

My.vimrc is :

" My .vimrc         
     " Note that the value of "mapleader" is used at the moment the mapping is defined. Changing
     "mapleader" after that has no effect for already defined mappings.
let mapleader="\<Space>" " '\' isn't very convenient..
let maplocalleader="\<Space>" " '\' isn't very convenient..

" If filetype detection is not switched on yet, it will be as well.
" allow use to "language.vim" files in ftplugin folder
set nocompatible            

set pastetoggle=<F2> "avoid indentation when pasting a text
syntax on
set number
set mouse=a
set background=dark
" insensitive to case research if there is no uppercase letter,  
" and sensitive to case if there is one.
set smartcase
" }}}
" C-e is already for <End>
cnoremap <C-a> <Home>
cnoremap <C-b> <Left>
cnoremap <C-f> <Right>
" Allow to make single-line modification to each 
" line of a visual selection
" See Daniel Miessler tutorial 
vnoremap . :norm.<cr> 
nnoremap <leader>r :source ~/.vimrc<cr> 
""Easier than using ESC to quit a command or insert mode
inoremap jk <ESC>
cnoremap jk <ESC>
"" }}}1
"" {{{1 WINDOWS
" r is for resize.
nnoremap e<C-j> :res -5 <cr>
nnoremap e<C-k> :res +5 <cr>
nnoremap <C-E>_ <C-W>_
nnoremap <C-E>= <C-W>=
nnoremap <C-E>\| <C-W>\|
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
"" }}}1
"" '%%' Copy the current directory in command mode
cnoremap <expr> %% getcmdtype() == ':' ? expand('%:h').'/' : '%%'

highlight IncSearch guifg=red ctermfg=red term=underline
"" }}}1
"" {{{1 SEARCH 
set ignorecase
set hlsearch
" I use the vim-unimpaia plugin to play with the hlsearch option
set path+=** " use "find namefile" to open the first file that matches
" Display autocompletion matches when using TAB in command mode.
" See also wild mode for some options.
set wildmenu
" Don't offer to open certain files/directories
" tips seen in 
" https://gist.github.com/csswizardry/9a33342dace4786a9fee35c73fa5deeb
set wildignore+=*.bmp,*.gif,*.ico,*.jpg,*.png,*.ico
set wildignore+=*.pdf,*.psd
"" }}}1
set tabstop=8 
set textwidth=100
"" }}}1
"" {{{1 SPELL
" Add english to corrector
set spell spelllang=en
" f means first, replace the word by the first choice of correction of spell
nnoremap <leader>f 1z= 
set nospell 
" To activate and deactivate the spell; I use vim-unimpaia : [os, ]os, yos to "set spell", "set
" nospell" "set invspell" respectively
" }}}1
"" {{{1 BUFFER 
" WARNING It's easy to forget that you have changes in hidden buffers.
"Think twice when using ":q!" or ":qa!".
set hidden
nnoremap <leader>b :buffers<CR>
"" }}}1
"" {{{1 FZF and FZF.VIM
nnoremap <leader>B :Buffers<CR>
nnoremap <leader>F :Files<CR> 
" }}}1
" " {{{ Ultisnips
" " Trigger configuration. You need to change this to something other than <tab> if you use one of the following:
" " - https://github.com/Valloric/YouCompleteMe
" " - https://github.com/nvim-lua/completion-nvim
let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<c-f>"
let g:UltiSnipsJumpBackwardTrigger="<c-b>"
" " If you want :UltiSnipsEdit to split your window.
let g:UltiSnipsEditSplit="vertical"
" To reload snippets
cnoremap <C-u> <C-R>=UltiSnips#RefreshSnippets()
" " }}}
" " {{{ tagbar
nmap <leader>t :TagbarToggle<CR> 
" " }}}
" " {{{ notational-fzf-vim 
let g:nv_search_paths = ['~/wiki']
" " }}}

filetype on
filetype plugin indent on 

" I don't know why I have to force a load.. But it works
source ~/.vim/after/ftplugin/sage.vim

My .vim/after/plugin/tex.vim is

" https://stackoverflow.com/questions/37552913/vim-how-to-keep-folds-on-save
" augroup remember_folds
"   autocmd!
"   autocmd BufWinLeave * mkview
"   autocmd BufWinEnter * silent! loadview
" augroup END

execute "packadd ale"

set textwidth=100

autocmd FileType apache setlocal commentstring=#\ %s

" configuration of tex-fold (see documentation in doc/tex-fold.txt)
" to not fold figure, table, align, lstlisting and frame
let g:vimtex_viewer_mupdf = 1
let g:tex_fold_use_default_envs = 0
let g:tex_fold_ignore_envs = 1
let g:vimtex_compiler_latexmk = {
        \ 'build_dir' : '',
        \ 'callback' : 1,
        \ 'continuous' : 1,
        \ 'executable' : 'latexmk',
        \ 'hooks' : [],
        \ 'options' : [
        \   '-verbose',
        \   '-file-line-error',
        \   '-synctex=1',
    \   '-halt-on-error',
        \   '-interaction=nonstopmode',
        \ ],

Thanks for your help.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy