summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorryanss2015-02-25 16:01:30 -0500
committerryanss2015-02-25 16:01:30 -0500
commit913bcee1d7f35389fa851e6e6d51ad6462ffdecd (patch)
treef6d2a5d27b2fdfe95c5dca6f3c0c0fa5da83fe12
parent64a5492992e0480b017b6c299dab380b45398e46 (diff)
downloadvim-hn-913bcee1d7f35389fa851e6e6d51ad6462ffdecd.tar.gz
Save cursor position when using back/forward commands
-rw-r--r--ftplugin/hackernews.vim8
1 files changed, 6 insertions, 2 deletions
diff --git a/ftplugin/hackernews.vim b/ftplugin/hackernews.vim
index 7b0bed4..c64b5d2 100644
--- a/ftplugin/hackernews.vim
+++ b/ftplugin/hackernews.vim
@@ -42,8 +42,12 @@ 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>
+noremap <buffer> u :Python hackernews.save_pos()<cr>
+ \u
+ \:Python hackernews.recall_pos()<cr>
+noremap <buffer> <C-r> :Python hackernews.save_pos()<cr>
+ \<C-r>
+ \:Python hackernews.recall_pos()<cr>
" Helper motions to browse front page, comments and articles easier