另外跟xp共享剪切板,如果有换行就不能从vim里面复制出来,没换行就可以。这个有什么改进的么?
:inoremap ( ()<ESC>i
:inoremap ) <c-r>=ClosePair(')')<CR>
:inoremap { {}<ESC>i
:inoremap } <c-r>=ClosePair('}')<CR>
:inoremap [ []<ESC>i
:inoremap ] <c-r>=ClosePair(']')<CR>
:inoremap < <><ESC>i
:inoremap > <c-r>=ClosePair('>')<CR>
:inoremap " ""<ESC>i
:inoremap ' ''<ESC>i
:inoremap ` ``<ESC>i
function! ClosePair(char)
if getline('.')[col('.') - 1] == a:char
return "\<Right>"
else
return a:char
endif
endfunction
最后的函数以前没问题 现在开始出问题了,说是ClosePair函数已存在 要加感叹号什么的 不知道怎么回事。还有这个函数是干什么用的我也不知
道。好像注释掉都可以。inoremap ] <c-r>=ClosePair(']')<CR>这些干什么的都不知道。
:inoremap ( ()<ESC>i这样的就看得懂。
另外跟xp共享剪切板,如果有换行就不能从vim里面复制出来,没换行就可以。这个有什么改进的么?
--
要退订此论坛,请发邮件至 vim-cn+un...@googlegroups.com
更多选项,请通过 http://groups.google.com/group/vim-cn 访问该论坛
On 2月26日, 下午1时54分, 闲耘(tm) <hotoo...@gmail.com> wrote:
> :h E124
>
> --
> 闲耘(tm) (@hotoo <https://twitter.com/hotoo>, hotoo.me)
> <http://hotoo.me/>
>
> 2012/2/26 Cactus <wangba...@gmail.com>
>
>
>
>
>
>
>
> > :inoremap ( ()<ESC>i
> > :inoremap ) <c-r>=ClosePair(')')<CR>
> > :inoremap { {}<ESC>i
> > :inoremap } <c-r>=ClosePair('}')<CR>
> > :inoremap [ []<ESC>i
> > :inoremap ] <c-r>=ClosePair(']')<CR>
> > :inoremap < <><ESC>i
> > :inoremap > <c-r>=ClosePair('>')<CR>
> > :inoremap " ""<ESC>i
> > :inoremap ' ''<ESC>i
> > :inoremap ` ``<ESC>i
> > function*!* ClosePair(char)
On 2月27日, 下午12时41分, iceout <ice.404....@gmail.com> wrote:
> :h E124的意思是查看vim的帮助,先看看vim 的基础教程吧
>
> 复制的问题,你是自己把<C-C>映射到"+y 的?
>
> 2012/2/26 Cactus <wangba...@gmail.com>:
> > 更多选项,请通过http://groups.google.com/group/vim-cn访问该论坛- 隐藏被引用文字 -
>
> - 显示引用的文字 -
" CTRL-C and CTRL-Insert are Copy
vnoremap <C-C> "+y
vnoremap <C-Insert> "+y
" CTRL-V and SHIFT-Insert are Paste
map <C-V> "+gP
map <S-Insert> "+gP
cmap <C-V> <C-R>+
cmap <S-Insert> <C-R>+
" Pasting blockwise and linewise selections is not possible in Insert and
" Visual mode without the +virtualedit feature. They are pasted as if they
" were characterwise instead.
" Uses the paste.vim autoload script.
exe 'inoremap <script> <C-V>' paste#paste_cmd['i']
exe 'vnoremap <script> <C-V>' paste#paste_cmd['v']
imap <S-Insert> <C-V>
vmap <S-Insert> <C-V>
2012/2/27 Cactus <wang...@gmail.com>:
--
-----------------------------------------
alswl
Blog: http://log4d.com
Mail: alswlx[a]gmailDOTcom
-----------------------------------------