Hi!
I just wanted to ask how to use the new "`"' ? When I type " it autocompletes to "" setting the cursor between the two " When I type now ` the whole thing becomes "`'" and not "`"'
Niels
On 5. Oct 2006, at 22:57, Niels Kobschaetzki wrote:
I just wanted to ask how to use the new "`"' ?
The new thing is only, that we no longer mark it up as an invalid double quoted string, but instead as a regular string.
If you want a shorthand to type it, I would suggest putting a snippet which inserts "`$1"' on the "-key and scope it to text.tex.
Hi Niels,
The change was just in the language grammar, so that a text in "`..."' does not get colored as invalid, as it did beforehand. We've made no provisions for how to type it out, but if you want to I would suggest you create a command, bound to whatever shortcut you like, and with input "Selected Text or Nothing" and output "Insert as snippet", and actual code:
#!/usr/bin/env ruby require ENV['TM_SUPPORT_PATH'] + '/lib/escape.rb' if ENV['TM_SELECTED_TEXT'].nil? then print ""` $1 "'" else print ""` #{e_sn ENV['TM_SELECTED_TEXT']} "'" end
This will make it so that if you run the command with a selection, it will do the right thing, while if you do it without a selection, it will also do the right thing. The only way in which this is different from smart typing pairs is that if you press delete right after running the command, the closing stuff is not removed, so you have to use cmd-Z to revert the action. Other than that, it should work as expected (provided I didn't misspell anything in that code ;) ).
Haris
On Oct 5, 2006, at 4:57 PM, Niels Kobschaetzki wrote:
Hi!
I just wanted to ask how to use the new "`"' ? When I type " it autocompletes to "" setting the cursor between the two " When I type now ` the whole thing becomes "`'" and not "`"'
Niels
Thanks for the effort :) RIght now I'm trying to debug the snippet and the command because it seems that both aren't working (but I think that I'm just too stupid) - they just put out a " nothing more
Niels
On 6. Oct 2006, at 06:29, Niels Kobschätzki wrote:
Thanks for the effort :) RIght now I'm trying to debug the snippet and the command because it seems that both aren't working (but I think that I'm just too stupid)
- they just put out a " nothing more
Oh, that’d be because ` starts embedded code in snippets, thus needs to be escaped (my bad for not remembering that ;) )
To make it easy for you, just click this one:
On 10/6/06, Allan Odgaard throw-away-1@macromates.com wrote:
On 6. Oct 2006, at 06:29, Niels Kobschätzki wrote:
Thanks for the effort :) RIght now I'm trying to debug the snippet and the command because it seems that both aren't working (but I think that I'm just too stupid)
- they just put out a " nothing more
Oh, that'd be because ` starts embedded code in snippets, thus needs to be escaped (my bad for not remembering that ;) )
To make it easy for you, just click this one:
thx a lot for that :) Wouldn't it be useful to include that in the LaTeX.Bundle?
Niels
On 6. Oct 2006, at 08:10, Niels Kobschätzki wrote:
Wouldn't it be useful to include that in the LaTeX.Bundle?
But most of us write quotes ``like this''.
A snippet for that (e.g. on ") would be useful -- but there are some cases where you do want to enter a literal ", so for now this is one of those customizations users will need to do on their own.
When bundles can contain disabled (unchecked) items, we can ship with more of these (for most) niceties.
Hi Allan-
But most of us write quotes ``like this''.
A snippet for that (e.g. on ") would be useful -- but there are some
cases where you do want to enter a literal ", so for now this is one of those customizations users will need to do on their own.
Would it be possible for someone to post a version of that for us newbies? (For what it's worth -- it *is* the default in emacs' tex modes...)
When bundles can contain disabled (unchecked) items, we can ship with
more of these (for most) niceties.
Yours,
Andrew
On Oct 6, 2006, at 12:39 PM, Andrew Jaffe wrote:
Hi Allan-
Would it be possible for someone to post a version of that for us newbies? (For what it's worth -- it *is* the default in emacs' tex modes...)
Allan already did post his version in one of his last messages, and I've attached my version as a command (I already posted instructions on creating the commands yourself in my previous post, except for forgetting to put two backslashes before the two backticks).
The two versions are behaving slightly differently probably, so you can take your pick.
Yours,
Andrew
Haris
Charilaos Skiadas wrote:
On Oct 6, 2006, at 12:39 PM, Andrew Jaffe wrote:
Hi Allan-
Would it be possible for someone to post a version of that for us newbies? (For what it's worth -- it *is* the default in emacs' tex modes...)
Allan already did post his version in one of his last messages, and I've attached my version as a command (I already posted instructions on creating the commands yourself in my previous post, except for forgetting to put two backslashes before the two backticks).
The two versions are behaving slightly differently probably, so you can take your pick.
Yours,
Andrew
Haris
Aha, sorry, I completely missed the point of this thread, since I've actually never once used `" in tex...
But actually what I want is in fact the emacs default (nothing to do with euro-quotes; sorry!):
I want the ' and " keys to give opening ` and `` or closing ' and '' when appropriate (emacs does seem to be nearly infallible). this is not quite the same as the current ^`.
I know, TM isn't emacs (it's better in so many ways!) but I am so used to this behavior that I never even remember to think about my quoting...
I suppose a more TM-ish version would insert the full ``|'' with the caret in the middle (and would then ideally skip over the closing /pair/ on a second "; I expect this latter bit is hard).
Yours,
Andrew
Aha, sorry, I completely missed the point of this thread, since I've actually never once used `" in tex...
But actually what I want is in fact the emacs default (nothing to do with euro-quotes; sorry!):
I want the ' and " keys to give opening ` and `` or closing ' and '' when appropriate (emacs does seem to be nearly infallible). this is not quite the same as the current ^`.
And of course the messages are coming so fast and furious that I missed the responses that already do most of what I wanted...
Thanks!
A
Don't know if this solution has been given…
If you use \usepackage[utf8]{inputenc}, then the more regular quotes “…” acts exactly as ``…''
;)
On 6. Oct 2006, at 18:39, Andrew Jaffe wrote:
[...] Would it be possible for someone to post a version of that for us newbies? (For what it's worth -- it *is* the default in emacs' tex modes...)
Click on the snippet from the previous letter, this installs it and opens up the bundle editor showing this snippet. It should be trivial to modify that snippet to insert what you want -- just remember to use ` for a literal `.
On Oct 6, 2006, at 9:39 AM, Andrew Jaffe wrote:
Would it be possible for someone to post a version of that for us newbies? (For what it's worth -- it *is* the default in emacs' tex modes...)
(Haris's post came in while I was writing this -- I read the question as being about double quotes rather than the euro quotes.)
I have two quick snippets for this to roughly mimic emacs latex mode double-quoting:
First, to open the `` quote:
''$0 key equiv: " scope: text.tex.latex - string.quoted.double.latex text.tex.latex - source.r
Then, to close the quote with '':
'' key equiv: " scope: string.quoted.double.latex
The scope in the first snippet probably will turn Allan's hair white, but it works well enough for me, and still allows me to use the regular " in embedded source. (And don't forget the existing snippet to wrap selected text in ``...'')
-Alan