Vim Tips Wiki
(Created page with "=== Feature request === It would be nice if the Unicode character category was included in the :UnicodeName routine. Just before added the UnicodeData.vim entry to the l...")
Tag: Source edit
 
No edit summary
Line 1: Line 1:
  +
{{ScriptComments|unicode: enhancements for using Unicode and digraphs}}
=== Feature request ===
 
   
 
==Feature request==
 
It would be nice if the Unicode character category was included in the :UnicodeName routine.
 
It would be nice if the Unicode character category was included in the :UnicodeName routine.
   
 
Just before added the UnicodeData.vim entry to the list:
 
Just before added the UnicodeData.vim entry to the list:
  +
<pre>
 
if val[2] !=? ''
 
let Name = Name. ' ('. val[2]. ')'
  +
endif
  +
</pre>
   
 
Why? Some programming languages, like C++, allow identifier characters based on the Unicode character category.
<nowiki>if val[2] !=? ''
 
   let Name = Name. ' ('. val[2]. ')'
 
endif</nowiki>
 
 
 
Why? Some programming languages, like C++, allow identifier characters based on the Unicode character category.
 
   
 
For those who need this a lot, here is a handy :UnicodeName mapping in one's .vimrc file:
 
For those who need this a lot, here is a handy :UnicodeName mapping in one's .vimrc file:
  +
<pre>
 
:nmap gu :UnicodeName<CR>
  +
</pre>
   
  +
==Comments==
<nowiki>:nmap gu :UnicodeName<CR></nowiki>
 

Revision as of 04:53, 2 May 2022

Use this page to discuss script 2822 unicode: enhancements for using Unicode and digraphs

  • Add constructive comments, bug reports, or discuss improvements (see the guideline).
  • Do not document the script here (the author should do that on vim.org).
  • This page may be out of date: check the script's vim.org page above, and its release notes.

Feature request

It would be nice if the Unicode character category was included in the :UnicodeName routine.

Just before added the UnicodeData.vim entry to the list:

if val[2] !=? ''
    let Name = Name. ' ('. val[2]. ')'
endif

Why? Some programming languages, like C++, allow identifier characters based on the Unicode character category.

For those who need this a lot, here is a handy :UnicodeName mapping in one's .vimrc file:

:nmap gu :UnicodeName<CR>

Comments