Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi.
Some times I have some info from the web or somehere else I want to copy paste into my VIM editror, When I am doing the way I know that is select with the mouse, then copy and i in VIM and shift+insert, It is al not indent at all.
I get something like
The big fox
jump over{
gfgdf
fg
}
well you got the point, so what can I do? I am using VIM 7 btw.
press v to start the selection of a block. use the arrow keys to allocate the selection. then press y to set copy or press x to set cut. press p to paste.
if you have 3 button mouse, here is another idea. just highlight any text you would like to paste, fire up vi go into insert mode and just middle_click (the wheel). mind you it only works under X though and I have only tested it with konsole.
Hi.
Some times I have some info from the web or somehere else I want to copy paste into my VIM editror, When I am doing the way I know that is select with the mouse, then copy and i in VIM and shift+insert, It is al not indent at all.
I get something like
The big fox
jump over{
gfgdf
fg
}
well you got the point, so what can I do? I am using VIM 7 btw.
:confused:
My understanding is that vim uses the extension of a file
to do indentation proper. To me that suggests that you're
not using vim like so:
vim my_source.c
and then copy & paste, but rather just fire up vim and paste
into it, which kind of deprives it of its means to tell what indentation
model it's meant to be using?
just in case you're using konsole, the moment you paste a text to vi (using the mouse of course), it's just the same as typing all the characters you copied (based on my observation). so you must press i or anything that will set vi to edit mode before pasting the values.
Edit: i tested copying a c code then pasting it to vi and i got no prob . my vim version is 6.3 2004 june
Last edited by konsolebox; 07-21-2006 at 04:31 AM.
you guys didnt under stand!!!
I meant, that I now all the P and yy and i and so on.
I want to take a full text from the www, and like when putting it on a notepad and everything works nice, excat copy, just like it I want it to copy to vim.
Is it possible? and if so . how?
Sometimes, depending on how Vi is configured (from .vimrc or globally), particularly with any sort of smart indentation, copy and paste can get kinda funky. This is where the :set paste command comes in. While in command mode, just press :set paste, do your pasting as you normally would, and then press Esc to exit. I've had a lot of success with this method.
Sometimes, depending on how Vi is configured (from .vimrc or globally), particularly with any sort of smart indentation, copy and paste can get kinda funky. This is where the :set paste command comes in. While in command mode, just press :set paste, do your pasting as you normally would, and then press Esc to exit. I've had a lot of success with this method.
Will it work if I need to paste from something outside VIM ? like www ?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.