mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-29 14:22:42 +09:00
Add literate plugin support
This commit is contained in:
@@ -3,6 +3,7 @@ package action
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
@@ -252,6 +253,29 @@ func (h *BufPane) ToggleLogCmd(args []string) {
|
||||
|
||||
// ReloadCmd reloads all files (syntax files, colorschemes...)
|
||||
func (h *BufPane) ReloadCmd(args []string) {
|
||||
ReloadConfig()
|
||||
}
|
||||
|
||||
func ReloadConfig() {
|
||||
config.InitRuntimeFiles()
|
||||
err := config.ReadSettings()
|
||||
if err != nil {
|
||||
screen.TermMessage(err)
|
||||
}
|
||||
config.InitGlobalSettings()
|
||||
InitBindings()
|
||||
InitCommands()
|
||||
|
||||
err = config.InitColorscheme()
|
||||
if err != nil {
|
||||
screen.TermMessage(err)
|
||||
}
|
||||
|
||||
log.Println("RELOAD CONFIG", len(buffer.OpenBuffers))
|
||||
for _, b := range buffer.OpenBuffers {
|
||||
log.Println("UPDATE RULES")
|
||||
b.UpdateRules()
|
||||
}
|
||||
}
|
||||
|
||||
// ReopenCmd reopens the buffer (reload from disk)
|
||||
|
||||
Reference in New Issue
Block a user