Giter Club home page Giter Club logo

flutter-reload.vim's Introduction

Why this fork

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

flutter-reload.vim

Reload flutter when saving a dart file without using --pid-file option.

Installation

Via Plugin Manager (Recommended)

  1. Add Plug 'mauritsvdvijgh/flutter-reload.vim' to your vimrc file.
  2. Reload your vimrc or restart
  3. Run :PlugInstall

Vundle or similar

  1. Add Plugin 'mauritsvdvijgh/flutter-reload.vim' to your vimrc file.
  2. Reload your vimrc or restart
  3. Run :BundleInstall
  1. Add NeoBundle 'mauritsvdvijgh/flutter-reload.vim' to your vimrc file.
  2. Reload your vimrc or restart
  3. Run :NeoUpdate
cd ~/.vim/bundle
git clone https://github.com/mauritsvdvijgh/flutter-reload.vim.git

Manual Installation

Unix

(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

Windows (PowerShell)

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"))

Usage

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.

How it works

Simply sending SIGUSR1 to the flutter process in vim's BufWritePost.

(inspired from reisub0/hot-reload.vim)

flutter-reload.vim's People

Contributors

hankchiutw avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.