I have searched the forum and looked at the off-line help files, but I cannot figure out how to use Notepad++'s folding feature to just create collapsable outlines and lists of plain text (not program code). I have tried just using indents for levels and then selecting the folding and collapsing options in the context menu, but didn't work for me.
I apologize if this is really simple or obvious, but I really can't figure it out and have tried to search for an answer before posting this very basic question.
Any help will be appreciated. If you need to flame me, I probably deserve that -- but please tell me how to solve my problem as well. : )
George
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You need Function List plugin. The idea is to define blocks of text as function and body. You can do that in two steps,
First create a user defined language under View >> User Define Dialog. I've created one for txt entension and named it TxT.
Restart Notepad++ to refresh Function List plugin. Go to Plugins >> Function List >> User Rules. Select your language (e.g. TxT) in the Language dropdown; click Edit Rule.
Decide on some charater or characters to define your function start and body end; I use back-quotes (i seldom use this character) and double back-quotes respectivley. My rule looks like this:
Function begin: `
Function list name: .*$ (this will list all characters till end of line as function name in Function list window; serves to name the outlined text block).
Body end: ``
And that's it. Any text file will have folding block for texts between ` and ``.
This will not work with new files; cannot associate under defined language as default file type - yet.
Hope this helps,
Sivam
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I followed the steps to the letter and can indeed see my "functions"
in the list on the right, but I couldn't get any collapsing! With
a simple x.txt:
`test1
aaaaaaaaaa
aaaaaaa
``
`test2
aaaaaaaaaa
aaaaaaa
``
` block 3
aaaaaaaaaa
aaaaaaa
``
The above would list the 3 functions (and highlight them
when I entered the block), but no collapse! No [-] or [+]
icons on the left either. Any ideas? I'm using V 4.0.1.
Thanks in advance,
Slo
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You should have a space after `. Try this,
` test1
aaaaaaaaaa
aaaaaaa
``
Of course I tried that, with and without spaces.
Long and short text, etc. I can see the function names
change accordingly, get highlighted in the list, etc.
Hitting the Try button in the User Rules dialog shows
my functions immediately!
But I never see the [-] and [+] folding icons
like I do in all other languages...
Slo
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
>You should have a space after `. Try this,
>` test1
>aaaaaaaaaa
>aaaaaaa
>``
Of course I tried that, with and without spaces.
Long and short text, etc. I can see the function names
change accordingly, get highlighted in the list, etc.
Hitting the Try button in the User Rules dialog shows
my functions immediately!
But I never see the [-] and [+] folding icons
like I do in all other languages...
Slo
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry I goofed up in my first response. Proper procedure is here,
FOLDING
This is controlled through View >> 'User define dialog'. In the new language definition, assign ` to Folder Open Keyword setting and `` to Folder Close Keyword Setting.
This should fold the text within ` and ``.
OUTLINE OF FOLDED TEXT
For this you need Function List plugin. Go to Plugins >> Function List >> User Rules. Select your language (e.g. TxT) in the Language dropdown; click Edit Rule.
Decide on some charater or characters to define your function start and body end; I use back-quotes (i seldom use this character) and double back-quotes respectivley. My rule looks like this:
Function begin: `
Function list name: .*$ (this will list all characters till end of line as function name in Function list window; serves to name the outlined text block).
Body end: ``
-Sivam
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2012-01-31
Five years later…after 2 hours of searching I also can't find how to turn on outlining. Great thing is Notepad++ is free. Bad thing is Notepad++ is free.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
FunctionList is not stable in the newwer versions of Notepad++, and has not been maintained in years.
I think the simplest way nowadays is defining an user defined language, with some keywords as fold openers and closes.
CChris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
pshute answered correctly in 2007. The easiest solution is to select Python as your language from the top menu and indents will then trigger folding in your text document.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have searched the forum and looked at the off-line help files, but I cannot figure out how to use Notepad++'s folding feature to just create collapsable outlines and lists of plain text (not program code). I have tried just using indents for levels and then selecting the folding and collapsing options in the context menu, but didn't work for me.
I apologize if this is really simple or obvious, but I really can't figure it out and have tried to search for an answer before posting this very basic question.
Any help will be appreciated. If you need to flame me, I probably deserve that -- but please tell me how to solve my problem as well. : )
George
I'm not certain that I understand what you want to do, but I think if you set the language to Python then indenting should work.
Hi,
I use what you'd asked for.
You need Function List plugin. The idea is to define blocks of text as function and body. You can do that in two steps,
First create a user defined language under View >> User Define Dialog. I've created one for txt entension and named it TxT.
Restart Notepad++ to refresh Function List plugin. Go to Plugins >> Function List >> User Rules. Select your language (e.g. TxT) in the Language dropdown; click Edit Rule.
Decide on some charater or characters to define your function start and body end; I use back-quotes (i seldom use this character) and double back-quotes respectivley. My rule looks like this:
Function begin: `
Function list name: .*$ (this will list all characters till end of line as function name in Function list window; serves to name the outlined text block).
Body end: ``
And that's it. Any text file will have folding block for texts between ` and ``.
This will not work with new files; cannot associate under defined language as default file type - yet.
Hope this helps,
Sivam
Sivam,
Thanks so much!
George
Sivam,
I followed the steps to the letter and can indeed see my "functions"
in the list on the right, but I couldn't get any collapsing! With
a simple x.txt:
`test1
aaaaaaaaaa
aaaaaaa
``
`test2
aaaaaaaaaa
aaaaaaa
``
` block 3
aaaaaaaaaa
aaaaaaa
``
The above would list the 3 functions (and highlight them
when I entered the block), but no collapse! No [-] or [+]
icons on the left either. Any ideas? I'm using V 4.0.1.
Thanks in advance,
Slo
Slo,
You should have a space after `. Try this,
` test1
aaaaaaaaaa
aaaaaaa
``
` test2
aaaaaaaaaa
aaaaaaa
``
` block 3
aaaaaaaaaa
aaaaaaa
``
- Sivam
Is there a way of extending the definitions for functions?
In asp the function list lists function starting with "Function" but I would also like functions called "Sub" to show up in the list.
Where can I kind of classify "Sub" as a function?
You should have a space after `. Try this,
` test1
aaaaaaaaaa
aaaaaaa
``
Of course I tried that, with and without spaces.
Long and short text, etc. I can see the function names
change accordingly, get highlighted in the list, etc.
Hitting the Try button in the User Rules dialog shows
my functions immediately!
But I never see the [-] and [+] folding icons
like I do in all other languages...
Slo
>You should have a space after `. Try this,
>` test1
>aaaaaaaaaa
>aaaaaaa
>``
Of course I tried that, with and without spaces.
Long and short text, etc. I can see the function names
change accordingly, get highlighted in the list, etc.
Hitting the Try button in the User Rules dialog shows
my functions immediately!
But I never see the [-] and [+] folding icons
like I do in all other languages...
Slo
Slo,George
Sorry I goofed up in my first response. Proper procedure is here,
FOLDING
This is controlled through View >> 'User define dialog'. In the new language definition, assign ` to Folder Open Keyword setting and `` to Folder Close Keyword Setting.
This should fold the text within ` and ``.
OUTLINE OF FOLDED TEXT
For this you need Function List plugin. Go to Plugins >> Function List >> User Rules. Select your language (e.g. TxT) in the Language dropdown; click Edit Rule.
Decide on some charater or characters to define your function start and body end; I use back-quotes (i seldom use this character) and double back-quotes respectivley. My rule looks like this:
Function begin: `
Function list name: .*$ (this will list all characters till end of line as function name in Function list window; serves to name the outlined text block).
Body end: ``
-Sivam
Five years later…after 2 hours of searching I also can't find how to turn on outlining. Great thing is Notepad++ is free. Bad thing is Notepad++ is free.
FunctionList is not stable in the newwer versions of Notepad++, and has not been maintained in years.
I think the simplest way nowadays is defining an user defined language, with some keywords as fold openers and closes.
CChris
pshute answered correctly in 2007. The easiest solution is to select Python as your language from the top menu and indents will then trigger folding in your text document.