可能重复:
如何在Vim中插入光标而不进入插入模式的换行符?
在vim中,J将下一行连接到当前行.是否有类似的一键(或相对较短)命令在给定的光标位置分割一条线?我知道它是用一个简单的宏完成的,但似乎如果J-command存在,那么应该有一个类似的函数.我试过寻找它,但似乎无法找到答案.
我已经阅读了一些关于生成tagcloud权重的对数分布的正确方法的教程.他们中的大多数将标签分组为步骤.这对我来说似乎有些愚蠢,所以我根据我读过的内容开发了自己的算法,以便沿着阈值和最大值之间的logarthmic曲线动态分配标签的计数.这是python中的本质:
from math import log
count = [1, 3, 5, 4, 7, 5, 10, 6]
def logdist(count, threshold=0, maxsize=1.75, minsize=.75):
countdist = []
# mincount is either the threshold or the minimum if it's over the threshold
mincount = threshold<min(count) and min(count) or threshold
maxcount = max(count)
spread = maxcount - mincount
# the slope of the line (rise over run) between (mincount, minsize) and ( maxcount, maxsize)
delta = (maxsize - minsize) / float(spread)
for c in count:
logcount …Run Code Online (Sandbox Code Playgroud)