I use snake_case a lot and right now Vim consider snake_case as one word. Is it possible to make it consider underscore as a word so snake_case is 3 words ?

  • @prowlr@lemmy.ml
    link
    fedilink
    4
    edit-2
    2 years ago

    Take a look at ‘iskeyword’ (:h iskeyword). I’m not able to test right now but I think it should work.

    edit: after some digging, people are pointing out this breaks syntax highlighting and are recommending solving this with plugins like https://github.com/chaoren/vim-wordmotion

    • @Reaton@lemmy.mlOP
      link
      fedilink
      32 years ago

      So, I’ve checked both options and the first one suits better my needs and does not break syntax highlighting for me so for now I’ve just set in my .vimrc : set iskeyword-=_ and it does the job! Thanks!