Go有适合的Emacs模式吗?没有分号,C模式不起作用.我找到的最好的是Karl Landstrom的JavaScript模式,因为JavaScript也不需要分号.
最短的代码,按字符计数输出由以下ASCII三角形构成的Sierpinski三次N次迭代的ASCII表示:
/\
/__\
Run Code Online (Sandbox Code Playgroud)
输入是一个正数.
Input:
2
Output:
/\
/__\
/\ /\
/__\/__\
Run Code Online (Sandbox Code Playgroud)
Input:
3
Output:
/\
/__\
/\ /\
/__\/__\
/\ /\
/__\ /__\
/\ /\ /\ /\
/__\/__\/__\/__\
Run Code Online (Sandbox Code Playgroud)
Input:
5
Output:
/\
/__\
/\ /\
/__\/__\
/\ /\
/__\ /__\
/\ /\ /\ /\
/__\/__\/__\/__\
/\ /\
/__\ /__\
/\ /\ /\ /\
/__\/__\ /__\/__\
/\ /\ /\ /\
/__\ /__\ /__\ /__\
/\ /\ /\ /\ /\ /\ /\ /\
/__\/__\/__\/__\/__\/__\/__\/__\
/\ /\
/__\ /__\
/\ …Run Code Online (Sandbox Code Playgroud) 有人为go语言创建了一个vim语法文件吗?