aboutsummaryrefslogtreecommitdiff
path: root/.vimrc
diff options
context:
space:
mode:
authorConnor Moore <connor@hhmoore.ca>2026-03-30 14:30:12 -0400
committerConnor Moore <connor@hhmoore.ca>2026-03-30 14:30:12 -0400
commit9aa64a75a4bfdb13c81af68f1da3268ca99ca424 (patch)
tree6d43fdd5ecbb22643f0c86f09a4b00b58d615243 /.vimrc
parentef04177869cecdb19490ae9040f30a3aad2c0cd7 (diff)
Fixed LaTeX margins, added vlime for CL, hotkeys for pane switching/starting OctaveTUI in vim.
Diffstat (limited to '.vimrc')
-rw-r--r--.vimrc24
1 files changed, 20 insertions, 4 deletions
diff --git a/.vimrc b/.vimrc
index 4325d7f..302ae98 100644
--- a/.vimrc
+++ b/.vimrc
@@ -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>