|
I have been playing with PHP and didn't really fill like installing a web server
and PHP on my fresh installed desktop just to do some testing with PHP. So I just
did everything on my personal server, but again, I did not want to install a FTP
server just to upload a few simple files, so I was just pasting things into my VI
editor through Putty. Well soon after putting up some PHP, I started noticing, if
there were any comments in my PHP that when I pasted the code in, it would end up
commenting out everything below it. Not good.
So as a temporary solution, I just removed the comments, which was OK for a little
bit, but I knew there had to be a better way. After playing with VI editor more, I
noticed it does some auto formating when you start doing comments in PHP (which is
done two forward slashes '//') that when you hit return, VI automatically starts a
comment on the next line.
So I did some Googling and found an article of copying and pasting within the VI
editor and some of the issues which mentioned a method to help prevent the auto
formating. So I tried it and ta-freakin-da it pasted exactly how I had it in Aptana.
To prevent auto-formating, while in command mode, type this without the quotes
":set paste" and when you go into insert mode, you will now see
"-- INSERT (paste) --" instead of the normal insert prompt. To go back to
normal insert, ":set nopaste".
I doubt this will help most of the readers of this site, but hopefully someone out
there will find it useful.
|
|
wrote on February 10, 2010
wrote on May 10, 2010
wrote on June 16, 2010
wrote on June 16, 2010
wrote on June 16, 2010
wrote on June 18, 2010
wrote on June 18, 2010
wrote on June 18, 2010
wrote on June 18, 2010
wrote on June 18, 2010
wrote on June 22, 2010
wrote on June 22, 2010
wrote on June 22, 2010
wrote on June 23, 2010
wrote on June 23, 2010
wrote on June 23, 2010
wrote on June 25, 2010
wrote on June 25, 2010
wrote on June 29, 2010
wrote on June 30, 2010
wrote on July 1, 2010
wrote on July 2, 2010
wrote on July 2, 2010
wrote on July 2, 2010
wrote on July 2, 2010
wrote on July 5, 2010
wrote on July 6, 2010
wrote on July 6, 2010
wrote on July 6, 2010
wrote on July 7, 2010
wrote on July 8, 2010
wrote on July 9, 2010
wrote on July 12, 2010
wrote on July 14, 2010
wrote on July 14, 2010
wrote on July 14, 2010
wrote on July 14, 2010
wrote on July 15, 2010
wrote on July 15, 2010
wrote on July 15, 2010
wrote on July 15, 2010
wrote on July 15, 2010
wrote on July 15, 2010
wrote on July 15, 2010
wrote on July 15, 2010
wrote on July 15, 2010
wrote on July 15, 2010
wrote on July 15, 2010
wrote on July 26, 2010
wrote on July 26, 2010
wrote on July 26, 2010
wrote on July 29, 2010
wrote on July 29, 2010
wrote on July 29, 2010
wrote on July 29, 2010
wrote on August 7, 2010
wrote on August 7, 2010
wrote on August 7, 2010
wrote on August 10, 2010
wrote on August 10, 2010
wrote on August 10, 2010
wrote on August 11, 2010
wrote on August 11, 2010
wrote on August 14, 2010
wrote on August 14, 2010
wrote on August 14, 2010
wrote on August 15, 2010
wrote on August 18, 2010
wrote on August 18, 2010
wrote on August 20, 2010
wrote on August 20, 2010
wrote on August 20, 2010
wrote on August 21, 2010
wrote on August 27, 2010
wrote on August 27, 2010
wrote on August 30, 2010
wrote on August 31, 2010
wrote on August 31, 2010
wrote on September 4, 2010
|