Quickest way to paste block of text into Vi Editor from external source










7















For instance, copying a conf section from a web page then pasting it into a .conf file that you have open in Vi.










share|improve this question




























    7















    For instance, copying a conf section from a web page then pasting it into a .conf file that you have open in Vi.










    share|improve this question


























      7












      7








      7


      4






      For instance, copying a conf section from a web page then pasting it into a .conf file that you have open in Vi.










      share|improve this question
















      For instance, copying a conf section from a web page then pasting it into a .conf file that you have open in Vi.







      linux text-editor vi






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Aug 4 '12 at 9:58









      Tshepang

      6,1201772113




      6,1201772113










      asked Dec 9 '10 at 19:24









      asfsadfasfsadf

      1,61652639




      1,61652639






















          10 Answers
          10






          active

          oldest

          votes


















          13














          Or if you use the system register, you can paste without being in insert mode:



          "*p


          This will paste the system's clipboard at the point of the cursor. No insert mode needed.








          share|improve this answer




















          • 2





            This won't work over SSH, though (it'll paste from the clipboard of the system you've SSHed into, not your system).

            – Kat
            Oct 23 '14 at 7:34











          • this did NOT look like it would work..

            – Poat
            Nov 9 '18 at 20:41


















          15














          1. Enter insert mode (Type i)

          2. Type: ctrl-shift-v





          share|improve this answer























          • This works with Raspberry Pi. The "*p only pasted from vim's most recent register.

            – rball
            May 11 '16 at 4:41


















          11














          One thing to bear in mind, sometimes Vim auto-indents text. This is mostly fine, but sometimes it messes up text that you paste into a document.



          If your indentations are awry remove the pasted text, type :set paste, paste the text in again, and when you're done type :set nopaste.






          share|improve this answer






























            10














            The real answer:



            1. :set paste


            2. Enter Insert Mode: hit i


            3. Paste: Command + v or Control + v


            4. ESC


            5. :set nopaste






            share|improve this answer

























            • There's a step missing: after step 3, press Esc to exit Insert Mode.

              – boot13
              Aug 27 '17 at 13:33






            • 1





              @boot13 thanks, fixed that

              – Arian Faurtosh
              Nov 13 '18 at 23:06


















            2














            The easiest way is just to copy the text and just right clic where you want to paste it in VIM in INSERT Mode.






            share|improve this answer






























              1














              If you are using gvim, hit CTRL-R then either * or + in insert mode. It will paste last copied text.






              share|improve this answer






























                0














                Ctrl-V/ Apple-V? Just make sure you're in insert mode in vi (i)






                share|improve this answer


















                • 1





                  Doesn't always work because of the auto indentation (and seems to be other issues -- auto quoting or something). If I paste a large block into my .vimrc while in insert mode, I end up with a huge amount of indentation and random comments added.

                  – Kat
                  Oct 23 '14 at 7:35


















                0














                You're systems paste shortcut key while in Insert mode or if your source is another file, you can type :r and it will be pasted at the current location of your cursor.






                share|improve this answer






























                  0














                  Easiest way on *nix is by selecting it with the mouse and pasting it in vim with a middle click, after having put vi in Insert mode.



                  Middle click could be a both left-right key if you're using a touchpad






                  share|improve this answer






























                    0














                    The quickest way is to paste it using whatever paste key your system uses (e.g. ⌘-v for macs, Ctrl-V for windows, etc.) in insert mode. Some terminals require you to use Shift-Ctrl-V. However you are able to paste onto the command-line is how you should paste into vim. However, this can cause some problems with indentation, which is where :set paste comes in. The fastest way to get in and out of this is to set a pastetoggle (see :help pastetoggle). For example, I use



                    set pastetoggle=<leader>p


                    The reason to use a pastetoggle instead of a mapping is because if you set a mapping insert mode will read it literally when in paste mode. Thus if you :set paste, go into insert mode, and type in any imap the mapping will not be completed but instead the literal characters will be inserted. With pastetoggle you can get around that since it's a builtin feature.



                    As others have said if you're in insert mode you can also use <C-r>*, but why? Your normal pasting flow is most likely better. Understanding the * register and <C-r> is an important skill however. You can read more about them at :help registers and :help i_CTRL-R. You could also use "*p but if you're faster at typing that then your normal paste I'm impressed. Of course you could map that to something else, but again... why? You should get used to quickly getting into insert mode with i, I, a, A, o, O, s, S, c, and C so that you can be precise.






                    share|improve this answer






















                      Your Answer






                      StackExchange.ifUsing("editor", function ()
                      StackExchange.using("externalEditor", function ()
                      StackExchange.using("snippets", function ()
                      StackExchange.snippets.init();
                      );
                      );
                      , "code-snippets");

                      StackExchange.ready(function()
                      var channelOptions =
                      tags: "".split(" "),
                      id: "1"
                      ;
                      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: true,
                      noModals: true,
                      showLowRepImageUploadWarning: true,
                      reputationToPostImages: 10,
                      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%2fstackoverflow.com%2fquestions%2f4402198%2fquickest-way-to-paste-block-of-text-into-vi-editor-from-external-source%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown

























                      10 Answers
                      10






                      active

                      oldest

                      votes








                      10 Answers
                      10






                      active

                      oldest

                      votes









                      active

                      oldest

                      votes






                      active

                      oldest

                      votes









                      13














                      Or if you use the system register, you can paste without being in insert mode:



                      "*p


                      This will paste the system's clipboard at the point of the cursor. No insert mode needed.








                      share|improve this answer




















                      • 2





                        This won't work over SSH, though (it'll paste from the clipboard of the system you've SSHed into, not your system).

                        – Kat
                        Oct 23 '14 at 7:34











                      • this did NOT look like it would work..

                        – Poat
                        Nov 9 '18 at 20:41















                      13














                      Or if you use the system register, you can paste without being in insert mode:



                      "*p


                      This will paste the system's clipboard at the point of the cursor. No insert mode needed.








                      share|improve this answer




















                      • 2





                        This won't work over SSH, though (it'll paste from the clipboard of the system you've SSHed into, not your system).

                        – Kat
                        Oct 23 '14 at 7:34











                      • this did NOT look like it would work..

                        – Poat
                        Nov 9 '18 at 20:41













                      13












                      13








                      13







                      Or if you use the system register, you can paste without being in insert mode:



                      "*p


                      This will paste the system's clipboard at the point of the cursor. No insert mode needed.








                      share|improve this answer















                      Or if you use the system register, you can paste without being in insert mode:



                      "*p


                      This will paste the system's clipboard at the point of the cursor. No insert mode needed.









                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Apr 24 '17 at 15:03









                      Riker

                      219617




                      219617










                      answered Dec 9 '10 at 21:21









                      Jordan ParmerJordan Parmer

                      20.4k2086112




                      20.4k2086112







                      • 2





                        This won't work over SSH, though (it'll paste from the clipboard of the system you've SSHed into, not your system).

                        – Kat
                        Oct 23 '14 at 7:34











                      • this did NOT look like it would work..

                        – Poat
                        Nov 9 '18 at 20:41












                      • 2





                        This won't work over SSH, though (it'll paste from the clipboard of the system you've SSHed into, not your system).

                        – Kat
                        Oct 23 '14 at 7:34











                      • this did NOT look like it would work..

                        – Poat
                        Nov 9 '18 at 20:41







                      2




                      2





                      This won't work over SSH, though (it'll paste from the clipboard of the system you've SSHed into, not your system).

                      – Kat
                      Oct 23 '14 at 7:34





                      This won't work over SSH, though (it'll paste from the clipboard of the system you've SSHed into, not your system).

                      – Kat
                      Oct 23 '14 at 7:34













                      this did NOT look like it would work..

                      – Poat
                      Nov 9 '18 at 20:41





                      this did NOT look like it would work..

                      – Poat
                      Nov 9 '18 at 20:41













                      15














                      1. Enter insert mode (Type i)

                      2. Type: ctrl-shift-v





                      share|improve this answer























                      • This works with Raspberry Pi. The "*p only pasted from vim's most recent register.

                        – rball
                        May 11 '16 at 4:41















                      15














                      1. Enter insert mode (Type i)

                      2. Type: ctrl-shift-v





                      share|improve this answer























                      • This works with Raspberry Pi. The "*p only pasted from vim's most recent register.

                        – rball
                        May 11 '16 at 4:41













                      15












                      15








                      15







                      1. Enter insert mode (Type i)

                      2. Type: ctrl-shift-v





                      share|improve this answer













                      1. Enter insert mode (Type i)

                      2. Type: ctrl-shift-v






                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Aug 16 '13 at 12:34









                      RationalPiRationalPi

                      16113




                      16113












                      • This works with Raspberry Pi. The "*p only pasted from vim's most recent register.

                        – rball
                        May 11 '16 at 4:41

















                      • This works with Raspberry Pi. The "*p only pasted from vim's most recent register.

                        – rball
                        May 11 '16 at 4:41
















                      This works with Raspberry Pi. The "*p only pasted from vim's most recent register.

                      – rball
                      May 11 '16 at 4:41





                      This works with Raspberry Pi. The "*p only pasted from vim's most recent register.

                      – rball
                      May 11 '16 at 4:41











                      11














                      One thing to bear in mind, sometimes Vim auto-indents text. This is mostly fine, but sometimes it messes up text that you paste into a document.



                      If your indentations are awry remove the pasted text, type :set paste, paste the text in again, and when you're done type :set nopaste.






                      share|improve this answer



























                        11














                        One thing to bear in mind, sometimes Vim auto-indents text. This is mostly fine, but sometimes it messes up text that you paste into a document.



                        If your indentations are awry remove the pasted text, type :set paste, paste the text in again, and when you're done type :set nopaste.






                        share|improve this answer

























                          11












                          11








                          11







                          One thing to bear in mind, sometimes Vim auto-indents text. This is mostly fine, but sometimes it messes up text that you paste into a document.



                          If your indentations are awry remove the pasted text, type :set paste, paste the text in again, and when you're done type :set nopaste.






                          share|improve this answer













                          One thing to bear in mind, sometimes Vim auto-indents text. This is mostly fine, but sometimes it messes up text that you paste into a document.



                          If your indentations are awry remove the pasted text, type :set paste, paste the text in again, and when you're done type :set nopaste.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Dec 9 '10 at 21:40









                          mattmatt

                          1338




                          1338





















                              10














                              The real answer:



                              1. :set paste


                              2. Enter Insert Mode: hit i


                              3. Paste: Command + v or Control + v


                              4. ESC


                              5. :set nopaste






                              share|improve this answer

























                              • There's a step missing: after step 3, press Esc to exit Insert Mode.

                                – boot13
                                Aug 27 '17 at 13:33






                              • 1





                                @boot13 thanks, fixed that

                                – Arian Faurtosh
                                Nov 13 '18 at 23:06















                              10














                              The real answer:



                              1. :set paste


                              2. Enter Insert Mode: hit i


                              3. Paste: Command + v or Control + v


                              4. ESC


                              5. :set nopaste






                              share|improve this answer

























                              • There's a step missing: after step 3, press Esc to exit Insert Mode.

                                – boot13
                                Aug 27 '17 at 13:33






                              • 1





                                @boot13 thanks, fixed that

                                – Arian Faurtosh
                                Nov 13 '18 at 23:06













                              10












                              10








                              10







                              The real answer:



                              1. :set paste


                              2. Enter Insert Mode: hit i


                              3. Paste: Command + v or Control + v


                              4. ESC


                              5. :set nopaste






                              share|improve this answer















                              The real answer:



                              1. :set paste


                              2. Enter Insert Mode: hit i


                              3. Paste: Command + v or Control + v


                              4. ESC


                              5. :set nopaste







                              share|improve this answer














                              share|improve this answer



                              share|improve this answer








                              edited Nov 13 '18 at 23:05

























                              answered Nov 11 '15 at 7:12









                              Arian FaurtoshArian Faurtosh

                              8,692156192




                              8,692156192












                              • There's a step missing: after step 3, press Esc to exit Insert Mode.

                                – boot13
                                Aug 27 '17 at 13:33






                              • 1





                                @boot13 thanks, fixed that

                                – Arian Faurtosh
                                Nov 13 '18 at 23:06

















                              • There's a step missing: after step 3, press Esc to exit Insert Mode.

                                – boot13
                                Aug 27 '17 at 13:33






                              • 1





                                @boot13 thanks, fixed that

                                – Arian Faurtosh
                                Nov 13 '18 at 23:06
















                              There's a step missing: after step 3, press Esc to exit Insert Mode.

                              – boot13
                              Aug 27 '17 at 13:33





                              There's a step missing: after step 3, press Esc to exit Insert Mode.

                              – boot13
                              Aug 27 '17 at 13:33




                              1




                              1





                              @boot13 thanks, fixed that

                              – Arian Faurtosh
                              Nov 13 '18 at 23:06





                              @boot13 thanks, fixed that

                              – Arian Faurtosh
                              Nov 13 '18 at 23:06











                              2














                              The easiest way is just to copy the text and just right clic where you want to paste it in VIM in INSERT Mode.






                              share|improve this answer



























                                2














                                The easiest way is just to copy the text and just right clic where you want to paste it in VIM in INSERT Mode.






                                share|improve this answer

























                                  2












                                  2








                                  2







                                  The easiest way is just to copy the text and just right clic where you want to paste it in VIM in INSERT Mode.






                                  share|improve this answer













                                  The easiest way is just to copy the text and just right clic where you want to paste it in VIM in INSERT Mode.







                                  share|improve this answer












                                  share|improve this answer



                                  share|improve this answer










                                  answered Apr 28 '16 at 0:47









                                  BarthBarth

                                  211




                                  211





















                                      1














                                      If you are using gvim, hit CTRL-R then either * or + in insert mode. It will paste last copied text.






                                      share|improve this answer



























                                        1














                                        If you are using gvim, hit CTRL-R then either * or + in insert mode. It will paste last copied text.






                                        share|improve this answer

























                                          1












                                          1








                                          1







                                          If you are using gvim, hit CTRL-R then either * or + in insert mode. It will paste last copied text.






                                          share|improve this answer













                                          If you are using gvim, hit CTRL-R then either * or + in insert mode. It will paste last copied text.







                                          share|improve this answer












                                          share|improve this answer



                                          share|improve this answer










                                          answered Dec 9 '10 at 20:24









                                          BenoitBenoit

                                          59.1k15168212




                                          59.1k15168212





















                                              0














                                              Ctrl-V/ Apple-V? Just make sure you're in insert mode in vi (i)






                                              share|improve this answer


















                                              • 1





                                                Doesn't always work because of the auto indentation (and seems to be other issues -- auto quoting or something). If I paste a large block into my .vimrc while in insert mode, I end up with a huge amount of indentation and random comments added.

                                                – Kat
                                                Oct 23 '14 at 7:35















                                              0














                                              Ctrl-V/ Apple-V? Just make sure you're in insert mode in vi (i)






                                              share|improve this answer


















                                              • 1





                                                Doesn't always work because of the auto indentation (and seems to be other issues -- auto quoting or something). If I paste a large block into my .vimrc while in insert mode, I end up with a huge amount of indentation and random comments added.

                                                – Kat
                                                Oct 23 '14 at 7:35













                                              0












                                              0








                                              0







                                              Ctrl-V/ Apple-V? Just make sure you're in insert mode in vi (i)






                                              share|improve this answer













                                              Ctrl-V/ Apple-V? Just make sure you're in insert mode in vi (i)







                                              share|improve this answer












                                              share|improve this answer



                                              share|improve this answer










                                              answered Dec 9 '10 at 19:26









                                              Tyler EavesTyler Eaves

                                              8,65812537




                                              8,65812537







                                              • 1





                                                Doesn't always work because of the auto indentation (and seems to be other issues -- auto quoting or something). If I paste a large block into my .vimrc while in insert mode, I end up with a huge amount of indentation and random comments added.

                                                – Kat
                                                Oct 23 '14 at 7:35












                                              • 1





                                                Doesn't always work because of the auto indentation (and seems to be other issues -- auto quoting or something). If I paste a large block into my .vimrc while in insert mode, I end up with a huge amount of indentation and random comments added.

                                                – Kat
                                                Oct 23 '14 at 7:35







                                              1




                                              1





                                              Doesn't always work because of the auto indentation (and seems to be other issues -- auto quoting or something). If I paste a large block into my .vimrc while in insert mode, I end up with a huge amount of indentation and random comments added.

                                              – Kat
                                              Oct 23 '14 at 7:35





                                              Doesn't always work because of the auto indentation (and seems to be other issues -- auto quoting or something). If I paste a large block into my .vimrc while in insert mode, I end up with a huge amount of indentation and random comments added.

                                              – Kat
                                              Oct 23 '14 at 7:35











                                              0














                                              You're systems paste shortcut key while in Insert mode or if your source is another file, you can type :r and it will be pasted at the current location of your cursor.






                                              share|improve this answer



























                                                0














                                                You're systems paste shortcut key while in Insert mode or if your source is another file, you can type :r and it will be pasted at the current location of your cursor.






                                                share|improve this answer

























                                                  0












                                                  0








                                                  0







                                                  You're systems paste shortcut key while in Insert mode or if your source is another file, you can type :r and it will be pasted at the current location of your cursor.






                                                  share|improve this answer













                                                  You're systems paste shortcut key while in Insert mode or if your source is another file, you can type :r and it will be pasted at the current location of your cursor.







                                                  share|improve this answer












                                                  share|improve this answer



                                                  share|improve this answer










                                                  answered Dec 9 '10 at 19:28









                                                  Ronnie HowellRonnie Howell

                                                  60938




                                                  60938





















                                                      0














                                                      Easiest way on *nix is by selecting it with the mouse and pasting it in vim with a middle click, after having put vi in Insert mode.



                                                      Middle click could be a both left-right key if you're using a touchpad






                                                      share|improve this answer



























                                                        0














                                                        Easiest way on *nix is by selecting it with the mouse and pasting it in vim with a middle click, after having put vi in Insert mode.



                                                        Middle click could be a both left-right key if you're using a touchpad






                                                        share|improve this answer

























                                                          0












                                                          0








                                                          0







                                                          Easiest way on *nix is by selecting it with the mouse and pasting it in vim with a middle click, after having put vi in Insert mode.



                                                          Middle click could be a both left-right key if you're using a touchpad






                                                          share|improve this answer













                                                          Easiest way on *nix is by selecting it with the mouse and pasting it in vim with a middle click, after having put vi in Insert mode.



                                                          Middle click could be a both left-right key if you're using a touchpad







                                                          share|improve this answer












                                                          share|improve this answer



                                                          share|improve this answer










                                                          answered Dec 10 '10 at 9:38









                                                          MetiuMetiu

                                                          1,03211123




                                                          1,03211123





















                                                              0














                                                              The quickest way is to paste it using whatever paste key your system uses (e.g. ⌘-v for macs, Ctrl-V for windows, etc.) in insert mode. Some terminals require you to use Shift-Ctrl-V. However you are able to paste onto the command-line is how you should paste into vim. However, this can cause some problems with indentation, which is where :set paste comes in. The fastest way to get in and out of this is to set a pastetoggle (see :help pastetoggle). For example, I use



                                                              set pastetoggle=<leader>p


                                                              The reason to use a pastetoggle instead of a mapping is because if you set a mapping insert mode will read it literally when in paste mode. Thus if you :set paste, go into insert mode, and type in any imap the mapping will not be completed but instead the literal characters will be inserted. With pastetoggle you can get around that since it's a builtin feature.



                                                              As others have said if you're in insert mode you can also use <C-r>*, but why? Your normal pasting flow is most likely better. Understanding the * register and <C-r> is an important skill however. You can read more about them at :help registers and :help i_CTRL-R. You could also use "*p but if you're faster at typing that then your normal paste I'm impressed. Of course you could map that to something else, but again... why? You should get used to quickly getting into insert mode with i, I, a, A, o, O, s, S, c, and C so that you can be precise.






                                                              share|improve this answer



























                                                                0














                                                                The quickest way is to paste it using whatever paste key your system uses (e.g. ⌘-v for macs, Ctrl-V for windows, etc.) in insert mode. Some terminals require you to use Shift-Ctrl-V. However you are able to paste onto the command-line is how you should paste into vim. However, this can cause some problems with indentation, which is where :set paste comes in. The fastest way to get in and out of this is to set a pastetoggle (see :help pastetoggle). For example, I use



                                                                set pastetoggle=<leader>p


                                                                The reason to use a pastetoggle instead of a mapping is because if you set a mapping insert mode will read it literally when in paste mode. Thus if you :set paste, go into insert mode, and type in any imap the mapping will not be completed but instead the literal characters will be inserted. With pastetoggle you can get around that since it's a builtin feature.



                                                                As others have said if you're in insert mode you can also use <C-r>*, but why? Your normal pasting flow is most likely better. Understanding the * register and <C-r> is an important skill however. You can read more about them at :help registers and :help i_CTRL-R. You could also use "*p but if you're faster at typing that then your normal paste I'm impressed. Of course you could map that to something else, but again... why? You should get used to quickly getting into insert mode with i, I, a, A, o, O, s, S, c, and C so that you can be precise.






                                                                share|improve this answer

























                                                                  0












                                                                  0








                                                                  0







                                                                  The quickest way is to paste it using whatever paste key your system uses (e.g. ⌘-v for macs, Ctrl-V for windows, etc.) in insert mode. Some terminals require you to use Shift-Ctrl-V. However you are able to paste onto the command-line is how you should paste into vim. However, this can cause some problems with indentation, which is where :set paste comes in. The fastest way to get in and out of this is to set a pastetoggle (see :help pastetoggle). For example, I use



                                                                  set pastetoggle=<leader>p


                                                                  The reason to use a pastetoggle instead of a mapping is because if you set a mapping insert mode will read it literally when in paste mode. Thus if you :set paste, go into insert mode, and type in any imap the mapping will not be completed but instead the literal characters will be inserted. With pastetoggle you can get around that since it's a builtin feature.



                                                                  As others have said if you're in insert mode you can also use <C-r>*, but why? Your normal pasting flow is most likely better. Understanding the * register and <C-r> is an important skill however. You can read more about them at :help registers and :help i_CTRL-R. You could also use "*p but if you're faster at typing that then your normal paste I'm impressed. Of course you could map that to something else, but again... why? You should get used to quickly getting into insert mode with i, I, a, A, o, O, s, S, c, and C so that you can be precise.






                                                                  share|improve this answer













                                                                  The quickest way is to paste it using whatever paste key your system uses (e.g. ⌘-v for macs, Ctrl-V for windows, etc.) in insert mode. Some terminals require you to use Shift-Ctrl-V. However you are able to paste onto the command-line is how you should paste into vim. However, this can cause some problems with indentation, which is where :set paste comes in. The fastest way to get in and out of this is to set a pastetoggle (see :help pastetoggle). For example, I use



                                                                  set pastetoggle=<leader>p


                                                                  The reason to use a pastetoggle instead of a mapping is because if you set a mapping insert mode will read it literally when in paste mode. Thus if you :set paste, go into insert mode, and type in any imap the mapping will not be completed but instead the literal characters will be inserted. With pastetoggle you can get around that since it's a builtin feature.



                                                                  As others have said if you're in insert mode you can also use <C-r>*, but why? Your normal pasting flow is most likely better. Understanding the * register and <C-r> is an important skill however. You can read more about them at :help registers and :help i_CTRL-R. You could also use "*p but if you're faster at typing that then your normal paste I'm impressed. Of course you could map that to something else, but again... why? You should get used to quickly getting into insert mode with i, I, a, A, o, O, s, S, c, and C so that you can be precise.







                                                                  share|improve this answer












                                                                  share|improve this answer



                                                                  share|improve this answer










                                                                  answered Aug 4 '12 at 15:34









                                                                  ConnerConner

                                                                  23.3k84568




                                                                  23.3k84568



























                                                                      draft saved

                                                                      draft discarded
















































                                                                      Thanks for contributing an answer to Stack Overflow!


                                                                      • 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%2fstackoverflow.com%2fquestions%2f4402198%2fquickest-way-to-paste-block-of-text-into-vi-editor-from-external-source%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







                                                                      這個網誌中的熱門文章

                                                                      How to read a connectionString WITH PROVIDER in .NET Core?

                                                                      Node.js Script on GitHub Pages or Amazon S3

                                                                      Museum of Modern and Contemporary Art of Trento and Rovereto