Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

長い autoload 関数・変数を短く定義できる手段が欲しい #1283

Open
tyru opened this issue Jul 3, 2019 · 1 comment
Open
Assignees

Comments

@tyru
Copy link
Member

tyru commented Jul 3, 2019

内容

以下のように長い変数名を短く定義できる手段がほしいです。

let g:very#long#long#name#var = 42
const g:very#long#long#name#CONST_VALUE = 'vim'

function! very#long#long#name#func()
    " ...
endfunction

実現方法

このように書きたいです。

autoload let var = 42
autoload const CONST_VALUE = 'vim'

function! func() autoload
    " ...
endfunction

その他

thinca [9:16 AM]
autoload 修飾子、直接 source した場合にどこをベースにすべきか決定できずに死亡しそう

tyru [9:19 AM]
あーなるほど。そのケースが…
ただ現状の autoload も prefix が違った場合にエラー出るので、prefix の情報は持ってるか取得してると思うんですよね。
それと合わせればまぁいいかなーと
@tyru
Copy link
Member Author

tyru commented Jul 3, 2019

@ichizok さんからの、こういう構文を用意するのはどうかとの提案。

ichizok [12:16 AM]
`#` -prefix で autoload にするのはどうか
```let #var = 42
const #VAL = "vim"
func #func()
  " ...
endfunc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant