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 [navigation]

The tag has no usage guidance.

1
vote
1answer
30 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
80 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 ...
2
votes
0answers
58 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
50 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
16 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
43 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
0answers
26 views

Navigate to file plugin like Intellij Idea

Does any plugin exist which can index files in current directory on start, allow enter text to search, show matches in tab and open these files in new tab? Similar to Intellij Idea "navigate to file" ...
0
votes
1answer
27 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 ...
2
votes
1answer
299 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
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
2answers
512 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
468 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
67 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
64 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 ...
4
votes
2answers
211 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 ...
1
vote
1answer
85 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
108 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
187 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
89 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 /...
3
votes
2answers
252 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 ...
0
votes
0answers
51 views

Problem with Esc(or Ctrl-[) navigation and insert mode

I'm having a weird problem lately when I'm coming out of Insert Mode to navigate in Normal Mode after just one navigation command (w,b, etc) vim sets me into Insert Mode Again, I'm not using the ...
2
votes
2answers
220 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
54 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
107 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
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
421 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
262 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?
0
votes
0answers
42 views

Why am I kicked out of insert mode when the cursor reaches the beginning of a line?

I've noticed that sometimes I'll be in vim in insert mode, and I'm able to navigate around the file with the arrow keys, but if I move the cursor to the first column of any of the lines in the file, ...
5
votes
2answers
112 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 ...
3
votes
1answer
89 views

To split long paragraph to next window

Now, I am starting to use vim to edit "normal text", that is, other than programming code. Thus, a "line" is really a paragraph, and is usually "long". In the very end of the current GUI window, ...
5
votes
1answer
302 views

How to tag jump in new tab, if target file not in active tabs, else switch to exists tab?

I use the mapping below: nnoremap <silent><C-]> <C-w><C-]><C-w>T But it will open duplicate file in multiple tabs. I have two questions: Has vim built-in functions ...
0
votes
0answers
57 views

Make `CtrlPMRU` respect `ctrlp_working_path_mode`

I would like to see a sorted list of, and then search within, my most recently used files within the current project. let g:ctrlp_working_path_mode = 'r' is close but doesn't appear to work in MRU ...
17
votes
5answers
4k views

Navigation in insert mode

I finally decided to ditch the arrow keys for navigation in favor of hjkl. I used the Vim hardmode plugin to disable the arrow keys. I got used to navigation pretty fast, but turns out that ...
4
votes
1answer
368 views

Navigate to tag in a new tab if not already opened, like `tab drop`?

What I expect from "tab-tag" navigation is the following behaviour: when need to jump to a tag: if the corresponding file is already opened in a window, navigate to it if it is not, open the buffer ...
2
votes
1answer
525 views

Swap two shortcuts

I'm very new to vim and found bindings Ctrl-F for page down and Ctrl-B for page up kind of inconvenient. I intuitively try to page up with Ctrl-F and page down with Ctrl-B because F is higher than B. ...
-2
votes
2answers
419 views

List of buffers in view pane

I must be turning a corner because I keep thinking of moving my text drafts off my Windows machine and onto my Linux box to get the convenience of editing them in Vim instead of Notepad++. One thing ...