Implement retab command

Ref #919
This commit is contained in:
Zachary Yedidia
2017-11-21 00:51:07 -05:00
parent e4c2f5d259
commit d247db3e9d
3 changed files with 43 additions and 0 deletions

View File

@@ -55,6 +55,7 @@ func init() {
"Open": Open,
"TabSwitch": TabSwitch,
"MemUsage": MemUsage,
"Retab": Retab,
}
}
@@ -110,6 +111,7 @@ func DefaultCommands() map[string]StrCommand {
"open": {"Open", []Completion{FileCompletion}},
"tabswitch": {"TabSwitch", []Completion{NoCompletion}},
"memusage": {"MemUsage", []Completion{NoCompletion}},
"retab": {"Retab", []Completion{NoCompletion}},
}
}
@@ -196,6 +198,10 @@ func PluginCmd(args []string) {
}
}
func Retab(args []string) {
CurView().Retab(true)
}
// TabSwitch switches to a given tab either by name or by number
func TabSwitch(args []string) {
if len(args) > 0 {