Giter VIP home page Giter VIP logo

ime.vim's People

Contributors

pi314 avatar rlf23240 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ime.vim's Issues

ime.vim document

到時候再看 :help boshiamy:help ime 是否要分成不同文件,如果 :help boshiamy 資訊不多的話,留在 :help ime,用 tag reference 就好

「輸入後直接複製」模式

最近開始工作,公司的電腦上沒有嘸蝦米
現在是用 http://boshiamy.com/hliu.php 網頁版
但每次打完字都需要手動複製文字,不是很方便

好在公司的電腦可以安裝 GVim 7.3,也還好這份 plugin 的核心功能都可以使用

目前在構思,GVim 能不能讓中文輸入更方便呢?
如果能在輸入文字以後自動複製,這樣雖然在打字時仍然需要切換到 GVim,但輸入以後就可以直接回到原本的視窗了

將按鍵設定 phase out,以 <Plug> 取代

沒遇到什麼問題,只是突然想這樣改
這樣 ime.vim 就不用從字串產生 mapping,減少風險

  • g:ime_toggle_english
  • g:ime_select_mode
    • 直接提供每種 style 的 g:ime_select_mode
  • g:ime_switch_2nd
  • g:ime_cancel_input
  • g:ime_switch_submode
  • ime#export_cin_file()

讓輸入模式也可以有多種子模式

在使用微軟內建的注音輸入法時,如果按下 Ctrl + Alt + ,
就會跳出一個小鍵盤,上面全是標點符號,
此時按下對應的按鍵就能輸入對應的符號。

現在內建的日文假名模式,如果要輸入片假名,一定要在字根後面加上一個 .

如果能讓輸入模式有自己的子模式,這些不方便可能都可以解決。

例如按下某個鍵,日文假名模式的 icon 就從 [あ] 變成 [ア],以後就都以片假名輸入。
例如按下某個鍵,注音模式的 icon 就從 [注] 變成 [,]
之後按下的第一個鍵會是標點符號,然後 icon 變回 [注]

保留原本的 imaps

現在好像是直接 unmap,但輸入法可能設定了很多 trigger key,要考慮到常用 key 例如 <tab> 有別的 plugin 在使用的狀況。

vim 有沒有可能接上系統輸入法?

vim 本身沒有 socket interface,但這可以透過 language binding 解決。
如果系統輸入法有類似 client / server 的架構,也有 API,說不定可以讓 vim 去 query 它,回傳結果,再拿來用 menu 顯示。

新增 `:help` 文件

  • :help boshiamy 放一般 user 會用得到的設定以及 public API
  • :help boshiamy-dev 放詳細的文件,不用每行 code 解釋,但儘可能把設計的想法寫進去

在 replace mode 下吃掉前方的空白字元

Vim 的 replace mode 會把文字蓋掉,但這些蓋掉的字會保留一段時間,補完的時候會把不應該蓋掉的字填回原位。

我在畫 ASCII 流程圖的時候常用 replace mode 填字,但一個中文字兩格寬,一次只會蓋掉一個字元,有點不方便。

今天想到可以檢查補完的內容,如果長度都相同為 n ,且後方 n 個字元都是空白字元,這些字元可以被覆蓋掉。

而且這個邏輯和輸入模式無關,只和補完的行為有關。

同時開啟多個 ime buffer

function! s:set_title ()
    for l:idx in [''] + map(range(2, bufnr('$') + 1), '"-". v:val')
        try
            " the ``file`` command expands ``#``, so it has to be escaped
            let t:localtablabel = 'cim' . l:idx
            execute 'file cim' . l:idx
            break
        catch /^Vim\%((\a\+)\)\=:E95/
        endtry
    endfor
endfunction

setlocal buftype=nofile
setlocal noswapfile
call s:set_title()
execute 'set guitablabel='. &guitablabel

inoremap <expr> <buffer> <CR> (pumvisible() ? "<C-Y>" : "") . (getline('.') == '' ? "<C-R>*" : "<ESC>0\"*C")
vnoremap <CR> "*d

``g:boshiamy_cancel_input`` 的能力需要增強

g:boshiamy_cancel_input 的原則就是,懶:想在一堆中文字之間嵌入英文單字,但又不想切回英文,若輸入了 id, user 等常用單字,可以方便的把它們打回英文

但打字的速度稍微快一點的時候,常常在發現的時候已經打了下一個字,這時候才按下 cancel input 已經來不及了,所以 cancel input 的範圍需要加大才行

新的送字 style

除了 complete() 以外,getchar()echo 也可以做到互動式的選單

statusline 被 reset 的問題在 Vim 7.4.52 也發生了

以下的 snippet 可以解掉這個問題

function! IMEStatusString ()
    if exists('*ime#mode')
        return ime#mode()
    endif
    return ''
endfunction

之後再來追一下 vim 的 patch history,看看是不是 vim 的 bug,然後把結論寫在 doc & README 裡。

  • 更新 doc/ime.twx
  • 更新 doc/ime.txt
  • 更新 README.rst
  • 更新 README.en.rst

更改 trigger 的宣告方式

目前 plugin 宣告的 key 都會直接被拿來填給 inoremap,但這樣很不方便。
例如對 <space> 的處理,plugin 需在 trigger 裡寫 '<space>'
handler 拿到的也會是 '<space>' 這個字串。
實際使用後發現其實 plugin 常常需要的是空白字元 ' '

同樣的問題還有 <bar>

打算改讓 plugin 直接寫 ' ''|',ime.vim 建一張表做對應就好,也讓 handler 直接拿到原本的字串。

``DATAs.`` 是否要變成 ``DATA?``

目前大小寫字母之間是沒有分隔的,所以 BANANAs. 只會變成 BANANAs。 而不會變成 BANANA?

這個 issue 只是記錄一下,在打字時遇到一點困擾

E121: Undefined variable: v:completed_item

Error detected while processing function <SNR>51_CompSelectMode:
line    4:
E121: Undefined variable: v:completed_item

It is said that v:completed_item is added in 7.4.774, I hit this problem on Vim 7.4.52

整理字根表,去除非必要存在的項目

預定去除項目:

  • 撲克牌 ,poker*
    • 🃑🃒🃓🃔🃕🃖🃗🃘🃙🃚🃛🃜🃝🃞
    • 🃁🃂🃃🃄🃅🃆🃇🃈🃉🃊🃋🃌🃍🃎
    • 🂱🂲🂳🂴🂵🂶🂷🂸🂹🂺🂻🂼🂽🂾
    • 🂡🂢🂣🂤🂥🂦🂧🂨🂩🂪🂫🂬🂭🂮
  • , , , , , , ,

讓 standalone plugin 決定送字的 key

目前是 hard code 成 <space>,但如果要讓 core 繼續抽象化,需要考慮其他輸入法的習慣。

例如注音輸入法的送字可能會在 3(ˇ)、4(ˋ)、6(ˊ)、<space> 觸發,如果要做得更友善,可能會在每個 key 都觸發。

這個想法還在考慮中,如果要納入注音輸入法,就得考慮選字選詞的問題,

更新 README

  • Windows 上可以用了
    • 新增手動安裝方式 (zip)
    • 有些環境沒有 git 也沒有 Cygwin ,所以不管是 Vundlevim-plug 還是其他 plugin manager 都不能用
  • 註明 Vim 的版本
  • 新增 vim-plug 安裝方式

必要時把一些內容分到別的 readme 檔案,例如「其他安裝方式」

``;q.3`` -> ``培`` 的優先度應下降

如題, 通常唸做 ㄆㄟˊ ,但之前整理字根表用的 script 沒有考慮到破音字,故 ㄆㄛˇ 的第一順位也被排成 ,應將

let g:boshiamy#chewing#table[';q.3'] = ['培', '剖', '瓿', '掊', '勏', '婄', '棓', '犃', '篰']

修正為

let g:boshiamy#chewing#table[';q.3'] = ['剖', '培', '瓿', '掊', '勏', '婄', '棓', '犃', '篰']

English documents

Every document should have English version

  • README.en.rst
  • README-install-manually.en.rst
  • doc/ime.txt
  • doc/ime-plugin.txt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.