window.pipedriveLeadboosterConfig = { base: 'leadbooster-chat.pipedrive.com', companyId: 11580370, playbookUuid: '22236db1-6d50-40c4-b48f-8b11262155be', version: 2, } ;(function () { var w = window if (w.LeadBooster) { console.warn('LeadBooster already exists') } else { w.LeadBooster = { q: [], on: function (n, h) { this.q.push({ t: 'o', n: n, h: h }) }, trigger: function (n) { this.q.push({ t: 't', n: n }) }, } } })() Rails Development with TMUX, Vim, Fzf + Ripgrep - The Codest
The Codest
  • About us
  • Services
    • Software Development
      • Frontend Development
      • Backend Development
    • Staff Augmentation
      • Frontend Developers
      • Backend Developers
      • Data Engineers
      • Cloud Engineers
      • QA Engineers
      • Other
    • It Advisory
      • Audit & Consulting
  • Industries
    • Fintech & Banking
    • E-commerce
    • Adtech
    • Healthtech
    • Manufacturing
    • Logistics
    • Automotive
    • IOT
  • Value for
    • CEO
    • CTO
    • Delivery Manager
  • Our team
  • Case Studies
  • Know How
    • Blog
    • Meetups
    • Webinars
    • Resources
Careers Get in touch
  • About us
  • Services
    • Software Development
      • Frontend Development
      • Backend Development
    • Staff Augmentation
      • Frontend Developers
      • Backend Developers
      • Data Engineers
      • Cloud Engineers
      • QA Engineers
      • Other
    • It Advisory
      • Audit & Consulting
  • Value for
    • CEO
    • CTO
    • Delivery Manager
  • Our team
  • Case Studies
  • Know How
    • Blog
    • Meetups
    • Webinars
    • Resources
Careers Get in touch
Back arrow GO BACK
2021-06-07
Software Development

Rails Development with TMUX, Vim, Fzf + Ripgrep

The Codest

Marcin Doliwa

Software Engineer

A few years ago, I was grilling with some of my friends, all Java developers. Not sure how it came up, but we started talking about our coding environments. I told them I’m doing all my development using Vim and terminals. It triggered some jokes and funny questions, like if I’m still using punch cards 🙂

Since then, I tried some “real” IDEs but always came back to Vim and terminals as it’s a very fast method, has all the tools I need and I simply like working in the text mode.

Here are some details about my workflow. It’s worth mentioning I work on Linux, but you can set it up on Mac or Windows with no problems.

I start my working day with opening a terminal, cd ~/Projects/XYZ, and running tmux, so let’s start there.

TMUX

What is TMUX? Like the authors say:

TMUX is a terminal multiplexer. It lets you switch easily between several programs in one terminal, detach them (they keep running in the background) and reattach them to a different terminal.

I use it to switch between multiple things in one terminal. So, in one TMUX window, I have the Rails server running, in the second I have my Vim opened, and every time I need to do something in the terminal, like checking routes, running migrations or tests, I just open a new window with CTRL-A C and do the thing.

I don’t use TMUX panes, only windows, and do a lot of switching (I have CTRL + double-A bind to switching between last windows).

Another very convenient feature of TMUX is that it allows me to find and copy text from a terminal without using a mouse.

Vim

It’s the main part of my workflow. I won’t be getting into details about what VIM is and how it’s different from other editors. There is a lot of great articles and videos about it. In a few words, Vim is a modal editor. It has two modes, insert mode and normal mode. Insert is for typing text into a document and normal is for performing different operations on the document, like moving the cursor, deleting fragments of text, changing it, and so on. It sounds strange but after some time it feels very natural and it’s very hard to go back to your regular editor.

What I’d like to show you is the way how I combine Vim with other tools to get all I need as a web developer.

Plugins

I’m not a fan of heavy plugin Vim configs, so I’m using only a few. Here is the list:

NERDtree – it is a file explorer. It allows you to easily do some basic file system operations, like moving files, renaming, creating new files, and many others,

vim-endwise – I’m a Ruby developer, so I use it to add end after if, do, def, and several other keywords,

vim-rails – it’s a Rails power plugin. It knows the structure of a Rails app. Want to check the partial under your cursor? Just press gf and it opens it in your current window. It has many other options but that’s the one I use most often,

vim-surround – great plugin which makes working with surroundings very easy. With it, you can change the surroundings of the text from () to [] in a few keystrokes,

