Wikipedia:Reference desk/Archives/Computing/2021 July 25

= July 25 =

Text Editor for Splitting Text into Several Subtexts
I am looking for a free, convenient text editor that after you give it some text, it enables you to mark several non consecutive sentences\ paragraphs as a subtext number #x and then you can filter and show only this. For example, you can give it the bible and use it mark subtexts according to the author w.r.t Documentary Hypothesis. Then, you can read, for example, all the text of the Jehovist source without bothering with seeing the other sources when reading it. Hope it is clear enough, and thank you! David (talk) 15:52, 25 July 2021 (UTC)
 * What OS are you using (Windows, Linux, macOS, ...)? Most text editors will allow you to mark lines with a code indicating the hypothesized source, for example prepending Jehovist with "J::", Elohist lines with "E::" and so on, offering a slightly awkward but simple approach if you have tools like grep and sed. For example, if you want to see all Jehovist and Elohist lines but no others, you can select only those by grepping with the pattern "^[JE]::" and then stripping off the prefix "^.::" from each line. --Lambiam 22:19, 25 July 2021 (UTC)
 * Sounds cool! I use Windows 10. Are these features available for text editors for Windows 10? David (talk) 04:15, 26 July 2021 (UTC)
 * Also, the bible is in Hebrew, so I need a tool that can cope with it (at the minimum: has right-to-left alignment) David (talk) 04:17, 26 July 2021 (UTC)
 * I'm not sufficiently familiar with Windows to know what is available, but I suspect that emacs can (be made to) do everything you need. My knowledge of emacs is stale, though; you'll need someone else to help you with that. --Lambiam 11:13, 26 July 2021 (UTC)
 * By default, Windows does not have grep and sed. Windows has find and findstr which can list those lines that include specific text, but not blocks of text that extend across several lines. However, Windows versions of grep and sed are available from all over the place.— Another route is a native Windows text editor like TextPad. TextPad allows lines of the current file to be selected by a search and then all of the selected lines to be copied or extracted to another file. Again, this operates on lines, not blocks. TextPad is Unicode aware, but I am not sure about RTL text.— Another route might be to locate a suitable discussion forum and ask there if they know of an available file that is already tagged with the source information— Also take a look at this over in wikiversity — GhostInTheMachine talk to me 15:35, 26 July 2021 (UTC)
 * Does TextPad support right-to-left alignment? Also, does it support full Unicode, including the cantillation marks (or is their preservation not important?)? You want to see, and not . --Lambiam 21:31, 26 July 2021 (UTC)
 * Emacs, fwiw, apparently supports non-contiguous regions (selections) and narrowing ("focusing in on some portion of the buffer, making the rest temporarily inaccessible") to non-contiguous regions with the help of add-ons. But be warned that Emacs is kinda idiosyncratic and elephantine (in a good way.) Aecho6Ee (talk) 09:04, 29 July 2021 (UTC)