Skip to content
Koichi Murase edited this page Dec 29, 2019 · 16 revisions

[ 日本語 | English ]

Q1. Can I import filename highlighting settings from LS_COLORS?

# blerc
bleopt filename_ls_colors="$LS_COLORS"

Links: O, S

Q2. Can I use SGR parameters to configure faces?

# blerc
ble-color-setface filename_directory sgrspec:'1;34'

Links: R

Q3. How to turn off auto-complete?

# blerc
bleopt complete_auto_complete=

Links: Q

Q4. How to set a delay of auto-complete?

# blerc

# Example 1: 300 msec
bleopt complete_auto_delay=300

# Example 2: 10 msec
bleopt complete_auto_delay=10

Links: E

Q5. Can I share command history with other bash sessions?

# blerc
bleopt history_share=1

Links: S

Q6. How to bind "simultaneous key combinations" (as in key-chord.el or vim-arpeggio)?

# blerc

# Example 1: Bind j&k with timeout of 40 msec
blehook/eval-after-load keymap_vi "
  ble-bind -m vi_imap -f 'j k' 'vi_imap/normal-mode'
  ble-bind -m vi_imap -f 'k j' 'vi_imap/normal-mode'
  ble-bind -m vi_imap -T j 40
  ble-bind -m vi_imap -T k 40"

# Example 2: Use library "vim-arpeggio.sh"
source "$_ble_base/lib/vim-arpeggio.sh"
bleopt vim_arpeggio_timeoutlen=40
blehook/eval-after-load keymap_vi '
  ble/lib/vim-arpeggio.sh/bind -f jk vi_imap/normal-mode'

Links: Q

Q7. How to edit a command line in vim (like v in default Bash vi-command map)?

# blerc

# Example 1: Bind "C-x C-v" for Emacs mode
VISUAL='vim -X'
blehook/eval-after-load keymap_emacs "
  ble-bind -m emacs -f 'C-x C-v' 'edit-and-execute-command'"

# Example 2: Bind "C-x C-v" for Vim mode
VISUAL='vim -X'
blehook/eval-after-load keymap_vi "
  ble-bind -m vi_imap -f 'C-x C-v' 'edit-and-execute-command'
  ble-bind -m vi_nmap -f 'C-x C-v' 'vi-command/edit-and-execute-command'"

Links: Q

Q8. How to enable case-insensitive completion?

# blerc
bind 'set completion-ignore-case on'

Links: Q

Q9. How to change the color of suggestions of auto-complete?

# blerc

# Example 1
ble-color-setface auto_complete fg=242,bg=235

# Example 2
ble-color-setface auto_complete fg=white,bg=69

# Example 3
ble-color-setface auto_complete fg=240,underline,italic

# Example 4
ble-color-setface auto_complete fg=gray

# Example 5
ble-color-setface auto_complete fg=242,italic

Links: Q, E, E

Q10. How to turn off the exit status mark [ble: exit ???]?

# blerc
bleopt exec_errexit_mark=

By default, ble.sh outputs a line like [ble: exit ???] after the command with non-zero exit status. To turn off this behavior, you can set empty string to the ble option exec_errexit_mark.

Links: Q


[ 日本語 | English ]

Clone this wiki locally