Skip to content

Commit

Permalink
[vim] Firenvim config updates
Browse files Browse the repository at this point in the history
- Make it work better with overleaf
- I don't really know, I don't use firenvim anymore
  • Loading branch information
MarcelRobitaille committed Oct 10, 2022
1 parent 66143a7 commit 24a48b1
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions vim/after/plugin/firenvim.vim
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
let g:firenvim_config = {
\ 'globalSettings': {
\ 'ignoreKeys': {
\ 'all': ['<C-s>', '<C-Enter>'],
\ },
\ 'alt': 'all',
\ '<C-w>': 'noop',
\ '<C-r>': 'default',
\ },
\ 'localSettings': {
\ '.*': {
Expand All @@ -15,6 +19,17 @@ let g:firenvim_config = {
\ }
let fc = g:firenvim_config['localSettings']
let fc['https?://app.element.io'] = { 'takeover': 'never', 'priority': 1 }
let fc['https?://localhost:3030'] = { 'takeover': 'never', 'priority': 1 }
let fc['https?://mail.google.com'] = { 'takeover': 'never', 'priority': 1 }
let fc['https?://www.messenger.com'] = { 'takeover': 'never', 'priority': 1 }

au BufWritePost www.overleaf.com_** call firenvim#eval_js('setTimeout(() => document.querySelector(".btn.btn-recompile").click(), 300)')

au BufEnter github.com_*.txt set filetype=markdown

au BufEnter *ipynb* set filetype=python
au BufEnter *ipynb* execute 'ALEDisable'
au BufEnter *ipynb* execute 'LspStop'
au BufRead *ipynb* execute 'LspStop'
au BufReadPost *ipynb* execute 'LspStop'
au BufWritePost *ipynb* call firenvim#eval_js('document.querySelector(`[aria-label="Run"`).click()')

0 comments on commit 24a48b1

Please sign in to comment.