Skip to content

Commit e7009f0

Browse files
committed
Change mapping gy to gl
1 parent 8a391b9 commit e7009f0

File tree

6 files changed

+29
-29
lines changed

6 files changed

+29
-29
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ Try `:help concealcursor` and `:help conceallevel` for details.
209209

210210
- `g:vim_markdown_follow_anchor`
211211

212-
This feature allows the `gy` command to follow named anchors in links of the form
212+
This feature allows the `gl` command to follow named anchors in links of the form
213213
`file#anchor` or just `#anchor`, where file may omit the `.md` extension as
214214
usual. Two variables control its operation:
215215

@@ -305,7 +305,7 @@ The following options control which syntax extensions will be turned on. They ar
305305

306306
- `g:vim_markdown_no_extensions_in_markdown`
307307

308-
If you want to have a link like this `[link text](link-url)` and follow it for editing in vim using the `gy` command, but have it open the file "link-url.md" instead of the file "link-url", then use this option:
308+
If you want to have a link like this `[link text](link-url)` and follow it for editing in vim using the `gl` command, but have it open the file "link-url.md" instead of the file "link-url", then use this option:
309309

310310
let g:vim_markdown_no_extensions_in_markdown = 1
311311

@@ -317,7 +317,7 @@ The following options control which syntax extensions will be turned on. They ar
317317

318318
- `g:vim_markdown_autowrite`
319319

320-
If you follow a link like this `[link text](link-url)` using the `gy` shortcut, this option will automatically save any edits you made before moving you:
320+
If you follow a link like this `[link text](link-url)` using the `gl` shortcut, this option will automatically save any edits you made before moving you:
321321

322322
let g:vim_markdown_autowrite = 1
323323

@@ -371,7 +371,7 @@ The following work on normal and visual modes:
371371

372372
Known limitation: does not work for links that span multiple lines.
373373

374-
- `gy`: open the link under the cursor in Vim for editing. Useful for relative markdown links. Falls back to `gf` with force editing, if not on a markdown link. `<Plug>Markdown_EditUrlUnderCursor`
374+
- `gl`: open the link under the cursor in Vim for editing. Useful for relative markdown links. Falls back to `gf` with force editing, if not on a markdown link. `<Plug>Markdown_EditUrlUnderCursor`
375375

376376
The rules for the cursor position are the same as the `gx` command.
377377

doc/vim-markdown.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ Follow named anchors ~
294294
*g:vim_markdown_follow_anchor*
295295
- 'g:vim_markdown_follow_anchor'
296296

297-
This feature allows the 'gy' command to follow named anchors in links of
297+
This feature allows the 'gl' command to follow named anchors in links of
298298
the form 'file#anchor' or just '#anchor', where file may omit the '.md'
299299
extension as usual. Two variables control its operation:
300300
>
@@ -420,7 +420,7 @@ Do not require .md extensions for Markdown links ~
420420
- 'g:vim_markdown_no_extensions_in_markdown'
421421

422422
If you want to have a link like this '[link text](link-url)' and follow it
423-
for editing in vim using the 'gy' command, but have it open the file "link-
423+
for editing in vim using the 'gl' command, but have it open the file "link-
424424
url.md" instead of the file "link-url", then use this option:
425425
>
426426
let g:vim_markdown_no_extensions_in_markdown = 1
@@ -438,7 +438,7 @@ Auto-write when following link ~
438438
*g:vim_markdown_autowrite*
439439
- 'g:vim_markdown_autowrite'
440440

441-
If you follow a link like this '[link text](link-url)' using the 'gy'
441+
If you follow a link like this '[link text](link-url)' using the 'gl'
442442
shortcut, this option will automatically save any edits you made before
443443
moving you:
444444
>
@@ -515,8 +515,8 @@ The following work on normal and visual modes:
515515
<
516516
Known limitation: does not work for links that span multiple lines.
517517

518-
*vim-markdown-gy*
519-
- 'gy': open the link under the cursor in Vim for editing. Useful for
518+
*vim-markdown-gl*
519+
- 'gl': open the link under the cursor in Vim for editing. Useful for
520520
relative markdown links. '<Plug>Markdown_EditUrlUnderCursor'
521521

522522
The rules for the cursor position are the same as the 'gx' command.

ftplugin/markdown.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ if !get(g:, 'vim_markdown_no_default_key_mappings', 0)
752752
call <sid>MapNotHasmapto(']u', 'Markdown_MoveToParentHeader')
753753
call <sid>MapNotHasmapto(']h', 'Markdown_MoveToCurHeader')
754754
call <sid>MapNotHasmapto('gx', 'Markdown_OpenUrlUnderCursor')
755-
call <sid>MapNotHasmapto('gy', 'Markdown_EditUrlUnderCursor')
755+
call <sid>MapNotHasmapto('gl', 'Markdown_EditUrlUnderCursor')
756756
endif
757757

758758
command! -buffer -range=% HeaderDecrease call s:HeaderDecrease(<line1>, <line2>)

test/gl_test.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
gl test

test/gy_test.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/map.vader

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -51,41 +51,41 @@ Execute (gx autolink):
5151
AssertEqual b:func(1, match(b:line, 'd') + 1), ''
5252

5353
Given markdown;
54-
[gy_test.md](gy_test.md)
54+
[gl_test.md](gl_test.md)
5555

56-
Execute (gy opens file):
57-
normal gy
58-
AssertEqual @%, 'gy_test.md'
59-
AssertEqual getline(1), 'gy test'
56+
Execute (gl opens file):
57+
normal gl
58+
AssertEqual @%, 'gl_test.md'
59+
AssertEqual getline(1), 'gl test'
6060

6161
Given markdown;
62-
[gy_test](gy_test)
62+
[gl_test](gl_test)
6363

64-
Execute (gy opens file without .md extensions):
64+
Execute (gl opens file without .md extensions):
6565
let g:vim_markdown_no_extensions_in_markdown = 1
66-
normal gy
67-
AssertEqual @%, 'gy_test.md'
68-
AssertEqual getline(1), 'gy test'
66+
normal gl
67+
AssertEqual @%, 'gl_test.md'
68+
AssertEqual getline(1), 'gl test'
6969
unlet g:vim_markdown_no_extensions_in_markdown
7070

7171
Given markdown;
72-
[gy_test.md](gy_test.md)
72+
[gl_test.md](gl_test.md)
7373

74-
Execute (gy does not write before opening file):
74+
Execute (gl does not write before opening file):
7575
normal ia
7676
normal l
77-
normal gy
78-
AssertEqual @%, 'gy_test.md'
79-
AssertEqual getline(1), 'gy test'
77+
normal gl
78+
AssertEqual @%, 'gl_test.md'
79+
AssertEqual getline(1), 'gl test'
8080

8181
Given markdown;
82-
[gy_test.md](gy_test.md)
82+
[gl_test.md](gl_test.md)
8383

84-
Execute (gy auto-write before opening file):
84+
Execute (gl auto-write before opening file):
8585
let g:vim_markdown_autowrite = 1
8686
normal ia
8787
normal l
88-
AssertThrows normal gy
88+
AssertThrows normal gl
8989
AssertEqual g:vader_exception, 'Vim(write):E382: Cannot write, ''buftype'' option is set'
9090
unlet g:vim_markdown_autowrite
9191

0 commit comments

Comments
 (0)