是否有像Sublime的“HTML:编码特殊字符”这样的功能。在Intellij IDEA [英] Is there a functionality like Sublime's "HTML: Encode Special Characters" in Intellij IDEA

查看:315
本文介绍了是否有像Sublime的“HTML:编码特殊字符”这样的功能。在Intellij IDEA的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看起来像Sublime Text中通过快捷方式(windows) Ctrl + Shift + P 命名为HTML中给出的功能:编码特殊字符但在 IntelliJ IDEA 中。此功能可以对此进行转换(作为示例):

I'm looking something like the functionality given in Sublime Text by the shortcut (windows) Ctrl + Shift + P named "HTML: Encode Special Characters" but in IntelliJ IDEA. This functionality is able to transform this (as a example):

I'm a special character phrase "áéíóú ñ"

进入:

I'm a special character phrase "áéíóú ñ"

仅限制指定文本并按下上面给出的快捷键组合(再次,在windows Ctrl + Shift + P )。

Only by surrounding the specified text and pressing the shortcut key combination given above (again, in windows Ctrl + Shift + P).

有什么想法吗?

更新(07-04-2016)

到目前为止,Intellij Idea本身支持此功能(版本) 2016)。您需要选择要转换的文本和(在OSX中)Cmd + Shift + A并键入Encode然后选择操作Encode XML / HTML Special Characters

By now, Intellij Idea support this feature natively (version 2016). You need to select the text you want to transform and (in OSX) Cmd+Shift+A and type "Encode" then select the action "Encode XML/HTML Special Characters"

唯一需要注意的是,这仅适用于(据我所知)html字符串。

The only caveats are that this only works (to my knowledge) in html strings.

推荐答案

IntelliJ不直接支持它,但是一个名为String Manipulation的插件可以帮助

It is not supported by IntelliJ directly, but a plugin called String Manipulation can help

插件页面


提供文本操作的操作:

Provide actions for text manipulation:


  • 取消/退出选定的Java文本

  • 取消/逃脱选择的JavaScript文字

  • 取消/退出所选的HTML文字

  • 取消/退出所选的XML文字

  • 取消/退出所选的SQL文本

  • 取消/退出选定的PHP文本

  • 修剪所选文本

  • 修剪所选文本中的所有空格

  • 删除所选文本中的所有空格

  • 将所选文本解码为URL

  • 将所选文本转换为Camel Case

  • 将所选文本转换为常量大小写

  • 大写所选文本

  • 将所选文本编码为MD5 Hex16

  • 将所选文本解码/编码为Base64

  • 删除空行

  • 将非ASCII转换为转义Unicode

  • 将转义的Unicode转换为字符串

  • Grep所选文本,所有与输入文本不匹配的行都将被删除。 (在列模式下不起作用)

  • 增加/减少所选文本。重复行并增加/减少找到的所有数字。

  • Un/Escape selected Java text
  • Un/Escape selected JavaScript text
  • Un/Escape selected HTML text
  • Un/Escape selected XML text
  • Un/Escape selected SQL text
  • Un/Escape selected PHP text
  • Trim selected text
  • Trim all spaces in selected text
  • Remove all spaces in selected text
  • De/Encode selected text as URL
  • Convert selected text to Camel Case
  • Convert selected text to Constant Case
  • Capitalize selected text
  • Encode selected text to MD5 Hex16
  • De/Encode selected text to Base64
  • Remove empty lines
  • Convert non ASCII to escaped Unicode
  • Convert escaped Unicode to String
  • Grep selected text, All lines not matching input text wil be removed. (Does not work in column mode)
  • Increment/Decrement selected text. Duplicate line and increment/decrement all numbers found.

这篇关于是否有像Sublime的“HTML:编码特殊字符”这样的功能。在Intellij IDEA的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