about summary refs log tree commit diff stats
path: root/arc/highlights
blob: bb81fb569ca4e508a801907552deba6bb4350292 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
" vim: ft=vim
" Data-flow highlighting: http://www.reddit.com/r/programming/comments/1w76um/coding_in_color/cezpios

highlight highlight_97a5a5e3 ctermfg=205
call matchadd('highlight_97a5a5e3', '\<ncols\>')
highlight highlight_1f88e41c ctermfg=139
call matchadd('highlight_1f88e41c', '\<nrows\>')
highlight highlight_6da20a96 ctermfg=141
call matchadd('highlight_6da20a96', '\<rowidx\>')
highlight highlight_ae83eebb ctermfg=149
call matchadd('highlight_ae83eebb', 'curr-line-address-address')
highlight highlight_bb695e14 ctermfg=36
call matchadd('highlight_bb695e14', '\<default-scope\>')
highlight highlight_1e44ab4f ctermfg=208
call matchadd('highlight_1e44ab4f', '\<first-arg\>')
highlight highlight_3323f077 ctermfg=208
call matchadd('highlight_3323f077', '\<first-arg-box\>')
highlight highlight_74fc42b2 ctermfg=220
call matchadd('highlight_74fc42b2', 'second-arg')
highlight highlight_ff6f0571 ctermfg=220
call matchadd('highlight_ff6f0571', 'second-arg-box')
='n240' href='#n240'>240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442
[start]
visual-home = "about:chawan"
startup-script = ""
headless = false
console-buffer = true

[cmd.pager]
quit = '() => quit()'
suspend = '() => suspend()'
copyURL = '''
() => {
	if (pager.externInto('xsel -bi', pager.url))
		pager.alert("Copied URL to clipboard.");
	else
		pager.alert("Failed to copy URL to clipboard. (Is xsel installed?)");
}
'''
copyCursorLink = '''
() => {
	const link = pager.hoverLink;
	if (!link)
		pager.alert("Please move the cursor above a link and try again.");
	else if (pager.externInto('xsel -bi', link))
		pager.alert("Copied URL to clipboard.");
	else
		pager.alert("Failed to copy URL to clipboard. (Is xsel installed?)");
}
'''
copyCursorImage = '''
() => {
	const link = pager.hoverImage;
	if (!link)
		pager.alert("Please move the cursor above an image and try again.");
	else if (pager.externInto('xsel -bi', link))
		pager.alert("Copied URL to clipboard.");
	else
		pager.alert("Failed to copy URL to clipboard. (Is xsel installed?)");
}
'''
gotoClipboardURL = '''
() => {
	const s = pager.externCapture('xsel -bo');
	if (s === null)
		pager.alert("Failed to read URL from clipboard. (Is xsel installed?)");
	else
		pager.loadSubmit(s);
}
'''
peek = '() => pager.alert(pager.url)'
peekCursor = '() => pager.peekCursor()'
toggleWrap = '''
() => {
	config.search.wrap = !config.search.wrap;
	pager.alert("Wrap search " + (config.search.wrap ? "on" : "off"));
}
'''
dupeBuffer = '() => pager.dupeBuffer()'
load = '() => pager.load()'
webSearch = '() => pager.load("ddg:")'
openBookmarks = '() => pager.loadSubmit("~/.w3m/bookmark.html")'
reloadBuffer = '() => pager.reload()'
lineInfo = '() => pager.lineInfo()'
toggleSource = '() => pager.toggleSource()'
discardBuffer = '() => pager.discardBuffer()'
discardBufferPrev = '() => pager.discardBuffer(pager.buffer, "prev")'
discardBufferNext = '() => pager.discardBuffer(pager.buffer, "next")'
discardTree = '() => pager.discardTree()'
prevBuffer = '() => pager.prevBuffer()'
prevSiblingBuffer = '() => pager.prevSiblingBuffer()'
nextBuffer = '() => pager.nextBuffer()'
nextSiblingBuffer = '() => pager.nextSiblingBuffer()'
parentBuffer = '() => pager.parentBuffer()'
enterCommand = '() => pager.command()'
searchForward = '() => pager.searchForward()'
searchBackward = '() => pager.searchBackward()'
isearchForward = '() => pager.isearchForward()'
isearchBackward = '() => pager.isearchBackward()'
searchNext = 'n => pager.searchNext(n)'
searchPrev = 'n => pager.searchPrev(n)'
toggleCommandMode = '''
() => {
	if ((pager.commandMode = consoleBuffer != pager.buffer))
		console.show();
	else
		console.hide();
}
'''

