Questions tagged [navigation]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3
votes
1answer
48 views

Skip to next batch of search results (or find next non-match)?

So you search /needle, and end up trapped in a haystack of result lines. Is there a quick way to skip to the first non-matching line (and then the next batch of results)? E.g. I'm viewing the results ...
1
vote
1answer
39 views
+50

How to move to Markdown ATX-style headers?

How can I move (navigate) between Markdown ATX-style headers? The Vim plugin https://github.com/gbgar/pandoc-sections.vim does so using the [ and ] keys, but only when there is no space between the ...
3
votes
1answer
47 views

ctags vs GNU id-tools?

I stumbled upon mkid tools in tips.txt and tried it out (on C code). In terms of navigating to definitions, I thought it was identical to using ctags except for the fact that the ID file (generated by ...
1
vote
0answers
37 views

How to make Vim not be a line editor

Vim is famously (or infamously) a child of line-based editing. For many cases this is acceptable. But I wish to use it primarily as an academic tool with large amounts of text. I want the experience ...
0
votes
1answer
91 views

Navigation in insert mode with soft wrap and showbreak

I’m having trouble with hjkl movement in insert mode. The issue is that I have changed hjkl movement to move by display line. I have 'wrap' on. The cursor should normally move line by line, not move ...
0
votes
1answer
28 views

Moving up and down wrapped lines [duplicate]

I have a text line (let's call it LINE) wrapped into some fifteen lines on the terminal screen (let's call these lines). Using only the keyboard I need to move up and down lines to edit. Keys j, k, up-...
0
votes
1answer
29 views

Is there an equivalent to Xcode's quick jump bar (to navigate Swift MARK annotations within a file)?

Does a rough equivalent to this Xcode quick jump bar feature exist as a Vim plugin? I haven't been able to find any good leads on one in my research. It's a way to navigate sections in a file - in the ...
1
vote
0answers
44 views

Code tour plugin

I was wondering if you know any helpful vim or neovim package/ way to show and explain your codebase to new people. The best way I managed to find up until now is https://marketplace.visualstudio.com/...
17
votes
8answers
2k views

Trying to move away from arrow keys in normal/insert/visual mode, but small text inserts are killing me!

I've disabled my arrow keys, and am finally getting used to hjkl (for the longest time I'd always hit j and k the wrong way around - just seemed more natural for some reason). In normal mode I'm fine ...
1
vote
1answer
17 views

Quickly go to the end of “syntax highlighted” element

I am using syntax highlighting to help with writing LaTeX documents in vim. My documents involve a lot of brackets, and it is easy to do a trivial mistake and end-up with something which doesn't ...
4
votes
2answers
733 views

Why isn't this implemented by default in vim? (line by line Scroll) [closed]

Very often, my preferred way of navigating a file in vim is by "scrolling" line by line. By scrolling, I mean shifting the lines up/down while keeping the cursor on the same line and ...
0
votes
0answers
641 views

Restore “search hit BOTTOM, continuing at TOP” when search navigation wraps aound end of file

I've recently switched to Neovim, and some days in, I realized that there was no search hit BOTTOM, continuing at TOP message when jumping from the last to the first search result (or vice versa), ...
1
vote
3answers
86 views

Fastest way to navigate various points in vim

Is it possible for vim navigation to be as quick as a normal point-and-click navigation? For example, I've taken the following example here where I've created four points that need to be clicked: ...
1
vote
0answers
27 views

How do I navigate using tags in a personal copy of the vim documentation?

