DEV Community

Discussion on: Vim as a Flutter IDE

Collapse
 
junery115_25 profile image
Japheth Awah

Yeah I see everyone doing this, i set it up and it works flawlessly but how do I connect my application to the emulator, like with visual studio code when I just run flutter run it runs on the emulator.

Collapse
 
igaurab_55 profile image
igaurab • Edited

There are different commands that you can run which are mentioned in the coc-flutter repo:
github.com/iamcco/coc-flutter

For your particular problem there are two commands you should run:
:CocCommand flutter.emulators
This list the installed emulators on your devices, just select the one and press Enter

Inorder to run the current application
:CocCommand flutter.run

This is similar to flutter run

Now you can bind these two commands into a keybinding and use that keybinding instead

nnoremap leader e :CocCommand flutter.emulators CR
nnoremap leader r :CocCommand flutter.run CR

** I am not able to put the leader as a tag. Dev doesn't allow that.