[cmd.buffer]
cursorLeft = 'n => pager.cursorLeft(n)'
cursorDown = 'n => pager.cursorDown(n)'
cursorUp = 'n => pager.cursorUp(n)'
cursorRight = 'n => pager.cursorRight(n)'
cursorLineBegin = '() => pager.cursorLineBegin()'
cursorLineTextStart = '() => pager.cursorLineTextStart()'
cursorLineEnd = '() => pager.cursorLineEnd()'
cursorNextWord = '() => pager.cursorNextWord()'
cursorNextViWord = '() => pager.cursorNextViWord()'
cursorNextBigWord = '() => pager.cursorNextBigWord()'
cursorWordBegin = '() => pager.cursorWordBegin()'
cursorViWordBegin = '() => pager.cursorViWordBegin()'
cursorBigWordBegin = '() => pager.cursorBigWordBegin()'
cursorWordEnd = '() => pager.cursorWordEnd()'
cursorViWordEnd = '() => pager.cursorViWordEnd()'
cursorBigWordEnd = '() => pager.cursorBigWordEnd()'
cursorPrevLink = 'n => pager.cursorPrevLink(n)'
cursorNextLink = 'n => pager.cursorNextLink(n)'
cursorPrevParagraph = 'n => pager.cursorPrevParagraph(n)'
cursorNextParagraph = 'n => pager.cursorNextParagraph(n)'
cursorTop = 'n => pager.cursorTop(n)'
cursorMiddle = '() => pager.cursorMiddle()'
cursorBottom = 'n => pager.cursorBottom(n)'
cursorLeftEdge = '() => pager.cursorLeftEdge()'
cursorMiddleColumn = '() => pager.cursorMiddleColumn()'
cursorRightEdge = '() => pager.cursorRightEdge()'
halfPageDown = 'n => pager.halfPageDown(n)'
halfPageUp = 'n => pager.halfPageUp(n)'
pageDown = 'n => pager.pageDown(n)'
pageUp = 'n => pager.pageUp(n)'
pageLeft = 'n => pager.pageLeft(n)'
pageRight = 'n => pager.pageRight(n)'
scrollDown = 'n => pager.scrollDown(n)'
scrollUp = 'n => pager.scrollUp(n)'
scrollLeft = 'n => pager.scrollLeft(n)'
scrollRight = 'n => pager.scrollRight(n)'
click = '() => pager.click()'
viewImage = '() => pager.gotoURL(pager.hoverImage)'
toggleImages = '() => pager.toggleImages()'
markURL = '() => pager.markURL()'
redraw = '() => pager.redraw()'
reshape = '() => pager.reshape()'
cancel = '() => pager.cancel()'
# vi G
gotoLineOrEnd = 'n => n ? pager.gotoLine(n) : pager.cursorLastLine()'
# vim gg
gotoLineOrStart = 'n => n ? pager.gotoLine(n) : pager.cursorFirstLine()'
# vi z. z^M z-
centerLineBegin = 'n => pager.centerLineBegin(n)'
raisePageBegin = 'n => pager.raisePageBegin(n)'
lowerPageBegin = 'n => pager.lowerPageBegin(n)'
# vi z+ z^
nextPageBegin = 'n => pager.nextPageBegin(n)'
previousPageBegin = 'n => pager.previousPageBegin(n)'
# vim zz zb zt
centerLine = 'n => pager.centerLine(n)'
raisePage = 'n => pager.raisePage(n)'
lowerPage = 'n => pager.lowerPage(n)'
cursorToggleSelection = 'n => pager.cursorToggleSelection(n)'
cursorToggleSelectionLine = 'n => pager.cursorToggleSelection(n, {selectionType: "line"})'
cursorToggleSelectionBlock = 'n => pager.cursorToggleSelection(n, {selectionType: "block"})'
sourceEdit = '''
() => {
	const url = pager.url;
	pager.extern(pager.getEditorCommand(url.protocol == "file:" ?
		decodeURIComponent(url.pathname) :
		pager.cacheFile));
}
'''
saveLink = '() => pager.saveLink()'
saveSource = '() => pager.saveSource()'
mark = '''
async () => {
	const c = await pager.askChar("m");
	if (c.charCodeAt() != 3) /* ctrl-c */
		pager.setMark(c);
}
'''
gotoMark = '''
async () => {
	const c = await pager.askChar('`');
	if (c.charCodeAt() != 3) /* C-c */
		pager.gotoMark(c);
}
'''
gotoMarkY = '''
async () => {
	const c = await pager.askChar('`');
	if (c.charCodeAt() != 3) /* C-c */
		pager.gotoMarkY(c);
}
'''
copySelection = '''
async () => {
	if (!pager.currentSelection) {
		feedNext();
		return;
	}
	const text = await pager.getSelectionText(pager.currentSelection);
	if (pager.externInto('xsel -bi', text))
		pager.alert("Copied selection to clipboard.");
	else
		pager.alert("Failed to copy selection to clipboard. (Is xsel installed?)");
	pager.cursorToggleSelection();
}
'''
cursorNthLink = 'n => pager.cursorNthLink(n)'
cursorRevNthLink = 'n => pager.cursorRevNthLink(n)'

