The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [cursor]

is for the cursor display and cursor moving operations in Emacs. The cursor point features prominently in Emacs for editing, selecting, and navigating around Emacs buffers.

Filter by
Sorted by
Tagged with
0
votes
0answers
20 views

How to insert a new space before cursor?

I have links in Org mode that are at the beginning of the line and I struggle to add space before them in the insert mode. It would be great if there was a way to insert a space before the current ...
0
votes
0answers
26 views

Mark Cursor Vertically on Multiple Lines

I can enter rectangle mark mode with C-x SPC, and then do C-p or C-n to set mark to the line above or below. How do I vertically mark multiple lines in one go without having to do C-p or C-n multiple ...
1
vote
0answers
32 views

How to navigate SPC commands with Vim cursor?

I am very used to Vim keys BUT I love to use Emacs. That's why Spacemacs in Evil mode is perfect for me. There is one thing I still cannot figure out how to do. I don't know how to use h,j,k,l for ...
0
votes
2answers
55 views

Save place in files but don't move the cursor to the saved position automatically

I'd like to have a command that moves the cursor to the last position it was in when I left the buffer (either by killing it or by killing Emacs). I know I can use saveplace.el to save the position ...
0
votes
0answers
27 views

Emacs not active when switching from different workspace

this repulses me to my core. Every so often when I switch to my emacs from a different workspace (awesome wm) the cursor appears just as an outlined box and is not active until I switch back and forth ...
0
votes
0answers
27 views

org-mode: How to change cursor type for variable-pitch mode?

I have the following block of lisp codes in my .emacs config to enable variable-pitch mode for Org-mode. It is working fine however the cursor has changed from the default block to a thin line. Could ...
1
vote
0answers
46 views

Why is cursor moving after a save?

When working with the same buffer in multiple windows within one frame, it seems like the location of the cursor in, say, window A gets inadvertently set as a marker such that right after the buffer ...
1
vote
1answer
49 views

How do I move the cursor in helm?

How do I move the 'cursor' to the left/right in helm when typing a filepath? Currently my left arrow seems to be mapped to a backspace / clear word. I'm using Spacemacs in evil mode.
0
votes
0answers
35 views

Weird cursor position of emacs 26.1 on macOS 10.12.6

I am new to emacs and I met a weird emacs problem, which I don't even know is a feature or what :) Behavior: The emacs is in the text-mode and turned off all the plugins, and I want to type ["ls"], ...
1
vote
0answers
21 views

How to keep cursor position after quitting undo-tree-visualize

After using undo-tree-visualize and going back to some previous state, I wanna return back to final state (i.e., no undo) with my cursor staying at the position at that previous state. Is it possible?...
1
vote
1answer
46 views

Update point using mouse

I have been trying to add a custom keyboard command that will find a functions definition using S-mouse1. The issue is that I need two mouse clicks for this to work. The first click is to move ...
0
votes
1answer
29 views

forward/backward/next/previous element against YAML?

The lisp program is structured language, and one can execute C-M-f(forward-sexp) to pick the next sibling element. Similarly, C-M-b, C-M-u, C-M-d are defined; they can be used to move the cursor to ...
2
votes
2answers
205 views

How can I make the cursor change to block in overwrite mode?