vim-repeat – complementary to Vim-surround. It allows for a repeating surrounding change with . (repeat last change in Vim),

vimwiki– my way to take notes,

fzf.vim+ fzf – the core part of my web development workflow.

cooperation banner

Fzf + Ripgrep

These are the tools that define the way I do my coding. I realized that usually when I’m doing some coding tasks, I spend most of my time on finding how the stuff works. To do this, I need to quickly check different parts of the codebase, methods definitions, classes, and other things.

Fzf is an interactive Unix filter for command-line that can be used with any lists (files, command history, git commits, process lists); in other words, it’s a fuzzy finder.

Ripgrep is an alternative to grep, but it’s the blazing fast one.

Once combined, these two let me quickly find anything I want in my project.
I have two settings in my Vim config file to help me with this:

nnoremap <C-p> :Files<Cr>
nnoremap <C-f> :Rg<Cr>

The first one let me quickly find correct files using fuzzy finding on file paths (CTRL-P). The second one runs the fuzzy finder on all paths and contents of files in my project using Ripgrep (CTRL-F).

So, let’s say I want to find migration where I added a column to the users table. I hit CTRL-F and write something like adcolusnam and it will match add_column :users, :name, :string.

When I look for a method definition, I often run CTRL-F def method_name.

It’s very useful as it searches through file path + content. It’s especially convenient when I know that the content I’m looking for is in a specific part of the project. For example, I want to find where we updated a username, and I remember it was somewhere in the controllers. I hit CTRL-F conupdname to match line app/controllers/users_controller: @user.update(name: new_name).

If you know your project and codebase structure, you can easily construct fuzzy find queries to quickly find almost anything you want.

Video

Click here to see a short recording of me playing around with the `discourse` codebase (440k LOC on my i5, 16GB desktop) and showing how I usually move around the project.

Summary

I hope you got interested in my setup and decided to give Fzf a try in your coding endeavors. It really changed the way I’m using Vim as a code editor.

Related articles

Fintech

5 examples of Ruby’s best usage

Have you ever wondered what we can do with Ruby? Well, the sky is probably the limit, but we are happy to talk about some more or less known cases...

The Codest
Pawel Muszynski Software Engineer
Software Development

Learn More about Ruby on Rails with Pub/Sub

Pub/Sub can bring many benefits to the project – it can make the code clean, decouple services and make them easily scalable. Learn more about Pub/Sub in the following article...

The Codest
Michal Pawlak Senior Ruby Developer
Software Development

Product Development: Python vs. Ruby

Python and Ruby are both the most widely used backend programming languages. Python is a bit more popular and has a wider application. However, Ruby also brings many benefits and...

The Codest
Kamil Ferens Head of Growth

Subscribe to our knowledge base and stay up to date on the expertise from the IT sector.

    About us

    The Codest – International software development company with tech hubs in Poland.

    United Kingdom - Headquarters

    • Office 303B, 182-184 High Street North E6 2JA
      London, England

    Poland - Local Tech Hubs

    • Fabryczna Office Park, Aleja
      Pokoju 18, 31-564 Kraków
    • Brain Embassy, Konstruktorska
      11, 02-673 Warsaw, Poland

      The Codest

    • Home
    • About us
    • Services
    • Case Studies
    • Know How
    • Careers
    • Dictionary

      Services

    • It Advisory
    • Software Development
    • Backend Development
    • Frontend Development
    • Staff Augmentation
    • Backend Developers
    • Cloud Engineers
    • Data Engineers
    • Other
    • QA Engineers

      Resources

    • Facts and Myths about Cooperating with External Software Development Partner
    • From the USA to Europe: Why do American startups decide to relocate to Europe
    • Tech Offshore Development Hubs Comparison: Tech Offshore Europe (Poland), ASEAN (Philippines), Eurasia (Turkey)
    • What are the top CTOs and CIOs Challenges?
    • The Codest
    • The Codest
    • The Codest
    • Privacy policy
    • Website terms of use

    Copyright © 2025 by The Codest. All rights reserved.

    en_USEnglish
    de_DEGerman sv_SESwedish da_DKDanish nb_NONorwegian fiFinnish fr_FRFrench pl_PLPolish arArabic it_ITItalian jaJapanese ko_KRKorean es_ESSpanish nl_NLDutch etEstonian elGreek en_USEnglish