Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [mark]

Question about the navigation in a buffer via the marks mechanism and the general usage of marks.

0
votes
0answers
10 views

Using marks in NERDTree?

I like NERDTree but don't want to use :OpenBookmark and would rather use m and ' shortcuts like in vim. I don't see anything like this in the NERDTree.txt. I want a fast way to jump to important ...
1
vote
1answer
49 views

Can I get a visual indicator when I drop a mark?

I like using marks, but I wouldn't mind having a visual indicator of some sort that maybe shows me "you've dropped mark x here", perhaps a letter in the gutter or some sort of line or character ...
0
votes
2answers
30 views

undo mark overwrite [duplicate]

Sometimes I accidentally type ma instead of 'a and overwrite the mark I had at a instead of jumping there. I know that by default vim has no way to undo an ma, but how can I add this functionality? ...
0
votes
0answers
76 views

E20: mark not set error occurs sometimes

I am editing latex1 prose in vim. For paragraph reformatting, I am using the par text formatter. I have set up the following autocommand for latex-files, to map A-q for reformatting the whole ...
1
vote
1answer
42 views

Can capitalized marks be saved in session INSTEAD of viminfo?

Marks are saved in .viminfo I would like to have separate marks saved per session. Is there an easy setting to make this switch? I know I could write some vimscript to save my session marks ...
0
votes
1answer
23 views

Why doesn't the cursor return to its original position in this command to create a new line?

I added the following command to my .vimrc, which is designed to insert a blank line below the cursor nnoremap <leader>o mzo<esc>`z The sequence of this command is mark the cursor ...
2
votes
1answer
68 views

difference between marks and tags?

Reading the manuals, seems to me that marks and tags are the same thing, only difference is that mark names can be [a-zA-Z] values, while tags can be alphanumeric. If I'm wrong, what is the difference ...
0
votes
0answers
64 views

Make viminfo file marks [0-9] only have 1 mark per file?

I plan to use the ~/.viminfo file marks (the ones that record the ten most recent lines and files) with fuzzy searching via grep so I don't have to type vim /full/path/that/is/very/nested/to/certain/...
1
vote
1answer
318 views

Find only between marks

Suppose that I have marks 'a and 'b, and I want to search for all occurrences of foo between them. The ex command :'a,'bs/foo/bar will replace only between 'a and 'b. Is there any command like :'...
1
vote
1answer
72 views

Go to the last cursor position using marks

I like to add marks for move across files but most of the time, I don't care about the line. I want to go on the last position of the cursor. For example, I have this marks : :marks mark line col ...
0
votes
2answers
118 views

Plugin vim-signature: How to change mark column character color?

Currently mark character is bright red as in below screenshot. How to change it?
0
votes
1answer
57 views

Plugin for showing marks by *highlighting entire line*, instead of using signcolumn?

I write code mostly on my laptop for portability. It's a small monitor, so plugins that use the "sign column" tend to take up too much space. For example, I have my Syntastic plugin configured to ...
1
vote
3answers
385 views

How do I delete a mark in current line?

Lets say I jump to mark with ]' and I want to remove it, how can I do it without typing :delmarks a?
0
votes
1answer
452 views

how to remap backtick mark with single-quote mark globally [duplicate]

I want to swap ' with ` for all combinations of commands in normal mode. I have tried the following: nnoremap ' ` nnoremap ` ' It works for commands like '', ``, but failed for d'', y'', etc. ...
0
votes
0answers
39 views

Get exact text of last edit

I'm trying to use the TextChanged autocmd to send edits to a daemon as I edit a buffer. Whenever I add text to the buffer I want my plugin to tell the daemon the text that was added and the position (...
3
votes
1answer
312 views

marks with fullline visualization

There is any solution to highlight the entire line where a mark has been inserted (e.g. with command ma)? The best could be to have marked each mark with a different color of choice. Any idea? ...
1
vote
1answer
44 views

Stop curly braces navigation from leaving marks

When using curly braces navigation, {, }, to move between paragraph, overwrites the "last jump" mark (the one accessible via ''). I would find it more useful if it left this mark untouched. Is there ...
2
votes
1answer
81 views

Is it possible to use the :put Ex command using column numbers?

The documentation for :put says that the command accepts a line. That is, it puts the content after the line specified. Is it possible to put the content at a particular mark? For example, say I am ...
3
votes
1answer
84 views

Shortcut for applying a command between the last two marks

When I first started using Vim 10 years ago, I found myself typing :'a,'fs/target/replacement/g a lot. I was used to using 'a and 'f as my go-to marks. So I also had this in my .vimrc: map qq :'a,'...
4
votes
1answer
365 views

What does `1 do?

I tried to set a mark using a digit: m1 and apparently that does not work, because later I typed `1 and I think it opened the last opened file or something else, I'm not sure. What does m1 do? Are ...
6
votes
2answers
951 views

Is it possible to have vim show the list of available marks when using marks?

That is, when you hit the marks operator key ` or ' you get a list of the available marks - i.e. the list vim gives from the ex command :marks. Then, when you press a letter to jump to the mark, you ...
0
votes
1answer
141 views

Why is navigation to mark a ('a) not working?

I'm using Vim 7.4.1825, huge version without GUI on OSX. When I start Vim with Vim -u NONE, navigating to mark a - set with 'a - is not working. Every other mark (b-z) is working well, only jump to ...
5
votes
1answer
88 views

Compute the distance between two marks

I came across a question, while writing some vimscript. I wanted to know the "distance in motion" between two marks in the buffer. The interesting point of this can be to know how many time I have to ...
5
votes
1answer
96 views

How do I jump back to the next-to-last insert position?

I can't find an easy solution to the following problem. Consider I'm in insert mode and I need to modify something in another point of the text. I exit insert mode and then move to the point I need ...
11
votes
7answers
2k views

How to search for lines matching current line in vim

I usually search for words by :/string, but if I have to search entire current line, how to do that. event: 1 beacon: 0x02 //line 1 event: 19 beacon: 0x02 //line 2 event: 1 ...
4
votes
2answers
147 views

How to set incremental marks?

I'm used to set marks with m<char> where <char> is any character I choose and then reaching the marks with ]` or [`. I'm wondering if it is possible to use a command to set a mark with an ...
9
votes
3answers
234 views

Set a mark to its previous value

Sometimes I use marks to navigate easily through different files using mA, mB... and 'A, 'B... And sometime (more often than I'd like to admit) because of inattention or whatever the reason is, I use ...
3
votes
2answers
595 views

Apply a command to each occurrence of a pattern in a range

I have 'a and 'b bounding some lines of text. I want to convert all the w, h, n, and m variables to upper case. A sample line: f(w,h,n,m) | w <= 0 | h <= 0 | n < 0 | m < 0 = 0 It seems ...
6
votes
1answer
979 views

How do I display any marks that are set on the current line?

I usually jump to next mark in file using ]' and [' commands. But I am not able to find a way to discover whether there are any marks set on current line.
9
votes
1answer
625 views

Using marks with dead keys

I am using a keyboard layout in which the backtick (`) is a dead key. This means that when I type a backtick followed by a vowel (for example `a) what Vim sees is an accented character (à). So if I ...