Data Structures | Macros | Typedefs | Functions
normal.c File Reference
#include <assert.h>
#include <inttypes.h>
#include <string.h>
#include <stdbool.h>
#include <stdlib.h>
#include "nvim/log.h"
#include "nvim/vim.h"
#include "nvim/ascii.h"
#include "nvim/normal.h"
#include "nvim/buffer.h"
#include "nvim/change.h"
#include "nvim/charset.h"
#include "nvim/cursor.h"
#include "nvim/diff.h"
#include "nvim/digraph.h"
#include "nvim/edit.h"
#include "nvim/eval.h"
#include "nvim/ex_cmds.h"
#include "nvim/ex_cmds2.h"
#include "nvim/ex_docmd.h"
#include "nvim/ex_getln.h"
#include "nvim/fileio.h"
#include "nvim/fold.h"
#include "nvim/getchar.h"
#include "nvim/indent.h"
#include "nvim/indent_c.h"
#include "nvim/main.h"
#include "nvim/mark.h"
#include "nvim/memline.h"
#include "nvim/memory.h"
#include "nvim/message.h"
#include "nvim/misc1.h"
#include "nvim/keymap.h"
#include "nvim/move.h"
#include "nvim/mouse.h"
#include "nvim/ops.h"
#include "nvim/option.h"
#include "nvim/quickfix.h"
#include "nvim/screen.h"
#include "nvim/search.h"
#include "nvim/spell.h"
#include "nvim/spellfile.h"
#include "nvim/strings.h"
#include "nvim/syntax.h"
#include "nvim/tag.h"
#include "nvim/ui.h"
#include "nvim/undo.h"
#include "nvim/window.h"
#include "nvim/state.h"
#include "nvim/event/loop.h"
#include "nvim/os/time.h"
#include "nvim/os/input.h"
#include "nvim/api/private/helpers.h"

Data Structures

struct  normal_state
 
struct  nv_cmd
 

Macros

#define NV_NCH   0x01 /* may need to get a second char */
 
#define NV_NCH_NOP   (0x02|NV_NCH) /* get second char when no operator pending */
 
#define NV_NCH_ALW   (0x04|NV_NCH) /* always get a second char */
 
#define NV_LANG   0x08 /* second char needs language adjustment */
 
#define NV_SS   0x10 /* may start selection */
 
#define NV_SSS   0x20 /* may start selection with shift modifier */
 
#define NV_STS   0x40 /* may stop selection without shift modif. */
 
#define NV_RL   0x80 /* 'rightleft' modifies command */
 
#define NV_KEEPREG   0x100 /* don't clear regname */
 
#define NV_NCW   0x200 /* not allowed in command-line window */
 
#define NV_CMDS_SIZE   ARRAY_SIZE(nv_cmds)
 
#define SHOWCMD_BUFLEN   SHOWCMD_COLS + 1 + 30
 

Typedefs

typedef struct normal_state NormalState
 
typedef void(* nv_func_T) (cmdarg_T *cap)
 

Functions

void init_normal_cmds (void)
 
void normal_enter (bool cmdwin, bool noexmode)
 
void do_pending_operator (cmdarg_T *cap, int old_col, bool gui_yank)
 
bool do_mouse (oparg_T *oap, int c, int dir, long count, bool fixindent)
 
void end_visual_mode (void)
 
void reset_VIsual_and_resel (void)
 
void reset_VIsual (void)
 
size_t find_ident_under_cursor (char_u **string, int find_type)
 
size_t find_ident_at_pos (win_T *wp, linenr_T lnum, colnr_T startcol, char_u **string, int find_type)
 
void clear_showcmd (void)
 
bool add_to_showcmd (int c)
 
void add_to_showcmd_c (int c)
 
void push_showcmd (void)
 
void pop_showcmd (void)
 
void do_check_scrollbind (bool check)
 
void check_scrollbind (linenr_T topline_diff, long leftcol_diff)
 
bool find_decl (char_u *ptr, size_t len, bool locally, bool thisblock, int flags_arg)
 
void scroll_redraw (int up, long count)
 
void do_nv_ident (int c1, int c2)
 
bool get_visual_text (cmdarg_T *cap, char_u **pp, size_t *lenp)
 
void start_selection (void)
 
void may_start_select (int c)
 
void set_cursor_for_append_to_line (void)
 
void normal_cmd (oparg_T *oap, bool toplevel)
 

Macro Definition Documentation

#define NV_CMDS_SIZE   ARRAY_SIZE(nv_cmds)
#define NV_KEEPREG   0x100 /* don't clear regname */
#define NV_LANG   0x08 /* second char needs language adjustment */
#define NV_NCH   0x01 /* may need to get a second char */
#define NV_NCH_ALW   (0x04|NV_NCH) /* always get a second char */
#define NV_NCH_NOP   (0x02|NV_NCH) /* get second char when no operator pending */
#define NV_NCW   0x200 /* not allowed in command-line window */
#define NV_RL   0x80 /* 'rightleft' modifies command */
#define NV_SS   0x10 /* may start selection */
#define NV_SSS   0x20 /* may start selection with shift modifier */
#define NV_STS   0x40 /* may stop selection without shift modif. */
#define SHOWCMD_BUFLEN   SHOWCMD_COLS + 1 + 30

Typedef Documentation

typedef struct normal_state NormalState
typedef void(* nv_func_T) (cmdarg_T *cap)

Function Documentation

bool add_to_showcmd ( int  c)
void add_to_showcmd_c ( int  c)
void check_scrollbind ( linenr_T  topline_diff,
long  leftcol_diff 
)
void clear_showcmd ( void  )
void do_check_scrollbind ( bool  check)
bool do_mouse ( oparg_T oap,
int  c,
int  dir,
long  count,
bool  fixindent 
)
void do_nv_ident ( int  c1,
int  c2 
)
void do_pending_operator ( cmdarg_T cap,
int  old_col,
bool  gui_yank 
)
void end_visual_mode ( void  )
bool find_decl ( char_u ptr,
size_t  len,
bool  locally,
bool  thisblock,
int  flags_arg 
)
size_t find_ident_at_pos ( win_T wp,
linenr_T  lnum,
colnr_T  startcol,
char_u **  string,
int  find_type 
)
size_t find_ident_under_cursor ( char_u **  string,
int  find_type 
)
bool get_visual_text ( cmdarg_T cap,
char_u **  pp,
size_t *  lenp 
)
void init_normal_cmds ( void  )
void may_start_select ( int  c)
void normal_cmd ( oparg_T oap,
bool  toplevel 
)
void normal_enter ( bool  cmdwin,
bool  noexmode 
)
void pop_showcmd ( void  )
void push_showcmd ( void  )
void reset_VIsual ( void  )
void reset_VIsual_and_resel ( void  )
void scroll_redraw ( int  up,
long  count 
)
void set_cursor_for_append_to_line ( void  )
void start_selection ( void  )