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

How to add visually selected line count??? #12

Open
windrg opened this issue Dec 3, 2015 · 1 comment
Open

How to add visually selected line count??? #12

windrg opened this issue Dec 3, 2015 · 1 comment

Comments

@windrg
Copy link

windrg commented Dec 3, 2015

Hi,
First of all, thanks for your this great contribution.
But I really wonder how to add a number which indicates how many lines are currently visually selected.
(Of course, now I'm using evil mode and in Vim, it shows the number on the command line, not the power line.)
Could you give me an idea or a guideline how to figure out to do so, please?

@AnthonyDiGirolamo
Copy link
Owner

You can edit the format of the modeline by changing the airline-themes-set-modeline function. I tried to document it thoroughly. Line 321 in airline-themes.el (https://github.com/AnthonyDiGirolamo/airline-themes/blob/master/airline-themes.el#L321) is where the current line is shown.

You could try changing "-LINE" on line 189 in airline-themes.el (https://github.com/AnthonyDiGirolamo/airline-themes/blob/master/airline-themes.el#L189) to
(format "-LINE %d" (count-lines (region-beginning) (region-end))) That mostly works for me but gives inconsistent counts depending on if the cursor is on the beginning of the line or in the middle.

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

No branches or pull requests

2 participants