osyo-manga / unite-quickfix

29 stars 4 forks source link

Formatting and highligting #7

Closed petobens closed 10 years ago

petobens commented 10 years ago

I'm trying to use unite-quickfix instead of the normal quickfix. In order to have proper highlighting, and following the new English translation, due to #3 I set the following options and mapping in my vimrc:

let g:unite_quickfix_is_multiline = 0
call unite#custom_source('quickfix', 'converters',
        \'converter_quickfix_highlight')
nnoremap <silent> <Leader>uq :Unite -silent -auto-resize -no-quit -wrap
            \ quickfix<CR>

In this image I compare standard quickfix with unite-quickfix. You can see that

i) instead of showing blah.tex| 8 error| Undefined ..., unite-quickfix shows blah.tex|8|error| Undefined..., ii) the line corresponding to warning (line 10) is not shown: unite-quickfix shows ||warning | Overfull... instead of |10 warning| Overfull.., iii) I don't want the error/warning message (for instance, "Undefined control sequence") to be bold but I do want error to be bold. and iv) how do I change the warning color?

petobens commented 10 years ago

Thanks for such a quick reply. Unfortunately i) and ii) are not fixed. In fact now the word error and warning disappeared and only line numbers are shown.

screenshot-11-08-2014_18-31-18

osyo-manga commented 10 years ago

Thanks for such a quick reply. Unfortunately i) and ii) are not fixed. In fact now the word error and warning disappeared and only line numbers are shown.

hmm...Please tell me :echo getqflist().

petobens commented 10 years ago

Sure, here it goes:

[{'lnum': 8, 'bufnr': 3, 'col': 0, 'valid': 1, 'vcol': 0, 'nr': -1, 'type': 'E', 'pattern': '', 'text': 'Undefined control sequence'}, {'lnum': 9, 'bufnr': 3, 'col': 0, 'valid': 1, 'vcol': 0, 'nr': -1, 'type': 'E', 'pattern': '', 'text': 'Undefined control sequence'}, {'lnum': 10, 'bufnr': 0, 'col': 0, 'valid': 1, 'vcol': 0, 'nr': -1, 'type': 'W', 'pattern': '', 'text': 'Overfull \hbox (50.27577pt too wide) in paragraph at lines 10--11'}]
osyo-manga commented 10 years ago

Sure, here it goes:

Thanks. I fixed it.

petobens commented 10 years ago

Thank you!

Last two requests: i) is possible to make the word error bold (as the standard quickfix?)

ii) Can you change the highlighting of the word warning? (you can see in the image that is violet, I rather have it grey as in the standard quickfix).

screenshot-11-08-2014_20-40-09

osyo-manga commented 10 years ago

Last two requests: i) is possible to make the word error bold (as the standard quickfix?)

Set bold type.

ii) Can you change the highlighting of the word warning?

I added UniteQuickFixWarning highlight group. Plase set UniteQuickFixWarning.

highlight UniteQuickFixWarning NONE
petobens commented 10 years ago

Thanks for adding bold type in error and UniteQuickFixWarning highlight group. Regarding the word warning it once again disappeared and now only the line number of the warning (10) is shown. The problem seems to be this line where ==# is used instead of ==?.

Also is it possible for the cursor highlighted line to go the very end of the line? (note in image that the blue cursor line doesn't cover the whole line)

screenshot-12-08-2014_09-51-54

Shougo commented 10 years ago

Also is it possible for the cursor highlighted line to go the very end of the line? (note in image that it doesn't cover the whole line)

I fixed the problem. Please update unite.vim.

petobens commented 10 years ago

Thanks @Shougo but it doesn't seem completely fixed. See image below: screenshot-12-08-2014_10-21-46

Shougo commented 10 years ago

Hmmm... I don't know why...

@petobens This problem is occurred in other sources?

petobens commented 10 years ago

@Shougo No, only with this source.

Shougo commented 10 years ago

Please disable linenumber option and try it again. I think this problem is window width changing problem.

Shougo commented 10 years ago

@petobens I get it. It is Vim's feature. unite-quickfix uses conceal feature. It hides some columns... You can disable it by 'concealcursor' option.

petobens commented 10 years ago

@Shougo thanks. The problem with disabling concealcursor is that some ugly characters are shown in the quickfix window. See #5. I this can't be fixed I prefer to have a short cursorline highlight but still hide the weird characters that appear if concealcursor is disabled.

petobens commented 10 years ago

I close this issue (since it is fixed) and continue the discussion of cursor highligting in #9.