bb8a27909e | ||
---|---|---|
src | ||
test | ||
.codecov.yml | ||
.gitignore | ||
.travis.yml | ||
LICENSE.md | ||
README.md | ||
REQUIRE | ||
appveyor.yml |
README.md
Acorn.jl
A pure julia text editor
Features
- Use in REPL or from command line
- Commands like
find
,help
,save
+ easy to create your own. - Customizable key bindings and settings
Installing
Pkg.clone("https://github.com/nick-paul/Acorn.jl.git")
Usage
From within the REPL:
using Acorn
julia> acorn("filename")
From the command line
$ julia -E "using Acorn;acorn()" filename
Use an alias to make command line easier:
$ alias acornjl='julia -E "using Acorn;acorn()"'
$ acornjl filename
Commands
Press Ctrl-P
to enter command mode. Type 'help COMMAND' for more information on that command.
arguments in [brackets]
are optional
help [CMD]
: display help information for CMDquit
: quit the editoropen FILE
: open a file, create a new one if neededsave [FILE]
: save the file, if a new filename is provided, save as that namefind [STR]
: start interactive find. if STR is provided, start interactive search with STRecho STR
: display STR as a messageset param_name param
: set parameterparam_name
toparam
. ex:set tab_stop 4
bind char command
: bindCtrl-(char)
to the commandcommand
. ex:bind s save
,bind h echo Hello world!
Customization / Contributing
Commands
Commands are easy to create and allow for greater editor usability. To create your own command, create a julia file in the cmds
folder and name it after your command. Then include your file in the Acorn module. Below is an example definition of the command sample
. For more examples, see the cmds/
folder.
cmds/sample.jl
# The command must have the signature
# function(::Editor, ::String)
function sampleCommand(ed::Editor, args::String)
# Perform operation here
end
# Call `addCommand` to add
addCommand(:sample, # The command name
sampleCommand, # The command function
help="description of sample") # Displayed when user runs 'help sample'
Acorn.jl
Include your command here
# Load commands
#...
include("cmds/save.jl")
include("cmds/find.jl")
include("cmds/sample.jl") # Add this line
#...
Features
Text selection, copy/paste, syntax highlighting, etc..