The question is (emphasis mine):
is there a function that takes l:letter
ascii code and transforms it to 'B'?
Since you want a function, the first thing to try is :help function<C-d>
which lists every documentation tag containing function
:
:function list-functions folding-functions
function() time-functions history-functions
functions mark-functions mapping-functions
function-key text-functions various-functions
function_key compl-function numbered-function
function-list local-function autoload-functions
:function-verbose spell-functions quickfix-functions
function-argument float-functions complete-functions
nb-functions style-functions anonymous-function
function-search-undo ft-ada-functions Dictionary-function
gui-functions string-functions completion-functions
arg-functions server-functions window-size-functions
var-functions cursor-functions interactive-functions
function-range-example window-functions command-line-functions
expr-function buffer-functions highlighting-functions
new-functions-5.2 system-functions curly-braces-function-names
date-functions syntax-functions python-Function
dict-functions xterm-function-keys :endfunction
file-functions vt100-function-keys :delfunction
user-functions bitwise-function
The most obvious candidate is function-list
, let's try it:
There are many functions. We will mention them here, grouped by what they are
used for. You can find an alphabetical list here: |functions|. Use CTRL-] on
the function name to jump to detailed help on it.
String manipulation: *string-functions*
nr2char() get a character by its ASCII value
char2nr() get ASCII value of a character
[...]
You may have noticed a pattern, here: functions are grouped by theme. This means that, if you need a function to filter a list you can go directly to :help list-functions
.
The Vim help pages are very useful; often times :help <keyword><C-d>
will get you a long way ;-)
:help string-functions
.string-functions
is not a global standard man page for every language, seriously.:help string-functions
as slightly obscure. Also, some scripting languages like python and perl usechr()
andord()
functions to convert to ascii/character. So searching with these terms still wouldn't show up thenr2char
andchar2nr
functions either. I think @romainl's comment should be posted as an answer instead.man man
.:help :help
is equally important. But vim documentation is quite massive and hard to figure the first years. Thus tricks like:h function^D
give us entries points. Here it would be:h functions
(/:h string-functions
). Then, it's easy to understand what's doing what. Even if we are used to other languages. We can always give the information (it's what we're doing most of the time), but teaching how to fish it is more important -- you know the proverb...:help string-functions
is not showing how to fish. It's more like giving someone the bait and not teaching them to fish at all. Posting how they can search for functions, is teaching them to fish.