2

I'm editing an .hmtl document in Notepad++, and I need to be able to efficiently switch between typing smart quotes ( ‘ ’ “ ” ) and vertical quotes ( ' ' " " ). How can I do this?

I would like to use smart quotes when editing content in the body, such as:

“Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.”

I would like to use vertical quotes when editing the HTML and CSS, such as:

<link rel="stylesheet" href="style.css" type="text/css" media="all" />

It seems Notepad++ natively(?) employs vertical quotes, so I don't have to go through any additional effort to type those. In order to type smart quotes, I'm copying from my Word document into Notepad++.

The language for the document I am editing in Notepad++ is HTML.

  • @miroxlav If I recall correctly (because it's been a while since I worked on editing my webpages), I was using the ALT+0145/0146/0147/0148 to make the smart quotes before. Please provide me with your method, and I'll see if it will benefit me. Thanks! –  Sep 13 '15 at 22:28

1 Answers1

0

If seeking for exact answer, then there is no way. Notepad++ does not have this functionality. Perhaps there's some less known Notepad++ plugin, but I really don't know about it.

But this is how I am getting access to special characters: using the following AutoHotKey macros you can map standard keyboard sequences into producing quotes or other character or sequences. Basically, it does comfortable replacement of one sequence for another. This isn't auto-recognition for switching quotes, but such a thing would require writing new Notepad++ plugin at least.

The AutoHotKey macros for quotes:

:O:;,::‘
:O:;'::’
:O:;,,::“
:O:;''::”

Based on the above, type ;,,(followed by space or comma or newline to start replacing) and you will get .

Macro example apart from creating quotes:

::;td::<td></td>

By the above example you can produce table cell <td></td> instantly by typing ;td. So macros are universal, not only for quotes. I'm using semicolon as first character of sequences, because typing plain td would obviosly have undersired effects when typing plain text. But you can choose anything else, e.g. ` (backtick).

Advantage: macros you defined now work across all your applications (unless you restrict them).

So the format is

::type-this::replacement
:O:type-this::replacement

after typing type-this, you need to type space, comma, newline, etc. With first form, those are preserved, with second mentioned form, that character is consumed.


2017-02 Update:

I realized that AHK Macro can be written to rotate between quotes.
Example:

" –(restart)→ " → ...

Let me know if you are still interested.

miroxlav
  • 13,008
  • 6
  • 65
  • 103