summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorryanss2015-02-15 15:14:09 -0500
committerryanss2015-02-15 15:14:09 -0500
commit49cb818fce8d46f4ede9f92c477756053e1639b6 (patch)
tree9a55c515649c4d7ef0f6f0bfd547c18a9f6f2384
parent65a20329dc6be08ce48dbbd51b176df0587efca5 (diff)
downloadvim-hn-49cb818fce8d46f4ede9f92c477756053e1639b6.tar.gz
Fix #10 Remap `gx` to use hackernews.link() function
The hackernews.link(external=True) function works better than the default `gx` functionality. By default, `gx` will sometimes not work on urls surrounded by brackets/braces/parenthesis, and will not work on urls spanning multiple lines. The hackernews.link() function does not have these issues.
-rw-r--r--ftplugin/hackernews.vim1
1 files changed, 1 insertions, 0 deletions
diff --git a/ftplugin/hackernews.vim b/ftplugin/hackernews.vim
index 023ac99..2c94832 100644
--- a/ftplugin/hackernews.vim
+++ b/ftplugin/hackernews.vim
@@ -37,5 +37,6 @@ execute "python hackernews.main()"
noremap <buffer> o :python hackernews.link()<cr>
noremap <buffer> O :python hackernews.link(external=True)<cr>
+noremap <buffer> gx :python hackernews.link(external=True)<cr>
noremap <buffer> u u:python hackernews.recall_pos()<cr>
noremap <buffer> <C-r> <C-r>:python hackernews.recall_pos()<cr>