thinca / vim-ref Goto Github PK
View Code? Open in Web Editor NEWIntegrated reference viewer.
Integrated reference viewer.
as the title.
I would like to have the Lua reference available in vim-ref.
www.lua.org/manual/5.2/contents.html
There is a luarefvim plugin already, which is "Adapted from "Lua: 5.1 reference manual": https://github.com/vim-scripts/luarefvim/blob/master/doc/lua51refvim.txt
But this appears to be not maintained anymore, and I would like to have it available via vim-ref / Unite ref
anyway.
I am new to Lua, and do not really know what would be needed to get this into vim-ref also.
I could not find a program like pydoc
for Lua. There is luadoc
, but it appears to be meant only for generation from source files.
issuesが英語ばっかりだったので途中まで空気読んで英語で書いてしまったので無駄に日本語/英語両方で登録するテスト(なんて無駄な)。
The spoken language on this issues seems English.
So I started writing this issue in English...
but you(@thinca) are an Japanese!
I should have written this issue in only Japanese...
:help <Plug>(ref-open)
にはこう書いてあります。
ソースが見つからなかった場合は |K| を押したのと同じになります。
vim
な全てのバッファに対して:normal! K
と同じように振る舞う:normal! K
はg:ref_open
を考慮しないK
(実際は<Plug>(ref-open)
)はfiletypeがvim
な全てのバッファに対してこのように振る舞う途中間違ってたらすみません。
K
(<Plug>(ref-open)
)がg:ref_open
も考慮してくれるとうれしいです。
ただg:ref_open
が:vertical
とか:belowright
みたいな:split
に対するサブコマンドではなく、開くコマンドそのものなので難しいかもしれませんが...
From :help <Plug>(ref-open)
When the source that should be used is not
found, the same behavior as |K|.
normal! K
on any buffer whose filetype is vim
.:normal! K
doesn't respect g:ref_open
.K
(this is actually <Plug>(ref-open)
) on any buffer whose filetype is vim
does not respect g:ref_open
.Sorry if my deduction was wrong.
It would be great if K
(<Plug>(ref-open)
) respects g:ref_open
.
I know/guess it is difficult to implement this behavior,
because g:ref_open
is a command to open a buffer,
not subcommand for a command like :vertical
, :belowright
.
I use perlfind [1] instead of perldoc (ref_perldoc_cmd="perlfind") and it has a lot of similar logic to determine the mode/context, but it works in most cases without needing other options. For instance the new ref_perldoc_auto_append_f option is required to properly look up pragmas. Can you add an option to disable the mode test to so I can just have perlfind do this itself?
Let user can define context filetype.
E.g.
blabla
{{{python
import sys
print sys.version
}}}
Let user can define context filetype like this:
let g:Ref_context_filetypes['markdown'] = [
\ { 'filetype': 'python',
\ 'start': '{{{python', 'end': '}}}' }
\ ]
So that user can check out help with Python.
事ができるようになりませんか?
というのも、ウィキペディアを検索する為のソースを作っていたところ、
「複数の言語のwikipediaを使いたい」という欲が出てきて、いろいろ試行錯誤した結果
ref#wikipedia#define()
でソースのリストを返して、ref 側で1個ずつ登録してもらうのが
最もわかりやすいと思ったからです。
もしくは、他のやり方で一つのファイルから複数のソースを登録する方法があったりするのでしょうか?
If editing a vim file and a python file, opening help for vim file splits window for the help. Switching to the python. buffer and using ref to open help opens yet another split window for it's help so there are now 3 windows: the window with python, the vim help, and the ref window with the pydoc. I think it would make more sense for ref to use the same window as vim's help.
This change here has broken ref for me:
5a25164#diff-41bcadaad03c91619bb7496381524a94L50
Before the change (and now after reverting that changed line) 'K' would open perldoc in a new window, after the change vim goes back to its default behavior of looking for a manpage , even though map K
is still mapping to <Plug>(ref-keyword)
. I don't have any custom ref settings.
vim-ref is great, but a small problem .
the original vim support [count] K to select man page , such as 3K to execute man 3 .
but vim-ref doesn't support [count] K.
i know little about vim language or i can makes some fix.
cppman downloads, caches and provides a way to get "C++ 98/11/14 manual pages for Linux/MacOS, with source from cplusplus.com and cppreference.com". Since cppman
behaves like man
, the implementation should not be that different from the current man
support.
Note: cppman
provides an option to add C++ manuals to mandb
($ cppman -m true
), so another option could be to tell vim-ref
users to use that option, and then use the current man
support. In that case, some comments could be added to the doc.
とりあえず:Ref R ?corとかでcorのhelpが見れるようにしたです
https://github.com/kozo2/vim-ref/blob/master/autoload/ref/R.vim
I'm working on
For whatever reason, the pydoc -k .
command hangs on my system [1].
The vimproc process should have a timeout like 30-60 seconds therefore, via vimproc#system()
.
If possible, the timeout should only begin, if there is no more output from pydoc, and could be shorter then.
It also happens without using vimproc. In this case nothing could be done probably (there is no timeout feature available then, is it?)
1: https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/1280114
g:ref_phpmanual_path が expand されていないため、チルダを含むパスが使用できません。
Vim Script 的な事情には詳しくないのですが、 expand すると何か都合が悪いのでしょうか。
I wrote
let g:ref_open = 'vsplit'
in vimrc.
But K(<Plug>(ref-keyword)
) in normal mode opens a buffer horizontally.
WindowsXP strawberry perl 5.10
あるcpanモジュールをインストール後
:Ref -updatecache perldoc
としたが、表示されない。
The current behavior is to only expand the default directory:
if !exists('g:ref_cache_dir')
let g:ref_cache_dir = expand('~/.vim_ref_cache')
endif
But it should also call expand on the user-defined directory:
if !exists('g:ref_cache_dir')
let g:ref_cache_dir = '~/.vim_ref_cache'
endif
let g:ref_cache_dir = expand(g:ref_cache_dir)
This is the expected behavior in vim and other plugins.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.