Moves configuration into .slaprc

This commit is contained in:
Dan Kaplun 2014-05-01 03:38:55 -05:00
parent 918a4eead6
commit 6afeb9dc99
3 changed files with 30 additions and 27 deletions

28
.slaprc Normal file
View File

@ -0,0 +1,28 @@
{
"editor": {
"useSpaces": false,
"tabSize": 4,
"pageLines": 10,
"doubleClickDuration": 600,
"style": {
"selection": "{cyan-bg}",
"currentLine": "{blue-bg}",
"keyword": "{red-fg}",
"built_in": "{yellow-fg}",
"title": "{underline}",
"params": "{bold}",
"number": "{green-fg}{bold}",
"string": "{green-fg}{bold}",
"regexp": "{green-fg}{bold}",
"literal": "{green-fg}{bold}",
"comment": "{light-white-fg}"
}
},
"header": {
"style": "{white-bg}{black-fg}"
}
}

View File

@ -19,31 +19,7 @@ function Editor (opts) {
blessed.Box.call(self, extend({
tags: true,
wrap: false,
// Custom
useSpaces: false,
tabSize: 4,
pageLines: 10,
doubleClickDuration: 600,
style: {
selection: '{cyan-bg}',
currentLine: '{blue-bg}',
keyword: '{red-fg}',
built_in: '{yellow-fg}',
// 'function': '',
title: '{underline}',
params: '{bold}',
number: '{green-fg}{bold}',
string: '{green-fg}{bold}',
regexp: '{green-fg}{bold}',
literal: '{green-fg}{bold}',
comment: '{light-white-fg}', // '{light-black-fg}',
}
wrap: false
}, opts));
self.changeStack = new Undo.Stack();

View File

@ -18,8 +18,7 @@ function Program (opts) {
top: 0,
left: 0,
right: 0,
height: 1,
style: '{white-bg}{black-fg}'
height: 1
}, opts.header));
self.screen.append(self.header);