메모장에서 코드 포맷하기 ++
메모장 ++에서 코드를 포맷하는 키보드 단축키가 있습니까?
주로 HTML, CSS 및 Python 코드로 작업하고 있습니다.
예를 들면 다음과 같습니다.
<title>{% block title %} {% endblock %}</title>
<link rel="stylesheet" href="/media/style.css" type="text/css" media="screen" />
</head>
에:
<head>
<title>
{% block title %}
{% endblock %}
</title>
<link rel="stylesheet" href="/media/style.css" type="text/css" media="screen" />
</head>
Visual Studio에서 Ctrl+ K+ D와 NetBeans로 기능을 수행하지만 메모장 ++에서 찾을 수 없다면 찾을 수 없습니다.
TextFX-> HTML Tidy-> Tidy : Reindent XML
이 작업을 수행하기 전에 HTML 코드를 선택해야합니다.
그런에이 플러그인 으로 UniversalIndentGUI는 , 그것은 플러그인 관리자에서 바로 설치가 가능 하고 가장 많이 사용되는 프로그래밍 언어를 reindent 할 가능성이있다.
당신이 가면 TextFX
메뉴에 가서 TextFX Edit
, 당신은 메뉴 항목을 볼 수 있습니다 Reindent C++ Code
.
C # 코드도 형식화됩니다.
다음은 Notepad ++에서 사용 가능한 바로 가기 목록 입니다.
원하는 기능을 사용할 수없는 경우 자체 매크로를 정의하고 사용자 지정 바로 가기에 할당 할 수 있습니다 (매크로를 사용하는 데는 사용되지 않음).
업데이트 : 링크가 유효하지 않은 경우 여기에 바로 가기를 게시합니다.
Shortcut Command
Ctrl-C Copy
Ctrl-X Cut
Ctrl-V Paste
Ctrl-Z Undo
Ctrl-Y Redo
Ctrl-A Select All
Ctrl-F Launch Find Dialog
Ctrl-H Launch Find / Replace Dialog
Ctrl-D Duplicate Current Line
Ctrl-L Delete Current Line
Ctrl-T Switch the current line position with the previous line position
F3 Find Next
Shft-F3 Find Previous
Ctrl-Shft-F Find in Files
Ctrl-F3 Find (volatil) Next
Ctrl-Shft-F3 Find (volatil) Previous
Ctrl-Shft-I Incremental Search
Ctrl-S Save File
Ctrl-Alt-S Save As
Ctrl-Shft-S Save All
Ctrl-O Open File
Ctrl-N New File
Ctrl-F2 Toggle Bookmark
F2 Go To Next Bookmark
Shft-F2 Go To Previous Bookmark
Ctrl-G Launch GoToLine Dialog
Ctrl-W Close Current Document
Alt-Shft-Arrow keys or Alt + Left mouse click Column Mode Select
F5 Launch Run Dialog
Ctrl-Space Launch CallTip ListBox
Alt-Space Launch Word Completion ListBox
Tab (selection of several lines) Insert Tabulation or Space (Indent)
Shft-Tab (selection of several lines) Remove Tabulation or Space (outdent)
Ctrl-(Keypad-/Keypad+) or Ctrl + mouse wheel butto Zoom in (+ or up) and Zoom out (- or down)
Ctrl-Keypad/ Restore the original size from zoom
F11 Toggle Full Screen Mode
Ctrl-Tab Next Document
Ctrl-Shft-Tab Previous Document
Ctrl-Shft-Up Move Current Line Up
Ctrl-Shft-Down Move Current Line Down
Ctrl-Alt-F Collapse the Current Level
Ctrl-Alt-Shft-F Uncollapse the Current Level
Alt-0 Fold All
Alt-(1~8) Collapse the Level (1~8)
Alt-Shft-0 Unfold All
Alt-Shft-(1~8) Uncollapse the Level (1~8)
Ctrl-BackSpace Delete to start of word
Ctrl-Delete Delete to end of word
Ctrl-Shft-BackSpace Delete to start of line
Ctrl-Shft-Delete Delete to end of line
Ctrl-U Convert to lower case
Ctrl-Shft-U Convert to UPPER CASE
Ctrl-B Go to matching brace
Ctrl-Shft-R Start to record /Stop recording the macro
Ctrl-Shft-P Play recorded macro
Ctrl-Q Block comment/uncomment
Ctrl-Shft-Q Stream comment
Ctrl-Shft-T Copy current line to clipboard
Ctrl-P Print
Alt-F4 Exit
Ctrl-I Split Lines
Ctrl-J Join Lines
Ctrl-Alt-R Text Direction RTL
Ctrl-Alt-L Text Direction LT
F1 About
최신 플러그인은 tidy2이며 플러그인> 플러그인 관리자> 플러그인 관리자 표시를 통해 설치할 수 있습니다.
config 1을 편집하고 따옴표를 설정하는 것이 좋습니다. 특히 따옴표를 사용하는 스크립트가있는 경우 특히 그렇습니다.
또한 두 번 이상 정리하면 처음으로 앰퍼샌드를 삽입 한 다음 두 번째로 앰퍼샌드를 교체 할 수 있습니다. 당신은 당신이 그것을 원하는 곳으로 얻을 구성을 가지고 싶을 수도 있습니다.
이것은 당신이 찾고있는 대답이 아니지만, 같은 질문을했을 때 얻은 해결책입니다.
I'm a pretty serious Notepad++ user, so don't take this the wrong way. I have started using NetBeans 8
to develop websites in addition to Notepad++ because you can set it to autoformat on save for all your languages, and there are a ton of configuration options for how the formatting looks, down to the most minute detail. You might look into it and find it is a worthy tool to use in conjunction with notepad++. It's also open source, completely free, and has a bunch of plugins and other useful things like automatically compiling Sass if you use that too. It's definitely not as quick as NP++ so it's not great for small edits, but it can be nice for a long coding session.
For JavaScript Formatting I use Notepad ++ JSMin Plugin.Quite Handy
In my notepad++, it seems TextFX needs a perl environment to format HTML files. Tidy2 demands nothing so I think it's more handy.
If all you need is alignment, try the plugin called Code Alignment.
You can get it from the built-in plugin manager in Notepad++.
We can use the following shortcut in the latest version of notepad++ for formatting the code
Alt + Ctrl + Shift + B
ANSWER AS OF June 2019
Install the XML Tools
plugin from the Plugin Admin (in Notepad++ 7.7 at least)
Then click Plugins -> XML Tools -> Pretty Print (XML Only with Line breaks)
That did it for me.
No. Notepad++ can't format by itself. Formatting can easily be accomplished in many IDEs like Eclipse, NetBeans, Visual Studio [Code].
참고URL : https://stackoverflow.com/questions/3635460/formatting-code-in-notepad
'Programming' 카테고리의 다른 글
정적 키워드와 C ++에서의 다양한 용도 (0) | 2020.05.18 |
---|---|
브라우저 뒤로 버튼 이벤트를 감지하는 방법-크로스 브라우저 (0) | 2020.05.18 |
Android : 여러 개의 클릭 가능한 버튼이있는 ListView 요소 (0) | 2020.05.18 |
앱을 시작할 때 npm start와 node app.js의 차이점은 무엇입니까? (0) | 2020.05.18 |
JVM 플래그 CMSClassUnloadingEnabled는 실제로 무엇을합니까? (0) | 2020.05.18 |