Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
05-29-2005, 10:31 PM
|
#1
|
Member
Registered: Sep 2004
Location: Guntur,India
Distribution: FC3 - 64-Bit
Posts: 56
Rep:
|
Using Visual in VIM editor
Hi,
I have so many codes like this ..
00053+
00054 #include <stdio.h>
00055 #include "iso8211.h"
00056 #include "cpl_vsi.h"
00057+
00058 CPL_CVSID("$Id: 8211dump.cpp,v 1.6 2003/11/11 20:53:53 warmerda Exp $");
00059+
00060+
00061 int main( int nArgc, char ** papszArgv )
00062+
00063 {
00064 DDFModule oModule;
00065 const char *pszFilename = NULL;
00066 int bFSPTHack = FALSE;
00067+
00068 /* -------------------------------------------------------------------- */
00069 /* Check arguments. */
00070 /* -------------------------------------------------------------------- */
00071 for( int iArg = 1; iArg < nArgc; iArg++ )
00072 {
00073 if( EQUAL(papszArgv[iArg],"-fspt_repeating") )
00074 bFSPTHack = TRUE;
00075 else
00076 pszFilename = papszArgv[iArg];
00077 }
00078+
00079 if( pszFilename == NULL )
00080 {
00081 printf( "Usage: 8211dump filename\n" );
00082 exit( 1 );
00083 }
00084+
of which I want to remove the numbers at the starting using Visual.. Can any one tell me how to do this in VIM editor .
Thanks in Advance..
|
|
|
05-29-2005, 11:20 PM
|
#2
|
Member
Registered: Dec 2002
Location: In front of a computer
Distribution: UPS, DHL, FedEx
Posts: 466
Rep:
|
select all the lines, then type...
:s#^......##
|
|
|
05-29-2005, 11:49 PM
|
#3
|
Member
Registered: Sep 2004
Location: Guntur,India
Distribution: FC3 - 64-Bit
Posts: 56
Original Poster
Rep:
|
Thank you niknah for replying me...
But after selecting the numbers how to remove them??
|
|
|
05-30-2005, 02:15 AM
|
#4
|
Member
Registered: Dec 2002
Location: In front of a computer
Distribution: UPS, DHL, FedEx
Posts: 466
Rep:
|
I'm not sure what you mean by "visual in vim", do you mean easy mode? Not really sure how to type in commands in easy mode, someone else might know.
in normal vim, type this to remove them...
:s#^......##
...and press enter.
":" should get you into the command at the bottom, and the rest should remove 6 characters from the start of every line you've selected.
|
|
|
06-10-2005, 08:55 AM
|
#5
|
Member
Registered: Sep 2004
Location: Guntur,India
Distribution: FC3 - 64-Bit
Posts: 56
Original Poster
Rep:
|
Ya!! now I got how to do .. We have to use Ctrl+v in Esc mode..and can select how much u want..
|
|
|
All times are GMT -5. The time now is 05:26 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|