Flutter Tutorial
My $PATH to Flutter with Vim
R ecently I finished The Complete Flutter Development Bootcamp with Dart by AppBrewery and at the very beginning I was introduced to Vim. I was even able to exit.
Setting up Flutter on my Mac was no problem outside of setting my $PATH. This is step #3 in the Flutter docs. At some point I had created a profile with a different tutorial not knowing what I was doing. I searched for answers and came across a way of clearing my bash profile but I was still having trouble setting the path as you see here:
Although I had purchased the Flutter Bootcamp course, I wanted to see if I could follow the docs on my own. After wasting a lot of time I gave in and followed the tutorial. I was able to set my $PATH in the first try with Vim. The instructor made a joke about being able to exit the Vim editor, which at the time I didn’t get, but I now do.
Here is how I was able to do it:
Open terminal and you will see:
iMac:~ home$
Type vim .bash_profile
so it looks like this:
iMac:~ home$ vim .bash_profile
then hit enter/return
The Vim text editor will open and then you will type:
export PATH="PATH:/Users/home/Development/flutter/bin"
hit the esc key
your cursor will jump to the bottom and then you will type:
:wq!
which saves and quits the Vim editor.
To check to see if it worked quit your terminal and reopen it.
Type in flutter --version
hit enter
You should see something like this:
Once I was past this obstacle of setting $PATH it was smooth sailing and I was able to use Android Studio with no problems.
As I progressed through the course, my mind drifted as it often does. I kept thinking about Vim and how well it worked. I decided to do a little research and this is what I found:
Besides a Pac Man like game that teaches you basic Vim commands I found a really enthusiastic community of Vim users. Here are some links is you would like to learn more:
Vim.org — The main doc page
Daniel Miessler — Great Tutorial
Vim Cookbook — Recipes
I hope this helps you set your own $PATH and any comments or suggestions are greatly welcomed as this is my first Medium article.