Irssi - how to set text color permanently or in config? - irc

Sorry for lame question, but I can't find answer anywhere. I'm using Irssi (on Linux via Putty) and when I want to write something in color, I always input ctrl+c and color number before text. Every each time. Yeah, it's not efficient, so I started searching place, where I could put that color prefix in config file. But I didn't found any placeholder in config file or information on internet where to put it. So, does anybody knows how can I set permanently color for text I'm typing?

Related

VS Code terminal colors are screwy

I'm using the default theme. The terminal's colors are impossible to read, make no sense, and are inconsistent. I've tried switching themes but they're terrible in all the themes.
Here's what it looks like in the default. Are you able to read my yellow input against the gray background? And why isn't there a black background everywhere?
I realize there are settings that can manually set the fore/background colors. But I'm thinking something is broken for me because of how screwy the terminal behaves.
For example, here's what I see when I first start the terminal, type a bunch of stuff, backspace to delete half of it, resize the terminal pane, then delete some more. Notice how some of the deleted spaces have yellow and some have gray. Also notice how the area where the CWD would be shown is all black.
Here are the contents of my settings.json file:
{
"window.zoomLevel": 0,
"git.enableSmartCommit": true,
"workbench.startupEditor": "newUntitledFile"
}
What needs fixing, and how?
Edit:
Just to satisfy your curiosity, I added this to my settings.json file:
"workbench.colorCustomizations": {
"terminal.foreground": "#ffffff",
"terminal.background": "#000000"
}
No joy:
There might be something wrong in your console settings, you might want to remove the content of HKCU\Console in your registry. Save it before, obviously, but there shouldn't be any side effect: it'll just be recreated with the default settings.
Okay, so here's a list of all possible settings that you could tweak in your terminal window colorscheme: (source)
"workbench.colorCustomizations": {
"terminal.background":"#1D2021",
"terminal.foreground":"#A89984",
"terminalCursor.background":"#A89984",
"terminalCursor.foreground":"#A89984",
"terminal.ansiBlack":"#1D2021",
"terminal.ansiBlue":"#0D6678",
"terminal.ansiBrightBlack":"#665C54",
"terminal.ansiBrightBlue":"#0D6678",
"terminal.ansiBrightCyan":"#8BA59B",
"terminal.ansiBrightGreen":"#95C085",
"terminal.ansiBrightMagenta":"#8F4673",
"terminal.ansiBrightRed":"#FB543F",
"terminal.ansiBrightWhite":"#FDF4C1",
"terminal.ansiBrightYellow":"#FAC03B",
"terminal.ansiCyan":"#8BA59B",
"terminal.ansiGreen":"#95C085",
"terminal.ansiMagenta":"#8F4673",
"terminal.ansiRed":"#FB543F",
"terminal.ansiWhite":"#A89984",
"terminal.ansiYellow":"#FAC03B"
}
Now for me, the colors of folder names was too bright over an even brighter background color that highlighted them and I couldn't read squat (that's because of my VSCode theme called NightOwl -- :P Sarah) so I thought (wrongly) to change terminal.background and terminal.foreground properties but that refer to the entire rendered window of the terminal.
Because these properties are actually named after Ansi Escape Codes, what I was actually looking for were these properties: terminal.ansiBlue for folder name text color and terminal.ansiGreen for folder name background highlight color.
As soon as I tweaked those, my terminal was good to go.
The way to do it is to just set all these settings and start removing or changing them to see which is which for your preference. K Thx Bye
Also beware that terminal.ansiGreen is used by git diff as a color to show additions.
On March 8th 2022 the default value for the integrated terminal "minimum contrast ratio" was updated from 1 (no effect) to 4.5 (minimal effect). Depending on your color settings and what is being displayed, this can cause your integrated terminal foreground colors to be wrong.
To disable this feature, override the default in your own settings.json file:
"terminal.integrated.minimumContrastRatio": 1
There are two solutions. Xavier's solution works, and mklement0's comment was also correct.
Solution #1
Do what Xavier said (and upvote his answer).
But, if you don't want to mess up registry settings (or if, like me, you have lots of registry settings nestled under the HKCU\Console root), then...
Solution #2
Get Windows 10 build number 18309 (or newer)
Join the Windows Insider Program
Make sure you're on a "ring" that includes a new-enough build. For me at this moment that meant joining the "fast" ring
Wait forever for updates to finish installing
Add "terminal.integrated.windowsEnableConpty": true to your settings.json
Restart terminals
Upvote mklement0's comment
...
Profit!
I am new to VS Code (and I'm trying to better my PowerShell skills) and have/had this same problem. Deleting all the Reg keys cited above related to colors seemed to fix it, but I believe the root problem is that VS Code seems to be trying to honor the color scheme set up outside the VS Code Terminal itself, from the shell. Really annoying and I'm not sure how to separate the two.
I had setup a blue background/yellow font scheme in PS prior to installing VS Code. That was the same color scheme the terminal in VS Code was displaying directly around the text.

Find .emacs file on Windows bash

I would like to change few things in my .emacs configuration file. The problem is that I cannot find it.
Does anyone have any idea where it could be on Windows bash?
Is it even called .emacs on windows Bash? Do I have to create it myself?
Thanks in advance
After some researches, here is what I understood :
As Varro said in the commnent, .emacs file will not be created by default, since it will only contain cuztomizations you want. So you have to create it yourself. By the way, apparently it is a good practice to call it init.el. To find where to create it, type env in the terminal and look for the HOME variable. This value will show you the path considered as the home directory, where emacs created .emacs.d/ folder. You must create init.el file in this folder, and emacs will load it automatically.
This is not related to the question but it might help you :
I needed this file in order to change the cursor on emacs. At first, I thought that emacs was not loading the file correctly, because the cursor was not changing. I made some tests, and I was able to change background color, so it was not the problem. But, in fact, you can NOT change the cursor, since it is defined by the terminal itself, not emacs.

Is it possible to move the command prompt to a certain position on the screen?

As the title says, is it possible? I've searched all over the internet in order to find it, but whatever variation of my search query I come up with, I end up getting results which are about the move command which is used to move files/folders, instead of the actual prompt.
When doing
mode /?
The only result I can remotely relate to the appearance of the prompt is the Display mode,
(mode con:cols=x lines=y)
As I've said, I can't find any documentation about this & I'm extremely curious, can it be done? I know it can be done in Visual Studio to set a position where it should show it's dialog, so I'm presuming it can be done...
PS: If it can be done, what value should I use to have it perfectly centered when using these size settings?
mode con:cols=50 lines=15
Thank you in advance.
Yorrick
You cannot do so directly from a batch file. However, you can write a small program to do that. The relevant Windows API function is MoveWindow.

Emacs - cursor misalignment, and disappearing text

I've been using a copy of emacs (in a Debian VM I ssh to with putty) at work for a couple of months now, and up until now everything has been working brilliantly... but this morning I'm trying to edit a file in shell-script-mode, and am seeing some weird behavior with text around the cursor.
Basically, when I type the following ( [ ] represents my cursor):
export DATABASE[]
After I've typed the first few characters of the variable name the export statement disappears and the variable name aligns to the left margin, and all I end up seeing is (with the cursor out in the wilderness):
DATABASE []
If I then hit CTRL-L, the screen refreshes, and I see the text as it should be displayed... until I start typing, and then the buffer start acting strangly again (characters disappearing, moving, cursor ending up in the wrong place, etc)
I've not, to my knowledge, added anything to my .emacs file since this last worked as I expect it to, so I'm at a loss as to what could be happening here. It doesn't seem specific to sh-mode either - I've tested a few other file types and observed similar strange behavior. Are there any emacs afficianados out there who might be able to point me in the right direction to figure out what's wrong here?
Thanks in advance
I'm not sure what to suggest, but this sounds awfully like an issue with the terminal: I suspect that Emacs redraws the current line whenever it changes and I guess it tries to do so incrementally. If something's got out of whack with your terminal, then it seems quite plausible that the current word would get written at the start of the line (all Emacs sent) and your cursor would get abandoned "out in the wilderness" :-)
Obviously, this is a new change. Since it doesn't sound like the sort of issue that would be caused by Elisp configurations in your .emacs, you should check whether you've recently upgraded one of
PuTTY
Emacs version
SSH version (unlikely...)
Then maybe the relevant tool will have something in the changelog (which maybe you can disable via a config?)
One thing you could check: you say this isn't just SH-mode. Is it "any mode with syntax highlighting"? Maybe Emacs just sends over the wire the text with the current colour?
I had a similar problem of disappearing text using PuTTY / Emacs / Remote AWS Ubuntu when running ABCL LISP in a shell window.
The solution was: I had changed my foreground and background font colors (essentially reversed) in PuTTY but had neglected to change the bold fonts, so they were disappearing into the background.

Why is IntelliJ using autocomplete in a plain text file and how do I turn it off?

In trying to edit a 2300+ line .ini file Intellij is really slow, as in 1-2 seconds after keystroke before the letter appears. I see autocomplete popping up and I assume that's why its slow, but its a plain text file, why is it even giving me autocomplete?
And ok, its only registered as plain text because I haven't figured out how to get it to support hierarchical config files nicely, and autocomplete could be useful here, but it shouldn't be that slow.
Have you tried clicking the police icon in the right lower corner? Setting the "Highlighting Level" to None it speeds up most things when working with large files of any kind.