Skip to content

Commit

Permalink
bind Ctrl+N to New Document in CUA layout
Browse files Browse the repository at this point in the history
  • Loading branch information
taviso committed Jan 28, 2023
1 parent d15eec3 commit 51f53ca
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
Binary file modified cua.wpk
Binary file not shown.
20 changes: 20 additions & 0 deletions macro/macros/newdoc.mac
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/* vim: set ft=cpp: */

#include "macro.h"
#include "system.h"
#include "utils.h"

#pragma title New Document

// Find the first document blank document.
require(STATE_NORMAL)

// This is used for the CUA Keyboard Layout, Ctrl+N "New"
for (doc, system(SYS_NUMBER) + 1, 9, 1)
{home}$(doc)
if (system(SYS_DOCUMENT) $eq 256)
{quit}
endif
endfor

status(`Error: Maximum open documents reached`) wait(30) status(``)

0 comments on commit 51f53ca

Please sign in to comment.