Configure a list of shortcuts for Vim-mode + user-defined :commands for toggling panels on Overleaf.
This is a work-in-progress script that aims at restoring the full functionality of the old Custom Vim Keybindings for Overleaf. Per their recent update, the legacy editor (Ace) is no longer available for some users (myself included), replaced by Code Mirror (v6?). Reassuringly, both Ace and Code Mirror use the same VIM Mode API, documented here.
Full Credits to Harutyun Amirjanyan for the jump-to-PDF script, as found on the Ace forum, in this post.
List of mappings defined here:
imap jj <esc>
, imap jk <esc>
and imap <c-]> <esc>
.nmap j gj
and nmap k gk
(so far, we cannot mapt g0
in Ace editor.)\lv
and ;lv
are triggering the following button
,v
to toggle the file-tree on the left.,o
to enter editor-only mode: it hides the file panel and the PDF preview pane. (Caveat: if file-tree is hidden and PDF view is alive, this shortcut will show the file-tree and hide PDF.):o
in Commandline, to hide box below the editor pane, introduced by the "Omega" icon to the right of "Source | Rich Text".:pdf
in Commandline, to toggle the PDF pane on the right. Alias include: :PDF
, :ShowPDF
, :ClosePDF
, :OpenPDF
.]s
and [s
to jump to the next/previous spell-checking suggestion.
r
to trigger the rephrase tool.And, those that need extra work, include:
:pdf
, or :p
to hide/show the PDF Preview panel:cc
in Commandline, to toggle the Comment panel. Alias include: :CC
, :CloseComment
. :home
in Commandline, to get back to the "All Projects" view.:log
in Commandline, to toggle the "CompileLog":history
...Ctrl+C
now works on Windows machine with one caveat: after copying a selection made in Visual mode to clipboard with <C-c>
, need to press j
/k
to escape from Visual mode, back to Normal mode.:pdf
command and the <leader>o
mapping.)