我怎样才能将注册簿的内容与外部指令的标准输入连接起来? 我直觉地尝试了以下内容,但是它行不通(也许可以说明我的需要 ) :
:"0w !some_command
我怎样才能将注册簿的内容与外部指令的标准输入连接起来? 我直觉地尝试了以下内容,但是它行不通(也许可以说明我的需要 ) :
:"0w !some_command
如果登记簿的内容没有附带含有NULL的登记内容,那么它就简单到
call system( some_command , @r)
。一旦您承认注册内容可能包含 NUL 字节, 问题就不那么简单: 在此情况下, 您需要使用 < code> getreg () code > 并强制它生成注册列表形式( 这是第二个 < code> 1 code > 到 < code> gettreg () code > ) 。
call system( some_command , getreg( r , 0, 1) + (getregtype( r ) isnot# v ? [ ] : []))
。此窗体将保存可能碰巧在登记册中的 NUL 。 注意, 尽管 gettreg( r, 0, 1)
将不会有尾行新行, 即使您复制文本的方式是线性模式, 这就是为什么我写了 < code\\\ (getregty( r) isnot# v? [ ]: [ ] < ) 来添加它( form < code\\\\\\r 没有这个问题 ) 。
列表窗体是代表预示引入 blobs 时间的二进制数据的一种方式。 要将随机的二进制数据转换成此形式, 您可以在 NL 字节上分割它( 保存由此产生的空字符串), 然后将全部 NUL 字节替换为 NL 。
Is it possible to update vim plugins automatically?
How can I configure vim to autowrite buffers after switching with alt-tab to another application?
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....
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 ...
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 ...
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 ...
Whenever I start a shell in vim using :sh, it doesn t source my ~/.bashrc file. How can I get it to do this automatically?
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 ...