LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-22-2008, 07:35 PM   #1
posix_memalign
Member
 
Registered: Aug 2008
Posts: 81

Rep: Reputation: 15
vim and rxvt


When I copy/paste text into vim running in rxvt, it destroys indentation.

How can I resolve this without using a different terminal emulator or editor?
 
Old 09-22-2008, 09:46 PM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,502

Rep: Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617
it works in bash i don't have rxvt installed

have you looked at
Code:
man vim 
-- and --
man rxvt
 
Old 09-23-2008, 06:28 AM   #3
posix_memalign
Member
 
Registered: Aug 2008
Posts: 81

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by John VV View Post
it works in bash i don't have rxvt installed

have you looked at
Code:
man vim 
-- and --
man rxvt
It works in bash?
Could you explain the relevance of that statement to my question?

I have concluded that rxvt has nothing to do with the issue as the same issue seems to arise despite what terminal emulator is used.

Have I looked at the manual? Yes, I have looked at it; have I meticulously studied all of the vast documentation for vim? No.

Of course not, that is why I'm asking the question in the first place.
 
Old 09-23-2008, 10:43 AM   #4
berbae
Member
 
Registered: Jul 2005
Location: France
Distribution: Arch Linux
Posts: 540

Rep: Reputation: Disabled
Try to do
:set paste
before pasting.
:set nopaste
after.
look here for explanations.
 
Old 09-24-2008, 12:34 AM   #5
posix_memalign
Member
 
Registered: Aug 2008
Posts: 81

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by berbae View Post
Try to do
:set paste
before pasting.
:set nopaste
after.
look here for explanations.
Excellent, thanks a lot.
 
Old 09-24-2008, 01:30 AM   #6
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Create yourself a keybinding so that you can toggle paste mode while in insert mode. I use Alt-P, but you can use a Function key (the commented out entry)

Code:
" allows smart pasting - toggles on/off
set pastetoggle=<a-p>
"set pastetoggle=<F11>
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
VIM Users: Do you use VIM via console or gui? JMJ_coder Linux - General 48 04-16-2008 03:12 AM
Vim in RXVT: how to drag with mouse a borderline separating split windows? arctgx Linux - Software 2 12-07-2007 01:32 PM
LXer: Vim tips: Using Vim mappings and abbreviations LXer Syndicated Linux News 0 06-18-2006 01:54 PM
LXer: Cream for Vim - Making Vim more user friendly LXer Syndicated Linux News 0 06-17-2006 11:54 PM
rxvt - vim questions about keybinding thely Linux - General 2 12-12-2004 11:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration