Skip to content
Browse files

get the helptag from beneath the cursor

  • Loading branch information...
1 parent 91c0484 commit 811db7aae3656928669fa486b67e9557b1952330 @nelstrom nelstrom committed Feb 25, 2013
Showing with 13 additions and 0 deletions.
  1. +4 −0 after/ftplugin/help/docopen.vim
  2. +9 −0 t/docopen-test.vim
View
4 after/ftplugin/help/docopen.vim
@@ -9,3 +9,7 @@ endfunction
function! GetFilename()
return expand('%:t:r')
endfunction
+
+function! GetHelptag()
+ return expand('<cword>')
+endfunction
View
9 t/docopen-test.vim
@@ -24,3 +24,12 @@ describe 'GetFilename'
end
end
+
+describe 'GetHelptag'
+
+ it 'gets the helptag under the cursor'
+ help {offset}
+ Expect GetHelptag() ==# '{offset}'
+ end
+
+end

0 comments on commit 811db7a

Please sign in to comment.
Something went wrong with that request. Please try again.