Skip to content

Commit

Permalink
Keep current alternate-file name while reading templates (#1675)
Browse files Browse the repository at this point in the history
Signed-off-by: Cihangir Akturk <cakturk@gmail.com>
  • Loading branch information
cakturk authored and arp242 committed Mar 2, 2018
1 parent 01bea98 commit a7dd67d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autoload/go/template.vim
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function! go#template#create() abort
let l:template_file = get(g:, 'go_template_file', "hello_world.go")
endif
let l:template_path = go#util#Join(l:root_dir, "templates", l:template_file)
silent exe '0r ' . fnameescape(l:template_path)
silent exe 'keepalt 0r ' . fnameescape(l:template_path)
elseif l:package_name == -1 && l:go_template_use_pkg == 1
" cwd is now the dir of the package
let l:path = fnamemodify(getcwd(), ':t')
Expand Down

0 comments on commit a7dd67d

Please sign in to comment.