Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ex.location): the new component to show cursor location #27

Merged
merged 1 commit into from
Dec 28, 2023

Conversation

vladimir-popov
Copy link
Collaborator

This component shows the current cursor position in configurable format. Comparing to the default
location component, this component can show total number of lines, and may be flexibly configured.

pattern example
'%2C:%-3L/%T' ex location
'%3L:%-2C' ex location-2
sections = {
  lualine_a = {
    {
      'ex.location',
      
      -- The pattern to show the cursor position. Here three possible specifiers:
      --  'L' means 'line' - the number of the line where is the cursor now;
      --  'C' means 'column' - the number of the virtual column where is the cursor now;
      --  'T' means 'total' - the total count of lines in the current buffer;
      -- Every specifier can be used in similar maner to %d in the {string.format} function.
      -- The pattern similar to the default 'location' component is '%3L:%-2C'
      pattern = '%2C:%-3L/%T'
    }
  }
}

@vladimir-popov vladimir-popov merged commit 35aad95 into dokwork:main Dec 28, 2023
3 checks passed
@vladimir-popov vladimir-popov deleted the ex_location branch December 28, 2023 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant