profile
viewpoint

hikerpig/bespoke.js 6

DIY Presentation Micro-Framework

bestminr/fastblur 0

Fast (linear time) implementation of the Gaussian Blur algorithm in Rust

hikerpig/ae-to-json 0

will export an After Effects project as a JSON object

hikerpig/algorithm-visualizer 0

:fireworks:Interactive Online Platform that Visualizes Algorithms from Code

hikerpig/Alice 0

Alice - 写CSS的更好方案

hikerpig/amd-optimize 0

An AMD (RequireJS) optimizer that's stream-friendly. Made for gulp.

hikerpig/animate.css 0

Cross-browser CSS3 animations. Plug and play. Do a little dance.

hikerpig/atom 0

The hackable text editor :atom:

hikerpig/awesome-compilers 0

:sunglasses: A curated list of awesome resources on Compilers, Interpreters and Runtimes.

hikerpig/axios 0

Promise based HTTP client for the browser and node.js

startedliuchengxu/vim-clap

started time in 2 days

pull request commentSirVer/ultisnips

Feature: implement choices

@SirVer Sorry for the slow response, now I'm back from the holiday so I basically only have time in the weekend.

I've updated the code, including:

  1. Add those tests you mentioned.
  2. Tweak the text object implementation to fix the Mirror bug.
  3. Throw an error when using choices with $0.
  4. Fix code style issues, also add some comments.

Unfortunately I'm such a bad writer, so I need your help with the documentation, please 🆘.

hikerpig

comment created time in 4 days

push eventhikerpig/ultisnips

hikerpig

commit sha c3af8f2f492b22e7cb7231206620297dbb84e149

Throw error when adding choices to tabstop 0

view details

push time in 5 days

push eventhikerpig/ultisnips

hikerpig

commit sha 96161063abcab001a1614defc7f626eb4d7f2920

Add comments to clarify some of Choises' implementation

view details

hikerpig

commit sha 76bc8d0d5baa8203fca0c67d66b6eef70a6babd1

Fix mirror bug of Choices text object, add some test for it

view details

push time in 5 days

fork hikerpig/vim-polyglot

A solid language pack for Vim.

fork in 7 days

issue commentsheerun/vim-polyglot

ctags: cannot open option file "/root/.vim/bundle/vim-polyglot/ctags/typescript.ctags" : No such file or directory

@gaofei1982 @anthmarques Currently, you can add this line to your vimrc:

let g:typescript_use_builtin_tagbar_defs=0
gaofei1982

comment created time in 7 days

Pull request review commentSirVer/ultisnips

Feature: implement choices

+from test.vim_test_case import VimTestCase as _VimTest+from test.constant import *++class Choices_WillBeExpandedToInlineSelection(_VimTest):+    snippets = ("test", "${1|red,gray|}")+    keys = "test" + EX+    wanted = "1.red|2.gray"++class Choices_ExpectCorrectResult(_VimTest):+    snippets = ("test", "${1|red,gray|}")+    keys = "test" + EX + "2"+    wanted = "gray"+++class Choices_WillAbandonSelection_If_CharTyped(_VimTest):+    snippets = ("test", "${1|red,green|}")+    keys = "test" + EX + "char"+    wanted = "char"+++class Choices_WillAbandonSelection_If_InputIsGreaterThanMaxSelectionIndex(_VimTest):+    snippets = ("test", "${1|red,green|}")+    keys = "test" + EX + "3"+    wanted = "3"++class Choices_WilNotMessWithTabstopsAfterIt(_VimTest):+    snippets = ("test", "${1|red,gray|} is ${2:color}\nline 2")+    keys = "test" + EX + "2"+    wanted = "gray is color\nline 2"+++class Choices_MoreThan9Candidates_ShouldWaitForInputs(_VimTest):+    snippets = ("test", "${1|a,b,c,d,e,f,g,h,i,j,k,l,m,n|} is ${2:a char}")+    keys = "test" + EX + "1"+    wanted = "1 is a char"+++class Choices_EmptyChoiceWillBeDiscarded(_VimTest):+    snippets = ("test", "${1|a,,c|}")+    keys = "test" + EX+    wanted = "1.a|2.c"+++class Choices_WillNotExpand_If_ChoiceListIsEmpty(_VimTest):

I have a question and a problem with these tests.

  • Choices as zero tabstop: ${0|foo,blah|}, what is the expected behavior ? In my test, _update() is called, but _do_edit() is not.

    1. So with input test<tab>, the result is 1.foo|2.blah.
    2. So with input test<tab>1, the result is 1 .

    If that is correct , should the test named Choices_AsZeroTabstop_SelectionWillNotWork ? Emm, looks like a bug.

  • Mirror: ${1|foo,blah|} - $1 , with input test<tab>1, the result is foo -. Here I see there is indeed a bug, I will need some time to fix this.

