一些定制的问题

8 views
Skip to first unread message

ffan

unread,
May 15, 2009, 9:37:13 PM5/15/09
to vimim
昨天试用了一下VIMIM,觉得有些地方对我来说不方便,希望可以自己改一下。

1 切换的组合键。
默认是 ctrl+6,我按那个'6'总是不舒服的感觉- -,希望可以改成 ctrl+. 之类的。

2 中文标点。
能不能在中文输入模式下,把标点都改成英文标点啊?比如。 --> . * --> *

以上两个问题请问如何修改代码得到我期望的结果。

谢谢:)

wanng fenng

unread,
May 15, 2009, 11:50:47 PM5/15/09
to vi...@googlegroups.com
 在toplanguage推荐过这个插件,有童鞋反映说:
---------------------------
我是在终端运行vim的,很奇怪的一个问题,有些字库里有,
但是就是打不出来,比如
“中国”: zhongguo<C+\>,提示找不到
"全中国":quanzhongguo<C+\>,这个就正常了

还有很多常用字也是如此。

你使用都正常?
---------------------------
敢问如何解决?
2009/5/16 ffan <yeshe...@gmail.com>

vimim

unread,
May 16, 2009, 12:24:01 AM5/16/09
to vimim

默认定为 ctrl+6 是为了与 "党中央" (Vim) 保持一致。

| 需先切入中文输入模式:默认切入键与 Vim 此键功能保持一致:
| ``CTRL-^  Toggle the use of typing language characters.``
|

原则上,Vim 的玩家千万不要忍受"不舒服的感觉"。
如果有"不舒服的感觉",请做个 mapping, 例如
这是 code:
imap<silent> <C-^> <Plug>VimimChineseMode
随你怎样定义让自己的舒服的mapping


>> 中文标点。
>> 能不能在中文输入模式下,把标点都改成英文标点啊?比如。 --> . * --> *

http://maxiangjiang.googlepages.com/vimim.html#id31

中文标点

* 进入 VimIM 中文输入模式 中文标点自动开启
* 敲 **i_CTRL-6** 动态切换中英文输入模式,包括标点。
* 敲 **i_CTRL-A** 可动态切换中英文标点。
* 关闭::let g:vimim_disable_chinese_punctuation=1

如果没有人喜欢,我可以设置为默认关闭。

vimim

unread,
May 16, 2009, 12:26:51 AM5/16/09
to vimim
这个问题比较严重!
问题是我不能 reproduce (我的没有问题)
你能不能 reproduce 这个问题?


On May 15, 8:50 pm, wanng fenng <wanng.fe...@gmail.com> wrote:
> 在toplanguage推荐过这个插件,有童鞋反映说:
> ---------------------------
> 我是在终端运行vim的,很奇怪的一个问题,有些字词库里有,但是就是打不出来,比如
> "中国": zhongguo<C+\>,提示找不到
> "全中国":quanzhongguo<C+\>,这个就正常了
>
> 还有很多常用字也是如此。
>
> 你使用都正常?
> ---------------------------
> 敢问如何解决?

> 2009/5/16 ffan <yesheng...@gmail.com>

Wenbo Yang

unread,
May 16, 2009, 1:45:45 AM5/16/09
to vi...@googlegroups.com
这个在我机器上能验证。除了中国以外,我还发现 zhineng 也无法出来。

版本:Ubuntu 9.04, Vim 7.2.79, Vimim (vim.org 上的最新版本,好像 vim.org 挂了?)

文博
2009/5/16 vimim <maxian...@gmail.com>:

--
Wenbo YANG

The State Key Laboratory Of Information Security
Graduate University of Chinese Academy of Sciences
19A Yuquan Rd., Beijing, China --- Homepage: http://solrex.cn

vimim

unread,
May 16, 2009, 3:04:50 AM5/16/09
to vimim
有没有什么条件?
码表应该是排序好的?
是不是偶尔出不来? 还是永远出不来?
永远出不来的问题反倒好解决。
最怕的是 random 问题, 我们称之与天气有关。


On May 15, 10:45 pm, Wenbo Yang <sol...@gmail.com> wrote:
> 这个在我机器上能验证。除了中国以外,我还发现 zhineng 也无法出来。
>
> 版本:Ubuntu 9.04, Vim 7.2.79, Vimim (vim.org 上的最新版本,好像 vim.org 挂了?)
>
> 文博

