1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 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 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590
|
hnb (1.9.17-4) * Add recursive expand/collapse to hnbrc. (Closes: #248798)
hnb (1.9.17-4) * Provide an alternate hnbrc file. (Closes: #228413)
hnb (1.9.18-4) * Workaround for missing new nodes in search mode.
(See: #405117)
hnb (1.9.18-5) * Merge hnbrc.vi into hnbrc and add some macros which change
e.g. the keybindings. Also improve the vi-like keybindings.
(Closes: #292889)
hnb (1.9.18-5) * Enable some additional editing commands in hnbrc, e.g. ^B,
^F and ^D.
hnb (1.9.18-5) * Update alternative color scheme so that it does not assume a
terminal with dark background color anymore.
hnb (1.9.18-7) * Add an alternative bullet style to default hnbrc and
reformat hnbrc. The alternative style uses less columns
than the original style.
hnb (1.9.18-8) * Adapt search key bindings to be more intuitive (at least for
vi users, others presumably don't try these keys):
- "N" does now search backwards instead of forward in
context search.
- The key binding for "P" in context search has been
removed.
* Do some whitespace fixes, hnb is very fussy about whitespaces
in ascii mode, which is the recommended way to edit this file.
* Change symbol for undone todo entries in alternative bullet
style from "!" to "_".
--- hnb.orig/doc/hnbrc
+++ hnb/doc/hnbrc
@@ -1,59 +1,118 @@
-# configuration file for hnb,
+# configuration file for hnb
#
-# use a tab-spacing of 4 when editing this file, or edit it thorugh
-# hnb with "hnb -a ~/.hnbrc" to take advantage of the indentation in it
+# Use tabs when editing this file, or edit it through hnb with
+# "hnb -a ~/.hnbrc" to take advantage of the indentation in it.
+#
+# There are some macros which change e.g. the keybindings or look of hnb.
+# Search for "configuration macro" in this file to find more out about them.
+# Please note that these macros must be run after they have been defined.
#
-# (please be aware that this is the configuration file for a development version,
-# things might change drastically soon,.. or perhaps later)
-##### bullets
- # what kind of bullets are displayed before each item
- ##### samples
- #bullet_parent " -"
- #bullet_parent " *"
- #bullet_parent " "
- #bullet_parent_expanded " +"
- #bullet_parent_expanded " *"
- #bullet_parent_expanded " "
- #bullet_leaf " *"
- #bullet_leaf " -"
- bullet_leaf " "
- bullet_parent " +"
- bullet_parent_expanded " -"
-
##### user interface
- ##### display format
- # defining how each node is displayed, the display string syntax is
- # interpreted as follows:
- #
- # spaces turn into real spaces, i means indentation, - means bullet,
- # d means the real data of the node, x is a temporary placeholder for
- # upcoming column-types,. (for debugging only)
- #
- # i and x can take an argument specifying how many characters wide
- # the field should be
- #
- # until further features are added, only the multiplier after
- # indentation actually does something
- # # indicates node number (actually line number when used as a folding editor)
+ ##### display format / bullets
+ #
+ # display_format:
+ #
+ # Defining how each node is displayed, the display string
+ # syntax is interpreted as follows:
+ #
+ # - Spaces turn into real spaces, i means indentation, -
+ # means bullet, d means the real data of the node, x is
+ # a temporary placeholder for upcoming column-types (for
+ # debugging only).
+ #
+ # - i and x can take an argument specifying how many
+ # characters wide the field should be.
+ #
+ # - Until further features are added, only the multiplier
+ # after indentation actually does something. # indicates
+ # the node number (actually line number when used as a
+ # folding editor).
+ #
+ # bullets:
+ #
+ # What kind of bullets are displayed before each item,
+ # possible items and their default values are:
+ #
+ # - bullet_leaf " -"
+ # - bullet_parent " +"
+ # - bullet_parent_expanded " *"
+ # - bullet_todo_parent_undone "[ ]"
+ # - bullet_todo_parent_done "[X]"
+ # - bullet_todo_leaf_undone "[ ]"
+ # - bullet_todo_leaf_done "[X]"
+ #
##### samples
- #display_format # "i4- d"
- display_format "i4- d"
+ #display_format "i4- d"
+ #display_format "i2-d"
+ #display_format "# i4- d"
+ #display_format "#i2-d"
+ #
+ #bullet_parent " +"
+ #bullet_parent " *"
+ #bullet_parent " "
+ #bullet_parent_expanded " *"
+ #bullet_parent_expanded " +"
+ #bullet_parent_expanded " "
+ #bullet_leaf " -"
+ #bullet_leaf " *"
+
+ macro define bullets_standard
+
+ display_format "i4- d"
+
+ bullet_leaf " -"
+ bullet_parent " +"
+ bullet_parent_expanded " *"
+ bullet_todo_parent_undone "[ ]"
+ bullet_todo_parent_done "[X]"
+ bullet_todo_leaf_undone "[_]"
+ bullet_todo_leaf_done "[X]"
+
+ end
+
+ macro define bullets_alternate
+
+ display_format "i2-d"
+
+ bullet_leaf " -"
+ bullet_parent " +"
+ bullet_parent_expanded " *"
+ bullet_todo_parent_undone " _"
+ bullet_todo_parent_done " X"
+ bullet_todo_leaf_undone " _"
+ bullet_todo_leaf_done " X"
+
+ end
+
+ ##### configuration macro (bullets):
+ #
+ # To switch to the alternative bullet scheme enable
+ # "bullet_alternate" and disable "bullet_standard".
+ #
+ macro bullets_standard
+ #macro bullets_alternate
##### fixed focus
- # lock the selection bar to a position 1/3 down the screen
+ #
+ # Lock the selection bar to a position 1/3 down the screen.
+ #
+ # 1=true, 0=false.
+ #
fixedfocus "0"
-
##### external commands
##### http:// handler
- # what command is executed when a user wants a action performed on a
- # entry containing an URL
- #
+ #
+ # What command is executed when a user wants a action performed
+ # on a entry containing an URL.
+ #
# * is substituted for the URL
#
- # the X ones have their error and standard output redirected to dev/null
- # and are put into the background to keep hnb running afterwards
+ # The X ones have their error and standard output redirected to
+ # dev/null and are put into the background to keep hnb running
+ # afterwards.
+ #
##### samples
#web_command "opera -remote 'openURL(*)' > /dev/null 2>&1 &"
#web_command "netscape -remote 'openURL(*)' > /dev/null 2>&1 &"
@@ -62,27 +121,29 @@
#web_command "mozilla -remote 'openURL(*,new-window)' > /dev/null 2>&1 &"
#web_command "konqueror * > /dev/null 2>&1 &"
#web_command "galeon -n > /dev/null 2>&1 &"
- web_command "w3m *"
#web_command "lynx *"
#web_commend "rxvt -fn fixed -rv +sb -e w3m * > /dev/null 2>&1 &"
#web_command "opera -remote 'openURL(*,new-window)' > /dev/null 2>&1 &"
+ web_command "w3m *"
##### mail@handler
- # what command is executed when a user wants a action performed on a
- # entry containing a mail-address
- #
+ #
+ # What command is executed when a user wants a action performed
+ # on a entry containing a mail-address.
+ #
# * is substituted for the mail-address
#
- ## samples
+ ##### samples
#mail_command "xterm -rv pine * > /dev/null 2>&1 &"
#mail_command "xterm -rv +sb -e mutt * > /dev/null 2>&1 &"
#mail_command "pine *"
mail_command "mutt *"
##### spell checking
- # the spell-checker used
#
- ## samples
+ # The spell-checker used.
+ #
+ ##### samples
#spell_command "aspell -c"
#spell_command "ispell -x"
#spell_command "ispell -x -damerican"
@@ -91,41 +152,58 @@
#spell_command "ispell -x -dnynorsk"
spell_command "ispell -x"
-
##### file formats
##### Default Format
+ #
# hnb, opml, xml, ascii are possible choices
+ #
format "hnb"
##### Remember current position in tree
- # wheter hnb remembers the current position in a file, (currently
- # supported by the hnb DTD only, but might easily be extended since
- # it fakes it with a XML comment) 1=true 0=false
+ #
+ # Whether hnb remembers the current position in a file
+ # (currently supported by the hnb DTD only, but might easily
+ # be extended since it fakes it with a XML comment).
+ #
+ # 1=true, 0=false.
+ #
savepos "1"
##### XML format
##### XML Cuddling
- # When loading xml files, should data be allowed on
+ #
+ # When loading xml files, should data be allowed on
# the same line as tags?
+ #
xml_cuddle "0"
+
##### Autosave
- # when nodes_changed reaches above threshold, invoke autosave
+ #
+ # When nodes_changed reaches above threshold, invoke
+ # autosave.
+ #
autosave_threshold "15"
autosave_threshold_nodes_changed "0"
-
- # if change has occured but is less than threshold, save when number
- # of "ticks"/keypresses, invoke autosave
+
+ #
+ # If change has occurred but is less than threshold, save when
+ # number of "ticks"/keypresses, invoke autosave.
+ #
autosave_timeout "50"
autosave_timer "0"
-
-
##### Color/style
- # color scheme configuration, syntax is:
+ #
+ # Color scheme configuration, syntax is:
+ #
# "style <item> <foreground/background> <attribute,[attribute]>"
- # legal items are shown below
- # colors are: blue, cyan, green, red, magenta, yellow, black and white
- # attributes are: normal, reverse, bold, underline
+ #
+ # Legal items are shown below.
+ #
+ # Colors are: blue, cyan, green, red, magenta, yellow, black and white.
+ #
+ # Attributes are: normal, reverse, bold and underline.
+ #
macro define 'style_standard'
style menuitem default/default reverse
@@ -138,8 +216,8 @@
style background default/default normal
end
macro define 'style_alternate'
- style menuitem red/white normal
- style menutext black/white normal
+ style menuitem red/default normal
+ style menutext default/default normal
style parentnode default/default bold
style node default/default normal
style bullet yellow/default normal
@@ -148,14 +226,21 @@
style background default/default normal
end
+ ##### configuration macro (color scheme):
+ #
+ # To switch to the alternative color scheme enable
+ # "style_alternate" and disable "style_standard".
+ #
macro style_standard
+ #macro style_alternate
+
##### key-bindings
#
- # syntax:
+ # Syntax:
# "bind <scope[,scope[...]]> <key> <action>"
#
- # multiple actions can be chained together by using the virtual key ".."
- # as the following key-binding
+ # Multiple actions can be chained together by using the virtual key
+ # ".." as the following key-binding.
#
##################################################
@@ -197,7 +282,9 @@
bind ^A 'action'
bind up up
bind down down
- bind left left
+ bind left right
+ bind .. left
+ bind .. left
bind right right
bind npage pagedown
bind ppage pageup
@@ -238,15 +325,76 @@
bind + expand
bind - collapse
+ bind ] "expand --subtree"
+ bind [ "collapse --subtree"
bind ^Z restore_state
+ macro define keybinding_standard
+ end
+
+ macro define keybinding_vi
+ status "Mutt/Vi-like keybind by Osamu Aoki 2004 osamu@debian.org"
+ helptext "ESC| menu || |return| edit || |o| insert line || |s| save || |q| save&quit || |:| cmdline"
+ bind q 'context quitsave'
+ bind : 'commandline'
+ bind E 'context export'
+ bind L 'context import'
+ bind / 'macro m_search'
+ bind G 'context grab'
+ bind .. 'save_state'
+ bind A 'action'
+ bind k up
+ bind j down
+ bind h right
+ bind .. left
+ bind .. left
+ bind l right
+ bind z pagedown
+ bind Z pageup
+ bind i edit
+ bind a edit
+ bind o insert_below
+ bind .. edit
+ bind O up
+ bind .. insert_below
+ bind .. edit
+ bind T toggle_todo
+ bind D toggle_done
+ bind w save
+ bind s save
+ bind y copy
+ bind d save_state
+ bind .. cut
+ bind p paste
+ bind .. down
+ bind S save_state
+ bind .. sort
+ bind H "movenode left"
+ bind L "movenode right"
+ bind K "movenode up"
+ bind J "movenode down"
+ bind u restore_state
+ # Use "bind any ignore" instead to skip the warnings.
+ bind any unbound
+ end
+
+ ##### configuration macro (keybindings):
+ #
+ # To switch to the alternative keybindings enable
+ # "keybinding_vi" and disable "keybinding_standard".
+ #
+ macro keybinding_standard
+ #macro keybinding_vi
+
context nodeedit
- helptext "editing node | |ESC| revert || |return| confirm"
+ helptext "editing node | |ESC| revert || |return| confirm || |^S| split || |^J| join"
bind up up
bind down down
bind left left
+ bind ^B left
bind right right
+ bind ^F right
bind return confirm
bind esc cancel
@@ -262,7 +410,10 @@
bind ^E eol
bind end eol
+ bind ^D delete
bind del delete
+ # bkill_word is currently not implemented.
+ bind ^W bkill_word
context lineedit
helptext lineedit
@@ -270,7 +421,9 @@
bind up up
bind down down
bind left left
+ bind ^B left
bind right right
+ bind ^F right
bind return confirm
bind esc cancel
@@ -278,7 +431,10 @@
bind backspace backspace
bind backspace2 backspace
+ bind ^D delete
bind del delete
+ # bkill_word is currently not implemented.
+ bind ^W bkill_word
bind ^A bol
bind home bol
@@ -294,7 +450,8 @@
bind any cancel
- context quitsave
+ macro define 'quitsave_standard'
+ context quitsave
helptext "Save on exit? | | Y |es | J |a || | N |o || |ESC| cancel"
bind Y save
bind .. quit
@@ -314,6 +471,27 @@
bind esc "context main"
bind any unbound
+ end
+
+ macro define 'quitsave_alternate'
+ context quitsave
+ helptext "Save on exit? | |return| confirm || |x| exit without saving || |ESC| cancel"
+ bind return save
+ bind .. quit
+ bind x quit
+ bind esc "context main"
+ bind any unbound
+ end
+
+ ##### configuration macro (quit/save dialog):
+ #
+ # To switch to the alternative save/quit dialog enable
+ # "quitsave_alternate" and disable "quitsave_standard".
+ #
+ macro quitsave_standard
+ #macro quitsave_alternate
+
+
context spellcheck
helptext "Spellchecking | |Space| next node |ESC| cancel |F6,Return| confirm changes"
@@ -433,12 +611,12 @@
helptext "Searching | |ESC| cancel || | n |ext || | p |revious || |space|/|return| go"
bind down 'search -f "$query"'
bind up 'search -b "$query"'
- bind P 'search -b "$query"'
bind p 'search -b "$query"'
bind n 'search -f "$query"'
- bind N 'search -f "$query"'
+ bind N 'search -b "$query"'
bind return "context main"
+ bind space "context main"
bind esc "context main"
bind .. restore_state
@@ -492,13 +670,17 @@
bind esc 'context main'
bind any unbound
-
##### key related options
##### escdelay
- # how long the program should wait before accepting that ESC(27d) is the
- # ESC key and not the start of an escape sequence
- # increase this number if you are using hnb over a slow network link
- # value given is in ms (1/1000seconds)
+ #
+ # How long the program should wait before accepting
+ # that ESC(27d) is the ESC key and not the start of an
+ # escape sequence.
+ #
+ # Increase this number if you are using hnb over a slow
+ # network.
+ #
+ # Link value given is in ms (1/1000seconds).
#
escdelay 100
##### menu definition
@@ -512,7 +694,7 @@
go root
export_$format $db_file
restore_state
- end
+ end
menu "File" "revert " "revert"
menu "File" "------------" ""
menu "File" "export ^E" "context export"
@@ -526,7 +708,7 @@
status "file: \"$db_file\" format:$format"
mem
stats
- end
+ end
menu "File" "------------" ""
menu "File" "exit ^Q" "context quitsave"
##### edit
@@ -537,17 +719,19 @@
menu "Edit" "---------" ""
menu "Edit" "Search ^F" "macro m_search"
##### entry
- menu "Entry" "--------------" ""
- menu "Entry" "edit return" "edit"
- menu "Entry" "delete del" "remove"
- menu "Entry" "--------------" ""
- menu "Entry" "do action ^A" "action"
- menu "Entry" "indent >" "indent"
- menu "Entry" "outdent <" "outdent"
- menu "Entry" "toggle todo ^T" "toggle_todo"
- menu "Entry" "toggle done ^D" "toggle_done"
- menu "Entry" "expand +" "expand"
- menu "Entry" "collapse -" "collapse"
+ menu "Entry" "-------------------" ""
+ menu "Entry" "edit return" "edit"
+ menu "Entry" "delete del" "remove"
+ menu "Entry" "-------------------" ""
+ menu "Entry" "do action ^A" "action"
+ menu "Entry" "indent >" "indent"
+ menu "Entry" "outdent <" "outdent"
+ menu "Entry" "toggle todo ^T" "toggle_todo"
+ menu "Entry" "toggle done ^D" "toggle_done"
+ menu "Entry" "expand +" "expand"
+ menu "Entry" "expand subtree ]" "expand --subtree"
+ menu "Entry" "collapse -" "collapse"
+ menu "Entry" "collapse subtree [" "collapse --subtree"
##### level
menu "Level" "------------" ""
menu "Level" "sort ^S" "sort -a"
@@ -558,6 +742,6 @@
macro define m_about
status "hnb - hierarchical notebook http://hnb.sourceforge.net/"
status "(c) yvind Kols 2001-2003 pippin@users.sourceforge.net"
- end
+ end
macro m_about
|