sponsor Vim development Vim logo Vim Book Ad

Quotes : Minimal but smart quote handling for programming

 script karma  Rating 0/0, Downloaded by 551  Comments, bugs, improvements  Vim wiki

created by
Niels Aan de Brugh
 
script type
utility
 
description
Useful handling of quote-symbols for programming, without becoming too complicated or restrictive.

This script is designed so the sequence of keystrokes you would normally type (without any scripted assistance) yields the same result as with this script enabled. But that doesn\\'t mean you have to.

- Typing \\\" introduces a new string and puts the cursor inside unless one of the following cases applies.
- Typing \\\" just before the end of a string jumps out of the string (so you can continue typing).
- Typing \\\" inside a string introduces a pair of escaped quote-symbols and puts the cursor in between.
- Typing \\\" inside a string right after an escape character (i.e. an odd number of back-slashes) just inserts a \\\".
- Typing \\\" just before \\\\\\\" inside a string jumps over the \\\\\\\", so (again) you can continue typing.

It\\'s pretty minimal, but useful I hope.

This is a 0.1 version, it has not yet been heavily used.
 
install details
Drop in plugins directory. Run RemapQuoteForBuffer inside each buffer (autocmd!) where you want this enabled.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
quotes.vim 0.1 2010-08-18 7.0 Niels Aan de Brugh Initial upload
ip used for rating: 18.117.165.66

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github