diff --git a/README.md b/README.md index 23e12be1..47162d59 100644 --- a/README.md +++ b/README.md @@ -209,7 +209,7 @@ Try `:help concealcursor` and `:help conceallevel` for details. - `g:vim_markdown_follow_anchor` - This feature allows the `ge` command to follow named anchors in links of the form + This feature allows the `gl` command to follow named anchors in links of the form `file#anchor` or just `#anchor`, where file may omit the `.md` extension as usual. Two variables control its operation: @@ -305,7 +305,7 @@ The following options control which syntax extensions will be turned on. They ar - `g:vim_markdown_no_extensions_in_markdown` - If you want to have a link like this `[link text](link-url)` and follow it for editing in vim using the `ge` command, but have it open the file "link-url.md" instead of the file "link-url", then use this option: + 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: let g:vim_markdown_no_extensions_in_markdown = 1 @@ -317,7 +317,7 @@ The following options control which syntax extensions will be turned on. They ar - `g:vim_markdown_autowrite` - If you follow a link like this `[link text](link-url)` using the `ge` shortcut, this option will automatically save any edits you made before moving you: + 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: let g:vim_markdown_autowrite = 1 @@ -371,7 +371,7 @@ The following work on normal and visual modes: Known limitation: does not work for links that span multiple lines. -- `ge`: 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. `Markdown_EditUrlUnderCursor` +- `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. `Markdown_EditUrlUnderCursor` The rules for the cursor position are the same as the `gx` command. diff --git a/doc/vim-markdown.txt b/doc/vim-markdown.txt index 438a23dd..95b8911a 100644 --- a/doc/vim-markdown.txt +++ b/doc/vim-markdown.txt @@ -294,7 +294,7 @@ Follow named anchors ~ *g:vim_markdown_follow_anchor* - 'g:vim_markdown_follow_anchor' - This feature allows the 'ge' command to follow named anchors in links of + This feature allows the 'gl' command to follow named anchors in links of the form 'file#anchor' or just '#anchor', where file may omit the '.md' extension as usual. Two variables control its operation: > @@ -420,7 +420,7 @@ Do not require .md extensions for Markdown links ~ - 'g:vim_markdown_no_extensions_in_markdown' If you want to have a link like this '[link text](link-url)' and follow it - for editing in vim using the 'ge' command, but have it open the file "link- + 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: > let g:vim_markdown_no_extensions_in_markdown = 1 @@ -438,7 +438,7 @@ Auto-write when following link ~ *g:vim_markdown_autowrite* - 'g:vim_markdown_autowrite' - If you follow a link like this '[link text](link-url)' using the 'ge' + 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: > @@ -515,8 +515,8 @@ The following work on normal and visual modes: < Known limitation: does not work for links that span multiple lines. - *vim-markdown-ge* -- 'ge': open the link under the cursor in Vim for editing. Useful for + *vim-markdown-gl* +- 'gl': open the link under the cursor in Vim for editing. Useful for relative markdown links. 'Markdown_EditUrlUnderCursor' The rules for the cursor position are the same as the 'gx' command. diff --git a/ftplugin/markdown.vim b/ftplugin/markdown.vim index 5e402269..d94b00e2 100644 --- a/ftplugin/markdown.vim +++ b/ftplugin/markdown.vim @@ -752,7 +752,7 @@ if !get(g:, 'vim_markdown_no_default_key_mappings', 0) call MapNotHasmapto(']u', 'Markdown_MoveToParentHeader') call MapNotHasmapto(']h', 'Markdown_MoveToCurHeader') call MapNotHasmapto('gx', 'Markdown_OpenUrlUnderCursor') - call MapNotHasmapto('ge', 'Markdown_EditUrlUnderCursor') + call MapNotHasmapto('gl', 'Markdown_EditUrlUnderCursor') endif command! -buffer -range=% HeaderDecrease call s:HeaderDecrease(, ) diff --git a/test/ge_test.md b/test/ge_test.md deleted file mode 100644 index 0f5e1002..00000000 --- a/test/ge_test.md +++ /dev/null @@ -1 +0,0 @@ -ge test diff --git a/test/gl_test.md b/test/gl_test.md new file mode 100644 index 00000000..93a54b8b --- /dev/null +++ b/test/gl_test.md @@ -0,0 +1 @@ +gl test diff --git a/test/map.vader b/test/map.vader index 57fe6190..dd335280 100644 --- a/test/map.vader +++ b/test/map.vader @@ -51,41 +51,41 @@ Execute (gx autolink): AssertEqual b:func(1, match(b:line, 'd') + 1), '' Given markdown; -[ge_test.md](ge_test.md) +[gl_test.md](gl_test.md) -Execute (ge opens file): - normal ge - AssertEqual @%, 'ge_test.md' - AssertEqual getline(1), 'ge test' +Execute (gl opens file): + normal gl + AssertEqual @%, 'gl_test.md' + AssertEqual getline(1), 'gl test' Given markdown; -[ge_test](ge_test) +[gl_test](gl_test) -Execute (ge opens file without .md extensions): +Execute (gl opens file without .md extensions): let g:vim_markdown_no_extensions_in_markdown = 1 - normal ge - AssertEqual @%, 'ge_test.md' - AssertEqual getline(1), 'ge test' + normal gl + AssertEqual @%, 'gl_test.md' + AssertEqual getline(1), 'gl test' unlet g:vim_markdown_no_extensions_in_markdown Given markdown; -[ge_test.md](ge_test.md) +[gl_test.md](gl_test.md) -Execute (ge does not write before opening file): +Execute (gl does not write before opening file): normal ia normal l - normal ge - AssertEqual @%, 'ge_test.md' - AssertEqual getline(1), 'ge test' + normal gl + AssertEqual @%, 'gl_test.md' + AssertEqual getline(1), 'gl test' Given markdown; -[ge_test.md](ge_test.md) +[gl_test.md](gl_test.md) -Execute (ge auto-write before opening file): +Execute (gl auto-write before opening file): let g:vim_markdown_autowrite = 1 normal ia normal l - AssertThrows normal ge + AssertThrows normal gl AssertEqual g:vader_exception, 'Vim(write):E382: Cannot write, ''buftype'' option is set' unlet g:vim_markdown_autowrite