• Skip to primary navigation
  • Skip to content
  • Skip to footer
dev diary, TIL 톱밥과 Today I Learned
  • Posts
  • Categories
  • Tags
  • Random
    Jongbin Oh

    Jongbin Oh

    I write something to think

    • South Korea
    • Twitter
    • Facebook
    • GitHub
    • Instagram
    • Email

    #TIL #vim 일치하지 않는 문자열 제거할 때

    less than 1 minute read

    :v/warning/d
    

    로그에서 warning이 안 들어간 문자열을 삭제한다.

    :[range]v[global]/{pattern}/[cmd]
    

    :v 명령어는 :g! 명령어와 같으며 {pattern}에 맞지 않을 때 [cmd]를 실행한다. cmd로 d를 사용하면 해당 라인을 지운다.

    참고

    • Using the :v command - vim.wikia.com
    • :v - vimdoc

    Tags: vim

    Categories: til

    Updated: 2016-09-09

    Twitter Facebook LinkedIn
    Previous Random Next

    You May Also Enjoy

    #TIL #vim OS 클립보드를 사용해 복사하고 붙이기

    less than 1 minute read

    "+p

    #TIL #vim 범위에 매크로 실행을 하고 싶다면

    less than 1 minute read

    SomeModule.some_func(1, 2, 3) SomeModule.some_func(1, 3, 4, 5) SomeModule.some_func(1, 4, 5, 6, 7) SomeModule.some_func(1, 5, 6, 7, 8, 9) SomeModule.some_fun...

    #TIL #vim :s 명령어에서 현재 커서 단어를 입력하기

    less than 1 minute read

    :%s/foo/<c-r><c-w>/g Replace each occurrence of ’foo’ with the word under the cursor. means that you press Ctrl-R then Ctrl-W The word u...

    #TIL #vim URL을 여는 키바인딩 gx

    less than 1 minute read

    gx 키를 누르면 url을 디폴트 웹브라우저로 연다.

    • Feed
    © 2025 dev diary, TIL. Powered by Jekyll & Minimal Mistakes.