mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-19 15:27:20 +09:00
Add indent character option
This commit is contained in:
@@ -74,6 +74,7 @@ func DefaultSettings() map[string]interface{} {
|
||||
return map[string]interface{}{
|
||||
"colorscheme": "default",
|
||||
"tabsize": float64(4),
|
||||
"indentchar": "|",
|
||||
"autoindent": true,
|
||||
"syntax": true,
|
||||
"tabsToSpaces": false,
|
||||
|
||||
@@ -545,7 +545,12 @@ func (v *View) DisplayView() {
|
||||
}
|
||||
|
||||
if ch == '\t' {
|
||||
screen.SetContent(x+tabchars, lineN, ' ', nil, lineStyle)
|
||||
lineIndentStyle := defStyle
|
||||
if style, ok := colorscheme["indent-line"]; ok {
|
||||
lineIndentStyle = style
|
||||
}
|
||||
indentChar := []rune(settings["indentchar"].(string))
|
||||
screen.SetContent(x+tabchars, lineN, indentChar[0], nil, lineIndentStyle)
|
||||
tabSize := int(settings["tabsize"].(float64))
|
||||
for i := 0; i < tabSize-1; i++ {
|
||||
tabchars++
|
||||
|
||||
Reference in New Issue
Block a user