comm-用于做文件比较
comm工具
comm工具的主要用途是用来做文件的差集、交集。 工作中,对账是一个频繁的工作项。基本上几十行的数据,人眼就看不过来了。所以使用工具是我们最好的方案。 comm可以为我们很方便的对两个文件做差集、交集。所以我们只要把数据洗成一样的格式后,就可以用comm进行对比了。
……腾飞中的个人博客
comm工具的主要用途是用来做文件的差集、交集。 工作中,对账是一个频繁的工作项。基本上几十行的数据,人眼就看不过来了。所以使用工具是我们最好的方案。 comm可以为我们很方便的对两个文件做差集、交集。所以我们只要把数据洗成一样的格式后,就可以用comm进行对比了。
……fish shell的补全是最简单明了的,一个complete命令就能编写补全。
官方文档参考:
第1个文档说明怎么写补全,第二个文档说明complete命令的用法。
在github上创建一个名为homebrew-tap的仓库,创建一个Formula的目录。
然后就有一个自己的名为username/tap的homebrew仓库了。username改为自己的Github名字。
本文介绍dash如何生成文档以及文档生成工具dashdog的使用。
官方提供了文档的生成指引方式Docset Generation Guide,但是在使用的过程发发现官方指引已经落后了,使用了dash 7下载了一个go的三方文档,并且去看了一下SQLite里的数据。 发现里面的格式跟文档提供的不一样。
……在我们的开发环境中,使多个golang版本并存。
大部分情况下,一个比较新的golang版本就能满足我们的日常的开发需求。 但是项目中,因为协作的原因,或者由于项目启动比较早,可能我们不同的工程需要用不同的golang版本。甚至有些工作用比较新的版本编译不了。 这时候,我们就需要让本地的开发环境支持多个golang版本。
……本文介绍vim宏以及它的魔法。
vim的宏就是把一系列动作录制起来,然后可以进行播放可以执行同样动作的功能。
它是vim中最具有魔法的操作了。可能会有人觉得.重复操作更具有魔法,但是.只能记
重复上一次命令,能做的事情有限,所以它最多就是最经常使用的命令而已,并没有魔法。
很多人在使用feedkeys函数的时候会得取不预期的输出,怎么折腾也搞不明白为什么会得到 这样的结果。这篇文章来给大家解疑一下。
feedkeys({string} [, {mode}]) *feedkeys()*
Characters in {string} are queued for processing as if they
come from a mapping or were typed by the user.
By default the string is added to the end of the typeahead
buffer, thus if a mapping is still being executed the
characters come after them. Use the 'i' flag to insert before
other characters, they will be executed next, before any
characters from a mapping.
The function does not wait for processing of keys contained in
{string}.
To include special keys into {string}, use double-quotes
and "\..." notation |expr-quote|. For example,
feedkeys("\<CR>") simulates pressing of the <Enter> key. But
feedkeys('\<CR>') pushes 5 characters.
If {mode} is absent, keys are remapped.
{mode} is a String, which can contain these character flags:
'm' Remap keys. This is default.
'n' Do not remap keys.
't' Handle keys as if typed; otherwise they are handled as
if coming from a mapping. This matters for undo,
opening folds, etc.
'i' Insert the string instead of appending (see above).
'x' Execute commands until typeahead is empty. This is
similar to using ":normal!". You can call feedkeys()
several times without 'x' and then one time with 'x'
(possibly with an empty {string}) to execute all the
typeahead. Note that when Vim ends in Insert mode it
will behave as if <Esc> is typed, to avoid getting
stuck, waiting for a character to be typed before the
script continues.
'!' When used with 'x' will not end Insert mode. Can be
used in a test when a timer is set to exit Insert mode
a little later. Useful for testing CursorHoldI.
Return value is always 0.
说明文档说了这个函数的使用方式,但是对于大部分人,只理解了一部分,帮而会产生很多
不解的行为。这个函数会把参数中的{string}当前是用户输入的。默认的,它会把string
的内容放到预输入的buffer(下面直接引用说明文档中的typeahead buffer)中。
对于不解行为,主要都是由这个typeahead buffer产生了。这个typeahead buffer并不是我
们所熟悉的vim与文档内容关联的buffer,下面会对它进行详细的说明。很多人认为,只要
一调用feedkeys,它就立刻产生作用。例如下面这个例子: