Data Structures | Macros | Typedefs | Functions | Variables
digraph.c File Reference
#include <assert.h>
#include <stdbool.h>
#include <inttypes.h>
#include "nvim/vim.h"
#include "nvim/ascii.h"
#include "nvim/digraph.h"
#include "nvim/charset.h"
#include "nvim/ex_cmds2.h"
#include "nvim/ex_docmd.h"
#include "nvim/ex_getln.h"
#include "nvim/getchar.h"
#include "nvim/misc1.h"
#include "nvim/mbyte.h"
#include "nvim/message.h"
#include "nvim/memory.h"
#include "nvim/garray.h"
#include "nvim/normal.h"
#include "nvim/screen.h"
#include "nvim/strings.h"
#include "nvim/os/input.h"

Data Structures

struct  digraph
 
struct  dg_header_entry
 
struct  kmap_T
 structure used for b_kmap_ga.ga_data More...
 

Macros

#define DG_START_LATIN   0xa1
 
#define DG_START_GREEK   0x0386
 
#define DG_START_CYRILLIC   0x0401
 
#define DG_START_HEBREW   0x05d0
 
#define DG_START_ARABIC   0x060c
 
#define DG_START_LATIN_EXTENDED   0x1e02
 
#define DG_START_GREEK_EXTENDED   0x1f00
 
#define DG_START_PUNCTUATION   0x2002
 
#define DG_START_SUB_SUPER   0x2070
 
#define DG_START_CURRENCY   0x20a4
 
#define DG_START_OTHER1   0x2103
 
#define DG_START_ROMAN   0x2160
 
#define DG_START_ARROWS   0x2190
 
#define DG_START_MATH   0x2200
 
#define DG_START_TECHNICAL   0x2302
 
#define DG_START_OTHER2   0x2423
 
#define DG_START_DRAWING   0x2500
 
#define DG_START_BLOCK   0x2580
 
#define DG_START_SHAPES   0x25a0
 
#define DG_START_SYMBOLS   0x2605
 
#define DG_START_DINGBATS   0x2713
 
#define DG_START_CJK_SYMBOLS   0x3000
 
#define DG_START_HIRAGANA   0x3041
 
#define DG_START_KATAKANA   0x30a1
 
#define DG_START_BOPOMOFO   0x3105
 
#define DG_START_OTHER3   0x3220
 
#define KMAP_MAXLEN   20
 
#define KMAP_LLEN   200
 

Typedefs

typedef int result_T
 
typedef struct digraph digr_T
 

Functions

int do_digraph (int c)
 
char_uget_digraph_for_char (int val_arg)
 
int get_digraph (int cmdline)
 
int getdigraph (int char1, int char2, bool meta_char)
 
void putdigraph (char_u *str)
 
void listdigraphs (bool use_headers)
 
char_ukeymap_init (void)
 
void ex_loadkeymap (exarg_T *eap)
 
void keymap_ga_clear (garray_T *kmap_ga)
 Frees the buf_T.b_kmap_ga field of a buffer. More...
 

Variables

struct dg_header_entry header_table []
 

Detailed Description

code for digraphs

Macro Definition Documentation

#define DG_START_ARABIC   0x060c
#define DG_START_ARROWS   0x2190
#define DG_START_BLOCK   0x2580
#define DG_START_BOPOMOFO   0x3105
#define DG_START_CJK_SYMBOLS   0x3000
#define DG_START_CURRENCY   0x20a4
#define DG_START_CYRILLIC   0x0401
#define DG_START_DINGBATS   0x2713
#define DG_START_DRAWING   0x2500
#define DG_START_GREEK   0x0386
#define DG_START_GREEK_EXTENDED   0x1f00
#define DG_START_HEBREW   0x05d0
#define DG_START_HIRAGANA   0x3041
#define DG_START_KATAKANA   0x30a1
#define DG_START_LATIN   0xa1
#define DG_START_LATIN_EXTENDED   0x1e02
#define DG_START_MATH   0x2200
#define DG_START_OTHER1   0x2103
#define DG_START_OTHER2   0x2423
#define DG_START_OTHER3   0x3220
#define DG_START_PUNCTUATION   0x2002
#define DG_START_ROMAN   0x2160
#define DG_START_SHAPES   0x25a0
#define DG_START_SUB_SUPER   0x2070
#define DG_START_SYMBOLS   0x2605
#define DG_START_TECHNICAL   0x2302
#define KMAP_LLEN   200
#define KMAP_MAXLEN   20

