From 8a843ef55aaf79c5ffc44c2590b526ea222182ed Mon Sep 17 00:00:00 2001 From: Gilson Filho Date: Wed, 17 Oct 2012 14:14:08 -0300 Subject: [PATCH] First commit --- README.markdown | 34 ++++++++++++++++++++++++++++ doc/searchtasks.txt | 44 ++++++++++++++++++++++++++++++++++++ plugin/.searchtasks.vim.swp | Bin 0 -> 12288 bytes plugin/searchtasks.vim | 29 ++++++++++++++++++++++++ 4 files changed, 107 insertions(+) create mode 100644 README.markdown create mode 100644 doc/searchtasks.txt create mode 100644 plugin/.searchtasks.vim.swp create mode 100644 plugin/searchtasks.vim diff --git a/README.markdown b/README.markdown new file mode 100644 index 0000000..9a95360 --- /dev/null +++ b/README.markdown @@ -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"] +``` diff --git a/doc/searchtasks.txt b/doc/searchtasks.txt new file mode 100644 index 0000000..707af24 --- /dev/null +++ b/doc/searchtasks.txt @@ -0,0 +1,44 @@ +*searchtasks.vim* Plugin for searching occurrences in the tasks with TODO, + FIXME and XXX + +Author: Gilson Filho + +|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 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: diff --git a/plugin/.searchtasks.vim.swp b/plugin/.searchtasks.vim.swp new file mode 100644 index 0000000000000000000000000000000000000000..c9d53c3d6112f4aa18e59c9e34f5b8c5bb6c9e26 GIT binary patch literal 12288 zcmeI2yH6BR6vi(mJ{o*hVoZ*saUg-6-K790yVxK~v4I36n;1jJnY*(WhnaQm-30@S zi56Pg*%=#4{{kC(EB^>fD|_|3`ydDj)S5HNm;0D=?>XNu(`@!UDXuNnXr?eN@LUw) z!}q=AA6IXQW-LUk5}l>?#qm!oh=Q%)p^^V%~v<&jFX#)LJd#$7$ ztMuSj0U^gH=eJCN37kxzZ5mUvqhh*TD%#+i&JDV9`QgduID!c<0Vco%m;e)C0!)Aj zFoFMufN7107jScG;ON?5962-&mOL;4Ccp%k025#WOn?b60Vco%m;e)C0{o|(w9;#(UbU^%RM9GtshOiNND|Wifp_C>#U7Y*C+yALZdb@OYP8eP zD0F)h*;STfg6Xyl+eVU${BbVP=pB*gQh{v0HU`&=H^{C7KT^32O_o2$K^*T#sFY&V zz2D)zo+xb)kXS2zuj!krHv!Lm7`+lT?d +" 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('') +" vim:set sw=2 sts=2: