- 編輯器設定 soft tab (space=2),以 2 格空白符號做為程式內縮距離(不分語言)。
- 函式如果只有一個參數,就不強制打()
- 函式如果有二個以上的參數,通通都要有 ()
- (避免發生奇怪的paser bug跟保持專案一致性)
- 字串限定用雙引號包覆
- 善用 "#{str1} #{str3} " 等字串改寫技巧取代不需要的字串加法。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'spec_helper' | |
| # the string is your real path of view file. | |
| describe "home/index" do | |
| before do | |
| login_as @user | |
| template.stub('smart_link_to').and_return('') | |
| @user = Factory(:user) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| theme: advanced | |
| theme_advanced_toolbar_location : 'top' | |
| theme_advanced_buttons1 : "fontselect, fontsizeselect,|, forecolor, backcolor, bold,italic,underline,strikethrough,|, justifyleft,justifycenter,justifyright,justifyfull,|, bullist,numlist,|, link,unlink,image,|, undo, redo, |, cleanup, code" | |
| theme_advanced_buttons2: "" | |
| theme_advanced_buttons3: "" | |
| theme_advanced_toolbar_align : "left" | |
| theme_advanced_statusbar_location: "bottom" | |
| theme_advanced_fonts : "宋体=\'宋体\', sans-serif; 黑体=\'黑体\', sans-serif; 楷体=\'楷体_GB2312\', sans-serif; 隶书=\'隶书\', sans-serif;幼圆=\'幼圆\', sans-serif; 新宋体=\'新宋体\',sans-serif;微软雅黑=\'微软雅黑\', sans-serif; Arial=Arial; Arial Black=Arial Black; Arial Narrow=Arial Narrow; Brush Script MT=Brush Script MT; Century Gothic=Century Gothic; Comic Sans MS=Comic Sans MS; Courier=Courier; Courier New=Courier New; MS Sans Serif=MS Sans Serif; Script=Script; System=System; Times New Roman=Times New Roman; Verdana=Verdana; Wide Latin=Wide Latin; Wingdings=Wingdings;" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " 当修改snippet脚本后,执行,rr可重新加载脚本,无需重启Vim | |
| function! ReloadSnippets( snippets_dir, ft ) | |
| if strlen( a:ft ) == 0 | |
| let filetype = "_" | |
| else | |
| let filetype = a:ft | |
| endif | |
| call ResetSnippets() | |
| call GetSnippets( a:snippets_dir, filetype ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # © 2009 Andrew Coleman | |
| # Released under MIT license. | |
| # http://www.opensource.org/licenses/mit-license.php | |
| # | |
| # total hack to allow american style date parsing. | |
| # does not allow european-ish date parsing, sorry. | |
| # | |
| # some credit from: | |
| # http://talklikeaduck.denhaven2.com/2009/04/26/ruby-1-9-compatibility-for-ri_cal-what-it-took-and-some-side-thoughts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " 解决在编辑文件时底部出现\ No newline at end of file的问题 | |
| au BufWritePre * :set binary | set noeol | |
| au BufWritePost * :set nobinary | set eol |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [user] | |
| name = your_name | |
| email = [email protected] | |
| [alias] | |
| co = checkout | |
| ci = commit | |
| st = status | |
| br = branch | |
| last = log -p -1 | |
| [color] |
NewerOlder