Questions tagged [unicode]

Question about using Unicode character set, how to insert them, how to display them and general use of the UTF8 encoding.

Filter by
Sorted by
Tagged with
1
vote
1answer
19 views

How to conceal zerowidth special characters like <U200C>

That character is used so much in Persian writing. And it makes the text difficult to read. I tried to make my terminal display it correctly but I couldn't I was wondering maybe I could use vim syntax ...
0
votes
1answer
53 views

On Windows some symbols are not displayed

I use 'DejaVu Sans Mono' as gui font both on Windows (7 and 10) and Linux. However, on Windows some characters are not displayed correctly (while many other Unicode characters are displayed normally). ...
0
votes
1answer
24 views

Why does backslash-escaping a CJK character cause a very-magic regex match to fail?

My understanding of very-magic regexes is that you can escape any character outside [A-Za-z0-9_] with a backslash to make it match literally. However, I don't see that behaviour with CJK characters. ...
2
votes
1answer
134 views

How can I search for Unicode characters by hex code in very magic regexes in vimscript?

I am working on UTF-8 support for my editorconfig-core vimscript plugin. I have hit a strange snag. This is in official GVim 7.4 Win32. I would like to get this working on 7.4, rather than ...
0
votes
1answer
55 views

Can you match unicode blocks by name in vim?

\p{Cyrillic} Works in my normal regular expressions. When trying to match in Vim or gvim however, I can not seem to get it to work. I tried something like this: \p\{Cyrillic} Is it not supported, ...
0
votes
1answer
27 views

Detect when at last character when character is multibyte

I have the following command for \ that jumps to the last character unless the cursor is under the last character, in which case it jumps to the start of the line. nnoremap <silent> <expr>...
1
vote
0answers
40 views

Can vim handle unicode line and paragraph separators?

Line endings differ between platforms; LF on unix, CRLF on windows, CR on Mac OS Classic. Unicode introduced LS (Line separator, U+2028) and PS (Paragraph separator, U+2029), as unambiguous ...
3
votes
4answers
2k views

How to show illegal whitespace (such as unbreakable space) in source code?

