tamton-aquib / staline.nvim

A modern lightweight statusline and bufferline plugin for neovim in lua.
MIT License
380 stars 17 forks source link

Macro support in the status line? #9

Closed is0n closed 2 years ago

is0n commented 3 years ago

It would be nice if the status bar could change it's current color and icon when the user is recording a macro, however, I don't know if this is possible as I haven't seen any other vim/neovim plugin implement this.

tamton-aquib commented 3 years ago

That would be really cool. Did some research, nothing came up. Will try again. Dont know if this is even possible haha

is0n commented 3 years ago

I don't think this it's possible to detect when the user is recording a macro, however, wouldn't it make sense to just change the color and icon of the status line when "q" is pressed and then revert the status line back to it's original state once "q" is pressed again?

tamton-aquib commented 3 years ago

I've given it a thought before.... and as u know, I'm not very much experienced haha.

Some other ways i thought of includes:

  1. Using the -w switch when opening vim.
  2. Capturing output with nvim_exec() and checking if contains "recording" keyword.
  3. Checking if there exists an autocmd for this kinda purpose from this page

And everything in this list is not very much usable. It would be better to keep staline plain and simple. But this macro feature would be cool tho. I didnt have any luck till now. Let me know if you find anything interesting.

is0n commented 3 years ago

Closing due to inactivity.

tamton-aquib commented 2 years ago

(Note for myself:) neovim 0.7 has new 2 autocommands: RecordingEnter and RecordingLeave

maybe we could use these autocmds to emulate a macro mode for staline along with v:event.

tamton-aquib commented 2 years ago

I'll be opening this as a new issue later 👍🏻