sponsor Vim development Vim logo Vim Book Ad

X Marks the Spot : Easy mappings for creating and navigating through lower-case marks

 script karma  Rating 0/0, Downloaded by 456  Comments, bugs, improvements  Vim wiki

created by
John Louis del Rosario
script type
Visit the official repository for the latest version. http://github.com/john2x/x-marks-the-spot.vim

Vim marks for pirates. Arr!

Easy mappings for creating and navigating through lower-case marks.

Basic usage
Default mappings:

- `<leader>x`: Add mark `x` in the current cursor location, where `x` is the next
available mark.
- `<leader>X`: Delete all marks at the current line.
- `<BS>`: Go to the previous closest mark (mode 1) or the previously
assigned mark (mode 2).
- `<S-BS>`: Go to next closest mark (mode 1) or the next assigned mark
(mode 2).

To override them, add the following to your vimrc:

nmap <unique> <leader>x <Plug>XmarksthespotAddmark
nmap <unique> <leader>X <Plug>XmarksthespotRemovemarks
nmap <unique> <S-BS> <Plug>XmarksthespotNextmark
nmap <unique> <BS> <Plug>XmarksthespotPreviousmark


Just place in your `.vim/plugins` directory. Pathogen ready.


To set options, set their values in your vimrc.


Choose between two mark navigation modes.

- `let g:X_MARKS_NAVIGATION_MODE = 1` - (default) Move through marks based on position.
Basically just calls `['` and `]'` for moving backward and forward, respectively.

- `let g:X_MARKS_NAVIGATION_MODE = 2` - Move through marks based on the order of
their assignment, regardless of their positions.


- `let g:X_MARKS_RESET_MARKS_ON_BUF_READ = 0` - (default) Don't clear all buffer
marks when initializing X Marks The Spot for the current buffer.

- `let g:X_MARKS_RESET_MARKS_ON_BUF_READ = 1` - Clear all buffer
marks when initializing X Marks The Spot for the current buffer.



- `let g:X_MARKS_SHOW_SIGNS = 0` - Don't show signs for mark location

- `let g:X_MARKS_SHOW_SIGNS = 1` - (default) Show signs for mark location

To Do List

1. Allow mode 1 to "cycle" to the first/last mark when at the last/first mark.
2. Add an option to limit one mark per line. (DONE)
3. Don't store marks in a dict anymore.
4. Show signs for marks.


Copyright (c) John Louis Del Rosario. Distributed under the same terms as Vim
itself. See `:help license`.
install details
Place in .vim/plugins directory. Pathogen ready.

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
x-marks-the-spot.zip 0.0.1 2012-08-19 7.3 John Louis del Rosario Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.