Skip to content

Commit

Permalink
allow typing in vim mode
Browse files Browse the repository at this point in the history
  • Loading branch information
TodePond committed Jan 17, 2025
1 parent 45eab42 commit abf6d6a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export class PastaMirror {
},
{
// any key except Ctrl-? or Shift-? or etc
any: (view, key) => {
any: (_view, key) => {
if (!getSettings().pastingMode) return false;
if (key.ctrlKey || key.altKey || key.metaKey) {
return false;
Expand All @@ -112,6 +112,13 @@ export class PastaMirror {
return false;
}

if (getSettings().vimMode) {
nudelAlert(
"<h2>typing is disabled</h2><p>but you're mad enough to use vim mode anyway so i'll let this one slide...</p>",
);
return false;
}

nudelAlert(
'<h2>typing is disabled</h2><p>to enable typing, turn off <strong>PASTING MODE</strong> in the settings.</p>',
);
Expand Down

0 comments on commit abf6d6a

Please sign in to comment.