Typedef Documentation

typedef struct digraph digr_T
typedef int result_T

Function Documentation

int do_digraph ( int  c)

handle digraphs after typing a character

Parameters
c
Returns
The digraph.
void ex_loadkeymap ( exarg_T eap)

":loadkeymap" command: load the following lines as the keymap.

Parameters
eap
int get_digraph ( int  cmdline)

Get a digraph. Used after typing CTRL-K on the command line or in normal mode.

Parameters
cmdlineTRUE when called from the cmdline
Returns
composed character, or NUL when ESC was used.
char_u* get_digraph_for_char ( int  val_arg)

Find a digraph for "val". If found return the string to display it. If not found return NULL.

int getdigraph ( int  char1,
int  char2,
bool  meta_char 
)

Get digraph. Allow for both char1-char2 and char2-char1

Parameters
char1
char2
meta_char
Returns
The digraph.
void keymap_ga_clear ( garray_T kmap_ga)

Frees the buf_T.b_kmap_ga field of a buffer.

char_u* keymap_init ( void  )

Set up key mapping tables for the 'keymap' option.

Returns
NULL if OK, an error message for failure. This only needs to be used when setting the option, not later when the value has already been checked.
void listdigraphs ( bool  use_headers)
void putdigraph ( char_u str)

Add the digraphs in the argument to the digraph table. format: {c1}{c2} char {c1}{c2} char ...

Parameters
str

Variable Documentation

struct dg_header_entry header_table[]
Initial value:
= {
{ DG_START_LATIN, N_("Latin supplement") },
{ DG_START_GREEK, N_("Greek and Coptic") },
{ DG_START_CYRILLIC, N_("Cyrillic") },
{ DG_START_HEBREW, N_("Hebrew") },
{ DG_START_ARABIC, N_("Arabic") },
{ DG_START_LATIN_EXTENDED, N_("Latin extended") },
{ DG_START_GREEK_EXTENDED, N_("Greek extended") },
{ DG_START_PUNCTUATION, N_("Punctuation") },
{ DG_START_SUB_SUPER, N_("Super- and subscripts") },
{ DG_START_CURRENCY, N_("Currency") },
{ DG_START_OTHER1, N_("Other") },
{ DG_START_ROMAN, N_("Roman numbers") },
{ DG_START_ARROWS, N_("Arrows") },
{ DG_START_MATH, N_("Mathematical operators") },
{ DG_START_TECHNICAL, N_("Technical") },
{ DG_START_OTHER2, N_("Other") },
{ DG_START_DRAWING, N_("Box drawing") },
{ DG_START_BLOCK, N_("Block elements") },
{ DG_START_SHAPES, N_("Geometric shapes") },
{ DG_START_SYMBOLS, N_("Symbols") },
{ DG_START_DINGBATS, N_("Dingbats") },
{ DG_START_CJK_SYMBOLS, N_("CJK symbols and punctuation") },
{ DG_START_HIRAGANA, N_("Hiragana") },
{ DG_START_KATAKANA, N_("Katakana") },
{ DG_START_BOPOMOFO, N_("Bopomofo") },
{ DG_START_OTHER3, N_("Other") },
{ 0xfffffff, NULL },
}
#define DG_START_OTHER1
#define DG_START_BOPOMOFO
#define DG_START_DRAWING
#define DG_START_GREEK_EXTENDED
#define DG_START_SUB_SUPER
return NULL
Definition: eval.c:12999
#define DG_START_GREEK
#define DG_START_CYRILLIC
#define DG_START_LATIN
#define DG_START_ARABIC
#define DG_START_SHAPES
#define DG_START_OTHER3
#define DG_START_LATIN_EXTENDED
#define DG_START_KATAKANA
#define DG_START_HIRAGANA
#define DG_START_PUNCTUATION
#define DG_START_BLOCK
#define DG_START_DINGBATS
#define DG_START_CURRENCY
#define N_(x)
Definition: gettext.h:21
#define DG_START_OTHER2
#define DG_START_TECHNICAL
#define DG_START_CJK_SYMBOLS
#define DG_START_MATH
#define DG_START_ARROWS
#define DG_START_ROMAN
#define DG_START_HEBREW
#define DG_START_SYMBOLS