Re: Override "emulated tabs" when editing Makefiles?

Eddy De Greef <[email protected]>
Newsgroups gmane.editors.nedit.user
Message-ID <[email protected]>
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@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
-- 
NEdit Discuss mailing list - [email protected]
http://www.nedit.org/mailman/listinfo/discuss
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.