Formatting gets changed when trying to copy text from gedit to vim
-
I want to copy/paste some text to vim from gedit. The original text looks like this: I start vim, press "i", then right click, paste, and get this: How could i set vim to not to do this? How can I copy/paste my text so that I don't need to delete those unnecessary tabs?
-
Answer:
Take a look http://vim.wikia.com/wiki/Toggle_auto-indenting_for_code_paste. Basically it's the pastetoggle option.
LanceBaynes at Super User Visit the source
Other answers
It may be that your vim is not aware of the X11 clipboard or cutbuffer. Instead of running vim at the command line, run gvim -v instead. That will give you a terminal Vim, but with the X11 features enabled. Then pasting with the mouse, e.g. using the middle mouse button, should just work. If that works, then you can add alias vim='gvim -v' to your ~/.bashrc file to use gvim when you execute vim. Vim can be built with full support for X11 and the mouse, but many distributions don't do that.
garyjohn
Related Q & A:
- How to copy text from RichTextBox?Best solution by stackoverflow.com
- How to copy text to clipboard programmatically?Best solution by Stack Overflow
- When trying to open attachments, it doesn't open, but says "scanning for viruses".?Best solution by Yahoo! Answers
- Why is my surname changed when I send email?Best solution by Yahoo! Answers
- Which liquid gets solid when heated?Best solution by radio-weblogs.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.