1
0
Fork 0

Compare commits

...

2 Commits

2 changed files with 44 additions and 0 deletions

View File

@ -1,3 +1,40 @@
-- define additional cursor styles on WIN_OPEN
vis.events.subscribe(vis.events.WIN_OPEN, function(win)
win['STYLE_CURSOR_'..vis.modes.OPERATOR_PENDING] = win.STYLE_LEXER_MAX - 1
win['STYLE_CURSOR_'..vis.modes.VISUAL] = win.STYLE_LEXER_MAX - 2
win['STYLE_CURSOR_'..vis.modes.VISUAL_LINE] = win.STYLE_LEXER_MAX - 3
win['STYLE_CURSOR_'..vis.modes.INSERT] = win.STYLE_LEXER_MAX - 4
win['STYLE_CURSOR_'..vis.modes.REPLACE] = win.STYLE_LEXER_MAX - 5
win:style_define(
win['STYLE_CURSOR_'..vis.modes.OPERATOR_PENDING],
'fore:black,back:red')
win:style_define(
win['STYLE_CURSOR_'..vis.modes.VISUAL],
'fore:black,back:yellow')
win:style_define(
win['STYLE_CURSOR_'..vis.modes.VISUAL_LINE],
'fore:black,back:yellow')
win:style_define(
win['STYLE_CURSOR_'..vis.modes.INSERT],
'fore:black,back:magenta')
win:style_define(
win['STYLE_CURSOR_'..vis.modes.REPLACE],
'fore:black,back:green')
end)
-- apply additional cursor styles on WIN_STATUS
vis.events.subscribe(vis.events.WIN_STATUS, function(win)
local pos = win.selection.pos
win:style(win['STYLE_CURSOR'], pos, pos)
if win == vis.win then
local mode_style_id =
win['STYLE_CURSOR_'..vis.mode] or
win['STYLE_CURSOR_PRIMARY']
win:style(mode_style_id, pos, pos)
end
end)
local lexers = vis.lexers
lexers.STYLE_LINENUMBER = 'fore:blue'
lexers.STYLE_LINENUMBER_CURSOR = 'fore:magenta'

View File

@ -38,6 +38,13 @@ export INPUTRC="$XDG_CONFIG_HOME"/readline/inputrc
# .npm/, .npmrc
export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME"/npm/npmrc
# .aspell.conf etc.
aspell_data_dir="$XDG_DATA_HOME"/aspell
if [ ! -d "$aspell_data_dir" ]; then
mkdir -p "$aspell_data_dir"
fi
export ASPELL_CONF="per-conf $XDG_CONFIG_HOME/aspell/aspell.conf; personal $aspell_data_dir/sl.pws; repl $aspell_data_dir/sl.prepl"
# editor
export EDITOR=vi