LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs > Michael Uplawski
User Name
Password

Notices


Wisdom caught up with me, though I am running fast. Random discoveries and what's left of common sense
Old

[vim] avoid accidental maro recording (@q)

Posted 11-06-2021 at 06:02 AM by Michael Uplawski
Updated 11-13-2021 at 12:42 AM by Michael Uplawski

in ~/.vimrc I note
Code:
nnoremap Q q
nnoremap q <Nop>
and no longer end up in macro-recording mode, when I forget the colon before 'q'.

Copied & pasted from Stack Overflow (see there).
Senior Member
Views 164 Comments 0 Michael Uplawski is offline
Old

Unbuffered shell-input

Posted 10-16-2021 at 01:46 AM by Michael Uplawski
Updated 11-13-2021 at 12:43 AM by Michael Uplawski (Wrong title, much misunderstanding and ill-chosen search criteria.)

There are solutions on the Web.

Having read some of these, I prefer a Ruby-Oneliner “readNB” which returns the 1 character that the user has had a chance to enter on the keyboard, before readNB returns.

---------------------- In the meantime -------------------------
GazL has – in the very first comment on this blog, below – presented a better solution with the shell built-in command read: read accepts some parameters and a call like
Code:
read -r -s -N1 [VARIABLE]
...
Senior Member
Views 2133 Comments 4 Michael Uplawski is offline
Old

False statement

Posted 03-23-2021 at 12:57 AM by Michael Uplawski
Updated 12-06-2021 at 07:14 AM by Michael Uplawski

I just modified my comment to one of my own blog-entries but now feel that it is itself worth an entry.

If it sticks it may be sticky. Avoid.
This comment contained a false statement. I have to leave it here and mark it as false, because it is frequently repeated in a pseudo-scientific context, by right-wing political activists, by marketing-experts, by so-called “coaches”.

The story is that, around 1955, an American scientific formulated a hypothesis which was
...
Senior Member
Views 959 Comments 4 Michael Uplawski is offline
Old

Found the old replace command

Posted 08-18-2018 at 03:48 AM by Michael Uplawski
Updated 11-13-2021 at 12:45 AM by Michael Uplawski (Category and missing sarcasm added. Orthography.)

... funny.

Discover the Norman religion:

Code:
me@this_PC:~$ echo "We can't do nothing, face it!" | replace "can't" "do not want to"
We do not want to do nothing, face it!
But the command was not available anymore. Dummy me. I have written it myself a while ago!

The script:
Code:
#!/usr/bin/env ruby
# encoding UTF-8
#
# This utility reads text from STDIN (via a pipe) and replaces
...
Senior Member
Views 445 Comments 7 Michael Uplawski is offline

  



All times are GMT -5. The time now is 09:35 PM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration