手机浏览 RSS 2.0 订阅 膘叔的简单人生 , 腾讯云RDS购买 | 超便宜的Vultr , 免费部署 N8N 的 Zeabur 注册 | 登陆
浏览模式: 标准 | 列表分类:Software

乔大妈:【插件】史上最强EditPlus插件OpenCTags使用指南--EditPlus开发者必备

这是乔大妈推荐的插件,在推荐的时候用上了:推荐积德,不推荐积业
好吧,我为了积德推荐一下,当然乔大妈说了,使用的人应该推荐。嗯,我不用Editplus很久了。
原文来自:

首先:
    感谢Romeo JunCU的卓绝工作,是他让我们拥有史上最强EditPlus插件OpenCTags,让EditPlus插上了翅膀

demo.png

使用:
    1. 将OpenCTags解压后的所有文件,拷贝到EditPlus\User Tools\ctags\下

    2. 在EditPlus的用户工具中,进行如下设置:
        a.
            菜单名称:CTags Build
            命令:......\EditPlus\User Tools\ctags\ctags.exe   (请根据实际路径设置)
            参数:-R *
            初始目录:$(FileDir)
            动作:捕捉输出
            输出模板:默认
            保存:无

        b.
            菜单名称:OpenCTags
            命令:......\EditPlus\User Tools\ctags\OpenCTags.exe   (请根据实际路径设置)
            参数:-word "$(CurWord)" -editor editplus -sel "$(CurSel)" -file $(FilePath) -line $(CurLine) -one
            初始目录:$(FileDir)
            动作:退出时关闭窗口
            输出模板:默认
            保存:无
        
    3. 使用方法:
        a. 到项目的根目录,打开一个文件,然后执行“CTags Build”,等待建立ctags完成,在根目录会生成tags文件,注意在svn/git/hg/cvs等中设置忽略该文件
        b. 打开项目内任意文件,选中需要查看的关键字(类名或者函数方法名或者任意玩意),执行“OpenCTags”,将会打开OpenCTags提示窗口,提示对应的tags信息
        c. 提示窗口中,会给出匹配的名称,原型缩写,以及所在的文件相对路径,鼠标移动上去,会显示完整的原型提示,双击,会自动打开对应的文件并定位到对应的位置
        d. 提示窗口中,左则的图标代表不同的类型,包括但不限于:类、方法/函数、常量定义、变量等等
icon.png

附加:
0. ctags是个什么东东?格纹滚,自己上网查去,这个不知道,等于没有编过程。
1. 该插件,来自于sf的OpenCTags,我只是经过简单完善和给予中文说明后提供;再次感谢Romeo JunCU的卓绝工作。
2. 如果是editplus2,请使用-editor editplus2
3. 也可参考以上设置,为其他编辑工具配备
    4. 欢迎推广,欢迎传播至少一人,一旦使用,将自动接收以下锲约:
        传播积德,不传播积业!!!

    5. 如有问题和建议,请致信honestqiao@gmail.com,谢谢

    6. 欢迎访问史上最强PHP中文手册--PHP手册中文翻译补完计划 --http://code.google.com/p/phpdoc-zh/

问题:

Q. Could not find install dir for editor editplus?
A. 找不到EditPlus的安装路径,绿色版本的一般会出现该问题;
打开“EditPlus安装路径.reg”,将其中的EditPlus路径修改为你自己的,然后导入即可。
或者打开regedit,在HKEY_CURRENT_USER\Software\ES-Computing\EditPlus 3\Install,设置Path字符串属性,值为EditPlus安装路径,不存在的就建立新的
如果是EditPlus2,记得修改为EditPlus 2

Q. 双机无法打开文件?
A. 请打开“Microsoft Visual Studio Spy++.exe”,点搜索菜单,点查找窗口,然后点那个瞄准器,拖到EditPlus的编辑代码的那个位置(需要预先打开一个文件),然后告诉 我,Spy++的“窗口搜索”的类那个地方显示的信息,例如我的是“AfxFrameOrView90su”,你的呢?
Spy++.png

Q. 修改或者增加新的代码后,匹配不到怎么办?
A. 此时,需要及时再来一次:CTags Build

   下载:enCTags.tar.gz (1.25 MB)

Tags: editplus, plugin, openctags

来自官方:‘Extract Function/Method’ refactoring for PHP

先不说什么功能,只能说这种功能对我们来说太有用了。
refactor,这种重构,其实在ZS和NETBEANS 中效果并没有现在这个软件(phpstorm)那么明显。看看它的功能就知道了。
官方网址(http://blog.jetbrains.com/webide/2011/05/extract-function-method-refactoring-for-php/)说:
We are working hard on new features for PhpStorm 2.1, and the ‘Extract Function/Method’ refactoring for PHP is one of them. This feature has been available since the first PhpStorm 2.1 EAP(106.444), and we are looking forward for your feedback.

Picture 1b: Select an expression

Invoke the refactoring from the menu ‘Refactor -> Extract Method‘ or using  a hotkey. The default hotkey is Ctrl+Alt+M for Windows/Linux and Cmd+Opt+M for Mac.
Depending on the context of the selected code fragment, ‘Extract method’ (the  code fragment is inside a method) (Picture 2b) or ‘Extract Function’(the code fragment is inside a function or script) (Picture 2a).

Picture 2a: ‘Extract Function’ dialog

Picture 2b: ‘Extract Method’ dialog

Enter the name of the new function/method. Press OK.

Picture 3a:  The code fragment is replaced with a function call statement

Picture 3b: The expression is replaced with a method call expression

Picture 4a: Definition of the extracted function

Picture 4b: Definition of the extracted method

Develop with pleasure!
------------
看完上面的内容,你是否觉 得,原来重构也可以这样简单?

Tags: phpstorm, refactor

官方wiki:Configuring PhpStorm IDE for Yii

如果到facebook上关注一下yii framework的群组,会发现有人在介绍yiicookbook.org,里面是一本关于1.1的书。
然后去yii framework官方上搜索一下phpstorm,会发现同一个人在说自己用phpstorm,问phpstorm有没有什么支持。结果官网说暂时好象不支持。。。
然后再搜索了一下,发现在yii的官网有一个简单的例子在说如何让项目支持yii framework。看了一下,发现,大多数都用过,只有第一点,说是把yiilite.php过滤掉。这个其实很重要了,否则有些变量就会出现提示两次。
OK,来看官网的wiki吧:http://www.yiiframework.com/wiki/92/configuring-phpstorm-ide-for-yii

Code completion

  1. Exclude yiilite.php from index:
    • File → Settings → IDE Settings → File Types.
    • yiilite.php to Ignore files and folders.
  2. Exclude not used directories, specify resources.
    • File → Settings → Project settings → Directories.
    • Mark framework/cli/views, protected/runtime and assets as excluded.
    • Mark website root as resource root.
  3. Specify path to your PHP.
    • File → Settings → Project settings → PHP → PHP Home.
  4. If your project uses common Yii framework folder you need to include it.
    • File → Settings → Project settings → PHP → PHP Home → Add.
    • Specify a path to framework directory.
  5. If you are writing unit tests you can include PHPUnit to get code completion:
    • File → Settings → Project settings → PHP → PHP Home → Add.
    • Specify a path to PHPUnit.
  • Complete code: Ctrl+Space.
  • Show method arguments: Ctrl+Q.

Testing

You should install PHPUnit to run unit tests.

  1. PHPUnit.
    • Follow official PHPUnit installation guide.
    • In your IDE: Run → Edit configurations.
    • Press "+".
    • Name: anything.
    • Test: depending on what do you want to test select an appropriate option. Specify path.
    • Use XML configuration file: specifying path to phpunit.xml. Often it's path_to_your_webroot/protected/tests/phpunit.xml.
  • To run tests use SHIFT+F10.
OK,现在这样就可以简单的支持yii framework了。只是phpstorm还是有点小问题,因为提示的时候不会显示phpdoc的信息。纠结,啥时候会有doc的提示呢?

Tags: phpstorm, yii, facebook

文章阅读时启用readability插件

OK,看我博客的人,可能会看到这个工具条了,嗯,我已经在网站的阅读时候启用了readability这个插件,如果不想看到文章左右的广告的用户,可以点击NOW看一下。当然如果你对文章有兴趣,你可以点击EMAIL发到邮箱。

更重要的是,如果你有kindle,你也可以尝试发送过去。(希望我转载的文章足够吸引人)

放心吧,不要以为很难,其实 你也可以拥有这样的功能。在你的页面上加上这样一段代码就OK了:

<div class="rdbWrapper" data-show-read="1" data-show-send-to-kindle="1" data-show-print="1" data-show-email="1" data-version="1"></div><script type="text/javascript"> (function() { var s = document.getElementsByTagName("script")[0], rdb = document.createElement("script"); rdb.type = "text/javascript"; rdb.async = true; rdb.src = document.location.protocol + "//www.readability.com/embed.js"; s.parentNode.insertBefore(rdb, s); })(); </script>

什么,复制代码无效?没关系,看这里:http://www.readability.com/publishers/tools

你可以自定义你要的样式啦

Tags: readability

他还活着?Foxmail 7.0.1.76 beta出来了

说实话,自从它到了腾讯后变成腾讯的软件后,我一直以为他就那样的死去了。
从很久以前,我就一直在用它,6.0给我带来的惊喜已经逐渐离我远去了。从6.0到6.5,从6.5到7.0,你以为你是玻璃渣?几年才出一个?
不过WEB mail这一块还是有更新的,所以我一直以为6.5不会再出新版了。所以我才觉得那样的意外。。。
http://fox.foxmail.com.cn/index.htm
官方有介绍了,这次的新版的界面超象outlook呀。而且也全面支持Exchange了
大小: 59.87 K
尺寸: 500 x 338
浏览: 2245 次
点击打开新窗口浏览全图
主要是由于一些计划任务在用,而且有时候从苹果里发出来的邮件中内嵌图片的,我居然用foxmail收下来是显示不了的。而又占用了空间,TNND,所以暂时我目前已经不在使用了
有兴趣的可以尝试一下下

Tags: foxmail, tencent, qq, 腾讯