1. <small id='nYxwL'></small><noframes id='nYxwL'>

    2. <tfoot id='nYxwL'></tfoot>

      <i id='nYxwL'><tr id='nYxwL'><dt id='nYxwL'><q id='nYxwL'><span id='nYxwL'><b id='nYxwL'><form id='nYxwL'><ins id='nYxwL'></ins><ul id='nYxwL'></ul><sub id='nYxwL'></sub></form><legend id='nYxwL'></legend><bdo id='nYxwL'><pre id='nYxwL'><center id='nYxwL'></center></pre></bdo></b><th id='nYxwL'></th></span></q></dt></tr></i><div id='nYxwL'><tfoot id='nYxwL'></tfoot><dl id='nYxwL'><fieldset id='nYxwL'></fieldset></dl></div>

        <bdo id='nYxwL'></bdo><ul id='nYxwL'></ul>
      <legend id='nYxwL'><style id='nYxwL'><dir id='nYxwL'><q id='nYxwL'></q></dir></style></legend>

        使用 Vim 编译和运行 C++ 程序

        时间:2023-06-29
        1. <i id='ujlfi'><tr id='ujlfi'><dt id='ujlfi'><q id='ujlfi'><span id='ujlfi'><b id='ujlfi'><form id='ujlfi'><ins id='ujlfi'></ins><ul id='ujlfi'></ul><sub id='ujlfi'></sub></form><legend id='ujlfi'></legend><bdo id='ujlfi'><pre id='ujlfi'><center id='ujlfi'></center></pre></bdo></b><th id='ujlfi'></th></span></q></dt></tr></i><div id='ujlfi'><tfoot id='ujlfi'></tfoot><dl id='ujlfi'><fieldset id='ujlfi'></fieldset></dl></div>

            <tfoot id='ujlfi'></tfoot>

              <bdo id='ujlfi'></bdo><ul id='ujlfi'></ul>

              • <legend id='ujlfi'><style id='ujlfi'><dir id='ujlfi'><q id='ujlfi'></q></dir></style></legend>
                  <tbody id='ujlfi'></tbody>
              • <small id='ujlfi'></small><noframes id='ujlfi'>

                  本文介绍了使用 Vim 编译和运行 C++ 程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我知道这听起来很愚蠢,但我已经在 Vim 编辑器上编写了 C++ 代码,而且我一生都无法弄清楚如何编译和运行它.我知道这非常简单,但我已经醒了太久了感谢您的帮助!

                  I know this sounds really dumb, but I've written a C++ code on Vim editor and for the life of me cannot figure out how to compile and run it. I know this is extremely simple but I've been awake for far too long Thanks for the help!

                  推荐答案

                  只需输入vim:

                  :wq
                  

                  然后,在您的命令行上调用 compiler,它不是 vim 而是 g++clang++或类似的东西:

                  then, on your command line, invoke the compiler which isn't vim but g++ or clang++ or something like:

                  g++ -o myCode myCode.cpp
                  

                  所有在位的选民请阅读该男子本人 Bram Moolenaar 撰写的 vim 用户手册的第 21 节,标题为:走开,然后回来".:help user-manual 会带你到那里.他基本上说在vim中编译或保存并退出,编译然后回来都很酷.根据本节的标题,我认为 Bram 更喜欢后者.他肯定已经精心制作了 vim 以最出色的方式处理后者.当我返回"到任何文件时:光标位于同一行和同一列,我可以像以前一样撤消和重做,我所有的历史记录、搜索、注册以及一切都与我离开时完全一样.和我走的时候基本看不出什么区别!

                  All you down voters please read section 21 of the vim user's manual by the man himself Bram Moolenaar entitled: "Go away and come back". :help user-manual will get you there. Where he basically says it's cool to either compile in vim OR save and exit, compile, and then come back. By the title of the section I presume Bram prefers the later. He most certainly has crafted vim to handle the later in a most excellent manner. When I "come back" to any file: the cursor is at the same row and column, I can undo and redo as before, and all my history, searches, registers, and everything is exactly as I left it. I basically can't see any difference from when I went away!

                  重新再次给所有失望的选民 - 窥视者出于许多不同的原因以多种不同的方式使用 vim.我一直在 shell 级别做很多事情,以至于持续留在 vim 中是非常愚蠢的.显然,您的选民在完全不同的情况下工作,在这些情况下,您最好留在编辑器中.请不要以为所有窥视者的工作方式都与您相同.

                  RE- to all you down voters again - peeps use vim in so many different ways for so many different reasons. I do so much at the shell level all the time that it would be painfully idiotic to remain continuously in vim. You down voters obviously work in completely different situations where you are good to stay inside the editor. Please stop thinking all peeps work the same way as you do.

                  这篇关于使用 Vim 编译和运行 C++ 程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:我可以让 vim 在没有扩展的 C++ 头文件上做语法高亮吗? 下一篇:你在 Vim 中调试 C++ 代码吗?如何?

                  相关文章

                  <i id='EiRCz'><tr id='EiRCz'><dt id='EiRCz'><q id='EiRCz'><span id='EiRCz'><b id='EiRCz'><form id='EiRCz'><ins id='EiRCz'></ins><ul id='EiRCz'></ul><sub id='EiRCz'></sub></form><legend id='EiRCz'></legend><bdo id='EiRCz'><pre id='EiRCz'><center id='EiRCz'></center></pre></bdo></b><th id='EiRCz'></th></span></q></dt></tr></i><div id='EiRCz'><tfoot id='EiRCz'></tfoot><dl id='EiRCz'><fieldset id='EiRCz'></fieldset></dl></div>

                  <small id='EiRCz'></small><noframes id='EiRCz'>

                      <bdo id='EiRCz'></bdo><ul id='EiRCz'></ul>
                    1. <tfoot id='EiRCz'></tfoot>

                    2. <legend id='EiRCz'><style id='EiRCz'><dir id='EiRCz'><q id='EiRCz'></q></dir></style></legend>