Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
0
votes
1
answers
26
views
Where is Kwrite's edit menu option "toggle comment"?
I use Kwrite for looking at code. Sometimes I want to test the result of removing a line and Kwrite had a very useful menu option : "Toggle comment" (before there were 2 lines in that menu, "Comment" and 'Uncomment"). As I don't do that every day and as the syntax differs from language to language (...
I use Kwrite for looking at code. Sometimes I want to test the result of removing a line and Kwrite had a very useful menu option : "Toggle comment" (before there were 2 lines in that menu, "Comment" and 'Uncomment"). As I don't do that every day and as the syntax differs from language to language (and sometimes within the same language if you consider CSS to be a part of HTML), I can never remember how to do it.
I've just noticed that this menu option is missing from my current version of Kwrite (on an up-to-date Lubuntu).
How can I get it back? Should I try to install an older version of Kwrite?
Alain Reve
(123 rep)
Feb 10, 2025, 08:08 PM
• Last activity: Feb 10, 2025, 11:05 PM
0
votes
1
answers
152
views
How to set keyboard shortcut to insert a timestamp (time & date) in KWrite?
KWrite is included as the default text editor in several popular Linux distros (such as Fedora KDE). Inserting a timestamp is a basic feature of text editors. How can one set a keyboard shortcut to insert a timestamp (time and date) in KWrite? It seems like it should be obvious, but I've gone throug...
KWrite is included as the default text editor in several popular Linux distros (such as Fedora KDE).
Inserting a timestamp is a basic feature of text editors.
How can one set a keyboard shortcut to insert a timestamp (time and date) in KWrite?
It seems like it should be obvious, but I've gone through all the settings, read the small amount of documentation that exists, performed numerous searches, and even asked AI chatbots. Nothing had a solution (except AI, of course, which offered multiple solutions that weren't possible, which was a big waste of time).
If I can have a choice of the formatting,
YYYY-MM-DD HH:MM
is preferred.
Amazon Dies In Darkness
(281 rep)
Sep 15, 2024, 10:22 PM
• Last activity: Sep 16, 2024, 12:58 PM
6
votes
3
answers
1795
views
How to switch text direction to rtl & ltr in kate and kwrite
How can I switch the text direction in kate and kwrite editors? I have English & Persian layouts and want to read the Persian text as right to left but I can't seem to be able to switch the text direction.
How can I switch the text direction in kate and kwrite editors?
I have English & Persian layouts and want to read the Persian text as right to left but I can't seem to be able to switch the text direction.
yaser
(61 rep)
May 7, 2013, 02:03 PM
• Last activity: May 6, 2023, 08:07 PM
1
votes
1
answers
216
views
Kate/Kwrite editor drag/drop/copy functionality gone
Somehow I've lost some functionality in Kate and Kwrite which I've employed frequently. In the past, as recently as a couple hours ago, I could select some text and drag-and-drop it elsewhere. If the CRTL key was held, it copied the selection rather than moving it. I have not changed any system sett...
Somehow I've lost some functionality in Kate and Kwrite which I've employed frequently.
In the past, as recently as a couple hours ago, I could select some text and drag-and-drop it elsewhere. If the CRTL key was held, it copied the selection rather than moving it.
I have not changed any system setting, nor any config options for Kate and/or Kwrite recently.
I am certain I managed to hit some key combination which turned off this feature, though I'm lost as to what that might have been.
As a test, just in case it was related to an update, I rolled both editors back to ver 18.12.3 to no effect. Including after a complete power-cycle to be sure memory was cleared.
Any ideas of how I managed to turn off this feature, and how to restore it?
Potentially pertinent system info:
Distro: openSUSE Leap 15.1
Kernel: 4.12.14-lp151.28.20-default
Plasmashell: 5.17.0
KDE Frameworks: 5.63.0
QT: 5.13.1
Kate: 19.08.2
Kwrite: 19.08.2
KatePart: 5.63.0
---
After some experiments I have found I can get the drag-drop-copy functionality by using a middle-drag. Perhaps knowing that will help to determine what was changed to remove the prior method.
I've not had the spare time to make any changes in my keyboard/desktop settings, intentionally anyway. I have reviewed the recent updates and nothing seems like it should have affected the libraries involved in either the desktop, or the editors.
While I have a work-around, I'd still prefer that I could use the CTRL drag to which I've become accustomed, and which still works in Dolphin
.
Chindraba
(1498 rep)
Oct 21, 2019, 04:23 AM
• Last activity: Jan 23, 2020, 02:35 PM
3
votes
1
answers
5217
views
Match one part of a regular expression in a Kwrite find-and-replace regex
Among the joys of KDE, Kwrite is surely noteworthy. Having regular expression support built in by default into text editor is probably one of the top 10 best ideas of all time. Since I often need to do a lot of finding and replacing, I have already begun to save a lot of time and hassle by using Kwr...
Among the joys of KDE, Kwrite is surely noteworthy. Having regular expression support built in by default into text editor is probably one of the top 10 best ideas of all time. Since I often need to do a lot of finding and replacing, I have already begun to save a lot of time and hassle by using Kwrite.
I suppose it's probably a lot like in
sed
, but anyway, I am matching stuff like
numbersdonot8
belongattheend0
ofwords2
using the simple regex [a-z][0-9]. How do I then tell kwrite to replace the text using the first part of the regex? Using [a-z] in the 'replace' box gives things like 'numbersdonot[a-z]' as a result. But I want,
numbersdonot
belongattheend
ofwords
ixtmixilix
(13520 rep)
Dec 29, 2011, 02:08 PM
• Last activity: Aug 20, 2018, 11:27 PM
2
votes
3
answers
11177
views
grep equivalent of the kwrite regex [A-Z][A-Z]+
So, it took me ages, but I finally learned to *think* in terms of regular expressions, thanks to using them in `kwrite`. But I still don't know how to translate that knowledge to `grep`. I love my `grep`, when I know what I'm doing with it, but the manual has always given me a headache. I'd like to...
So, it took me ages, but I finally learned to *think* in terms of regular expressions, thanks to using them in
kwrite
.
But I still don't know how to translate that knowledge to grep
. I love my grep
, when I know what I'm doing with it, but the manual has always given me a headache.
I'd like to match stuff like the following lines:
CAPITALSFOLLOWING anewline. CAPI TALSFOLL owing ANEW line.That is, lines that begin with two or more capital letters. But I can't figure out how. In
kwrite
, I would match these lines using:
\n[A-Z][A-Z]+
But grep
... hmm. I have a feeling like it's something like:
me@ROOROO:~/$ grep "^[A-Z]something" filename
but
me@ROOROO:~/$ grep "^[A-Z][A-Z]+" filename
doesn't work (returns an empty file). A google search for the term 'grep match one or more occurrence' lead me to believe that
me@ROOROO:~/$ grep "^[A-Z][A-Z]*" filename
was the right syntax. But, alas, that doesn't do the trick.
ixtmixilix
(13520 rep)
Feb 10, 2012, 05:41 PM
• Last activity: Aug 30, 2016, 12:53 PM
0
votes
1
answers
644
views
python regex equivalent of kwrite [ ]+ and [0-9]+
I've never been good at regular expressions. When ever I read about them, I sort of get a headache, get up from my desk, and forget what I'm doing. Attention difficulties. But when I finally started making use of them in `kwrite`, I got a lot more comfortable with them. To the extent that, I can not...
I've never been good at regular expressions. When ever I read about them, I sort of get a headache, get up from my desk, and forget what I'm doing. Attention difficulties.
But when I finally started making use of them in
kwrite
, I got a lot more comfortable with them. To the extent that, I can not now live without them.
Now, I need to sort of translate my knowledge of kwrite
to python.
The kwrite regex [ ]+
matches a single space, two spaces, and a quadzillion spaces.
How do I match spaces like that in a python regular expression?
Also, the kwrite regex [0-9]+
matches 0, 10, 123, and 103984875749409202. How do I match those in a python regular expression?
ixtmixilix
(13520 rep)
Jan 28, 2012, 02:12 PM
• Last activity: Jan 28, 2012, 02:28 PM
Showing page 1 of 7 total questions