Coder Social home page Coder Social logo

xhmikosr / notepad2-mod Goto Github PK

View Code? Open in Web Editor NEW
1.4K 134.0 268.0 12.11 MB

LOOKING FOR DEVELOPERS - Notepad2-mod, a Notepad2 fork, a fast and light-weight Notepad-like text editor with syntax highlighting

Home Page: https://xhmikosr.github.io/notepad2-mod/

License: Other

Shell 0.06% Inno Setup 0.29% JavaScript 0.02% HTML 19.14% C++ 57.30% C 21.95% Python 0.79% Batchfile 0.44%

notepad2-mod's Introduction

Notepad2-mod

A modified version (fork) of Notepad2 based on Kai Liu's and other people's patches.

Build status Coverity Scan Build Status

Changes compared to the official Notepad2:

  • Code folding
  • Support for bookmarks
  • Option to mark all occurrences of a word
  • Word auto-completion
  • Syntax highlighting support for AutoHotkey, AutoIt3, AviSynth, Bash, CMake, CoffeeScript, Inno Setup, LaTeX, Lua, Markdown, NSIS, Ruby, Tcl, YAML and VHDL scripts
  • Improved support for NFO ANSI art
  • Support for replacing Windows Notepad using a clean, unintrusive registry-based method
  • Other various minor changes and tweaks

Supported Operating Systems:

  • XP (SP3, SP2 might or might not work), Vista, 7, 8, 8.1 and 10 both 32-bit and 64-bit

Notes:

  • If you find any bugs or have any suggestions for the implemented lexers (and not only) feel free to provide patches/pull requests. Without patches or pull requests chances are that nothing will be fixed/implemented.
  • I'm not interested in any localization of Notepad2.

Contributors:

More information:

Changed keyboard shortcuts compared to Notepad2:

  • Ctrl+Alt+F2 Expand selection to next match.
  • Ctrl+Alt+Shift+F2 Expand selection to previous match.
  • Ctrl+Shift+Enter New line with toggled auto indent option.

You can use MSVC 2017 to build Notepad2-mod.

notepad2-mod's People

Contributors

allekov avatar bluenlive avatar brunorex avatar costin avatar eonj avatar mickael9 avatar phanx avatar qwp6t avatar sansnom05 avatar xhmikosr avatar zufuliu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

notepad2-mod's Issues

Built in UAC elevation request

This is Issue 50 moved from a Google Code project.
Added by 2011-10-13T16:27:44.000Z by [email protected].
Please review that bug for more context and additional comments, but update this bug.

Original labels: Type-Enhancement, Priority-Medium

Original description

Do to UAC protection in windows editing files in system folders requires administrator permissions. It's quite anoying to have to close notepad2, open it as administrator, reopen the file, edit it again and finally be able to save.

So I was wondering if it would not be possible to add a built in UAC elevation request on save or as maybe a "edit as administrator" option to aliviate the issue.

Request for LESS Syntax

Hi,
would you please add the syntax scheme for LESS?
The CSS scheme is not compatible to LESS when it comes to nested definitions.

IDM_EDIT_STREAMCOMMENT improvements

This is Issue 60 moved from a Google Code project.
Added by 2011-12-13T15:01:40.000Z by XhmikosR.
Please review that bug for more context and additional comments, but update this bug.

Original labels: Type-Enhancement, Priority-Medium

Original description

Personally, I find it wrong that one can add a stream comment even if nothing is selected.

I found that the easiest way to do this is to add a check in EditEncloseSelection: if (iSelEnd - iSelStart != 0)

But the above would require that EditEncloseSelectionDlgProc and EditInsertTagDlgProc should check for this too.

al.lekov, what's your opinion on this? Maybe any suggestion for properly doing this without duplicate code?

multi edit and multi select

Hi,

Notepad2 will soon be updated to v5, are You guys gonna implement multi edit and multi select feature (just like in a recent scite), and also "better" column edit mode?

Best Regards

Tabbed navigation

This is Issue 11 moved from a Google Code project.
Added by 2011-03-13T09:06:34.000Z by bernedef.
Please review that bug for more context and additional comments, but update this bug.

Original labels: Type-Enhancement, Priority-Medium

Original description

Hello, can you make a version with tabs navigation support ?

wrong highlight in bat

If you type some letter or number after %~dp0, it will treat them as part of the variable too.

2013-04-10 16 53 24

Swap Replace Text fields

This is Issue 31 moved from a Google Code project.
Added by 2011-05-28T03:59:13.000Z by [email protected].
Please review that bug for more context and additional comments, but update this bug.

Original labels: Type-Enhancement, Priority-Low

Original description

Feature request:
Include a button or link that swaps the values in the Search and Replace fields. This can be useful when constantly toggling values in code, for example.

Improve webpage

We need full size screenshots of the lexers Notepad2-mod has on the webpage. Ideally in a separate page, but using jquery fancybox for a gallery.

Notepad2-mod.4.2.25.870.exe reported as suspicious

Hello,

could you please verify that everything is alright with the x64 build of notepad2.exe inside Notepad2-mod.4.2.25.870.exe?

Some virus scanners report the file as suspicious:
https://www.virustotal.com/de/file/99beed5f3deb85875b22b955a6ef9f6ed16dfe8155249bead39dd7f59c01da1c/analysis/

Updated link to point to latest report. And sorry, I did not know that asking questions is considered offensive. I was just trying to help with an issue affecting your software. The incorrect definitions are getting fixed.

Chinese characters are messy code.

First thanks for the good mods. I downloaded and installed the latest ver.4.2.25 r855.
In this version Chinese characters are messed up.

e.g. Type or paste "我是**人" into Notepad2-mod v.4.2.25 r855 then it shows me some unreadable codes.Please see screenshot following.

notepad2mod

Which should be like this in other text editor:
texteditor

Syntax hinghlight error on MS SQL temp tables

This is Issue 80 moved from a Google Code project.
Added by 2012-05-29T06:44:49.000Z by [email protected].
Please review that bug for more context and additional comments, but update this bug.

Original labels: Type-Defect, Priority-High

Original description

Enter sample script like this^

