-
Notifications
You must be signed in to change notification settings - Fork 23
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
Records with name enclosed with quotes #19
Comments
Now records in quotes are found – please let me know if it works as you expected. |
Hi! Special records are now added to the tags file. Thats perfect! Example: test.erl:
tags: Pressing <C-]> yields for different scenarios: Placing the cursor over the "B" in #'Bla-bla' will render Placing the cursor over the "-" in #'Bla-bla' will render Placing the cursor over the "b" in #'Bla-bla' will render Is this something that can be fixed in the overriden VimErlangTagsSelect() function? Many thanks! |
Indeed. Instead of doing
The other tricky part is deciding whether we are in a record name with a plain atom syntax or one with a quoted atom syntax. Assuming that you use the vim-erlang syntax file (which is also the one shipped with Vim 7.4), then Another though I had is that maybe we should also generate If you feel like contributing, this is a great opportunity ;) Otherwise (no worries in that case) before I implement the above, you can manually do a |
I will give it a shot! |
I did a simple hack for this particular 'Bla-bla' atom. Its a delicate problem since any character is valid in a quoted atom:
I guess one of your solution above is better. In the meantime, maybe my hack will do. Pull request coming up.. |
Indeed :) Making the space character work within record names is especially difficult, because a tag in a tag file cannot contain whitespace. So even my proposal doesn't fix the particular case of the space character.
Unfortunately this PR would break cases where there is no space around a min_max_diff(L) ->
lists:max(L)-lists:min(A). |
You are absolutely correct Csaba, sorry for not considering that.. |
When record name is enclosed with quotes it's not added to the list of tags.
example:
test.erl:
-module(test).
-record(test, {none}).
-record('test@', {none}).
tags:
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted/
#test ./test.erl /^-\srecord\s(\stest>/;" r file:
test ./test.erl /^-\srecord\s*(\s*test>/;" r file:
test ./test.erl 1;" M
test.erl ./test.erl 1;" F
The text was updated successfully, but these errors were encountered: