Fork me on GitHub
#vim
<
2019-04-18
>
fmn13:04:00

In spacemacs if I have a keyword :foo-bar-baz and my cursor is positioned at "f" of "foo", if I press dw "foo" will get deleted leaving :-bar-baz as the result. How to make nvim behave the same as spacemacs? If I do the same with nvim, the keyword gets deleted.

dave14:04:22

i think the vim behavior is correct

dave14:04:43

emacs' evil mode (used in spacemacs) is only an emulation of that

dave14:04:56

i would do dt- (delete up until -)

fmn14:04:13

Thank you, I've actually never touch vim at all, so this behaviour surprises me.

fmn14:04:47

But how about if I just want to move between word that is separated by -

fmn14:04:43

While I think It's doable with f-, it's much easier with just w

dominicm14:04:15

My vim behaves like that I think

dominicm14:04:34

Look at :help 'keyword'

fmn15:04:38

It complains Sorry, no help for 'keyword'. Btw I'm using nvim.

fmn15:04:54

After more digging I can set it with set iskeyword -=-. Strangely, it doesn't work when I put it in the config file, I have to do it manually

dominicm15:04:39

You probably have something setting it in an ftplugin

fmn15:04:47

So basically an installed plugin is overwriting it?

fmn15:04:57

Thank you, I'll look into it

dave17:04:38

@funyako.funyao156 re moving between words that contain non-letters, have you tried W?

dave17:04:45

in vim there is a distinction between a "word" and a "WORD"

dave17:04:19

"WORD" is a more liberal concept, i.e. W will move you past more characters than w

dave17:04:24

btw, if you want to rule out foul play from a plugin, you can start vim with vim -u NONE to have it ignore your vimrc

zane20:04:58

Is there an easy way to get vim to conform to the rules from the Clojure style guide? https://github.com/bbatsov/clojure-style-guide

zane20:04:11

My guess is that I'm going to have to use vim-clojure-static and configure it by hand.

defndaines20:04:28

I think that let g:clojure_align_subforms = 1 on top of vim-clojure-static may be all that’s needed to match, but could be wrong.