Skip to content

limetext/commands

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

commands

Build Status Coverage Status Go Report Card GoDoc

This package contains commands made accessible to frontends and plugins. They come in three flavours: ApplicationCommands, WindowCommands, and TextCommands.

Goals

The goal for release 1.0 is to implement all of the commands exposed by Sublime Text 3. See the commands label for outstanding commands to be implemented.

Brief Overview of Commands

A command is a type implementing one of the command interfaces.

type (
    DoSomething struct {
        backend.DefaultCommand
    }
)

Each command has a Run method which is executed when the command is invoked.

func (c *DoSomething) Run(v *backend.View, e *backend.Edit) error {
    // Do something!
}

Commands need to be registered with the backend via the init function before it can be executed by plugins.

func init() {
    register([]backend.Command{
        &DoSomething{},
    })
}

Implementing Commands

If you are interested in implementing a command, see the Implementing commands wiki page.

Other References