From a32df5e734460dfdf9bc85aebf5252d64fcb99f5 Mon Sep 17 00:00:00 2001 From: Brandon Coleman Date: Wed, 28 May 2014 23:00:49 -0500 Subject: move defines from vim.h buffer.h: buflist_getfile() flags buflist_new() flags buf_freeall() flags do_buffer() flags charset.h: chartab[] flags edit.h: in_cinkeys() flags change_indent() flags beginline() flags insertchar() flags nv_mousescroll() flags eval.c AUTOLOAD_CHAR eval.h: enum for vimvars[] ex_cmds.h: do_ecmd read_viminfo flags ex_cmds2.h: check_changed() flags do_source() flags ex_cmds_defs.h: BAD_* flags ex_docmd.h: VALID_PATH VALID_HEAD EXMODE_* do_cmdline() flags added include ex_getln.c *_ESC_CHARS definitions ex_getln.h: history table flags - used by add_to_history() fileio.h: readfile() flags event_T definition getchar.h: ins_typebuf() flags KEYLEN_* globals.h: NO_SCREEN NO_BUFFERS SEA_* defines current_SID flags hlf_T enum HL_FLAGS do_profiling() flags schar_T sattr_T indent.h: set_indent() flags macros.h: BINARY_FILE_IO flags mbyte.h: MB_BYTE2LEN* ENC_* memfile.h: mf_sync() flags misc1.h: open_line() flags message.h: do_dialog() flags vim_dialogyesno() flags DLG_BUTTON_* normal.h: find_ident_under_cursor() flags ops.h: do_put() flags operator ID's option.h: buf_copy_options() flags OPT_* flags os_unix.h: mch_nodetype() flags quickfix.h: skip_vimgrep_pat() flags regexp.h: vim_regcomp() flags values for reg_do_extmatch search.h: do_search() flags search_regcomp() flags findmatchlimit() flags syntax.h: HL_* flags HL_FOLD is used in buffer_defs.h but nvim compiles just fine with the defines in syntax.h tag.h: do_tag() flags find_tags() flags term.h: TBUFSZ flags MOUSE flags ui.h: jump_to_mouse() flags window.h: file_name_in_line() flags win_split() flags MIN_LINES MIN_COLUMNS Remove VimClipboard which should have been removed with PR #921. --- src/nvim/fileio.h | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) (limited to 'src/nvim/fileio.h') diff --git a/src/nvim/fileio.h b/src/nvim/fileio.h index 399d93d77c..7e4ced554d 100644 --- a/src/nvim/fileio.h +++ b/src/nvim/fileio.h @@ -4,6 +4,104 @@ #include "nvim/buffer_defs.h" #include "nvim/os/os.h" +/* Values for readfile() flags */ +#define READ_NEW 0x01 /* read a file into a new buffer */ +#define READ_FILTER 0x02 /* read filter output */ +#define READ_STDIN 0x04 /* read from stdin */ +#define READ_BUFFER 0x08 /* read from curbuf (converting stdin) */ +#define READ_DUMMY 0x10 /* reading into a dummy buffer */ +#define READ_KEEP_UNDO 0x20 /* keep undo info*/ + +/* + * Events for autocommands. + */ +typedef enum auto_event { + EVENT_BUFADD = 0, /* after adding a buffer to the buffer list */ + EVENT_BUFNEW, /* after creating any buffer */ + EVENT_BUFDELETE, /* deleting a buffer from the buffer list */ + EVENT_BUFWIPEOUT, /* just before really deleting a buffer */ + EVENT_BUFENTER, /* after entering a buffer */ + EVENT_BUFFILEPOST, /* after renaming a buffer */ + EVENT_BUFFILEPRE, /* before renaming a buffer */ + EVENT_BUFLEAVE, /* before leaving a buffer */ + EVENT_BUFNEWFILE, /* when creating a buffer for a new file */ + EVENT_BUFREADPOST, /* after reading a buffer */ + EVENT_BUFREADPRE, /* before reading a buffer */ + EVENT_BUFREADCMD, /* read buffer using command */ + EVENT_BUFUNLOAD, /* just before unloading a buffer */ + EVENT_BUFHIDDEN, /* just after buffer becomes hidden */ + EVENT_BUFWINENTER, /* after showing a buffer in a window */ + EVENT_BUFWINLEAVE, /* just after buffer removed from window */ + EVENT_BUFWRITEPOST, /* after writing a buffer */ + EVENT_BUFWRITEPRE, /* before writing a buffer */ + EVENT_BUFWRITECMD, /* write buffer using command */ + EVENT_CMDWINENTER, /* after entering the cmdline window */ + EVENT_CMDWINLEAVE, /* before leaving the cmdline window */ + EVENT_COLORSCHEME, /* after loading a colorscheme */ + EVENT_COMPLETEDONE, /* after finishing insert complete */ + EVENT_FILEAPPENDPOST, /* after appending to a file */ + EVENT_FILEAPPENDPRE, /* before appending to a file */ + EVENT_FILEAPPENDCMD, /* append to a file using command */ + EVENT_FILECHANGEDSHELL, /* after shell command that changed file */ + EVENT_FILECHANGEDSHELLPOST, /* after (not) reloading changed file */ + EVENT_FILECHANGEDRO, /* before first change to read-only file */ + EVENT_FILEREADPOST, /* after reading a file */ + EVENT_FILEREADPRE, /* before reading a file */ + EVENT_FILEREADCMD, /* read from a file using command */ + EVENT_FILETYPE, /* new file type detected (user defined) */ + EVENT_FILEWRITEPOST, /* after writing a file */ + EVENT_FILEWRITEPRE, /* before writing a file */ + EVENT_FILEWRITECMD, /* write to a file using command */ + EVENT_FILTERREADPOST, /* after reading from a filter */ + EVENT_FILTERREADPRE, /* before reading from a filter */ + EVENT_FILTERWRITEPOST, /* after writing to a filter */ + EVENT_FILTERWRITEPRE, /* before writing to a filter */ + EVENT_FOCUSGAINED, /* got the focus */ + EVENT_FOCUSLOST, /* lost the focus to another app */ + EVENT_GUIENTER, /* after starting the GUI */ + EVENT_GUIFAILED, /* after starting the GUI failed */ + EVENT_INSERTCHANGE, /* when changing Insert/Replace mode */ + EVENT_INSERTENTER, /* when entering Insert mode */ + EVENT_INSERTLEAVE, /* when leaving Insert mode */ + EVENT_JOBACTIVITY, /* when job sent some data */ + EVENT_MENUPOPUP, /* just before popup menu is displayed */ + EVENT_QUICKFIXCMDPOST, /* after :make, :grep etc. */ + EVENT_QUICKFIXCMDPRE, /* before :make, :grep etc. */ + EVENT_QUITPRE, /* before :quit */ + EVENT_SESSIONLOADPOST, /* after loading a session file */ + EVENT_STDINREADPOST, /* after reading from stdin */ + EVENT_STDINREADPRE, /* before reading from stdin */ + EVENT_SYNTAX, /* syntax selected */ + EVENT_TERMCHANGED, /* after changing 'term' */ + EVENT_TERMRESPONSE, /* after setting "v:termresponse" */ + EVENT_USER, /* user defined autocommand */ + EVENT_VIMENTER, /* after starting Vim */ + EVENT_VIMLEAVE, /* before exiting Vim */ + EVENT_VIMLEAVEPRE, /* before exiting Vim and writing .viminfo */ + EVENT_VIMRESIZED, /* after Vim window was resized */ + EVENT_WINENTER, /* after entering a window */ + EVENT_WINLEAVE, /* before leaving a window */ + EVENT_ENCODINGCHANGED, /* after changing the 'encoding' option */ + EVENT_INSERTCHARPRE, /* before inserting a char */ + EVENT_CURSORHOLD, /* cursor in same position for a while */ + EVENT_CURSORHOLDI, /* idem, in Insert mode */ + EVENT_FUNCUNDEFINED, /* if calling a function which doesn't exist */ + EVENT_REMOTEREPLY, /* upon string reception from a remote vim */ + EVENT_SWAPEXISTS, /* found existing swap file */ + EVENT_SOURCEPRE, /* before sourcing a Vim script */ + EVENT_SOURCECMD, /* sourcing a Vim script using command */ + EVENT_SPELLFILEMISSING, /* spell file missing */ + EVENT_CURSORMOVED, /* cursor was moved */ + EVENT_CURSORMOVEDI, /* cursor was moved in Insert mode */ + EVENT_TABLEAVE, /* before leaving a tab page */ + EVENT_TABENTER, /* after entering a tab page */ + EVENT_SHELLCMDPOST, /* after ":!cmd" */ + EVENT_SHELLFILTERPOST, /* after ":1,2!cmd", ":w !cmd", ":r !cmd". */ + EVENT_TEXTCHANGED, /* text was modified */ + EVENT_TEXTCHANGEDI, /* text was modified in Insert mode*/ + NUM_EVENTS /* MUST be the last one */ +} event_T; + /* * Struct to save values in before executing autocommands for a buffer that is * not the current buffer. -- cgit