• <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>

            兔子的技術博客

            兔子

               :: 首頁 :: 聯系 :: 聚合  :: 管理
              202 Posts :: 0 Stories :: 43 Comments :: 0 Trackbacks

            留言簿(10)

            最新評論

            閱讀排行榜

            評論排行榜

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

            打開Bundle Editor 
            選則Show all 
            選則文件夾TextMate(或者隨便你選則什么) 
            增加一個新的template‘openEncodedFile’(或者隨便你自己命名) 
            在Template data中如下設定 
            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 會飛的兔子 閱讀(503) 評論(0)  編輯 收藏 引用 所屬分類: 蘋果相關
            色综合久久中文字幕综合网| 久久久精品人妻无码专区不卡| 亚洲午夜久久久久久久久久| 色综合久久无码五十路人妻| 久久精品中文字幕久久| 26uuu久久五月天| 久久久久久精品免费看SSS| 91久久精一区二区三区大全| 久久久噜噜噜久久| 久久发布国产伦子伦精品| 久久久综合香蕉尹人综合网| 久久久久无码精品国产| 日韩十八禁一区二区久久| 久久成人国产精品| 99久久无色码中文字幕人妻| 久久九色综合九色99伊人| 久久天堂AV综合合色蜜桃网| 午夜精品久久久久久影视riav| 免费观看久久精彩视频| 亚洲av伊人久久综合密臀性色| 四虎影视久久久免费| 国产精品成人久久久久久久| 无码人妻久久一区二区三区免费| 国产精品一区二区久久精品涩爱 | 99久久成人国产精品免费| 亚洲精品无码久久毛片| 国产成人久久精品麻豆一区| www久久久天天com| 久久不见久久见免费视频7| 久久综合亚洲鲁鲁五月天| 亚洲国产精品无码久久久久久曰| 亚洲精品国产成人99久久| 久久亚洲精品视频| 99国内精品久久久久久久| 久久久精品午夜免费不卡| 久久亚洲精品视频| 亚洲国产精品久久久久婷婷老年| 久久婷婷五月综合色高清| 成人综合伊人五月婷久久| 久久最近最新中文字幕大全| 久久国产综合精品五月天|