vi 에서 /로 검색을 한 후에 역상된 블록이 지워지지 않습니다

withpiano의 이미지

vi 모드에서 /를 눌러 특정 단어가 있는 위치를 찾아서
확인까지 하는 것은 좋았는데..

다른 vi를 열었을 떄에도 자꾸 이넘이 그 단어를 반전시켜
놓아서 눈에 가시가 되어버렸습니다.

이거 해결할 방법이 없나요 ㅡ.ㅡ?

lacovnk의 이미지

아, 그거 어느 옵션이었는데 -_- 까먹었고요..

그냥 없을만한 걸 다시 한번 찾아줍니다. /qwer 정도로 ㅎㅎ

withkhw의 이미지

:noh

nohmad의 이미지

저는 .vimrc에 다음 설정을 넣습니다.

noremap <C-L> :nohls<CR><C-L>

<C-L>은 터미널을 다시 그리라는 시그널을 보내는데, vim에서는 컬러 디스플레이가 망쳐졌을 때(자주 발생하죠?) 습관적으로 자주 사용하는 거라, 하이라이트된 것을 끄는 명령에 함께 넣으니 편리하더군요.

yielding의 이미지

" -------------------- function SwitchHlSearch(flag)
set nohlsearch
let flagHlSearch = 0
function! SwitchHlSearch(flag)
    if a:flag == 0
        set hlsearch
        echo "@ Switch HlSearch : ON"
        return 1
    elseif a:flag  == 1
        set nohlsearch
        echo "@ Switch HlSearch : OFF"
        return 0
    else
        set nohlsearch
        echo "@ Syntax Error : SwitchHlSearch(). set nohlsearch."
        return 0
    endif
endfunction
map ,s  :let flagHlSearch = SwitchHlSearch(flagHlSearch)<CR>

" -------------------- switch syntax
let flagSyntax = 1
function! SwitchSyntax(flag)
    if a:flag == 0
        syntax on
        echo "@ Switch Syntax : ON"
        return 1
    elseif a:flag  == 1
        syntax off
        echo "@ Switch Syntax : OFF"
        return 0
    else
        syntax off
        echo "@ Syntax Error : SwitchSyntax(). syntax off."
        return 0
    endif
endfunction
map ,S :let flagSyntax = SwitchSyntax(flagSyntax)<CR>

요렇게 함수 만들어 사용해도 됩니다.

Life rushes on, we are distracted

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.