mirror of
https://github.com/gilsondev/searchtasks.vim.git
synced 2025-11-14 04:33:48 -05:00
First commit
This commit is contained in:
34
README.markdown
Normal file
34
README.markdown
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
# Search Tasks - Search TODO, FIXME and XXX in your project
|
||||||
|
|
||||||
|
|
||||||
|
## Introduction
|
||||||
|
|
||||||
|
When you develop, it is likely that inserts comments that serves
|
||||||
|
as a reminder of what needs to improve, implement, or withdraw future.
|
||||||
|
You also have situations where you need to put a comment from a hack
|
||||||
|
who made or an encoding that need a better fix.
|
||||||
|
|
||||||
|
For it is common to use labels TODO, FIXME and XXX in comments.
|
||||||
|
But how does all of them to look in a directory containing your source code?
|
||||||
|
|
||||||
|
This plugin help and do a scan of all kinds of comments that matches the labels used.
|
||||||
|
|
||||||
|
|
||||||
|
## Commands
|
||||||
|
|
||||||
|
```vimL
|
||||||
|
" Search in root directory (TODO, FIXME, XXX)
|
||||||
|
:SearchTasks .
|
||||||
|
|
||||||
|
" Search in directory app/ in files .py
|
||||||
|
:SearchTasks app/*.py
|
||||||
|
```
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
If you want to change or enter new labels for searchtask search, just enter the following in your configuration ``.vimrc``:
|
||||||
|
|
||||||
|
```vimL
|
||||||
|
" List occurrences for search
|
||||||
|
let g:searchtasks_list=["TODO", "FIXME", "XXX"]
|
||||||
|
```
|
||||||
44
doc/searchtasks.txt
Normal file
44
doc/searchtasks.txt
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
*searchtasks.vim* Plugin for searching occurrences in the tasks with TODO,
|
||||||
|
FIXME and XXX
|
||||||
|
|
||||||
|
Author: Gilson Filho <http://gilsondev.com>
|
||||||
|
|
||||||
|
|searchtasks-introduction| Introduction
|
||||||
|
|searchtasks-commands| General Commands
|
||||||
|
|searchtasks-configuration| Configurations
|
||||||
|
|
||||||
|
This plugin is only available if 'compatible' is not set.
|
||||||
|
|
||||||
|
{Vi does not have any of this}
|
||||||
|
|
||||||
|
INTRODUCTION *searchtasks-introduction* *searchtasks*
|
||||||
|
|
||||||
|
When you develop, it is likely that inserts comments that serves
|
||||||
|
as a reminder of what needs to improve, implement, or withdraw future.
|
||||||
|
You also have situations where you need to put a comment from a hack
|
||||||
|
who made or an encoding that need a better fix.
|
||||||
|
|
||||||
|
For it is common to use labels TODO, FIXME and XXX in comments.
|
||||||
|
But how does all of them to look in a directory containing your source code?
|
||||||
|
|
||||||
|
This plugin help and do a scan of all kinds of comments that matches the labels used.
|
||||||
|
|
||||||
|
GENERAL COMMANDS *searchtasks-commands* *searchtasks*
|
||||||
|
|
||||||
|
*searchtasks-:SearchTasks*
|
||||||
|
:SearchTasks <directory> The only global command. Search occurrences in directory and list window matches. For example: >
|
||||||
|
|
||||||
|
:SearchTasks /home/user/projects/app/*.py
|
||||||
|
:SearchTasks **/*.php
|
||||||
|
:SearchTasks *.c
|
||||||
|
<
|
||||||
|
|
||||||
|
|
||||||
|
CONFIGURATIONS *searchtasks-configurations* *searchtasks*
|
||||||
|
|
||||||
|
If you want to change or enter new labels for searchtask search, just enter the following in your configuration .vimrc: >
|
||||||
|
|
||||||
|
let g:searchtasks_list=["TODO", "FIXME", "XXX"]
|
||||||
|
<
|
||||||
|
|
||||||
|
vim:tw=78:ts=8:ft=help:norl:
|
||||||
BIN
plugin/.searchtasks.vim.swp
Normal file
BIN
plugin/.searchtasks.vim.swp
Normal file
Binary file not shown.
29
plugin/searchtasks.vim
Normal file
29
plugin/searchtasks.vim
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
" searchtasks.vim - Search TODO, FIXME and XXX tasks
|
||||||
|
" Maintainer: Gilson Filho <http://gilsondev.com>
|
||||||
|
" Version: 1.0
|
||||||
|
|
||||||
|
if exists("g:searchtasks_list") || &cp || v:version < 700
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
let g:searchtasks_list=["TODO", "FIXME", "XXX"]
|
||||||
|
|
||||||
|
|
||||||
|
" Search tasks {{{
|
||||||
|
function s:SearchTasks(directory)
|
||||||
|
if !a:directory
|
||||||
|
echo "Directory is required (e.g: SearchTasks **/*.c)."
|
||||||
|
return ''
|
||||||
|
endif
|
||||||
|
|
||||||
|
for task in g:searchtasks_list
|
||||||
|
execute 'vimgrepadd /' . task . '/gj ' . a:directory
|
||||||
|
endfor
|
||||||
|
|
||||||
|
" show results
|
||||||
|
cwindow
|
||||||
|
endfunction
|
||||||
|
" }}}
|
||||||
|
|
||||||
|
command -nargs=1 SearchTasks silent call s:SearchTasks('<args>')
|
||||||
|
" vim:set sw=2 sts=2:
|
||||||
Reference in New Issue
Block a user