Go to last file in vimWhy argdo applies changes only to the last file?How to edit the next file when VI...

Setting up a Mathematical Institute of Refereeing?

Get date and time when photo was taken

Has the speed of light ever been measured in vacuum?

Help, I cannot decide when to start the story

Are there liquid fueled rocket boosters having coaxial fuel/oxidizer tanks?

What would it take to get a message to another star?

How to gracefully leave a company you helped start?

Why are electric shavers specifically permitted under FAR §91.21

Did Pope Urban II issue the papal bull "terra nullius" in 1095?

Bringing Power Supplies on Plane?

Does an Irish VISA WARNING count as "refused entry at the border of any country other than the UK?"

Source that you can't tell your wife not to lend to others

A+ rating still unsecure by Google Chrome's opinion

What unique challenges/limitations will I face if I start a career as a pilot at 45 years old?

What is the most difficult concept to grasp in Calculus 1?

Why don't modern jet engines use forced exhaust mixing?

How do I ask for 2-3 days per week remote work in a job interview?

Solving pricing problem heuristically in column generation algorithm for VRP

Build a mob of suspiciously happy lenny faces ( ͡° ͜ʖ ͡°)

Scam? Phone call from "Department of Social Security" asking me to call back

tikz block diagonally divided

Doesn't the speed of light limit imply the same electron can be annihilated twice?

How to use Palatino font for text and what about maths?

Quick destruction of a helium filled airship?



Go to last file in vim


Why argdo applies changes only to the last file?How to edit the next file when VI doesn't have buffer support?How to quit one file and simultaneously open another file in vim?“Next” behavior and “E165: Cannot go beyond last file”How can I open the next/previous file alphabetically?How can I easily open two similar files?From one split, how can I get the filename of the file in another split?Cycle between filenames






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







17















Many text files can be opened at once using



vim *txt


I know I can use :<int>n to move forward <int> files, but I don't know how to get to the last opened file. So far I've tried :1000n to intentionally overshoot but that gives the error




E165: Cannot go beyond last file




From there I just resort to a binary search trying to get to the end, which takes a while, i.e., :500n, :250n, 125n, ...



How can I get to the last opened file in vim?










share|improve this question




















  • 3





    :last is correct but if you want to know how many files were on the command line, you can use Ctrl-G in command mode

    – ChatterOne
    yesterday


















17















Many text files can be opened at once using



vim *txt


I know I can use :<int>n to move forward <int> files, but I don't know how to get to the last opened file. So far I've tried :1000n to intentionally overshoot but that gives the error




E165: Cannot go beyond last file




From there I just resort to a binary search trying to get to the end, which takes a while, i.e., :500n, :250n, 125n, ...



How can I get to the last opened file in vim?










share|improve this question




















  • 3





    :last is correct but if you want to know how many files were on the command line, you can use Ctrl-G in command mode

    – ChatterOne
    yesterday














17












17








17








Many text files can be opened at once using



vim *txt


I know I can use :<int>n to move forward <int> files, but I don't know how to get to the last opened file. So far I've tried :1000n to intentionally overshoot but that gives the error




E165: Cannot go beyond last file




From there I just resort to a binary search trying to get to the end, which takes a while, i.e., :500n, :250n, 125n, ...



How can I get to the last opened file in vim?










share|improve this question














Many text files can be opened at once using



vim *txt


I know I can use :<int>n to move forward <int> files, but I don't know how to get to the last opened file. So far I've tried :1000n to intentionally overshoot but that gives the error




E165: Cannot go beyond last file




From there I just resort to a binary search trying to get to the end, which takes a while, i.e., :500n, :250n, 125n, ...



How can I get to the last opened file in vim?







multiple-files






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 2 days ago









user1717828user1717828

2941 silver badge10 bronze badges




2941 silver badge10 bronze badges











  • 3





    :last is correct but if you want to know how many files were on the command line, you can use Ctrl-G in command mode

    – ChatterOne
    yesterday














  • 3





    :last is correct but if you want to know how many files were on the command line, you can use Ctrl-G in command mode

    – ChatterOne
    yesterday








3




3





:last is correct but if you want to know how many files were on the command line, you can use Ctrl-G in command mode

– ChatterOne
yesterday





:last is correct but if you want to know how many files were on the command line, you can use Ctrl-G in command mode

– ChatterOne
yesterday










1 Answer
1






active

oldest

votes


















23














You can use :last.



See :help :last for more details. You might be interested in the other commands around it for managing files in :args as well.






share|improve this answer




























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "599"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fvi.stackexchange.com%2fquestions%2f20898%2fgo-to-last-file-in-vim%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    23














    You can use :last.



    See :help :last for more details. You might be interested in the other commands around it for managing files in :args as well.






    share|improve this answer






























      23














      You can use :last.



      See :help :last for more details. You might be interested in the other commands around it for managing files in :args as well.






      share|improve this answer




























        23












        23








        23







        You can use :last.



        See :help :last for more details. You might be interested in the other commands around it for managing files in :args as well.






        share|improve this answer













        You can use :last.



        See :help :last for more details. You might be interested in the other commands around it for managing files in :args as well.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 2 days ago









        filbrandenfilbranden

        2,1705 silver badges15 bronze badges




        2,1705 silver badges15 bronze badges

































            draft saved

            draft discarded




















































            Thanks for contributing an answer to Vi and Vim Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fvi.stackexchange.com%2fquestions%2f20898%2fgo-to-last-file-in-vim%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Hudson River Historic District Contents Geography History The district today Aesthetics Cultural...

            The number designs the writing. Feandra Aversely Definition: The act of ingrafting a sprig or shoot of one...

            Ayherre Geografie Demografie Externe links Navigatiemenu43° 23′ NB, 1° 15′ WL43° 23′ NB, 1°...