mirror of
https://github.com/zyedidia/micro.git
synced 2026-02-24 07:50:23 +09:00
make undothresthold a setting
This commit is contained in:
@@ -17,10 +17,14 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
synLinesUp = 75 // How many lines up to look to do syntax highlighting
|
||||
synLinesDown = 75 // How many lines down to look to do syntax highlighting
|
||||
doubleClickThreshold = 400 // How many milliseconds to wait before a second click is not a double click
|
||||
undoThreshold = 500 // If two events are less than n milliseconds apart, undo both of them
|
||||
// How many lines up to look to do syntax highlighting
|
||||
synLinesUp = 75
|
||||
// How many lines down to look to do syntax highlighting
|
||||
synLinesDown = 75
|
||||
// How many milliseconds to wait before a second click is not a double click
|
||||
doubleClickThreshold = 400
|
||||
// If two events are less than n milliseconds apart, undo both of them
|
||||
undoThreshold = int(settings["undothreshold"].(float64))
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -72,17 +72,18 @@ func GetOption(name string) interface{} {
|
||||
// DefaultSettings returns the default settings for micro
|
||||
func DefaultSettings() map[string]interface{} {
|
||||
return map[string]interface{}{
|
||||
"colorscheme": "default",
|
||||
"tabsize": float64(4),
|
||||
"indentchar": " ",
|
||||
"ignorecase": false,
|
||||
"autoindent": true,
|
||||
"syntax": true,
|
||||
"tabstospaces": false,
|
||||
"ruler": true,
|
||||
"statusline": true,
|
||||
"scrollmargin": float64(3),
|
||||
"scrollspeed": float64(2),
|
||||
"autoindent": true,
|
||||
"colorscheme": "default",
|
||||
"ignorecase": false,
|
||||
"indentchar": " ",
|
||||
"ruler": true,
|
||||
"scrollspeed": float64(2),
|
||||
"scrollmargin": float64(3),
|
||||
"statusline": true,
|
||||
"syntax": true,
|
||||
"tabsize": float64(4),
|
||||
"tabstospaces": false,
|
||||
"undothreshold": float64(500),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -203,6 +203,10 @@ Here are the options that you can set:
|
||||
|
||||
default value: `on`
|
||||
|
||||
* `undothreshold`: maximum time in milliseconds events can be apart to be counted as a single undo
|
||||
|
||||
default value: `500`
|
||||
|
||||
* `statusline`: display the status line at the bottom of the screen
|
||||
|
||||
default value: `on`
|
||||
|
||||
Reference in New Issue
Block a user