Skip to content

Conversation

@wynro
Copy link
Contributor

@wynro wynro commented Jan 26, 2018

Not much else to say. If there is any problems just ask

@npostavs
Copy link
Contributor

The ((yas-indent-line 0)) setting looks a bit odd to me. I would probably write nil rather than 0 to disable. Is bibtex-mode's indent function unhelpful? Perhaps it should be disabled for the mode globally in a .yas-setup.el file rather than per-snippet, similar to how it's done for python-mode:

(add-hook 'python-mode-hook
'(lambda () (set (make-local-variable 'yas-indent-line) 'fixed)))

@wynro
Copy link
Contributor Author

wynro commented Jan 27, 2018

As far as I know, the default bibtex-mode doesn't even have indentation. The <tab> is binded to a movement function, and the function indentation-according-to-mode simply puts everything in the first line. The indentation is more an stylistical choice, and to aid visualization. If I don't put it, yasnippet defaults to indent the snippet, and aligns everything to the first line.

About not putting it in .yas-setup.el, I simply didn't knew about the file. Putting 0 instead of the idiomatic nil is also related with my newbiness. I'll do both changes and push again. ¿It's better if I merge it with the other commit, or do you prefer them separated?

@npostavs
Copy link
Contributor

¿It's better if I merge it with the other commit, or do you prefer them separated?

I defer to @AndreaCrotti on that, but I guess it's easier to squash than unsquash.

@AndreaCrotti
Copy link
Owner

Here I am sorry @wynro
I don't mind either way, but feel free to squash into a single commit since it's just one logical change anyway

@AndreaCrotti AndreaCrotti merged commit 79fc648 into AndreaCrotti:master Mar 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants