

GitHub - thosakwe/vim-flutter: Vim commands for Flutter, including hot-reload-on...
source link: https://github.com/thosakwe/vim-flutter
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.md
vim-flutter
Vim commands for Flutter, including hot-reload-on-save and more.
Usage
Usage documentation can be found both in this README, as well
as via calling :h flutter
.
Installation
vim-flutter
is a Vimscript-only plugin, and makes heavy
use of Vim8's async jobs. It can be installed with a
package manager like
vim-plug
, for example.
Though this package doesn't depend on it, having
dart-vim-plugin
available is recommended, for a betterexperience.
You may also consider combining
package:dart_language_server
with a Language Server Protocol client, like
ale
.
Plug 'dart-lang/dart-vim-plugin' Plug 'thosakwe/vim-flutter' " Run :PlugInstall to install the plugin.
Ultimately, installation is up to you.
Options
g:flutter_command
- The Flutter executable path/name; defaults to'flutter'
.g:flutter_hot_reload_on_save
- Whether to auto hot-reload whendart
files are saved; defaults to1
.
Provided Commands
:FlutterRun <args>
- callsflutter run <args>
:FlutterHotReload
- triggers a hot reload on the current Flutter process:FlutterHotRestart
- triggers a hot restart on the current Flutter process:FlutterQuit
- quits the current Flutter process:FlutterDevices
- opens a new buffer, and writes the output offlutter devices
to it:FlutterSplit
- opens Flutter output in a horizontal split
The following are self-explanatory:
:FlutterVSplit
:FlutterTab
Menu Support
If you are using a GUI Vim Variant, you can add a Flutter
menu by calling call FlutterMenu()
.
Hot Reload on Save
A convenient feature to have when working with Flutter is
to automatically hot-reload an app once a file is saved.
By default, whenever a dart
file is saved, if and only if
a Flutter process is running, it will be hot-reloaded.
You can disable this by setting g:hot_reload_on_save=0
,
before vim-flutter
is loaded.
Example .vimrc
Plug 'thosakwe/vim-flutter' call plug#end() " Enable Flutter menu call FlutterMenu() " Some of these key choices were arbitrary; " it's just an example. nnoremap <leader>fa :FlutterRun<cr> nnoremap <leader>fq :FlutterQuit<cr> nnoremap <leader>fr :FlutterHotReload<cr> nnoremap <leader>fR :FlutterHotRestart<cr>
Recommend
-
125
Live reload for Go apps
-
78
README.md t2b A wicked-powerful text macro language for building binary files. Supports comments, looping, Unicode, variables, conditionals, macros and recursion. TLDR; Check out e...
-
56
-
44
-
67
README.rst browser-reload-linux.vim Description Vim plugin to reload your browser. This is a linux compatible version inspired by the mac ver...
-
10
Theming your App in Flutter using BLoc, Save & Reload In this article, we will see how we can use BLoc to Theme your app in Flutter. To understand BLoC with a real world example, you can refer to my...
-
19
sass-compile.vim sass、compassの自動コンパイルを提供するプラグインです。 scssファイルの保存時などに自動的にコンパイルコマンドを実行します。 compass watchなどと違い、保存毎にコマンドを発行するため、 プロセスが残らず、複数の案件の切替...
-
4
50 Useful Vim Commands (132)Here are 50 useful Vim commands that work in normal mode. Many of these can be combined and modified to produce dozens more. Use these as inspiration for your own repeatable workflows....
-
17
Vim is a pretty great text editor, but learning to use it effectively can be a challenge. Even if you keep a quick-reference card or cheatsheet around, it can be difficult to figure out which comma...
-
6
wgo – watcher-go Live reload for Go apps (and more) Installation $ go install github.com/bokwoon95/wgo@latest Usage: wgo [FLAGS] <command> [ARGUME...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK