forked from vim-scripts/EnhancedJumps
-
Notifications
You must be signed in to change notification settings - Fork 0
Enhanced jump list navigation commands.
matt-royal/EnhancedJumps
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is a mirror of http://www.vim.org/scripts/script.php?script_id=2695 DESCRIPTION This plugin enhances the built-in CTRL-I / CTRL-O jump commands: - After a jump, the line, column and text of the next jump target are printed: next: 3,9 ENHANCED JUMPS by Ingo Karkat - An error message and the valid range for jumps in that direction is printed if a jump outside the jump list is attempted: Only 8 older jump positions. - In case the next jump would move to another buffer, only a warning is printed at the first attempt: next: EnhancedJumps.vim The jump to another buffer is only done if the same jump command is repeated once more immediately afterwards; like this: Pressing CTRL-O, noticing the warning, then quickly pressing CTRL-O again to overcome the warning. With this, you can eagerly jump around the current buffer. Because you will be warned when a jump would move to another buffer, you're much less likely to get lost. In addition to the enhanced jump commands, separate special mappings are available that restrict the jump targets to only local locations (in the same buffer) and remote locations (only in other buffers). This plugin enhances the built-in g;/g, change list jump commands so that they skip jumps to previous / later edit locations that lie within the currently visible range. This makes it easier to navigate between distant edits in a large buffer, without having to manually skip over all the local changes. USAGE Simply use the CTRL-O and CTRL-I commands to go to an older / newer cursor position in the jump list. When a warning "next: {file}" is echoed, quickly repeat the jump command to move to that buffer (a [count] need to not be typed again; if you do include the [count], it must be the same as before). If you do not want to move to that buffer, just ignore the warning, and continue browsing the current buffer. On the next jump attempt, the warning will be repeated. g<CTRL-O>, g<CTRL-I> Go to [count] older / newer cursor position in the current buffer. Jumps to other buffers are not considered. Useful when you mainly edited one file, briefly jumped to another, and now want to recall older positions without considering the other file. <Leader><CTRL-O>, <Leader><CTRL-I> Go to [count] older / newer cursor position in another buffer. Jumps inside the current buffer are not considered. Useful for recalling previously visited buffers without going through all local positions. Regardless of the jump direction, the last jump position in a buffer is used when there are multiple subsequent jumps in a buffer. Simply use the g; and g, commands to go to an older / newer far change position in the change list. g; Go to [count] older far change (that lies outside the currently visible range and is more than the current window height lines away from the previous change or the last accepted change). If [count] is larger than the number of older far change positions go to the oldest far change. If there is no older far change, go to the [count] older near change; i.e. fall back to the original behavior. If there is no older change an error message is given. (not a motion command) g, Go to [count] newer far change. Just like g; but in the opposite direction.
About
Enhanced jump list navigation commands.
Resources
Stars
Watchers
Forks
Packages 0
No packages published