Preslav Mihaylov

Speaker, Software Engineer, Technical Trainer. Passionate about computer science, presentations and reading books

Category: Boost your VIM

Incremental search in vim

There is a slight, but obnoxious difference in how the default search works in vim against the way it works in other IDEs.

In vim, whenever you click the / (forward slash) you start writing a word you want to find in the current file. The problem is that you have to write the whole word and click enter before you start seeing the results.

This can work fine and you can cope with it most of the times, but it can start getting in the way pretty quickly once you start searching for longer words or phrases, whose exact identifier you can get wrong pretty easily. At that point, you have to start all over again with the search and be very careful about writing the keywords precisely.

The way search works in IDEs is that it starts showing results while you’re typing the keyword. This way, you can:

  • Get to the word you need before you even write the whole keyword
  • Detect a mistake in your term before you’re finished

This feature is called incremental search and can be very handy.

Today, I want to show you how to get it in your vim editor.

This article is part of the sequence  Boost Your VIM where I share my favorite vim plugins and tools which can greatly optimize your productivity and make you a better keystroke ninja.

Continue reading

Pathogen – The Best Plugin Manager for vim

Continuing the Boost your VIM series with the next neat vim plugin – pathogen!

Last time, I showed you one of my favorite bash utilities (which happens to work so wonderfully with vim) – tmux.

This time, I will introduce you to my weapon of choice when it comes to plugin managers.

It’s called pathogen. This is the best and yet simplest plugin manager there is.

There are others, like Vundle, which I’ve tried in the past but none can beat pathogen’s simplicity.

It’s so simple (in fact, the total source code is ~250 lines), that this will be a pretty simple post as well.

So, if you’re ready to hack your VIM with some neat plugins, start with this one and make your life easier.

Continue reading

tmux – A Terminal Multiplexer

Last time, I wrote about why I think everyone should try using a bare bones text editor like vim at least for a while.

After such an experience, some might give up on it, while others might want to switch to vim full-time.

For the latter – congratulations!

But inevitably, a problem will occur with this approach, especially if you are working on a big project – using bare bones vim for big projects is quite unproductive compared to IDEs.

I used to use vim on my hobby side projects and it did a great job, but once I tried using it on a project with a large code base and several different build variants, things started to get messy and I preferred using the IDE.

Some of you might disagree with me, I have seen people prefer sticking solely to bare bones vim.

But in my experience, apart from the text editing boost it gives you due to its awesome user interface, all the auxiliary tools you need to maintain a big project are invaluable and not easily available from a bare bones vim.

So, determined to amend that, I started exploring many different tools and plugins to enable my vim to challenge the productivity my IDE provides.

In this new series of articles, I will share my favorite tools which help me keep myself productive everyday by using vim.

In the first one, the topic is my all-time favorite vim add-on – tmux.


This article is part of the sequence  Boost Your VIM where I share my favorite vim plugins and tools which can greatly optimize your productivity and make you a better keystroke ninja.

Continue reading

BulgariaEnglish