File: reformat.vader

package info (click to toggle)
vim-link-vim 2.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 524 kB
  • sloc: python: 66; makefile: 30
file content (157 lines) | stat: -rw-r--r-- 5,249 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
" Calling functions is required here; the commands are unknown because of the
" gitcommit resource

Before:
  unlet! g:link_start_index
  unlet! g:link_heading
  unlet! b:link_heading
  unlet! b:link_heading_before
  unlet! b:link_skip_line
After:
  unlet! g:link_start_index
  unlet! g:link_heading
  unlet! b:link_heading
  unlet! b:link_heading_before
  unlet! b:link_skip_line

~~~ 1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Given gitcommit:
  Update README.md with project documentation links

  This commit updates the README.md file to include links to various project
  documentation resources. The documentation includes:

  2. API Documentation: [1]
  3. User Guide: [2] and Developer Documentation

  Each link provides access to specific documentation sections relevant to
  different stakeholders involved in the project. This update ensures that
  stakeholders can easily access the necessary documentation directly from the
  project's README file.

  Links:

  [0]: https://github.com/example/project/wiki
  [1]: https://api.example.com/docs
  [2]: https://docs.example.com/user-guide
  [3]: https://docs.example.com/developer-guide

  # Please enter the commit message for your changes. Lines starting
  # with '#' will be ignored, and an empty message aborts the commit.
  #
  # On branch main
  # Changes to be committed:
  #	modified:   README.md
  #
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Execute (Delete two links, [0] and [3]):
  let g:link_start_index = 10
  let b:link_heading = 'Links:'
  let b:link_heading_before = '^# Please enter the commit message'
  let b:link_skip_line = '^>'
  LinkReformat
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expect gitcommit:
  Update README.md with project documentation links

  This commit updates the README.md file to include links to various project
  documentation resources. The documentation includes:

  2. API Documentation: [10]
  3. User Guide: [11] and Developer Documentation

  Each link provides access to specific documentation sections relevant to
  different stakeholders involved in the project. This update ensures that
  stakeholders can easily access the necessary documentation directly from the
  project's README file.

  Links:

  [10]: https://api.example.com/docs
  [11]: https://docs.example.com/user-guide

  # Please enter the commit message for your changes. Lines starting
  # with '#' will be ignored, and an empty message aborts the commit.
  #
  # On branch main
  # Changes to be committed:
  #	modified:   README.md
  #
~~~ 2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Given gitcommit:
  Update README.md with project documentation links

  > This line should remain untouched: [3]

  This commit updates the README.md file [7] to include links to various project
  documentation resources. The documentation includes:

  2. API Documentation: [1] Make sure to consult the documentation [55]!
  3. User Guide: [2] and Developer Documentation

  Each link provides access to specific documentation sections relevant to
  different stakeholders involved in the project. This update ensures that
  stakeholders can easily access the necessary documentation [5] directly from
  the project's README file [8].

  Links:

  [5]: https://api.example.com/docs
  [0]: https://github.com/example/project/wiki
  [7]: https://github.com/help/readme
  [1]: https://api.example.com/docs
  [2]: https://docs.example.com/user-guide
  [8]: https://github.com/help/readme
  [3]: https://docs.example.com/developer-guide
  [55]: https://api.example.com/docs

  # Please enter the commit message for your changes. Lines starting
  # with '#' will be ignored, and an empty message aborts the commit.
  #
  # On branch main
  # Changes to be committed:
  #	modified:   README.md
  #
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Execute (Merge links; do not move cursor):
  call cursor(5, 6)
  let b:link_heading = 'Links:'
  let b:link_heading_before = '^# Please enter the commit message'
  let b:link_skip_line = '^>'
  LinkReformat
  let [line_nr, col_nr] = getcurpos()[1:2]
  AssertEqual line_nr, 5
  AssertEqual col_nr, 6
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expect gitcommit:
  Update README.md with project documentation links

  > This line should remain untouched: [3]

  This commit updates the README.md file [0] to include links to various project
  documentation resources. The documentation includes:

  2. API Documentation: [1] Make sure to consult the documentation [1]!
  3. User Guide: [2] and Developer Documentation

  Each link provides access to specific documentation sections relevant to
  different stakeholders involved in the project. This update ensures that
  stakeholders can easily access the necessary documentation [1] directly from
  the project's README file [0].

  Links:

  [0]: https://github.com/help/readme
  [1]: https://api.example.com/docs
  [2]: https://docs.example.com/user-guide

  # Please enter the commit message for your changes. Lines starting
  # with '#' will be ignored, and an empty message aborts the commit.
  #
  # On branch main
  # Changes to be committed:
  #	modified:   README.md
  #
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~