Macro not working as expected in Notepad++ - macros

I just installed notepad++ and i am having some problems with macros in it.
i have a simple text file below:
hi
i am here
this is the third line
i kept the cursor at the first line before "hi".Now i selected start recording macro in the menu.i typed 'hi' before 'hi'(the actual word in the line) like below and pressed [Home] key in the keyboard and then pressed down arrow.Now i selected stop recording macro from the menu
hihi
i am here
this is the third line
but when i run the macro i am getting the following output
hihi
hˆi«i am here
hˆi«this is the third line
Could anybody please tell me where is the problem?

Upgrade to, at least, version 5.8.2 where that problem was fixed. I was experiencing the same problem, upgraded to version 5.8.5 and the problem is gone.
http://notepad-plus-plus.org/release/5.8.2
Fix macro recording bug for the non-ASCII characters.

same here as for Matt. For language, I was in normal text.

As mentioned in my comment at top, I have also been experiencing this same issue. Strange characters inserted when playing back a macro. This worked OK with previous versions, but appears to have been a bug introduced with version 5.7
It does appear to be an encoding issue. I have been able to workaround this issue by switching to UTF-8 encoding whilst recording the macro - as mentioned in the comment of this bug report.
This has been reported as a bug several times recently. Many are still open, however, one is reported as fixed. And is reported as fixed in the current release (5.8.2) - which also introduces several new features as regards macros. However, nothing later than v5.7 is yet available from the auto-updater within Notepad++ itself. However, you can manually download the latest installer from SourceForge.net.

I turned off the auto complete feature and this fixed the issue for me.
How do I stop Notepad++ from showing autocomplete for all words in the file

I had a problem, I typed in some code and it came out wrong in macro.
Then I neglected the advice to type the code and not paste it, and so I copy/pasted the code I needed and it worked fine.
So my advice: write it somewhere else and copy/paste when you start macro.

Related

How to fix newline indentation in recent version of vscode

I've been using VSCode (vscode) with the amVim extension for approximately 2+ years. I use vscode almost every day, and update it immediately every time it notifies me of a new version, which it checks for on startup. In the current and previous version I've had a new problem with indentation when I add a line to a source file. I've experienced this problem when editing *.go, *.vue, and *.css files, but mostly I've been working in Go files since the last two releases, so I've mostly seen it there. I did not notice this issue prior to the last two vscode releases.
When I add a newline with ENTER or SHIFT+o or any other means I've tried, it often adds the line with too little indentation. Whether this happens appears to depend on context, like how I recently moved the cursor, or where was the cursor when I added the newline, but I haven't figured out clear rules for when it will get the indentation right. I'd say it happens about half the time.
I haven't found a consistent workaround, so now when I add a newline I often have to hit tab until I reach the correct indentation. I can't predict whether this will happen, so when I add a newline I have to pause and look at the result instead of continuing to type. Alternatively, I write code at the wrong indentation and then hit save or auto-indent once it's syntactically complete to correct the indentation, but the code is harder to read and review until the indentation is right.
My current vscode version is 1.75.1, and amVim version is v1.34.0. I'm on Fedora 37 x64 (Linux). (My vscode Go extension is v0.37.1.)
I tried searching and browsing issues in both vscode and amVim Github repos and didn't see anything matching my issue, and I tried searching here as well without finding a match.

Indentation for files that don't have a registered formatter

It seems that I am getting this problem since version 1.18, honestly I don't remember.
With VSCodeVim installed I used to press the = key to get my code (Elixir, embedded elixir, ...) indented properly.
Am I missing something, like a configuration, that would allow me to re-indent my files without having a nagging "Formatter for file x not installed".
This is honestly the only things that nags me with VSCode so far, love the speed, the capabilities and the UI...
Just posting my comment as an answer
Try using the reindent lines command. This command should work for many languages even if you don't have a formatting extension for that language installed
Select the contents of file.Bottom right corner shows spaces/tabs: 2/4. You can click on that and indent the whole file.

Octave 4.2 Command Window is Adding Blank Lines

