VIMTTER (neoVIM + fluTTER)

Sugitlab
4 min readApr 30, 2021

--

Hi, I’m sugit. Software engineer working @ kyoto.

I usually develop Flutter application as my hobby, and usually use IDE like VSCode or Android Studio. These are fully functional and strongly support my app development workflows.

But…

But…

But…

These are slightly BORING for me.

I originally used FORTRAN, C and C++ with just a simple text editor when I was in University. That did’t have any useful GUI tools. I sometimes miss their nostalgic days.

I noticed a few days ago.

To get back my nostalgic days, I need to change my IDE to Vim!!

(A little leaping? No, innovation always comes from leaping idea.)

Let’s go into the Vim World with me :)

Prerequisites

  1. Using “MacOS”. The most impressive OS in the world. I’m now using Apple Silicon model.
  2. Homebrew has been installed.

Goal

  1. fish shell + fisher (plugin manager): https://fishshell.com/
  2. tmux (terminal multiplexer) : https://github.com/tmux/tmux/wiki
  3. neovim (next gen. vim) : https://neovim.io/

Special Thanks

Fish shell

In macOS, you can install fish shell from homebrew by running simple one liner.

> brew install fish

To try fish shell, let’s call “fish” in your current shell (bash? zsh?)

> fish

First, let’s type config GUI for fish shell

> fish_config

Then, powerful GUI setting tool will been launched on your browser.

But, I recommend you to use more beautiful theme plugin. So, don’t worry to skip this step.

Next, let’s install plugin manager “fisher” in your fish environment.

Fisher

Fisher (https://github.com/jorgebucaran/fisher) is the most famous plugin manager for fish shell.

Installation is really simple, that just run the curl for fisher’s repository.

> curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher

Okey, then let’s type “fisher” on your terminal

> fisher
Usage: fisher install <plugins…> Install plugins
fisher remove <plugins…> Remove installed plugins
fisher update <plugins…> Update installed plugins
fisher update Update all installed plugins
fisher list [<regex>] List installed plugins matching regex
Options:
-v or — version Print version
-h or — help Print this help message

To install package, just specify the plugin info. with “fisher install” command. Let’s install bobthefish theme.

> fisher install oh-my-fish/bobthefish

You can select favorite theme scheme for bobthefish theme. Please see github page of bobthefish (https://github.com/oh-my-fish/theme-bobthefish) and select your favorite one. And setup your theme scheme on fisher config file.

fisher config file is $YOURHOME/.config/fish/config.fish.

If there is no such named file, please make new file with name “config.fish” and type following option. (My theme is “solarized” here.)

# Fisher : bobthefish theme color scheme
set -g theme_color_scheme solarized`

config.fish is the replacement for .zshrc or .bashrc for your past shell. So, if you need to move your customizations from past *rc files, please refer the official document (https://fishshell.com/docs/current/) of fish shell and setup them.

e.g.
I’ve set the homebrew path like this.

# Homebrew Path
set -x PATH /opt/homebrew/bin $PATH

My “config.fish” is available on my github repository. Please refer.

tmux

tmux (https://github.com/tmux/tmux/wiki) is the powerful terminal multiplexer. You can manage multiple sessions and easy to switch them. Additionally tmux supports flexible panel layout.

Installation is really easy.

> brew install tmux

I’ve setup some shortcut keys and these settings are available on my github repo. Please refer.

Default key-binding for tmux commands is “Cmd-b” but it usually set to another function in your terminal. So, I change it to “Cmd-q”. Followings are my setups.

  • Cmd-q : tmux command will start from this command.
  • Cmd-q + h (j, k, l) : move panes with same key as vim.
  • Cmd-q + H (J, K, L) : resize panes with same key as vim.
  • Cmd-q + | : split pane (horizontal)
  • Cmd-q + - : split pane (vertical)

Additionally I use tmux-powerline to show many useful information in the bottom of terminal.

Then, my tmux is now like this.

Fantastic!!

Brilliant!!

neovim

To install neovim, you can use homebrew. (Homebrew Magic comes again!)

> brew install neovim

Next, launch neovim and run “:checkhealth”. Then neovim will teach you to the required items like python, ruby, nodejs and so on.

In both Vim and Neovim, plugins are key tools for our vim to be the replacement of IDE.

To easy to manage and setup plugins for your neovim, “dein” is the best way.

Please install dein by following the instruction of dein repository.

After that, please use my dotfile for neovim. It contains really useful plugins.

  • defx: Fast filer for neovim. Type “sf” on your neovim, then filer dialog will show on your neovim editor. You can select your file by using h (j, k, l) vim key-bindings.
  • coc: powerful IntelliSense. Type “shift-k” to show definitions for your keyword like “class name”. Type “gd” to jump to the implementation of the definition of your selected keyword.

Then, you can get powerful flutter environment like this tweet.

Let’s enjoy your VIMTTER!!

٩( ᐛ )و Sugit.

--

--