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

From: mitchell <mforal.n....at.gmail.com>
Date: Tue, 23 Mar 2010 18:47:23 -0700 (PDT)

Hi,

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

Instead of editing the module, you can put

_m.textadept.editing.AUTOPAIR = false

in your ~/.textadept/init.lua after loading the 'textadept' module.

>
> 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.

Sorry Brian, this patch slipped through my memory. I will apply it
soon.

Thanks,
Mitchell

>
> -- 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 - 21:47:23 EDT

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