• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisióncb50c26287e628f94a6c8c25e21e64e1c734ae7b (tree)
Tiempo2023-04-18 15:25:47
Autorbadcoff33 <none@none>
Commiterbadcoff33

Log Message

merged

Cambiar Resumen

Diferencia incremental

--- /dev/null
+++ b/autoload/utils.vim
@@ -0,0 +1,19 @@
1+vim9script
2+
3+export def TruncateString(str: string, max_len: number): string
4+ if len(str) > max_len
5+ return str[ : max_len - 1 ] .. ".."
6+ else
7+ return str
8+ endif
9+enddef
10+
11+export def TruncateList(lst: list<string>, max_len: number): list<string>
12+ var out = []
13+ for m in lst
14+ add(out, TruncateString(m, max_len))
15+ endfor
16+ return out
17+enddef
18+
19+