hikerpig

comment created time in 10 days

push eventhikerpig/chinese-copywriting.vim

hikerpig

commit sha 41e68277d840a997aba95e28f31a55e04abd4ff0

Fix plugin load problem

view details

push time in 12 days

issue openedhikerpig/hikerpig.github.io

Awesome UltiSnips

http://hikerpig.github.io/2020/02/05/2020-02-05-Awesome-UltiSnips/

UltiSnips 不愧为 vim (或乃至所有编辑器)生态下的最佳代码片段解决方案。支持多种常见语法、snippet 添加和管理符合直觉(此处应 cue 一下隔壁对多行文本支持令人垂泪的 vscode)、还有眼花缭乱的 python 脚本插值供高级玩家使用。 UltiSnips 项目已有十年的历史

created time in 13 days

pull request commentSirVer/ultisnips

Feature: implement choices

  1. I tend to keep the syntax with precedent implementations, AFAIK, TextMate and vscode, the second one I use most of the time.
  2. Your comments are valuable, I will fix the style issues and add more explications in comments.
  3. I will try to add some documentation, but I'm very new at developing vim plugin and not very good at writing, this might take some time 🤔

Will start working on these on the weekend.

hikerpig

comment created time in 13 days

push eventhikerpig/chinese-copywriting.vim

hikerpig

commit sha dfc577b7a51dc0d99a4ad3ea581c47274e112327

vim_entry.py for vim, move `import vim` out of `__init__.py`

view details

hikerpig

commit sha b79ba9816d33dc1ce71351623912e315c4bce14b

feat: 针对 markdown 文件的一些特殊优化

view details

push time in 13 days

create barnchhikerpig/chinese-copywriting.vim

branch : master

created branch time in 15 days

created repositoryhikerpig/chinese-copywriting.vim

中文排版助手

created time in 15 days

issue commentcorvofeng/Vsnips

讨论一下 ultisnips parser 和 extends 功能

image 只有$2是因为第二个VISUAL里面是空的哈, 留不留VISUAL都是可以的.

如果我漏了啥纠正一下哈,但是 VISUAL 不是要替换成 $TM_SELECTED_TEXT 的么?

哦待会,其实这里还是不太对,应该得替换成 $TM_SELECTED_TEXT 吧...

hikerpig

comment created time in 15 days

issue commentcorvofeng/Vsnips

讨论一下 ultisnips parser 和 extends 功能

Web 版我倒是没有考虑过,但是应该也不难,因为我觉着 fs 模块肯定是要适配一下的,对多数插件应该都没有影响。

我们用的fs模块是node的fs模块, 在浏览器中是不能用的吧

可以的,web vscode 这里重新实现一个 runtime 就行,fs 的接口也就那么些,实际的持久化可能是 indexedDb 之类的。

hikerpig

comment created time in 15 days

issue commentcorvofeng/Vsnips

讨论一下 ultisnips parser 和 extends 功能

Web 版我倒是没有考虑过,但是应该也不难,因为我觉着 fs 模块肯定是要适配一下的,对多数插件应该都没有影响。

hikerpig

comment created time in 15 days

issue commentcorvofeng/Vsnips

讨论一下 ultisnips parser 和 extends 功能

那个 VISUAL 的测试用例,snippet body 有两个 tabstop 都是 VISUAL,然后原先的解析只出来了第一个,第二个就只有 $2 了,应该是不太对吧

hikerpig

comment created time in 15 days

startedliuchengxu/vista.vim

started time in 17 days

startedyuki-ycino/fzf-preview.vim

started time in 17 days

startedkeycastr/keycastr

started time in 17 days

issue commentsheerun/vim-polyglot

ctags: cannot open option file "/root/.vim/bundle/vim-polyglot/ctags/typescript.ctags" : No such file or directory

I think it has something to do with this in typescript.vim:

" In case you've updated/customized your ~/.ctags and prefer to use it.
if get(g:, 'typescript_use_builtin_tagbar_defs', 1)
  let g:tagbar_type_typescript.deffile = expand('<sfile>:p:h:h') . '/ctags/typescript.ctags'
endif

I think by default it shoult not be 1 ? Or is there a vim-polyglot/ctags/ directory that I should create ?

gaofei1982

comment created time in 17 days

release hikerpig/unisnips-web

v0.4.0

released time in 17 days

push eventhikerpig/unisnips-web

hikerpig

commit sha 4968fdc1519a6f6f552305ff570146dc2c19354e

feat: Add snippets source popover to AppHeader

view details

hikerpig

commit sha 581104fa0b76b2ce4d516783b2daf07abbe4204b

chore(release): 0.4.0

view details

push time in 17 days

created taghikerpig/unisnips-web

tagv0.4.0

A web app for unisnips project. Convert your ultisnips snippets to other platforms

created time in 17 days

issue closedhikerpig/unisnips

Add command 'sync'

Some targets' snippet file structure is quite different than ultisnips'.

For example, Sublime Text adopts the single-file-snippet solution.

So unisnips should be able to sync a '.snippet' to a directory of targets' snippet files.

And of course, glob search should be added, too.

Tentative

unisnips sync -t sublime -i path/to/typescript_*.snippets -o path/to/sublime/snippets/

Should save path/to/sublime/snippets/*.xml, filename can be snippet's trigger.

closed time in 18 days

hikerpig

push eventhikerpig/Vsnips

hikerpig

commit sha 5e24bc4de2eb6fed7407fdb776b079d4bae73e67

[lint] fix eslint error

view details

push time in 18 days

issue openedcorvofeng/Vsnips

讨论一下 ultisnips parser 和 extends 功能

目前的 snippet parse 基于正则 global search,实现 ultisnips 的一些语法解析稍微有点麻烦。比较容易的解析思路是:

  1. 先基于行查找,可以处理 extends/priority 等其他关键词
  2. 碰上行首 snippet , 开始进入 “snippet 文本解析”状态
  3. 碰上行首 endsnippet ,结束 “snippet 解析”状态,将读取到的完整 snippet 文本放入更细的 snippet body 解析函数中

不知道之后你有没有实现的思路,我在这里继续自荐一下 @unisnips/ultisnips ,基本按照 UltiSnips 用 ts 重写了一遍,基础 parsing 部分不会有什么分歧,可以去 demo 站试一下解析结果。然后 Vsnips 内相关的模板函数改写是在此之后的过程,不会受到影响。

这个是我目前在用的本地分支,包括两个新的 commit。

  1. parse 部分替换使用 @unisnips/ultisnips 进行,同时修复了之前 parse.spec.ts 里一个解析结果的错误
  2. 添加 extends 功能的支持

extends 功能

关于 extends 功能,也是一个想要探讨的点。

我目前在的实现方式是在 SnippetManager 里记录好继承关系,然后 getSnippets 的时候再不断向上查询和添加。这样主要是考虑到之后会在用户改变 .snippets 文件的时候重新解析并更新对应 language 的 Snippet。

假如继承链为 'a -> b -> c' ,箭头方向表示 b 继承 a 。那么在 a 语言文件有更新的时候,只需要更新 a 的记录,b 和 c 的记录不需要改变。

created time in 18 days

create barnchhikerpig/Vsnips

branch : demo_extends

created branch time in 18 days

create barnchhikerpig/Vsnips

branch : feature/unisnips

created branch time in 18 days

push eventhikerpig/unisnips-web

hikerpig

commit sha d3e44383bacc3fe85034b4907d1705ab86b99e57

feat: show definition flags

view details

hikerpig

commit sha f842f68670e0e582a44cc421c94199366b0318b1

fix: :arrow_up: upgrade @unisnips/* to 0.8.0 fix nested script code offset bug

view details

push time in 18 days

push eventhikerpig/unisnips

hikerpig

commit sha bcebb065c6ba52b4c2f552dc618a5753f1e1063e

feat: [ultisnips] Adjust `newStart` calculation during parsing nested tabstop, keep original position in snippet text

view details

hikerpig

commit sha 06831fa7f4de0b47d1c585913c1ce56aa63fac2f

chore(release): Publish

view details

push time in 18 days

created taghikerpig/unisnips

tagv0.8.0

Universal snippets, write once, use everywhere

created time in 18 days

push eventhikerpig/unisnips

hikerpig

commit sha 4c08771323873171d807bef0e215217742f6fde8

fix: [ultisnips] script block 'bodyPosition' line error

view details

hikerpig

commit sha c7b7670f2c9900814bcc954e4c1bfb3d7eca65b0

chore(release): Publish

view details

hikerpig

commit sha a1b1d6978ba801308f197a205a810862cec83ae3

Merge branch 'dev'

view details

hikerpig

commit sha af4aaf725a59ad671f6653fc0c381cedc7466ead

fix: [ultisnips] script block wrong 'bodyPosition.offset'

view details

hikerpig

commit sha b9a3d3afee8259f2a1200122df25280ed38ec238

chore(release): Publish

view details

push time in 18 days

created taghikerpig/unisnips

tagv0.7.3

Universal snippets, write once, use everywhere

created time in 18 days

push eventhikerpig/unisnips

hikerpig

commit sha 5e1ac849972a5fd7c9b38075339bf7f947b1330c

Update readme

view details

hikerpig

commit sha a1b1d6978ba801308f197a205a810862cec83ae3

Merge branch 'dev'

view details

hikerpig

commit sha af4aaf725a59ad671f6653fc0c381cedc7466ead

fix: [ultisnips] script block wrong 'bodyPosition.offset'

view details

hikerpig

commit sha b9a3d3afee8259f2a1200122df25280ed38ec238

chore(release): Publish

view details

push time in 18 days

pull request commentcorvofeng/Vsnips

Only display snippets only after adding.

不过我感觉这个事情可能也有点两难。 如果文件 c_*.snippets 很多的话,首次出现提示可能要很久,all.snippets 里的内容也得等着。

我觉得你的方案没错,现在我们保持一致性更重要。

以后如果有人再提,又有余力的话,可以考虑在 completion items 底下加一个提示项 'loading snippets, please keep typing' 之类的。

corvofeng

comment created time in 19 days

pull request commentcorvofeng/Vsnips

Only display snippets only after adding.

(๑•̀ㅂ•́)و✧ 👍

corvofeng

comment created time in 19 days

push eventhikerpig/unisnips

hikerpig

commit sha 5e1ac849972a5fd7c9b38075339bf7f947b1330c

Update readme

view details

push time in 19 days

push eventhikerpig/unisnips-web

hikerpig

commit sha b0d48a6d89e2f5f102cff70dffddc81a43f385df

fix: :arrow_up: upgrade @unisnips/* to 0.7.2 fix script code position bug

view details

push time in 20 days

created taghikerpig/unisnips

tagv0.7.2

Universal snippets, write once, use everywhere

created time in 20 days

push eventhikerpig/unisnips

hikerpig

commit sha a8f6e6b4767eed6736e52e7cd0d1121ce4aa67e4

fix: [ultisnips] script type detection should be correct in line's end

view details

hikerpig

commit sha 9a9c4cfd50fa2e6558ead0f60af9279b063d067c

chore(release): Publish

view details

hikerpig

commit sha 4c08771323873171d807bef0e215217742f6fde8

fix: [ultisnips] script block 'bodyPosition' line error

view details

hikerpig

commit sha c7b7670f2c9900814bcc954e4c1bfb3d7eca65b0

chore(release): Publish

view details

push time in 20 days

startedzealdocs/zeal

started time in 21 days

startedhonza/vim-snippets

started time in 21 days

push eventhikerpig/hikerpig.github.io

hikerpig

commit sha bf7b94cf141f1a9e9d0256238081b0ec5d884256

Update From Deployer

view details

push time in 21 days

startedasciinema/asciinema

started time in 22 days

startedqvacua/vimr

started time in 22 days

issue commentcorvofeng/Vsnips

[feature request] 考虑支持一下 vim script 的 `expand()`

把没有匹配的 script 保留下来,然后增加一些用户扩展函数的机制。

一些标准的vim函数, 一般提了issue我会考虑加的, 类似一些自定义的Python函数, 默认可以自己写js进行覆盖, 参见example/fun.js, 我推荐自己的snippet尽量使用Python函数.

明白。我们有 userscript 的话的确应该这么做,毕竟对 vim 标准函数支持可能没个尽头。

现在剩下稍微麻烦一点的地方就是同一个函数vim里python 写一遍然后这边 js 再实现一遍,可能之后可以写一个 FAQ 啥的放在 readme 里吧。现在甚至有点考虑去给 ultisnips 加一个 js script 的功能了。

目前这个 issue 可以关掉了,关于 jsFuncDecorator 的问题假如有眉目的话我会再提新的 issue。

hikerpig

comment created time in 22 days

issue closedcorvofeng/Vsnips

[feature request] 考虑支持一下 vim script 的 `expand()`

例如我在 generate.ts 文件里,想输入一个 log 语句 , console.log('[generate]', ),会这么写:

snippet cwfn "console with current filename"
console.log('[${1:`!v expand('%:r')`}]', $2)
endsnippet

vscode 里有 $TM_FILENAME 这个变量,不过 ultisnips 里并没有 builtin Variable 这一说,基本靠着 script 就能解决所有问题。

补充一下 expand 的说明

个人感觉 vim script 的 strtime 和 expand 应该都挺常用的。当然如果不好都实现的话,可以考虑下在 vimRewrite 里,把没有匹配的 script 保留下来,然后增加一些用户扩展函数的机制。

closed time in 22 days

hikerpig

issue commentcorvofeng/Vsnips

[feature request] 考虑支持一下 vim script 的 `expand()`

把没有匹配的 script 保留下来,然后增加一些用户扩展函数的机制。

一些标准的vim函数, 一般提了issue我会考虑加的, 类似一些自定义的Python函数, 默认可以自己写js进行覆盖, 参见example/fun.js, 我推荐自己的snippet尽量使用Python函数.

明白。我们有 userscript 的话的确应该这么做。我现在

hikerpig

comment created time in 22 days

push eventhikerpig/unisnips-web

hikerpig

commit sha 569f013cfa7624306c58cb9ccbc5d4159aec203d

fix: :arrow_up: upgrade @unisnips/* to fix script code detection bug

view details

push time in 22 days

release hikerpig/unisnips

v0.7.1

released time in 22 days

push eventhikerpig/unisnips

hikerpig

commit sha a8f6e6b4767eed6736e52e7cd0d1121ce4aa67e4

fix: [ultisnips] script type detection should be correct in line's end

view details

hikerpig

commit sha 9a9c4cfd50fa2e6558ead0f60af9279b063d067c

chore(release): Publish

view details

push time in 22 days

created taghikerpig/unisnips

tagv0.7.1

Universal snippets, write once, use everywhere

created time in 22 days

issue commentcorvofeng/Vsnips

[feature request] 考虑支持一下 vim script 的 `expand()`

昨天我的理解可能有点偏差,可能混淆了形参 param 和实参 arg ,'arg1' 这样被处理完的实参作为字符串的确应该是被引号包裹的。

我的直观感觉是,我们没有必要重新实现 vm 模块已经有了的功能,所以以下的这个方案也是我感觉可行而且合乎直觉的。

一种可能的解决方案是, 不处理参数, 将vsContext使用bind绑定至js_get_simple_box函数上, 再使用eval或是vm模块完成调用, 这种方案可以可以考虑接受



hikerpig

comment created time in 22 days

issue commentcorvofeng/Vsnips

[feature request] 考虑支持一下 vim script 的 `expand()`

我感觉 jsFuncDecorator 转写的方式似乎把事情变得复杂了。

例如 js_get_simple_box ["arg1", "arg2", "arg3"] 为什么不转为 js_get_simple_box(arg1, arg2, arg3) 呢?

实际脚本的调用可以使用 node.js 的 vm 模块

hikerpig

comment created time in 22 days

issue openedcorvofeng/Vsnips

建议: 升级一下 package-lock.json

似乎只停留在 version 0.1.0 ,理论上每次 npm i 都应该更新的才对。

目前的问题是,package-lock.json 里缺了一些 package.json 里有的依赖项。

之前我加过一些依赖,不过不敢直接跨了好多版本更新 package-lock.json,不知道你那边有什么别的考虑。麻烦你自己确认一下没什么问题更新一下。

created time in 23 days

push eventhikerpig/draggable

hikerpig

commit sha 8e17b6c0154f31931b143e42913f5e7d7ab86f8b

feat: Mirror option `createMirror`

view details

hikerpig

commit sha fa1e6d4a2d9d37ca055f78f2b7648ccbeacf3b72

chore(release): 1.1.0

view details

push time in 23 days

push eventhikerpig/draggable

hikerpig

commit sha 8e17b6c0154f31931b143e42913f5e7d7ab86f8b

feat: Mirror option `createMirror`

view details

hikerpig

commit sha fa1e6d4a2d9d37ca055f78f2b7648ccbeacf3b72

chore(release): 1.1.0

view details

push time in 23 days

created taghikerpig/draggable

tagv1.1.0

The JavaScript Drag & Drop library your grandparents warned you about.

created time in 23 days

create barnchhikerpig/draggable

branch : feature/mirror

created branch time in 23 days

push eventhikerpig/unisnips-web

hikerpig

commit sha 0f46ce956bb0d21d81450f04aca17cfec054bc11

chore(release): 0.3.0

view details

push time in 23 days

created taghikerpig/unisnips-web

tagv0.3.0

A web app for unisnips project. Convert your ultisnips snippets to other platforms

created time in 23 days

push eventhikerpig/unisnips-web

hikerpig

commit sha 5cf943ea17bab911858e58736832a5751fc933ac

feature/exportFiles: setup ExportDialog

view details

hikerpig

commit sha 3948d3d0b5ca289524f8e9b55299e72ac07828f9

feat: Get sync info from @unisnips , and download generated files in ExpoExportDialog

view details

hikerpig

commit sha 2cffe6bae384879803678a0a0c6a77c928ed3397

update page keywords

view details

push time in 23 days

push eventhikerpig/unisnips

hikerpig

commit sha 8a59fee544ab722550ae25cbf3fcd017721a439d

feat: :sparkles: Implement 'sync' command (#11) - change some packages exports and plugin structure

view details

hikerpig

commit sha feae407fdf39253cdd41b24c29f8a07eab6050bd

feat: Add 'flags' field to SnippetDefinition

view details

hikerpig

commit sha 3f4a2bc82abe7739c2c1d59c7a9a8473695d404e

chore(release): Publish

view details

hikerpig

commit sha 7983ea0178d16e5ffc0783b187026fca83d0dc7f

chore: update changelog

view details

hikerpig

commit sha af29aab2f1da2be2833747af8fbeda440877069d

Add missing file

view details

push time in 23 days

issue closedhikerpig/unisnips

An in-range update of @unisnips/ultisnips is breaking the build 🚨

The dependency @unisnips/ultisnips was updated from 0.7.0-alpha.0 to 0.7.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@unisnips/ultisnips is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

<details> <summary>Status Details</summary>

  • test (10.x): There are 1 failures, 0 warnings, and 0 notices. </details>

<details> <summary>FAQ and help</summary>

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper. </details>


Your Greenkeeper Bot :palm_tree:

closed time in 23 days

greenkeeper[bot]

issue closedhikerpig/unisnips

An in-range update of @unisnips/vscode is breaking the build 🚨

The dependency @unisnips/vscode was updated from 0.7.0-alpha.0 to 0.7.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@unisnips/vscode is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

<details> <summary>Status Details</summary>

  • test (10.x): There are 1 failures, 0 warnings, and 0 notices. </details>

<details> <summary>FAQ and help</summary>

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper. </details>


Your Greenkeeper Bot :palm_tree:

closed time in 23 days

greenkeeper[bot]

issue closedhikerpig/unisnips

An in-range update of @unisnips/jetbrains is breaking the build 🚨

The dependency @unisnips/jetbrains was updated from 0.7.0-alpha.0 to 0.7.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@unisnips/jetbrains is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

<details> <summary>Status Details</summary>

  • test (10.x): There are 1 failures, 0 warnings, and 0 notices. </details>

<details> <summary>FAQ and help</summary>

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper. </details>


Your Greenkeeper Bot :palm_tree:

closed time in 23 days

greenkeeper[bot]

issue closedhikerpig/unisnips

An in-range update of @unisnips/atom is breaking the build 🚨

The dependency @unisnips/atom was updated from 0.7.0-alpha.0 to 0.7.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@unisnips/atom is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

<details> <summary>Status Details</summary>

  • test (10.x): There are 1 failures, 0 warnings, and 0 notices. </details>

<details> <summary>FAQ and help</summary>

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper. </details>


Your Greenkeeper Bot :palm_tree:

closed time in 23 days

greenkeeper[bot]

issue closedhikerpig/unisnips

An in-range update of @unisnips/sublime is breaking the build 🚨

The dependency @unisnips/sublime was updated from 0.7.0-alpha.0 to 0.7.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@unisnips/sublime is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

<details> <summary>Status Details</summary>

  • test (10.x): There are 1 failures, 0 warnings, and 0 notices. </details>

<details> <summary>FAQ and help</summary>

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper. </details>


Your Greenkeeper Bot :palm_tree:

closed time in 23 days

greenkeeper[bot]

push eventhikerpig/unisnips

hikerpig

commit sha af29aab2f1da2be2833747af8fbeda440877069d

Add missing file

view details

push time in 23 days

push eventhikerpig/unisnips

hikerpig

commit sha 7983ea0178d16e5ffc0783b187026fca83d0dc7f

chore: update changelog

view details

push time in 23 days

push eventhikerpig/unisnips

hikerpig

commit sha 8a59fee544ab722550ae25cbf3fcd017721a439d

feat: :sparkles: Implement 'sync' command (#11) - change some packages exports and plugin structure

view details

hikerpig

commit sha feae407fdf39253cdd41b24c29f8a07eab6050bd

feat: Add 'flags' field to SnippetDefinition

view details

hikerpig

commit sha 3f4a2bc82abe7739c2c1d59c7a9a8473695d404e

chore(release): Publish

view details

push time in 23 days

created taghikerpig/unisnips

tagv0.7.0

Universal snippets, write once, use everywhere

created time in 23 days

PR opened SirVer/ultisnips

Feature: implement choices

A sketchy implementation of Choices , releated #1166

+228 -1

0 comment

7 changed files

pr created time in a month

delete branch hikerpig/ultisnips

delete branch : feature_choices

delete time in a month

create barnchhikerpig/ultisnips

branch : feature/choices

created branch time in a month

issue openedhikerpig/unisnips

Add command 'sync'

Some targets' snippet file structure is quite different than ultisnips'.

For example, Sublime Text adopts the single-file-snippet solution.

So unisnips should be able to sync a '.snippet' to a directory of targets' snippet files.

And of course, glob search should be added, too.

Tentative

unisnips sync -t sublime -i path/to/typescript_*.snippets -o path/to/sublime/snippets/

Should save path/to/sublime/snippets/*.xml, filename can be snippet's trigger.

created time in a month

delete branch hikerpig/Vsnips

delete branch : feature/unisnips

delete time in a month

push eventhikerpig/Vsnips

hikerpig

commit sha 71924dbf729c1cab0b76c76b1ea4a50902d8e287

[eslint] fix eslint errors due to last commet

view details

push time in a month

create barnchhikerpig/Vsnips

branch : feature/filetypes

created branch time in a month

push eventhikerpig/unisnips-web

hikerpig

commit sha 27a939f6b293cd5fa4852335daf4473fcaa7db03

feat: :arrow_up: Update to @unisnips/* 0.7.0-alpha.0

view details

push time in a month

issue closedhikerpig/unisnips

Parsing and handling priority

See UltiSnips's doc

A line beginning with the keyword 'priority' sets the priority for all snippets defined in the current file after this line. The default priority for a file is always 0. When a snippet should be expanded, UltiSnips will collect all snippet definitions from all sources that match the trigger and keep only the ones with the highest priority. For example, all shipped snippets have a priority < 0, so that user defined snippets always overwrite shipped snippets.

closed time in a month

hikerpig

release hikerpig/unisnips

v0.7.0-alpha.0

released time in a month

push eventhikerpig/unisnips

hikerpig

commit sha 901f7320e4405b332d9318c53e7cc08136da807a

feat: Strip redundant ultisnips snippets by priority #10

view details

hikerpig

commit sha 1af745b39fe9df186d13514df5799c3f529be8a6

chore(release): Publish

view details

hikerpig

commit sha fe079395d347a2fd02481dd18c1e08c818899f88

chore: update changelog

view details

push time in a month

push eventhikerpig/unisnips

hikerpig

commit sha fe079395d347a2fd02481dd18c1e08c818899f88

chore: update changelog

view details

push time in a month

created taghikerpig/unisnips

tagv0.7.0-alpha.0

Universal snippets, write once, use everywhere

created time in a month

push eventhikerpig/unisnips

greenkeeper[bot]

commit sha f91a2bf91dc22bb34bfc97c467f3f064205a25cf

chore(package): update ts-jest to version 25.1.0

view details

greenkeeper[bot]

commit sha b83803047898234fb05f2f7fcb550b4b5221e176

chore(package): update lockfile yarn.lock

view details

hikerpig

commit sha e53f0b68abf0b1e130fcccebdcef803d1eaa9e35

Update ts-jest to the latest version 🚀 (#9) Update ts-jest to the latest version 🚀

view details

hikerpig

commit sha 901f7320e4405b332d9318c53e7cc08136da807a

feat: Strip redundant ultisnips snippets by priority #10

view details

hikerpig

commit sha 1af745b39fe9df186d13514df5799c3f529be8a6

chore(release): Publish

view details

push time in a month

delete branch hikerpig/unisnips

delete branch : greenkeeper/ts-jest-25.1.0

delete time in a month

push eventhikerpig/unisnips

greenkeeper[bot]

commit sha f91a2bf91dc22bb34bfc97c467f3f064205a25cf

chore(package): update ts-jest to version 25.1.0

view details

greenkeeper[bot]

commit sha b83803047898234fb05f2f7fcb550b4b5221e176

chore(package): update lockfile yarn.lock

view details

hikerpig

commit sha e53f0b68abf0b1e130fcccebdcef803d1eaa9e35

Update ts-jest to the latest version 🚀 (#9) Update ts-jest to the latest version 🚀

view details

push time in a month

PR merged hikerpig/unisnips

Update ts-jest to the latest version 🚀 greenkeeper

The devDependency ts-jest was updated from 24.3.0 to 25.1.0.

This version is not covered by your current version range.

If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.


Publisher: kul License: MIT

Find out more about this release.


<details> <summary>FAQ and help</summary>

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper. </details>


Your Greenkeeper bot :palm_tree:

+10 -5

0 comment

2 changed files

greenkeeper[bot]

pr closed time in a month

issue openedcorvofeng/Vsnips

优化 SnippetManager 根据 filetype 查找 .snippet 文件的逻辑

UltiSnips 文档里关于 How snippets are loaded 的部分

Using a strategy similar to how Vim detects |ftplugins|, UltiSnips iterates over the snippet definition directories looking for files with names of the following patterns: ft.snippets, ft_.snippets, or ft/, where "ft" is the 'filetype' of the current document and "*" is a shell-like wildcard matching any string including the empty string. The following table shows some typical snippet filenames and their associated filetype.

snippet filename         filetype ~
ruby.snippets            ruby
perl.snippets            perl
c.snippets               c
c_my.snippets            c
c/a                      c
c/b.snippets             c
all.snippets             all
all/a.snippets           all

准备实现一下。

created time in a month

issue openedhikerpig/unisnips

Parsing and handling priority

See UltiSnips's doc

A line beginning with the keyword 'priority' sets the priority for all snippets defined in the current file after this line. The default priority for a file is always 0. When a snippet should be expanded, UltiSnips will collect all snippet definitions from all sources that match the trigger and keep only the ones with the highest priority. For example, all shipped snippets have a priority < 0, so that user defined snippets always overwrite shipped snippets.

created time in a month

push eventhikerpig/ultisnips

hikerpig

commit sha b6ed3a468f5b33c9c04ac0be1d76410950117294

Choices text object inherits TabStop

view details

hikerpig

commit sha 9351b3eadf3a497816b230f162be83f13775dae1

Choices inline completion now supports more than 9 candidates

view details

push time in a month

issue commentSirVer/ultisnips

[Feature-request] Implement choices

I've tried calling vim's 'inputlist()', but found it too heavy for this completion, forcing user to another buffer while inputting is kind of annoying.

I would like this choice list to be a suggestion instead of compulsory selection.

I improved the inline selection solution a little bit, and I think this is enough for me.

2020-01-30 17 41 21的副本

As for exposing hooks, I'm afraid it's beyond my ability, since it requires more knowledge on ultisnips and vim script. If current solution looks good to you, I would like to create a PR and add some tests for it.

hikerpig

comment created time in a month

issue closedcorvofeng/Vsnips

completion provider 补全列表生成的一些改进

我觉得现在的触发形式有一些问题:

  1. 只有输入 V/v 的时候才会触发 completion provider

  2. provideCompletionItems 里把所有该文件类型支持的 snippets 都返了出去,并没有根据当前输入单词(暂且称为 contextWord)做过滤,虽说 vscode 会 根据 label 排序,但总归是生成了一些可能用不到的 completion item,有一些额外的开销。

  3. provideCompletionItems 里调用 get_snip_body 会有一些开销,在实际选择展开该 snippet 之前做似乎有点浪费

觉得可以改进的方向:

  1. 输入任何字符都可以触发 completion provider

  2. provideCompletionItems 中根据当前 position 上的 contextWord 做过滤

  3. 原先的 V trigger 功能可以改为一个单独的 command 'Vsnips.show_available_snippets',列出所有 completion items

  4. provideCompletionItems 中构建 completion item 时提供 detail/documentation, 将 insertText 改为 command。 当用户选择此 item 时触发 command , 此时才进行具体的展开和替换。

  5. all.snippets 文件可以单独注册一个 provider。或者可以总体只注册一个 { scheme: "file" } 的 provider 。即便是这样原先 snippet 文件的分类延迟解析也可以实现,可以单独抽象一个 SnippetManager 之类的,代替原先的 has_repush

部分改进的实现(1,2,4)在 我目前的 dev 分支 上有。如果觉得 ok 的话我可以把代码整理一下然后再加上 3 和 5。

closed time in a month

hikerpig

pull request commentstefanjudis/tiny-helpers

Add unisnips

I just noticed threre was a similar snippet-generator in misc and so I thought this would also be OK.

But I totally get your concern, nice project, have fun.

hikerpig

comment created time in a month

issue commentSirVer/ultisnips

[Feature-request] Implement choices

I've implemented a text-based inline selection, don't require vim's new fancy features.

I think the term 'popup' in vim is releated to gui interface, like the nav menu or some contextmenu when you clicked right mouse button, and before vim 8.2's floating window, there is no easy way of customizing a popup menu. Correct me if I'm mistaken.

Anyway, current implementation looks like this:

2020-01-28 22 31 57

But I think altering text while inputting is kind of hacky and error prone (myself failed to find an elegant way to do this 😢).

Also considering create a readonly scratch buffer for selection (like Denite?), would that be to costly?

hikerpig

comment created time in a month

push eventhikerpig/ultisnips

hikerpig

commit sha 19d08bd633fa2bd5881e88faee2b52f7ed3e5a64

Add a text-based inline index selection for choices

view details

push time in a month

issue commentSirVer/ultisnips

[Feature-request] Implement choices

I have added the parsing and setup Choices text object. here are the commits

But still don't have a clue about integrating selection UI with ultisnips text object evaluation.

I tried what @lacygoill mentioned, vim native complete(), but it seems to be interrupted by ultisnips evaluation, the completion dropdown just flash out.

2020-01-27 21 32 35

I am considering using quickfix window for selection UI. Is it a bad idea ?

hikerpig

comment created time in a month

more