mirror of
https://github.com/Hopiu/micro.git
synced 2026-03-21 16:30:24 +00:00
Merge pull request #121 from onodera-punpun/case_insensitive
search case insensitive
This commit is contained in:
commit
b0930a0bb8
3 changed files with 8 additions and 0 deletions
|
|
@ -84,6 +84,9 @@ func Search(searchStr string, v *View, down bool) {
|
|||
str = text[:searchStart]
|
||||
}
|
||||
r, err := regexp.Compile(searchStr)
|
||||
if settings["ignorecase"].(bool) {
|
||||
r, err = regexp.Compile("(?i)" + searchStr)
|
||||
}
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ func DefaultSettings() map[string]interface{} {
|
|||
"colorscheme": "default",
|
||||
"tabsize": float64(4),
|
||||
"indentchar": " ",
|
||||
"ignorecase": false,
|
||||
"autoindent": true,
|
||||
"syntax": true,
|
||||
"tabsToSpaces": false,
|
||||
|
|
|
|||
|
|
@ -182,6 +182,10 @@ Here are the options that you can set:
|
|||
|
||||
default value: ` `
|
||||
|
||||
* `ignorecase`: perform case-insensitive searches
|
||||
|
||||
default value: `off`
|
||||
|
||||
* `syntax`: turns syntax on or off
|
||||
|
||||
default value: `on`
|
||||
|
|
|
|||
Loading…
Reference in a new issue