Re: How to disable autocompletion of quotes, brackets etc?

From: <briancsch....at.gmail.com>
Date: Tue, 23 Mar 2010 16:14:58 -0700 (PDT)

Change textadept/modules/textadept/editing.lua's line 24 from
  AUTOPAIR = true
to
  AUTOPAIR = false

I also have a small patch (that I've been trying to get Mitchell to
accept) that allows you to undo an accidental auto-pairing with the
backspace key.

-- Causes backspace to eliminate accidentally-added matching
characters
textadept.events.add_handler('keypress',
        function(code, shift, control, alt)
                -- Backspace (from <gdk/gdkkeysyms.h>)
                if code == 0xff08 and buffer.selections == 1 then
                        local buffer = buffer
                        local current_pos = buffer.current_pos
                        if char_matches[buffer.char_at[current_pos - 1]]
                                and buffer.char_at[current_pos] ==
                                string.byte(char_matches[buffer.char_at[current_pos - 1]]) then
                                buffer:char_right()
                                buffer:delete_back()
                        end
                end
        end)

- Brian

On Mar 23, 3:38 pm, phayz <russelldicken....at.gmail.com> wrote:
> The subject says it all, I hope. I don't want quotes, brackets etc
> being autocompleted but I don't know how to turn this off. Can someone
> please tell me how to do this?
>
> Regards,
>
> Russell Dickenson
Received on Tue 23 Mar 2010 - 19:14:58 EDT

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:40:52 EST