• <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 會飛的兔子 閱讀(508) 評論(0)  編輯 收藏 引用 所屬分類: 蘋果相關
            久久亚洲精精品中文字幕| 丰满少妇高潮惨叫久久久| 99久久精品国产毛片| 久久久久国产精品三级网| 99久久国产亚洲综合精品| 狠狠色噜噜狠狠狠狠狠色综合久久| 久久国产影院| 久久久久久精品成人免费图片| 久久狠狠一本精品综合网| 国内精品九九久久精品| 99久久99久久精品国产| 久久天天躁狠狠躁夜夜躁2014| 国产婷婷成人久久Av免费高清 | 亚洲精品高清久久| 久久久久亚洲国产| 久久99精品久久久久久野外| 亚洲国产另类久久久精品| 久久无码国产| 国产精品女同一区二区久久| 久久人人爽人人爽人人AV东京热| 久久影院久久香蕉国产线看观看| 69久久精品无码一区二区| 精品久久久久久中文字幕大豆网 | 国色天香久久久久久久小说| 国产—久久香蕉国产线看观看| 97久久精品无码一区二区天美| 久久久久久久波多野结衣高潮 | 国产精品福利一区二区久久| 99精品国产99久久久久久97| 欧美日韩精品久久久免费观看| 久久久久国产成人精品亚洲午夜| 久久91精品国产91久久户| 久久国产精品久久久| 国产精品久久网| 久久99热狠狠色精品一区| 久久亚洲国产午夜精品理论片| 国产精品久久精品| 国产激情久久久久影院老熟女免费 | 99久久综合狠狠综合久久止| 97久久精品午夜一区二区| 精品久久无码中文字幕|