SELECT *
FROM (
  SELECT ID
  FROM Table m WITH(NOLOCK)
    LEFT JOIN (SELECT ID FROM #Table WHERE ID > 0) t ON t.ID = m.ID
) t

and move to the first brace "(". It seems to be an error matching brace. But is we rewrite script like

SELECT *
FROM (
  SELECT ID
  FROM Table m WITH(NOLOCK)
    LEFT JOIN (SELECT ID FROM #Table WHERE ID > 0
  ) t ON t.ID = m.ID
) t

it'll be all correct

Noteapd2-mod v.4.2.25 rev. 735
MS Windows XP SP3

Save Bookmarks Across Sessions?

This is Issue 2 moved from a Google Code project.
Added by 2010-12-05T22:22:33.000Z by war59312.
Please review that bug for more context and additional comments, but update this bug.

Original labels: Type-Enhancement, Priority-Medium

Original description

Any chance on saving bookmarks across sessions?

Would make this feature way more usable.

Start menu shortcut

Recently I have decided not to replace Windows notepad with Notepad2. This is so I can see what users will see who are not using Notepad2, with respect to line endings.

However in doing this I noticed that I have no easy way now of launching Notepad2. I prefer not to have a desktop shortcut, to keep desktop clean, so I would like the option to install Start Menu shortcut.

Add ability to clear Recent History

This is Issue 39 moved from a Google Code project.
Added by 2011-07-06T23:03:23.000Z by [email protected].
Please review that bug for more context and additional comments, but update this bug.

Original labels: Type-Enhancement, Priority-Medium

Original description

<b>What steps will reproduce the problem?</b>
1. File -> Recent History
<b>2.</b>
<b>3.</b>

<b>What is the expected output? What do you see instead?</b>
There should be a way to delete individual entries, say check boxes, and there should be a delete all as well.


<b>What version of the product are you using? On what operating system?</b>


<b>Please provide any additional information below.</b>

Support code formatting (for example by using html tidy)

This is Issue 10 moved from a Google Code project.
Added by 2011-03-09T15:09:27.000Z by [email protected].
Please review that bug for more context and additional comments, but update this bug.

Original labels: Type-Enhancement, Priority-Low

Original description

...as per issue title. It would be great to be able to have a &quot;Format as ->&quot; command/menu that would take care of indentation etc. I guess since there are already a lot of specific tools available you can use them (as plugins perhaps) without having to code anything else other than support. Most of them support command line too btw.

Saving an empty UTF-8 .txt file converts it to ANSI

Steps to reproduce:

  1. By default windows creates .txt files in ANSI encoding. Create one by using built-in notepad.
  2. Open the file created in step 1 with notepad2-mod.
  3. Change it's encoding to UTF-8 (file -> encoding -> UTF-8)
  4. Save the file and close it.
  5. Open the file.

Expected result: the file should be in UTF-8
Actual result: the file is reverted to ANSI

Another way:

  1. Create a file with notepad. It will be in the default ANSI encoding.
  2. Open the file with built-in notepad and save as UTF-8 replacing the old one.
  3. Close the file.
  4. Open it with notpad2-mod. The file is in UTF-8.
  5. Close the file without editing it.
  6. Open the file again with notepad2-mod. The file is still in UTF-8.
  7. Edit the file (type a few chars will do) and close/save.
  8. Open the file.

Expected result: the file should be in UTF-8
Actual result: the file is reverted to ANSI

Add support for horizontal scroll

Hi!

It would be great if horizontal scrolling was supported. It would also be great if shift+scroll would do horizontal scrolling, for when you don't have a mouse with a horizontal scrollwheel.

Thanks!

Complete word menu should be disabled if characters < 2

This is Issue 57 moved from a Google Code project.
Added by 2011-12-13T14:53:56.000Z by XhmikosR.
Please review that bug for more context and additional comments, but update this bug.

Original labels: Type-Defect, Priority-Medium

Original description

If it's possible add a new define with the minimum characters limit so that it's easy to change it in the future in one place only.

Short hang when opening files with certain names

Description: notepad2 hangs for about 5 seconds when opening files with a certain name.

For example:
test: no hang
_test: short hang
.gitconfig: short hang
,test: short hang
_test.ini: very short hang (<1 second) before the text appears

Using notepad2-mod r774 64-bit version on Windows 7 x64 SP1. Both the WDK version and the ICC version have this problem.

Add YAML lexer

Hi,

Is there a reason why recently updated lexers (like YAML) are not liked into Notepad2? In fact, is there any reason why only some lexers are included?

Thanks

"Title Case" option doesn't work?

"Title Case" option doesn't work after applying "Upper Case" option.

Steps to reproduce:

  1. put some text
  2. apply "Edit->Convert->Upper Case" option (works fine)
  3. apply "Edit->Convert->Title Case" option (doesn't work)

Notepad2-mod (64-bit) 4.2.25 r823 (f4bfacf)

VB .Net code folding: The fold controller box doesn't appear for regions

This is Issue 73 moved from a Google Code project.
Added by 2012-02-27T18:02:49.000Z by [email protected].
Please review that bug for more context and additional comments, but update this bug.

Original labels: Type-Defect, Priority-Medium, Scintilla

Original description

The region in the attached screenshot should be displaying the collapser box [-] on line 33 with the #Region statement. If I collapse the class containing the region, the whole class should be collapsed, but instead, only lines 23-32 are being collapsed.

#region ... #endregion is working for C#. So maybe VB.net just needs #Region and #End Region added to its template similar to the C# template.

Installer for ICL12_x64

Do you mind create an installer for plain vanilla and ICL12 x64?

Could be useful, for me at last ;)

Downloads

http://github.com/blog/1302-goodbye-uploads

Since GitHub downloads are going away, can you perhaps give a strategy for the
future?

Personally I have moved my downloads to bitbucket, really the entire repo could
move there but either way. Also Amazon S3 has been suggested, very cheap. For
example, my project would cost less than $1/month.

XML/HTML tags match

This is Issue 27 moved from a Google Code project.
Added by 2011-05-16T10:16:06.000Z by [email protected].
Please review that bug for more context and additional comments, but update this bug.

Original labels: Type-Enhancement, Priority-Medium

Original description

Feature request - the same as brace highlight/match but for XML tags. For example when the cursor is over a <tag> then highlight </tag>

This should support two types of XML/HTML tags closing:
1 . <tag attr=&quot;val&quot;>blahblah</tag>
2. <tag attr=&quot;val&quot; />

Bookmark With Middle Click?

This is Issue 1 moved from a Google Code project.
Added by 2010-12-05T22:21:25.000Z by war59312.
Please review that bug for more context and additional comments, but update this bug.

Original labels: Type-Enhancement, Priority-Medium

Original description

Any chance on adding support for bookmarking via the mouse middle click?

Is it possible to add support for MATLAB

MATLAB is gaining its popularity among engineering professionals and students; Its creator, MathWorks, claims that it has over 2 million users worldwide. Is it possible for you to add support for MATLAB please? Thanks very much!

Markdown Syntax Highlighting

This is Issue 55 moved from a Google Code project.
Added by 2011-11-22T04:12:47.000Z by [email protected].
Please review that bug for more context and additional comments, but update this bug.

Original labels: Type-Enhancement, Priority-Low

Original description

Can notepad2 support Syntax Highlighting for Markdown?

Add compiler info in the about window

This is Issue 59 moved from a Google Code project.
Added by 2011-12-13T14:57:38.000Z by XhmikosR.
Please review that bug for more context and additional comments, but update this bug.

Original labels: Type-Enhancement, Priority-Medium

Original description

I have a quick patch for this, it seems to work fine except for high DPI where the IDC_COMPILER2 might slightly overlap with IDC_COMPILER.

al.lekov, what do you think about this?

When compiled with WDK, find/replace crashes

  • OS: Windows 7 x64
  • Compiler: WDK
  • release: 4.2.25.870

I compiled with WDK,
And, when I use find/replace function Notepad2-mod crashes.

And, as I know, that problem doesn't happen with ICL or VC.

Single-quoted strings not highlighted in Lua

Lua treats 'single-quoted strings' and "double-quoted strings" identically, but Notepad2-mod is only highlighting double-quoted strings as strings. Single-quoted strings are not getting any syntax highlighting applied, and are shown with default text settings.

This issue isn't affecting other lexers like PHP or JavaScript.

  • Notepad2-mod 4.2.25 rev856 x64
  • Windows 7 Professional x64

Add support for /p command line options.

That can make it response the original print command in the context menu of txt files, when use the "Image File Execution Options" to replace with the original notepad app.

Highlighting issue with CSS pseudo-classes/elements

Version: Notepad2-mod (64-bit) 4.2.25 r858 (3f0683d)
Operating system: Windows 7 Professional (64-bit)

Steps to reproduce:

  1. Set the scheme to "CSS Style Sheets"
  2. Type:
    img:before { content: "x"; }
    img::before { content: "x"; }

Expected result:

The keyword before in each of the example lines should be highlighted using the "Pseudo-class/element" settings.

Observed result:

The before preceded by a single colon (first line) is highlighted as "Pseudo-class/element". However, the before preceded by a double colon (second line) is highlighted as "Unknown Pseudo-class".

Detailed explanation:

In earlier versions of CSS, a single colon was used for both pseudo-classes (eg. img:first-child matches any img element that is the first child of its parent element) and pseudo-elements (eg. img::before creates a "virtual element" that appears directly before each img element in the document).

Nowadays, the correct notation is to use a single colon for pseudo-classes, and a double colon for pseudo-elements. Though all current user-agents still recognize pseudo-elements with single colons (for compatibility reasons) it is very helpful as a developer to use the more distinct notation so when I'm looking at my code (or someone else's code) I can immediately tell what's what.

