• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            兔子的技術(shù)博客

            兔子

               :: 首頁 :: 聯(lián)系 :: 聚合  :: 管理
              202 Posts :: 0 Stories :: 43 Comments :: 0 Trackbacks

            留言簿(10)

            最新評(píng)論

            閱讀排行榜

            評(píng)論排行榜

            問題就是我們使用TextMate不支持GB2312等編碼,用著及其不方便,下面是解決方案: 

            打開Bundle Editor 
            選則Show all 
            選則文件夾TextMate(或者隨便你選則什么) 
            增加一個(gè)新的template‘openEncodedFile’(或者隨便你自己命名) 
            在Template data中如下設(shè)定 
            Extension:中 留空 
            Command(s):
            # open CocoaDialog's file select menu
            file=$(CocoaDialog fileselect \
                    --title "Open an encoded file" \
                    --with-directory $HOME/ \
            )
            # check for valid file
            if [ -n "$file" ]; then
            # open CocoaDialog's dropdown menu
            # for more encodings add them to '--items'
            # to list all possibile encodings use the Terminal with 'iconv -l'

                    res=$(CocoaDialog dropdown \
                            --title "Open an encoded file" \
                            --text "Choose the encoding:" \
                            ??exit?onchange \
                            --button1 "Open" \
                            --button2 "Cancel" \
                            --items "BIG5" "EUC-TW" "GB2312" "SJIS" "EUC-JP" "KOI8-R" \
                    )
            # if user canceled exit
                    [[ $( (tail -r <<<"$res") | tail -n1)  == "2" ]] && \
                            exit_discard
                    res=$(tail -n1 <<<"$res")
            # add more 'elif' according to '--items' if needed
                    if [ "$res" == 0 ]; then
                            ENC="BIG5"
                    elif [ "$res" == 1 ]; then
                            ENC="EUC-TW"
                    elif [ "$res" == 2 ]; then
                            ENC="GB2312"
                    elif [ "$res" == 3 ]; then
                            ENC="SJIS"
                    elif [ "$res" == 4 ]; then
                            ENC="EUC-JP"
                    elif [ "$res" == 5 ]; then
                            ENC="KOI8-R"
                    fi
            # start conversion to UTF-8 and send the result as a new file back to TM
                    iconv -f "$ENC" -t utf-8 "$file" > "$TM_NEW_FILE"
            fi
            Output: Insert as Text 
            - Activation: Key Equivalent shift+option+o (我的建議) 
            - Scope: 留空
            posted on 2012-02-04 14:58 會(huì)飛的兔子 閱讀(508) 評(píng)論(0)  編輯 收藏 引用 所屬分類: 蘋果相關(guān)
            久久精品水蜜桃av综合天堂 | 久久综合久久自在自线精品自 | 97超级碰碰碰久久久久| 伊人久久大香线焦AV综合影院| 久久亚洲国产欧洲精品一| 久久综合亚洲色HEZYO社区| 久久久噜噜噜久久熟女AA片| 国产美女久久久| 亚洲va久久久噜噜噜久久 | 色妞色综合久久夜夜| 日本久久中文字幕| 尹人香蕉久久99天天拍| 久久人人爽人人爽人人片AV不| 精品无码久久久久国产动漫3d| 久久婷婷五月综合97色一本一本| 91精品国产高清91久久久久久| 久久婷婷久久一区二区三区| 久久精品综合一区二区三区| 伊人久久大香线蕉精品不卡| 漂亮人妻被黑人久久精品| 九九精品99久久久香蕉| 久久综合欧美成人| 久久国语露脸国产精品电影| 精品免费tv久久久久久久| 久久亚洲天堂| 久久久噜噜噜久久熟女AA片| 久久久久亚洲AV成人网人人软件| 久久亚洲日韩看片无码| 伊人热人久久中文字幕| 久久综合色老色| 日韩欧美亚洲综合久久影院d3| 久久久精品国产亚洲成人满18免费网站 | 久久综合丝袜日本网| 久久毛片一区二区| 一级做a爰片久久毛片16| 久久国产亚洲精品| 久久精品国内一区二区三区| yy6080久久| 久久午夜福利电影| 久久婷婷久久一区二区三区| 香蕉久久av一区二区三区|