"Copying bad design is not good design."
NimEdit is a new editor / IDE written completely in Nim for Nim. Its design is minimalistic and yet it is one of the most powerful editors out there. Once you tried it for a while, you cannot go back to other tools.
NimEdit consists of an "editor", a "prompt", a list of "tabs" as well as a "console":
You can right click on a tab to close it.
CTRL+A | Select everything. |
CTRL+B | Abort the currently running program (break). Note that CTRL+C always copies. |
CTRL+C | Copy. |
CTRL+V | Paste. |
CTRL+X | Cut. |
CTRL+E | Execute a Nim script. The currently selected Text is passed to the Nim script. |
CTRL+F | Search a phrase in the input buffer. Use i after the search term to perform a case insensitive match, y for a style insensitive match, and b (or w) to make the search care about word boundaries. |
CTRL+H | Search and replace. The same options as for search are available. |
CTRL+Z | Undo the previous edit operation. |
CTRL+SHIFT+Z | Redo the previous edit operation. Undo the undo command. |
CTRL+G | Goto line number. |
CTRL+U | Update the syntax highlighting and remove search result markers. |
CTRL+O | Open a file. |
CTRL+S | Save the current file. |
CTRL+N | Open a new buffer. |
CTRL+Q | Close the current buffer. |
CTRL+M | Open a minimap. The minimap contains a list of all declarations in the current Nim file. |
CTRL+Space | Open auto-complete. If the caret is behind a dot, nimsuggest is queried. |
ESC | Switch between editor and prompt. |
F1 | Switch between editor and console. |
F2 | Nimsuggest integration: Goto definitions/usages. |
F3 | Goto next editing location. NimEdit automatically tracks the most recent locations that you edited. This feature replaces the common "bookmarks" feature found in other editors. |
F5 | Rerun the most recently executed nim command. Scriptable. |
F6-F12 | Scriptable. |
Many shortcuts like CTRL+E give the focus to the "prompt". This prompt replaces many traditional UI elements with a command line interface. The syntax is simply "command arg1 ... argN". Arguments are seperated by whitespace. You can also use single quotes ('term') or double quotes ("term"). The standard escape sequences like \t are available within double quotes. Every command is case insensitive.
search_options is a string of single letters with no whitespace in between.
search_options | meaning |
---|---|
w | Respect word boundaries. Note: Searches for single letters trigger this automatically. Use s to override this behaviour. |
s | Do not respect word boundaries. |
p | Precise search, do not ignore case sensitivity. |
f | Only search for the term in the active tab. Otherwise every tab is searched. |
r | Coming soon: Regular expression based search. |
Type scripts into the prompt. Take a look at the implementation of what happens if F6 is pressed:
proc pressedF6*() = let w = getCurrentIdent(true) insert("<$1></$1>" % w) setCaret(getCaret() - w.len - "</>".len)
The API that NimEdit exposes is documented here: editor.html