Ideally, Notepad2-mod should have separate highlighting settings for pseudo-classes and pseudo-elements, but that's probably a lot more work, and it's not that important, so it should just highlight them both the same.

compile differences

Thank you for this mod!

What is the difference between WDK and ICL build?
I have an AMD FX-6300 cpu.

Missing keywords for HTML and CSS

Version: Notepad2-mod (64-bit) 4.2.25 r858 (3f0683d)
Operating system: Windows 7 Professional (64-bit)

Summary:

The schemes for HTML ("Web Source Code") and CSS ("CSS Style Sheets") are both missing a number of keywords. These keywords are currently highlighted using the "unknown" settings for their respective context. To resolve the issue, they should be added to the appropriate keyword lists in Notepad2-mod.

For example, if you set the scheme to "Web Source Code" and type <main>, that element tag will be displayed using the settings for "HTML Unknown Tag" instead of the settings for "HTML Tag".

Missing HTML elements (Should use: Web Source Code > HTML Tag)

  • main
  • menuitem

Missing deprecated HTML elements: (Should use: Web Source Code > HTML Tag)

These elements are deprecated and not part of any current standard, and some are ignored entirely by modern browsers. However, since some deprecated elements are included in the HTML highlighting scheme, I'm not sure whether you want to support old stuff or not. Let me know if you want the reverse of this list (deprecated elements that are currently recognized but chould be removed).

  • bgsound
  • blink
  • listing
  • marquee
  • nobr
  • plaintext
  • spacer
  • xmp

