Hot answers tagged

9

Try this function : function! SignKeyword() 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('') nohlsearch endfunction Now call the function on the command line : :call SignKeyword() Or add a ...


6

Install Vim 8 (released a few hours ago), and set signcolumn: set signcolumn=yes This is a actually available in Vim 7.4.2201 and later, but you really should go for the major release instead.


6

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.


5

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 disappears again. You could only configure Syntastic to not use signs at ...


4

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)


3

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 :...


3

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 ...


2

You can achieve this by adding set signcolumn=number to your .vimrc. Showing signs in the number column was added in v8.1.1564.


2

Note: Written before OP added the relatively important detail that the signs are generated by Syntastic. Ergo, a general tossing of things against the wall to see what sticks rather than a quick honing in on the actual solution à la the subsequent, accepted answer. It's fine, though. :P It seems you are at least partially aware of how this works but let's ...


2

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 ...


2

What about the new text-properties? They seem to have the property (sic) to follow. Text properties can be attached to text in a buffer. They will move with the text: If lines are deleted or inserted the properties move with the text they are attached to. Also when inserting/deleting text in the line before the text property.


1

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 "...


1

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 ...


Only top voted, non community-wiki answers of a minimum length are eligible