plugins.flash.modes.char

options used when flash is activated through a regular search with / or ?

Plugin default:

{
  enabled = true;
  /* dynamic configuration for ftFT motions */
  config = ''
    function(opts)
      -- autohide flash when in operator-pending mode
      opts.autohide = 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
  '';
  autohide = false;
  jumpLabels = false;
  multiLine = false;
  label = { exclude = "hjkliardc"; };
  keys = helpers.listToUnkeyedAttrs [ "f" "F" "t" "T" ";" "," ];
  charActions = ''
    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
  '';
  search = { wrap = false; };
  highlight = { backdrop = true; };
  jump = { register = false; };
}

Type: null or (submodule)

Default: null

Declared by:

plugins.flash.modes.char.enabled

Plugin default: true

Type: null or boolean or raw lua code

Default: null

Declared by:

plugins.flash.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)

Plugin default: nil

Type: null or lua function string

Default: null

Declared by:

plugins.flash.modes.char.autohide

hide after jump when not using jump labels

Plugin default: false

Type: null or boolean or raw lua code

Default: null

Declared by:

plugins.flash.modes.char.charActions

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

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

Type: null or lua function string

Default: null

Declared by:

plugins.flash.modes.char.config

Set config to a function to dynamically change the config @type fun(opts:Flash.Config)

Plugin default: nil

Type: null or lua function string

Default: null

Declared by:

plugins.flash.modes.char.continue

When true, flash will try to continue the last search

Plugin default: false

Type: null or boolean or raw lua code

Default: null

Declared by:

plugins.flash.modes.char.jumpLabels

show jump labels

Plugin default: false

Type: null or boolean or raw lua code

Default: null

Declared by:

plugins.flash.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, e.g., { ";" = "L"; "," = "H"; }

Plugin default:

helpers.listToUnkeyedAttrs [ "f" "F" "t" "T" ";" "," ]

Type: null or (attribute set of string)

Default: null

Declared by:

plugins.flash.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.

Plugin default: "asdfghjklqwertyuiopzxcvbnm"

Type: null or string or raw lua code

Default: null

Declared by:

plugins.flash.modes.char.multiLine

set to false to use the current line only

Plugin default: true

Type: null or boolean or raw lua code

Default: null

Declared by:

plugins.flash.modes.char.pattern

initial pattern to use when opening flash

Plugin default: ""

Type: null or string or raw lua code

Default: null

Declared by: