English 中文(简体)
我如何以过去的方式在维姆做不成的工作?
原标题:How do I make imap work in paste mode in Vim?
  • 时间:2010-10-09 21:46:26
  •  标签:
  • vim

我最近开始使用:imap jj,并试图放弃Ctrl+。

然而,当旧模式出现时, im不成。 我如何以过去的方式开展工作?

问题回答

如果能够过去,你根本无法绘制工作图,因为这正是维姆过去模式的全点。

过去的模式是为了允许你甚至在青少年的环境下 past。 维姆位于终点站,Vim可能不知道你会重新使用该 mo,而你希望插入字面文字,成为你的过去缓冲,而不引发绘图,或自动/智能/压缩登机等。

我建议你研究:

:help paste
:help pastetoggle

在通过终点站接通时自动引发过去模式的灯塔之后添加:

let &t_SI .= "<Esc>[?2004h"
let &t_EI .= "<Esc>[?2004l"

inoremap <special> <expr> <Esc>[200~ XTermPasteBegin()

function! XTermPasteBegin()
   set pastetoggle=<Esc>[201~
   set paste
return ""
endfunction

From: https://coderwall.com/p/if9mda





相关问题
Autoupdate VIM Plugins?

Is it possible to update vim plugins automatically?

how to unindent in vim without leaving edit mode?

I m writing a lot of python code recently, and i used the tab-to-space mode in vim. I was just wondering how would i unindent in vim without leaving edit mode for example after i finished if...: block....

Scrolling inside Vim in Mac s Terminal

I ve been googling around trying to figure out if it s possible to use my mouse wheel to scroll while inside Vim in Mac s Terminal, with no luck. It seems as if only X11 or iTerm support this. Before ...

Vim - Deleting XML Comments

How do I delete comments in XML? If the opening and the closing comment tags are on the same line, I use :g/^<!--.*-->$/d to delete the comment. How to delete the comments that are spread ...

Limiting a match in vim to certain filetypes?

I have the following in my .vimrc to highlight lines longer than 80 chars: highlight OverLength ctermbg=red ctermfg=white guibg=#592929 match OverLength /\%81v.*/ This works quite well. However, the ...

Profiling Vim startup time

I’ve got a lot of plugins enabled when using Vim – I have collected plugins over the years. I’m a bit fed up with how long Vim takes to start now, so I’d like to profile its startup and see which of ...

热门标签