" plugins call plug#begin('~/.vim/plugged') Plug 'lervag/vimtex' Plug 'NewComer00/octavetui.vim', {'branch': 'main'} call plug#end() " speed up making new reports autocmd BufNewFile report.tex 0r ~/.vim/templates/skeleton.tex " octave IDE let g:octavetui_octave_executable = '/usr/bin/octave' let g:octavetui_user_keymaps = { \ 'OctaveTUISetBreakpoint': '', \ 'OctaveTUIDelBreakpoint': '', \ 'OctaveTUINext': '', \ 'OctaveTUIStepIn': '', \ 'OctaveTUIStepOut': '', \ 'OctaveTUIRun': '', \ 'OctaveTUIRunStacked': '', \ 'OctaveTUIQuit': 'q', \ 'OctaveTUIQuitStacked': '', \ 'OctaveTUIContinue': '', \ 'OctaveTUIAddToWatch': '', \ 'OctaveTUIRemoveFromWatch': '', \ 'OctaveTUIGoToLastError': 'E', \ } " hotkey for viewing pdf for vimtex function! SyncZathura() " Get the window ID of the CURRENT terminal (where Vim is running) let l:term_id = system('xdotool getactivewindow') " 1. Raise Zathura using its Class name (-x) " 2. Raise the terminal back up using the ID we just captured silent exec '!wmctrl -xa Zathura && wmctrl -ia ' . l:term_id redraw! endfunction nnoremap z :call SyncZathura() " Vimtex setup let g:vimtex_view_method = 'zathura' let g:vimtex_view_automatic = 1 let g:vimtex_compiler_method = 'latexmk' " basic settings filetype plugin indent on syntax enable set number set ts=4 set sw=4 set smarttab set expandtab set autoindent " compile/run hotkeys (when not using make) autocmd FileType python map :w:exec '!clear && python3' shellescape(@%, 1) autocmd FileType python imap :w:exec '!clear && python3' shellescape(@%, 1) autocmd FileType python map :!python3 -m openmc_plotter autocmd FileType python map :!python3 -m openmc_plotter autocmd FileType java map :w:exec '!clear && java' shellescape(@%, 1) autocmd FileType java imap :w:exec '!clear && java' shellescape(@%, 1) autocmd FileType fortran map :w:exec '!clear && gfortran -o prog' shellescape(@%, 1) ' && ./prog' autocmd FileType fortran imap :w:exec '!clear && gfortran -o prog' shellescape(@%, 1) ' && ./prog' autocmd FileType gnuplot map :w :!gnuplot % -e "pause mouse close,key" autocmd FileType gnuplot imap :w :!gnuplot % -e "pause mouse close,key" autocmd FileType sh map :w :!clear && ./% autocmd FileType sh imap :w :!clear && ./% " big day for ZZ ZQ fans map q: nnoremap Q