> 2009/5/16 vimim <maxiangji...@gmail.com>:

vimim

unread,
May 16, 2009, 5:27:42 AM5/16/09
to vimim
请用【最新试用版本】http://maxiangjiang.googlepages.com/vimim.vim
验证 这个 bug!

谢谢!


On May 15, 10:45 pm, Wenbo Yang <sol...@gmail.com> wrote:

> 这个在我机器上能验证。除了中国以外,我还发现 zhineng 也无法出来。
>
> 版本:Ubuntu 9.04, Vim 7.2.79, Vimim (vim.org 上的最新版本,好像 vim.org 挂了?)
>
> 文博

> 2009/5/16 vimim <maxiangji...@gmail.com>:

邹业盛

unread,
May 16, 2009, 9:49:26 AM5/16/09
to vi...@googlegroups.com
如果没有人喜欢,我可以设置为默认关闭。



我把切换改成<C-L>感觉顺手多了:)

但是,第二个标点的问题还没有解决。下了最新的版本,现在默认是英文标点了。
(其实在完全中文录入的时候是需要中文标点,但在写一些格式的文档时,比如wiki,就要用到英文标点)。

首先,命令 ":let g:vimim_disable_chinese_punctuation=1" 我使用起来无效。
另外,在中文输入模式下,<C-A>的作用,不是切换标点,而像是直接输入了"<Plug>VimimPunc",因为我用的是五笔,就有“闷骚”之类的字眼- -

环境: Ubuntu 8.10 + VIM 7.1 (GUI)

--
From:  Yesheng Zou

vimim

unread,
May 16, 2009, 3:46:08 PM5/16/09
to vimim

与一个VimIM 玩家讨论了标点前因后果,决定 rollback:

中文标点

* 进入 VimIM 中文输入模式 中文标点自动开启
* 敲 **i_CTRL-6** 动态切换中英文输入模式,包括标点。
* 敲 **i_CTRL-A** 可动态切换中英文标点。

* 关闭::let g:vimim_disable_chinese_punctuation=1

【最新试用版本】http://maxiangjiang.googlepages.com/vimim.vim

好处:

(1) expecting when typing Chinese
(2) 如果不喜欢,可以永久关闭,或者动态切换
(3) 动态切换有二个方式

Yesheng Zou

unread,
May 17, 2009, 1:53:23 AM5/17/09
to vi...@googlegroups.com
刚才下了最新版本,已经可以使用<C-A>来做中英文标点的切换了:)

2009/5/17 vimim <maxian...@gmail.com>



--
From:  Yesheng Zou

wang feng

unread,
May 17, 2009, 8:32:50 AM5/17/09
to vi...@googlegroups.com
可以验证这个错误,我的系统环境:

$ uname -a
Linux enlightenment 2.6.29-ARCH #1 SMP PREEMPT Sat May 9 14:09:36 CEST
2009 x86_64 Intel(R) Celeron(R) CPU 550 @ 2.00GHz GenuineIntel GNU/Linux

$yaourt -Ss vim | grep installed
extra/gvim 7.2.65-1 [installed]
extra/vim 7.2.65-1.1 [installed]
extra/vim-a 2.18-2 [installed] (vim-plugins)
extra/vim-bufexplorer 7.2.2-1 [installed] (vim-plugins)
extra/vim-buftabs 0.10-1 [installed] (vim-plugins)
extra/vim-colorsamplerpack 6.0-1 [installed] (vim-plugins)
extra/vim-doxygentoolkit 0.2.3-1 [installed] (vim-plugins)
extra/vim-guicolorscheme 1.1-1 [installed] (vim-plugins)
extra/vim-matchit 1.13.1-1 [installed] (vim-plugins)
extra/vim-minibufexpl 6.3.2-4 [installed] (vim-plugins)
extra/vim-omnicppcomplete 0.4.1-1 [installed] (vim-plugins)
extra/vim-project 1.4.1-2 [installed] (vim-plugins)
extra/vim-taglist 45-1 [installed] (vim-plugins)
extra/vim-vcscommand 29-1 [installed] (vim-plugins)
extra/vim-workspace 1.0b1-2 [installed] (vim-plugins)
community/apvlv 0.0.6.4-1 [installed]
testing/gvim 7.2.166-1 [7.2.65-1 installed]
testing/vim 7.2.166-1 [7.2.65-1.1 installed] (base)
aur/apvlv 0.0.6.4-1 [installed] (89)
aur/vim-latexsuite 20060325-1 [installed] (12)


$ ls -Rl ~/.vim
/home/feng/.vim:
总计 34728
-rw-r--r-- 1 feng feng 35510659 2008-11-03 cscope.out
drwxr-xr-x 2 feng feng 4096 05-11 16:14 plugin
drwxr-xr-x 2 feng feng 4096 2008-11-03 scripts

/home/feng/.vim/plugin:
总计 1524
-rw-r--r-- 1 feng feng 7379 2008-11-03 cscope_maps.vim
-rw-r--r-- 1 feng feng 15400 2008-11-03 supertab.vim
-rw-r--r-- 1 feng feng 1433199 05-11 16:14 vimim.pinyin.txt
-rw-r--r-- 1 feng feng 91425 05-17 20:25 vimim.vim

/home/feng/.vim/scripts:
总计 16
-rw-r--r-- 1 feng feng 12853 2008-11-03 closetag.vim

$ cat ~/.vimrc
set nocompatible " use vim defaults
set ls=2 " allways show status line
set tabstop=4 " numbers of spaces of tab character
set shiftwidth=4 " numbers of spaces to (auto)indent
set scrolloff=3 " keep 3 lines when scrolling
set showcmd " display incomplete commands
set hlsearch " highlight searches
set incsearch " do incremental searching
set ruler " show the cursor position all the time
set visualbell t_vb= " turn off error beep/flash
set novisualbell " turn off visual bell
set nobackup " do not keep a backup file
set number " show line numbers
set ignorecase " ignore case when searching
"set noignorecase " don't ignore case
set title " show title in console title bar
set ttyfast " smoother changes
"set ttyscroll=0 " turn off scrolling, didn't work well with PuTTY
set modeline " last lines in document sets vim mode
set modelines=3 " number lines checked for modelines
set shortmess=atI " Abbreviate messages
set nostartofline " don't jump to first character when paging
set whichwrap=b,s,h,l,<,>,[,] " move freely between files
"set viminfo='20,<50,s10,h

set noautoindent
set nosmartindent
set nocindent

set autowrite " auto saves changes when quitting and swiching buffer
set expandtab " tabs are converted to spaces, use only when required
set sm " show matching braces, somewhat annoying...
"set nowrap " don't wrap lines
set wrap " don't wrap lines
syntax enable
syntax on " syntax highlighing
if has("gui_running")
" See ~/.gvimrc
set guifont=Monospace\ 10 " use this font
set lines=50 " height = 50 lines
set columns=100 " width = 100 columns
set background=light " adapt colors for background
set selectmode=mouse,key,cmd
set keymodel=
""else
"" colorscheme cleanphp " use this color scheme
"" set background=dark " adapt colors for background
endif

colorscheme vc
"colorscheme aqua



if has("autocmd")
" Restore cursor position
au BufReadPost * if line("'\"") > 0|if line("'\"") <=
line("$")|exe("norm '\"")|else|exe "norm $"|endif|endif

" Filetypes (au = autocmd)
au FileType helpfile set nonumber " no line numbers when
viewing help
au FileType helpfile nnoremap <buffer><cr> <c-]> " Enter selects
subject
au FileType helpfile nnoremap <buffer><bs> <c-T> " Backspace to go
back

" When using mutt, text width=72
au FileType mail,tex set textwidth=136
au FileType cpp,c,java,sh,pl,php,asp set autoindent
au FileType cpp,c,java,sh,pl,php,asp set smartindent
au FileType cpp,c,java,sh,pl,php,asp set cindent
"au BufRead mutt*[0-9] set tw=72

" Automatically chmod +x Shell and Perl scripts
"au BufWritePost *.sh !chmod +x %
"au BufWritePost *.pl !chmod +x %