[cmd.line]
submit = '() => line.submit()'
backspace = '() => line.backspace()'
delete = '() => line.delete()'
cancel = '() => line.cancel()'
prevWord = '() => line.prevWord()'
nextWord = '() => line.nextWord()'
backward = '() => line.backward()'
forward = '() => line.forward()'
clear = '() => line.clear()'
kill = '() => line.kill()'
clearWord = '() => line.clearWord()'
killWord = '() => line.killWord()'
begin = '() => line.begin()'
end = '() => line.end()'
escape = '() => line.escape()'
prevHist = '() => line.prevHist()'
nextHist = '() => line.nextHist()'

[protocol.ftp]
form-request = "ftp"

[protocol.mailto]
form-request = "mailto"

[protocol.data]
form-request = "data"

[search]
wrap = true
ignore-case = true

[encoding]
document-charset = ["utf-8", "sjis", "euc-jp", "latin2"]
display-charset = "auto"

[external]
mailcap = [
	"~/.mailcap"
]
mime-types = [
	"~/.mime.types",
	"/etc/mime.types",
	"/usr/etc/mime.types",
	"/usr/local/etc/mime.types"
]
urimethodmap = [
	"~/.urimethodmap",
	"~/.w3m/urimethodmap",
	"/etc/urimethodmap",
	"/usr/local/etc/w3m/urimethodmap"
]
tmpdir = "/tmp/cha-tmp-$LOGNAME"
sockdir = "/tmp/cha-sock-$LOGNAME"
editor = "${EDITOR:-vi}"
cgi-dir = "${%CHA_LIBEXEC_DIR}/cgi-bin"
download-dir = "/tmp/"
w3m-cgi-compat = false

[network]
max-redirect = 10
prepend-scheme = "https://"
prepend-https = true # deprecated, kept only for backwards-compatibility
default-headers = {
	User-Agent = "Mozilla/5.0 chawan",
	Accept = "text/html, text/*;q=0.5, */*;q=0.4",
	Accept-Encoding = "gzip, deflate",
	Accept-Language = "en;q=1.0",
	Pragma = "no-cache",
	Cache-Control = "no-cache"
}

[input]
vi-numeric-prefix = true
use-mouse = true

[display]
color-mode = "auto"
format-mode = "auto"
no-format-mode = ["overline"]
image-mode = "auto"
alt-screen = "auto"
highlight-color = "cyan"
highlight-marks = true
double-width-ambiguous = false
minimum-contrast = 100
force-clear = false
set-title = true
default-background-color = "auto"
default-foreground-color = "auto"
query-da1 = true
columns = 80
lines = 24
pixels-per-column = 9
pixels-per-line = 18
force-columns = false
force-lines = false
force-pixels-per-column = false
force-pixels-per-line = false

[[omnirule]]
match = '^ddg:'
substitute-url = 'x => "https://lite.duckduckgo.com/lite/?kp=-1&kd=-1&q=" + encodeURIComponent(x.split(":").slice(1).join(":"))'

[page]
# buffer commands
h = 'cmd.buffer.cursorLeft'
j = 'cmd.buffer.cursorDown'
k = 'cmd.buffer.cursorUp'
l = 'cmd.buffer.cursorRight'
'M-[D' = 'cmd.buffer.cursorLeft'
'M-[B' = 'cmd.buffer.cursorDown'
'M-[A' = 'cmd.buffer.cursorUp'
'M-[C' = 'cmd.buffer.cursorRight'
'0' = 'cmd.buffer.cursorLineBegin'
'^' = 'cmd.buffer.cursorLineTextStart'
'$' = 'cmd.buffer.cursorLineEnd'
b = 'cmd.buffer.cursorViWordBegin'
e = 'cmd.buffer.cursorViWordEnd'
w = 'cmd.buffer.cursorNextViWord'
B = 'cmd.buffer.cursorBigWordBegin'
E = 'cmd.buffer.cursorBigWordEnd'
W = 'cmd.buffer.cursorNextBigWord'
'[' = 'cmd.buffer.cursorPrevLink'
']' = 'cmd.buffer.cursorNextLink'
'{' = 'cmd.buffer.cursorPrevParagraph'
'}' = 'cmd.buffer.cursorNextParagraph'
H = 'cmd.buffer.cursorTop'
M = 'cmd.buffer.cursorMiddle'
L = 'cmd.buffer.cursorBottom'
g0 = 'cmd.buffer.cursorLeftEdge'
gc = 'cmd.buffer.cursorMiddleColumn'
'g$' = 'cmd.buffer.cursorRightEdge'
C-d = 'cmd.buffer.halfPageDown'
C-u = 'cmd.buffer.halfPageUp'
C-f = 'cmd.buffer.pageDown'
C-b = 'cmd.buffer.pageUp'
'M-[6~' = 'cmd.buffer.pageDown'
'M-[5~' = 'cmd.buffer.pageUp'
'zH'= 'cmd.buffer.pageLeft'
'zL' = 'cmd.buffer.pageRight'
'<' = 'cmd.buffer.pageLeft'
'>' = 'cmd.buffer.pageRight'
C-e = 'cmd.buffer.scrollDown'
C-y = 'cmd.buffer.scrollUp'
J = 'cmd.buffer.scrollDown'
K = 'cmd.buffer.scrollUp'
sE = 'cmd.buffer.sourceEdit'
sC-m = 'cmd.buffer.saveLink'
sC-j = 'cmd.buffer.saveLink'
m = 'cmd.buffer.mark'
'`' = 'cmd.buffer.gotoMark'
"'" = 'cmd.buffer.gotoMarkY'
'zh'= 'cmd.buffer.scrollLeft'
'zl' = 'cmd.buffer.scrollRight'
'-'= 'cmd.buffer.scrollLeft'
'+' = 'cmd.buffer.scrollRight'
C-m = 'cmd.buffer.click'
C-j = 'cmd.buffer.click'
I = 'cmd.buffer.viewImage'
M-i = 'cmd.buffer.toggleImages'
':' = 'cmd.buffer.markURL'
r = 'cmd.buffer.redraw'
R = 'cmd.buffer.reshape'
C-c = 'cmd.buffer.cancel'
gg = 'cmd.buffer.gotoLineOrStart'
G = 'cmd.buffer.gotoLineOrEnd'
'z.' = 'cmd.buffer.centerLineBegin'
'zC-m' = 'cmd.buffer.raisePageBegin'
'zC-j' = 'cmd.buffer.raisePageBegin'
'z-' = 'cmd.buffer.lowerPageBegin'
zz = 'cmd.buffer.centerLine'
'zt' = 'cmd.buffer.raisePage'
'zb' = 'cmd.buffer.lowerPage'
'z+' = 'cmd.buffer.nextPageBegin'
'z^' = 'cmd.buffer.previousPageBegin'
y = 'cmd.buffer.copySelection'
v = 'cmd.buffer.cursorToggleSelection'
V = 'cmd.buffer.cursorToggleSelectionLine'
C-v = 'cmd.buffer.cursorToggleSelectionBlock'

