ZSaberLv0 / ZFVimIM

vim输入法 / Vim Input Method by pure vim script, support: user word, dynamic word priority, cloud db files
204 stars 14 forks source link

中英文混输时,有时候汉字输入会被 buffer 内的自动补全替换,无法输入 #36

Closed ch4m1gn0n closed 2 years ago

ch4m1gn0n commented 2 years ago

Peek 2022-04-12 22-06 删掉英语单词后输入内容,再重新输入时,大概率会出现。

ch4m1gn0n commented 2 years ago

Peek 2022-04-12 22-10

ZSaberLv0 commented 2 years ago

是否有其他自动补全插件? 参考下这个: https://github.com/ZSaberLv0/ZFVimIM/blob/master/plugin/ZFVimIM_autoDisable.vim

ch4m1gn0n commented 2 years ago

关闭自动补全后,删除字符还是会倒至这个问题 Peek 2022-04-13 15-01

ZSaberLv0 commented 2 years ago
filetype plugin indent on
syntax on
set nocompatible
let g:plug_home = $HOME . '/.vim/bundle'
let g:plug_url_format = 'https://github.com/%s'
execute 'source ' . g:plug_home . '/vim-plug/plug.vim'
silent! call plug#begin()
Plug 'junegunn/vim-plug'

Plug 'ZSaberLv0/ZFVimIM'
Plug 'ZSaberLv0/ZFVimJob'
" Plug 'YourName/YourDb'

call plug#end()

能否提供一份类似这样的最简配置?

ch4m1gn0n commented 2 years ago

我刚刚试了下,又好了,我什么也没改,看看过段时间怎么样。。。。。。。。 我是用 NvChad 配置的, 这俩个都是默认开启的

filetype plugin indent on
syntax on

nvim 里 compatible 总是 no 的 插件是 packer,Nvchad的默认配置packerInit 我的插件:

-- /lua/custom/plugins/init.lua
return {
    { "mg979/vim-visual-multi" },
    {
        "folke/which-key.nvim",
        config = function()
            require'custom.plugins.which-key'.setup()
        end
    },
    { 'williamboman/nvim-lsp-installer' },
    { "preservim/vim-markdown" },
    { "kevinhwang91/rnvimr" },
    { "ZSaberLv0/ZFVimJob"},
    { "iamcco/markdown-preview.nvim" },
    -- { "vimwiki/vimwiki" },
    { "ferrine/md-img-paste.vim" },
    { "ZSaberLv0/ZFVimIM" },
    { "dhruvasagar/vim-table-mode" },
    { "mzlogin/vim-markdown-toc" },
    { "easymotion/vim-easymotion" }
}
-- just an example!

zfvimIM配置

vim.api.nvim_exec(
[[
function! s:mylocaldb()
    let db = zfvimim_dbinit({
                \   'name' : 'wubi',
                \ })
    call zfvimim_cloudregister({
                \   'mode' : 'local',
                \   'dbid' : db['dbid'],
                \   'repopath' : '/home/ch4m1gn0n/.config/',  
                \   'dbfile' : '/wubi.txt', 
                \ })
endfunction

autocmd user zfvimim_event_ondbinit call s:mylocaldb()

" let g:vim_markdown_folding_disabled = 1
]],
false)

-- input method
vim.g.zfvimim_keymap = 0
map("n", ",q", "zfvimime_keymap_toggle_n()", {expr = true})
map("i", ",q", "zfvimime_keymap_toggle_i()", {expr = true})
map("v", ",q", "zfvimime_keymap_toggle_v()", {expr = true})
ZSaberLv0 commented 2 years ago

总之这玩意儿依赖 lmapomnifunc, 没法和自动补全插件共存, 先排除其他插件的影响

ch4m1gn0n commented 2 years ago

嗯嗯,谢啦

总之这玩意儿依赖 lmapomnifunc, 没法和自动补全插件共存, 先排除其他插件的影响