Questions tagged [text-editing]

Questions about editing or manipulating text inside of Emacs.

22 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
7
votes
1answer
214 views

Increment days / months / dates, etc. within buffer

In a text document, while editing, I often need to increment/ decrement calendar data. So, Friday will need to become Monday, December will need to become March, etc. Or 28 Apr after adding 5 will ...
4
votes
0answers
478 views

Send a text from Emacs to Grammarly

Is there a nice way to bind Emacs and Grammarly. This is what I wrote to myself. A very simple plugin that helps you to send a marked text to Grammarly. It is a very simple plugin, is there a better ...
3
votes
0answers
114 views

Edit any input field in emacs buffer

Is it possible to make emacs as an input middle man for any text field in the system? It should work like this: 1 user focus the text input field of any gui program 2 a system hotkey brings up a ...
1
vote
0answers
26 views

fixed file size mode

Is there an emacs mode/package/whatever where a specific file size (and/or number of lines) is enforced in a visual way? Something like this: 1st line 2nd line where adding some text to the 2nd ...
1
vote
0answers
48 views

Align elements of a matrix to the right

I have a matrix in C++ Matrix<double> A = { {31, -13, 0, 0, 0, -10, 0, 0, 0}, {-13, 35, -9, 0, -11, 0, 0, 0, 0}, {0, -9, 31, -10, 0, 0, 0, 0, 0}, {0, 0, -10, 79, -30, 0, 0, 0, -...
1
vote
0answers
225 views

how to convert camel case to snake case with vanilla emacs

When editing for example a ruby file, can't emacs toggle CamelCase to snake_case out of the box? Example ruby file def SecDecGov puts "abort" end
1
vote
0answers
34 views

Quoting selected text using email conventions?

Is there any existing elisp function which will quote any selected text using email quoting conventions? For example, suppose the following text appears in a buffer ... This is some text that I want ...
1
vote
0answers
98 views

Setting margins in `text-mode`

I use text files for most of my work. But for printing them on letterhead, I need to set margins to say 3 cm for upper margin and 2.5 cm for lower. Is there any way I can define them in text-mode. ...
1
vote
0answers
44 views

Tab or auto completion of command while editing a .tex file

Seeing if there is a way for auto or tab complete specifically while editing a .tex file. For example \text.... (tab or autocomplete) in some editors will allow you to quickly choose from '\textbf'...
1
vote
0answers
35 views

Is there a way to get copy & paste to be context-aware wrt whitespace and formatting?

When I copy a word and paste it at the end of an existing sentence (between the last word and the full stop), I'd like it to be pasted in such a way that the space between the pasted word and the ...
1
vote
0answers
104 views

Can I edit several files synchronously?

Emacs has the scroll-all-mode, which scrolls two buffers synchronously. I would like to edit about 8 files on 8 different hosts synchronously. This can be achieved by running vi in cssh. Is the ...
1
vote
0answers
194 views

Dictation in Mac OS doesn’t leave spaces between words in Emacs

I have tried to use the dictation feature of Mac OS in Emacs and it works quite well, except that it doesn’t seem to recognise spaces between words if I pause shortly and also omits spaces between ...
1
vote
0answers
34 views

“Mark all Misspellings” never stops

On my Emacs (Aquamacs on OSX, latest version) the command Edit -> Spelling -> Mark All Misspellings goes through the whole file (from 0% to 100%) and then starts again at 0%, and continues ad ...
1
vote
0answers
102 views

Unbalanced quotes auto-inserted in AUCTeX mode

This seems like it should be a very basic question, but I cannot find an answer anywhere. When writing in AUCTeX mode the auto-inserted paired quotation marks are now unbalanced. That is, when I ...
0
votes
0answers
26 views

Edit a portion of YAML file (a multi-line string) with a different mode

I'm constantly editing a big yaml file with many multi-line strings, which are BASH scripts. In org-mode I would use something like: #+begin_src sh echo "cool" #+end_src And then just to C-c ' (org-...
0
votes
0answers
18 views

reshape one column text of n rows into into m columns of n/m rows

I have tried the following function (defun test3 (size column cnt) (interactive "p") (if (eq cnt 0) (progn (setq start (point)) (forward-line (- (/ size column) 1)) ...
0
votes
1answer
69 views

ryo-modal defining keybind jump a word and insert character

I'm using the ryo-modal package that enables you to define your own keys in modal editing. I'm trying to makemf move the cursor to the end of the word, insert a whitespace and then exit the modal mode....
0
votes
0answers
441 views

Can I “insert” a backspace character into a buffer?

I'm trying to tail the output from a command into a buffer, and I just learned that the command occasionally uses long strings of ^H to backspace over previous lines. Like, the command stdout will ...
0
votes
0answers
27 views

How do you remove the last few characters from all lines in a txt file in spacemacs?

How do you remove the last few characters from all lines in a text file? Example: 23193 123252 1 1238 123 1 34356363 11238080123 1 Should become: 23193 123252 1238 123 34356363 11238080123 I'm ...
0
votes
0answers
39 views

mirror/auto populate a section of text in another location in the same buffer/other file

Im looking for a way to to mirror/auto populate a section of text in another location in the same buffer and/or other file. for example, i manage my config files in org mode for multiple machines. i ...
0
votes
0answers
46 views

Is there a way to convert an array of bytes into a UTF-8 string?

There are now some files which contain raw bytes which are valid UTF-8 characters, e.g. a line of the file could be '@\u0915\u0941\u091b@ \u092c\u093f\u0902\u0926\u0941 \u0938\u095e\u0947\u0926 \u0939\...
0
votes
0answers
23 views

Adjust scrolling after font increase/decrease

After text-scale-decrease or text-scale-increase scrolling (e.g. with space, scroll-down) does not seem to take the text scaling into account. Is there a way to adjust the scroll commands to reflect ...