msiniscalchi / atom-latextools

Port of the LaTeXTools package to the Atom editor
MIT License
58 stars 21 forks source link

tilde and hash keybinding #122

Open ghost opened 8 years ago

ghost commented 8 years ago

Pressing the hash key which would normally produce a #, produces `' Pressing tilde(shift+hash) which would normally produce a ~, instead produces ``''

Turning off the keybindings for latextools fixes the problem and allows me to type #'s and ~'s. This is also only an issue for tex files.

This is with atom 1.9.9, latextools 0.8.1, windows 7.

ghost commented 8 years ago

I've found that adding the following to my keymap.cson fixes the problem

"atom-text-editor[data-grammar~='latex']":
  "'": 'unset!',
  '"': 'unset!'

it seems that the latextools:double-quote and latextools:quote commands are causing this issue.

ig0774 commented 8 years ago

Aside from the specific keybindings affected, this is exactly the same underlying problem as #98 and #115, i.e. a (still unresolved) issue in Atom itself (atom/atom-keyboard#35 and atom/atom-keyboard#37). The key here is, unfortunately, the UK keyboard which positions the # and ~ keys where the US keyboard has ' and ".

You can resolve this issue by installing the keyboard-localization plugin though I think you have to generate your own keymap to get everything working correctly (I use a computer with such a UK keyboard and have gotten this to work; I don't quite remember all the steps, however).