2016-12-11 6 views
1

대신 전체 라인의 텍스트를 강조하기 위해 :. 당신은 기호에 배치되어 전체 라인 하이라이트 그룹을 할당 할 linehl 인수를 사용하여 서명표시를 설정하면 빔

이 전체를 강조 끝까지 줄을 긋지 만 그 줄의 텍스트 만 강조 표시하려면 어떻게해야합니까?

편집 : 생각은 Syntastic을 사용하여 오류와 경고를 표시하는 것이지만 원하는대로하려면 SyntasticStyleError 기호를 다시 정의 할 수 없습니다. 해당 행의 텍스트 대신 모든 행을 강조 표시합니다.

+0

Syntastic은 이미 오류를 강조 표시 할 수 있습니다. 더 많은 것을 원하십니까? – romainl

+0

Syntax는 (1) 관련 체커가 열 번호에 대한 충분한 정보를 제공하고 (2) 해당 정보를 사용하도록 코드가 작성된 경우 기본적으로 오류 및 경고를 강조 표시합니다. 이것은 표지판과는 아무런 관련이 없습니다. 또한 강조 표시 그룹 인'SyntasticErrorLine'과'SyntasticWarningLine'을 재정 의하여 전체 라인을 강조 표시 할 수 있습니다. 이것은 실제로 징후와 관련이 있으며 일반적인 강조 표시를 무시합니다. 둘 다 동시에 일할 수는 없습니다. – lcd047

답변

1

내가 아는 한 불가능합니다. :h sign-define 봐 :

:sign define {name} {argument}... 
     Define a new sign or set attributes for an existing sign. 
     The {name} can either be a number (all digits) or a name 
     starting with a non-digit. Leading digits are ignored, thus 
     "0012", "012" and "12" are considered the same name. 
     About 120 different signs can be defined. 

     Accepted arguments: 

    icon={bitmap} 
     Define the file name where the bitmap can be found. Should be 
     a full path. The bitmap should fit in the place of two 
     characters. This is not checked. If the bitmap is too big it 
     will cause redraw problems. Only GTK 2 can scale the bitmap 
     to fit the space available. 
      toolkit  supports ~ 
      GTK 1  pixmap (.xpm) 
      GTK 2  many 
      Motif  pixmap (.xpm) 
      Win32  .bmp, .ico, .cur 
        pixmap (.xpm) |+xpm_w32| 

    linehl={group} 
     Highlighting group used for the whole line the sign is placed 
     in. Most useful is defining a background color. 

    text={text}      *E239* 
     Define the text that is displayed when there is no icon or the 
     GUI is not being used. Only printable characters are allowed 
     and they must occupy one or two display cells. 

    texthl={group} 
     Highlighting group used for the text item. 

그것은 당신에게 텍스트 배경 색상과 라인의 배경 색상을 구별 할 수있는 직선 전달 방법은 제공하지 않습니다 - 사실, 당신은 단지 linehl 매개 변수를 설정할 수 있습니다.


어쩌면 당신이 원하는 것을 해킹 할 수있는 방법이 있습니다. 또 다른 흥미로운 아이디어는 커서가 섹션으로 이동 한 후 숙박 가능 강조에 vim.wikia.com (link)에 설명 https://sunaku.github.io/vim-256color-bce.html

: 나는 당신이 유용하게 찾을 수있는 링크 우연히했습니다. 그것은 다음과 같은 명령을 사용하여 제안 :

:nnoremap <silent> <Leader>l ml:execute 'match Search /\%'.line('.').'l/'<CR> 

이 방법은 당신이 :sign place에서 얻는 정보를 혼합하고 내가 위에서 게시 사용자 정의 강조 표시 방법과 표시를 대체 할 수 있습니다. 그것은 비록 스크립팅이 필요합니다.