Giter Club home page Giter Club logo

Comments (1)

mattn avatar mattn commented on July 23, 2024

候補検索断念時のみにつかう Map があればいけそうですね。
たとえば

Map -def n ん
Map nn ん

としておいて、通常の候補からは n は拾わない。でも kanji の "n" + "j" 時に "n" が has_map_to で引ける様に -def から取る...みたいな。以下イメージです。

diff --git a/autoload/eskk/mode/builtin.vim b/autoload/eskk/mode/builtin.vim
index 28cb9c9..5df180d 100644
--- a/autoload/eskk/mode/builtin.vim
+++ b/autoload/eskk/mode/builtin.vim
@@ -299,7 +299,8 @@ endfunction "}}}
 function! s:filter_rom_to_hira(stash) "{{{
     let char = a:stash.char
     let buf_str = a:stash.buftable.get_current_buf_str()
-    let rom_str = buf_str.get_rom_str() . char
+    let rom_lead = buf_str.get_rom_str()
+    let rom_str = rom_lead . char

     call eskk#util#logf('mode hira - char = %s, rom_str = %s', string(char), string(rom_str))

@@ -313,6 +314,10 @@ function! s:filter_rom_to_hira(stash) "{{{
         call eskk#util#logf('%s - wait for a next key.', rom_str)
         return s:filter_rom_to_hira_has_candidates(a:stash)

+   elseif s:stash.get('current_table').has_map_def(rom_lead)
+       " Match leading staff
+        call eskk#util#logf('%s - match!', rom_lead)
+        return s:filter_rom_to_hira_exact_match(a:stash)
     else
         " No candidates.
         call eskk#util#logf('%s - no candidates.', rom_str)

from eskk.vim.

Related Issues (20)

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.