diff options
Diffstat (limited to '.vimrc')
| -rw-r--r-- | .vimrc | 24 |
1 files changed, 20 insertions, 4 deletions
@@ -3,6 +3,7 @@ call plug#begin('~/.vim/plugged') Plug 'lervag/vimtex' Plug 'NewComer00/octavetui.vim', {'branch': 'main'} Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }, 'for': ['markdown', 'vim-plug'] } +Plug 'vlime/vlime', {'rtp': 'vim/'} call plug#end() " Speed up making new reports @@ -73,6 +74,13 @@ set smarttab set expandtab set autoindent +" Move easily between splits +nnoremap h <C-w>h +nnoremap j <C-w>j +nnoremap k <C-w>k +nnoremap l <C-w>l + + " Compile/run hotkeys (when not using make) autocmd FileType python map <buffer> <F9> :w<CR>:exec '!clear && python3' shellescape(@%, 1)<CR> autocmd FileType python imap <buffer> <F9> <esc>:w<CR>:exec '!clear && python3' shellescape(@%, 1)<CR> @@ -83,15 +91,23 @@ autocmd FileType python map <buffer> <F8> <esc>:!python3 -m openmc_plotter<CR> autocmd FileType java map <buffer> <F9> :w<CR>:exec '!clear && java' shellescape(@%, 1)<CR> autocmd FileType java imap <buffer> <F9> <esc>:w<CR>:exec '!clear && java' shellescape(@%, 1)<CR> -autocmd FileType fortran map <buffer> <F9> :w<CR>:exec '!clear && gfortran -o prog' shellescape(@%, 1) ' && ./prog'<CR> -autocmd FileType fortran imap <buffer> <F9> <esc>:w<CR>:exec '!clear && gfortran -o prog' shellescape(@%, 1) ' && ./prog'<CR> +autocmd FileType fortran map <buffer> <F9> :w<CR>:exec '!clear && gfortran -o %:r.x % && ./%:r.x'<CR> +"autocmd FileType fortran imap <buffer> <F9> <esc>:w<CR>:exec '!clear && gfortran -o %:r.out' shellescape(@%, 1) ' && ./prog'<CR> -autocmd FileType gnuplot map <buffer> <F9> :w<CR> :!gnuplot % -e "pause mouse close,key"<CR> -autocmd FileType gnuplot imap <buffer> <F9> <esc>:w<CR> :!gnuplot % -e "pause mouse close,key"<CR> +autocmd FileType gnuplot map <buffer> <F9> :w<CR>:!gnuplot %<CR> +"autocmd FileType gnuplot imap <buffer> <F9> <esc>:w<CR>:!gnuplot % -e "pause mouse close,key"<CR> autocmd FileType sh map <buffer> <F9> :w<CR> :!clear && ./% <CR> autocmd FileType sh imap <buffer> <F9> <esc>:w<CR> :!clear && ./% <CR> +" Starting and closing OctaveTUI +autocmd FileType matlab map <buffer> <F5> :w<CR> :OctaveTUIStart<CR> +autocmd FileType matlab imap <buffer> <F5> <esc>:w<CR> :OctaveTUIStart <CR> + +autocmd FileType matlab map <buffer> <F6> :w<CR> :OctaveTUIStop <CR> +autocmd FileType matlab imap <buffer> <F6> <esc>:w<CR> :OctaveTUIStop <CR> + + " Big day for ZZ ZQ fans! map q: <Nop> nnoremap Q <nop> |