Missing HTML attributes: (Should use: Web Source Code > HTML Attribute)

  • buffered
  • crossorigin
  • download
  • irrelevant
  • itemprop
  • mediagroup
  • muted
  • oncancel
  • onclose
  • translate
  • typemustmatch

Missing CSS @rules: (Should use: CSS Style Sheets > Directive)

  • @media

Missing CSS properties: (Should use: CSS Style Sheets > CSS Property)

  • animation-fill-mode
  • aspect-ratio
  • clip-path
  • clip-rule
  • flex
  • flex-basis
  • flex-direction
  • flex-flow
  • flex-grow
  • flex-shrink
  • flex-wrap
  • flow-from
  • flow-into
  • font-feature-settings
  • font-synthesis
  • hyphenate-limit-chars
  • hyphenate-limit-last
  • hyphenate-limit-lines
  • hyphenate-limit-zone
  • interpret-as
  • line-break
  • object-fit
  • object-position
  • order
  • overflow-wrap
  • region-overflow
  • shape-image-threshold
  • shape-inside
  • shape-outside
  • text-combine
  • text-decoration-color
  • text-decoration-line
  • text-decoration-style
  • text-overflow
  • wrap
  • wrap-flow
  • wrap-margin
  • wrap-padding
  • wrap-through
  • writing-mode

The above list doesn't include any of the ~75 properties that are defined in CSS3 or CSS4 but are not supported by any browsers and (in some cases) are still under revision. A list of such properties is here if you do want to do anything with them:

https://gist.github.com/phanx/c0c9f9f0ee8d3163bfcd

add keywords of current EDITLEXER to AutoComplete word list

in Edit.c function CompleteWord()
pLexCurrent is defined in Styles.c
the magic number 9 is defined in Styles.h

....

if (iStartWordPos == iCurrentLinePos || bWordAllNumbers || iCurrentLinePos - iStartWordPos < 1) {
LocalFree(pLine);
return;
}

pWord = LocalAlloc(LPTR, 256);
for (iRootLen = 0; iRootLen < 9; iRootLen++) {
const char* pKeyword = pLexCurrent->pKeyWords->pszKeyWords[iRootLen];
iDocLen = 0;
while (_pKeyword) {
if (isspace(_pKeyword)) {
pKeyword++;
while (isspace(pKeyword)) pKeyword++;
pWord[iDocLen] = 0;
if (pWord[0]) {
struct WLIST
p = lListHead;
struct WLIST* t = NULL;
BOOL found = FALSE;
while(p) {
int cmp = lstrcmpA(pWord, p->word);
if (!cmp) {
found = TRUE;
break;
} else if (cmp < 0) {
break;
}
t = p;
p = p->next;
}
if (!found) {
struct WLIST* el = (struct WLIST*)LocalAlloc(LPTR, sizeof(struct WLIST));
el->word = LocalAlloc(LPTR, iDocLen + 1);
lstrcpyA(el->word, pWord);
el->next = p;
if (t) {
t->next = el;
} else {
lListHead = el;
}
iNumWords++;
iWListSize += iDocLen + 1;
}
}
iDocLen = 0;
} else {
pWord[iDocLen++] = *pKeyword++;
}
}
}
LocalFree(pWord);

pRoot = LocalAlloc(LPTR, iCurrentLinePos - iStartWordPos + 1);
lstrcpynA(pRoot, pLine + iStartWordPos, iCurrentLinePos - iStartWordPos + 1);
LocalFree(pLine);
iRootLen = lstrlenA(pRoot);
...

No lib.exe included in WDK 7.1.0

There is a topic on the Stackoverflow. Please check it out.

So the file build/makefile.mak need a fix.

--- makefile.mak        Sun Sep 16 11:35:06 2012
+++ makefile.mak.fixed  Sun Sep 16 11:35:51 2012
@@ -21,7 +21,7 @@

 CC = cl.exe
 LD = link.exe
-LIB_EXE = lib.exe
+LIB_EXE = link.exe /lib
 RC = rc.exe

 !IFDEF x64

Unicode - Ansi ? (Solved)

this new release seems to have gotten Unicode/Ansi backwards.?

previous releases worked correctly..
but the latest it's completely backwards causing problems for my scripts.

ie. Unicode must be encoded in Ansi
and Ansi must be encoded in Unicode?

can you take a look?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.