2

I want to be able to open dir in sublime from terminal.

Whenever I do subl . it opens current dir in 2 sublime editors. Of course I need it to open only one.

My assumption is that I've messed with symlinks, but I might be wrong.

Lucio
  • 18,843
  • What is subl? How did you installed sublime? – Lucio Nov 28 '14 at 19:27
  • I've gone trough couple of aticles - one of them I believe is http://askubuntu.com/questions/172698/how-do-i-install-sublime-text-2-3, but along the way I might have done smtn like sudo ln -s /opt/Sublime\ Text\ 2/sublime_text /usr/bin/sublime or similar... I believe subl is a symlink for sublime - that I've install a long ago – AndreiMotinga Nov 28 '14 at 19:31

2 Answers2

5

You didn't messed up with symlinks, sublime has installed correctly. That is actually the right behavior.

The reason why does it open two sublime instances (my bet):

  • There was a project already opened or
  • You didn't closed the previous files opened

In either case you may want to:

  • Close any project (Project -> Close Project) or
  • Close all the files (File -> Close All Files)
Lucio
  • 18,843
0

Adding a -a flag to the subl command causes files to "open in current window", which prevents subsequent windows opening.

alias subl='subl -a'
Pylinux
  • 371