-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scheme: improve alignment for some snippets and add one UltiSnips snippet #1499
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will now be mixing tabs and spaces, is that desirable? Until this commit we've used tabs always as this means the user can configure indentation to whatever is their preference.
That's intendeed. In scheme functions' and special forms' applications look syntactically the same, i.e. Try to write the following, say, on rextester (or even on Vim itself; I haven't customised anything, so that should be the default), and press enter right before entering the marked character (cond (#f "ciao") (#t "uffa"))
; ^ ^
(cond (#f "ciao") (#t "uffa"))
; ^ and you'll get these: (cond (#f "ciao")
(#t "uffa"))
(cond
(#f "ciao")
(#t "uffa")) The latter can all be handled by tabs, but the former can't, it must use spaces because the indentation must exactly be the same width as I'm obviously assuming claiming that having the various "arguments" of functions/special forms be aligned vertically is the right thing to do. (¹) One could claim that the 1st of the 3 arguments to |
I understand the intention, what I mean is that with this if the programmer says they wish to indent using tabs we will no longer respect that wish. This is not what we do with any other snippets, including all the other Lisp favours. |
In this case, a solution would be to always LineBreak after the function name, as in (cond
(#f "ciao")
(#t "uffa"))
(if
a
b
c)
(define
(fun-name args)
def)
(+
x
y
z) |
@lpil , what if I try using |
Sorry, we use tabs in this project. |
No description provided.