Override "emulated tabs" when editing Makefiles?
Eddy De Greef
degreef at imec.be
Tue May 20 13:13:37 CEST 2008
Offer Kaye wrote:
> Hi,
> I don't like using tabs in my source files so I've set the NEdit
> defaults to use emulated tabs. However, when editing a Makefile I
> *have* to use a tab character as the first character of a command
> line.
>
> Is there a way to automatically override the "use emulated tabs"
> option when in Makefile language-mode? I saw in the language-mode
> window that there is a way to change the number of spaces per emulated
> tab, but not the actual emulated tab setting. But I was hoping this
> could be set someplace else...?
There's no such setting, I'm afraid, but there is a workaround using a
macro (see Default Settings->Customize Menus->Macro Menu):
- Define a macro called Tab at Makefile with the following command:
insert_string("\t")
and assign an arbitrary accelerator key to it (you can't chose
Tab here yet).
- Save your default preferences.
- Open your preferences file (~/.neditrc or ~/.nedit/nedit.rc) and
look for the definition of the macro that you just created.
- Replace the accelerator that you picked by 'Tab' and save the file.
- Restart NEdit.
- If all works well, the Tab key should now always insert a Tab
character in the Makefile language mode, irrespective of the tab
emulation preferences.
Hope it works,
Eddy
More information about the Discuss
mailing list