Class AutopairWidgets

java.lang.Object
org.jline.widget.Widgets
org.jline.widget.AutopairWidgets

public class AutopairWidgets extends Widgets
Creates and manages widgets that intelligently handle matching delimiters in the console.

AutopairWidgets provides functionality for automatically:

  • Closing matching delimiters (brackets, quotes, etc.) when the opening delimiter is typed
  • Deleting matching delimiter pairs when backspace is pressed
  • Skipping over closing delimiters when they are typed and already present

This behavior is similar to what many modern code editors provide, making it easier to work with paired delimiters in the console.

Inspired by zsh-autopair: https://github.com/hlissner/zsh-autopair