Skip to content

Commit

Permalink
Renamed feature to fill-helper
Browse files Browse the repository at this point in the history
Changed trigger. Note: trigger doesn't seem to be working.
  • Loading branch information
msiniscalchi committed Oct 4, 2015
1 parent 7211927 commit 4c5b1c0
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 21 deletions.
7 changes: 3 additions & 4 deletions Default (Linux).sublime-keymap
Expand Up @@ -77,10 +77,10 @@ LaTeX Package keymap for Linux
"context": [
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"}],
"command": "toggle_auto", "args": {"which": "cite"}},
{ "keys": ["ctrl+l","t","a", "i"],
{ "keys": ["ctrl+l","t","a", "f"],
"context": [
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"}],
"command": "toggle_auto", "args": {"which": "input"}},
"command": "toggle_auto", "args": {"which": "fill"}},

// View PDF, jump to point, toggle editor/viewer focus and syncing behavior
{ "keys": ["ctrl+l","v"],
Expand Down Expand Up @@ -304,8 +304,7 @@ LaTeX Package keymap for Linux
]
},

// Fill all command
// Similar to latexing's fill all command
// Fill helper command
{ "keys": ["ctrl+l", "ctrl+f"], "command": "latex_fill_all", "context":
[
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"}
Expand Down
7 changes: 3 additions & 4 deletions Default (OSX).sublime-keymap
Expand Up @@ -77,10 +77,10 @@ LaTeX Package keymap for OS X
"context": [
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"}],
"command": "toggle_auto", "args": {"which": "cite"}},
{ "keys": ["super+l","t","a", "i"],
{ "keys": ["super+l","t","a", "f"],
"context": [
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"}],
"command": "toggle_auto", "args": {"which": "input"}},
"command": "toggle_auto", "args": {"which": "fill"}},

// View PDF, jump to point, toggle editor/viewer focus
{ "keys": ["super+l","v"],
Expand Down Expand Up @@ -304,8 +304,7 @@ LaTeX Package keymap for OS X
]
},

// Fill all command
// Similar to latexing's fill all command
// Fill helper command
{ "keys": ["super+l", "super+f"], "command": "latex_fill_all", "context":
[
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"}
Expand Down
7 changes: 3 additions & 4 deletions Default (Windows).sublime-keymap
Expand Up @@ -77,10 +77,10 @@ LaTeX Package keymap for Windows
"context": [
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"}],
"command": "toggle_auto", "args": {"which": "cite"}},
{ "keys": ["ctrl+l","t","a", "i"],
{ "keys": ["ctrl+l","t","a", "f"],
"context": [
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"}],
"command": "toggle_auto", "args": {"which": "input"}},
"command": "toggle_auto", "args": {"which": "fill"}},

// View PDF, jump to point, toggle editor/viewer focus
{ "keys": ["ctrl+l","v"],
Expand Down Expand Up @@ -305,8 +305,7 @@ LaTeX Package keymap for Windows
]
},

// Fill all command
// Similar to latexing's fill all command
// Fill helper command
{ "keys": ["ctrl+l", "ctrl+f"], "command": "latex_fill_all", "context":
[
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"}
Expand Down
6 changes: 3 additions & 3 deletions LaTeXTools.default-settings
Expand Up @@ -21,9 +21,9 @@
"cite_auto_trigger": true,
"ref_auto_trigger": true,

// Input autocompletion triggered for a wide range of references to external
// files. You can also use toggle: C-l,t,a,i
"input_auto_trigger": true,
// Fill-helper autocompletion triggered for a wide range of references to external
// files. You can also use toggle: C-l,t,a,f
"fill_auto_trigger": true,


// Keep focus on Sublime Text after building (true) or switch to PDF viewer (false)
Expand Down
4 changes: 2 additions & 2 deletions README.markdown
Expand Up @@ -241,7 +241,7 @@ Earlier versions of LaTeXTools used a different way to trigger ref/cite completi
Another note: **for now**, completions are also injected into the standard ST autocompletion system. Thus, if you hit `Ctrl-space` immediately after typing, e.g., `\ref{}`, you get a drop-down menu at the current cursor position (not a quick-panel) showing all labels in your document. This also works with old-style citations. However, the width of this menu is OK for (most) labels, but not really for paper titles. In other words, it is workable for references, but not really for citations. Furthermore, there are other limitations dictated by the ST autocompletion system. So, this is **deprecated**, and I encourage you to use auto-trigger mode or the `C-l,x` keybinding instead.


Autofill: filling in package and file names automatically
Fill Helper: filling in package and file names automatically
---------------------------------------------------------

**Keybinding:** *autotriggered* by default (see below). Otherwise, `C-l,C-f`.
Expand All @@ -252,7 +252,7 @@ Thanks to the amazing work by users btstream and Ian Bacher, LaTeXTools now offe

* when you type any of the file-related input commands, a list of files in the current directory is displayed (suitably filtered, so graphics files are displayed for `\includegraphics`).

To toggle autocompletion on or off, use the `input_auto_trigger` setting, or the `c-l,t,a,i` toggle.
To toggle autocompletion on or off, use the `fill_auto_trigger` setting, or the `c-l,t,a,f` toggle.

In order for package autocomplete to work, you need to create a cache first. You can do it using the Command Palette: select `LaTeXtools: Build cache for LaTeX packages`.

Expand Down
8 changes: 4 additions & 4 deletions toggle_show.py
Expand Up @@ -9,13 +9,13 @@ def run(self, edit, **args):
prefs_forward_sync = s.get("forward_sync", "(default)")
prefs_auto_ref = s.get("ref_auto_trigger", "(default)")
prefs_auto_cite = s.get("cite_auto_trigger", "(default)")
prefs_auto_input = s.get("input_auto_trigger", "(default)")
prefs_auto_fill = s.get("fill_auto_trigger", "(default)")
keep_focus = self.view.settings().get("keep focus","undefined")
forward_sync = self.view.settings().get("forward_sync","undefined")
auto_ref = self.view.settings().get("ref auto trigger", "undefined")
auto_cite = self.view.settings().get("cite auto trigger", "undefined")
auto_input = self.view.settings().get("input auto trigger", "undefined")
auto_fill = self.view.settings().get("fill auto trigger", "undefined")


sublime.status_message("Keep focus: pref %s toggle %s Forward sync: pref %s toggle %s Auto ref: pref %s toggle %s Auto cite: pref %s toggle %s Auto input: pref %s toggle %s"
% (prefs_keep_focus, keep_focus, prefs_forward_sync, forward_sync, prefs_auto_ref, auto_ref, prefs_auto_cite, auto_cite, prefs_auto_input, prefs_auto_input))
sublime.status_message("Keep focus: pref %s toggle %s Forward sync: pref %s toggle %s Auto ref: pref %s toggle %s Auto cite: pref %s toggle %s Auto fill: pref %s toggle %s"
% (prefs_keep_focus, keep_focus, prefs_forward_sync, forward_sync, prefs_auto_ref, auto_ref, prefs_auto_cite, auto_cite, prefs_auto_fill, auto_fill))

0 comments on commit 4c5b1c0

Please sign in to comment.