[Dlang-internal] [Documentation] Add copyable text "import ..." under title
Andrey
saasecondbox at yandex.ru
Sat Feb 8 12:00:03 UTC 2020
Hello,
I have an idea. Let's add on all pages in documentation that
describe some importable entity (function, class, template...) in
place under the title a special <p></p> field with text: "import
..." and a button "Copy to clipboard" near that copies that text.
For example let's take the page
"https://dlang.org/library/std/uni/is_upper.html" for function
isUpper.
Under the title "Function std.uni.isUpper" we add <p></p> field
with text:
> import std.uni : isUpper;
and a button.
User will press that button, copy import instruction and after
that can paste it in his code.
I think this enchancement will be useful.
Imagine that you search in docs for some function/class/template
etc. To use it you must import it your code. What you will do? -
copy text in title "std.uni.isUpper". Then you will write word
"import" with space and paste in code, then remove last dot and
write " : ". Finally will write semicolon.
Press one button and after CTRL+V is better and faster from my
point of view.
What do you think?
More information about the Dlang-internal
mailing list