Questions tagged [cursor]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
1answer
509 views

Possibility to set cursor shape manually in Neovim

New versions of neovim handle cursor shapes perfectly. But for a special use case I need to change cursor shape manually for a while. Is it possible in Neovim > .2?
1
vote
1answer
116 views

Text changes when moving cursor over

I was modifying an email template and I noticed that when moving the cursor over a piece of code it changed. Here is a screenshot from before: and after: Vim version is 7.4 on Ubuntu 16.04. Any ...
4
votes
4answers
2k views

How to disable moving the cursor with the mouse

I've been using Vim for decades (and Vi before it since around 1984.) I use it now on Linux. Somewhere along the line one behavior crept in that I'd like to disable: when I click in a window to move ...
5
votes
3answers
1k views

How can I get the character at the cursor position in a multibyte aware manner?

Consider the following line: € € This file is encoded in UTF-8 and between the two Euro marks is a Tab character (the Stack Exchange software expands this to spaces). The byte value is: e2 82 ac ...
5
votes
1answer
261 views

Disable bold character under cursor

This might be a newbie question but I can't seem to find an answer anywhere. I've created a custom colorscheme, but I don't know how to stop the character behind the cursor from becoming bold. This ...
1
vote
1answer
62 views

How to correctly interpret the cursor's position?

I'm having trouble understanding the cursor in the context of Vim commands, e.g. insertion, deletion, movement, etc: When the cursor is hovering over a character and I want to delete until the end of ...
3
votes
0answers
808 views

Why does `set t_ve=' hide cursor in terminal

Vim's documentation lists t_vi as "cursor invisible" and t_ve as "cursor visible", but provides no hints on usage. Naively, I would have guessed that Vim would send the t_vi sequence when you somehow ...
0
votes
2answers
248 views

Current line position when switching buffers

When switching buffers with :e# or <ctrl>-^, I commonly see the line with the cursor (the current line) move to the middle of the window (maybe related to the scroll_cursor_halfway function ...
1
vote
0answers
208 views

How to restore cursor shape when exiting/stopping vim?

I have this in my .vimrc let &t_SI = "\<Esc>[5 q" let &t_SR = "\<Esc>[3 q" let &t_EI = "\<Esc>[2 q" The problem is that I keep the block cursor shape when I exit vim. ...
7
votes
1answer
6k views

I can't switch to | cursor in insert mode

I want to change cursors to a | character in insert mode, and then back to a block in normal mode. I am using urxvt as my terminal, and neovim. To switch cursors in my terminal, I run the following ...
3
votes
1answer
123 views

How to center a cursor on the screen, even at the start of the file

I like always knowing where my cursor is. I do this by having it in the center line of the screen. However if I am working at the top of the file the cursor stops centering because there is no more ...
4
votes
3answers
315 views

How can you indent your current file without losing your cursor position?

I was reading that the way to indent in vim is a gg=G sequence. This however loses my cursor position. How can I indent my file without losing my cursor position?
1
vote
4answers
129 views

Motion remap to select function doesn't work with v

I want to add a motion: :onoremap <silent> f( :<C-U>normal! f)vF(b<CR> If I have this line, where the asterisk is my current position: int a = fo*o(4, 5, 99); I want to type vf( ...
16
votes
2answers
5k views

How do I make Vim always display several lines after EOF?

In Vim, I don't like how when you reach end of file it puts the last line at the bottom of the screen. Is there anyway to make the last line be something like 10 lines above the bottom of the screen ...
0
votes
1answer
222 views

How to scroll without forcing the cursor on screen (by letting the cursor off screen)?

I want to be able to do this because I am used from other editors to use the cursor as a visual bookmark, so that after scrolling by letting the cursor off screen I can come back to its place later. I ...
9
votes
1answer
2k views

Vim normal and insert mode cursor not changing in GNU screen

I use vim in a few different contexts; typically, I like to put this in my .vimrc: let &t_ti.="\<Esc>[1 q" let &t_SI.="\<Esc>[5 q" let &t_EI.="\<Esc>[1 q" let &t_te.=...
3
votes
2answers
397 views

How to restore cursor position after search and replace in autocmd

I'd like to delete all spaces on empty lines before saving files. I've figured out how to do that. autocmd BufWritePre * silent! %s/\v^\s+$//e But this moves my cursor to the line where the spaces ...
0
votes
1answer
836 views

Gvim cursor jumps all over the place

I have a problem with my cursor in gVim, this happens in both Normal and insert(Whenever I type fast) modes. When I move my cursor it seems that the cursor goes to a random position for a very short ...
9
votes
1answer
704 views

Change the cursor shape in operator pending mode

My cursor in Gvim: My cursor in Gvim after pressing d: Is there any way I can change the cursor in terminal Vim when in operator pending mode? It doesn't have to look exactly like the screenshots. ...
5
votes
2answers
2k views

CursorLine colors

I configured my CursorLine to be lightyellow. I have a couple of issues here: First, lightyellow is marked as an error when it is a valid color. How can I avoid this? Second, when the cursor line is ...
11
votes
1answer
378 views

What is causing my cursor to look so strange? [closed]

Whenever I hit the end or beginning of a line, I get this very odd character where my cursor was. Any idea what may be causing this? I believe I have my fonts and theme correctly installed. I'm using ...
0
votes
1answer
564 views

On Ubuntu and in tmux, vim does not react to Ctrl+Home and Ctrl+End

Outside of tmux they work well. These key combinations should move the cursor to the beginning of the document and, respectively, to the end of the document. How do I make them work? Thank you very ...
3
votes
1answer
126 views

cursor behavior when exiting <insert> mode

I understand that when in insert mode the cursor is described as between characters, and when in normal mode the cursor is supposed to be on a valid character. I have been having a lot of trouble with ...
15
votes
3answers
8k views

Multiple cursors at desired location

I'm using vim-multiple-cursors plugin. I would like to put cursors exactly where I want. For example ([x] are the cursor positions): Lorem ipsum dolor sit amet[1], consectetur adipiscing elit, sed ...
5
votes
1answer
4k views

Change cursor shape in different terminals

At home I use iTerm2 on MacOS X, and at work, I have a laptop with CygWin. I have another PC where I use gnome-terminal or terminator, and sometimes I use tmux. I'm looking to configure the cursor ...

1
2