Sublime Forum

[solved]: automated replacement for latex

#1

Howdy,

I’m pretty new to sublime and am still trying around.

I have created a custom completion list for latex which looks like this:

[code]{
“scope”: “text.tex - source - meta.tag, punctuation.definition.tag.begin”,

"completions":

	{ "trigger": "ä", "contents": "\\\"a" },
	{ "trigger": "ö", "contents": "\\\"o" },
	{ "trigger": "ü", "contents": "\\\"u" }
	
]

}[/code]

For german latex documents it is best to have all special characters escaped. But I can’t get this to work like I want it to.

The completion however does what it does which is complete ä on tab with "a. The problem is that I don’t want to hit tab after every letter. this just doesn’t fit into the flow of typing. Is there a way of automagically trigger this withouth tab? I just want this to change whenever I type a special character.

:open_mouth:

thanks

0 Likes

#2

Now I think I have found out that it must work somehow. While writing CSS I noticed that after typing “:” sublime automtically adds “;” to the text. this works without any tab trigger. Thats the kind of functionality I am looking for … do you guys have any idea how to get this into latex?

thanks :stuck_out_tongue:

0 Likes

#3

thanks I will try that. No I don’t use any alt or shift or options keys … they are on the german keybord. also hitting alt wouldn’t fit into the flow of typing :smile:

0 Likes

#4

sorry but it just won’t work

I used this just to try if it is working:

<binding key="q,q" command="save"/>

saved it under Default.sublime-keymap in my User directory … then i get the following error:

Error trying to parse file: Expected value in ~/Library/Application Support/Sublime Text 2/Packages/User/Default.sublime-keymap:1:1

heeeelp :smile:

0 Likes

#5

now I am confused:

sublimetext.info/docs/en/customi … dings.html

or

sublimetext.com/docs/key-bindings

:open_mouth:

0 Likes

#6

ahh … thanks. Working solution now is:

[code]

{ "keys": "ö"], "command": "insert", "args": {"characters": "\\\"o"} },
{ "keys": "ü"], "command": "insert", "args": {"characters": "\\\"u"} },
{ "keys": "ä"], "command": "insert", "args": {"characters": "\\\"a"} },
{ "keys": "Ä"], "command": "insert", "args": {"characters": "\\\"A"} },
{ "keys": "Ü"], "command": "insert", "args": {"characters": "\\\"U"} },
{ "keys": "Ö"], "command": "insert", "args": {"characters": "\\\"O"} },
{ "keys": "ß"], "command": "insert", "args": {"characters": "{\\ss}"} }

]
][/code]

is there a way to set the scope to LATEX?
:smiley:

now I can finally use Sublime for Latex

0 Likes

#7

Now I think I have found out that it must work somehow. While writing CSS I noticed that after typing “:” sublime automtically adds “;” to the text. this works without any tab trigger. Thats the kind of functionality I am looking for … do you guys have any idea how to get this into latex?!


Trumpet Wedding Dresses|Column Wedding Dresses|Wedding Dresses with Sleeves|New Style Wedding Dresses

0 Likes