notepad++

Delete all lines (not) matching a regex using Notepad++

◇◆丶佛笑我妖孽 提交于 2020-01-01 08:52:52
问题 How to delete all lines matching or not matching a regex in Notepad++? In Vim, I'd do the following to delete all matching lines: :g/regex/d And to delete all non matching lines: :!g/regex/d I'm looking for these commands' equivalent in Notepad++. As also explained in "Notepad++ - delete all lines with certain text", I usually go for the approach of blanking the matching lines and deleting the blank lines afterwards. Is there a simpler way? As per this answer, versions of Notepad++ >= 6.0

“unexpected indent” error when using notepad++ for creating django function

帅比萌擦擦* 提交于 2020-01-01 04:18:27
问题 I am following this book to learn django using notepad++, something interesting happens, when I type the function using notepad++ for the following script: def current_datetime(request): now = datetime.datetime.now() html = "<html><body>It is now %s.</body></html>" % now return HttpResponse(html) It gives me an error like this: IndentationError at /time/ ('unexpected indent', ('M:\\DjangoStack\\projects\\beta_01\\..\\beta_01\\hello_world\\views.py', 12, 1, '\thtml = "<html>"\n')) But when I

Is there a PHP syntax checker for Notepad++?

对着背影说爱祢 提交于 2020-01-01 01:11:51
问题 Is there a PHP syntax checker plugin for Notepad++? Please don't answer "Use another editor instead" 回答1: Try NppExec plugin for Notepad++. Using it create a command to be something like this: cmd.exe /K c:\your\path\to\php.exe -l "YOUR_FULL_FILE_NAME" Instead of YOUR_FULL_FILE_NAME you should use appropriate Notepadd++ macro -- I think it is $(FULL_CURRENT_PATH) but double check with NppExec manual (installs together with plugin). P.S. But any IDE will be better for sure (I'm using PhpStorm)

Using Notepad++ to compile Java code

北慕城南 提交于 2019-12-31 11:42:18
问题 I've been trying to set up Notepad++ as a little Java environment, mainly for learning Java as I was having some difficulty getting a simple program to work with NetBeans, unfortunately all the advice on setting up Notepad++ to call the Java code is not working. I guess notepad++ has changed or the Java development Kit has been massively modified because all examples I have used result in errors, even though there is little room for error. to begin I found this site: http://blog.sanaulla.info

Using Notepad++ to compile Java code

眉间皱痕 提交于 2019-12-31 11:41:17
问题 I've been trying to set up Notepad++ as a little Java environment, mainly for learning Java as I was having some difficulty getting a simple program to work with NetBeans, unfortunately all the advice on setting up Notepad++ to call the Java code is not working. I guess notepad++ has changed or the Java development Kit has been massively modified because all examples I have used result in errors, even though there is little room for error. to begin I found this site: http://blog.sanaulla.info

Is there any way to enable intellisense for notepad++, HTML coding?

*爱你&永不变心* 提交于 2019-12-31 10:44:08
问题 Is there any way to enable intellisense for notepad++? I have heard that the closest thing is a plugin called fingertext, but I dont know how to use it. 回答1: Yes, there is one in NP++ v5.6.8 and it is disabled by default. To enable it go to: Settings -> Preferences -> Backup/Auto-completion -> Tick the enable auto completion on each input -> Close 来源: https://stackoverflow.com/questions/12165017/is-there-any-way-to-enable-intellisense-for-notepad-html-coding

Regex to remove text between tags in Notepad++

限于喜欢 提交于 2019-12-31 09:04:34
问题 I have a code like this <wp:post_name>artifical-sweeteners-ruin-your-health</wp:post_name> I want to change it to <wp:post_name></wp:post_name> removing everything inside the tag. 回答1: Search for <wp:post_name>[^<>]+</wp:post_name> and replace all with <wp:post_name></wp:post_name> This assumes that tags can't be nested (which makes the regex quite safe to use). If other tags may be present, then you need to search for (?i)<wp:post_name>.*?</wp:post_name> instead (same replace string).

How to find a text between two characters and replace it by a text between another two characters of a line in notepad++?

馋奶兔 提交于 2019-12-31 04:08:13
问题 I have many lines of bibliography as the following: @article{mehri_buckling_2016, title = {Buckling }, doi = {10.1016/j.cma.2016.01.017}} @article{jin_modified_2014, title = {A modified ns}, doi = {10.1016/j.apacoust.2014.04.007}} @article{sofiyev_free_2017, title = {The free}, doi = {10.1016/j.compositesb.2017.03.054}} @article{malekzadeh_three-dimensional_2012, title = {Three-dimensional free }} @article{jooybar_thermal_2016, title = {Thermal panels}, doi = {10.1016/j.tws.2016.01.032}} In

Notepad++: Adding a new shortcut for an existing command

社会主义新天地 提交于 2019-12-30 07:24:09
问题 I want to make "Ctrl+G" to open the find dialogue, just as Ctrl+F" (so both shortcuts open the same "find dialogue"). I know I can modify the existing shortcuts of commands through "macro > modify shortcut", but it allows changing the shortcut only, not the "Name" of the command (shaded). 回答1: Here is how you can add a second keybinding to the find dialog. Notepad++ does not offers this out of the box. We can only assign one keybinding. We need a way to add a second find dialog . One way I

Configuring Notepad++ to run php on localhost?

浪子不回头ぞ 提交于 2019-12-30 06:46:11
问题 I am trying to get the option Run->Launch With Firefox; to open the file I am currently viewing in Notepad++ at http://127.0.0.1:8080/currentfile.php , but instead it just opens to current file directory in Firefox.. I've tried to edit the shortcut xml file in the Notepad++ directory, I've shut Notepad++ down and edited the XML file with regular Notepad, and when I start Notepad++ back up it does not show the settings I entered.. How can I edit the settings to load localhost rather than the