Try this function :
silent! sign undefine todo
sign define todo text=>> texthl=Search
g/\v\C(<TODO>|<FIXME>)/execute "sign place 9999 line=" . line('.')
\ . " name=todo buffer=" . bufnr('')
Now call the function on the command line :
Or add a ...
You can use my DynamicSigns plugin. This allows for so called "SignExpression" which are similar to the fold expression.
So you can simply do :SignExpression getline(v:lnum)=~'TODO'?'Warning':0
Read the help for more exmples of what is possible.
The advantage of using my plugin is, that it tracks changes of the buffer and adjusts the signs accordingly.
No, this unfortunately isn't possible. The signs column is separate, and always with a width of two cells. From :help signs:
When signs are defined for a file, Vim will automatically add a column of two
characters to display them in. When the last sign is unplaced the column
You could only configure Syntastic to not use signs at ...
Apart from the hack with adding a dummy sign (which is what most sign plugins do), there is nothing that can be done. If that bothers you, cheer at vim-dev, that my patch gets integraged. (Als available as issue 117)
You can do what some plugins do and create a dummy sign:
sign define Dummy
autocmd VimEnter,SessionLoadPost,BufRead * execute 'sign place 97349278 line=9999 name=Dummy buffer='.bufnr('%')
All this does is creates an empty sign on line 9999, which should be far enough from valid lines in a file you actually want to see signs in. It has to be set on a far ...
Highlight groups are an abstraction over the colors and styles that are available in the terminal or GUI. Vim has default groups built-in (and these are referenced by the syntax plugins), and a colorscheme provides corresponding color / style definitions.
It is perfectly fine to define your own, custom highlight group, and then use that for commands like :...
I think you are looking for :h :sign:
Here is an example that places a sign "piet", displayed with the text ">>", in
line 23 of the current file: >
:sign define piet text=>> texthl=Search
:exe ":sign place 2 line=23 name=piet file=" . expand("%:p")
For example these two lines give this on my setup (notice the sign >> on the ...
From the docs (:help syntastic-error-signs):
Signs are colored using the Error and Todo syntax highlight groups by default
(see |group-name|). If you wish to customize the colors for the signs, you
can use the following groups:
SyntasticErrorSign - For syntax errors, links to "error" by default
SyntasticWarningSign - For syntax warnings, links to "...
It seems you are at least partially aware of how this works but let's lay it out formally...
When you define the sign you specify the highlighting group to be used when that sign is displayed. (Run :hi to see all of your currently defined groups.)
For example, a sign that will have the same background color (and foreground color!) as one's 'colorcolumn' ...
Use SignJump. For whatever reason, Vim offers no way to quickly jump to tags outside of the horrendously unfriendly :sign jump command.
Once installed, simply use ]s and [s to jump to the next and previous sign relative to the cursor position. You can also use ]S and [S to jump to the first and last sign, respectively. It is general purpose and will jump to ...