Avoid creating temporary files on editing a file in Ubuntu

Hi,
My ubuntu flavor always create temporary files having filename followed by ~ on editing. For eg: if I am editing a file called "sip.c", automatically a temporary (bkup) file is getting created with the name "sip.c~". How to avoid this file creation?

That's an editor/application thing, not really an operating system thing.

What editor are you using?

If, as I am guessing, you are using vim, then you need to configure your vim backup and/or writebackup options.

yes, I am using vim only. I have checked for the file ".exrc" in my home directory path, there is no such file containing configurations. So please could you elaborate on how to make this configuration change and where to do it?

Create (if not exist) or append to ~/.vimrc the following line:

set nobk

See if it works.

No cbkihong, it is not working. I have created a file ~/.vimrc (which was not there initially) and then written "set nobk" and also tried writing ":set nobk". Both are not solving my problem. Any more work around?

Then what about ":set nocp" and then ":set nobk" right on the vim command line?

Thanks a lot cbkihong. It works perfectly when we give that in vim command line as you said.