For questions about how to traverse through files, directories, and tabs inside of Vi/Vim.
Questions tagged [navigation]
91 questions
18
votes
8 answers
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 with it, but not being able to move the cursor in…
Codemonkey
- 411
- 4
- 10
7
votes
2 answers
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 on the current file only.
Thanks
eyal karni
- 1,106
- 9
- 33
7
votes
2 answers
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 methods:
MyClass
MyClass()
myMethod(int,…
jpyams
- 237
- 3
- 6
5
votes
2 answers
How can I find the function name while navigating code?
I use Ctags and vim to browse by C source code. Quite often than not I am in middle of a long function and want to quickly check the name of the function that the browsing. I use the "{" to jump to the start of the function that I am in and '' to…
Preetham Rangaswamy
- 51
- 2
2
votes
3 answers
Best way to jump to the nth string block?
Given a line like this:
What is the best way to jump directly to the value string block?
Usually I’d use ci" to when there is only one string in the line. But in cases with multiple…
Vinn
- 761
- 1
- 6
- 17
2
votes
1 answer
How to search in `more` screens?
Some commands, for example :syn and :scriptnames show a "--more-- screen" which is confusing to navigate. Contrary to what man more says, pressing / doesn't seem to work to search for text. Instead pressing it shows -- More -- SPACE/d/j:…
Carla is my name
- 121
- 1
2
votes
3 answers
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:
Without any practice or thinking, I'm able to click…
David542
- 2,445
- 14
- 50
1
vote
3 answers
Strategies for vertically navigating long programs in Vim
I'm aware of many ways of jumping around a text file in Vim.
Ctrl-f/b/u/d
G
%
marks
{,}
And several other ways.
How can I jump around efficiently in long file? Please include a bit of "user experience" reasoning.
Please limit…
mrwonderfulness
- 111
- 1
1
vote
1 answer
Can you configure vim to stop treating curly braces differently than other text?
I find it really annoying that when I use standard hjkl or arrow key navigation in Vim, then Vim highlights the curly braces and gets stuck on them.
Here is an example of what I'm talking about:
here is some text
{
}
{
}
here is some text
Whether…
user8919
1
vote
1 answer
Navigation: Show current function name / if/switch depth etc
I'm struggling to explain what I want, and I do not even know if something like this is possible in vim.
I code in PHP / JavaScript.
In a large file, I would like a statusbar to show me:
which function the cursor is currently in (this is the main…
psx
- 115
- 3
1
vote
0 answers
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/items?itemName=vsls-contrib.codetour.
I think…
Marek Subocz
- 11
- 1
1
vote
0 answers
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 I wonder is there any way to easier perform Step…
sharipov_ru
- 111
- 2
1
vote
3 answers
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 display, until I hit some ↑ hits.
Most of the…
13260
- 79
- 1
- 11
1
vote
3 answers
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 press either w or j to go to the actual text.
So i…
Rohit Bhanot
- 247
- 2
- 10
1
vote
1 answer
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 of tags and jumplist. Is there such facility…
Eric Sun
- 153
- 2