Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

With Sublime Text, is it possible to disable increase/decrease font size when using control and mouse? I found the key bindings for ctrl and +/-:

{ "keys": ["ctrl++"], "command": "increase_font_size" },
{ "keys": ["ctrl+="], "command": "increase_font_size" },
{ "keys": ["ctrl+-"], "command": "decrease_font_size" },

If I wanted to disable those, I could set the command to 'null', but how do you disable increase_font_size and decrease_font_size when using ctrl and mouse wheel? I'm on ubuntu if it is an OS setting.

share|improve this question

2 Answers 2

up vote 20 down vote accepted

Found help on the sublime forums, should have looked there first. But I will post a solution in case anyone wants to do the same.

I am using linux, but answer similar for windows. Copy 'Default (Linux).sublime-mousemap' from '~/.config/sublime-text-2/Packages/Default' into '...Packages/User':

cd ~/.config/sublime-text-2/
cp Packages/Default\ (Linux).sublime-mousemap Packages/User/

Remove everything except font settings and change the command to null:

[
  // Change font size with ctrl+scroll wheel
  { "button": "scroll_down", "modifiers": ["ctrl"], "command": "null" },
  { "button": "scroll_up", "modifiers": ["ctrl"], "command": "null" }
]

Copy it into your User folder so settings don't reset after an update.

share|improve this answer
    
This works with sublime text 3 as well, you'll just have to create the file manually subl ~/.config/sublime-text-3/Packages/User/Default (Linux).sublime-mousemap –  Thomas Jensen Jul 22 at 12:36

Linux:

vim ~/.config/sublime-text-2/Packages/User/"Default (Linux).sublime-mousemap"

Set it to:

[
  // Change font size with ctrl+scroll wheel
  { "button": "scroll_down", "modifiers": ["ctrl"], "command": "null" },
  { "button": "scroll_up", "modifiers": ["ctrl"], "command": "null" }
]

Thanks to d_rail for the answer, just wanted to make it easier to do quickly.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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