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

Implement configurable cursor style #1586

Closed
wants to merge 8 commits into from

Conversation

ThatRendle
Copy link
Contributor

With acknowledgements to @Protectator and his configurable blinking (#500), I've tried to do something similar to allow the cursor style (i.e. line or block, at present) to be configured.

Right now, the setting is configurable from editor.config, but with the right method somewhere(?) this could also be over-ridden by Vim mode plugins such as VsCodeVim to switch between cursor styles for Normal and Insert modes (see VSCodeVim/Vim#19 and #200).

Feedback on what I've done so far would be much appreciated.

@msftclas
Copy link

Hi @markrendle, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes. I promise there's no faxing. https://cla.microsoft.com.

TTYL, MSBOT;

@msftclas
Copy link

@markrendle, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR.

Thanks, MSBOT;

@bpasero bpasero added this to the Backlog milestone Dec 23, 2015
@glen-84
Copy link

glen-84 commented Dec 23, 2015

Would it be possible to add a thin line (1px) style?

PuTTY has an Underline style as well. I don't use it personally, but it may be useful to extensions.

@ThatRendle
Copy link
Contributor Author

@glen-84 I don't see why not, it's just a matter of getting the CSS right and adding in names for it.

@glen-84
Copy link

glen-84 commented Dec 27, 2015

block/block-thin/block-hollow/block-outline:

block-outline

? {
    background: transparent;
    border: 1px solid;
    box-sizing: border-box;
    position: absolute;
    width: 1ch;
    cursor: text;
}

block/block-filled:

block-filled

? {
    position: absolute;
    width: 1ch;
    cursor: text;
}

line/line-thin/line-narrow:

line-thin

? {
    position: absolute;
    width: 1px;
    cursor: text;
}

line/line-thick/line-accessible:

line-thick

? {
    position: absolute;
    width: 2px;
    cursor: text;
}

underline/underline-thin:

underline-thin

? {
    background: transparent;
    border-bottom: 1px solid;
    box-sizing: border-box;
    position: absolute;
    width: 1ch;
    cursor: text;
}

underline/underline-thick/underline-accessible:

underline-thick

? {
    background: transparent;
    border-bottom: 2px solid;
    box-sizing: border-box;
    position: absolute;
    width: 1ch;
    cursor: text;
}

I'm not too sure about the names, maybe:

block-filled
block-outline
line-thin
line-thick
underline-thin
underline-thick

... I'll leave this to the developers. =)

@ThatRendle
Copy link
Contributor Author

@glen-84 Good work! I'll get those added. Thanks :)

@alexdima
Copy link
Member

Let's tackle the other suggested styles in a new issue. I have merged this change in with some edits to simplify it in 82f2a8a

@alexdima alexdima mentioned this pull request Jan 11, 2016
@alexdima
Copy link
Member

Let's track the other styles in #1929

@alexdima alexdima closed this Jan 11, 2016
@alexdima
Copy link
Member

@markrendle Sorry this appears in github as not merged, I had to manually merge it due to some bad commits in your PR, but your commit did make it in.

@ThatRendle
Copy link
Contributor Author

@alexandrudima That's cool, I'm just happy to have contributed something to the project.

@igl
Copy link

igl commented Dec 7, 2016

Was looking for this and still have 2 issues:

  • Even line-thick drowns in the brace-highlight. It's very hard to see wether the cursor is in front of a brace or after.

  • The settings-schema does not include these and shows an error:

Value is not an accepted value. Valid values: ["block","line","underline"]

@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants