Skip to content

Commit

Permalink
Improve menu commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Tero Karvinen committed Nov 5, 2022
1 parent 54bf065 commit 5e273b1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
20 changes: 19 additions & 1 deletion main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function promptDoneCallback(resp, cancelled)
bp:HandleCommand(resp)
end

-- ## palette command ##
-- ## commands ##

function paletteroCommand(bp)
-- ctrl-E palettero
Expand All @@ -60,9 +60,27 @@ function paletteroCommand(bp)
end

function editmenuCommand(bp)
-- ctrl-E editmenu - add your own commands to Palettero command palette
bp:HandleCommand("tab "..userfile)
end

-- func (h *BufPane) openHelp(page string) error {
-- if data, err := config.FindRuntimeFile(config.RTHelp, page).Data(); err != nil {
-- return errors.New(fmt.Sprint("Unable to load help text", page, "\n", err))
-- } else {
-- helpBuffer := buffer.NewBufferFromString(string(data), page+".md", buffer.BTHelp)
-- helpBuffer.SetName("Help " + page)
--
-- if h.Buf.Type == buffer.BTHelp {
-- h.OpenBuffer(helpBuffer)
-- } else {
-- h.HSplitBuf(helpBuffer)
-- }
-- }
-- return nil
-- }


-- ## Menu item collection ##

function getCommand(s)
Expand Down
4 changes: 2 additions & 2 deletions palettero-defaults.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ textfilter tr ' ' ',' # space to comma
textfilter tr '\n' ',' # newline to comma, join lines
textfilter py -x x.lower() # lower case, # apt-get install pythonpy
textfilter py -x x.title() # Title Case, # apt-get install pythonpy
goto 99999999 # jump to end of file
goto 0 # jump to start of file
goto 99999999 # jump to end of file, bottom of text
goto 1 # jump to start of file, first line of document, start of text
set colorscheme simple # black on white, daytime color theme +sensiblesettings
set ftoptions false # allow indent with tabs in Python, also: set tabstospaces false +sensiblesettings
set tabstospaces false # indent with tab +sensiblesettings
Expand Down

0 comments on commit 5e273b1

Please sign in to comment.