2

Im trying to change the cursor color in sublime text. Im running windows in a VM on my mac.

In Preferences.sublime-settings ive added the following but it hasn't done anything:

// Change caret colour? 
"caret_color": "#FF0000",

"caret": "#FF0000",

This is similar to this question but the answer there doenst work for me: Change the color of the cursor in Sublime Text

3

The caret color is defined in the color scheme you are using. Since you have Sublime Text 2, changing the color scheme is quite straightforward. First, open your user preferences and check the value of "color_scheme" to get the path to the scheme you're using. If you haven't set it there, the default value is Packages/Color Scheme - Default/Monokai.tmTheme. Next, select Preferences -> Browse Packages... to open the Packages folder in your file system explorer. Browse to the location of the color scheme and open the corresponding .tmTheme file in Sublime, using XML as the syntax highlighting. Near the top of the file, you'll see something like the following (taken from the Neon Color Scheme):

<key>name</key>
<string>Neon</string>
<key>settings</key>
<array>
    <dict>
        <key>settings</key>
        <dict>
            <key>activeGuide</key>
            <string>#FF0080</string>
            <key>background</key>
            <string>#000000</string>
            <key>caret</key>
            <string>#FFFFFF</string>
            <key>findHighlight</key>
            <string>#F2FF06</string>
            <key>findHighlightForeground</key>
            <string>#1515FF</string>
            <key>foreground</key>
            <string>#FFFFFF</string>
            <key>guide</key>
            <string>#6F6F6F</string>
            <key>inactiveSelection</key>
            <string>#353576</string>
            <key>invisibles</key>
            <string>#06FF05</string>
            <key>lineHighlight</key>
            <string>#2D2D2D</string>
            <key>searchHighlight</key>
            <string>#0205FF</string>
            <key>selection</key>
            <string>#0205FF</string>
            <key>selectionBorder</key>
            <string>#06FF05</string>
            <key>stackGuide</key>
            <string>#06FF05</string>
        </dict>
    </dict>

Find the caret key:

<key>caret</key>
<string>#FFFFFF</string>

and change its value to whatever hex color code you want. If there is no caret key, you can add it.

Once you're done, save the file. Go back to your file explorer and delete the color scheme's .tmTheme.cache file if it exists. Restart Sublime, and your changes should take effect.

  • Thats is changing the color of the blinking line in the text that shows me where I am, however its not changing the mouse cursor. – Evanss Oct 31 '14 at 9:43
  • 3
    @jdln You didn't indicate in your question you were trying to change the mouse cursor. You need to set that in your Windows configuration settings - Sublime has nothing to do with that. – MattDMo Oct 31 '14 at 14:22
1

Got it.. Following worked for me.

Use this article to get to mouse settings, https://support.microsoft.com/en-us/help/14203/windows-7-make-mouse-easier-to-use.

I chose the "Regular Black" option, which inspite of the name, is surprisingly easy to see in Sublime

  • Please read the question again carefully. Your answer does not answer the original question. – DavidPostill Sep 9 '16 at 8:50
0

You can change the sublime preferences from

Select "Preferences" → "Settings-Default". Go to Default settings tab change the options related to caret. Now go back to your custom setting and update as per your choice.

Please refer This link , which will be helpful

  • This is where iver put my code from my question but nothing changes. – Evanss Oct 30 '14 at 16:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.