It addresses an issue I had running it on macos. A hotfix is applied which I do not know if it applies to other operating systems etc. https://github.com/mauritsvdvijgh/flutter-reload.vim/issues/1
Forked from: https://github.com/hankchiutw/flutter-reload.vim
Reload flutter when saving a dart file without using --pid-file
option.
- Add
Plug 'mauritsvdvijgh/flutter-reload.vim'
to your vimrc file. - Reload your vimrc or restart
- Run
:PlugInstall
Vundle or similar
- Add
Plugin 'mauritsvdvijgh/flutter-reload.vim'
to your vimrc file. - Reload your vimrc or restart
- Run
:BundleInstall
- Add
NeoBundle 'mauritsvdvijgh/flutter-reload.vim'
to your vimrc file. - Reload your vimrc or restart
- Run
:NeoUpdate
cd ~/.vim/bundle
git clone https://github.com/mauritsvdvijgh/flutter-reload.vim.git
(For Neovim, change ~/.vim/
to ~/.config/nvim/
.)
curl -fLo ~/.vim/plugin/reload.vim --create-dirs \
https://raw.githubusercontent.com/mauritsvdvijgh/flutter-reload.vim/master/plugin/reload.vim
curl -fLo ~/.vim/ftplugin/dart.vim --create-dirs \
https://raw.githubusercontent.com/mauritsvdvijgh/flutter-reload.vim/master/ftplugin/dart.vim
md ~\vimfiles\plugin
md ~\vimfiles\doc
$pluguri = 'https://raw.githubusercontent.com/mauritsvdvijgh/flutter-reload.vim/master/plugin/reload.vim'
$ftpluguri = 'https://raw.githubusercontent.com/mauritsvdvijgh/flutter-reload.vim/master/ftplugin/dart.vim'
(New-Object Net.WebClient).DownloadFile($pluguri, $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath("~\vimfiles\plugin\reload.vim"))
(New-Object Net.WebClient).DownloadFile($ftpluguri, $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath("~\vimfiles\ftplugin\dart.vim"))
In your flutter project, you will exectue flutter run
(or flutter run -d {DEVICE_NAME}
to specify the device you want).
NO NEED to use --pid-file
to specify a pid file.
Make some changes to your project's *.dart files and you will see flutter reload automatically.
Simply sending SIGUSR1
to the flutter process in vim's BufWritePost
.
(inspired from reisub0/hot-reload.vim)