I sometimes type (by accident) shift-space, inserting unbreakable space into code. With c++, I get this: error: stray ‘\302’ in program error: stray ‘\240’ in program while in other formats (like ...
2
votes
1answer
111 views

How to deal with accented latin characters on neovim

I'm trying to find out how to configure neovim in order to edit texts with accented latin characters. I usually set ambiwidth to double so Jananese symbols are displayed properly, but then neovim ...
0
votes
1answer
45 views

How to express an unicode code points set in match command?

My test.txt for this example.   unicode 3000 (whitespace in Chinese mark) ! unicode ff01 ^ unicode ff3e ~ unicode ff5e The command can match whitespace in Chinese mark(u3000). hi! ...
0
votes
1answer
46 views

How to input full width spacewhite in vim?

In cjk characters set, full width space has the unicode value is U+3000, the english space unicode (half width space) value is U+0020. How to input full width space in Vim?
4
votes
0answers
416 views

Unreadable display of Tamil characters in Vim

gVim seems to have problems displaying text in Tamil (and possibly other Indic languages), even when the font supports it. For eg., here's some text in Emacs and the same text in gVim (both under ...
1
vote
1answer
542 views

Why some information can't been shown at status bar with iTerm2?

Installed vim with SpaceVim on macOS. When ran vim in the iTerm2 terminal, the information can't been shown rightly at status bar. Much of them been shown as ?. Why?
3
votes
1answer
850 views

move forward by a certain number of chars or bytes?

Sometimes I need to move to a particular byte offset or move to the nth unicode rune in a file (utf-8). Does vim expose a way to move to an absolute byte/char offset or to move the cursor forward a ...
2
votes
1answer
3k views

What does CTRL-K do in insertion mode?

When I press ^K in my vim while I'm in insertion mode a '?' appears and then if I press a and then another character some strange characters appear the following are a few of the characters I could ...
2
votes
1answer
456 views

Detect if Vim can show utf8 characters

I have the line set listchars=eol:↵,tab:▸-,trail:¤,nbsp:¤ in my .vimrc which I use on different machines. If the LC_CTYPE is not set to an UTF-8 map, I get the message E474: Invalid argument: ...
2
votes
1answer
151 views

How to interpret ASCII codes returned by “ga” command?

I'm cleaning data imported from Excel to Access, and ran across funny quotes that I'm having trouble getting unambiguous ASCII codes for. They are the hooked single quotes ‘ and ’. Vim's ga command ...
0
votes
1answer
45 views

Triggering automatic replacements of certain strings

I am using the Vim version 8.0 editor, mostly via GVim. I would like to be able to type unicode/greek characters like lambda, mu, alpha inside my Haskell scripts. There is a vim plugin called latex-...
1
vote
0answers
77 views

Unicode character does not show when entered using <C-q> with cp932

I am trying to get the unicode character '①' inserted in vim with the insert mode command but failed. <CTRL-Q>u2460 --> result:$` So I copied the unicode to vim and checked the hex value ...
2
votes
2answers
478 views

Printing unicode chars?

Is there a solution to printing unicode characters from gvim? See this: Results in this print result (Using a Linux setup and Vim 8.0.)
20
votes
4answers
2k views

How do I keep accidentally creating a no break space before opening curly brace?

I am conscious this is a strange question, and this might not even be the right forum to post it. But this has been a problem for several years. From time to time, let's say once a month, when I ...
0
votes
1answer
216 views

How to replace a character with another character by character code

I want to write a command that replaces all of a line's spaces with figure spaces, and I want the code to not use those literal characters so it is more legible than :s/ / /g So, naturally, I try ...
5
votes
3answers
1k views

How can I get the character at the cursor position in a multibyte aware manner?

Consider the following line: € € This file is encoded in UTF-8 and between the two Euro marks is a Tab character (the Stack Exchange software expands this to spaces). The byte value is: e2 82 ac ...
2
votes
1answer
151 views

Some umlauts and extended Latin characters are shown as fullwidth

In Vim, I find each of ü and ß takes up fullwidth, i.e. twice as fat as ASCII characters. I am writing some German-learning notes, and find this to be very confusing, since I have been mistaken that ...
3
votes
1answer
247 views

Displaying terms as single character unicode symbols in VIM?

Does VIM have a way to show symbols as characters? So lambda can be displayed as λ (yet keep its underlying ascii text) for example. Something like emacs pretty-symbols
5
votes
1answer
2k views

(How) can I convert full-width characters to half-width ones?

I need to transform the full-width characters(NBA) in the following sentence to half-width ones. NBA中曾有“怒吼天尊”之称的已退役球员是谁? 拉希德·华莱士 H5N2疫苗可对抗H5禽流感病毒 I know I can realize it in Python using ...
1
vote
1answer
74 views

Replace base character, retaining combining characters

I have a vocalized Hebrew text; most letters are followed by one or more combining characters. I would like to replace some of the base characters, leaving the combining characters intact. It seems ...
0
votes
2answers
549 views

Use visual mode to convert text to unicode bold formats?

How can I make it so when in visual mode, pressing b will toggle highlighted text to its bold unicode counterpart? This is what I mean by its Unicode counterpart: http://qaz.wtf/u/convert.cgi?text=...
0
votes
1answer
75 views

Can I specify the encoding of a sourced file?

When vim sources a file (vimrc, or :so ...), how does it know in what encoding the file was written? Can I specify the encoding with which it should source the file?
1
vote
0answers
113 views

Is Vim's filename completion broken in Windows when using uppercase u umlaute (Ü)?

In a vim buffer, I want to insert the path to a file named blablabla\barbar-Überbar\bazbazbaz.txt which exists under the current working directory - and I am running gvim in a MS-Windows environment. ...
0
votes
1answer
558 views

How to enter and display German Umlauts on a Windows 10 machine with Russian locale?

I want to be able to write German texts using my Vim 7.4 installed on a Windows 10 machine with Russian locale and German keyboard layout. My .vimrc file looks like this: set encoding=utf-8 set ...
4
votes
2answers
2k views

Can I write Japanese (SKK) text in Vim?

I need to be break it to you guys, I use emacs. But just for one little thing. Recently I've been working with a good deal of Japanese people (the company is Japanese) and I got some idea of the ...
4
votes
1answer
141 views

Latin Capital Letter Thorn

I want to insert the unicode character Thorn Þ into my document. http://www.fileformat.info/info/unicode/char/00de/index.htm The character seems to be inserted when I type i<C-v>u00DE<esc&...
0
votes
1answer
552 views

Getting Error while opening files through vim

I am trying to use unicode characters in vim. Since msdos prompt didnt support unicode, I downloaded cygwin. I added some commands in .vimrc through cygwin. Basic commands like setting encoding, ...
3
votes
1answer
79 views

Why using external “tr” command on lines with Farsi numbers does not work correctly?

I want to use external tr command on a line in Vim. When the source or replace pattern includes Farsi numbers the result is unpredictable. Executing :.!tr 1 ۱ on 1 results: Û Executing :.!tr ۱ 1 on ...
5
votes
1answer
1k views

Unicode characters available in shell but not within Vim

I'm using Vim on a machine through SSH with PuTTY. In my shell (bash), I can copy/paste unicode characters, like ‘ ¿ ’ using Shift + Insert and it works as expected. In Vim, within the same shell ...
1
vote
0answers
54 views

Open file with Esperanto characters `Ĝ` and `ĝ` in gVim

I have an Autohotkey script to write Esperanto characters. It has the form AppsKey & G:: if GetKeyState("Shift", "P") send Ĝ else send ĝ return Notepad has no problem with ...
13
votes
1answer
1k views

Can't map German 'umlaut' keys in .vimrc

I'm trying to find a way to map German umlaut keys (Ä,ä,Ö,ö,Ü,ü). A simple shortcut like this won't work: inoremap <c-ö> <Esc> Nothing happens when I hit ctrl+ö. Does anyone know a ...
10
votes
1answer
2k views

Not able to type Unicode with Gvim and VIM on Windows 7

I want to type in different languages using (g)Vim. But when I switch to another language using language bar (Devanagari or Hindi characters), and type anything, (g)vim displays ??? ??. What I tried:...
4
votes
1answer
1k views

Why do symbols look ugly in gvim?

I'm on Windows 7 with Vim 7.4, and Unicode symbols with the Hack font look awful. Am I missing a setting somewhere? Is there a way to improve this? For reference, this is gvim: and this is atom: I'...
4
votes
3answers
362 views

How can a character be inserted during an edit session by its Unicode numeric value?

I'm trying to set up a plugin to enable indentation guides, following an answer to this question. The plugin is Yggdroot/indentLine. It has instructions to set up a custom glyph to be shown instead of ...
9
votes
2answers
470 views

Vim does not take umlauts as word characters

When I write a German text containing something like abücd for instance and to a dw in front, it will only delete the ab since it does not interpret ü as a word character. When I edit ...
4
votes
2answers
508 views

Is there a version of “strpart” that is aware of characters, rather than bytes

According to :help strpart(), the parameters start and len are bytes, not characters, so that returns a string of 2 characters, starting with the letter Beth. What I'd like to have is a function, ...
1
vote
1answer
317 views

Using digraph mode to insert special key codes

I've always thought about digraph mode as a way to quickly insert unicode special or unusual chars into the buffer without copy-pasting things around or changing keyboard layout system-wide. So to ...
1
vote
0answers
308 views

Editing files containing Devanagari script

Editing files containing Devanagari script (or other Indian scripts) in vim doesn't work out of the box. I have not found a satisfactory solution for it yet and would like to hear if anybody else has.
17
votes
1answer
4k views

Can I search for a Unicode combining character in Vim?

I have a file with the character ã (lowercase a + combining tilde). Encoding and fileencoding are both utf-8. ga shows <a> 97, hex 61, octal 141 <~> 771, Hex 0303, Octal 1403 (but ...
4
votes
1answer
41 views

How to make many definitions available as some kind of mode

I've written a vim script that inserts unicode mathematical notation into what I'm editing. It's basically a few hundred lines of code that look like :map! \bbq ℚ. Sometimes I want to enable all of ...
3
votes
1answer
201 views

How to use a UTF8 character as part of the iskeyword setting?

I would like to be able to add the ’ character to iskeyword setting. I'm currently using this: " Count ’ as a part of words like I’m and you’re¬ au FileType plaintex,context,tex,latex,mail,markdown,...
1
vote
1answer
245 views

Macvim - CJK-specific font settings?

Currently in my MacVim, the English font (Source Code Pro Light) is fine, but the Chinese font is being rendered in a very ugly manner. Is there any way to specify what font to use/fontsize for CJK ...
3
votes
2answers
117 views

Is there something similar to g8 but shows the values according to the file encoding

I am looking for a g8 equivalent that prints the hex values of the character under the cursor according to the file encoding of the file loaded in a buffer rather than assuming it's utf-8. Is there ...