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 change the cursor style to vertical line #781

Closed
filipencopav opened this issue Dec 14, 2019 · 7 comments
Closed

How to change the cursor style to vertical line #781

filipencopav opened this issue Dec 14, 2019 · 7 comments

Comments

@filipencopav
Copy link

The title.
Pls i'm crying, i tried reading some of the source code but i found just UI_STYLE_CURSOR and i have no idea what it does or how to change it so i don't break vis. Please help!

@ghost
Copy link

ghost commented Dec 15, 2019

Maybe someone in the #vis-editor IRC channel on freenode might be able to help you.

@filipencopav
Copy link
Author

filipencopav commented Dec 20, 2019

I don't know how to use IRC (shame on me) and nobody seems to respond there, but that's not the point here.

Is this possible? Like maybe just change some source code real fast and that's all?

@7v0lk0v
Copy link
Contributor

7v0lk0v commented Dec 21, 2019

I think you mean vertical line, and no, it's not possible - there's no special handling of the cursor, it's rendered like all the text on the screen but with a special fg/bg color (the UI_STYLE_CURSOR value) so it fills the entire area of a single character (giving it the block 'style').

@ghost
Copy link

ghost commented Dec 21, 2019

@3dc1d3 there a small patch in #406 (comment) than can give you vertical line (called cursorcolumn in vim).

@filipencopav
Copy link
Author

filipencopav commented Dec 21, 2019

Thanks

I tried the patch and sadly that is not what i wanted. i wanted the cursor to be '|' not a block.

I guess @3dc1d3 is right and i just have to live with it ._.

@filipencopav filipencopav changed the title How to change the cursor style to horizontal line How to change the cursor style to vertical line Dec 21, 2019
@raphael-proust
Copy link

@Theamazingwaffle What you are looking for is cursor shapes. But their handling is terminal-dependent. So any solution to your problem would be terminal-dependent. See for example, the different solutions to achieve this in vim for different terminals https://stackoverflow.com/questions/6488683/how-do-i-change-the-vim-cursor-in-insert-normal-mode

It also relies on hooks triggered when entering/leaving insert mode. AFAICT, vis does not offer those hooks. You could try to remap i to execute all the entry hook thing and then enter insert mode… but in that case you also need to remap all the keys that let you enter insert mode (s, S, a, A, I).

@mskar
Copy link

mskar commented Dec 1, 2021

Cursor shape should be beam in insert mode and block in normal mode by default. I have this working in vim, lvim, nvim, and emacs with evil mode.

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

4 participants