plugins.flash.settings.modes.char

Options used when flash is activated through f, F, t, T, ; and , motions.

Type: null or (attribute set of anything)

Default: null

Declared by:

plugins.flash.settings.modes.char.enabled

Type: null or boolean or raw lua code

Default: null

Plugin default: true

Declared by:

plugins.flash.settings.modes.char.action

action to perform when picking a label. defaults to the jumping logic depending on the mode.

@type fun(match:Flash.Match, state:Flash.State)

Type: null or lua function string

Default: null

Plugin default: null

Declared by:

plugins.flash.settings.modes.char.autohide

Hide after jump when not using jump labels.

Type: null or boolean or raw lua code

Default: null

Plugin default: false

Declared by:

plugins.flash.settings.modes.char.char_actions

The direction for prev and next is determined by the motion. left and right are always left and right.

Type: null or lua function string

Default: null

Plugin default:

''
  function(motion)
    return {
      [";"] = "next", -- set to `right` to always go right
      [","] = "prev", -- set to `left` to always go left
      -- clever-f style
      [motion:lower()] = "next",
      [motion:upper()] = "prev",
      -- jump2d style: same case goes next, opposite case goes prev
      -- [motion] = "next",
      -- [motion:match("%l") and motion:upper() or motion:lower()] = "prev",
    }
  end
''

Declared by:

plugins.flash.settings.modes.char.config

Set config to a function to dynamically change the config.

@type fun(opts:Flash.Config)

Type: null or lua function string

Default: null

Plugin default:

''
  -- dynamic configuration for ftFT motions
  function(opts)
    -- autohide flash when in operator-pending mode
    opts.autohide = opts.autohide or (vim.fn.mode(true):find("no") and vim.v.operator == "y")
  
    -- disable jump labels when not enabled, when using a count,
    -- or when recording/executing registers
    opts.jump_labels = opts.jump_labels
      and vim.v.count == 0
      and vim.fn.reg_executing() == ""
      and vim.fn.reg_recording() == ""
  
    -- Show jump labels only in operator-pending mode
    -- opts.jump_labels = vim.v.count == 0 and vim.fn.mode(true):find("o")
  end
''

Declared by:

plugins.flash.settings.modes.char.continue

When true, flash will try to continue the last search.

Type: null or boolean or raw lua code

Default: null

Plugin default: false

Declared by:

plugins.flash.settings.modes.char.jump_labels

Show jump labels.

Type: null or boolean or raw lua code

Default: null

Plugin default: false

Declared by:

plugins.flash.settings.modes.char.keys

By default all keymaps are enabled, but you can disable some of them, by removing them from the list.

If you rather use another key, you can map them to something else.

Type: null or (attribute set of (string or raw lua code))

Default: null

Plugin default:

{
  __unkeyed-0 = "f";
  __unkeyed-1 = "F";
  __unkeyed-2 = "t";
  __unkeyed-3 = "T";
  __unkeyed-4 = ";";
  __unkeyed-5 = ",";
}

Example:

{
  "," = "H";
  ";" = "L";
}

Declared by:

plugins.flash.settings.modes.char.labels

Labels appear next to the matches, allowing you to quickly jump to any location. Labels are guaranteed not to exist as a continuation of the search pattern.

Type: null or string or raw lua code

Default: null

Plugin default: "asdfghjklqwertyuiopzxcvbnm"

Declared by:

plugins.flash.settings.modes.char.multi_line

Set to false to use the current line only.

Type: null or boolean or raw lua code

Default: null

Plugin default: true

Declared by:

plugins.flash.settings.modes.char.pattern

Initial pattern to use when opening flash.

Type: null or string or raw lua code

Default: null

Plugin default: ""

Declared by: