Hello.I am using Sublime text 3 on Ubuntu 17.04.I want to change from single column view to 2 column view using Alt+shift+2.However that doesn’t work.I have tried to use numeric pad of my laptop for that shortcut but with no luck.Any ideas?
Ubuntu 17.04 Switching view to 2 columns with alt+shift+2 not working
Open Sublime Text console and run:
sublime.log_input(True); sublime.log_commands(True); sublime.log_result_regex(True)
When you type the command you should see what is happening on the console.
key evt: shift+alt+1
command: set_layout {"cells": [[0, 0, 1, 1]], "cols": [0.0, 1.0], "rows": [0.0, 1.0]}
key evt: shift+alt+2
command: set_layout {"cells": [[0, 0, 1, 1], [1, 0, 2, 1]], "cols": [0.0, 0.5, 1.0], "rows": [0.0, 1.0]}
key evt: shift+alt+1
command: set_layout {"cells": [[0, 0, 1, 1]], "cols": [0.0, 1.0], "rows": [0.0, 1.0]}
What do you see?
Open you user keys file .sublime-keymap
and add this:
{
"keys": ["alt+shift+1"],
"command": "set_layout",
"args":
{
"cols": [0.0, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1]]
}
},
{
"keys": ["alt+shift+2"],
"command": "set_layout",
"args":
{
"cols": [0.0, 0.5, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
}
},
did that already but no luck also removed sublime and reinstalled still the same
Backup all your settings and revert Sublime Text to a clean state and test if it is
working. It should, then start installing your settings until you find out what is breaking it.
Some useful links:
- Complete clean install proceedings
- Reverting to a clean state (backup your data)
i deleted all packages and settings.I installed only package controll but still the same
Did you followed the procedures on: http://www.sublimetext.com/docs/3/revert.html?
If yes, then it is a bug on the Sublime Text core. You should open a bug report on:
its not necessarily a bug, your window manger or some other application could be eating the keyboard event before it gets to ST - you should check that first
Put this on your settings file, binding the keys to another combination available:
{
"keys": ["alt+shift+1"],
"command": "set_layout",
"args":
{
"cols": [0.0, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1]]
}
},
{
"keys": ["alt+shift+2"],
"command": "set_layout",
"args":
{
"cols": [0.0, 0.5, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
}
},
It should work some some key binding not registered by Sublime Text, and any other Mac application.
Later, you can search for some application for Mac which detects which key combinations are registered by some application.
I think that Ubuntu uses this shortcut to switch between languages, so the shortcut never makes it to sublime. Go to keyboard settings and change the key combination to toggle layouts amd maybe it will work.
You are correct, I had this issue as well on 17.04 and 17.10 and tested your suggestion by changing the combination used to change keyboard layout and it works. It didn’t use to happen until 17.04 though, so I wonder what changed.
Apparently ubuntu 17.04 & 17.10 are affected by this bug:
https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/1683383
basically, the keyboard shortcut is fired on press and not on release, so considering you have keyboard layout configured for Alt + Shift
no keyboard shortcut which uses Alt +Shift + <anything>
would ever fire… I’ll subscribe to that bug report in hopes that someone would post instructions on how to patch 17.10.