Varstack Logo - Bugs are always there

Homepage


QUICK INTRO TO CUSTOM VIM MAPPINGS

Jul 01, 2015

One of the best things about vim is its ability to create custom mappings for almost any key in all modes.

Suppose you want Ctrl+S to save your document while you are in insert mode, because pressing

<Esc>:w<Enter>i 

to switch to normal mode, save the file, and return back to insert mode is a bit too much. According to vim philosophy, it actually is too much, and thus you can map Ctrl+S to those keys just as easily.

For this, add the following to your vimrc

inoremap <C-S> <Esc>:w<Enter>i 

EXPLANATION:

The command has separate parts but follows the...



VIM CUSTOMIZATION: GUIDE TO WRITING YOUR OWN VIMRC

Jul 01, 2015

Vim is all about customization. It comes from a long line of ancestors starting from ed (1971), ex (1976), vi (1979), and finally VIM (1991).

Vim is designed with the philosophy of speed and minimal keystrokes. But I guess, if you're on this page, you already know that.

The screenshot in above banner is how my vim looks currently. (In case you can't see it, click here) If you'd notice, there's a bar on the top showing the buffers I have currently open, the bottom bar shows the mode, character encoding, github branch (when I'm inside a project). The...



USING MOUSE WITH VIM IN THE TERMINAL

Jun 30, 2015

Just when you thought vim couldn't surprise you anymore, vim strikes again. As it turns out, vim supports mouse integration even in the terminal. Not only that, the support is mind blowingly simple and amazing. You can move your cursor, select text and even resize your panes in a split screen.

Most websites just say to use set mouse=a in your .vimrc to add mouse support to your vim. However, this enables mouse in all modes and I found that it can get very irritating if mouse gets moved during typing in insert mode. Luckily vim also supports selective usage...



PACKAGE MANAGEMENT WITHOUT ROOT ACCESS - AN INTRO TO LINUXBREW

Jun 26, 2015

First a little background. At my college, we are given login accounts for accessing PC's at the Computer Labs. I usually use them for setting up my work environment for easy access through SSH. Though that makes it very easy for me to resume my work, from any computer or laptop on the network, the preinstalled packages are too old for my taste.

Have a look:

Versions before LinuxBrew update

This is what we want to end up with:

Versions after LinuxBrew update

Of course, this can be achieved by compiling the...



IIT KANPUR: THE FIRST YEAR

Jun 18, 2015

First of all, I think congratulations are in order. If you are reading this, you have probably cracked one of the toughest exams in the world. After two years of hard work and challenges, you have finally succeeded! You have made it to one of the world's finest engineering colleges, the Indian Institutes of Technology.

Last two years must have been tough for you. You sacrificed on interaction with friends, computer games, movies, parties and what-nots. Now that the results of JEE Advanced are out, the time for an important decision has come. You have to choose which IIT and...