Questions tagged [navigation]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
23 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
18 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
29 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/...
16
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
703 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 position. <c-d&...
0
votes
0answers
60 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
82 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
23 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
17 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
16 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
83 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
35 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
148 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
73 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
40 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
193 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
31 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....
0
votes
2answers
53 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
84 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
66 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 ...
0
votes
2answers
60 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
382 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
185 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
314 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 ...
3
votes
2answers
257 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
67 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
84 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
68 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 ...
2
votes
2answers
2k 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 ...
1
vote
2answers
1k 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
187 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 ...
6
votes
2answers
547 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 ...
2
votes
1answer
203 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
194 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
580 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
96 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 /...
4
votes
2answers
945 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 ...
4
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
92 views

Remapped keys won't work when combined

I have these lines in my .vimrc: " Remap movement nnoremap j h nnoremap k j ...
2
votes
0answers
203 views

Fuzzy Find C++ function definition

I am looking for a way to fuzzy find C++ function/method definition in NeoVim. A function definition can look like this: bool Cls::func() { bool func() { bool Cls::func(unsigned some, bool argument)...
1
vote
1answer
45 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
819 views

Is it possible to clear the tag stack without jumping anywhere?

Vim keeps a stack of tags (displayable with :tags) that the user jumps to and from, similar to the jump list (displayable with :jumps). The jump list can be cleared with the :clearjumps command. This ...
5
votes
1answer
547 views

Brace { } navigation without opening folds

I use {/} a lot for navigating around, but when I do this I never intend to open a fold and jump to blank lines within the fold. How can I nremap { and } to skip over folds?
4
votes
2answers
131 views

To pageup and pagedown without reserved lines

When I scroll a whole page up by ctrl-f, and down by ctrl-b, vim reserves 2 lines, and repeats them both in the previous GUI window and the present one. But I expect it not to repeat lines, because ...