bogado / file-line

Plugin for vim to enabling opening a file in a given line
http://www.vim.org/scripts/script.php?script_id=2184
301 stars 61 forks source link

Breaks templates loading #61

Closed joe-skb7 closed 9 years ago

joe-skb7 commented 9 years ago

I have next line in my .vimrc:

au BufNewFile main.c silent! 0r ~/.vim/skeleton/template.%:e

This loads content from template file when I'm creating new main.c file. But when file-line plugin is installed -- this functionality doesn't work (newly created main.c is blank).

joe-skb7 commented 9 years ago

I created workaround (dirty hack) to fix this issue:

-autocmd VimEnter * call s:startup()
+if (@% != 'main.c')
+       autocmd VimEnter * call s:startup()
+endif

It works for me, but it needs to be done in different way. Unfortunately I'm not into vim scripting language, so I couldn't come up with proper production patch.

joe-skb7 commented 9 years ago

@bogado This issue isn't fixed and should be reopened. There is no patch yet to fix it.

joe-skb7 commented 9 years ago

@bogado Ok, never mind, I created new issue for this :) See #62