#] #] ********************* #] "$d_SysMaint""text processors/geany notes.txt" www.BillHowell.ca 07Feb2020 initial # so far, I haven't created a "notes" f - later? # There is limited extra detail in this file to help explain filemanager to open .py set : geany -i font : Liberation mono regular size 11 (28Oct2023 normal mono font can't see underscore) $*.[,\] -> special characters must normally be escaped to search as character, but NOT in a [list] : 24************************24 24************************24 # Table of Contents, generated with : # $ grep "^#] " "$d_SysMaint""text processors/geany notes.txt" | sed 's/^#\]/ /' don't use TableOfContents as usual - just use (same thing) : $ linux -> select '7. txtEd geany' 24************************24 Setup Toolbar : geany Menu -> Edit -> Preferences -> Interface -> Toolbsar -> click "customize toolbar" icon 24************************24 #08********08 #] ??Apr2024 #08********08 #] ??Apr2024 #08********08 #] ??Apr2024 #08********08 #] ??Apr2024 #08********08 #] ??Apr2024 #08********08 #] ??Apr2024 #08********08 #] ??Apr2024 #08********08 #] ??Apr2024 #08********08 #] 01Apr2024 search "Linux geany text editor and window title config" (works until edit) +-----+ https://wiki.geany.org/howtos/change_window_title Changing Geany window title text The idea is that I regularly work on a couple of repos at the same time, and can have like five Geany windows open, with three of them showing say 'requirements.txt - […'. I'd prefer to have the window title to start with the project name so I know which window is which project. I thought of patching Geany itself like https://github.com/geany/geany/pull/290, but I am not really proficient in C, so I went for weird Python/Xfce solution. import subprocess from time import sleep while True: windows_details = subprocess.run(['wmctrl', '-l'], stdout=subprocess.PIPE).stdout.decode('UTF-8') for window_details in windows_details.splitlines(): window_id, _, title = window_details.split(maxsplit=2) if '] - Geany' in title: new_title = title[title.find(' [')+2:].replace(' (new instance)', '').replace(']','') subprocess.run(['xdotool', 'set_window', '--name', new_title, window_id]) sleep(0.1) >> I could simply use xdtool!? I have to look at my OLD notes : "$d_SysMaint"'Linux/xdotool notes.txt' eg QNial : winUrlID := host_result link 'wmctrl -l | grep "' winTitle '" | tail -1 | cut -f1 -d" " ' ; 11:47$ window_id=$( wmctrl -l | grep 'geany notes.txt' | sed 's|\(^[0-9abcdefx]*\).*|\1|' ) ~ 11:47$ echo "$window_id" 0x06c00007 ~ 11:48$ xdotool set_window --name 'Geany notes.txt' "$window_id" ~ >> worked beautifully Now to change all geany window titles : wmctrl -l | grep -i 'Geany' >"$d_temp"'geany window_ids.txt' NUTS!!! no good. As aoon as I edit, it put `* (very useful!) and the standard dir following #08********08 #] 18Jan2024 can't [see, change] toobar [icons, text] /home/bill/.config/geany/ui_toolbar.xml Menu -> Edit -> Preferences -> xed preferences >> has 7 choices - doesn't look like it applies to .txt docs? /home/bill/.config/geany/colorschemes/ >> no schemes listed!? Menu -> Tools -> Color chooser -> seems to only apply to background, not gray color of icon text? Menu -> Edit -> Preferences -> Interface -> Toolbar -> button "Customize Toolbar" -> >> doesn't seem to have any effect? +-----+ https://askubuntu.com/questions/407547/how-can-i-add-and-use-a-color-scheme-for-geany How Can I Add, and Use, a Color Scheme for Geany? Asked 10 years ago Modified 2 years, 4 months ago Viewed 87k times +--+ For those who did not find it under View → Change Color Scheme check under View → Editor → Change Color Scheme. I wanted to add this as a comment but don't have the rep enough, sorry. – Parzival Feb 11, 2017 at 1:37 >> alternate scheme seems to do nothing? +--+ You can get theme files from https://github.com/codebrainz/geany-themes (I prefer Spyder Dark and InkPot). The easiest way is to click "Clone or download" and then "Download ZIP". Just copy the .conf files directly into ~/.config/geany/colorschemes/. (Not wrapped in another subfolder as a result of downloading, archive extraction or Git.) They will immediately be available from the menu bar under View → Change Color Scheme... Note: These work for Geany 1.22 and above. For older versions you may need to: download different files (links provided in the README above or at http://wiki.geany.org/themes/start) navigate to View → Editor → Change Color Scheme instead restart Geany before the themes appear as new options edited Oct 11, 2017 at 22:46 lofidevops answered Mar 21, 2015 at 22:50 luart Howell: now I tried "Color chooser" on Toolbar menu >> wrong tool Note that changes for one file being edited DON'T propagate to other files!?!?!? I give up for now #08********08 #] 26Dec2023 mouse moves, but click doesn't work see "$d_SysMaint"'Linux/1_bash notes.txt', wait >10s for "freeze" to thaw? 08********08 #] 28Oct2023 search "Linux geany and underscore character is invisible" before I used : Monospace regular (I like this best) I selected : Liberation mono regular sixze 11 +-----+ https://github.com/geany/geany/issues/1387 >> basically select a different font or screw around low-level 08********08 #] 20Jul2023 geany regexpr search with specific repeats - no `\ in front of {} (just like ()) bad : ^([A-Za-z]\{3\}) ([0-9]\{2\}), ([0-9]\{4\})$ good : ([A-Za-z]{3}) ([0-9]{2}), ([0-9]{4}) 08********08 #] 15Mar2023 search 'geany text editor and regular expressions' see "$d_temp"'AI for Good blog linSeqInn.txt' ^([a-zA-Z0-9_]\+) finds non-empty lines excpt when the begin with weird chrs 三 张 ^([^ \t]) - finds empty lines!?!? +-----+ https://www.geany.org/manual/gtk/glib/glib-regex-syntax.html Regular expression syntax — Syntax and semantics of the regular expressions supported by GRegex Table 2. Metacharacters inside square brackets Character Meaning \ general escape character ^ negate the class, but only if the first character - indicates character range [ POSIX character class (only if followed by POSIX syntax) ] terminates the character class 08********08 14Mar2023 search 'geany text editor and regular expression search for \n' #] \n in regexpr search : neither [bash cmd, geany] txtEd work simply, use [tr, awk]!?? My approach - geany doesn't cut it save text segment to /media/bill/ramdisk/geany temp.txt $ sed 's|^([a-zA-Z0-9]\+)(.*)\n\n([a-zA-Z0-9]\+)(.*)\n([a-zA-Z0-9]\+)(.*)|\1\2, \3\4\n\t\5\6|' "$d_temp"'' search ^([a-zA-Z0-9]\+)(.*)\n\n([a-zA-Z0-9]\+)(.*)\n([a-zA-Z0-9]\+)(.*) replace \1\2, \3\4\n\t\5\6 >> oops, neither does bash cmd, will need bash script loop? awk '$1 ~ /^A/ {print $0}' employees.txt "$d_temp"'geany temp.txt' >> myTry awk '$1 ~ /^A/ {print $0}' employees.txt "$d_temp"'geany temp.txt' +-----+ search 'Linux and how do I select lines in a file with a regular expression?' see same date in "$d_SysMaint"'Linux/bash notes.txt' #] +-----+ #] In Geany IDE: How to Find and delete entire line https://stackoverflow.com/questions/64869383/in-geany-ide-how-to-find-and-delete-entire-line Asked 2 years, 3 months ago Modified 2 years, 3 months ago Viewed 429 times The following works in Geany 1.36 on Debian Linux... In the Search and Replace dialog... Check Use regular expressions Check Use multi-line matching Enter the following in the Search for field... ^\s*-moz-border-radius.*$\n Leave the Replace with field empty. Regular Expression Explanation ^ Start at beginning of line \s* Zero or more whitespaces -moz-border-radius The text to search for .* Zero or more of any characters $ End of the line \n Include the newline. This is the non-standard part. Apparently Geany recognizes the newline escape sequence following a regular-expression End-Of-Line($). answered Nov 17, 2020 at 4:30 DocSalvager >> try his use of \n Include the newline. This is the non-standard part. Apparently Geany recognizes the newline escape sequence following a regular-expression End-Of-Line($). eg ^\s*-moz-border-radius.*$\n >> didn't work in my example! >> $^ - 08********08 26Jan2023 search 'Linux geany and how to close make window' #] close make window : Menu -> View -> Show message wijdow -> un-check +-----+ https://stackoverflow.com/questions/13604476/how-to-close-geany-terminal how to close geany terminal Asked 10 years, 2 months ago Modified 5 years, 4 months ago edited Dec 1, 2012 at 23:18, Chris Seymour asked Nov 28, 2012 at 11:54, Raz Cohen This is not really an answer, but more like an alternative suggestion. In newer versions of Geany you can tell it to run programs in the Vitual Terminal Emulation, i.e. the terminal tab at the bottom (Settings -> Terminal -> Run Programs in VTE). This way, the program starts more quickly (without first starting a terminal), you can still see the output generated by the program (exception stacktraces!), and the focus/cursor stays in the editor window, too. answered Dec 1, 2012 at 22:51 tobias_k 08********08 20Jan2023 geany windows stay maximized happens after opening [evolution mbox, LibreWrite]? only one workspace was affected #] geany windows stay maximized -> close all geany windows, then reopen >> this worked today ******** #] +----+ #] Other +----+ #] html [chr, color] codes for my insert file stuff : HTML character codes Table - http://www.ascii.cl/htmlcodes.htm HTML color codes and chart selection : https://html-color-codes.info/ +----+ #] Ctrl-[m<>] bookmarks [set-unset, previous, next] Markers : Ctrl-m set a marker Ctrl-.(period) jumping forward from one mark to the next, use Ctrl-,(comma) jumping backward from one mark to the next, use Ctrl-m remove a marker #] Alt-Shift [block, column] selection, start marking column, keyboard move to select text #] usrWkSpcSymName stuff - geany-aided formatting : regexpr search-replace # don't include apos shown below! # line-by-line confirm, not within whole selected area, too many exceptions # prep end-of-line for next sed '([^ ])$' '\1 ' # end-of-line paren '[ \t]+$' ') ' # paren before 1st chr '^[ \t]+' '\t\t\t(' # quote phrL '"([A-Za-z0-9_]+), +' '"\1 "' # (1st must already be quoted) +----+ #] invocation of geany via [terminal, script] #] $ geany -i man geany -i, --new-instance Don't open files in a running instance, force opening a new instance. Only available if Geany was compiled with support for Sockets. command line to start file in separate window : https://www.geany.org/documentation/releasenotes/0.9 $ geany -i (default with file manager, eg nemo) #] +----+ #] special characters #] % & ampersand #] [“””’—…] Problematic characters for UTF-8 - prevents file [save, search] (other chrs as well) “ " ”” " ' ' ’ ' #] nothing (invisible nul or something) - must locate one-by-one. I need to find out what that character is! #] — - #] – - #] … ... #] for regression tables etc, copy-paste to LibreCalc : Note : the * repetition doesn't seem to work with spaces. Use + instead. put apo at end of words at end of lines, multiline mode : [ \t]*\n ' \n put apo between words : ([a-zA-Z0-1])([ \t]+)([a-zA-Z0-1]) \1'\2\3' Replace spaces with tab search : \s+ replace : \t Replace multiple tabs (01Jan2021 nowork!) search : \t* replace : Extract email addresses : search : .*<(.*)> replace : \1 example : search : aao@ece.ualberta.ca result : aao@ece.ualberta.ca Special characters \c A backslash followed by d, D, s, S, w or W, becomes a character class (both inside and outside sets []). d: decimal digits D: any char except decimal digits s: whitespace (space, \t \n \r \f \v) S: any char except whitespace (see above) w: alphanumeric & underscore W: any char except alphanumeric & underscore #] blog emails add
s, 3 steps : 1st pass : Search \n Replace
\n 2nd pass : Search \n\n Replace \n
\n 3rd pass : Search

\n Replace
\n repeat several times... 4th pass : regexp Search --->([ \t]*
) Replace : ---> #] trailing [spce, tab] : [ \t]* doesn't work, must be easy way #] example using end-of-line text : search : (.*)\.ndf(.*) replace : \1.ndf ********** #] +-----+ #] good examples #] 'bank statements reformat.ndf' = transaction translate html-to-LibreOfice Calc : LibreOffice macros suck for simple stuff : [sed, gawk] aren't good enough #] 'email analysis - Fauci corona virus.ndf' - easy [view, edit] of sed expressions : # pdftotext frequent mis-recognitions : D=[D0], I= [1IJlTf], O=[O0] given : extract lines of interest s/^From://I;s/^To://I;s/^CC://I[ ] create common parenthesis ;s/[{(\[]/(/;s/[)}\]]/)/[ ] placeholder for newline ;s/;/\\sed_n/g[ ] get rid of multiple spaces ;s/[ ]\+/ /g problematic lineStart1 ;s/^ //g problematic lineStart2 ;s/^\.\+//g firstname tighten ;s/ \, /\, /g lastname tighten ;s/ \, /\, /g get rid of title problem ;s/Dr. //" #] geany code to clean up [From:,To,CC:] lines with geany text editor. note that : ; % chr `\ not used in front of parenthesis ; % [`^, `$ ]nt used for [start, end] of line - select carefully ; % initially, put two tabs between column[1,2] ; % regexpr search1 [A-Za-z0-9,\.]\t; replace '\t\t' ; % regexpr search2 \t\t replace '\t\t' ' ; % regexpr search3 (.*) replace '\1' ; 'extract lines of interest' 's/^From://I;s/^To://I;s/^CC://I[ ]' 'create common parenthesis' ';s/[{(\[]/(/;s/[)}\]]/)/[ ]' 'placeholder for newline' ';s/;/\\sed_n/g[ ]' 'get rid of multiple spaces' ';s/[ ]\+/ /g' 'problematic lineStart1' ';s/^ //g' 'problematic lineStart2' ';s/^\.\+//g' 'firstname tighten' ';s/ \, /\, /g' 'lastname tighten' ';s/ \, /\, /g' 'get rid of erratic title' ';s/Dr. //"' result : #] Fauci email example : clean up organisational acronyms % regexpr search1 (.*) replace '\1' ; % regexpr search2 \t\t replace '\t\t' ; '(NIH/NIAID)' ';s/(N[1IJlTf]H\/N[1IJlTf]A[1IJlTf]D)\(.*\)/(NIH\/NIAID)/' '(NIH/CC/DLM)' ';s/(NIH\/CC\/DLM)\(.*\)/(NIH\/CC\/DLM)/' '(NIH/FIC)' ';s/(NIH\/FIC)\(.*\)/(NIH\/FIC)/' '(NIH/NCI)' ';s/(NIH\/NCI)\(.*\)/(NIH\/NCI)/' '(NIH/OD)' ';s/(NIH\/OD)\(.*\)/(NIH\/OD)/' '(NIH/VRC)' ';s/(NIH\/VRC)\(.*\)/(NIH\/VRC)/' '(CDC/DDID/NCIRD/OD)' ';s/(CDC\/[D0][D0][I1][D0]\/NCIRD\/[O0][D0])\(.*\)/(CDC\/DDID\/NCIRD\/OD)/' '(CDC/OD)' ';s/(CDC\/[O0]D)\(.*\)/(CDC\/OD)/' '(OS/IOS)' ';s/(OS\/10S)\(.*\)/(OS\/IOS)/' '(OS/ASPR/IO)' ';s/(OS\/ASPR\/[1I]0)\(.*\)/(OS\/ASPR\/IO)/' **** #] +----+ #] search & replace (Ctrl-H) #] regular expressions [search, replace] : #] remove email addresses for privacy : search : <[a-zA-Z0-9.\-]+@[a-zA-Z0-9.\-]+> replace : <> #] txt TableOfContents - convert dates : search : ^([0-9]+[a-zA-Z]+[0-9]+) replace : #] \1 #] txt TableOfContents - rm xtra space : search : #] ([0-9]+[a-zA-Z]+[0-9]+) <2spc> replace : #] \1 <1spc> #] add bookmarks to html file : search : ^(\t)(.*)() #] (assuming are in place) : replace: \n\1\2\3 #] html TableOfContents : search : ^
\n

