You are here: PSPad forum > English discussion forum > problem with tab settings

problem with tab settings

#1 problem with tab settings

Posted by: Gorlash | Date: 2015-03-23 20:42 | IP: IP Logged

In most languages, I want Tab key to insert spaces, not hard tabs. Thus, I have "Real Tabs" un-checked in Editor 2 dialog. This has been working fine up until now.

The problem that I have is that Gnu Make requires hard tabs in some cases, and won't work with spaces. I wanted to change the tabs-to-spaces rule for files with .mak or .mk extensions, but I don't see any option to do so...

Is there some way I can manage this???

Options: Reply | Quote | Up ^


#2 Re: problem with tab settings

Posted by: Andreas | Date: 2015-03-23 20:52 | IP: IP Logged

I think first you have to create a syntax highlighter for .mak and .mk. There you can set tabs for indentation.

Options: Reply | Quote | Up ^


#3 Re: problem with tab settings

Posted by: Gorlash | Date: 2015-03-23 21:53 | IP: IP Logged

*can* I do that?? In the User Highlighter dialog, I see an option to set how many characters are used for a Tab, but I don't see an option to over-ride the "Real Tabs" setting; I think User Highlighter makefile.ini will *still* insert spaces, due to the global setting...

Options: Reply | Quote | Up ^


#4 Re: problem with tab settings

Posted by: Andreas | Date: 2015-03-23 22:01 | IP: IP Logged

Oh, yes, sorry. Thought that was possible. Maybe Jan knows more.

Options: Reply | Quote | Up ^


#5 Re: problem with tab settings

Posted by: pspad | Date: 2015-03-24 05:22 | IP: IP Logged

I will move this request up in the todo list

Options: Reply | Quote | Up ^


#6 Re: problem with tab settings

Posted by: Gorlash | Date: 2015-03-24 17:44 | IP: IP Logged

Thank you, that would be useful!!

Options: Reply | Quote | Up ^


#7 Re: problem with tab settings

Posted by: myf | Date: 2015-03-31 15:49 | IP: IP Logged

In the meantime you can keep realTabs setting off and use simple snippet invoked with hotkey for inserting real tabs:
- open your makefile,
- select some text,
- invoke context menu (right mouse button on selection or keyboard key)
- choose "Create clip from block" (it might already have some shortcut set, like ctrl+alt+backspace, I'm not sure if it is default),
- fill in some name ("Real tab"), description ("inserts real tab")
- choose hotkey (what about alt+q?)
- paste real tab into last filed
- click OK
Now pressing alt+q should insert real tab.

Options: Reply | Quote | Up ^


#8 Re: problem with tab settings

Posted by: pspad | Date: 2015-04-01 04:51 | IP: IP Logged

myf:
In the meantime you can keep realTabs setting off and use simple snippet invoked with hotkey for inserting real tabs:
- open your makefile,
- select some text,
- invoke context menu (right mouse button on selection or keyboard key)
- choose "Create clip from block" (it might already have some shortcut set, like ctrl+alt+backspace, I'm not sure if it is default),
- fill in some name ("Real tab"), description ("inserts real tab")
- choose hotkey (what about alt+q?)
- paste real tab into last filed
- click OK
Now pressing alt+q should insert real tab.

Why it should insert RealTabs? Do you want to have mix of real tabs and spaces in file?
I will add possibility to set real tabs switch in the highlighter settings. You will be able to insert real tabs or spaces when you will press TAB without switching.

P.S. If you want to have "something" to insert real tabs, use scripting and insert Chr(9) with some shortcut

Edited 1 time(s). Last edit at 2015-04-01 04:54 by pspad.

Options: Reply | Quote | Up ^


#9 Re: problem with tab settings

Posted by: myf | Date: 2015-04-01 14:49 | IP: IP Logged

pspad:
I will add possibility to set real tabs switch in the highlighter settings. You will be able to insert real tabs or spaces when you will press TAB without switching.

Great!

pspad:
P.S. If you want to have "something" to insert real tabs, use scripting and insert Chr(9) with some shortcut

It is functionally equal but more complicated to create than making a snippet with hotkey I suggested, isn't it?

pspad:
Why it should insert RealTabs?

Suggested snippet does, I tried that exact flow, and it works well.

pspad:
Do you want to have mix of real tabs and spaces in file?

My suggestion was meant as a temporary workaround, until you release the syntax-specific tab settings, and yes, certainly not systematic fix of OPs issue.

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR