Skip to content

Commit

Permalink
Merge remote-tracking branch 'rstein/tex_directive'
Browse files Browse the repository at this point in the history
# Conflicts:
#	latex_fill_all.py
  • Loading branch information
ig0774 committed Sep 18, 2016
2 parents a2efe45 + ad3aa39 commit 8f5880c
Show file tree
Hide file tree
Showing 8 changed files with 378 additions and 37 deletions.
28 changes: 20 additions & 8 deletions Default (Linux).sublime-keymap
Original file line number Diff line number Diff line change
Expand Up @@ -63,67 +63,75 @@ LaTeX Package keymap for Linux
{ "keys": ["{"],
"context": [
{"key": "setting.disable_latex_ref_cite_auto_trigger", "operator": "not_equal", "operand": true},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex - comment"},
{"key": "selection_empty", "operator": "equal", "operand": true, "match_all": true},
{"key": "lt_fill_all_ref.open_curly", "operator": "equal", "match_all": true, "operand": true}],
"command": "latex_fill_all", "args": {"completion_type": "ref", "insert_char": "{"}},

{ "keys": ["{"],
"context": [
{"key": "setting.disable_latex_ref_cite_auto_trigger", "operator": "not_equal", "operand": true},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex - comment"},
{"key": "selection_empty", "operator": "equal", "operand": true, "match_all": true},
{"key": "lt_fill_all_cite.open_curly", "operator": "equal", "match_all": true, "operand": true}],
"command": "latex_fill_all", "args": {"completion_type": "cite", "insert_char": "{"}},

{ "keys": [","],
"context": [
{"key": "setting.disable_latex_ref_cite_auto_trigger", "operator": "not_equal", "operand": true},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex - comment"},
{"key": "selection_empty", "operator": "equal", "operand": true, "match_all": true},
{"key": "lt_fill_all_cite.comma", "operator": "equal", "match_all": true, "operand": true}],
"command": "latex_fill_all", "args": {"completion_type": "cite", "insert_char": ","}},

{ "keys": [","],
"context": [
{"key": "setting.disable_latex_ref_cite_auto_trigger", "operator": "not_equal", "operand": true},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex - comment"},
{"key": "selection_empty", "operator": "equal", "operand": true, "match_all": true},
{"key": "lt_fill_all_ref.comma", "operator": "equal", "match_all": true, "operand": true}],
"command": "latex_fill_all", "args": {"completion_type": "ref", "insert_char": ","}},

{ "keys": ["["],
"context": [
{"key": "setting.disable_latex_ref_cite_auto_trigger", "operator": "not_equal", "operand": true},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex - comment"},
{"key": "selection_empty", "operator": "equal", "operand": true, "match_all": true},
{"key": "lt_fill_all_cite.open_square", "operator": "equal", "match_all": true, "operand": true}],
"command": "latex_fill_all", "args": {"completion_type": "cite", "insert_char": "["}},

{ "keys": ["{"],
"context": [
{"key": "setting.disable_latex_ref_cite_auto_trigger", "operator": "not_equal", "operand": true},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex - comment"},
{"key": "selection_empty", "operator": "equal", "operand": true, "match_all": true},
{"key": "lt_fill_all_input.open_curly", "operator": "equal", "operand": true, "match_all": true}],
"command": "latex_fill_all", "args": {"completion_type": "input", "insert_char": "{"}},

{ "keys": [","],
"context": [
{"key": "setting.disable_latex_ref_cite_auto_trigger", "operator": "not_equal", "operand": true},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex - comment"},
{"key": "selection_empty", "operator": "equal", "operand": true, "match_all": true},
{"key": "lt_fill_all_input.comma", "operator": "equal", "operand": true, "match_all": true}],
"command": "latex_fill_all", "args": {"completion_type": "input", "insert_char": ","}},

