jszakmeister / vim-togglecursor

Toggle the cursor shape in the terminal for Vim.
http://www.vim.org/scripts/script.php?script_id=4403
119 stars 20 forks source link

Add option to change cursor color upon entering each mode #44

Closed EvanQuan closed 5 years ago

EvanQuan commented 5 years ago

v6.0.0 Add g:togglecursor_insert_color, g:togglecursor_replace_color, and g:togglecursor_default_color variables to specify the RGB values of the cursor for entering those modes. Completely optional. If the user does not specify these values themselves, then no color change occurs. These values are explained in the help docs.

Later done the road, I was thinking about adding an option for the cursor to change color based on the selected color scheme, similar to how airline, or lightline can match their mode colors to a specified color scheme. This would be a lot easier than manually settings RGB values.

Add terminal support for xterm-color. Tested and successfully works for Git bash.

Add additional support from forked repos of caipre and ianisl. Resolve merge conflicts but have not tested them.

Any feedback on changes I should make would be appreciated.

jszakmeister commented 5 years ago

Sorry, but I'm not taking contributions that are not your own. I have no idea whether those folks give their consent to contributing the changes and cannot accept them. Also, they history here is not very clean and there's far too much in a single pull request. I also don't follow why all the choices/changes were made. I'd expect the commit messages to explain the thought process, but I don't see that here.

BTW, just checking for xterm-256color is not a good way to determine the running terminal. There are many kinds of terminals that claim this but don't support everything xterm does. Also, I'm not sure about your RGB approach--it doesn't seem to be mentioned on the xterm control sequences page, and I'd hate to introduce something that would break their Vim session. There also seems to be issues if your terminal is actually 256 color, which doesn't seem like a good user experience either.

So I think this still needs some work to uncover the truth behind the support. Also, keep in mind that Vim with a truecolor terminal, there is also the ability to use termguicolors so this capability is unnecessary in those terminals.

Thank you for taking the time to put something together, but sorry I cannot accept this as it is. Feel free to contribute the parts that you have authored with a clean history and explanation of the thought process. And if more than one feature is being added, they should really be separate pull requests. Thanks again!