I got something like that: (global-set-key [insert] (lambda () (interactive) (overwrite-mode) (setq cursor-type 't))) But I don't know how to do it so that when you exit the insert mode (when you ...
0
votes
1answer
128 views

Jump to non-whitespace characters along a column

I'd like to have a command that moves down to the first line of the next string of nonwhitespace characters along the current column, and the analogous commands that move upward, and to the last line ...
2
votes
1answer
90 views

How do I keep the cursor from going to the beginning of the line when there's no text on said line?

I want the cursor to stay in the same column whilst moving up and down on tabbed lines. But instead the cursor goes to the beginning of the line if there's no text on that line. How do I get rid of ...
0
votes
0answers
66 views

Terminal cursor movement stutters when mouse cursor is hovered over terminal

I using emacs-nox with Ubuntu 16.04LTS. The problem I'm facing is that whenever my mouse cursor is hovering over the terminal window, I experience very stuttery cursor movement. As you can see in ...
1
vote
2answers
83 views

How do I return to where I was before i-search, goto line, etc

Let's say I'm on line Y, char X, and then do an i-search or do a goto line. Then I move around there a bit, but then I want to return to Y, X. How do I do this? Is there an automatic mechanism that ...
1
vote
5answers
211 views

Skip vertical whitespace/non-whitespace blocks (sort of vertical M-f / M-b)

Say the point is on the 0 here: as0sasasa asasasasa as1sasasa asa as3sasasa asasasasa as2sasasa I'd like to have a command – like a vertical forward-word – that when run repeatedly would jump ...
1
vote
0answers
75 views

Dynamically change cursor color to indicate input script

I'd like to use the cursor color to provide visual feedback on the alphabet I am currently in (I sometimes have to switch rapidly between, say, Latin and Cyrillic, and find myself typing in the wrong ...
0
votes
1answer
75 views

Strange regex behavior

I want to skip blank region under cursor, so I created this regex: \s+\w translated to emacs regex [:space:]+[:graph:] but it doesnt match what I want. It matches some random space somewhere! Whats ...
2
votes
1answer
148 views

How can I highlight cursor or line in unselected frames?

Prelude Let me start by mentioning the scenario where the problem arises. I see that 2-3 variables are always used together in a system. I need to add yet another one that will be used along with ...
0
votes
0answers
364 views

Cursor disappears when point is at a leading star and org-hide-leading-stars is non-nil

In non-graphic mode I set org-hide-leading-stars to t. Unfortunately, under these circumstances, whenever point is on a leading star, the cursor disappears altogether. IOW, not only the leading star ...
2
votes
1answer
95 views

Using ggtags tag lookup along with centered-cursor-mode

I am using centered-cursor-mode to center the cursor at 10 lines above center at all times. I am trying to have ggtags respects this setup after each tag lookup. When I have the cursor at any point ...
4
votes
2answers
469 views

Moving cursor to the middle of the line where it currently is

Is there a way to define a function that, when called, would move the cursor to the middle (or close to the middle) of the current line, similarly to how we can move it to the beginning and end of the ...
0
votes
1answer
55 views

Tab completion in minibuffer moves cursor out of minibuffer

Problem: When pressing TAB in the minibuffer to get completions, the cursor is moved to the window of whatever file I am editing. Expected result: Pressing TAB in the minibuffer should keep the ...
0
votes
1answer
252 views

How to set `evil-insert-state-cursor` to a function?

In evil-mode, the cursor shape and colour for each state is controlled by the series of variables evil-*-state-cursor. The documentation for these variables states: May be a cursor type as per ...
0
votes
1answer
110 views

Custom behavior for cursor-in-non-selected-windows on first line

I like the hollow option because I know where the cursor is when I switch windows. I use ace-window to change windows. My problem is the ace character is difficult to read when the hollow cursor is on ...
0
votes
1answer
81 views

How to keep cursor position after calling ediff-current-file?

I would like to use ediff-current-file to jump to some of my previous changes/edits. However, when I type 'q' to quit ediff after calling ediff-current-file and navigation (using 'p'/'n'), the cursor ...
0
votes
1answer
189 views

How to jump out of any surrounds?

Not just parenthesis, but any surround. We are given the advantage of a pair being made and the cursor conveniently placed within. That's only 1/2 the procedure; what about jumping out? Previous (...
3
votes
1answer
100 views

Cursor colour based on input method

How can I let the cursor colour depend on the current input method?
2
votes
3answers
184 views

Storing previous cursor positions

I would like the ability to go back and forth through a series of stored recent cursor positions, say up to 100 of them. Specifically, a position should be recorded when I click somewhere, or when I ...
2
votes
1answer
300 views

Navigate cursor position history with line-based jumps

I use point-undo to jump between positions in the cursor history. However, point-undo uses every previous position of the cursor, and I often experience that what I actually want is to jump just to ...
0
votes
0answers
31 views

ssh to a remove host and use emacs in the ssh session, cursor always move to the beginning of the screen when save file

I have a VPS server and I always ssh to it and us emacs in the ssh session. I found that when I save a buffer the cursor always move to the beginning of the screen. How to disable this behavior? I don'...
1
vote
1answer
108 views

Set start cursor in code window instead of speedbar

I have sr-sppedbar always turned on, but whenever I start, I have to manually click the code window to switch the cursor from speedbar to the codes. How do I start emacs with cursor in the main window ...
1
vote
2answers
1k views

Unable to change cursor type in terminal

I'm trying to change the cursor type in Emacs. Here are the steps I'm following, C-h v cursor-type check the value of cursor type. It is set to t. start emacs with emacs -nw -Q and type (setq cursor-...
2
votes
2answers
267 views

Move to the beginning of a heading smartly in Org-mode

I just started with Org-mode today and noticed whenever I press C-a on a heading, the cursor is moved all the way to the beginning of the line instead of the first character in the heading. Like so :-...
2
votes
2answers
231 views

Move the cursor backwards to the end of the 1st word on it's between 2 words

If the cursor is placed on a whitespace and there're multiple whitespaces between 2 words, how can I move the cursor backwards to the end of the 1st word?
3
votes
2answers
125 views

kill the current line and preserving cursor position

I'm using the slick-cut function (as answered here by itsjeyd) for killing the entire line with minimal keystrokes. It's defined like so :- (defun slick-cut (beg end) (interactive (if mark-...
7
votes
2answers
762 views

How to persistently move the cursor in a buffer other than the current one?

NB: The post How to move point to the end of another buffer, using `with-current-buffer` and `goto-char`? presumably asks the same question as this one, but the answers given to it do not readily ...
3
votes
2answers
1k views

Mouse pointer between characters and the text cursor misplacement

Mouse cursor position interpretation in emacs drives me nuts. Why draw the mouse cursor in emacs window with vertical thin bar if you cannot effectively position it between characters? Selecting ...
1
vote
1answer
74 views

Keystroke for moving cursor to beginning/end of document

From many Emacs documentation sources, it's clear that when I have a document open, I should be able to press M-< and M-> to go to the start and end of that document respectively. Alternatively, I ...
0
votes
0answers
259 views

Change cursor-type in MinTTY

I'd like terminal Emacs to observe the current value of cursor-style when the current terminal emulator supports commands to change the cursor. For example: MinTTY is the default terminal emulator ...
7
votes
1answer
724 views

How to set the foreground color of the cursor face?

I tried to set the foreground color of the cursor face, but it does not seem to work. Setting the background color works fine, but setting the foreground color does not have any effect. I would like ...
0
votes
0answers
656 views

Can't remove cursor blinking in console mode

Emacs 24.3.1, OS: Linux Slackware 14.1. In my ~/.bash_profile file I have the following: # If on console, change cursor colour according to # /usr/src/linux/Documentation/VGA-softcursor.txt # Reset ...
0
votes
2answers
66 views

How to know that cursor is surrounded by specific text

Can we know, that we are in the following position: text1 ... <cursor> ... text2 But this doesn't count: text1 ... text2 ... <cursor> ... text2 text1 ... <cursor> ... text1 ... ...
4
votes
1answer
436 views

Undesirable Cursor Jump After Movement with M-left or M-right in Term-Mode

When I reposition the cursor in term-mode or ansi-term with M-left or M-right, it always returns to its original position (see animation below). Is this behavior standard? Is there a way to change it ...
1
vote
1answer
179 views

Change cursor-type in helm-header-line?

I have configured helm to hide the minibuffer and show the input in the header line following this instructions. The relevant code is this: (defun helm-hide-minibuffer-maybe () (when (with-helm-...
2
votes
0answers
117 views

Insert to the right of cursor

Q: What is the simplest way to insert text without moving the cursor? Is there a command, say insert-right-of-point, that does just that already? I did not find one and gave up after several C-h a. ...
0
votes
1answer
456 views

How do I set cursor colours per evil-state in the (non-GUI) text terminal?

In the terminal, (set-cursor-color "red") has no effect, so the only way I can distinguish insert from normal mode under evil-mode is through the <N> or <I> on the modeline. Is there a way ...
0
votes
0answers
24 views

Flickering cursor [duplicate]

Fairly often after doing some editing I will notice the cursor flickering. It blinks a little with an interval between blinks of around a couple of seconds -- but the intervals seem semi-random. It ...