-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bind Ctrl+N to New Document in CUA layout
- Loading branch information
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(``) |