- Subject: Re: [Jed-users-l] TAB Keycode
- From: Mike McClain <mike.junk@xxxxxxxxxxx>
- Date: Fri, 14 Sep 2012 19:18:45 -0700
On Fri, Sep 14, 2012 at 06:41:29PM -0300, Facundo Bianco wrote:
> Dear list,
>
> Hi, I just trying to get TAB keycode for reuse it with another
> func. I used "^I" and "\t" but didn't work. Basically, it's:
>
> setkey("insert_spaces(4)", "\t");
>
> (I know I can use "TAB_DEFAULT = 4;" but I got wrong indents when
> open it on other editors.)
>
> Thanks in advance! Best,
I wanted different too.
Modify this to your needs:
% what happens when TAB key pressed
% these globals are involved TAB TAB_DEFAULT USE_TABS
define do_tab ()
{ if( USE_TABS )
insert_char("\t");
else
{ variable tab_spaces, c = what_column();
tab_spaces = 1 + TAB_DEFAULT - (c mod TAB_DEFAULT);
vinsert( "%*c", tab_spaces, ' ' );
}
}
local_unsetkey("^I");
local_setkey("do_tab", "^I"); % Tab
HTH,
Mike
--
Satisfied user of Linux since 1997.
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
_______________________________________________
Jed-users-l mailing list
Jed-users-l@xxxxxxxx
http://mailman.jtan.com/mailman/listinfo/jed-users-l
[2012 date index]
[2012 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]