Skip to content

Instantly share code, notes, and snippets.

@rbtnn
Created May 7, 2016 11:47
Show Gist options
  • Select an option

  • Save rbtnn/f5a9f0cd050fd9a53498729511dc6cc2 to your computer and use it in GitHub Desktop.

Select an option

Save rbtnn/f5a9f0cd050fd9a53498729511dc6cc2 to your computer and use it in GitHub Desktop.
:h help<tab>
function! Hoge() abort
let lines = []
for row in range(1, 999)
let line = ''
for col in range(1, &columns)
let c = screenchar(row, col)
if 0 < c
let line .= nr2char(c)
endif
endfor
if !empty(line)
let lines += [line]
endif
endfor
return writefile(lines, 'temp.txt')
endfunction
cnoremap <expr><tab> Hoge()
call feedkeys(":h help\<C-d>\<tab>\<C-u> echo join(readfile('temp.txt'), \"\\n\")\<cr>")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment