Some time back we wrote about a tip to fix vim indentation getting problematic when copy-pasting. That works great – but only if the original code that you are copying is indented properly. It may be indented properly but with different indentation settings (tabs instead of spaces, indent of 2 or 8 spaces instead of your favourite of 4 spaces). When added to the your code, it stands out awkwardly from the rest of the code. Here’s another use case – as programmers, we often encounter badly indented code and….. Read More
Tip – Vim Indent Paste Solution
If you have faced problem with indentation getting problematic whenever you copy paste to vim, here is a simple tip. Before we go there – simple illustration of the problem. Lets say the following text is something you are pasting to vim in the insert mode int main(void) { int i, j; for(i=0; i<10; i++){ j = i*2 ; printf(“\n j %d”,j) ; } return 0 ; } When you paste in vim, the same code appears something like the following As you can notice, the indentation totally gets haywire….. Read More
Linux – Search Text In Files And Open Result In VIM
If you are working on a project which has a lot of source files, there is always a need of searching for a given text or string in all the files of your work area and possibly opening all those files one by one either to check for the usage of that text or for general viewing. In this post, I will explain how you can search for a given string or a piece of text in all the files of your project and be able to open each of….. Read More


Most Commented