" File formats
au BufNewFile,BufRead *.pls set syntax=dosini
au BufNewFile,BufRead modprobe.conf set syntax=modconf
endif
set encoding=UTF-8
set helplang=cn
let &termencoding=&encoding
set fileencodings=cp936,utf-8,ucs-bom,gbk,gb2312,gb18030

let Tlist_Show_One_File=1
let Tlist_Exit_OnlyWindow=1



let g:closetag_html_style=1
source ~/.vim/scripts/closetag.vim
cs add /home/feng/.vim/cscope.out
source ~/.vim/plugin/supertab.vim

let g:vimim_enable_sexy_input_style=1

vimim

unread,
May 17, 2009, 6:57:21 PM5/17/09
to vimim
>> 可以验证这个错误,我的系统环境

This is the top priority, as it means VimIM is not stable.
We can skip all other fancy UI habits, but we cannot skip this one.

Please help me to reproduce the bug as much as possible:

(1) can you try the latest one online?
【最新试用版本】http://maxiangjiang.googlepages.com/vimim.vim

(2) Can you reproduce the error and write down the steps to me?
It is better to start from few settings (the less the better).

Thanks

wang feng

unread,
May 17, 2009, 11:21:50 PM5/17/09
to vi...@googlegroups.com
大略写了一下:
1) mv .vimrc .vimrc.back
2) vi u

击键:i
左下提示:--插入--

击键:<ctl>+6
左下提示:--插入(语言)--

击键:z
左下提示:--用户自定义补全(^U^N^P)匹配1/18--
第一行下方提示补全:
1 着
2 咱
3 杂
……

击键:h
左下提示:--用户自定义补全(^U^N^P)找不到模式--

vimim

unread,
May 18, 2009, 2:26:16 AM5/18/09
to vimim
Thanks for details, but I could not reproduce.
Following what you did, I got:
http://maxiangjiang.googlepages.com/tmp_vimim_zh.gif

One thing you can help is to paste these lines to your data file:

zha 炸 眨 轧 闸 楂 榨 渣 吒 咋 溠 猹 痄 砟
zha 乍 咤 喳 怍 扎 拃 揸 札 柞 蚱 诈 蹅 鲊
zha1 吒 哳 喳 扎 揸 查 楂 渣 齄
zha2 喋 札 轧 铡 闸
zha3 眨 砟
zha4 炸 乍 吒 咤 柞 榨 痄 蚱 诈

Don't forget to :sort before you save.

Thanks


On May 17, 8:21 pm, wang feng <wanng.fe...@gmail.com> wrote:
> 大略写了一下:
> 1) mv .vimrc .vimrc.back
> 2) vi u
>
> 击键:i
> 左下提示:--插入--
>
> 击键:<ctl>+6
> 左下提示:--插入(语言)--
>
> 击键:z
> 左下提示:--用户自定义补全(^U^N^P)匹配1/18--
> 第一行下方提示补全:
> 1 着
> 2 咱
> 3 杂

> ......

wang feng

unread,
May 18, 2009, 2:40:51 AM5/18/09
to vi...@googlegroups.com
多谢,如此一来,问题得到解决:)

vimim

unread,
May 18, 2009, 3:26:58 AM5/18/09
to vimim
I am trying to see if you can reproduce this bug.
If that is the case, then it is a bug!

On May 15, 8:50 pm, wanng fenng <wanng.fe...@gmail.com> wrote:

> 在toplanguage推荐过这个插件,有童鞋反映说:
> ---------------------------
> 我是在终端运行vim的,很奇怪的一个问题,有些字词库里有,但是就是打不出来,比如
> "中国": zhongguo<C+\>,提示找不到
> "全中国":quanzhongguo<C+\>,这个就正常了
>
> 还有很多常用字也是如此。
>
> 你使用都正常?
> ---------------------------
> 敢问如何解决?

> 2009/5/16 ffan <yesheng...@gmail.com>

wang feng

unread,
May 18, 2009, 3:49:57 AM5/18/09
to vi...@googlegroups.com
跟他转过你的回复了,他回答说他那边也没有问题了,
原地址在这边:http:
//groups.google.com/group/pongba/browse_thread/thread/45756a338b0ab1e5/7cd44720c9abb04e?show_docid=7cd44720c9abb04e
Reply all
Reply to author
Forward
0 new messages