There are so many different approaches to work with Emacs and every user works differently with it. Like in the real world, by using Emacs there almost always exist multiple ways to solve a given problem. Or you could bite through, learn elisp and the terminology, ask us for help and make it your tool. If Emacs is too alien and frustrates you too much, then you could you could chose a tool you like better instead. You need to know, abbreviations are highly unique to persons and naturallanguages and programming languages.Īnyway, (probably) you are free to choose your tools. Now you could ask, why has no one done this before? I do not know, maybe because of lack of motivation (there are better ways to relocate the cursor) or maybe this person just did not publish it's solution (back in the 80ies, when ascii text documents were a thing, but computer networks were not). ![]() If you are motivated enough to do that, of course. by creating an abbreviation dictionary, which helps to jump over those abbrevs, when searching the end of a sentence. With Emacs although, you have a chance to correct this behavior, and with ease (provided you are a bit familiar with elisp its development workflow). Because this is a more fundamental problem with ascii text files. I doubt, vim is doing a better job, regarding forward-sentence. Unfortunately, I'm finding too many examples of this that make me want to go back to Vim. But I thought Emacs was supposed to bend to MY will? Not the other way around. So it's recommending that we follow the two-space convention. As per the docs, yes, you can set sentence-end-double-space to nil, but the docs also say it won't be able to distinguish between abbreviations and such. Which means it won't work with older text documents that I have where I only used one space after a sentence. Even something like forward-sentence only reliably works when you do two spaces after a sentence. Half the time, the automated behavior is NOT what I want though. Sometimes I feel that Emacs (as well as other "full-featured" IDEs) try to be "too helpful" by doing things automatically for you. ![]() ![]() Doing a simple macro of "M-m ' C-s = Enter C-b C-b ': C-k C-n" and executing it for the correct number of lines remaining in the file with "C-u 328 f4", took 1 minute and 16.78 seconds! For comparison purposes, I executed the equivalent macro in Vim on the same computer and on the same file and it only took 3.26 seconds! Is there anything that can be done to improve the performance of macros in Emacs?Ĭertainly a fair assessment! And that's one of the main reasons why I'm giving Emacs another shot, this time while trying to learn elisp as well, to program it further and "bend it to my will." However, I'm finding that I don't really need much more customization or programmability than an editor that does exactly what I type. All of the key names were different lengths, so trying to do a rectangular selection region wouldn't have worked. I would insert the corresponding data fields later, which is why I left the right side of the colon blank. Is there anyway to speed up macros in Emacs? I needed to change a few hundred lines of Python code that looked liked something like this: some_database_column_name = models.CharField(max_length=10, etc.)Īnd changed them all to this, for conversion into a Python dictionary to be inserted into a Django DB model: 'some_database_column_name':
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |