How to remove ^M and other non-printable characters from the file in Linux

How to remove ^M and other non-printable characters from the file
If you are working or playing around with files on different O.S., and you are just copying/moving files from one O.S. based system to other. Unknowingly you are inviting non-printable character to come with! This specially happens when you open any file in Linux using any editor (vim in my case), which you got from windows based machines.  You will see ^M at the end of each line (It is usually treated as carriage return/linefeed in Linux environment which we got from its step brother Windows :p ).
Read more

How to use multiple files efficiently in vim editor

Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I prefer using vim editor.

After doing some experiments and knowing some important commands, I though to share with you. So i have written few commands point wise which may be useful for you while editing multiple files using vim (not GVIM, although these commands are valid there too.)

Read more

Basic useful vim commands for everyone

I know it’s not a new topic to discuss and it has lots of online contents already available over the net. But Then I thought it would be useful to this site’s visitors and can have online repository on vim most commonly used commands.
This post has only most commonly used vim commands which we use in our day today development activities. This post will be very helpful for those who wish to learn vim editor from the scratch and it can be useful for all other vim users too.

So, first open the file by using vim filename (single file at one time). I will be posting very soon about manipulation on multiple files using vim editor.

Read more