Vimscript - Surround word under cursor with quotesVimscript insert after cursorHow to add a control character inside a string executed by the execute command?Mapping { with VimscriptSearching with vimscript functionIdentify syntax region under cursormystery cursor motionTrouble using <cword> in mappingGet the column that the cursor is on in vimscriptHow to write a vimscript to replace the word under cursor in i mode?Vi shortcut to execute line under cursor as a command

Why don't they build airplanes from 3D printer plastic?

Is a paralyzed creature limp or rigid?

Are treasury bonds more liquid than USD?

Why is に used with this verb?

Is it possible to observe space debris with Binoculars?

To which airspace does the border of two adjacent airspaces belong to?

Do 643,000 Americans go bankrupt every year due to medical bills?

Numerical minimum of a one-valued function

How could a planet have one hemisphere way warmer than the other without the planet being tidally locked?

Never make public members virtual/abstract - really?

If I sell my PS4 game disc and buy a digital version, can I still access my saved game?

What drugs were used in England during the High Middle Ages?

MOSFET broke after attaching capacitor bank

Project Euler Problem 45

Why are all volatile liquids combustible

Comparing elements in a nested list to generate a new list

Why doesn't GMAC/GCM encrypt its authentication tag?

What quests do you need to stop at before you make an enemy of a faction for each faction?

Does blackhole merging breaks their event horizon seggregation?

Was Rosie the Riveter sourced from a Michelangelo painting?

First Number to Contain Each Letter

Why there is no wireless switch?

In-universe, why does Doc Brown program the time machine to go to 1955?

How can I oppose my advisor granting gift authorship to a collaborator?



Vimscript - Surround word under cursor with quotes


Vimscript insert after cursorHow to add a control character inside a string executed by the execute command?Mapping { with VimscriptSearching with vimscript functionIdentify syntax region under cursormystery cursor motionTrouble using <cword> in mappingGet the column that the cursor is on in vimscriptHow to write a vimscript to replace the word under cursor in i mode?Vi shortcut to execute line under cursor as a command






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








2















I'm writing a Vim plugin which will need to surround the word directly under your cursor with a quotes. I have tried using simple solutions which use commands like "b" and "e" executed in normal mode, in combination with other cursor position commands, though those felt clunky and non-robust.



I wondered if there was perhaps, a builtin way to surround text, or a more expedient method of doing so.










share|improve this question









New contributor



Ryan Fredez is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 2





    Welcome to Vi and Vim! As it stands, your question asks for answers for which it is hard to judge the best—words like simplest and fastest can be subjective and solicit answers based on opinion rather than fact and experience. That doesnt work well with the StackExchange mode. Please edit your question to clarify your goals and make them objective. [side note: have a look at tpope’s surround.vim on github]

    – D. Ben Knoble
    8 hours ago

















2















I'm writing a Vim plugin which will need to surround the word directly under your cursor with a quotes. I have tried using simple solutions which use commands like "b" and "e" executed in normal mode, in combination with other cursor position commands, though those felt clunky and non-robust.



I wondered if there was perhaps, a builtin way to surround text, or a more expedient method of doing so.










share|improve this question









New contributor



Ryan Fredez is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 2





    Welcome to Vi and Vim! As it stands, your question asks for answers for which it is hard to judge the best—words like simplest and fastest can be subjective and solicit answers based on opinion rather than fact and experience. That doesnt work well with the StackExchange mode. Please edit your question to clarify your goals and make them objective. [side note: have a look at tpope’s surround.vim on github]

    – D. Ben Knoble
    8 hours ago













2












2








2








I'm writing a Vim plugin which will need to surround the word directly under your cursor with a quotes. I have tried using simple solutions which use commands like "b" and "e" executed in normal mode, in combination with other cursor position commands, though those felt clunky and non-robust.



I wondered if there was perhaps, a builtin way to surround text, or a more expedient method of doing so.










share|improve this question









New contributor



Ryan Fredez is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I'm writing a Vim plugin which will need to surround the word directly under your cursor with a quotes. I have tried using simple solutions which use commands like "b" and "e" executed in normal mode, in combination with other cursor position commands, though those felt clunky and non-robust.



I wondered if there was perhaps, a builtin way to surround text, or a more expedient method of doing so.







vimscript






share|improve this question









New contributor



Ryan Fredez is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.










share|improve this question









New contributor



Ryan Fredez is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








share|improve this question




share|improve this question








edited 7 hours ago







Ryan Fredez













New contributor



Ryan Fredez is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








asked 9 hours ago









Ryan FredezRyan Fredez

133 bronze badges




133 bronze badges




New contributor



Ryan Fredez is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




New contributor




Ryan Fredez is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • 2





    Welcome to Vi and Vim! As it stands, your question asks for answers for which it is hard to judge the best—words like simplest and fastest can be subjective and solicit answers based on opinion rather than fact and experience. That doesnt work well with the StackExchange mode. Please edit your question to clarify your goals and make them objective. [side note: have a look at tpope’s surround.vim on github]

    – D. Ben Knoble
    8 hours ago












  • 2





    Welcome to Vi and Vim! As it stands, your question asks for answers for which it is hard to judge the best—words like simplest and fastest can be subjective and solicit answers based on opinion rather than fact and experience. That doesnt work well with the StackExchange mode. Please edit your question to clarify your goals and make them objective. [side note: have a look at tpope’s surround.vim on github]

    – D. Ben Knoble
    8 hours ago







2




2





Welcome to Vi and Vim! As it stands, your question asks for answers for which it is hard to judge the best—words like simplest and fastest can be subjective and solicit answers based on opinion rather than fact and experience. That doesnt work well with the StackExchange mode. Please edit your question to clarify your goals and make them objective. [side note: have a look at tpope’s surround.vim on github]

– D. Ben Knoble
8 hours ago





Welcome to Vi and Vim! As it stands, your question asks for answers for which it is hard to judge the best—words like simplest and fastest can be subjective and solicit answers based on opinion rather than fact and experience. That doesnt work well with the StackExchange mode. Please edit your question to clarify your goals and make them objective. [side note: have a look at tpope’s surround.vim on github]

– D. Ben Knoble
8 hours ago










2 Answers
2






active

oldest

votes


















3
















You can surround the word currently under the cursor in quotes with the following normal mode commands:



ciw""EscP



Replace iw with any other Vim motion/text object to surround other things with quotes*. Or "" with any other pair of characters to surround the object with different things.



If you want to surround the object with a longer piece of text, such as an HTML <p> tag, you can use Ctrl-R instead of the P put command:



ciw<p>Ctrl-R"</p>Esc



See :help i_CTRL-R for more details.



This latter command performs the change as a single edit, and thus is repeatable with the . command, but as discussed in the comments, when you repeat the command, it will enter the text from the original change command. However, as @user938271 explains, you can workaround this by using Ctrl-RCtrl-O or Ctrl-RCtrl-P instead of a plain Ctrl-R when inserting the contents of the register, making it easy to apply the edit quickly in several different places.



* Or use c from visual mode to surround text that is hard to describe with a single motion.






share|improve this answer






















  • 1





    +1 for the second answer using <C-r>" (also possible: <C-r>-, when you're changing less than a line.) Using that combination allows you to undo the operation with a single u. It also allows you to repeat with ., though in that case the repeat will insert the same text as the first time, which can be useful if you're quoting the same exact word over and over again.

    – filbranden
    6 hours ago






  • 2





    @filbranden: If you want the dot command to use the last deleted word (and not always the first), during the first edition, you can press C-r C-o " or C-r C-p " (instead of just C-r ") to insert the deleted word back into the buffer.

    – user938271
    4 hours ago












  • @user938271 That is just AMAZING!!! So glad I learned about this one today. I'm still reading the docs, trying to understand why this works. But it's so great that it does! Thanks for pointing this out. If you write this as an answer, I'll upvote it for sure, as far as I can tell that's the best way to execute this operation!

    – filbranden
    3 hours ago






  • 1





    @filbranden: Reading the docs, it's unclear to me, too. But I think the difference is that C-r inserts the text "as if you typed it, but mappings and abbreviations are not used" - meaning that . doesn't "remember" the command C-r ", just the actual text that it expanded to (because that's what would have happened if you had typed it). But IMHO the docs really ought to call that out, if that's what is meant.

    – Kevin
    7 mins ago



















2
















Yes, a plug-in for surrounding with quotes exists! vim-surround is what you're looking for.



To surround the current word in double quotes, you can use ysiw" once you have the plug-in installed.



ys is the command to surround and object (there's also cs to replace one delmiter with another, ds to remove surrounding), then iw is a text-object defining what to surround and finally " is what to surround it with.



You might want to read the docs for vim-surround to see all that it can do. It's really a lot!






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
    );



    );






    Ryan Fredez is a new contributor. Be nice, and check out our Code of Conduct.









    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fvi.stackexchange.com%2fquestions%2f21113%2fvimscript-surround-word-under-cursor-with-quotes%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    3
















    You can surround the word currently under the cursor in quotes with the following normal mode commands:



    ciw""EscP



    Replace iw with any other Vim motion/text object to surround other things with quotes*. Or "" with any other pair of characters to surround the object with different things.



    If you want to surround the object with a longer piece of text, such as an HTML <p> tag, you can use Ctrl-R instead of the P put command:



    ciw<p>Ctrl-R"</p>Esc



    See :help i_CTRL-R for more details.



    This latter command performs the change as a single edit, and thus is repeatable with the . command, but as discussed in the comments, when you repeat the command, it will enter the text from the original change command. However, as @user938271 explains, you can workaround this by using Ctrl-RCtrl-O or Ctrl-RCtrl-P instead of a plain Ctrl-R when inserting the contents of the register, making it easy to apply the edit quickly in several different places.



    * Or use c from visual mode to surround text that is hard to describe with a single motion.






    share|improve this answer






















    • 1





      +1 for the second answer using <C-r>" (also possible: <C-r>-, when you're changing less than a line.) Using that combination allows you to undo the operation with a single u. It also allows you to repeat with ., though in that case the repeat will insert the same text as the first time, which can be useful if you're quoting the same exact word over and over again.

      – filbranden
      6 hours ago






    • 2





      @filbranden: If you want the dot command to use the last deleted word (and not always the first), during the first edition, you can press C-r C-o " or C-r C-p " (instead of just C-r ") to insert the deleted word back into the buffer.

      – user938271
      4 hours ago












    • @user938271 That is just AMAZING!!! So glad I learned about this one today. I'm still reading the docs, trying to understand why this works. But it's so great that it does! Thanks for pointing this out. If you write this as an answer, I'll upvote it for sure, as far as I can tell that's the best way to execute this operation!

      – filbranden
      3 hours ago






    • 1





      @filbranden: Reading the docs, it's unclear to me, too. But I think the difference is that C-r inserts the text "as if you typed it, but mappings and abbreviations are not used" - meaning that . doesn't "remember" the command C-r ", just the actual text that it expanded to (because that's what would have happened if you had typed it). But IMHO the docs really ought to call that out, if that's what is meant.

      – Kevin
      7 mins ago
















    3
















    You can surround the word currently under the cursor in quotes with the following normal mode commands:



    ciw""EscP



    Replace iw with any other Vim motion/text object to surround other things with quotes*. Or "" with any other pair of characters to surround the object with different things.



    If you want to surround the object with a longer piece of text, such as an HTML <p> tag, you can use Ctrl-R instead of the P put command:



    ciw<p>Ctrl-R"</p>Esc



    See :help i_CTRL-R for more details.



    This latter command performs the change as a single edit, and thus is repeatable with the . command, but as discussed in the comments, when you repeat the command, it will enter the text from the original change command. However, as @user938271 explains, you can workaround this by using Ctrl-RCtrl-O or Ctrl-RCtrl-P instead of a plain Ctrl-R when inserting the contents of the register, making it easy to apply the edit quickly in several different places.



    * Or use c from visual mode to surround text that is hard to describe with a single motion.






    share|improve this answer






















    • 1





      +1 for the second answer using <C-r>" (also possible: <C-r>-, when you're changing less than a line.) Using that combination allows you to undo the operation with a single u. It also allows you to repeat with ., though in that case the repeat will insert the same text as the first time, which can be useful if you're quoting the same exact word over and over again.

      – filbranden
      6 hours ago






    • 2





      @filbranden: If you want the dot command to use the last deleted word (and not always the first), during the first edition, you can press C-r C-o " or C-r C-p " (instead of just C-r ") to insert the deleted word back into the buffer.

      – user938271
      4 hours ago












    • @user938271 That is just AMAZING!!! So glad I learned about this one today. I'm still reading the docs, trying to understand why this works. But it's so great that it does! Thanks for pointing this out. If you write this as an answer, I'll upvote it for sure, as far as I can tell that's the best way to execute this operation!

      – filbranden
      3 hours ago






    • 1





      @filbranden: Reading the docs, it's unclear to me, too. But I think the difference is that C-r inserts the text "as if you typed it, but mappings and abbreviations are not used" - meaning that . doesn't "remember" the command C-r ", just the actual text that it expanded to (because that's what would have happened if you had typed it). But IMHO the docs really ought to call that out, if that's what is meant.

      – Kevin
      7 mins ago














    3














    3










    3









    You can surround the word currently under the cursor in quotes with the following normal mode commands:



    ciw""EscP



    Replace iw with any other Vim motion/text object to surround other things with quotes*. Or "" with any other pair of characters to surround the object with different things.



    If you want to surround the object with a longer piece of text, such as an HTML <p> tag, you can use Ctrl-R instead of the P put command:



    ciw<p>Ctrl-R"</p>Esc



    See :help i_CTRL-R for more details.



    This latter command performs the change as a single edit, and thus is repeatable with the . command, but as discussed in the comments, when you repeat the command, it will enter the text from the original change command. However, as @user938271 explains, you can workaround this by using Ctrl-RCtrl-O or Ctrl-RCtrl-P instead of a plain Ctrl-R when inserting the contents of the register, making it easy to apply the edit quickly in several different places.



    * Or use c from visual mode to surround text that is hard to describe with a single motion.






    share|improve this answer















    You can surround the word currently under the cursor in quotes with the following normal mode commands:



    ciw""EscP



    Replace iw with any other Vim motion/text object to surround other things with quotes*. Or "" with any other pair of characters to surround the object with different things.



    If you want to surround the object with a longer piece of text, such as an HTML <p> tag, you can use Ctrl-R instead of the P put command:



    ciw<p>Ctrl-R"</p>Esc



    See :help i_CTRL-R for more details.



    This latter command performs the change as a single edit, and thus is repeatable with the . command, but as discussed in the comments, when you repeat the command, it will enter the text from the original change command. However, as @user938271 explains, you can workaround this by using Ctrl-RCtrl-O or Ctrl-RCtrl-P instead of a plain Ctrl-R when inserting the contents of the register, making it easy to apply the edit quickly in several different places.



    * Or use c from visual mode to surround text that is hard to describe with a single motion.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited 1 hour ago

























    answered 6 hours ago









    RichRich

    16.3k1 gold badge23 silver badges70 bronze badges




    16.3k1 gold badge23 silver badges70 bronze badges










    • 1





      +1 for the second answer using <C-r>" (also possible: <C-r>-, when you're changing less than a line.) Using that combination allows you to undo the operation with a single u. It also allows you to repeat with ., though in that case the repeat will insert the same text as the first time, which can be useful if you're quoting the same exact word over and over again.

      – filbranden
      6 hours ago






    • 2





      @filbranden: If you want the dot command to use the last deleted word (and not always the first), during the first edition, you can press C-r C-o " or C-r C-p " (instead of just C-r ") to insert the deleted word back into the buffer.

      – user938271
      4 hours ago












    • @user938271 That is just AMAZING!!! So glad I learned about this one today. I'm still reading the docs, trying to understand why this works. But it's so great that it does! Thanks for pointing this out. If you write this as an answer, I'll upvote it for sure, as far as I can tell that's the best way to execute this operation!

      – filbranden
      3 hours ago






    • 1





      @filbranden: Reading the docs, it's unclear to me, too. But I think the difference is that C-r inserts the text "as if you typed it, but mappings and abbreviations are not used" - meaning that . doesn't "remember" the command C-r ", just the actual text that it expanded to (because that's what would have happened if you had typed it). But IMHO the docs really ought to call that out, if that's what is meant.

      – Kevin
      7 mins ago













    • 1





      +1 for the second answer using <C-r>" (also possible: <C-r>-, when you're changing less than a line.) Using that combination allows you to undo the operation with a single u. It also allows you to repeat with ., though in that case the repeat will insert the same text as the first time, which can be useful if you're quoting the same exact word over and over again.

      – filbranden
      6 hours ago






    • 2





      @filbranden: If you want the dot command to use the last deleted word (and not always the first), during the first edition, you can press C-r C-o " or C-r C-p " (instead of just C-r ") to insert the deleted word back into the buffer.

      – user938271
      4 hours ago












    • @user938271 That is just AMAZING!!! So glad I learned about this one today. I'm still reading the docs, trying to understand why this works. But it's so great that it does! Thanks for pointing this out. If you write this as an answer, I'll upvote it for sure, as far as I can tell that's the best way to execute this operation!

      – filbranden
      3 hours ago






    • 1





      @filbranden: Reading the docs, it's unclear to me, too. But I think the difference is that C-r inserts the text "as if you typed it, but mappings and abbreviations are not used" - meaning that . doesn't "remember" the command C-r ", just the actual text that it expanded to (because that's what would have happened if you had typed it). But IMHO the docs really ought to call that out, if that's what is meant.

      – Kevin
      7 mins ago








    1




    1





    +1 for the second answer using <C-r>" (also possible: <C-r>-, when you're changing less than a line.) Using that combination allows you to undo the operation with a single u. It also allows you to repeat with ., though in that case the repeat will insert the same text as the first time, which can be useful if you're quoting the same exact word over and over again.

    – filbranden
    6 hours ago





    +1 for the second answer using <C-r>" (also possible: <C-r>-, when you're changing less than a line.) Using that combination allows you to undo the operation with a single u. It also allows you to repeat with ., though in that case the repeat will insert the same text as the first time, which can be useful if you're quoting the same exact word over and over again.

    – filbranden
    6 hours ago




    2




    2





    @filbranden: If you want the dot command to use the last deleted word (and not always the first), during the first edition, you can press C-r C-o " or C-r C-p " (instead of just C-r ") to insert the deleted word back into the buffer.

    – user938271
    4 hours ago






    @filbranden: If you want the dot command to use the last deleted word (and not always the first), during the first edition, you can press C-r C-o " or C-r C-p " (instead of just C-r ") to insert the deleted word back into the buffer.

    – user938271
    4 hours ago














    @user938271 That is just AMAZING!!! So glad I learned about this one today. I'm still reading the docs, trying to understand why this works. But it's so great that it does! Thanks for pointing this out. If you write this as an answer, I'll upvote it for sure, as far as I can tell that's the best way to execute this operation!

    – filbranden
    3 hours ago





    @user938271 That is just AMAZING!!! So glad I learned about this one today. I'm still reading the docs, trying to understand why this works. But it's so great that it does! Thanks for pointing this out. If you write this as an answer, I'll upvote it for sure, as far as I can tell that's the best way to execute this operation!

    – filbranden
    3 hours ago




    1




    1





    @filbranden: Reading the docs, it's unclear to me, too. But I think the difference is that C-r inserts the text "as if you typed it, but mappings and abbreviations are not used" - meaning that . doesn't "remember" the command C-r ", just the actual text that it expanded to (because that's what would have happened if you had typed it). But IMHO the docs really ought to call that out, if that's what is meant.

    – Kevin
    7 mins ago






    @filbranden: Reading the docs, it's unclear to me, too. But I think the difference is that C-r inserts the text "as if you typed it, but mappings and abbreviations are not used" - meaning that . doesn't "remember" the command C-r ", just the actual text that it expanded to (because that's what would have happened if you had typed it). But IMHO the docs really ought to call that out, if that's what is meant.

    – Kevin
    7 mins ago














    2
















    Yes, a plug-in for surrounding with quotes exists! vim-surround is what you're looking for.



    To surround the current word in double quotes, you can use ysiw" once you have the plug-in installed.



    ys is the command to surround and object (there's also cs to replace one delmiter with another, ds to remove surrounding), then iw is a text-object defining what to surround and finally " is what to surround it with.



    You might want to read the docs for vim-surround to see all that it can do. It's really a lot!






    share|improve this answer





























      2
















      Yes, a plug-in for surrounding with quotes exists! vim-surround is what you're looking for.



      To surround the current word in double quotes, you can use ysiw" once you have the plug-in installed.



      ys is the command to surround and object (there's also cs to replace one delmiter with another, ds to remove surrounding), then iw is a text-object defining what to surround and finally " is what to surround it with.



      You might want to read the docs for vim-surround to see all that it can do. It's really a lot!






      share|improve this answer



























        2














        2










        2









        Yes, a plug-in for surrounding with quotes exists! vim-surround is what you're looking for.



        To surround the current word in double quotes, you can use ysiw" once you have the plug-in installed.



        ys is the command to surround and object (there's also cs to replace one delmiter with another, ds to remove surrounding), then iw is a text-object defining what to surround and finally " is what to surround it with.



        You might want to read the docs for vim-surround to see all that it can do. It's really a lot!






        share|improve this answer













        Yes, a plug-in for surrounding with quotes exists! vim-surround is what you're looking for.



        To surround the current word in double quotes, you can use ysiw" once you have the plug-in installed.



        ys is the command to surround and object (there's also cs to replace one delmiter with another, ds to remove surrounding), then iw is a text-object defining what to surround and finally " is what to surround it with.



        You might want to read the docs for vim-surround to see all that it can do. It's really a lot!







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 7 hours ago









        filbrandenfilbranden

        2,9325 silver badges19 bronze badges




        2,9325 silver badges19 bronze badges























            Ryan Fredez is a new contributor. Be nice, and check out our Code of Conduct.









            draft saved

            draft discarded


















            Ryan Fredez is a new contributor. Be nice, and check out our Code of Conduct.












            Ryan Fredez is a new contributor. Be nice, and check out our Code of Conduct.











            Ryan Fredez is a new contributor. Be nice, and check out our Code of Conduct.














            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%2f21113%2fvimscript-surround-word-under-cursor-with-quotes%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

            Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

            Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

            François Viète Contents Biography Work and thought Bibliography See also Notes Further reading External links Navigation menup. 21Google Bookspp. 75–77Google BooksDe thou (from University of Saint Andrews)ArchivedGoogle BooksGoogle BooksGoogle BooksGoogle booksGoogle Bookscc-parthenay.frL'histoire universelle (fr)Universal History (en)ArchivedAdsabs.harvard.eduPagesperso-orange.frArchive.orgChikara Sasaki. Descartes' mathematical thought p.259Google BooksGoogle BooksGoogle Bookspp. 152 and onwardGoogle BooksGoogle BooksScribd.comGoogle Books1257-7979Google BooksGoogle BooksGoogle BooksGoogle BooksGoogle BooksGoogle BooksGallica.bnf.frGoogle BooksGoogle Books"François Viète"Francois Viète: Father of Modern Algebraic NotationThe Lawyer and the GamblerAbout TarporleySite de Jean-Paul GuichardL'algèbre nouvelle"About the Harmonicon"cb120511976(data)1188044800000 0001 0913 5903n82164680ola2013766880073431702w6vt1sb70287374827140948071409480