# pager commands
q = 'cmd.pager.quit'
C-z = 'cmd.pager.suspend'
sS = 'cmd.pager.saveSource'
M-u = 'cmd.pager.dupeBuffer'
C-l = 'cmd.pager.load'
C-k = 'cmd.pager.webSearch'
M-b = 'cmd.pager.openBookmarks'
U = 'cmd.pager.reloadBuffer'
C-g = 'cmd.pager.lineInfo'
'\' = 'cmd.pager.toggleSource'
D = 'cmd.pager.discardBuffer'
'd,' = 'cmd.pager.discardBufferPrev'
'd.' = 'cmd.pager.discardBufferNext'
M-d = 'cmd.pager.discardTree'
',' = 'cmd.pager.prevBuffer'
'M-,' = 'cmd.pager.prevSiblingBuffer'
'.' = 'cmd.pager.nextBuffer'
'M-.' = 'cmd.pager.nextSiblingBuffer'
'M-/' = 'cmd.pager.parentBuffer'
M-c = 'cmd.pager.enterCommand'
'/' = 'cmd.pager.isearchForward'
'?' = 'cmd.pager.isearchBackward'
n = 'cmd.pager.searchNext'
N = 'cmd.pager.searchPrev'
c = 'cmd.pager.peek'
u = 'cmd.pager.peekCursor'
C-w = 'cmd.pager.toggleWrap'
M-y = 'cmd.pager.copyURL'
yc = 'pager.alert("Please use `yu` to copy URLs")'
yu = 'cmd.pager.copyCursorLink'
yI = 'cmd.pager.copyCursorImage'
M-p = 'cmd.pager.gotoClipboardURL'

[line]
C-m = 'cmd.line.submit'
C-j = 'cmd.line.submit'
C-h = 'cmd.line.backspace'
'C-?' = 'cmd.line.backspace'
C-d = 'cmd.line.delete'
C-c = 'cmd.line.cancel'
M-b = 'cmd.line.prevWord'
M-f = 'cmd.line.nextWord'
C-b = 'cmd.line.backward'
C-f = 'cmd.line.forward'
C-u = 'cmd.line.clear'
C-_ = 'cmd.line.clear'
M-k = 'cmd.line.clear'
C-k = 'cmd.line.kill'
C-w = 'cmd.line.clearWord'
M-C-h = 'cmd.line.clearWord'
'M-C-?' = 'cmd.line.clearWord'
M-d = 'cmd.line.killWord'
C-a = 'cmd.line.begin'
C-e = 'cmd.line.end'
C-v = 'cmd.line.escape'
C-p = 'cmd.line.prevHist'
C-n = 'cmd.line.nextHist'
M-c = 'cmd.pager.toggleCommandMode'
'M-[D' = 'cmd.line.backward'
'M-[B' = 'cmd.line.nextHist'
'M-[A' = 'cmd.line.prevHist'
'M-[C' = 'cmd.line.forward'