sponsor Vim development Vim logo Vim Book Ad

TaskMotions : Motions to task and TODO markers.

 script karma  Rating 1/1, Downloaded by 1745  Comments, bugs, improvements  Vim wiki

created by
Ingo Karkat
 
script type
utility
 
description
DESCRIPTION
This plugin defines movement commands to go to a task or TODO marker embedded
in the file, like this:
    // TODO: Check the return code from the frobnicator.

RELATED WORKS
To get a list of all tasks and TODO markers in the current file or project,
you can use the companion GrepTasks.vim plugin (vimscript #4196).

USAGE
]t Go to [count] next start of a task or TODO marker.
[t Go to [count] previous start of a task or TODO marker.
 
install details
INSTALLATION
The code is hosted in a Git repo at
    https://github.com/inkarkat/vim-TaskMotions
You can use your favorite plugin manager, or "git clone" into a directory used
for Vim packages. Releases are on the "stable" branch, the latest unstable
development snapshot on "master".

This script is also packaged as a vimball. If you have the "gunzip"
decompressor in your PATH, simply edit the *.vmb.gz package in Vim; otherwise,
decompress the archive first, e.g. using WinZip. Inside Vim, install by
sourcing the vimball or via the :UseVimball command.
    vim TaskMotions*.vmb.gz
    :so %
To uninstall, use the :RmVimball command.

DEPENDENCIES
- Requires Vim 7.0 or higher.
- Requires the CountJump plugin (vimscript #3130), version 1.81 or higher.
- SameHighlightMotion.vim plugin (unreleased), version 1.00 or
  higher (optional; only for the ]T mappings).

CONFIGURATION
For a permanent configuration, put the following commands into your vimrc:

Tasks and TODO markers are defined by a regular expression. Change it via:
    let g:TaskMotions_Pattern = '\<TODO:'

To include additional / different highlight groups in the ]T motions, adapt
the regular expression for them:
    let g:TaskMotions_HlgroupPattern = '^\%(Todo\|WarningMsg\)$'

To change the default mappings from ]t to ]x, use:
    let g:TaskMotions_Mapping = 'x'
To change the default mappings from ]T to ]X, use:
    let g:TaskMotions_HlgroupMapping = 'X'
To also change the [ / ] prefix to something else, follow the instructions for
CountJump-remap-motions. If you don't want a mapping, set the mapping
configuration variable to the empty String ('').
 

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
TaskMotions-1.10.vmb.gz 1.10 2024-11-14 7.0 Ingo Karkat - ENH: Add alternative ]T mappings that use the Todo highlight group instead of a regular expression pattern to locate Todos.
TaskMotions-1.01.vmb.gz 1.01 2012-10-16 7.0 Ingo Karkat Wrap around search when 'wrapscan' is set.
This requires CountJump version 1.81.
TaskMotions.vba.gz 1.00 2012-03-28 7.0 Ingo Karkat Initial upload.
ip used for rating: 142.132.191.50

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.
   
Vim at Github