I'm using VIM in red hat 5, with the black background and green letters. However, I don't like the color schema for strings ("") nor reserved C++ key variables (int for example it is in dark green). Could someone please give me some suggestions how could I change those default colors?
I know, for example, to change the comment collor I do
hl Comment ctermfg=yellow
Type :hi, then hit Enter. A list of highlighting definition will show.
The C++ groups start with c.
int is a cType. Try:
:hi cType ctermfg=yellow
You can put your custom highlighting commands into vimrc(after colorscheme name and syntax on).
If you'd want to customize your current colorscheme, check out this Vivify. Adjust the color editor to your specific language and then save the colorscheme file into your vimfiles.
Related
Main question
I would like to add powerline characters at the start and at the end of the selected completion, like this:
Started the completion menu by inserting c and pressing the TAB key.
Moved right in the completion menu by pressing the right arrow key.
Moved down in the completion menu by pressing the down arrow key.
Is there any way to make zsh look/behave like in the pictures?
Note
Added powerline triangle + blank character at the beginning and blank character + powerline triangle at the end should somehow be accounted when columns are created to keep the alignment correct.
Bonus
Add 2 blanks at the beginning of every completion in the list, so that when the completion is selected it doesn't look like the text was moved to the right.
( This issue can be seen by comparing the completion with and without the selection. )
Alternative question
In case that previously explained behavior is impossible to get without changing the zsh source code, is it at least possible to add powerline triangle only at the end of the selected completion?
My unsuccessful attempts
I have tried using the lc, rc, and ec variables in the list-colors style but that didn't help:
Completion list was badly aligned and it created all kinds of visual problems.
Symbols were inserted in all elements of the completion list, not just the selected one.
I have also tried using the ma variable, but I couldn't properly insert a character at the beginning:
The variable expects only a number that represents a color and it is probably wrapped in some escape sequences, so the output did not look as expected.
This works for me.
zstyle ":completion:*:default" list-colors ${(s.:.)LS_COLORS} "ma=48;5;153;1"
Uses my LS_COLORS and then ma sets the background of my selection to bold and color 153 from https://jonasjacek.github.io/colors/.
Found from https://www.zsh.org/mla/users/2010/msg00811.html
How can I write single-storey ɑ (The first letter in English) in Gnuplot graph title?
I am always get "a" (double-story) in Gnuplot plot title?
Suggesting to use the Greek letter alpha "ɑ" is not a good solution.
The correct answer is that the shape of the "a" glyph is dependent on the font, not the encoding. Unicode codepoints only specify what character is to be drawn, not what shape it has.
It depends on the terminal you want to use, but probably the most straightforward solution would be to use proper encoding and paste the required character directly:
set encoding utf8
set term wxt font "Times,12"
set title 'ɑ'
plot x
EDIT:
the special character ɑ can be also specified (for example in the interactive Gnuplot console) in terms of its UTF8 representation (two octal numbers) as:
set title '\311\221'
I only use lubunutu and do not use ubunutu.
In lubuntu CharacterMap utility exists and it can be used from accessory category.
On ubuntu, the same tool exists.
https://help.ubuntu.com/community/CharacterMap
I could copy and paste Lattin Small Letter alpha "ɑ" to terminal.
(Note that is not literally single-storey version of a).
As Ethan wrote use of Lattin Small Letter alpha "ɑ" is not correct in literal sense but I think this is possible workaround.
Correct solution is use font with single-storey a like Futura font.
Free Futura font seem to be available from
http://www.webpagepublicity.com/free-fonts-f4.html#Free%20Fonts
(I am new with this) I see these weird black text-boxes and, as far as I know, they are ascii symbols, but I don't know how to see it in a "normal" view, if possible. Thanks in advance!
It was a bit hard to follow your link, I included the screenshot in your question. The ESC indicates a non-printable character. In this case it is the Escape character (ASCII 27), which from the screen shot appears to be part of escape sequences to change text color.
Unfortunately, Notepad++ does not have the means to render them as intended. One option is that you select one and find/replace with nothing. If you want to get rid of not only the ESC but also its associated "parameters" you can use this regular expression to find and replace them
\x1b[^m]*m
When I open Fontforge to create a new font, it only lists a limited set of characters / glyphs. In the font I create, I need some glyphs that are missing from that default set, e.g. "single right-pointing angle quotation mark" (U+203A) and "single left-pointing angle quotation mark" (U+2039).
How can I add "slots" for these glyphs, or rather:
What is the proper way to add glyphs that are defined in the Unicode table?
Ah, well, just go to Encoding > Add encoding slot, then there will be a dialog to set how many slot(s) you want to add.
Ah, well, just go to Encoding > Reencode and choose an encoding that contains the relevant slots.
I have implemented a QColor dialog box which opens on certain condition. To get the selected color after final selection I use the method selectedColor() which returns the value in QColor. When I print that value, it's like this:
<PyQt4.QtGui.QColor object at 0x01DD7880>
I want color value in hex value like this: #DFDFDF (for grey). If it's not hex, correct me.
Is there any function to convert that?
Any suggestions welcome.
You need to print selectedColor().name() to print the actual color value in hex. See the QColor Documentation
To amplify a bit, maybe confuse, maybe clarify... (For Python newbies)
color = QColorDialog.getColor(pWidget.textBackgroundColor(), pWidget, 'Get Text Highlighting Color')
The above will return a QColor using the QColorDialog, for those of us who don't want to be stuck with named colors like 'Blue', 'red', green etc.
fg = color.name()
In this case I am converting the QColor to a string HEX for use in a style sheet.
Widget.setStyleSheet('background-color: ' + bg + ';color: ' + fg)
This is how such a converted value can be used in a style sheet.
Note how to concatenate more than one stylesheet attribute. Also, side note, sometimes changing one attribute cancels previous changes to others.