(.*)

#] (see "$d_bin"'fileops run.sh') : replace:
  • \1 #] html - QNial output format : #] double spaces to `. : search : <2 spaces> replace : .. #] tab to ... : search : \t replace : ... #] html remove bad links from webPage : search : ()(.*)() replace : \2 #] non-external links : search : etc) #] #] youtube redirections, final link (https:// part) : does't often work #] search : %3A replace : : #] search : %2F replace : / #] regexpr replace excess symbols with std length : search : ^([0-9]+)([a-zA-Z]+)([0-9]+) replace : #] \1\2\3 search : \*\**\* replace : 24**********************24 search : 06\?\?+06 replace : 06??????06 search : \*\{7\}\* replace : 08********08 search : \*\{23\}\* replace : 24************************24 search : 48\**48 replace : 48************************************************48 search : --*- replace : 05-----05 search : ([0-9][0-9])\*\*+([0-9][0-9]) replace : ?how I output n chars? search : ([0-9][0-9])--+([0-9][0-9]) replace : ?how I output n chars? #] #] geany regexpr search with specific repeats - no `\ in front of {} 20Jul2023 #] this is just like () in geany, whereas bash regexpr require backslashes #] bad : ^([A-Za-z]\{3\}) ([0-9]\{2\}), ([0-9]\{4\})$ #] good : ([A-Za-z]{3}) ([0-9]{2}), ([0-9]{4}) #] #] YouTube Transcript using geany regexpr : 27Dec2023 #] pair time-txt: search : ([0-9]*\:[0-9]*)\n(.*) replace: \1 \2 #] group paragraphs : #] start by listening to narrators, inserting empty lines to segregate [speaker, concept]s #] remove timestamps within paragraphs : #] select text after timestamp of first line to end of last line of paragraph #] search : ([0-9]*\:[0-9]*) replace: #] use only "In selection" button!! #] remove \n from within paragraphs, using multiline geany option : #] search : \n replace: #] remove triple for entire commentary #] search : replace: #] #] Peer review references : no \n within reference search : \n([^[]) replace : \1 ref same-line, empty line between refs search : \n[ replace : \n\n[ search : \n([^[\s]) replace : \1 picks out "ZLB CanadaZLB" at start of line : ^([A-Z]+)(.*)\1$ given : BGC CanadaBGC Bristol Gate Concentrated Canadian Equity ETF -14.12% -8.03% --- --- result: BGC Bristol Gate Concentrated Canadian Equity ETF -14.12% -8.03% --- --- search : ^([A-Z]+)(.*)\1$\n replace : \1\t use (something)\1 etc to mark char sequence unlike sed, don't use backslash for parenthesis around items to match : 15Jan2021 NYET!!! works if you specify multi-line replace ([ \t]*)\n ^(\,)(.*) template for collapsibles : #] Old : convert

    to collapsible multiline regexpr search ^

    (.*)

    \n
      replace
      search ^ replace
      one-liner conversions : multiline regexpr search \n
      \n
      replace
      search
      \n
      replace #] #] +-----+ #] text line codes (@ beginning of line onlY!) : #] #] lines are culled for TableOfContents etc #] pInsert] file inserted before next line #] standard inserts, like my webPages, don't use this #] #] # enddoc