Home Download Buy Blog Forum Support

can't close square brackets on french keymap

can't close square brackets on french keymap

Postby Xaapyks on Tue Apr 17, 2012 8:39 am

Hi,

WHenever I input a ']' character, on C++ code, ST2 takes me somewhere else on another file but does not input the pressed char.
I disabled the keybinds to ']' but I still can't input this key.
Turning off all automatch related options I found did not solve this.
Any idea ? Am I the only one getting this ?
Last edited by Xaapyks on Thu Apr 19, 2012 8:38 am, edited 1 time in total.
Xaapyks
 
Posts: 34
Joined: Tue Apr 17, 2012 8:33 am

Re: can't close my square brackets

Postby Xaapyks on Wed Apr 18, 2012 9:49 am

please help, it's really annoying, I may add I use a french keymap.
And here is my config :
Code: Select all
{
  "auto_complete_selector": "source",
  "auto_indent": true,
  "auto_match_enabled": false,
  "auto_complete": false,
  "caret_style": "wide",
  "color_scheme": "Packages/Color Scheme - Default/LAZY.tmTheme",
  "detect_indentation": false,
  "drag_text": false,
  "ensure_newline_at_eof_on_save": true,
  "highlight_line": true,
  "highlight_modified_tabs": true,
  "indent_to_bracket": true,
  "rulers": [100],
  "shift_tab_unindent": true,
  "smart_indent": true,
  "tab_completion": false,
  "tab_size": 2,
  "translate_tabs_to_spaces": true,
  "trim_automatic_white_space": true,
  "trim_trailing_white_space_on_save": true
}


With a stock config, when I input a '[' it automatically adds an ']' but if I press ']' it does not do anything, I mean it does not moves my cursor after it. If I try to add a single ']' anywhere, it does not input any char at all...
If fails on all types of files, not just C++


EDIT : If I switch my keyboard to QWERTY / english map all works as expected.
It may be related to the ']' char having to be pressed as a combination of Alt Gr + ) on a french keyboard.
Xaapyks
 
Posts: 34
Joined: Tue Apr 17, 2012 8:33 am

Re: can't close my square brackets

Postby bizoo on Wed Apr 18, 2012 12:28 pm

In the ST2 console type:
Code: Select all
sublime.log_input(True)
sublime.log_commands(True)

This activate the output of keyboard events and executed commands to the console.
bizoo
 
Posts: 876
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Re: can't close my square brackets

Postby Xaapyks on Wed Apr 18, 2012 4:37 pm

Thanks for your help.

First of all, the keybind for the console does not work... It relies on ctrl + alt + 7 on a french keyboard (I did view->show console of course then)
so, me typing "a[0]" gives :
Code: Select all
chr evt: a (0x61)
key evt: control+alt+5
chr evt: [ (0x5b)
chr evt: 0 (0x30)
key evt: control+alt+[
command: jump_back


I have no idea why ']' triggers "key evt: control+alt+[" ...
"ctrl + alt + 7" the console bind outputs nothing at all in the console.


Found the culprit : it's the ctags plugin.
BUT
it's not
Code: Select all
{
    "command": "navigate_to_definition",
    "keys": [
      "ctrl+alt+]"
    ]
  },

that is messing up, but
Code: Select all
{
    "command": "jump_back",
    "keys": [
      "ctrl+alt+["
    ]
  },


if I remove only the one about '[' it works again even though it's the ']' that has problems....

So almost fixed for this case, but keymap-independant bindings are not in general.
Xaapyks
 
Posts: 34
Joined: Tue Apr 17, 2012 8:33 am


Return to Technical Support

Who is online

Users browsing this forum: No registered users and 21 guests