📄 todo.txt
字号:
7 Add synIDlist(), making the whole list of syntax items on the stack available (separated with '\n').8 Add autocommand-event for when a variable is changed: :au VarChanged {varname} {commands}8 Add per-buffer and per-window variables: b4:xxx buffer 4 variable b4:&yyy buffer 4 option 'yyy' w2:xxx window 2 variable Alternative: use getwinvar(), getbufvar(), setwinvar() and setbufvar(). ( ~/vim/patches/aaron.getbufvar3 ) Mostly the buffer/window number is not known, avoid using ":exe".8 Add "has("gui_capable")", to check if the GUI can be started.8 Add possibility to use variables like registers: characterwise (default), linewise (when ending in '\n'), blockwise (when ending in '\001'). reg0, rega, reg%, etc. Add functions linewise({expr}), blockwise({expr}) and charwise({expr}).7 Make it possible to do any command on a string variable (make a buffer with one line, containing the string). Maybe add an (invisible) scratch buffer for this? result = scratch(string, command) result = apply(string, command) result = execute(string, command) "command" would use <> notation. Does scratch buffer have a number? Or re-use same number?7 Add function to generate unique number (date in milliseconds).7 Automatically load a function from a file when it is called. Need an option for the search path. (Sekera)6 "g{if cond}" "g{while cond}", etc. in Normal mode, for mappings.6 Like Lotus: <IF cond>commands<ELSE>commands<ENDIF> (in any mode, handle in vgetorpeek()) ":map _a athe term is <IF $TERM=="xterm">xterm<ELSE>unknown<ENDIF>.<Esc>" Use "<IF expression>commands<ELSE>commands<ENDIF>Code cleanup:8 expand_context and expand_pattern should not be global. Pass them to ExpandOne() and lower.Performance:8 Avoid alloc() for scratch buffer use, esp. in syntax.c. It's very slow on Win16.9 Setting GUI options in the console (e.g., 'guifont') should not cause a redraw.8 Profiling shows that in_id_list() is used very often for C code. Can this function be improved?8 For an existing file, the page size of the swap file is always the default, instead of using the block size of the device, because the swap file is created only after setting the block size in mf_open(). How can this be improved?8 Set default for 'ttyscroll' to half a screen height? Should speed up MS-DOS version. (Negri)7 DOS console: Add t_DL support, to make scrolling faster.8 When editing a file with extremely long lines (e.g., an executable), the "linerest" in readfile() is allocated twice to be able to copy what was read so far. Use realloc() instead? Or split the line when allocating memory fails and "linerest" is big (> 100000)?8 When defining autocommands (e.g., from $VIMRUNTIME/filetype.vim), need to compare each pattern with all existing patterns. Use a hash code to avoid using strcmp() too often?7 Include turbo_loader patches, speeding up reading a file? Speed up reading a file by reading it into a fixed-size buffer, creating the list of indexes in another buffer, and then copying the result into a memfile block with two copies. Then read the next block into another fixed-size buffer, create the second list of indexes and copy text from the two blocks to the memfile block.7 do_cmdline(): Avoid that the command line is copied to allocated memory and freed again later all the time. For while loops, and for when called with an argument that can be messed with. Generic solution: Make a struct that contains a pointer and a flag that indicates if the pointer should be freed when replaced.7 Check that that the file size is not more than "sizeof(long)".- Further improve finding mappings in maphash[] in vgetorpeek()8 Dragging the status line doesn't scroll but redraw.8 Syntax highlighting is slow when deleting lines. Try in $VIMRUNTIME/filetype.vim.8 "p" and "P" redraw everything after the put text. Should insert lines.- "out of memory" after deleting (1,$d) and changing (:%s/^/> /) a lot of lines (27000) a few times. Memory fragmentation?- Have a look at how pdksh does memory allocation (alloc.c). (Dalecki)- Do profiling on: - :g/pat/normal cmd - 1000ii<Esc> - deleting 10Mbyte worth of lines (netscape binary) - ":g/^/m0" on a 450Kbyte file. And the "u". - highlighting "~/vim/test/longline.tex", "~/vim/test/scwoop.tcl" and "~/vim/test/lockup.pl". - loading a syntax file to highlight all words not from a dictionary.7 Screen updating can be further improved by only redrawing lines that were changed (and lines after them, when syntax highlighting was used, and it changed). - On each change, remember start and end of the change. - When inserting/deleting lines, remember begin, end, and line count.- Use macros/duarte/capicua for profiling. Nvi 1.71 is the fastest!- When using a file with one long line (1Mbyte), then do "$hhhh", is still very slow. Avoid calling getvcol() for each "h"?- Executing a register, e.g. "10000@@" is slow, because ins_typebuf has to move the previous commands forward each time. Pass count from normal_cmd() down to do_execreg().- Repeating insert "1000i-<Esc>" displays --INSERT-- all the time, because of the <Esc> at the end. Make this work faster (disable redrawing).- Avoid calls to plines() for cursor line, use w_cline_height.- When only need to redraw the status lines in status_redraw_all(), need to update NOT_VALID to force the redraw. Should detect that only the status lines need to be redrawn (add STATUSLN between VALID and NOT_VALID?).- After :set nowrap remove superflous redraw with wrong hor. offset if cursor is right of the screen.Code size:8 Can't optimize normal.c, because of the big switch. Make it into a table of functions?8 GUI: When NO_CONSOLE is defined, more code can be excluded.- Put getline() and cookie in a struct, so only one argument has to be passed to do_cmdline() and other functions.8 move common files between os_unix.c and os_vms.c to one file?8 Make a GUI-only version for Unix?Messages:8 For 'verbose' level 12 print commands from source'ed files.8 Use 'report' for ":bdel"? (Krishna) To avoid these messages when using a script.- Delete message after new command has been entered and have waited for key. Perhaps after ten seconds?- Remember message line for redraw. Integrate the command line in updateScreen().- Make message history available in "msg" variables: msg1, msg2, .. msg9.9 Check handling of overwriting of messages and delays: Very wrong: errors while redrawing cause endless loop. When switching to another file and screen scrolls because of the long message and return must be typed, don't scroll the screen back before redrawing.7 Add an option, which is a regexp, that disables warning messages which match that regexp (Tsirkin).8 When address range is wrong you only get "Invalid range". Be a bit more specific: Negative, beyond last line, reverse range? Include the text.8 Make it possible to ignore errors for a moment ('errorignore'?). Another option to switch off giving error messages ('errorquiet'?). Also an option not to give any messages ('quiet')? Or ":quiet on", ":quiet off". Careful: For a severe error (out of memory), and when the user starts typing, error messages must be switched back on. Also a flag to ignore error messages for shell commands (for mappings).8 Add ":silent {cmd}", silently run a command: no echoing, no hit-return prompt. Use ":silent!" to also skip error messages.- Option to set time for emsg() sleep. Interrupt sleep when key is typed? sleep before second message?8 In Ex silent mode or when reading commands from a file, what exactly is not printed and what is? Check ":print", ":set all", ":args", ":vers", etc. At least there should be no prompt. (Smulders) And don't clear the screen when reading commands from stdin. (Kendall) --> Make a difference between informative messages, prompts, etc. and error messages, printing text, etc.8 Window should be redrawn when resizing at the hit-return prompt. Also at the ":tselect" prompt. Find a generic solution for redrawing when a prompt is present (with a callback function?).Screen updating:7 Add a string to the 'display' option to make CTRL-E and CTRL-Y scroll one screen line, also if this means the first line doesn't start with the first character (like what happens with a single line that doesn't fit).- screen_line(): - insert/delete character stuff. - improve delete rest of line (spaces at end of line).- When moving or resizing window, try to avoid a complete redraw (esp. when dragging the status line with the mouse).- When 'lazyredraw' set, don't echo :ex commands? Need a flag to redraw when waiting for a character.8 Add a ":refresh [winnr]" command, to force updating a window. Useful from an event handler where ":normal" can't be used. Also useful when 'lazyredraw' is set in a mapping.Scrolling:8 Add "zm" command: scroll horizontally to put the cursor in the middle.6 Add option to set the overlap for CTRL-F and CTRL-B. (Garhi)- extend 'scrollbind' option: 'scrollopt' words "search", "relative", etc.. Also 'e'xecute some commands (search, vertical movements) in all bound windows.- Allow scrolling by dragging with the mouse. Like the "hand" in Acrobat reader. With which mouse button?- Add command to execute some commands (search, vertical movements) in all bound windows.- Add 'search' option to 'scrollopt' to allow 'scrollbind' windows to be bound by regexp searches- Add "z>" and "z<": scroll sideways one screenfull. (Campbell)- Add 'sidescrolloff' option, like 'scrolloff', to make the cursor always appear in the middle of the window horizontally (Benjamin Griffin).- Add option to set the number of lines when not to scroll, instead of the fixed number used now (for terminals that scroll slow with a large number of lines but not with a single line).Autoconf:8 Should use acconfig.h to define prototypes that are used by autoheader.8 Some compilers don't give an error for "-OPT:Olimit" but a warning. (Webb) Add a check for the warning, so that "Olimit" can be added automatically?- Autoconf: Use @datadir@ for the system independent files. Make sure the system dependend and system independed files are separated. (Leitner).- Add autoconf check for waitpid()/wait4().- Remove fcntl() from autoconf, all systems have it?- Set default for 'dictionary', add search for dictionary to autoconf.Perl interface:8 Rename typemap file to something else?7 Make buffers accessed as Perl arrays. (Clark)7 Make it possible to compile with non-ANSI C?6 Tcl/Tk has the "load" command: load a shared library (.so or .dll).Shared libraries:6 Add support for loading shared libraries, and calling functions in it. :libload internal-name libname :libunload internal-name :liblist :libcall internal-name function(arg1, arg2, ...) :libcall function(arg1, arg2, ...) libcall() can have only one integer or String argument at the moment.6 Have a look on how Perl handles loading dynamic libraries.Tags:8 Scope arguments for ":tag", e.g.: ":tag class:cPage open", like Elvis.8 When output of ":tselect" is long, getting the more-prompt, should be able to type the tag number directly.8 Add "**" wildcard from 'path' to 'tags': search a tree for tags files. And some way to search directories upwards in the tree: "./**/tags;$HOME", where the part after ';' tells where to stop. Schandl has a patch for this: ~/vim/patches/schandl.tags4 .7 Add 'tagignorecase' option from Vile: ignore case for tags.7 Make output of ":tselect" a bit nicer. Use highlighting?7 Highlight the "tag 1 of >2" message. New highlight group, or same as "hit bottom" search message.7 When using ":tag" at the top of the tag stack, should add another entry, so CTRL-T can bring you back to where you are now AND to where you were before the previous ":tag" command. (Webb)7 When using CTRL-] on someClass::someMethod, separate class from method and use ":ta class:someClass someMethod". Include C++ tags changes (Bertin). Change "class::func" tag into "func" with "class=class"? Docs in oldmail/bertin/in.xxx.7 Add ":tagargs", to set values for fields: :tagargs class:someclass file:version.c :tagargs clear These are then the default values (changes the order of priority in tag matching)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -