"eofnewline": false,
"fastdirty": true,
"fileformat": "unix",
- "hidehelp": false,
"ignorecase": false,
"indentchar": " ",
"keepautoindent": false,
"scrollbar": false,
"scrollmargin": float64(3),
"scrollspeed": float64(2),
- "softwrap": false,
"smartpaste": true,
+ "softwrap": false,
"splitbottom": true,
"splitright": true,
+ "statusformatl": "$(filename) $(modified)($(line),$(col)) $(opt:filetype) $(opt:fileformat) $(opt:encoding)",
+ "statusformatr": "$(bind:ToggleKeyMenu): show bindings, $(bind:ToggleHelp): toggle help",
"statusline": true,
"syntax": true,
"tabmovement": false,
return common
}
+// LocalSettings is a list of the local only settings
+var LocalSettings = []string{"filetype", "readonly"}
+
// DefaultLocalSettings returns the default local settings
// Note that filetype is a local only option
func DefaultLocalSettings() map[string]interface{} {
common := DefaultCommonSettings()
common["filetype"] = "unknown"
+ common["readonly"] = false
return common
}
+func DefaultAllSettings() map[string]interface{} {
+ global := DefaultGlobalSettings()
+ local := DefaultLocalSettings()
+ for k, v := range global {
+ local[k] = v
+ }
+ return local
+}
+
func GetNativeValue(option string, realValue interface{}, value string) (interface{}, error) {
var native interface{}
kind := reflect.TypeOf(realValue).Kind()