First, I am new to Octave, but fairly familiar with Matlab. After using Octave for a short time I've noticed that the cursor in the command window will regularly add a new, empty line. Sometime this can be in the middle of typing a command. If I let the window sit with no input, the cursor will eventually advance all the way down the page and keep going.
I have never seen anything like this, and I do not know where to even begin to fix it.
Thanks!
Command Window Screenshot
My alternative answer is that that a bug report should be filed so that this issue gets fixed. I have the exact same problem. Every 30 seconds, when system time hits an even minute and 30 seconds past the minute, the command window cursor skips to the next line. One can still type to the command line and hit enter in the end. The command line now split at random points to several lines will be successfully computed. The problem is that you can not edit the line back past the inserted line break and the whole thing looks really messy. I tried to un-install and re-install but that did not help in my case. I use octave-4.2.1-w64-installer.exe
Boring solution (and hopefully permanent): I uninstalled and reinstalled the same version of Octave and this bug seems to have gone away. Not very convenient, but worked for me.
This might be a problem caused by a 3rd party application. I've seen this issue on a computer with Druva inSync. Disabling the Druva inSync service (not the client) stops this. inSync injects itself in applications using the Windows file dialog. Apparently this code contains a bug and accidentally writes a line feed (LF) to a file handle belonging to the application. The problem might also go away with a different Octave version. In particular the 4.2.x and 4.4.x seem to behave differently.

Emacs indentation screwed up

I recently upgraded to emacs 24.3.1 in order to use a new mode for programming in D. I seem to have introduced some problem with my other modes now (Java, C++ C I'm just using whatever comes with emacs). When I scroll up/down in a buffer, the text displayed is totally messed up. As in lines mixed together, indentation screwy, cursor not modifying where it looks like it is. If I hit ctrl-l the screen refreshes and all is good. I noticed this problem every once in a while with my previous version when editing C .h files. But now it's happening on every single buffer. I can't work with it. Every time I move up/down I have to refresh the screen. I can't find anything similar to my problem with a google search. Might end up being an issue with some incompatible version of a dependency. Here's my system stats.
CentOS release 5.4 (Final)
linux 2.6.18-164.el5
emacs 24.3.1
I don't even know what other libs emacs might depend on. I'll be happy to post versions of anything that might be relevant.
Thanks
Since you say that this happens also with emacs -Q, i.e., without your init file, consider filing a bug report: M-x report-emacs-bug. For that, try to give a short, reprocible recipe, starting with emacs -Q. Emacs Dev will take a look and let you know whether they think there is a bug.
Using report-emacs-bug also automatically gathers info about your Emacs version etc., and includes it with your bug description.

Emacs crashes when I open a specific header file

I was digging through the header files for SDL in Linux when I tried to open the file from the SDL library called "SDL_opengl.h" in Emacs. For some reason, it always causes it to crash. It opens just fine in Vim and in gedit.
Has anyone else had an issue with Emacs just plain refusing to open a particular file? What sort of things should I look for to find what is causing the problem? Mind you, I was able to open every other "SDL_*.h" file in that directory; just that one gives me trouble.
Much appreciated in advance!
I would be interested to see the exact error message, and stack trace if possible.
I suspect file encoding, special characters, file size, cc-mode parsing, or something like that to be the culprit. (emacs 22 and libsdl1.2 on ubuntu 9 with utf-8 screen works fine for me)
Converting my comment into an answer b/c the comments get cut off.
Try loading the file with
M-x find-file-literally
Since this (appears to) resolve the issue for giogadi, I think that points to perhaps the colorization of the buffer. cc-mode does its own colorization...
Oh goodness, I'm a dunce.
So I apparently underestimated both the size of the file AND the speed of Emacs in opening said large files.
I decided to sit and wait to see if it dies completely on its own (as opposed to me xkill-ing it), and after a whole minute, the file is loaded.
So that solves one problem - the file is being loaded. However, why would Emacs take so long to do it? I have no strange settings enabled that should cause it to lag more than usual.
have you hilit-mode on?
with hilit-auto-highlight-maxout and a great value?
I have had the same problem with header-files, so reduce that value.
maybe it is hs-mode (hideshow-mode)?