As background: I am a beginner in VIM and I want to go through the built-in vim manual, but with my own copy (not the system copy) so that I can practice in the manual text as I go along (I also ...
1
vote
0answers
19 views

Navigating wrapped paragraph as multiple lines [duplicate]

Vim wraps text around as most other text editors, but does not allow the same kind of navigation within wrapped lines. Take for instance a piece of text composed of several long paragraphs. If the ...
0
votes
1answer
17 views

Is there a backward equivalent to w?

You can go forward, to the beginning of next word, with w/W. You can go forward, to the end of the word, with e/E You can go backward, to the beginning of the word whit b/B How do you go backward, to ...
1
vote
1answer
183 views

Smart jump to definition

I have ctags installed on my Windows machine. I have the following mappings in my vimrc file set tags=./tags;/ nnoremap <F5> :!ctags -R .<CR> nnoremap ,dd :exec("tag ".expand("<cword&...
1
vote
1answer
36 views

Why are split and tab navigations distinct?

Known: <Ctrl>w then any of hjkl. Known: :tab_<CR> where _ is either rlpn. Why is there not a <Ctrl> navigation for tabs nor a : for splits? Why do the navigation commands differ ...
2
votes
1answer
287 views

How to navigate long lines like separate lines?

When I have a very long line in vim it will be shown on the screen as multiple lines, like this: line no. | content | 100 | this is a very ...
3
votes
1answer
93 views

How to treat underscores as whitespace when skipping to the next word? [duplicate]

Let's consider an example where the cursor is at the beginning of the text one_two three. Underscores are treated as part of the word, so w moves right to the first letter of three. With set ...
1
vote
0answers
41 views

Is there a simple way to navigate a generated file that includes # line preprocessor directives?

I'm working on a code generator tool. I'm planing to use # LINE "filename" directives like the ones generated by the C preprocessor to show the relationship between the generated code and the original ...
1
vote
2answers
262 views

Move cursor to old position after scrolling

I often want to edit text in say line 200 of a file, but while doing this I need to look at say line 100, so I scroll to line 100. Is there a way to quickly jump back to line 200 after scrolling? Is ...
1
vote
0answers
35 views

Easier way to create alternate-file?

I use switching between alternate-files in VIM a lot in my development workflow and it works great. However, sometimes I feel that it will be very useful if I could create missing alternate files, so ...
1
vote
0answers
33 views

How do you remap keys in :history or :highlight?

I use Colemak hnei for nav in normal mode, but my keys default to hjkl when when I'm viewing :history and :highlight. How do I remap these keys? My guess is that the program may be switching to more....
1
vote
3answers
88 views

moving through the doc, caret staying centered

I move around using the arrows ←↓↑→, never really got used to the hjkl thing. I know I'm supposed to use the hjkl thing. When hitting ↓, it reaches a point where the caret is on the lower side of the ...
-2
votes
1answer
132 views

How to go to before last character in a line? [closed]

I know its a simple one, but I've had no luck finding it so far. I known A, brings you to the end of a line. However, I would like to jump to and, insert after the second last character. Example: ...
1
vote
2answers
73 views

Read-only mode in Vim while using cscope?

I am traversing through a C code in Vim using cscope. Sometimes while traversing, some key gets pressed or mouse gets right-clicked and the Vim enters in insert mode, and it creates a mess to undo the ...
1
vote
2answers
72 views

Incremental search: is it possible to push 'Esc` without scrolling back?

My problem on this gif: I am in one place, searching for meta, I do not want to loose my current search highlighting (yes I know that I can restore it later in / menu). I found what I need - without ...
1
vote
3answers
478 views

Move to first word of paragraph in vim with { and }

Since Vim considers paragraphs as lines/sentences separated by blank lines the paragraph movement with { and } feels little weird to me as it takes you to the next blank line and you always have to ...
1
vote
1answer
254 views

changes command only display current file change history

The :changes command listed the change history of current file. However when I work with multiple buffers, I want to list changes to all the buffers I opened in current vim-server, like the behavior ...
3
votes
2answers
489 views

How to jump to the previous location in the same file?

I mean like CTRL-O (repeatedly) but limited to the current file only. Sometimes I check stuff in another file(say using goto definition). And it loads it into the same window. Still, I want to focus ...
4
votes
2answers
290 views

Equivalent to tmux CTRL+B z in vim?

In tmux if you have alot of panes open, you can press CTRL+B, z to zoom into that terminal pane. Is there a way to do the same thing in vim, to zoom into / out of the selected pane?
1
vote
1answer
86 views

how to skip commented lines when navigating?

When navigating in normal mode by j or k, I want to skip commented lines. Is it possible? Is there a vimscript snippet for that?
0
votes
1answer
20 views

How to automatically return to where the cursor was before executing cdo?

Is it possible to automatically return to where the cursor was before running :cdo command? Currently, the cursor ends in the last file in the quickfix, then I have to navigate back to where I was ...
1
vote
1answer
96 views

creating a menu for navigation in file

while coding in vim I use often special comment to denote section of the file. For example in C it is //;; some title 1 //;; some title 2 I have also configured a shortcut to print with a global ...
0
votes
1answer
29 views

Is there a way to change the “current buffer”--the one that gets defined when I use “n” and “N”?

Once in a while I do work on a large number of files (i.e. today it was about 1,700) using a command such as: gvim `find . -name *.cpp` and I use the "n" (no changes) or "wn" (made a change) to go ...
3
votes
1answer
2k views

move forward by a certain number of chars or bytes?

Sometimes I need to move to a particular byte offset or move to the nth unicode rune in a file (utf-8). Does vim expose a way to move to an absolute byte/char offset or to move the cursor forward a ...
0
votes
1answer
69 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 ...
3
votes
2answers
3k views

Show Outline of Code

Is there a way, built-in or with a plugin, to get an outline of my code in Vim? In Eclipse, there is a panel that shows an outline of the code in the file, showing a breakdown of the classes and ...
2
votes
2answers
2k views

Jump to Next Number

Is there a command in Vim to move the cursor to the next number? I know I can do f2 to find the number 2 in the same line, but I'm looking for a more general number-jumping command.
2
votes
1answer
73 views

How to move to top/bottom of region delimited by consecutive blank lines

I have two commands for somewhat emulating the Emacs command narrow-to-defun. I have two commands that move to the top/bottom of the current paragraph nnoremap <silent> <leader>gt mp{...
0
votes
1answer
238 views

How to setup the default browser to follow hyperlinks [closed]

On a text file with a hyperlink (http://url/) if I hover the mouse over the hyperlink and click on it, it is opened on chrome. How can I change the browser that vim decides to use when following ...
8
votes
3answers
651 views

How to show the current location in a yaml hierarchy

When working with larger or rather deeply nested yaml files (Hi Rails), it happens quickly that I loose sight of where I am with regards to the indentation hierarchy of the file. A very simple ...
3
votes
1answer
228 views

How do you page through the jump list?

With the :jumps command, you can display the list of jump locations to aid navigation. That is you can use CTRL_O and CTRL_I to jump backwards and forwards respectively. However, my jump lists appear ...
1
vote
1answer
223 views

Move to next keyword in vim?

I want to map W to jump to the next keyword of the language or jump to the next interestingly syntax highlighted word eg: For the following snippet SELECT * FROM Fruits WHERE Fruits.name = 'Apple'...
0
votes
1answer
795 views

Jump to next occurrence of the current character

I often navigate to the next occurrence of the current non-paren character. For example, `HTTP GET www.example.com/example/com` is an example URL. When the cursor is at the beginning of the line at ...
1
vote
1answer
102 views

configure vim to process argv and understand filename:linenumber

Does vim expose an api for manipulating argv before the "main program" looks at it? I want to be able to use the syntax: $ vim /path/to/my/file:100 and have it mean the same thing as $ vim +100 /...
5
votes
2answers
1k views

Go forward to first alphabetic character

Is there a way to go forward to the first letter, maybe using f other than specifying the letter itself? In other words I want to skip over whitespace, symbols and digits. The reason I ask is that I ...
6
votes
2answers
1k views

How do I jump to the next line with the same indent level?

I have a space formatted (yaml) file like the following: en: templates: template: "VERYLONGTEXTHEREWITHHUNDREDSOFLINES" destination: "I want to jump here" other: stuff ...
0
votes
1answer
105 views

Remapped keys won't work when combined

I have these lines in my .vimrc: " Remap movement nnoremap j h nnoremap k j ...