vim-jp / vim-jp/vital.vim

Unite how to write example

Open
#121 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Vim Script
Stars
587
Forks
64
Avg merge
2d 8h
Merged PRs (30d)
1

Description

現状では help での example の記述方法が統一されていないので、仕様を決めてほしい。
今はこんな感じのがあります。

  • 結果の表示方法
    • echo で結果を書く
    • コメントで書く
    • == で書く
  • 関数の呼び出し方法
    • 関数
    • どこかで代入したと思われる変数.関数
    • モジュール名.関数

今は以下のような記述方法があります。

echo で実行結果を書く
        :echo String.replace("fooba.bazbar", "ba.", "zzz")
        foozzzbazbar
実行例+コメントで結果
        build_line_from_query_with_placeholders(
         \ 'SELECT * FROM cities WHERE name = ?;',
         \ ['Vancouver'])
        "=> 'SELECT * FROM cities WHERE name = "Vancouver";'
==
        dstring(123) == 123
        dstring('abc') == '"abc"'
        dstring("abc") == '"abc"'
vital#of から + echo
                Examples: >
                :let g:V = vital#of('vital')
                :echo g:V.is_number(123)
<                1 >
                :echo g:V.is_number(1.23)
<                0 >
                :echo g:V.is_number("hoge")
<                0
vital#of から + コメント
        let B = V.import('Vim.Buffer')
        echo B.is_cmdwin() " 1 if you are in command-line-window.
  • vital-bitwise.txt
  • vital-data-base64.txt
  • vital-data-collection.txt
  • vital-data-dict.txt
  • vital-data-lazylist.txt
  • vital-data-list.txt
  • vital-data-ordered_set.txt
  • vital-data-string.txt
  • vital-data-tree.txt
  • vital-database-sqlite.txt
  • vital-date_time.txt
  • vital-experimental-functor.txt
  • vital-locale-message.txt
  • vital-mapping.txt
  • vital-math.txt
  • vital-option_parser.txt
  • vital-prelude.txt
  • vital-process.txt
  • vital-process_manager.txt
  • vital-random-xor128.txt
  • vital-system-cache.txt
  • vital-system-file.txt (#126 待ち)
  • vital-system-filepath.txt
  • vital-text-csv.txt
  • vital-text-lexer.txt
  • vital-text-ltsv.txt
  • vital-text-parser.txt
  • vital-vim-buffer.txt
  • vital-vim-buffer_manager.txt
  • vital-vim-compat.txt
  • vital-vim-message.txt
  • vital-web-html.txt
  • vital-web-http.txt
  • vital-web-json.txt
  • vital-web-xml.txt
  • vital.txt
  • vitalizer.txt

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Compare the example styles shown in issue #121 with the checked and unchecked vital-*.txt files, including vital-data-list.txt and vital-data-string.txt. First identify the conventions already used across the listed help files, then agree on a single format and update the examples consistently. Done means the format is documented and the listed files no longer use conflicting example styles.

Written by the indexing model from the issue text.

Assessment

Tech stack
vim
Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.