Questions tagged [words]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3
votes
3answers
132 views

Get Emacs to jump to the start of a word after isearch

If I use isearch to search for the word "accommodating" in my document, I have to type acc before the cursor jumps to the word. When I press enter the cursor is on the the second "c" as in ...
0
votes
0answers
11 views

remove duplicate word one by one [duplicate]

I'm looking for ways to detect duplicate, not case-sensitive words in a text/latex document. Google turns up this elisp-macro https://www.gnu.org/software/emacs/manual/html_node/eintr/the_002dthe....
3
votes
1answer
36 views

Viewing the number of words in org or text files in one of the details columns in Emacs Dired

Is there a way to display the number of words in org or text files in one of the details columns in Dired? This would save having to open each file individually and count the words by selecting the ...
1
vote
2answers
59 views

Make isearch commands search only at the beginning of words

How to make C-s (isearch-forward) and C-r (isearch-backward) search only for words that start with the argument passed to them, instead of searching for the argument even if it's in the middle of a ...
0
votes
1answer
71 views

How to convert paragraph into the line?

I've need a function which convert a paragraph into the line, sort each space separated set of characters and fill it back to paragraph. In: Supposedly there are over one million words in the ...
3
votes
1answer
302 views

Find and remove consecutive duplicated words while ignoring case

I am trying to find and remove duplicated words in a LaTeX file. Right now I am using query-replace-regexp with the regular expression \b\(\w+\)[ #]+\1 where # stands for line-break (C-q C-j). This ...
1
vote
1answer
72 views

English dictionary IPA or/and sound

I was wondering if one can look-up English words in Emacs from an English dictionary that includes IPA or plays a sound. I am using define-word.el package, which is very good but doesn't have IPA.
1
vote
2answers
90 views

how to make emacs think semicolon and brackets are words?

i've came on emacs from Sublime Text, and there ;[]{}()., etc are counts as word, and when you move in your document with Ctrl+Arrow you never skip these characters. I want make emacs recognize all ...
2
votes
2answers
614 views

Split line every n characters

I have a long binary string that I would like to split every 32 characters. Is there a command that can do this for me? I have tried word wrapping, but it splits per word. It has no effect since a ...
2
votes
2answers
98 views

What is the best way to search forward/backward for a token?

Sometimes I want to search for a specific word but I don't want to find words which have my search string as a substring. For example, if I search for "pan" (bread, in Spanish), I don't want to find ...
6
votes
5answers
4k views

Best way to select a word

I want to select current word under the cursor without using mouse. After searching this forum, I learned how double click works. (I noticed that it is a bit complicated and there were no direct key ...
2
votes
2answers
184 views

Replace whole words in string

replace-string has the DELIMITED parameter, which can be used to replace only whole words. replace-in-string does not have such a parameter. Is there an easy work-around besides creating a temporary ...
1
vote
0answers
53 views

Setting syntax table leads to high CPU load

I want to set - as a word character for all reStructuredText files. In order to do this, I acted according to the wiki and added the following to my .emacs file: (require 'misc) (defvar my-...
2
votes
2answers
503 views

backward-kill-word kills too much, how to make it more intelligent?

I'm looking for a way to reduce what Emacs kills when I use backward-kill-word. protected virtual void OnPropertyChanged(PropertyChangedEventArgs e) { if (PropertyChanged != null) ...
2
votes
1answer
469 views

Fast/efficient way to keep a running word count

I am trying to implement a minor mode that displays in the modeline the current word count and the number of new words since the file was last opened. There are some existing implementations with ...
2
votes
0answers
375 views

How to show word diffs in Magit? [duplicate]

Some people put one sentence or even one paragraph on one line. When someone fixes a spelling error in such a line it is difficult to spot the change in Magit log. How can I toggle Magit log to show ...
8
votes
3answers
813 views

Get word at point

It's a simple thing. My cursor is over a word and I want to get the word so that I can do something with it. I see a few different ways to do this but want to avoid reinvention and use a standard ...
1
vote
0answers
29 views

Word boundaries in mixed-alphabet words [duplicate]

By default (e.g., in fundamental mode), emacs seems to treat the sequence of characters abcαβγ in a buffer as two separate words. In particular, a command like M-f done at the beginning will only move ...
1
vote
2answers
95 views

Toggle letter case — exclude custom words from a list

Xah Lee wrote (some time ago) the following function that toggles the letter-case of the selected region or the current word. When toggling to initial caps, some words should not be capitalized such ...
1
vote
1answer
195 views

Is there a way to set arbitrary characters as the word boundary?

I know I can do this kind of thing with the sentence boundary, using (setq sentence-end "[regexp]"), but how can I do this with the word boundary? I'd like to add capital letters to the default word ...
1
vote
1answer
139 views

How to match only a word when using `re-search-backward` function

I want to replace a character inside a word, so I wrote: (setq regexp "[ab]") (and (re-search-backward regexp nil t 1) (replace-match "c")) This replaces a or b to c as I wish, but I want to ...
3
votes
2answers
242 views

Make forward-word not to jump over newline character

I have a text like this, testStatus['id'] = elt.$.id^^''&&&& testStatus$$['suite_id'] = "" where ^^ is my cursor position. When I press M-f, it uses forward-word and end up in the ...
2
votes
0answers
323 views

How to go to the beginning of a word/sexp?

When the point is not at the beginning of a word/sexp, backward-word / backward-sexp places the cursor at the beginning of that word/sexp. If the point is already at the beginning of a word/sexp, this ...
2
votes
1answer
665 views

How to remove the duplicate words in Emacs?

One can find here various ways to remove all duplicate lines in Emacs by preserving the first occurrence. Also Emacs 24.4 introduces the command delete-duplicate-lines. I am wondering if there is a ...
2
votes
1answer
141 views

Is there a case aware way to select words?

Is there a way to select words respecting the case... camelCase, snakeCase... e.g.: i have a word "trullyAwesomeFunction" and cursor is on "w", is there an Emacs function I could use that would ...
3
votes
4answers
2k views

A quick way to copy the word before the cursor

By M-backspace (or by M-x backward-kill-word), I can remove the word before the cursor. Is there a built-in equivalent of this command for copying instead of deleting? Obviously one can do M-x ...
4
votes
3answers
232 views

Is is possible to treat any symbol in the buffer as word when moving around?

When I move around specifically using M-f/b, I want to treat any symbol such as ", ', ., -, _, ?, !, *... as one word, so M-f/b will move around them instead of skipping them and jump to the next/...
0
votes
2answers
1k views

how to search and replace an entire word?

I know the command isearch-forward-word, but there doesn't seem to be an isearch-replace-word. I'd like to search and replace every instance of a certain word in a buffer. For instance, search for ...