Fork me on GitHub
#vim
<
2017-09-01
>
defndaines15:09:54

This is the only “vim” specific room, is it OK to ask general vim questions here? Or is there a better place? My question: How to get gq to format a doc string to wrap after editing? I have these settings right now:

au BufRead,BufNewFile *.clj setlocal textwidth=78
autocmd Filetype clojure setlocal textwidth=78

dominicm15:09:59

Good place for general vim stuff!

dominicm15:09:35

@defndaines those look like they do the same thing?

dominicm15:09:50

Filetype one is generally considered best practice afaik.

dominicm15:09:41

@defndaines Using vim-sexp, I use gwie to get it to reformat my docstring within the textwidth

defndaines15:09:02

Cool, I’ll check that out.

dominicm15:09:23

gw is like gq, but it doesn't use the defined function. Vim-fireplace now attempts to format using cljfmt, which apparently doesn't care about width of docstring.

defndaines15:09:36

I’m just getting the hang of vim-fireplace, so unaware of cljfmt.

dominicm15:09:12

cljfmt is a clojure library, part of the cider setup. Pretend it doesn't exist 😉

defndaines15:09:22

The gwie worked exactly as expected, thanks. Gonna have to do some reading to take advantage of all the other features. Seems like vim-sexp may be an alternative to paredit, which I’ve been trying to use as of late. ( https://github.com/kovisoft/paredit )

dominicm15:09:17

imo, vim-sexp > paredit in so many ways.

dominicm15:09:32

It feels more vimmy. Text Objects & Operatators rather than uh... dd remaps?

defndaines15:09:20

Thanks. I’ll give it a spin.