How to back to first line using vi

hi,
How can we back to first line when we edit text using vi in unix environment.
Thanks :)

Another useful command is [[
This moves the cursor to the start of the current section (defined by { ) or file if there are no sections defined. Try ]] also.

Similar Messages

  • How to echo the first line???

    Hi everybody,
    I need to know how to echo the first line of an XML document with a SAX parser, for example :
    <?xml version="1.0"?>I've already tried :
    public void processingInstruction(String target, String data) throws SAXException {
            System.out.println("Target = (" + target + ")");
            System.out.println("Data = (" + data + ")");
        }but it doesn't work.
    Please, help me...
    Thanks.
    Maxime.

    http://java.sun.com/webservices/docs/1.0/tutorial/doc/JAXPSAX4.html

  • How to display smartforms table lines useing different background colour

    Hi all:
    How to display smartforms table lines useing different background colour .
    for example:
    line1:green
    line2:red
    line3:green
    line4:red
    line5:green
    line6:red
    line7:green
    line8:red
    Any help is highly appreciated!!
    启明星

    Hi,
    Create a two lines one for header and second for data in the table.
    1)In table painter we can find the pencil mark.
    2)select the pencil mark
    3)now select the line which you need to shade
    4) now select the shading colour in the table painter and the provide the resolution up to 100% and select table pattrn for that line.
    5) Now you can use this for the header now only the header gets shaded and the remaining gets unshaded.
    reward points if useful
    Thanks and Regards,
    Nishant

  • How to filter cancelled PO lines using XML publisher desktop

    Hello,
    I've created a new PO template for printing using XML Publisher Desktop for Word. Output format is in RTF. All data required was printed except when the user canceled a particular PO line, that line will also be printed out with quantity and total amount 0. How can I filter PO lines with "canceled" flag not be printed out? Is it possible to insert conditional statement within the table template? How to do that?
    Thanks in advance

    if you want only test it by XML publisher desktop
    then you can use if statement
    for example in field
    <?if:TAG1='test?>then
    <?TAG2?>then
    <?end if?>for row between (for example)
    <?for-each:G_GROUPNAME?>and
    <?end for-each?>BTW use this method is not correct in my opinion
    if you use "canceled" flag as parameter in concurrent program
    then you may get xml for RTF template only with needed data

  • How to append to next line using RandomAccessFile writeBytes

    Hi,
    How do you append to the next line using RandomAccessFile with writeBytes()
         static public void append(String strfilename, String strRecord)
              RandomAccessFile file;
              try
                   file = new RandomAccessFile(new File(strfilename), "rw");
                   file.seek(file.length());
                   file.writeBytes(strRecord);
                   file.close();
              catch(Exception e)
                   System.exit(1);
    Thanks,
    John

    At this point there is no next line or return key in SMS or BBM, a lot of people have asked for it. It exists on all the other apps for writing, but not on SMS and BBM.  Hopefully BB releases this simple fix for the messaging..

  • How to create 'Planned service line' using BAPI_ENTRYSHEET_CREATE? Pl. help

    I need to create service entry sheet ( SES ) using input data from text file through BAPI_ENTRYSHEET_CREATE.
    If the input contains service line items, which are not present in PO, it should be treated as an unplanned service and correspondingly 'unplanned' indicator is to be set on ML81N ( Service netry sheet ) display.
    I want to make an entry unplanned if the input field external no. ( Field: BAPIESLLC-EXT_LINE ) is not matching with external no. field of corresponding purchase order to which the SES refers.
    The BAPI works fine for all cases except one. If the unplanned service line contains field SERVICE_NO value which is matching with a SERVICE_NO in PO, it is invariable treated by BAPI as  'PLANNED'. ie. BAPI decides whenther a service line is planned or unplanned based on SERVICE_NO only.
    For eg. Let a PO contains one service line with SERVICE_NO value 1008505.
                If SES input file contains 2 service entries with SERVICE_NO value 1008505.
                While creating SES, the BAPI should treat first entry as 'planned' and second line as 'unplanned'.
                But while running the program, both lines are created as 'Planned'  only, since SERVICE_NO value 1008505 exists in the PO.
    I need to set the service line planned/unplanned through my prgram, overriding the automatic setting up of BAPI_ENTRYSHEET_CREATE.
    Hope this clarifies my requirement.
    Grateful if somebody cam provide a solution.
    Thanks & Regards,
    Manju

    Do NOT USE BAPI_SALESORDER_CREATEFROMDATA, that FM is obsolete!
    Use BAPI_SALESORDER_CREATEFROMDAT1 .
    To build a reference to your contract you have to supply ORDER_HEADER_IN.
    Here´s a sample:
    MOVE:
    gs_vbak-vbeln TO ls_bapisdhd1-refobjkey,
    gs_vbak-vbeln TO ls_bapisdhd1-ref_doc,
    gs_vbak-vbtyp TO ls_bapisdhd1-refdoc_cat,
    gs_vbak-auart TO ls_bapisdhd1-refdoctype.
    also gothrouh the links
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/abap%2b-%2bsimple%2bprogram%2bto%2bcreate%2bsales%2border%2busing%2bbapi

  • How to set the First Line of Table UI in Web Dynpro ABAP

    Hi Team,
    I have a scenario where I'm displaying two Table controls one below the other. When a line is selected in the first(Top) table, I have a supply function(Event) and I fill the second(bottom) table. Everything works fine till here.
    The problem starts when I scroll the bottom table. Lets assume that I'm at line 20 of the second table and I press the lead selection to select another line on the first table. Here the second table is filled with new data but it is automatically scrolled to line 20. My questions:
    1) Do I have to set some specific property of the second table? If yes, which one and where should I set it (In the supply function? I already have the "visibleRowCount" set to "10")
    2) How do I dynamically get access to the Table Control properties?
    Thanks for your time

    Thank you Maksim,
    I did set the "selectionMode" to "Auto". I don't understand where In supply function I have to set lead selection of nested node to first element. Please elaborate on this. Are you talking about the context attribute bound to the second table? OR do I have to change the Importing parameters "Node" and "Parent_Element" of my supply function?
    Thanks for your time.

  • I am editing an e book. How do I delete a first line indent?

    In a 'Pages' e-book, how can I delete first-line indent on every paragragh?

    Use can use an intro media image. The first time the ibook is open it will start with that page. However, remember that any other time the ibook is open it will show the last page viewed. This is a behavior that can't be changed.

  • Read the first line of the table.

    Hi,
    Can you pls let me know as to how I read the first line of the table.
    Thx.

    hi check this.
    data: begin of itab occurs 0,
            matnr like mara-matnr ,
            meins like mara-meins,
            end of itab.
    select-options: s_matnr for mara-matnr .
    select matnr
             meins
             from mara
             into table itab
             where matnr in s_matnr .
    read table itab index 1 .
    loop at itab .
    write:/ itab-matnr .
    endloop .
    regards,
    venkat.

  • I updated my ipod touch 4th gen to ios 5 and lost all my photos. how can i get it back? i'm using windows 7.

    I updated my ipod touch 4th gen to ios 5 and lost all my photos. how can i get it back? i'm using windows 7. help please? thanks!

    This was the scenario:
    The first time I updated, it was only my music that was lost.
    When I got my music back, I lost my apps.
    When I got my apps back, my contacts, notes and photos were lost.
    Now I got back everything except for my photos.
    (Yes, I restored from backup several times since the first update.)
    Do you think if I try restoring from back up, my photos that were taken from my ipod will be restored finally?
    Thank you.

  • Pages print in draft mode. first line normal and then the rest faint, how dop I restore this please

    Pages printing in draft mode. First line normal and the rest is faint.
    Please, how do I reset this.
    Thanks
    Bruce

    If you are using a printer (e.g. HP) that has an Economode (powersaver) setting, leave this off. Otherwise, your prints will look washed out as though toner was depleted.
    Since Pages itself does not have a selectable “draft” mode, the focus will be on your printer hardware and configuration.

  • I need to change the "from" address (the "add to addressbook" address) in the first line of emails that I send. How do I do this?

    I need to change the "from" address (the "add to addressbook" address) in the first line of emails that I send so that people reply to my email alias not the address where my emails originate. How do I do this?

    So you have added a new 'Identity' to your existing email address.
    If someone sends an email using that 'other identity'
    you have a choice of where those received emails can go. they can be received into the original mail account, like a collect all in the one Inbox or perhaps sent to Local Folders, so you can see them as separate. Or you can filter on that identity to put those emails in a specific folder.
    When you REply to any incoming mail that has used that new identity email address, it will use the new identity in the Email address in FROM assuming the received email in the main mail account of which the new identity email is applied.
    This should also now offer the added identity email address as an option in the FROM drop down list. So you can easily swap when sending an email if required.
    If you want to send using your default email address to people, but want their reply to use the identity email address:
    Tools > Account Settings
    select the original email address mail account name
    Where it says: 'Reply to addresses: enter the reply to identity email address.
    click on OK
    This means when they click on 'Reply' it will auto insert the Reply-to option.
    This will work providing it is a 'Reply' to an email you sent which contains the Reply-to email address.
    If someone is not actually replying by using the Reply-to new identity email address:
    In other words they are sending you a new email using the original email address because perhaps that is the one in their address book or the one they located on a webpage etc.
    Then, when you select to Reply to that email, it will use the email address to which it was sent to in the FROM field - the original email address. Hence why you would need to select the new identity FROM in the drop down list.
    One way to get around this is set out below.
    If you do not use an identity - instead you create another existing mail account for the 'identity' email address, so you have two mail accounts for the two email addresses.
    You can move selected emails manually or perhaps using a filter to screen them from the original mail account into the newly created mail account.
    Then when you click on Reply, it will use the new mail account email address instead of the original email address.

  • How to set cursor at the first line in a table control?

    Hi,
           I have a customized infotype screen where a table control is being used to input new values.The tab control has 30 lines.Now, the problem is that when the screen is displayed, the cursor always starts at 8th or 4th line.The behaviour is not very consistent.I tried the following statement in the PBO, but no effect.
    SET CURSOR FIELD P9417-ZCOUNTRY LINE 1.  ( P9417-ZCOUNTRY is the name of the tab control field where i want to set the cursor ).This is the last statement in the PBO.
    Can someone please tell me why still I am not able to set the cursor at the first line? I have infact noticed that , in the debugging mode , sometimes the cursor starts at the first line.Please help. Thanks

    I have got a new requirement on this now. If the table control does not have any records , then the cursor position should be on the first row.Otherwise, if it already has some records, then the cursor should be at the first empty row.I wrote the code like below.
    if sy-ucomm = 'INSERT'.
    set cursor 'P9714-ZCOUNTRY'  line 1.
    else if sy-ucomm eq 'CHANGE'.
    describe table itab lines fill.
    fill = fill + 1.
    set cursor 'P9714-ZCOUNTRY'  line fill.
    endif.
    I am facing a strange problem now.The table control has some 10 rows when you see the screen for the first time.If the number of records already present is less than 10, I am able to position the cursor on the first empty row.But if the number is say 15, then the cursor position goes to eighth or fourth line or sometimes the first line.
    Is there any way to display the last few records , ie, if there are 15 records , is there any way to display the last five rows when I see the screen for the first time, rather than showing the first 10 records?How can I position the cursor at the first empty row, when there are more records?
    Thanks in advance..good answers will be rewarded.
    Mahesh

  • Trying to use this() in a constructor, not the first line

    I'm currently re-writing some old code of mine that was used to create a neural network. My main contructor, originally, was
    public Network(int sizeLayer1, int sizeLayer2, int sizeLayer3) Now, however, I've decided that I want to make my network a little more general, and allow any number of layers. Therefore, my revised basic constructor is
    public Network(int[] sizeLayers)which expects an array of ints corresponding to the size of each layer.
    However, I've got some old programs that use the old contructor which I can't change (and anyway, it's good to have the option to be able to use both). I therefore want to create a constructor that has the same signature as the old one, but simply places the values in an array and passes the array to the new constructor.
    public Network(int sizeLayer1, int sizeLayer2, int sizeLayer3) {
      int[] sizeLayers = {sizeLayer1, sizeLayer2, sizeLayer3};
      this(sizeLayers);
    }obviously won't work, because 'this' must be the first line of the constructor. How can I put my values in an array and call the new constructor?
    Thanks!

    Silly me -- I had been trying to do
    this({sizeLayer1, sizeLayer2, sizeLayer3});but of course that wouldn't work.
    Thank you very much for that reply!
    However, more generally, what if I wanted to do a few lines of processing on the variables passed, like adding them together before calling this()? Is there no way to do that? What's the purpose of requiring that this() be the first line in the constructor?
    Thanks!

  • How long did your first wireless back up take??

    After doing the initial back up via ethernet, how long did your first wireless back up take?? I can't seem to get past the preparing stage. However I have recently learned that the first time backing up wirelessly, the finder indexes the back up & this can take a while. I'm leaving it a little longer now. It has been preparing for about half an hour now.
    Is this normal?
    How long does this indexing take?
    What are your experiences?
    Thanks.

    So far for me it's been five days. I hooked up Time Capsule Thursday night, and after monitoring the progress for a few hours, I calculated that it should take three days, which I figured would mean that it should finish up by Sunday evening. (My MacBookPro had 103 gigs on it.)
    It would have been nice if the instructions that came with the **** thing said something up front about hooking up via an ethernet cable for the initial backup. If I had seen those instructions before I started this nightmare, I might be done by now. Instead I started the backup wirelessly, which I'm sure accounts for some of the delay and hassle.
    Unfortunately, the backup pace slowed steadily over the course of the weekend. By Saturday night, it had only done about 60 gigabyites, and by Sunday afternoon, it was only up to around 65. At that pace I figured I might be waiting another week before it finished, and since I actually take my computer with me when I leave my house, this would have deprived me of my computer for an unacceptable period. After doing some internet research and learning that using an ethernet cable would speed up the process, I therefore stopped the wireless backup, hooked up a cable, and restarted it at around 4 p.m. on Sunday afternoon.
    The backup then proceeded steadily at a faster (although not exactly zippy) pace. By midnight it had gotten through about 60 gigabytes, and after timing the rate at which it was proceeding by that time, I estimated that it should finish sometime around 8 p.m. tonight (Monday).
    I left the computer along during the day while I ran errands away from home. When I got back around 6:30, it appeared to have finished the initial backup and to be in the process of finishing up an incremental backup. The progress bar said "backing up 12,443 items...51.3 MB of 51.3 MB." Unfortunately, it seems to be stuck there. It's now 8 p.m., and it still says it's working on those 51.3 MB. I don't know how much longer I should wait before deciding that it's frozen.
    I'd like to just set this thing on fire. I bought the Time Capsule because I liked the idea of wireless, automatic backups. It was supposed to make my life easier, not make it a living ****.

Maybe you are looking for