Questions tagged [motion]
is for moving the cursor around the buffer. Emacs provides key-bindings for alternative ways of moving the cursor interactively: by syntactical elements such as characters and words; by forward and backward searches; by arbitrary lines; by units such as sentences, paragraphs, and s-expressions; and by other methods unique to certain modes.
21
questions with no upvoted or accepted answers
3
votes
0
answers
80
views
Is there a way to move region with arrow keys or similar?
Say I have a function
int calc(int that, int this);
I want to mark int that and then move it right across words by hitting modifier arrow key (or similar) twice to get
int calc(int this, int that);
...
3
votes
1
answer
78
views
How can I find corresponding balanced parentheses?
I have this LaTeX code:
\caption{Lorem ipsum dolor sit amet: foo), bar), baz) and qux) consectetuer adipiscing elit.}
I want to put a marker immediately before the first { and one immediately after ...
2
votes
0
answers
21
views
Fields: how to avoid field-end-position to overlap with next field?
I have a text in the beginning of buffer
901 fifth avenue
The word 901 is defined as field "house" and fifth (including space) as field "street". So the text with fields is
...
2
votes
0
answers
44
views
Is (forward-char N)'s runtime complexity O(N)?
Internally, the text of a buffer is stored as a char array. The encoding used is based on UTF-8, which may use a variable number of bytes to represent different code points. Does the variable-length ...
2
votes
0
answers
57
views
How to navigate horizontally in a Helm buffer?
When I use helm-occur it prints the path to the source file of the buffer, which is inconvenient on a small display.
How can I navigate horizontally?
How can I hide paths in a helm buffer?
1
vote
1
answer
28
views
Is there a single keyboard shortcut for going to the end of the above line?
I want to go to the end of the above line. I can do this with two keyboard shortcuts, namely <up> followed by C-e. Can it be done in one in an out-of-the-box copy of Emacs? I could surely write ...
1
vote
0
answers
122
views
decrease initial delay for line-up/line-down movement
so every time I press C-n or C-p for moving the point up and down and keep pressing n or p I move several lines. However, after the first line move, there is a delay before the point is moving down in ...
1
vote
0
answers
161
views
Slowness opening and moving around within large files
I'm running spacemacs 0.200.13 on emacs 25.3.1 from a macOS 10.12 machine.
In some scenarios, things feel very sluggish. They get worse as a dozen buffers or so are opened during the day. From the ...
1
vote
0
answers
320
views
How can I run (recenter) after (call-interactive ...) that jumps to a buffer?
I would like to jump to a buffer using rtags for eg.
Example snippet:
(defun generic-lookup () "Follow link/goto line."
(interactive)
(cond
((string= major-mode "c-mode")
(progn
...
1
vote
0
answers
142
views
how to debug who move cursor
I have very annoying problem, after I run M-x compile time to time
cursor jump from middle of buffer to the first line.
I want to find out culprit (I found mode who responsible for this,
but I want ...
1
vote
0
answers
49
views
M-< and M-> not doing what it should on Windows
I recently installed emacs 25 on my Windows 7 machine. Things are doing okay in general, but when I want to reach the top of buffer (M-<) or bottom of buffer (M->) it simply inserts the "<" or ">...
1
vote
0
answers
154
views
possible to make it so that left-word and right-word include spaces?
Is it possible to adjust the behavior of the commands 'left-word' and 'right-word' (which I have bound to m-left and m-right) so that when I invoke, say, 'right-word' and the point jumps to the end of ...
0
votes
1
answer
73
views
moving cursor forward-sexp goes one char further in evil mode
When I want to highlight the following region
(a ( b ( c ) ) ) )
I get
(a ( b ( c ) ) ) )
I mark the beginning and do forward-sexp (or sp-forward-sexp, which results in the same outcome)
In, insert ...
0
votes
0
answers
52
views
How quick jump to specific lines in differents buffers?
Linux Mint 21
Emacs 27.1
Suppose I open 3 different text files. As result open 3 differents buffers.
E.g.
text_1.txt
text_2.txt
text_3.txt
Is it possible to jump using keybinding to the next lines?
...
0
votes
1
answer
109
views
Evil cursor moves one position right after exiting append mode, how to let it stay?
Similarly to the question Cursor moves one position left after exiting insert mode? I would like to know the similar thing, but now for the append command. I want the cursor to stay when exiting both ...
0
votes
0
answers
62
views
What alternative exist to write specialized forward-sexp-function?
I'd like to write code that allows forward-sexp and backward-sexp commands to navigate across balanced keyword-based expressions, such as make files that use the if / fi keywords.
It's possible to ...
0
votes
1
answer
327
views
How to make backward-kill-word and kill-word stop after it kills a newline character?
kill-word and backward-kill-word deletes too much text:
foo(bar)
<point>
Now if I press C-<backspace>:
foo(<point>
What I want is:
foo(bar)<point>
after pressing C-<...
0
votes
0
answers
505
views
Copy/Paste&Cut with Spacemacs on Terminal
I'm new with emacs, and I'm a developer that uses IDE to develop, and I want to learn emacs.
I choose Spacemacs as customization because I think has a good keybinding for me, but now I miss a feature ...
0
votes
0
answers
547
views
Problem with org-agenda view when going forward 1 week
I have my org-agenda to start on a Sunday. Hence I have this code in my .emacs file:
(setq org-agenda-start-on-weekday 0)
org-agenda opens with the cursor on the current day of the week.
If I press &...
0
votes
1
answer
52
views
Spacemacs kept repositioning the cursor when there's unmatched parenthesis
I'm new to Emacs, and there's one thing I don't understand. Suppose there's a file called test.el, which have the following contents:
(setq
Yes, the parenthesis is not closed, because I haven't ...
0
votes
0
answers
128
views
Enable Evil jump to work across all panes instead of only active pane
Is there a way to enable evil-jump-forward and evil-jump-backward to use the jump list of all panes instead of only the active pane?
In the gif below, here's what happens:
Start on left pane at ...