All posts tagged Sublime Text 2

SublimeTask for both ST2 and ST3

[Introduction]
Check out this introductory post if you don’t know what is SublimeTask.

[Overview]
There is an issue long long time ago, talking about the support for ST3… yeah, long long time ago… I guess I lost a decent number of users during that period of time , due to my laziness… Sorry, thats’ my bad. But now, since I’ve upgraded to use ST3 myself as well, it’s time to make some changes.

It’s been a long time, without you, my friend, and I’ll tell you all about it when I see you again~

[Upgrade]
After this pull request has been merged (wait a few hours if it’s still not merged), you will be able to upgrade it directly in sublime through “Package Control”. If you’re on ST2, nothing needs to be done, everything will still just work fine.

[Report Issues]
Please feel free to report any issues here: https://github.com/samsonw/SublimeTask/issues

From Sublime Text 2 to Sublime Text 3

首先不要问我为啥还在用sublime text 2,这是个有点历史且形而上学的问题,为此我还特地去查看了 sublimeTask 的initial commit date,发现这个历史已经至少3年了;擦,这时间过得还真叫人无法察觉的快,转眼就是三年,不想说什么时光荏苒岁月如梭物是人非时过境迁,虽然这些词语都他喵的条件反射的直接进入了脑海,既然已经不经过大脑都敲了出来,我也懒得删掉了,就这样吧;

所以本博文可以说是outdated的令人发指,基本没有任何值得分享的必要,放此纯粹是作为个人的一个记录;不过话说回来,也许还真有人比我还out也说不定呢,缘分这东西谁又说的清楚呢呵呵;

ok,让我们闲话少说,直奔主题;

[Install Sublime Text 3]
第一步,没啥好说的,你懂得;唯一值得一提的是如果之前不知道何时装过ST3的话(比如笔者),请更新sublime并把其data目录里的内容删掉,os x下该目录在~/Library/Application\ Support/Sublime\ Text\ 3/,对没有看错,里面东西都清了,重动sublime会重新generate新的data进来;

[Migrate Packages]
如果没有以前一堆精心设置调教过的plugin就没有那么多事,当初ST3刚出来的时候没有第一时间migrate过来的原因也是因为大部分plugin/package都还没migrate好;这一晃三年,大部分critical的plugin肯定已经都完事了,这件事情如今竟然变得如此简单,直接copy所有的package过来……

ST2的Package目录是 ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/
相应的,ST3的是 ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/

哦,只有俩个例外,一个是Default,这个copy过来会出错因为毕竟是ST2特有的Core,另外一个是Package Control,这个我们接下来会另外安装;所以finder里面copy的时候全选后专门deselect这俩个目录就行了;这件事如今变得如此轻松是我所始料未及的;
Continue reading →

Multiple line support in SublimeTask

[废话]
鄙人新一年有个小计划,那便是需要开始protect起自己的private personal time,过去的一年因为工作牺牲了太多的个人时间,这样的策略抑或无奈是物有所值还是得不偿失需要被重新审视和评估;

==================== 废话的分割线 ====================

[Introduction]
Check out this introductory post if you don’t know what is SublimeTask.

[Overview]
Let’s keep it simple and short this time, since it’s very late now :(.

As issue #3 indicated, previous version of SublimeTask lacks the feature of multiple line support, this update just addressed this issue and addressed it well.

2 kinds of multiple types are now supported:

  • Multiple selections (hold ⌘ during multiple selections, one key fancy feature of Sublime Text)
  • One selection with multiple lines (this should be self explanatory)

So from now on you should be able to mark multiple tasks as completed/incomplete in just one shot, enjoy!
Continue reading →

Highlight URL in SublimeTask

[Redirection]
Check out this introductory post if you don’t know what is SublimeTask.

[Overview]
As this issue ticket indicated, people want the url (http, https, ftp etc) to be processed and displayed differently in SublimeTask.

Although opening url link in default browser is possible and actually turns out to be fairly simple, I still haven’t fully made my mind whether I want this functionality goes in or not, cuz it sounds like a separate project/plugin. Anyway, it’s really a nice-to-have feature, I will be glad to add this in in the future, either directly built in or as a separate plugin.

In this update/patch, what I did is just highlighting the url. One screenshot should be enough to tell the whole story.

[Screenshot]

Note all the url above are highlighted.

[Customization]
As always, check out the “Customization” section here should you need to customize the url display style.

Introducing SublimeTask (GTD)

[Overview]
We already have Vim-Task, now we need one task plugin for Sublime Text 2.

[Screenshot]
As always, I’m a fan of the mac default font monaco, unfortunately it doesn’t support bold and italic:

If you use font (e.g. Consolas) which support bold and italic and your current color scheme also support these highlighting, you can config the “scope” to display whatever style you want (see Customization section below).

[Code Repository]
github: https://github.com/samsonw/SublimeTask
Continue reading →

Sublime Text 2 Upgrade Problem

搞了半天发现好还毕竟不是sublime本身的错,要不就完全毁了这几个星期来对之的美好印象了……

btw,sublime text 2着实是个相当promising的editor,各位看官有闲情雅致且有信心记住更多的key shortcuts的话不妨一试(其实也没有多少啦),鄙人highly recommended(路人甲:你算哪跟葱……;我:……),除了其License价格不菲之外(比textmate多1刀),其余很多feature都可圈可点,好消息是beta版可以免费使用,就是时不时会有dialog跳出来提醒抑或是恶心一下你,呵呵。

废话有点多,不过鉴于某些同学口味比较重比较独特只喜欢看本人的废话部分,所以现在我基本把重要的事情都放在废话部分讲……

anyway,本次遇到的问题是sublime无法启动,报出以下颇为technical的error dialog,然后便quit,想必是目前用此editor的大多还是developer居多,所以报这种样式的error通常会被认为更为friendly:

Unable to run package setup:

Traceback (most recent call last):
File "./PackageSetup.py", line 155, in upgrade
upgradePackage(pkg, pristinedir, datadir, backupdir)
File "./PackageSetup.py", line 148, in upgradePackage
os.path.join(backupdir, base), inhibitOverwrite)
File "./PackageSetup.py", line 31, in upgradeArchive
newar = zipfile.ZipFile(src)
File ".\zipfile.py", line 696, in __init__
File ".\zipfile.py", line 716, in _GetContents
File ".\zipfile.py", line 728, in _RealGetContents
zipfile.BadZipfile: File is not a zip file

Continue reading →