#] #] ********************* #] "$d_SysMaint"'text processors/kwrite notes.txt' - # www.BillHowell.ca 01Jun2016 initial 01Jun2016 Kwrite - problematic "grey character" mode : This is VI editor mode, invoked by Meta-Ctrl-V Retype to exit VI mode 27Jul2022 kwrite command line to set up 1/2 window at right of screen (doesn't work?) kwrite --geometry '950*1060+965+5' 24************************24 24************************24 # Table of Contents, generated with : # $ grep "^#]" "$d_SysMaint"'text processors/kwrite notes.txt' | sed 's/^#\] / /' # ********************* "$d_SysMaint"'text processors/kwrite notes.txt' - 01Feb2019 Wheatland Fire Services Agreement 2019-06 31Jan2019 Wheatland Fire Services Agreement 2019-06 31Jan2019 regular expression replacements 06Dec2018 Search with regular expressions - doesn't work (use bash command line!) 10Sep2016 List of keysyms 11Sep2016 kwrite command line options 01Jun2016 Kwrite - problematic "grey character" mode : 24************************24 regular expression replacements - NO backslash before [(,)] Search : confNmY="(.*)"\n Replace : confNmY="\1"\nd_confNmY="/media/bill/RaspPi_ext4_32Gb/\1/"\n remove 1st part of email address : Search : " .*@(.*,)" Replace : " @\1" -> doesn't quite work (search backwards!?!??? 24Oct2019 see "/media/bill/PROJECTS/Lucas - Universal Force/context/document build short description.txt" : To append the "/*_endCmd" line to many new "/*$" lines, use a kwrite regular expression search-replace, such as : search : /\*\$(.*)\n replace : /\*\$\1\n/*_endCmd\n 07Dec2019 How do I do 1st occurence only of regexp?? 24************************24 08********08 #] ??Jul2022 08********08 #] ??Jul2022 08********08 #] ??Jul2022 08********08 #] ??Jul2022 08********08 #] 29Aug2022 tab not working in search expression (use normal grep) Kwrite help -> documentation, search regular expressions -> Appendix A. Regular Expressions ^[ \t]{0,4}(Henrik|Pernille) sa(ys|id) Their example has a tab, but doesn't work for me?? I tried \x9=tab : failed just copy-paste a tab into search expression? >> worked!!! ??? - but not in expression use normal sed : $ sed 's|\([a-zA-Z]+\)\. \([1-9]+\)\, \([1-9]+\)[\x9]\(.*\)[\x9]\(.*\)[\x9]\(.*\)[\x9]\(.*\)|\2-\1-\3\t\4\t\5\t\6\t|' "$d_Midas"'Investments/Scotiabank/220829 SB visa 01May2021-29Aug2022.txt' >"$d_temp"'SB test.txt' >> no change - pattern not found $ sed 's|\([a-zA-Z]\+\)[\.]* \([1-9]\+\)\, \([1-9]\+\)\(.*\)|\2-\1-\3|' "$d_Midas"'Investments/Scotiabank/220829 SB visa 01May2021-29Aug2022.txt' >"$d_temp"'SB test.txt' kwrite escape search \t replace ~|~ $ sed 's|\([a-zA-Z]\+\)[\.]* \([1-9]\+\)\, \([1-9]\+\)|\2-\1-\3|;s|~\:~|\t|g' "$d_Midas"'Investments/Scotiabank/220829 SB visa 01May2021-29Aug2022.txt' >"$d_temp"'SB test.txt' >> good, excpt I want to merge two comment columns $ sed 's|\([a-zA-Z]\+\)[\.]* \([1-9]\+\)\, \([1-9]\+\)|\2-\1-\3|;s|\(.*\)~\:~\(.*\)~\:~\(.*\)~\:~\(.*\)~\:~\(.*\)|\1~\:~\2 \3~\:~\4~\:~\5|;s|~\:~|\t|g' "$d_Midas"'Investments/Scotiabank/220829 SB visa 01May2021-29Aug2022.txt' >"$d_temp"'SB test.txt' >> yes. finally - long and hard 08********08 #] 29Aug2022 kwrite command line to set up 1/2 window at right of screen (again) https://docs.kde.org/stable5/en/kate/kwrite/command-line-options.html >> nyet no window options provided put off for another day ( annoying, time-wasting problem to [position, size] windows!) kwrite menu -> help -> kwrite handbook -> search command line : kwrite --help This lists the most basic options available at the command line. >> useless search "Suse open dolphin from command line" nothing that helps... 08********08 #] 27Jul2022 kwrite command line to set up 1/2 window at right of screen from below, 11Sep2016 kwrite command line options --geometry of main widget (usually W*H+Xpos+yPos) >> try kwrite --geometry 960*1080+965+0 >> not working - still giving large window kwrite --geometry 950*1060+965+5 >> doesn't really work yet? Dolphin file manager because that is a pain in the ass!! Had to put apos around geometry : kwrite --geometry '950*1060+965+5' >> OK leave in dolphin for .[txt, sh] files 08********08 #] 01Feb2019 Wheatland Fire Services Agreement 2019-06 see "/media/bill/PROJECTS/Qnial/MY_NDFS/txtFile compare.ndf" to do a great comparison of two files that are substantially the same. Not good for plagiarism, but a start... *********************** #] 31Jan2019 Wheatland Fire Services Agreement 2019-06 save : "/media/bill/PROJECTS/My_Clubs/Fire BoD/180412 Wheatland Fire SvsAgmt CALGARY-#629624-v1-CALGARY-#629244-v1-Fire_Services_Bylaw_(2018) 1.doc" as text to "/media/bill/ramdisk/180412 Wheatland Fire SvsAgmt CALGARY-#629624-v1-CALGARY-#629244-v1-Fire_Services_Bylaw_(2018) 1.txt" $ pdftotext "/media/bill/PROJECTS/My_Clubs/Fire BoD/190131 Wheatland Fire Bylaw 2019-06.pdf" "/media/bill/ramdisk/190131 Wheatland Fire Bylaw 2019-06.txt" +-----+ Within kwrite, try to eliminate hard returns in sentences : of "/media/bill/ramdisk/190131 Wheatland Fire Bylaw 2019-06.txt" +---+ For lettered clauses : This is problematic!! must manually do each! Search .\n Replace . trailing space Search (^[:;\.])\n Can't get ^ towork in kwrite! Replace \1 trailing space Search ([A-Z,a-z])\n OK - not bad Replace \1 trailing space +---+ Easy stuff For numbered subsections, regexpr Search ([0-9])[.]([0-9])\n\n and ([0-9])[.]([0-9])([0-9])\n\n Replace \1.\2\t \1.\2\3\t For [paragraph, subsection] starts after [period, colon, semicolon] Search .\n :\n ;\n Replace .\n\n :\n\n ;\n\n For page numbers watch this! It will casuse problems Search [0-9][0-9]\n Replace null Search (SECTION)(.*)\n Replace \n\1 +---+ Must rebuild tables manually for pdftotext outputs, to match word-to-text use block select mode and tabs? +-----+ $ diff "/media/bill/ramdisk/180412 Wheatland Fire SvsAgmt CALGARY-#629624-v1-CALGARY-#629244-v1-Fire_Services_Bylaw_(2018) 1.txt" "/media/bill/ramdisk/190131 Wheatland Fire Bylaw 2019-06.txt" >"/media/bill/ramdisk/190131 Wheatland Fire Bylaw 2019-06 changes.txt" >> nyet, sucks **************** #] 31Jan2019 regular expression replacements https://unix.stackexchange.com/questions/27901/match-one-part-of-a-regular-expression-in-a-kwrite-find-and-replace-regex ry: Find: ([a-z])[0-9] Replace: \1 Parenthesis save content matched and can be used with expression \ depending of how many parenthesis used in the Find expression and its order from the beginning. For example, if you wanted to change order between the letter and the number, would be: Find: ([a-z])([0-9]) Replace: \2\1 answered Dec 29 '11 at 14:23 Birei **************** #] 06Dec2018 Search with regular expressions - doesn't work (use bash command line!) For example, in IJCNN mass emails, I want to check that ALL images are included as link, not as attached code. Ctrl-R bring up search with regular expression capabilities Find : > doesn't work I will purposefully corrupt two references, but using an old mass email, not the current one! Whereas : $ grep --count "> 21 lines match $ grep --count "> Again, 21 lines match >> Here I use "\{0\}" for learning & fun, instead of "*" >> Notice this is wrong - I don't want a "maybe match", I want a "definitely is not there" $ grep --count "> note the negation character "^" >> 21 lines match $ grep --count "> "\+" means one or more >> 0 lines match >> Seems wrong?? $ grep --count "> Still can't get it right!! +-----+ https://stackoverflow.com/questions/3548453/negative-matching-using-grep-match-lines-that-do-not-contain-foo#3548465 grep -v is your friend: grep --help | grep invert -v, --invert-match select non-matching lines Also check out the related -L (the complement of -l). -L, --files-without-match only print FILE names containing no match edited Jun 19 '15 at 22:28, fedorqui answered Aug 23 '10 at 14:25, Motti +-----+ >> Nuts - I was trying to do too much, should have thought of this! $ grep " >> Awesome! This works perfectly. Add to "INNS mass HOLDERS instructions.odt" For current mass email in preparation : $ grep "> no response, so the images are protected **************** #] 10Sep2016 List of keysyms http://wiki.linuxquestions.org/wiki/List_of_keysyms This list will vary depending on compilation factors. You can view yours with the command : $ dumpkeys -l nul 0x0000 Control_a through g 0x0001 through 0x0008 BackSpace 0x0008 Remove the character to the left. Delete does the same thing, but it works at the login prompt as well. To remove the character under the cursor, use the string "\033[3~" (mapped to Remove by default). Control_h is a synonym. Tab 0x0009 Moves one tabwidth to the right. Control_i is a synonym. Linefeed 0x000a Starts a new line. Control_j is a synonym. Control_k through z 0x000b through 0x001a Escape 0x001b Control_backslash 0x001c Control_bracketright 0x001d Control_asciicircum 0x001e Control_underscore 0x001f NUTS!!! How do I get a simple line feed!??!!? Kwrite -> Menu -> Settings -> configure shortcuts Insert new smartline Shift+Return or Shift+Enter >> ONLY Shift+Return works!!!!! ********* But use --clearmodifiers !!!! Kwrite : Delete next character or selected ctrl+a select all ctrl+c copy selected ctrl+f search (find) ctrl+g+n goto line n ctrl+i indent line ctrl+j join lines ctrl+k kill (delete) several lines? ctrl+n new window ctrl+o open file ctrl+p+filename print to file ctrl+q quit ctrl+r search & replace ctrl+t transpose letter before&after cursor ctrl+u captalize next letter ctrl+v paste ctrl+w close file without save and open new (?) ctrl+x cut selected ctrl+z ?undo? *************** #] 11Sep2016 kwrite command line options https://docs.kde.org/trunk5/en/applications/katepart/command-line-options.html no details?!! - not many options! >> WRONG!!! kwrite --help-all : Qt options don't work with LMDE --font --background --title --config <filename> Use alternative configuration file --geometry <geometry> of main widget (usually W*H+Xpos+yPos) ******************** #] 01Jun2016 Kwrite - problematic "grey character" mode : This is VI editor mode, invoked by Meta-Ctrl-V Retype to exit VI mode enddoc