Why Learn Vim In 2019?


I’ve been using Vim for more than 3 years now. This is an eternity in the web development world. So many things have changed but the most important and unbelievable thing happened is Visual Code, the slick IDE from Microsoft (!) that has become the most prevalent IDE for JavaScript. There are IDEs and editors out there are Sublime Text, GitHub Atom, and others. So now that we have all those...

Setting Up Vim For TypeScript


TypeScript is a transpiled language that allows using types in your JavaScript code (strictly saying it’s a superset of JavaScript) and thus catching errors at compile time and making the code more reliable. Let’s see what we need for a highly-productive Vim setup for TypeScript. Syntax Highlight For syntax highlighting, I use a couple of plugins. The first one is...

5 Awesome Vim Plugins You May Never Have Heard About


I’ve been browsing people’s dotfiles recently and found some very cool Vim plugins which I’ve never seen before. So I thought I need to spread the word. Buftabline — buffer list that lives in the tabline Buftabline You might have heard that Vim users would rather use buffers instead of tabs, which is a more native way to work with files in Vim. To me, it was always a...

How To Edit A Vim Macro?


I use macros (by the way this is plural of macro) pretty often in my daily workflow. There are always some tasks that you need to do quickly on a large text file, and that’s where macros shine. Sometimes though it’s not trivial to get a macro right from the first time. But do you know there’s a simple hack to modify an already recorded macro without re-recording it? First, a...

Vim for JavaScript and React in 2019


In this article, I’d like to share some of the Vim plugins that will transform your Vim into an IDE for JavaScript and React (step back, VS Code!). Note: I will only talk about JavaScript-specific plugins here. For must-have general-purpose plugins see my other article. Syntax highlighting Many of the old syntax plugins for JavaScript have troubles with some modern features like arrow...

Vim search and replace


Search and replace. How do you do this in Vim? The basics :s/fn/function/g 1 :s/fn/function/g %s stands for “substitute” here. In this example, we’re replacing all the occurrences of the “fn” string with “function” in the current line. The "g" flag at the end specifies that we need to do this globally, i.e. throughout the whole line. Usually though you...

How to copy and paste a line in Vim?


One of the most common task that beginners struggle to do in Vim is copying and pasting a line. In reality though, it is very simple. Type "yy" to copy a line, then "p" to paste it into the other place. 1 Type "yy" to copy a line, then "p" to paste it into the other place. Now if you have some time, let’s take a closer look at what’s happening there. To copy a line, Make sure...

5 must-have Vim plugins in 2018


VIM ecosystem changes quite a bit over time. Some of the plugins I have are good old ones, others are rather new, but amazing nevertheless. So in this article, I would like to show you several must-have plugins for VIM, no matter whether you are writing in Ruby, Python, JavaScript, or C#. Without further ado and in no particular order. Vim-plug for plugin management First things first. You...

How to quit VIM (saving or ignoring the changes)?


There are multiple ways of exitting VIM, but it depends on whether you actually want to save your changes or not. Quitting without saving any changes Press Esc to make sure you’re back to the normal mode. Then type :qa!and press Enter. If you would like to know what does it mean: : starts the command, q means “quit”, a means “all” (all...

Recent Posts