aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2022-05-17 20:58:45 +0200
committerTeddy Wing2022-05-22 03:05:12 +0200
commit697cc59441eb5deed1e130a5be62f896185429d2 (patch)
tree9f4019dfc5ae7458dacdaa2f86751e2fc922f549
parent519e1aec593507476d366be57c46c8b2fa30d401 (diff)
downloaddotvim-697cc59441eb5deed1e130a5be62f896185429d2.tar.bz2
ftplugin/go.vim#s:GoDoc: Start at the top of the documentation
Previously, the cursor would be at the bottom or the loaded documentation. It's more practical to start at the beginning. Also remove the empty first line.
-rw-r--r--ftplugin/go.vim2
1 files changed, 2 insertions, 0 deletions
diff --git a/ftplugin/go.vim b/ftplugin/go.vim
index 0e0ca00..46c9e9b 100644
--- a/ftplugin/go.vim
+++ b/ftplugin/go.vim
@@ -61,6 +61,8 @@ function! s:GoDoc(search_term)
new
execute 'read !go doc -all ' . shellescape(search_term)
+ 1delete
+ 1
set readonly nomodified
setfiletype godoc
endfunction