Why my vim split window line so ugly? - vim

When I split window, an ugly split line appears. I wonder why there is grey spaces between the '|' separator. I want only the '|'.
By the way, I use mac iterm2. I wonder some vim plugins cause this, but not sure.

In most fonts, the default pipe symbol (|) doesn't run the whole height of the display cell. In your screenshot, the spacing between lines is particularly pronounced.
You may either influence this in your terminal emulator settings (by changing fonts or reducing the line spacing), or in Vim by configuring a different character for the vertical separator:
set fillchars-=vert:\| | set fillchars+=vert:\
This replaces the default with a space (note the trailing space!) You can also try a Unicode character (should your terminal be able to display this); there are some vertical bars that run the whole length.

Related

how to remove spaces between lines ENTIRELY on terminal?

I'm writing a CLI 3d rendering program, and in order for it to display correctly, I want it not to have spaces between lines at all. is there a terminal that can change its line spacing to zero or any other solution?

Missing glyph character and garbage replace leading 5 characters of file name when written to disk

FreeBSD-12.1p5
vim-8.2
I have a zfs clone of an iocage thick jail that I am using for testing. When I open a file with vim in character mode and I use :wq to save my changes then I see these characters in place of those expected (/usr/:)
[>4;mlocal/etc/smb4.conf" 24L, 672C written
There is a missing glyph character (a single square box one character in width and height with hex decimal characters [0..F] inside) that is positioned immediately before the [ character in the sample given above. This character disappears when this message is displayed.
This does not happen if I use :w by itself, only when I use :wq. It appears that vim actually displays the correct string when I use :wq but that the first few characters are immediately overwritten.
This is not a problem with the file name or path, only with what vim displays when saving.
I have not encountered this before. Why are these characters messed up when vim displays the name of the file it is saving?
I have verified all packages are intact and all dependencies installed. I have also reinstalled vim. The problem remains.
Should be resolved by adding these lines to your .vimrc:
set t_TI=
set t_TE=

How to create dashed lines in terminal for indentation

I'm using vim in Mac terminal. I want to have dashed lines in front of each line to indicate the tabs and indentations. Is there a way to configure this in .vimrc? The editor shown in the picture is sharelatex.
Many thanks!
Set listchars to that symbol (you might want one of these: ¦⁞⋮┆┊┋┇︙⸽) and a space:
set listchars=tab:¦\
That is "tab", followed by a colon, your desired character, a backslash and a space.
In addition, to see the effect, you have to set the list option:
set list
listchars can be used to set more characters to show in special places, e.g. eol to show a character at the end of a line, or trail to see trailing spaces. To set multiple ones, seperate them by commas:
set listchars=tab:¦\ ,trail:·

how to get the digraph key or unicode from a special character

I am configuring tmux & powerline. I would like to change the default separators in tmux status line. I managed to figure out where to do it, however I could not get the special character that I want.
I want to type, in Vim, a left/right pointing triangle that spans the whole line-height, but the only thing I could find is a small triangle (unicode : 25B6,25BA,25C0,25C4...)
There is a big right pointing triangle already in a powerline configuration file, which I could copy and paste, but I want to know its unicode and want a left one. Is there a way to get the unicode from the symbol in Vim or anywhere else?
You can get the codepoint value of a character in Vim by positioning the cursor on the character in question and typing either ga or :ascii.
You can either use ga in command mode or :ascii on the command line (even though it says ascii, it shows information for general encodings)
You may add a permanent preview of current character in your status line (see :h statusline), eg.:
:let &statusline = &statusline . "\ [%03b\ 0x%B]"

Setting linespace in gVim

When setting linespace to some value greater than zero, the characters in the line are vertically top-aligned. I want the characters to be vertically centered (in the middle of the line).
The 'linespace' setting allows to slightly adapt the visual spacing of lines to the used font (so that text is neither too dense nor too much apart). It is not meant to be used for the "widely-spaced lines" effect shown in your screenshot.
If you really need something like that, you'd need to patch Vim's source code, or use another editor, or what I would attempt is modifying the used font to include more vertical padding in all glyphs.

Resources