{ "keys": ["{"],
"context": [
{"key": "setting.disable_latex_ref_cite_auto_trigger", "operator": "not_equal", "operand": true},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex - comment"},
{"key": "selection_empty", "operator": "equal", "operand": true, "match_all": true},
{"key": "lt_fill_all_env.open_curly", "operator": "equal", "operand": true, "match_all": true}],
"command": "latex_fill_all", "args": {"completion_type": "env", "insert_char": "{"}},

{ "keys": ["="],
"context": [
{"key": "setting.disable_latex_ref_cite_auto_trigger", "operator": "not_equal", "operand": true},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex comment.line.percentage"},
{"key": "selection_empty", "operator": "equal", "operand": true, "match_all": true},
{"key": "lt_fill_all_directive.equal_sign", "operator": "equal", "match_all": true, "operand": true}],
"command": "latex_fill_all", "args": {"completion_type": "directive", "insert_char": "="}},

// Toggle autocomplete
{ "keys": ["ctrl+l","t","a", "r"],
"context": [
Expand All @@ -141,6 +149,10 @@ LaTeX Package keymap for Linux
"context": [
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"}],
"command": "toggle_auto", "args": {"which": "env"}},
{ "keys": ["ctrl+l","t","a", "d"],
"context": [
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"}],
"command": "toggle_auto", "args": {"which": "tex_directive"}},
{ "keys": ["ctrl+l","t","a", "b"],
"context": [
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"}],
Expand Down
28 changes: 20 additions & 8 deletions Default (OSX).sublime-keymap
Original file line number Diff line number Diff line change
Expand Up @@ -63,67 +63,75 @@ LaTeX Package keymap for OS X
{ "keys": ["{"],
"context": [
{"key": "setting.disable_latex_ref_cite_auto_trigger", "operator": "not_equal", "operand": true},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex - comment"},
{"key": "selection_empty", "operator": "equal", "operand": true, "match_all": true},
{"key": "lt_fill_all_ref.open_curly", "operator": "equal", "match_all": true, "operand": true}],
"command": "latex_fill_all", "args": {"completion_type": "ref", "insert_char": "{"}},

{ "keys": ["{"],
"context": [
{"key": "setting.disable_latex_ref_cite_auto_trigger", "operator": "not_equal", "operand": true},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex - comment"},
{"key": "selection_empty", "operator": "equal", "operand": true, "match_all": true},
{"key": "lt_fill_all_cite.open_curly", "operator": "equal", "match_all": true, "operand": true}],
"command": "latex_fill_all", "args": {"completion_type": "cite", "insert_char": "{"}},

{ "keys": [","],
"context": [
{"key": "setting.disable_latex_ref_cite_auto_trigger", "operator": "not_equal", "operand": true},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex - comment"},
{"key": "selection_empty", "operator": "equal", "operand": true, "match_all": true},
{"key": "lt_fill_all_cite.comma", "operator": "equal", "match_all": true, "operand": true}],
"command": "latex_fill_all", "args": {"completion_type": "cite", "insert_char": ","}},

{ "keys": [","],
"context": [
{"key": "setting.disable_latex_ref_cite_auto_trigger", "operator": "not_equal", "operand": true},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex - comment"},
{"key": "selection_empty", "operator": "equal", "operand": true, "match_all": true},
{"key": "lt_fill_all_ref.comma", "operator": "equal", "match_all": true, "operand": true}],
"command": "latex_fill_all", "args": {"completion_type": "ref", "insert_char": ","}},

{ "keys": ["["],
"context": [
{"key": "setting.disable_latex_ref_cite_auto_trigger", "operator": "not_equal", "operand": true},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex - comment"},
{"key": "selection_empty", "operator": "equal", "operand": true, "match_all": true},
{"key": "lt_fill_all_cite.open_square", "operator": "equal", "match_all": true, "operand": true}],
"command": "latex_fill_all", "args": {"completion_type": "cite", "insert_char": "["}},

{ "keys": ["{"],
"context": [
{"key": "setting.disable_latex_ref_cite_auto_trigger", "operator": "not_equal", "operand": true},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex - comment"},
{"key": "selection_empty", "operator": "equal", "operand": true, "match_all": true},
{"key": "lt_fill_all_input.open_curly", "operator": "equal", "operand": true, "match_all": true}],
"command": "latex_fill_all", "args": {"completion_type": "input", "insert_char": "{"}},

{ "keys": [","],
"context": [
{"key": "setting.disable_latex_ref_cite_auto_trigger", "operator": "not_equal", "operand": true},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex - comment"},
{"key": "selection_empty", "operator": "equal", "operand": true, "match_all": true},
{"key": "lt_fill_all_input.comma", "operator": "equal", "operand": true, "match_all": true}],
"command": "latex_fill_all", "args": {"completion_type": "input", "insert_char": ","}},

{ "keys": ["{"],
"context": [
{"key": "setting.disable_latex_ref_cite_auto_trigger", "operator": "not_equal", "operand": true},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex - comment"},
{"key": "selection_empty", "operator": "equal", "operand": true, "match_all": true},
{"key": "lt_fill_all_env.open_curly", "operator": "equal", "operand": true, "match_all": true}],
"command": "latex_fill_all", "args": {"completion_type": "env", "insert_char": "{"}},

{ "keys": ["="],
"context": [
{"key": "setting.disable_latex_ref_cite_auto_trigger", "operator": "not_equal", "operand": true},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex comment.line.percentage"},
{"key": "selection_empty", "operator": "equal", "operand": true, "match_all": true},
{"key": "lt_fill_all_directive.equal_sign", "operator": "equal", "match_all": true, "operand": true}],
"command": "latex_fill_all", "args": {"completion_type": "directive", "insert_char": "="}},

// Toggle autocomplete
{ "keys": ["super+l","t","a", "r"],
"context": [
Expand All @@ -141,6 +149,10 @@ LaTeX Package keymap for OS X
"context": [
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"}],
"command": "toggle_auto", "args": {"which": "env"}},
{ "keys": ["super+l","t","a", "d"],
"context": [
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"}],
"command": "toggle_auto", "args": {"which": "tex_directive"}},
{ "keys": ["super+l","t","a", "b"],
"context": [
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"}],
Expand Down
28 changes: 20 additions & 8 deletions Default (Windows).sublime-keymap
Original file line number Diff line number Diff line change
Expand Up @@ -63,67 +63,75 @@ LaTeX Package keymap for Windows
{ "keys": ["{"],
"context": [
{"key": "setting.disable_latex_ref_cite_auto_trigger", "operator": "not_equal", "operand": true},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex - comment"},
{"key": "selection_empty", "operator": "equal", "operand": true, "match_all": true},
{"key": "lt_fill_all_ref.open_curly", "operator": "equal", "match_all": true, "operand": true}],
"command": "latex_fill_all", "args": {"completion_type": "ref", "insert_char": "{"}},

{ "keys": ["{"],
"context": [
{"key": "setting.disable_latex_ref_cite_auto_trigger", "operator": "not_equal", "operand": true},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex - comment"},
{"key": "selection_empty", "operator": "equal", "operand": true, "match_all": true},
{"key": "lt_fill_all_cite.open_curly", "operator": "equal", "match_all": true, "operand": true}],
"command": "latex_fill_all", "args": {"completion_type": "cite", "insert_char": "{"}},

{ "keys": [","],
"context": [
{"key": "setting.disable_latex_ref_cite_auto_trigger", "operator": "not_equal", "operand": true},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex - comment"},
{"key": "selection_empty", "operator": "equal", "operand": true, "match_all": true},
{"key": "lt_fill_all_cite.comma", "operator": "equal", "match_all": true, "operand": true}],
"command": "latex_fill_all", "args": {"completion_type": "cite", "insert_char": ","}},

{ "keys": [","],
"context": [
{"key": "setting.disable_latex_ref_cite_auto_trigger", "operator": "not_equal", "operand": true},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex - comment"},
{"key": "selection_empty", "operator": "equal", "operand": true, "match_all": true},
{"key": "lt_fill_all_ref.comma", "operator": "equal", "match_all": true, "operand": true}],
"command": "latex_fill_all", "args": {"completion_type": "ref", "insert_char": ","}},

{ "keys": ["["],
"context": [
{"key": "setting.disable_latex_ref_cite_auto_trigger", "operator": "not_equal", "operand": true},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex - comment"},
{"key": "selection_empty", "operator": "equal", "operand": true, "match_all": true},
{"key": "lt_fill_all_cite.open_square", "operator": "equal", "match_all": true, "operand": true}],
"command": "latex_fill_all", "args": {"completion_type": "cite", "insert_char": "["}},

{ "keys": ["{"],
"context": [
{"key": "setting.disable_latex_ref_cite_auto_trigger", "operator": "not_equal", "operand": true},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex - comment"},
{"key": "selection_empty", "operator": "equal", "operand": true, "match_all": true},
{"key": "lt_fill_all_input.open_curly", "operator": "equal", "operand": true, "match_all": true}],
"command": "latex_fill_all", "args": {"completion_type": "input", "insert_char": "{"}},

{ "keys": [","],
"context": [
{"key": "setting.disable_latex_ref_cite_auto_trigger", "operator": "not_equal", "operand": true},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex - comment"},
{"key": "selection_empty", "operator": "equal", "operand": true, "match_all": true},
{"key": "lt_fill_all_input.comma", "operator": "equal", "operand": true, "match_all": true}],
"command": "latex_fill_all", "args": {"completion_type": "input", "insert_char": ","}},

{ "keys": ["{"],
"context": [
{"key": "setting.disable_latex_ref_cite_auto_trigger", "operator": "not_equal", "operand": true},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex - comment"},
{"key": "selection_empty", "operator": "equal", "operand": true, "match_all": true},
{"key": "lt_fill_all_env.open_curly", "operator": "equal", "operand": true, "match_all": true}],
"command": "latex_fill_all", "args": {"completion_type": "env", "insert_char": "{"}},

{ "keys": ["="],
"context": [
{"key": "setting.disable_latex_ref_cite_auto_trigger", "operator": "not_equal", "operand": true},
{"key": "selector", "operator": "equal", "operand": "text.tex.latex comment.line.percentage"},
{"key": "selection_empty", "operator": "equal", "operand": true, "match_all": true},
{"key": "lt_fill_all_directive.equal_sign", "operator": "equal", "match_all": true, "operand": true}],
"command": "latex_fill_all", "args": {"completion_type": "directive", "insert_char": "="}},

// Toggle autocomplete
{ "keys": ["ctrl+l","t","a", "r"],
"context": [
Expand All @@ -141,6 +149,10 @@ LaTeX Package keymap for Windows
"context": [
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"}],
"command": "toggle_auto", "args": {"which": "env"}},
{ "keys": ["ctrl+l","t","a", "d"],
"context": [
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"}],
"command": "toggle_auto", "args": {"which": "tex_directive"}},
{ "keys": ["ctrl+l","t","a", "b"],
"context": [
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"}],
Expand Down
4 changes: 4 additions & 0 deletions LaTeXTools.sublime-settings
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
// You can also use toggle: C-l,t,a,e
"env_auto_trigger": false,

// Fill-helper autocompletion trigger for tex directive values after TEX directive=
// You can also use toggle: C-l,t,a,d
"tex_directive_auto_trigger": true,

// Controls whether the various fill-helpers should try to insert a
// completing }, ], or ) when inserted and either the C-l,C-f or C-l,x
// keybindings were used to trigger the completion. This attempts to be smart
Expand Down
Loading

0 comments on commit 8f5880c

Please sign in to comment.