我在 Ubuntu 中有四个工作区(如果您愿意,可以将它们称为“空间”或“桌面”),并启用了 Unity。我在每个窗口中都打开了多个 Sublime Text 2 窗口。如果我在桌面 1 中从 Nautilus 打开一个新文件,则该文件可能会在任何其他桌面中打开,具体取决于最后打开的是哪个 Sublime 窗口。有没有办法将这种行为更改为更自然的行为,即在我实际所在的工作区的最新窗口中打开文件?
1 回答
You can edit the application launcher of Sublime Text. It can be found in /usr/share/applications/sublime-text.desktop
.
To do so just run sudo nano /usr/share/applications/sublime-text.desktop
& add -n to the Exec=
line so it looks like -
Exec=/opt/sublime_text/sublime_text -n %F
Also to note- on some systems sublime will cause cursor run on when used from the context menu. If that's the case while the .desktop is open to edit scroll down to the StartupNotify=true
line & make it StartupNotify=false
. This will prevent cursor run on...
Note: This may not be the exact thing you want. But this enables sublime text to open files in a new window, within the currently active workspace.