Skip to content
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

Added keyboard shortcut for small caps text (Ctrl+L, Ctrl+S) #984

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Default (Linux).sublime-keymap
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ LaTeX Package keymap for Linux
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"}],
"command": "latex_change_environment"},

// Wrap selected text in emph, bold or underline
// Wrap selected text in emph, bold, underline or small caps
{ "keys": ["ctrl+l","ctrl+e"],
"context": [
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"}],
Expand All @@ -266,6 +266,10 @@ LaTeX Package keymap for Linux
"context": [
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"}],
"command": "insert_snippet", "args": {"name":"Packages/LaTeXTools/Text monospace.sublime-snippet"}},
{ "keys": ["ctrl+l","ctrl+s"],
"context": [
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"}],
"command": "insert_snippet", "args": {"name":"Packages/LaTeXTools/Text small-caps.sublime-snippet"}},

// Replace the `C-r` overlay with a whole document overlay as opt-out
// Also add this overlay to `C-l, C-r`
Expand Down
6 changes: 5 additions & 1 deletion Default (OSX).sublime-keymap
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ LaTeX Package keymap for OS X
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"}],
"command": "latex_change_environment"},

// Wrap selected text in emph, bold or underline
// Wrap selected text in emph, bold, underline or small caps
{ "keys": ["super+l","super+e"],
"context": [
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"}],
Expand All @@ -266,6 +266,10 @@ LaTeX Package keymap for OS X
"context": [
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"}],
"command": "insert_snippet", "args": {"name":"Packages/LaTeXTools/Text monospace.sublime-snippet"}},
{ "keys": ["super+l","super+s"],
"context": [
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"}],
"command": "insert_snippet", "args": {"name":"Packages/LaTeXTools/Text small-caps.sublime-snippet"}},

// Replace the `C-r` overlay with a whole document overlay as opt-out
// Also add this overlay to `C-l, C-r`
Expand Down
6 changes: 5 additions & 1 deletion Default (Windows).sublime-keymap
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ LaTeX Package keymap for Windows
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"}],
"command": "latex_change_environment"},

// Wrap selected text in emph, bold or underline
// Wrap selected text in emph, bold, underline or small caps
{ "keys": ["ctrl+l","ctrl+e"],
"context": [
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"}],
Expand All @@ -266,6 +266,10 @@ LaTeX Package keymap for Windows
"context": [
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"}],
"command": "insert_snippet", "args": {"name":"Packages/LaTeXTools/Text monospace.sublime-snippet"}},
{ "keys": ["ctrl+l","ctrl+s"],
"context": [
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"}],
"command": "insert_snippet", "args": {"name":"Packages/LaTeXTools/Text small-caps.sublime-snippet"}},

// Replace the `C-r` overlay with a whole document overlay as opt-out
// Also add this overlay to `C-l, C-r`
Expand Down
3 changes: 2 additions & 1 deletion LaTeX.sublime-completions
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
{ "trigger": "bf", "contents": "\\textbf{$1}$0"},
{ "trigger": "em", "contents": "\\emph{$1}$0"},
{ "trigger": "tt", "contents": "\\texttt{$1}$0"},
{ "trigger": "sc", "contents": "\\textsc{$1}$0"},
{ "trigger": "un", "contents": "\\underline{$1}$0"},

{ "trigger": "bs", "contents": "\\bigskip"},
Expand All @@ -33,4 +34,4 @@
{ "trigger": "i", "contents": "\\item "}

]
}
}
1 change: 1 addition & 0 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,7 @@ LaTeXTools' wrapping facility helps you in just these circumstances. All command
- `C-l,C-b` gives you `\textbf{blah}`
- `C-l,C-u` gives you `\underline{blah}`
- `C-l,C-t` gives you `\texttt{blah}`
- `C-l,C-s` gives you `\textsc{blah}`
- `C-l,C-n` wraps the selected text in a LaTeX environment structure. You get `\begin{env}`,`blah`, `\end{env}` on three separate lines, with `env` selected. Change `env` to whatever environment you want, then hit Tab to move to the end of the environment.


Expand Down
9 changes: 9 additions & 0 deletions Text small-caps.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<snippet>
<description>Small-caps text</description>
<content><![CDATA[
\\textsc{${1:$SELECTION}}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<!-- <tabTrigger>hello</tabTrigger> -->
<scope>text.tex.latex</scope>
</snippet>