Vim documentation: todo
main help file
*todo.txt* For Vim version 5.7. Last change: 2000 Jun 24
VIM REFERENCE MANUAL by Bram Moolenaar
TODO list for Vim *todo*
This is a veeeery long list of known bugs, current work, and desired
improvements. To make it a little bit accessible, the items are grouped by
subject. In the first column of the line a classification is used to be able
to look for "the next thing to do":
Priority classification:
9 next point release
8 next release
7 as soon as possible
6 soon
5 should be included
4 nice to have
3 consider including
2 maybe not
1 probably not
- unclassified
Plan:
1. Following 5.x releases will be the "stable" branch. Bug fixes only.
2. Start work on version 6.0, the "unstable" branch. Many new features to be
included. First of all: Folding.
See |votes-for-changes| for a list of votes on desired changes in Vim.
See |develop.txt| for development plans.
*known-bugs*
Vi incompatibility:
8 With undo/redo only marks in the changed lines should be changed. Other
marks should be kept. Vi keeps each mark at the same text, even when it
is deleted or restored. (Webb)
Also: A mark is lost after: make change, undo, redo and undo.
Example: "{d''"' then "u" then "d''"': deletes an extra line, because the ''
position is one line down. (Veselinovic)
8 When using ":s" to split a line, marks are moved to the next line. (Geddes)
8 When using ":n" ":rew", the prev. context mark is in the same place as the
cursor, not on the first line.
8 "zt" should scroll one screen forward and put the cursor in the first
line.
8 ":z#" should list lines with line numbers. (Bob Farmer)
8 text is put in register 1 when using "c" and "d" with a motion character:
<control-A> % ( ) `<character> / ? N n { }
(from Nvi manual).
8 When stdin is not a tty, and Vim reads commands from it, an error should
make Vim exit.
8 Unix Vim (not gvim): Typing CTRL-C in Ex mode should finish the line
(currently you can continue typing, but it's truncated later anyway).
8 When loading a file in the .exrc, Vi loads the argument anyway. Vim skips
loading the argument if there is a file already. When no file argument
given, Vi starts with an empty buffer, Vim keeps the loaded file. (Bearded)
8 In Insert mode, when using <BS> or <Del>, don't wipe out the text, but
only move back the cursor. Behaves like '$' in 'cpoptions'. Use a flag
in 'cpoptions' to switch this on/off.
8 When editing a file which is a symbolic link, Vim opens another symbolic
link on the same file under the name of the first one. Adjust the file
name in the buffer to the last one used? Use several file names in one
buffer???
7 The ":map" command output overwrites the command. Perhaps it should keep
the ":map" when it's used without arguments?
7 When interrupting reading a file, Vi considers the buffer modified. Add a
'cpoptions' flag for this (we don't want it modified always to be able to
do ":q")?
7 CTRL-L is not the end of a section? It is for Posix! Make it an option.
7 Implement 'prompt' option. Init to off when stdin is not a tty.
7 CTRL-T in Insert mode inserts 'shiftwidth' of spaces at the cursor. Add a
flag in 'cpoptions' for this.
7 Add a way to send an email for a crashed edit session. Create a file when
making changes (containing name of the swap file), delete it when writing
the file. Supply a program that can check for crashed sessions (either
all, for a system startup, or for one user, for in a .login file).
7 Vi doesn't do autoindenting when input is not from a tty (in Ex mode).
7 "z3<CR>" should still use the whole window, but only redisplay 3 lines.
7 ":tag xx" should move the cursor to the first non-blank. Or should it go
to the match with the tag? Option?
7 Implement 'autoprint'/'ap' option.
7 Add flag in 'cpoptions' that makes <BS> after a count work like <Del>
(Sayre).
7 Add flag in 'cpoptions' that makes operator (yank, filter) not move the
cursor, at least when canceled. (default vi compatible).
7 Make "5dd" on last-but-one-line not delete anything (Vi compatible).
Add flag in 'cpoptions' for this. When not present, "2dd" in the last
line should delete the last line.
7 This Vi-trick doesn't work: "Q" to go to Ex mode, then "g/pattern/visual".
In Vi you can edit in visual mode, and when doing "Q" you jump to the next
match. Nvi can do it too.
7 Support '\' for line continuation in Ex mode for these commands: (Luebking)
g/./a\ g/pattern1/ s/pattern2/rep1\\
line 1\ line 2\\
line 2\ line 3\\
. line4/
6 ":e /tmp/$tty" doesn't work. ":e $uid" does. Is $tty not set because of
the way the shell is started?
6 After ":cd", meaning of file names for existing buffers changes. Do we
care?
6 Vi compatibility (optional): make "ia<CR><ESC>10." do the same strange
thing. (only repeat insert for the first line).
GTK+ GUI known bugs:
9 When logging out from KDE, vim is not told to save its files. Catching
the WM_SAVE_YOURSELF event doesn't work.
8 For some fonts characters are drawn in the line above. Include fix
~/vim/patches/dalecki-5.6 . (Marcin Dalecki)
9 When selecting a font from the font selector with an embedded space it
cannot be found. (Tsirkin)
8 When a font is not fixed width, the message "not fixed-width" disappears
immediately. (Tsirkin)
8 Move gtk_main_quit() calls from call to add_to_input_buf() to inside the
function?
9 GTK GUI: Include changes in gtklayout.c since GTK 1.1.6 in gui_gtk_f.c?
(Kahn)
9 Can't paste a Visual selection from GTK-gvim to vim in xterm when it is
longer than 4000 characters. Works OK from gvim to gvim and vim to vim.
This is a GTK problem.
9 With some fonts the characters can be taller than ascent + descent. E.g.,
"-misc-fixed-*-*-*-*-18-*-*-*-*-*-iso10646-1". Add one to the character
cell height? (Dalecki)
9 With the guifont "-*-clean-medium-r-*-*-8-*-*-*-*-80-*" bold characters
are drawn wrong. Try on C source code. The bold font is wider than the
medium font. Check bold font cellsize and use bold font trick if it's
wrong?
8 When using "gvim -geom 40x30" or setting 'columns' in .gvimrc or with a
GUIEnter autocommand, the width is still set to fit the toolbar. Also
happens when changing the font. How to avoid that the toolbar specifies
the minimal window width?
8 Implement "no" value for 'winaltkeys': don't use Alt-Key as a menu
shortcut, when 'wak' changed after creating the menus.
8 Dialogs sometimes appear a bit far away. Apply a patch from Brent Verner
to position the dialogs on top of the gvim window (Jul 1999)? Check that
it still works for focus-follows-mouse.
8 When "cm" termcap entry is missing, starting gvim shouldn't complain about
it. (Lohner) Try out with "vt100" entry (cm replaced with cX).
Win32 GUI known bugs:
9 Clipboard doesn't always work as it should:
- Selecting text while editing a command-line has an implied copy to the
clipboard. Remove this, and add a command character to copy/cut/delete
the selected text (used in the popup menu).
- When selecting at the more-prompt or hit-return-prompt right mouse
button doesn't give popup menu. Also has an implied copy to the
clipboard. Use the popup menu "Copy" entry for that.
9 When there are more than 32767 lines, the scrollbar has a roundoff error.
Clicking the up or down error scrolls two lines or more. Looks like there
is an extra event that reports the new position of the scrollbar.
8 Make new version of VisVim.dll which includes the patch from Cordell.
8 When 'grepprg' doesn't execute, the error only flashes by, the
user can hardly see what is wrong. (Moore)
Could use vimrun with an "-nowait" argument to only wait when an error
occurs, but "command.com" doesn't return an error code.
8 When the 'shell' cannot be executed, should give an appropriate error msg.
8 MessageBox used for error messages can be too big. There is no way to
scroll it, or even hit the OK button (but you can hit return).
7 Add an option to disable adding a pixel row for bold and italic fonts?
Same option as for multi-byte (patch from Nam)?
Add another option to add one to the character width? Lucida Console
italic is wider than the normal font ("d" overlaps with next char).
7 At the hit-return prompt scrolling now no longer works. Need to use the
keyboard to get around this. Pretend <CR> was hit when the users tries to
scroll?
7 'mousefocus' is disabled until the next mouse click, when trying to exit
by hitting the X in the title bar. (Webb)
7 Scrollbar width doesn't change when selecting other windows appearance.
Also background color of Toolbar and rectangle below vert. scrollbar.
7 "!start /min cmd" should run in a minimized window, instead of using
"/min" as the command name. (Rogall)
6 Drawing text transparantly doesn't seem to work (when drawing part cursor).
8 CTRL key doesn't always work in combination with ALT key. It does work
for function keys, not for alphabetic characters.
8 CTRL-@ doesn't work. Don't even get a message for it?
8 CTRL-- doesn't work for AZERTY, because it's CTRL-[ for QWERTY. How do we
know which keyboard is being used?
8 When using ":se guifont=Courier_New" bold chars leave pixels behind, in
front of a character, after a TAB. (McRae)
7 When scrolling, and a background color is dithered, the dither pattern
doesn't always join correctly between the scolled area and the new drawn
area (Koloseike).
7 File/Print uses notepad, which puts the name of the temp file on top of
each page. How do we get the actual file name there?
Alternative: use prfile32 (Aaron)
8 install.exe, vimrun.exe and ctags are not build from Gvim_vc.mak. When
added, check that this works from the command line and from the IDE.
8 ":r !mycommand" doesn't pass the environment to the external command.
8 When dropping a shortcut on gvim (.lnk file) should edit the target, not
the shortcut itself.
9 OleVim doesn't send <C-\><C-N>, which causes trouble if Vim is in Insert
mode. (Thakkar)
8 Tear-off menu causes a crash when it contains many items (>100).
(Pedro Gomes) Probably because DLG_ALLOC_SIZE is a fixed number.
Athena GUI:
9 Use one of the Syntax menu items. Then ":aunmenu Syntax", Vim crashes.
Also crashes when using Buffers.Refresh.
9 When using ":unmenu" in menu item, the reversing of menu items is wrong.
Happens with Syntax/manual. Problem with not removing the reversed text
when destroying the menu item? For Rochholz Vim crashes.
9 Because destroying a menu can cause a crash, it is not destroyed but
unmanaged. The destoyed Widgets are remembered, this list is never
cleaned up.
9 When closing the confirm() dialog, Vim exits.
9 Menu ordering doesn't work.
9 When using "menu a.b.c.d lll", the "b" submenu does not disappear.
8 When "j" or "k" repeated quickly, display is messed up (Lauther).
8 Has extra stripes here and there. (Zeitlin).
When dragging last status line with the mouse, small black lines appear in
the command line pseudo-scrollbar (only when status line moved quickly).
7 The file selector is not resizable. With a big font it is difficult to
read long file names. (Schroeder)
Motif GUI:
9 When starting GUI with ":gui" while 'writedel' is non-zero, escape
sequences are split up. Motif version crashes.
9 Motif 1.2: Adding many menu items, making two rows, still doesn't work
properly on HPUX.
8 Implement ":tearoff".
9 When using the right mouse button, for some people gvim freezes for a
couple of seconds. This doesn't happen when there is no Popup menu.
(Halevy)
8 Popup menu ordering is wrong.
8 Dialog: Pointer should be moved to the default button. Accelerators don't
work yet.
8 Lesstif 0.89.4: Tearing-off a menu sometimes gives a "Restoring focus to
NULL widget!" error. Probably a Lesstif problem.
8 Lesstif: When deleting a menu that's torn off, the torn off menu becomes
very small instead of disappearing. When closing it, Vim crashes.
(Phillipps)
GUI:
9 When using a very small font, 'columns' can be very big. Either handle a
large value everywhere, or set a maximum MAX_COLUMNS.
9 On Solaris, creating the popup menu causes the right mouse button no
longer to work for extending the selection. (Halevy)
9 When running an external program, it can't always be killed with CTRL-C.
e.g. on Solaris 5.5, when using "K" (Keech). Other 'guipty' problems on
Solaris 2.6. (Marley)
9 On Solaris: Using a "-geometry" argument, bigger than the window where Vim
is started from, causes empty lines below the cmdline. (raf)
8 X11 GUI: When menu is disabled by excluding 'm' from 'guioptions', ALT key
should not be used to trigger a menu (like the Win32 version).
8 Basic flaw in the GUI code: NextScreen is updated before calling
gui_write(), but the GUI code relies on NextScreen to represent the state
of where it is processing the output.
Need better separation of Vim core and GUI code.
8 When fontset support is enabled, setting 'guifont' to a single font
doesn't work.
8 Menu priority for sub-menus for: Athena, Amiga, Mac, VMS, BeOS.
8 Commands to enable/disable menu entries. Patch in HierAssist. (Shah)
8 Add menu separators for Athena, Amiga, Mac, RISCOS.
8 Add way to specify the file filter for the browse dialog. At least for
browse().
8 Add dialog for search/replace to other GUIs? Tk has something for this,
use that code? Or use console dialog.
8 gui_check_colors() is not called at the right moment. Do it much later,
to avoid problems.
8 gui_update_cursor() is called for a cursor shape change, even when there
are mappings to be processed. Only do something when going to wait for
input. Or maybe every 100 ms?
8 X11: When the window size is reduced to fit on screen, there are blank
lines below the text and bottom scrollbar. "gvim -geometry 80x78+0+0".
When the "+0+0" is omitted it works.
8 When the character cell of some fonts is different (ascent/descent), the
cursor leaves an underline behind (Hiebert).
8 When starting an external command, and 'guipty' set, BS and DEL are mixed
up. Set erase character somehow?
8 A dead circumflex followed by a space should give the '^' character
(Rommel). Look how xterm does this.
Also: Bednar has some code for dead key handling.
Also: Nedit 5.0.2 with USE_XMIM does it right. (Gaya)
8 The compose key doesn't work properly (Cepas). Both for Win32 and X11.
7 The compiled-in highlight defaults allocate colors, which will never be
freed. Move them to a startup script? Only use bold and underline for
the compiled-in defaults.
7 The cursor in an inactive window should be hollow. Currently it's not
visible.
8 With wrapping lines, clicking below the scrollbar thumb moves more than a
screenfull of lines. Adjust the thumb size when lines wrap.
7 GUI on Solaris 2.5.1, using /usr/dt/..: When gvim starts, cursor is
hollow, after window lowered/raised it's OK. (Godfrey)
7 When starting GUI with ":gui", and window is made smaller because it
doesn't fit on the screen, there is an extra redraw.
8 When setting font with .Xdefaults, there is an extra empty line at the
bottom, which disappears when using ":set guifont=<Tab>". (Chadzelek)
8 When font shape changes, but not the size, doing ":set font=" does not
redraw the screen with the new font. Also for Win32.
When the size changes, on Solaris 2.5 there isn't a redraw for the
remaining part of the window (Phillipps).
- Flashes really badly in certain cases when running remotely from a Sun.
MSDOS/DJGPP:
9 DOS: Make CTRL-Fx and ALT-Fx work.
CTRL-F1 = CE-5E, CTRL-F2 = CE-5F, .., CTRL-F10 = CE-67
ALT-F1 = CE-68, ALT-F2 = CE-69, .., ALT-F10 = CE-71
Shifted cursor keys produce same codes as unshifted keys. Use bioskey(2)
to get modifier mask for <S-C-M-Fx>.
Use CSI codes to insert modifier mask in input stream? Make this work
like in the GUI, but do handle a typed CSI.
Mapping things like <M-A> doesn't work, because it generates an extended
key code. Use a translation table?
9 Can't read an opened swap file when the "share" command has not been used.
At least ignore the swap files that Vim has opened itself.
8 Vim busy waits for new characters or mouse clicks. Should put in some
sort of sleep, to avoid eating 50% of the CPU time. Test on an unpatched
Windows 95 system!
8 DJGPP: when shell is bash, make fails. (Donahoe)
8 DJGPP: ":mode" doesn't work for many modes. Fix "fast" text output
functions?
7 Hitting CTRL-P twice quickly (e.g. in keyword completion) on a 8088
machine, starts printer echo! (John Mullin).
7 MSDOS 16 bit version can't work with COMSPEC that has an argument, e.g.:
COMSPEC=C:\WINDOWS\COMMAND.COM /E:4096 (Bradley)
Caused by BCC system() function (Borland "make" has the same problem).
8 Makefile.bor can't compile xxd and ctags without editing the makefiles.
Create a Makefile.bor for xxd and ctags.
8 Check if with DJGPP 2.01 the problem of a path starting with a backslash is
still present.
8 Mouse: handle left&right button pressed as middle button pressed. Add
modifier keys shift, ctrl and alt.
7 When too many files are open (depends on FILES), strange things happen.
The Dos16 version runs out of memory, in the Dos32 version "!ls" causes a
crash. Another symptom: .swp files are not deleted, existing files are
"[New file]".
7 DJGPP version doesn't work with graphics display mode. Either disallow
them or switch to system functions.
MSDOS, OS/2 and Win32:
8 OS/2: Add backtick expansion. Undefine NO_EXPANDPATH and use
gen_expand_wildcards().
8 Win32 console: <M-Up> and <M-Down> don't work. (Geddes) We don't have
special keys for these. Should use modifier + key.
8 Environment variables in DOS are not case sensitive. Make a define for
STRCMP_ENV(), and use it when comparing environment var names.
8 Setting 'shellslash' has no immediate effect. Change all file names when
it is set/reset? Or only use it when actually executing a shell command?
8 When editing a file on a Samba server, case might matter. ":e file"
followed by ":e FILE" will edit "file" again, even though "FILE" might be
another one. Set last used name in buflist_new()? Fix do_ecmd(), etc.
Windows 95:
8 Editing a file by it's short file name and writing it, makes the long file
name disappear. Use Unix method for making a backup file? Better: make
the way the backup file is made (copy or rename) an option, not a #define
(also needed for OS/2, the icon goes to the backup file).
Use FindFirstFile()->cAlternateFileName in fname_case() (George).
8 Doing wildcard expansion, will match the short filename, but result in the
long filename (both DJGPP and Win32).
Win32 console:
9 When editing a file by its short file name, it should be expanded into its
long file name, to avoid proplems like these: (Mccollister)
1) Create a file called ".bashrc" using some other editor.
2) Drag that file onto a shortcut or the actual executable.
3) Note that the file name is something like BASHRC~1
4) Go to File->Save As menu item and type ".bashrc" as the file name.
5) Press "Yes" to indicate that I want to overwrite the file.
6) Note that the message "File exists (use ! to override)" is displayed
and the file is not saved.
Use FindFirstFile() to expand a file name and directory in the path to its
long name.
8 Add an option (command line?) not to switch console buffers. Required for
telnetd (Ford). Change termcap_mode_start() and termcap_mode_end().
Test with ataman telnet daemon or Anzio Lite.
Use 'conskey' and/or 'bioskey' options for this?
Alternative: Use BIOS screen output like in os_msdos.c.
8 Also implement 'conskey' option for the Win32 console version? Look at
how Xvi does console I/O under Windows NT.
7 Re-install the use of $TERM and support the use of different terminals,
besides the console.
8 Use of <altgr> modifer doesn't work? 5.3 was OK. (Garcia-Suarez/Guckes)
9 Mapping <C-S-Tab> doesn't work correctly.
9 tmpnam() uses file in root of file system: "\asdf". That doesn't work on
a Netware network drive. Use same function as for Win32 GUI?
8 When exiting, sends ^M^M^J to the console in raw mode (Webb).
8 In os_win32.h, HAVE_STRICMP and HAVE_STRNICMP are defined only if __GNUC__
is not defined. Shouldn't that be the other way around?
9 When using libcall() for a function that returns an invalid pointer, Vim
crashes. Check for a bad pointer with isBadReadPtr(). (Zeitlin)
Doesn't appear to work really, at least check for "1".
Amiga:
9 In mch_expandpath() a "*" is to be expanded, but "\*" isn't. Remove
backslashes in result.
8 Executing a shell, only one option for 'shell' is separated. Should do
all options, using white space separation.
Macintosh:
9 When DiskLock is running, using a swap file causes a crash. Appears to be
a problem with writing a file that starts with a dot. (Giacalone)
9 On G3 Mac, OS version 8, control strip causes characters messed up when
scrolling (CTRL-L cleans it up). (Benji Fisher)
9 On G3 Mac, OS version 8, variable-speed scrolling doesn't work, after two
seconds of scrolling the screen freezes. (Benji Fisher)
scrolling (CTRL-L cleans it up). (Benji Fisher)
9 In mac_expandpath() check that handling of backslashes is done properly.
9 Executable is called "vimPPC" instead of "gvim"? (Amerige)
8 Standard Mac buttons and shortcuts are missing. No close button.
(Amerige)
8 An invocation of gvim hands over control to an existing gvim. (Amerige)
8 Handling of non-fixed width fonts is wrong. (Amerige)
8 StatusLine and StatusLineNC highlighting isn't right. (Amerige)
VMS:
9 Make a runtime archive for VMS.
8 VMS: Inserts <NL> every 8291 bytes when writing. (Howie) 4.5 didn't have
this problem. It's caused by the write() function, need to write() every
line separately. It seems read() also returns a single line. Switch I/O
to binary mode somehow?
7 Lots of code in common with os_unix.c, but many fixes are missing. For
example, usage of t_ts and t_fs.
"Small" problems:
9 When jumping to a tag, the search pattern is put in the history. When
'magic' is on, the pattern may not work. Translate the pattern depending
on p_magic when putting it in the history? Alternative: Store value of
'magic' in history. (Margo)
9 Viminfo file becomes corrupt when editing a file with a <NL> in the name.
(file marks, buffer list, history of marks) (Alexander N.Benner, Wichert
Akkerman, Weisselberg)
Also problems with buffer menu.
9 optwin.vim: Restoring a mapping for <Space> or <CR> is not correct for
":noremap". Add "mapcmd({string}, {mode})? Use code from ":mkexrc".
8 When some features are disabled, the related commands cannot check for a
following command: ":syntax", ":[id]jump", ":[id]search", "[id]list" and
"[id]split". Add special function to check for a trailing argument when
the feature is not included.
9 When starting gvim in an xterm, Vim sends t_vi and t_ve to the terminal
(cursor invisible/visible). Should not happen.
9 incsearch is incorrect for "/that/<Return>/this/;//" (last search pattern
isn't updated).
9 term_console is used before it is set (msdos, Amiga).
9 Get out-of-memory for ":g/^/,$s//@/" on 1000 lines, this is not handled
correctly. Get many error messages while redrawing the screen, which
cause another redraw, etc.
9 When a library is added twice, it will add to the size of Vim. E.g. for
"-lXt". Remove the first one?
9 When first editing file "test", which is symlink to "test2", and then
editing "test2", you end up editing buffer "test" again. Change the name
of the buffer to the actual file, instead of using the name of the
symlink?
8 [<C-I> doesn't work when '*' is in 'iskeyword'. find_pattern_in_path()
must escape special characters in the pattern.
8 Vim can overwrite a read-only file. ":w" can't overwrite an existing
file, "w!" can, but perhaps not a read-only file? Then use ":w!!" for
that.
Or ask for permission to overwrite it (if file can be made writable) and
restore file to readonly afterwards.
8 Buffers menu, when torn-off, disappears when being refreshed.
8 Is calling msg_start() in main() really needed? Any printed message
should include it already.
8 When in Insert mode with 'scrolloff' set, inserting text at the end of the
file, "!" lines will stay there while they could be used. (Park)
8 When writing an encryption file the extra 12 bytes are not reported, but
when reading they are. Be consistent! (Colombo)
8 Unix in an xterm: Select something on the cmdline; go back to text; now
<S-MiddleMouse> pastes the selection, but <MiddleMouse> doesn't. Xterm
first tries getting the primary selection, and if that doesn't work it
gets CUT_BUFFER0.
8 When owning the PRIMARY selection, also get the CLIPBOARD selection.
(Neil Bird) Use the "+ register to access the clipboard? (Bird)
Use "unnamed", "clipboard" and "autoselect" in the 'clipboard' option.
(Wall) Also copy text to CUT_BUFFER0, but don't do it too often (can be
slow when there is a lot of text). Or just recommend xcb?
8 When compiled with "xterm_clipboard", startup can be slower and might get
error message for invalid $DISPLAY. Use an option to disable connecting
to the X server, so that Vim doesn't have to be recompiled for this?
Better: Try connecting to the X server in the background (forked), so that
Vim starts up quicker.
8 For xterm need to open a connection to the X server to get the window
title, which can be slow. Can also get the title with "<Esc>[21t", no
need to use X11 calls. This returns "<Esc>]l{title}<Esc>\".
8 "fg" and "bg" don't work in an xterm. Get default colors from xterm with
an ESC sequence. See ~/vim/patches/vikas.xtermcolors .
8 Add term entries for function keys on xterm with alt and ctrl (new in pl
94). E.g., Control adds ";5" in "<Esc>[20;5~". Find a generic way to
prepend a modifier in console mode, to avoid having to specify each
individual modified key.
8 When the builtin xterm termcap contains codes that are not wanted, need a
way to avoid using the builtin termcap.
8 '[ and '] should be set to start/end of line when using a linewise operator
(e.g., ":w").
8 CTRL-A can't handle big "long" numbers, they become negative. Check for
"-" character, if not present, use unsigned long.
8 Make it possible to disable the special meaning of "#" in the first column
for ">>".
8 When doing ":qa", and there is a change in a buffer that is being edited
in another window, the current window will also be editing the buffer with
the change. Should jump to the window with the changed buffer.
8 Should replace "screen_Columns" with "Columns", and use "new_Columns" for
the value to be used for Columns. Same for "Rows". Helps when using a
GUI with threads.
8 Add suspending with CTRL-Z at the "more" prompt, and when executing a long
script in do_cmdline().
8 When using 'hidden', many swap files will be open. When Vim runs into the
maximum number of open files, error messages will appear. Detect that
this problem is present, and close any hidden files that don't have
changes.
8 With 'viminfo' set such that the ".viminfo" file is written on a FAT
filesystem, an illegal file name may be created: ".vim".
8 For each buffer that is opened, the viminfo file is opened and read to
check for file marks. This can be slow.
7 "dd" on the last line of the file, causes the last but one line to be
redrawn. Should not be necessary.
7 Using "gqj" near the last line of the window, makes the window scroll up,
even though this isn't necessary.
- These mappings don't work with the Win32 versions: (Bradley)
nmap ,p {<Right>V}<Left>
nmap ,> ,p,>
vmap ,> >
Looks like the nmap is used instead of the vmap.
8 Should be able to compile Vim in another directory, with $(srcdir) set to
where the sources are. Add $(srcdir) in the Makefile in a lot of places.
(Netherton)
8 Perl adds arguments to the compiler. Check that compiling a program still
works after that, otherwise following configure checks will fail.
7 In xterm, recognize both vt100 and vt220 cursor keys. Change
add_termcode() to not remove an existing entry for a name, when it's
needed.
Recognize <C-Left> and <C-Right> in new xterm.
Need a generic solution to recognize different codes for the same key.
8 Core dump within signal function: gdb doesn't show stack backtrace! Option
to skip catch_signals()?
8 Pasting with the mouse in Replace mode inserts the text, instead of
overwriting, when it is more than one line. Same for using <C-R>.
7 When using search history, the trailing '/' or '?' needs to be changed
depending on the search command. When there was no '/' or '?', add one, so
flags can be added easily?
7 CTRL-F at the end of the file, when 'so' is set, redraws twice. When the
window is small (< 2 * 'so') it behaves differently.
9 CTRL-E and CTRL-Y don't work in small window when 'so' is 4 and lines are
wrapping (Acevedo/in.226). E.g., when using CTRL-E, window height 7,
window might actually scroll down when last line of buffer is displayed.
--> Remember if the previous command was "cursor follows screen" or
"screen follow cursor" and use this in cursupdate().
9 Text is scrolled up and down: (acevedo)
- set scrolloff to something >1 (i always use "set so=4")
- set the win. hegiht to scrolloff + 1 (i'd do ^W5_)
- load a file with scrolloff + 2 lines
- put the cursor in line scrolloff +1 (5G)
- if you move the cursor along the line (h, l, insert text, etc)
the text is crolled with each keystroke (once up, once down,...)
sometimes with <Esc> the text is scrolled up and down without stop!!!!
7 tilde_replace() can only handle "~/", should also do "~user/".
Get the list of home directories (from /etc/passwd? Use getpwent()) and
use some clever algorithm to match a path with that. Find common strings
in the list?
8 Add 'o' flag to 'mouse'?
8 When dragging status line with mouse, sometimes a jump when first clicking
on the status line (caused by 'winheight'). Select window on button up,
instead of on button down.
7 There are often a few <CR> on a row sent to the screen, should not be
necessary.
8 When performing incremental search, should abort searching as soon as a
character is typed.
8 Make CTRL-C on Unix generate a signal, avoid using select() to check for a
CTRL-C (it's slow). Allow using CTRL-C for "*y, like in MS-Windows.
8 When writing viminfo file, handle CTRL-J in filename (needs to be escaped
with CTRL-V). (Acevedo)
8 When starting Vim, switch terminal to RAW mode asap, so typeahead is
handled correctly (without the need for a <CR>).
8 When the value of $MAKE contains a path, configure can't handle this.
It's an autoconf bug. Remove the path from $MAKE to work around it.
8 How to set VIMRC_FILE to \"something\" for configure? Why does this not
work: CFLAGS='-DVIMRC_FILE=\"/mydir/myfile\"' ./configure
8 The temporary file is sometimes not writable. Check for this, and use an
alternate name when it isn't. Or add the 'temptemplate' option: template
for the temp file name ":set temptemplate=/usr/tmp/?????.tmp".
Also: Win32 version uses Windows temp directory, which might not work for
cygwin bash.
7 Get error "*, \+ or \( operand could be empty" for pattern "\(.\)\1\{3}".
Don't check when compiling, check while matching?
7 When switching to Daylight Saving Time, Vim complains that a file has been
changed since last read. Can we use a function that uses GMT?
I can't reproduce these (if you can, let me know how!):
- With backupdir=~/tmp,/tmp nowritebackup nobackup patchmode=.smr and the
patchmode file exists, backup files in the tmp directory are left lying
around - they should be deleted! (Riehm)
9 Crash when changing fonts in Athena (Hiebert). gui_mch_set_scrollbar_pos
gets an "sb" argument that points to all zero entries...?
9 Crash in Motif GUI, when pasting text with middle mouse button while in
Insert mode. SunOS 4.1.3 only? (Janssen).
8 Motif: Tear-off menu item crashes Vim on some machines. (Netherton) It
works fine for me, maybe it's a Motif problem.
- On Diamond Viper 132x43 mode crash on exit (John Lange)
9 NT 4.0: Editing ".bashrc" (drag and drop), file disappears.
Editing ".xyz" is OK. (McCollister)
8 Win32 GUI: NT: When regaining focus at the more prompt, there is an extra
newline. (Webb)
8 Win32 GUI: Writable File in read-only dir can be deleted but not written?
(Canup)
9 GUI: Between version 5.0h and 5.0i the Home and End keys stopped working
for Micheal Schulz (Linux and AIX).
9 Win32 console: <M-S-Left> causes a crash. (Geddes)
9 In MSDOS version(s): typing ESC three or four times crashes Vim, when
'visualbell' is set (Kielhorn).
[These have been reported for version 3.0, they may not appear in this version]
- MSDOS: After writing on a network the 'w' bit for others is set.
Problems that will (probably) not be solved:
- X windows: When $DISPLAY points to a X server where there is no access
permission, trying to connect to the X server causes an error message.
XtOpenDisplay() prints this directly, there is no way to avoid it.
- Win32: All files created on the day of switching from winter to summer
time cause "changed since editing started" messages. It goes away when
the file is written again the next day, or the timezone is adjusted.
DJGPP version is OK. (Zaimi) Looks like a problem with the Win32 library.
Rebooting doesn't help. Time stamps look OK in directory. (Penn)
- Moving the cursor removes color in color-xterm. This is a color-xterm
problem! color-xterm ver. 6.1 beta 3 and later work properly.
- The Dos32 version (DJGPP) can't use long file names on Windows NT.
- In zsh, "gvim&" changes the terminal settings. This is a zsh problem.
(Jennings)
- Problem with HPterm under X: old contents of window is lost (Cosentino).
- Amiga: When using quickfix with the Manx compiler we only get the first 25
errors. How do we get the rest?
- Amiga: The ":cq" command does not always abort the Manx compiler. Why?
- Linux: A file with protection r--rw-rw- is seen readonly for others. The
access() function in GNU libc is probably wrong.
- MSDOS: When using smartdrive with write-back buffering, writing to a
readonly floppy will cause problems. How to test for a writable floppy
first?
- MSDOS: Both 16 and 32 bit versions: File name expansion doesn't work for
names that start with a dot. These used to be illegal file names.
- When doing a CTRL-Z and typing a command for the shell, while Vim is busy
(e.g. writing a file), the command for the shell is sometimes eaten by Vim,
because the terminal mode is changed from RAW to CBREAK.
- An old version of GNU tgoto can't handle the terminfo code for "AF". The
"%p1" is interpreted as "%p" and "1", causing color not to be working.
Fix: Change the "%p1" in the "AF" and "AB" terminfo entries to "%p".
(Benzinger).
- When running an external command from the GUI, typeahead is going to that
program, not to Vim. It looks like the shell eats the characters, Vim
can't get back what the external command didn't use.
- Win32 GUI: Error code from external command not returned in shell_error.
It appears that cmd.exe and command.com don't return an error code.
- Win32 GUI: The Toolbar is a bit too high when the flat style is being
used. We don't have control over the height of the Toolbar.
- SunOS 5.5.1 with Motif: The file open dialog does not have a horizontal
scroll bar for the "files" selection. This is a problem in the Motif
libraries, get a patch from Sun.
- Solaris 2.6 with GTK and Perl: gvim crashes when started. Problem with X
input method called from GDK code. Without Perl it doesn't crash.
*extensions-improvements*
Considered for release 6.0:
7 Folding.
7 Vertically splitting the screen. Show differences between files (sdiff).
Some way create a new file to merge differences. Examples: Ted
(moon.csie.ntu.edu.tw/pub/X/ted), Aurora (www.ntext.net)
7 Editing the command line with Normal mode Vi commands. See readline(3)
for ideas.
7 Support for editing a remote file through ftp or http (with a script).
7 Further support for editing files in projects (see ":idselect").
7 Patch to add 'autoload' option: Automatically reload buffers that were
changed outside of Vim ~/vim/patches/aaron.autoload . (Aaron)
Also handle the 'reaonly' flag of a file when it was changed outside of
Vim?
9 Add "toolbar" feature, to be used in mswin.vim (it can be disabled at
compile time).
9 Add "mswin" feature, for Win16 and Win32. Include gui_w16.c? (Negri)
8 Add option to disable the dialog for the ATTENTION prompt. In general:
Better control for protecting the user for editing a file twice, file
changed outside of Vim, file protection changed outside of Vim, etc.
8 Patch to use 'suffixes' for included files. ~/vim/patches/waghorn.suffixes
. (Waghorn)
- Add patch from Wall for this one:
'flipcase' variable: upper/lower case pairs. (alternative: translate
command, e.g. ":tr \248-\254 \216-\222") (From Elvis, don't like it).
Insert comma's between pairs and allow a range, e.g. :set
flipcase=a-zA-Z,..
8 Win32 GUI: Implement flag to avoid "hit any key to continue" in DOS
console used to execute external commands. Pass a flag to vimrun.exe.
8 Add cscope_connection() function ~/vim/patches/kahn.cscopeconn .
Also ~/vim/patches/kahn.5.4.cscope . (Kahn)
8 Make ":normal" command accept <Key> notation, like ":map".
8 Rename all version directories to vim54 instead of vim-5.4, also for the
distribution.
8 GNOME support for GTK version ~/vim/patches/kahn.5.4.gnome .
8 Remove runtime/macros/html.
8 Adjust colortest.vim: Include colors on normal background (Szalai).
Reduce the size by using a while loop.
8 Use $install_prefix? (Cabric)
8 When color cannot be allocated, use nearest match. Useful when netscape
has eaten many colors. Check FindClostestColor in Tcl/Tk. (Shah)
8 Add the possibility for a maintainer of a binary version to include his
e-mail address. In the ":version" or ":intro" message?
8 ">>" with 'softtabstop' set should work like 'tabstop' is set to
'softtabstop'. (Zivkov) But what about when there is a string?
8 Rename vim-5.5x to vim55x for all distributions, also Unix. Easier to
type and no differences between systems.
8 Include patch to speedup display updating for DJGPP version. (Negri)
~/Mail/oldmail/negri/in.00918 .
8 Make clipboard work for Dos32 version. (Negri)
8 Include Gnome support? ~/vim/patches/kahn.gnome.gz (Kahn)
8 Add ":bnew" command? ~/vim/patches/wall.bnew (Wall)
9 ":redir @*" should work: Redirect to the clipboard. Just allow using this
register and add a flag to write_reg_contents() to append.
~/vim/patches/wall.redir (Wall)
8 ":redir >$HOME/xxx" should work: expand file name argument of ":redir".
Documentation:
9 Change examples in docs: Instead of a ">" in front of every line, use " >"
once at end of line before the example and "<" after the last line (or a
not-indented line). Use the syntax cmd:
:syn region helpExample matchgroup=Ignore start=" >$"
\ end="^[^ \t]"me=e-1 end="^<"
Allows for copy/pasting the examples. Put ">" on a separate line when
there is room.
9 In change.txt, remark about Javadoc isn't right. Right alignment would
work too.
8 Spread the windows commands over the other files. For example, ":stag"
should be with ":tag". cross-link with tags to avoid too much double
text.
8 make vimtutor.bat for DOS and vimtutor script for Amiga. Then add
vimtutor.man to the runtime archive.
8 Add an example vimrc for using Vim as a modeless editor. Emulate an
existing editor (WordStar, Brief?).
7 Windows: When a wrong command is typed with an ALT key, give a hint to
look at the help for 'winaltkeys'.
- Check text editor compendium for vi and Vim remarks.
- Add some text for xxd.
Help:
8 When a help window is closed, delete the help buffer from the buffer list?
- First try using the ":help" argument literally, before using it as a
pattern. And then match it as part of a tag.
- Use GNU Texinfo for the help files somehow? Use Info format files?
At least the other way around: Use Vim to view (and edit) .info files.
- Default mapping for help files: <Tab> to position cursor on next |:tag|.
- When hitting <Esc> or CTRL-C in Normal mode, give a message to help novice
users to get out: "Type :q! to quit Vim".
- Implement a "sticky" help window, some help text lines that are always
displayed in a window with fixed height. (Guckes) Use "~/.vimhelp" file,
user can edit it to insert his favorite commands, new account can contain a
default contents.
- When entering the help window, don't resize to 'helpheight' if the user has
reduced the size before (Webb). Keep the window height that the user set
the window to in a "preferred window height" entry for each window.
- ":help :s^I" should expand to ":help :substitute".
- Make the help key (<F1>) context sensitive?
- Learn mode: show short help while typing commands.
"make test":
- Find a way to skip tests that can't be done. For non-Unix systems, but
also for e.g. the Perl interface.
Syntax highlighting:
8 Make it easier to add new or modified syntax files. Use a search path for
syntax files instead of synload?
8 Allow the user to add items to the Syntax menu sorted, without having to
change this for each release.
8 Add patch from Scott Bigham for back referencing.
~/vim/patches/bigham.regexp3 .
8 Some syntax files set 'iskeyword'. When switching to another filetype
this isn't reset. Add "set isk&" to all syntax files?
8 Add specific syntax item to match with parens/braces that don't have a
match. :syntax nomatch cParenError "("
8 Add a command to jump to the next characterw highlighted with "Error".
8 Highlight the text between two matching parens (e.g., with a grey
background) when on one of the parens or in between them.
8 When using a cterm, and no ctermfg or ctermbg are defined, use start/stop
sequences. Add remark in docs that :if 'term' == "term-name" should be
used.
8 Add @spell cluster to String and Comment groups for many languages. Will
allow spell checking. (Fleiner)
8 When listing syntax items, try to sort the keywords alphabetically. And
re-insert the [] if possible.
8 Make it possible to use color of text for Visual highlight group (like for
the Cursor).
8 Make it possible to only highlight a sub-expression of a match. Like
using "\1" in a ":s" command.
8 Add a way of syncing where it always starts at the beginning of the file,
to find the group where redrawing starts. Useful for "#if 0" constructs
in C. (Geddes)
c.vim: Use advanced syncing to make long "#if 0" constructs work.
8 cpp.vim: In C++ it's allowed to use {} inside ().
8 Keep more context for syncing, but not for every line. Make this settable
with some command ":syn sync context=1000 skip=10" (store state for 1000
lines, every 10 lines).
Store the context with the window, instead of the buffer. Useful when
there are two windows on the same buffer.
OR: Use three options:
syntaxminsyncs: minimal number of sync points (for speedy small files)
syntaxmaxsyncs: maximum number of sync points (for very big files)
syntaxsyncdist: number of lines between two sync points (overruled by
the other two options).
8 Support for deleting syntax items:
:syn keyword cTodo remove this
:syn match cTodo remove "pattern"
:syn region cString remove start="this" end="that"
8 Make it possible for a skip pattern to include "$", so that it can skip
over newlines for a "oneline" region.
8 Make it possible to use "inverted" highlighting, invert the original
character. For Visual mode. (xterm-selection already does this).
8 Highlight non-printable characters with "SpecialChar", linked to
"Special". Display them with the digraph characters, if possible.
8 Highlight the clipboard-selection with a highlight group.
8 Be able to reset highlighting to its original (default) values.
7 Be able to write current highlighting to a file as commands, similar to
":mkvimrc".
8 Reduce the number of regexp in c.vim (for speed).
8 Add check for unterminated strings in c.vim, with a variable to switch it
on: "c_strict_ansi".
8 Add a flag to temporarily disable highlighting. Set it while dragging the
status line.
8 Add an option to restrict the updating of syntax highlighting to the
current line while in Insert mode.
8 When guessing value of 'background', the syntax file has already been
loaded (from the .gvimrc). After changing 'background', load it again?
8 Add ":syn resync" command, to re-parse the whole file until the current
display position.
8 Should support "me" offset for a region start pattern. To be used to
allow searching for the end pattern inside the match of the end pattern.
Example: syn region pikeXX start="([^{]" end=")" should work on "()".
8 When using a regexp for "contains=", should delay matching with it until
redrawing happens. Set a flag when a group is added, check this flag when
highlighting starts.
7 Add "semitrans": Add highlighting. E.g., make the text bold, but keep the
colors. And add colors, so that Green+Red becomes Yellow.
7 CTRL-] checks the highlight group for finding out what the tag is.
6 Not possible now: Two regions that add up. E.g. for this html:
<B> bold text <I> italic+bold text </B> italic text </I>
7 Not only change highlighting of text, also change what is displayed. Can
be used to hide tags, e.g.
:syn region boldstuff start="<B>" display="" end="</B>" display=""
7 Add an explanation how a list of words can be used to highlight misspelled
words.
7 Should find a better way to parse the :syntax and :highlight commands.
Use tables or lists that can be shared by parsing for execution and
completion?
7 Add a few sets of colors (e.g. Borland Turbo C one). With a menu to
select one of the sets.
8 Add offsets to sub-matches: "\(a*\) *"he=e1-1
'e' is end of match 'e1' is end of sub-match 1, 's2' is start of submatch
2, etc.
8 Add more command line completion for :syntax.
8 Add more command line completion for :highlight.
8 In Insert mode, when there are typeahead characters, postpone the
highlighting (for "." command).
8 Syncing on comments isn't 100% correct when / / lines mix with / * and * /.
For example: What about a line that starts with / / and contains * /?
8 Ignore / * and * / inside strings, when syncing.
8 Add possibility to sync on something else, when the syncing in one way
doesn't find match. For HTML: When no {script} is found, try looking for
a '<'. (Fleiner)
8 Replace the synchronizing method with a state machine specification.
Should be able to start at any line in the file, search forwards or
backwards, and use the result of matching a pattern.
7 Build a few more syntax files from the file "/usr/share/misc/vgrindefs":
ISP, LDL, Icon, ratfor. And check "nedit/source/highlight.c".
6 Add possibility to have background color continue until the right edge of
the window. Useful for comment blocks and function headings. (Rogall)
- Make it possible to add "contains" items for all items in a group. Useful
when extending an already existing syntax file.
- Allow the use of "blink". Make a new attr when it's used.
- Add line-continuation pattern for non-syncing items too?
7 Allow "\@1" in end (and skip) pattern, use first sub-match of start
pattern. To be used in e.g.: 'start="[/=+]" end="\@1"' Also for Perl.
8 Add cursor-column highlighting. Enable it with 'cursorcolumn' option, set
highlighting with "CursorColumn" group. Useful for aligning text.
Also cursor-row highlighting.
- Add possibility to highlight specific columns (for Fortran). Or put a
line in between columns (e.g. for 'textwidth').
- Add possibility to highlight the whole line, including the right margin
(for comment blocks).
- Add 'hlmatch' option: List of flags:
'c': highlight match for character under the cursor.
'b': highlight the previous (, and its match.
'a': highlight all text from the previous ( until its match.
Also for {}, <>, etc.?
'e': highlight all braces without a match (slow?)
OR: add an argument "cursor" to the syntax command, which means that the
region/match/keyword is only highlighted when the cursor is on it.
(Campbell)
7 Make it possible to use all words in the tags files as Keyword.
Can also be done with a script (but it's slow).
7 Make it possible to call a ":" command when a match is found. Should
allow for adding keywords from the text (e.g. variables that are set).
And allows for sections with different highlighting.
7 Add highlight group for commandline: "Commandline". Make sure it
highlights the command line while typing a command, and any output from
messages. And external commands?
8 Make a version that works like less, but with highlighting: read stdin for
text, exit at end of file, don't allow editing, etc. moreim? lessim?
Built-in script language:
8 Add referring to key options with "&t_xx". Both for "echo &t_xx" and
":let &t_xx =". Useful for making portable mappings.
8 Allow range for ":exec". Pass it on to the executed command. (Webb)
8 Add a way to catch errors:
:try
: [commands that can fail]
:catch [error-type]
: [error handling]
:endtry
8 Have a look at VSEL. Would it be useful to include? (Bigham)
8 Add ":fungroup" command, to group function definitions together. When
encountered, all functions in the group are removed. Suggest using an
obscure name to avoid name clashes. Require a ":fungroup END" in the same
sourced file? Assume the group ends at the end of the file. Handle
nested packages?
Alternative: Support packages. {package-name}:{function-name}().
Packages are loaded automatically when first used, from
$VIMRUNTIME/packages (or use a search path).
Or add a FuncUndefined autocommand, so that the user can handle loading a
function as he pleases. (Aaron)
Pre-parse or compile Vim scripts into a bytecode. Put the bytecode with
the original script, with an ":if" around it, so that it's only used with
a Vim that supports it.
8 The input() function should not read mapped characters, but always get
characters from the user (or a script). Need to change vgetorpeek() to
ignore mapped characters.
8 Add functions:
cursor(lnum, col) Position cursor (when lnum or col 0 keep val)
col("$") Column number of last char in line. See
~/vim/patches/wall.coldollar .
multibyteidx(string, idx) Byte index in multi-byte character.
menuname({menu_name}, {idx}) get name of menu. menuname("", 1)
returns "File", menuname("File", 1) returns
"Open...".
menuarg({menu_name}) return argument of a menu item by name.
mapname({idx}, mode) return the name of the idx'th mapping.
match({pat}, {string}, [count]) get index of count'th match
stridx(bigstr, smallstr) return index of first smallstr in bigstr
strridx(bigstr, smallstr) return index of last smallstr in bigstr
sprintf(format, arg, ..) How to prevent a crash???
inputpassword() Ask user to enter password without showing it.
Or extra argument to input() (Haegg)
attributes() return file protection flags "drwxrwxrwx"
perl(cmd) call Perl and return string
shorten(fname) shorten a file name, like home_replace()
input(prompt, complete) like input() but do specified completion
filewritable() like filereadable()
getfperm() file permissions, in form "rwxrwxrwx"
getfsize() file size in bytes (directory is 0)
getftype() "file", "dir", "link", "other"?
getbufvar({bufid}, {name})
setbufvar({bufid}, {name}, {value})
get/set value of variable {name} in buffer
{bufid} See ~/vim/patches/aaron.getbufvar4
setwinvar()
getwinvar()
libcall() Allow more than one argument.
libcallnr() Like libcall(), but function returns a number.
fnamemod({fname}, {mod}) {mod} can be ":p:h" etc., to be applied to
{fname}
getchar() get one character from the user.
confirm() add "flags" argument, with 'v' for vertical
layout and 'c' for console dialog. Also add
'c' to 'guioptions' (for all dialogs) (Haegg)
toupper({string})
tolower({string})
filter({cmd} [, {string}]) Filter {string} through the shell command
{cmd} and return the result. If {string} is
omitted no input is given to {cmd}.
getkey() Like input() but get only one char.
8 argc() returns 0 when using "vim -t tag". How to detect that no file was
specified in any way? To be able to jump to the last edited file.
8 When starting to source a vim script, delete all functions that it has
previously defined. Avoids using ":fun!" all the time.
8 Include support for arrays? Patch from Robert Webb.
7 Add optional arguments to user functions:
:func myFunc(arg1, arg2, arg3 = "blah", arg4 = 17)
6 User functions: Functions local to buffer "b:func()"?
8 Add ":let var[{expr}] = {expr}". When past the end of "var" just ignore.
8 The "= register should be writable, if followed by the name of a variable,
option or environment variable.
8 ":let &option" should list the value of the option.
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).
7 Support for "gtags" and "global"? With ":rtag" command?
There is an example for how to do this in Nvi.
Or do it like Elvis: 'tagprg' and 'tagprgonce' options. (Yamaguchi)
The Elvis method is far more flexible, do it that way.
7 Support "col:99" extra field, to position the cursor in that column. With
a flag in 'cpoptions' to switch it off again.
7 Better support for jumping to where a function or variable is used. Use
the id-utils, with a connection to "gid" (Emacs can do it too). Add
":idselect", which uses an "ID" database (made by "mkid") like "tselect".
6 Don't store the search pattern from a tag command in the search history
(with an option)?
Security:
8 Add 'security' option. When "paranoid", disallow many things, like
setting 'grepprg' and 'makeprg' from a modeline. When "trusted" allow
these things. When "warn" give a warning message.
Perhaps disallow setting these from a modeline: errorfile, backupdir,
directory, makeef and viminfo. And maybe backup and writebackup?
7 Disallow changing the buffer for commands from a tags file. Also for
commands from a local .vimrc? Sort of strict secure mode.
Win32 GUI:
8 Add font argument to set the lfCharSet. (Bobcik)
8 Remove "VIM -" from title, to give more room to path? The icon should
identify the Vim process.
8 Could keep console open to run multiple commands, to avoid the need to hit
return in every console.
Also: Look at how Emacs does runs external commands:
http://www.cs.washington.edu/homes/voelker/ntemacs.html.
8 When dropping a file onto gvim while at the ":" prompt, insert the file
name. Allows using the name with different commands. (Krishna)
7 Add a way to change the filter menu in the file selection dialog.
8 Need a separate PopUp menu for modeless selection. Need two new commands:
Copy selection to clipboard, Paste selection (as typed text).
8 Dropping a file on a gvim that edits a modified buffer splits the window.
Make an option to replace the current file (use ":e" instead of ":sp")?
When dropping multiple files, display the first one and adjust the
arglist. Or make it an option for the user to chose betwen ":e" and ":sp"?
8 Support copy/paste for other file formats. At least HTML, perhaps RTF.
Add "copy special" and "paste special" commands?
7 Use <C-Tab> to cycle through open windows (e.g., the find dialog).
7 <Esc> should close a dialog.
7 Keep the console for external commands open. Don't wait for a key to be
hit. Re-open it when the user has closed it anyway. Or use a prepended
command: ":nowait {cmd}", or ":quiet", which executes {cmd} without any
prompts.
7 Should be able to set an option so that when you double click a file that
is associated with Vim, you can either get a new instance of Vim, or have
the file added into an already running Vim.
GUI:
9 Make <S-Insert> paste from the clipboard by default. (Kunze)
8 Dragging the mouse pointer outside of a Vim Window should make the text
scroll. Return a value from gui_send_mouse_event() to the machine
specific code to indicate the time in which the event should be repeated.
8 Make it possible to ignore a mouse click when it's used to give Vim (gvim)
window focus. Also when a mouse click is used to bring a window to front.
8 Make the split into system independend code and system specific code more
explicit. There are too many #ifdefs in gui.c.
If possible, separate the Vim code completely from the GUI code, to allow
running them in separate processes.
8 Support a background bitmap. Useful for marking a column. Patch from
Heather Downs (GTK) and Vince Negri (Win32).
8 Visual highlighting should keep the same font (bold, italic, etc.).
8 Make the "Save As.." menu item work like other GUI programs: ":w file",
":e file".
8 Add 'c' flag in 'guioptios' to use console dialogs instead of GUI dialogs.
Esp. for the ATTENTION prompt.
7 Allow setting the mouse pointer shape, for different modes. Ralston has
an old patch for this. Negri has one for Win32.
8 Add flag to 'guioptions' to not put anything in the clipboard at all?
8 ":let @* = 'text'"' should set the selection. (Krishna)
8 Should take font from xterm where gvim was started (if no other default).
8 Selecting font names in X11 is difficult, make a script or something to
select one.
8 Should support a way to use keys that we don't recognize yet. Add a
command that adds entries to special_keys somehow. How do we make this
portable (X11, Win32, ..)?
8 Add option to use some lines of space between characters. Useful for
multi-byte fonts. See patch from Nam.
7 Add a flag to 'guioptions' that tells not to remove inactive menu items.
For systems where greying-out or removing menu items is very slow. The
menu items would remain visibly normally, but not do anything.
7 Add ":minimize" and ":maximize", which iconize the window and back.
Useful when using gvim to run a script (e.g. 2html.vim).
7 X11: Is it possible to free allocated colors, so that other programs can
use them again? Otherwise, allow disabling allocating the default colors.
Or allocate an own colormap (check UAE). With an option to use it. For
the commandline, "-install" is mostly used for X11 programs.
Or: Find the nearest color. Patch from HierAssist. (Shah)
7 X11: Check for keypad keys, so that they can be mapped separately.
(Wellesz) ~/vim/patches/wellesz.keypad . But don't differentiate for
different modes. Use key codes like xterm?
7 GUI: Allow selection without moving the cursor by keeping CTRL and SHIFT
pressed. (Wellesz) ~/vim/patches/wellesz.keypad .
7 Add command line argument for "gvim" not to start the GUI. Sort of the
inverse of "vim -g". (Vikas)
6 Local buffer menus. (Zachmann)
7 Should support multi-column menus.
- Should add option for where to put the "Help" menu: like Motif at the far
right, or with the other menus (but still at the right).
- Add menu item to "Keep Insert mode".
8 ":mkgvimrc" command, that includes menus.
6 Big change: Move GUI to separate program "vimgui", to make startup of vim a
lot faster, but still be able to do "vim -g" or ":gui".
6 Make it possible to "drag the text" (grab a character and move it
up/down). Use Alt-LeftMouse for this? (Goldfarb)
7 More explicit mouse button binding instead of 'mousemodel'?
7 Add option to set the position of the window on the screen. 'windowpos',
which has a value of "123,456": <x>,<y>.
Or add a command, like ":winsize"?
7 Add toolbar for non-Win32 GUIs.
7 Make it possible to put the toolbar on top, left, right and/or bottom of
the window? Allows for softkey-like use.
6 Separate the part of Vim that does the editing from the part that runs the
GUI. Communicate through a pseudo-tty. Vim starts up, creates a
pty that is connected to the terminal. When the GUI starts, the pty is
reconnected to the GUI process. When the GUI stops, it is connected to
the terminal again. Also use the pty for external processes, it looks
like a vt100 terminal to them. Vim uses extra commands to communicate GUI
things.
- Motif steals <F10> from us, to pop up menus with the keyboard. How do we
get it back if we want it?
- Paste in Insert mode should not do autowrap etc. Or maybe this should be
changeable with an option?
- Put a nice picture in the icon (but how do we do that?).
7 When using a pseudo-tty Vim should behave like some terminal (vt52 looks
simple enough). Terminal codes to/from shell should be translated.
- Would it be useful to be able to quit the GUI and go back to the terminal
where it was started from?
Autocommands:
9 Make sure that side effects of autocommands are handled correctly. Don't
execute autocommands when a buffer or window is halfway some changes.
Move all apply_autocmds() calls to a higher level where needed.
8 Use another option than 'updatetime' for the CursorHold event. The two
things are unrelated for the user (but the implementation is more
difficult).
8 Can't use ":normal" in CursorHold autocommands. Make the CursorHold event
insert a special key code, and call the autocommand functions from a
higher level, so that vgetc() isn't used recursively.
8 Autocommands should not change registers. And marks? And the jumplist?
And anything else?
8 Autocommand for when modified files have been found, when getting input
focus again (e.g., FileChangedFocus).
Check when: getting focus, jumping to another buffer, ...
8 Add autocommands, user functions and user commands to ":mkvimrc".
8 Add "TagJumpFile" autocommand: When jumping to another file for a tag.
Can be used to open "main.c.gz" when "main.c" isn't found.
7 Add a way to skip an autocommand if going from one *.c file to another *.c
file.
7 When trying to open a directory, don't load the file but trigger an
autocommand event OpenDirectory.
7 Add file type in front of file pattern: <d> for directory, <l> for link,
<x> for executable, etc. <&xxx> for Risc OS. With commas to separate
alternatives. The autocommand is only executed when both the file type
AND the file pattern match. (Leonard)
5 Add option that specifies extensions which are to be discarded from the
file name. E.g. 'ausuffix', with ".gz,.orig". Such that file.c.gz will
trigger the "*.c" autocommands. (Belabas)
7 Add something to break the autocommands for the current event, and for
what follows. Useful for a "BufWritePre" that wants to avoid writing the
file.
8 Detect textmode after executing the autocommands, otherwise the .gz
autocommands don't work for MS-DOS. Needs to be able to remove the ^Ms at
the end of each line. Alternative: don't use a filter command, write the
file, gunzip, set nobin, delete the lines, read the file.
- Add events to autocommands:?
Error - When an error happens
NormalEnter - Entering Normal mode
InsertEnter - Entering Insert mode
ReplaceEnter - Entering Replace mode
CmdEnter - Entering Cmdline mode
VisualEnter - Entering Visual mode
*Leave - Leaving the mode
SearchPost - After doing a search command (e.g. to do "M")
BufModified - When a buffer becomes modified, or unmodified (for
putting a [+] in the window title).
HierAssist has patch to add BufChangePre, BufChangePost
and RevertBuf. (Shah)
PreDirChanged/PostDirChanged
- Before/after ":cd" has been used (for changing the
window title)
BufReadAction - replaces reading a file
BufWriteAction - replaces writing a file
ShutDown - when the system is about to shut down
InsertKeyPre - key hit in Insert mode, before inserting the char.
InsertKeyPost - key hit in Insert mode, after inserting the char.
FuncUndefined - calling a user function which doesn't exist (
~/vim/patches/aaron.getbufvar3 )
- Add autocommand to be executed every so many seconds? For writing the
file now and then ('autosave').
*'autosave'* *'as'* *'noautosave'* *'noas'*
'autosave' 'aw' number (default 0)
Automatically write the current buffer to file N seconds after the
last change has been made and when |'modified'| is still set.
Default: 0 = do not autosave the buffer.
Insert mode completion:
9 ^X^L completion doesn't repeat correctly. It uses the first match with
the last added line, instead of continuing where the last match ended.
(Webb)
8 The code has become too complex. Redesign it, or at least add proper
comments.
8 Add a command to undo the completion, go back to the original text.
8 Use the class information in the tags file to do context-sensitive
completion. After "foo." complete all member functions/variables of
"foo". Need to search backwards for the class definition of foo.
Should work for C++ and Java.
8 Add thesaurus completion: ~/vim/patches/negri.thesaurus-mouseshape .
7 Add CTRL-X command in Insert mode like CTRL-X CTRL-N, that completes WORDS
instead of words.
8 Add CTRL-X CTRL-R: complete words from register contents.
8 Add completion of previously inserted texts (like what CTRL-A does).
Requires remembering a number of insertions.
8 Add 'f' flag to 'complete': Expand file names.
Also apply 'complete' to whole line completion.
- Make it possible to search include files in several places. Use the
'path' option? Can this be done with the dictionary completion (use
wildcards in the file name)?
- Make CTRL-X CTRL-K do a binary search in the dictionary (if it's sorted).
- Speed up CTRL-X CTRL-K dictionary searching (don't use a regexp?).
- Set a mark at the positition where the match was found (file mark, could
be in another file).
- Add CTRL-A command in CTRL-X mode: show all matches.
- Make CTRL-X CTRL-L use the 'complete' option?
- Add command in CTRL-X mode to add following words to the completed string
(e.g. to complete "Pointer->element" with CTRL-X CTRL-P CTRL-W CTRL-W)
- CTRL-X CTRL-F: Use 'path' to find completions.
- CTRL-X CTRL-F: Don't replace "$VIM" with the actual value. (Kelly)
8 Add option 'isexpand', containing characters when doing expansion (so that
"." and "\" can be included, without changing 'iskeyword'). (Goldfarb)
Also: 'istagword': characters used for CTRL-].
When 'isexpand' or 'istagword' are empty, use 'iskeyword'.
Command line completion:
8 Change expand_interactively into a flag that is passed as an argument.
8 When completing command names, either sort them on the long name, or list
them with the optional part inside [].
- For 'wildmenu': Simplify "../bar" when possible.
- When using <Up> in wildmenu mode for a submenu, should go back to the
current menu, not the first one. E.g., ":emenu File.Save<Up>".
8 For ":find" and ":sfind" expand files found in 'path'.
8 When using backtick expansion, the external command may write a greeting
message. Add an option or commands to remove lines that match a regexp?
7 When listing matches of files, display the common path separately from the
file names, if this makes the listing shorter. (Webb)
- Add command line completion for ":ilist" and friends, show matching
identifiers (Webb).
8 Add command line completion for "old value" of a command. ":args <key>"
would result in the current list of arguments, which you can then edit.
6 Add command line completion with CTRL-X, just like Insert mode completion.
Useful for ":s/word/xx/".
- Add command to go back to the text as it was before completion started.
Also to be used for <Up> in the command line.
- Add 'wildlongest' option: Key to use to find longest common match for
command line completion (default CTRL-L), like 'wildchar'. (Cregut)
Also: when there are several matches, show them line a CTRL-D.
7 With command line completion after '%' and '#', expand current/alternate
file name, so it can be edited.
- Add completion for Environment variables: ":echo $SH<Tab>" -> "$SHELL".
Command line history:
- Add "KeyWasTyped" flag: It's reset before each command and set when a
character from the keyboard is consumed. Value is used to decide to put a
command line in history or not. Put line in history if it didn't
completely resulted from one mapping.
- When using ":browse", also put the resulting edit command in the history,
so that it can be repeated. (Demirel)
Command-line editing:
8 Change CTRL-U on cmdline to delete from cursor to start of line?
For compatibility, map CTRL-U to CTRL-E CTRL-U.
7 Add commands (keys) to delete from the cursor to the begin or the end of
the command line.
- Korn-shell or tcsh like command line editing (like editing a single line
with vi). Use :cmap! for mappings. Can be implemented like a buffer
containing command lines. Use CTRL-O instead of <Esc>, to remain
vi-compatible? See remarks from Steve (oldmail/kirkendall/in.012).
- Add 'cedit' option like Nvi: editing commandline in a window?
NO! It's too confusing (e.g. when using ^W^W to go to another window, when
doing ":" and starting another commandline edit windows, etc.).
YES! Some people like it anyway (forbid ^W^W).
Use Elvis's method too (commandline is like a one-line window into a buffer
that contains the commandline history).
- Add flags to 'whichwrap' for command line editing (cursor right at end of
lines wraps to start of line).
Insert mode:
9 When 'autoindent' is set, hitting <CR> twice, while there is text after
the cursor, doesn't delete the autoindent in the resulting blank line.
(Rich Wales) This is Vi compatible, but it looks like a bug. Rich has a
suggestion for a patch to fix this.
8 <C-G><Up> and <C-G><Down> in Insert mode move to the column where insert
started, like Elvis. (patch from Lord) Perhaps an option to allow "j" and
"k" after an insert to go to the column where inserting started.
8 When using CTRL-O in Insert mode, then executing an insert command
"a" or "i", should we return to Insert mode after <Esc>? (Eggink)
Perhaps it can be allowed a single time, to be able to do
"<C-O>10axyz<Esc>". Nesting this further is confusing.
":map <F2> 5aabc<Esc>" works only once from Insert mode.
7 Make ":startinsert" command work directly for functions and scripts?
Also make it possible to append (it's difficult at end of line).
- In Insert mode (and command line editing?): Allow undo of the last typed
character. This is useful for CTRL-U, CTRL-W, delete and backspace, and
also for characters that wrap to the next line.
Also: be able to undo CTRL-R (insert register).
Possibly use 'backspace'="whole" for a mode where at least a <CR> that
inserts autoindent is undone by a single <BS>.
- Use CTRL-G in Insert mode for an extra range of commands, like "g" in
Normal mode.
- Make 'paste' work without resetting other options, but override their
value. Avoids problems when changing files and modelines or autocommands
are used.
- When typing CTRL-V and a digit higher than 2, only expect two digits.
- Insert binary numbers with CTRL-V b.
- Make it possible to undo <BS>, <C-W> and <C-U>. Bash uses CTRL-Y.
'cindent', 'smartindent':
9 closing } not recognized? (Francois-Xavier Menard)
(char *tab[] = {"aaa",
NULL};
char *name;
9 When using 'cino' "f1s" the indent after a function is set to the indent
of the "}", should be zero.
9 One indent to much when doing "o" below this "while": (Rouben Rostamian)
{
do
if (1) {
asdf;
} else
qwer;
while (1);
7 Allow aligning a closing ")" with the line above, instead of the matching
"(": (Riehm) if (asdfasdf &&
asdf
)
9 "case xx: {", or in general: any { with text before it, a matching }
should not line up with the {, but with the indent at that position.
Add setting for K&R paren style? Should be used for this:
case xx: {
some_cmd;
}
8 "int asdf,<CR>asdf;" should indent the second line more. (Zellner)
8 In C++ it's possible to have {} inside (): (Kirshna)
func(
new String[] {
"asdf",
"asdf"
}
);
7 Separate "(0" option into inside/outside a function (Zellner):
func(
int x) // indent like "(4"
{
if (a
&& b) // indent like "(0"
9 Wrong indent for continuation line with a string:
void foo()
{
x = f("s \
asd\
tem");
ff;
}
Also note that the "tem" line has an extra indent. It appears that the
brace matching doesn't work, because of the single " in the line.
9 Wrong indent for cino=(4, removing the (void) fixes it: (Zellner)
(void) MyFancyFunction(
argument);
7 Make indenting more flexible, like syntax highlighting.
- Make smartindenting configurable. Add 'sioptions', e.g. '#' setting the
indent to 0 should be switched on/off.
7 Support ANSI style function header, with each argument on its own line.
- "[p" and "]p" should use 'cindent' code if it's on (only for the first
line).
- Add option to 'cindent' to set indent for comments outside of {}?
- Make a command to line up a comment after a code line with a previous
comment after a code line. Can 'cindent' do this automatically?
7 Add 'j' flag to 'formatoptions': Remove comment leader when joining lines.
- formatting of struct/array inits:
The lines used to initialise the struct or array above should not be
considered 'continuation' lines just because the previous one does not end
with ';'. If you go back line by line I think it should be possible to
tell the difference. If you find a line that ends in ';', then it's OK to
have continuation lines. If you find a "{", and the character before it
(not counting space & comments) is either ',' or '=', then there should
not be continuation lines. If the character before the "{" is another
"{", then you have to check before that one too.
- When 'cindent'ing a '}', showmatch is done before fixing the indent. It
looks better when the indent is fixed before the showmatch. (Webb)
- Add option to make indenting work in comments too (for commented-out
code), unless the line starts with "*".
- Don't use 'cindent' when doing formatting with "gq"?
- When formatting a comment after some text, insert the '*' for the new line
(indent is correct if 'cindent' is set, but '*' doesn't get inserted).
- For smartindent: When typing 'else' line it up with matching 'if'.
- 'smartindent': allow patterns in 'cinwords', for e.g. TeX files, where
lines start with "\item".
- Support this style of comments (with an option): (Brown)
/* here is a comment that
is just autoindented, and
nothing else */
- Add words to 'cinwords' to reduce the indent, e.g., "end" or "fi".
7 Use Tabs for the indent of starting lines, padd with spaces for
continuation lines. Allows changing 'tabstop' without messing up the
indents.
And/or: Add option to copy indent as-is, without changing spaces to tabs.
Java:
8 Can have {} constructs inside parens. Include changes from Steve
Odendahl?
8 Recognize "import java.util.Vector" and use $CLASSPATH to find files for
"[i" commands and friends.
'comments':
7 When using "comments=fg:--", Vim inserts three spaces for a new line.
When hitting a TAB, these spaces could be removed.
7 The 'n'esting flag doesn't do the indenting of the last (rightmost) item.
6 Make strings in 'comments' option a RE, to be able to match more
complicated things. (Phillipps) Use a special flag to indicate that a
regexp is used.
8 Make the 'comments' option with "/* * */" lines only repeat the "*" line
when there is a "/*" before it? Or include this in 'cindent'?
Text objects:
8 Add test script for text object commands "aw", "iW", etc.
8 Add "gp" and "gP" commands: insert text and make sure there is a single
space before it, unless at the start of the line, and after it, unless at
the end of the line or befor a ".".
7 Add "g{" and "g}" to move to the first/last character of a paragraph
(instead of the line just before/after a paragraph as with "{" and "}").
6 Ignore comment leaders for objects. Make "das" work in reply-email.
5 Make it possible to use syntax group matches as a text object. For
example, define a "ccItem" group, then do "da<ccItem>" to delete one.
Or, maybe just define "dai", delete-an-item, to delete the syntax item the
cursor is on.
Select mode:
7 Alt-leftmouse starts block mode selection in MS Word.
7 Add Cmdline-select mode. Like Select mode, but used on the command line.
- Change gui_send_mouse_event() to pass on mouse events when 'mouse'
contains 'C' or 'A'.
- Catch mouse events in ex_getln.c. Also shift-cursor, etc., like in
normal_cmd().
- remember start and end of selection in cmdline_info.
- Typing text replaces the selection.
Visual mode:
9 With blockwise Visual mode, "A" works different than "I" when there are
short lines. Make them work the same way. Also make it possible to add
the text to short lines too, with padding where needed.
8 "p" should replace the Visual area with the contents of a register (swap
register contents with Visual text).
8 In non-blockwise Visual mode, "r" should replace all characters with the
typed one, like in blockwise Visual mode.
What is "R" supposed to do?
7 Support dragging the Visual area to drop it somewhere else. (Aaron)
7 With blockwise Visual mode and "c", "C", "I", "A", etc., allow the use of
a <CR>. The entered lines are repeated over the Visual area.
7 CTRL-V :s should substitute only in the block, not to whole lines.
7 Filtering a block should only apply to the block, not to the whole lines.
When the number of lines is increased, add lines. When decreased, padd with
spaces or delete? Use ":`<,`>" on the command line.
8 After filtering the Visual area, make "gv" select the filtered text?
Currently "gv" only selects a single line, not useful.
7 Don't move the cursor when scrolling? Needed when the selection should
stay the same. Scroll to the cursor at any movement command. With an
option!
7 In Visual block mode, need to be able to define a corner on a position
that doesn't have text? Also: when using the mouse, be able to select
part of a TAB. Even more: Add a mode where the cursor can be on a screen
position where there is no text. When typing, add spaces to fill the gap.
Other solution: Always use curswant, so that you can move the cursor to
the right column, and then use up/down movements to select the line,
without changing the column.
6 ":left" and ":right" should work in Visual block mode.
7 For Visual mode: Command to do a search for the string in the marked area.
Only when less than two lines. Use "g/" and "g?".
7 CTRL-I and CTRL-O should work in Visual mode, but only jump to marks in the
current buffer.
7 CTRL-A and CTRL-X should increase/decrease all numbers in the Visual area.
7 "g_CTRL-G" should count the number of characters in the Visual area.
6 "I" should insert the same text in front of each line, before the first
non-blank, "gI" in column 1.
6 "A" should append the same text after each line.
6 ":'<,'>source" should read the selected lines and ":source" them.
6 When in blockwise visual selection (CTRL-V), allow cursor to be placed
right of the line. Could also allow cursor to be placed anywhere on a TAB
or other special character.
6 Add commands to move selected text, without deselecting.
Quickfix:
8 Quickfix mode: Column number should be interpreted with an 8-character
tabstop.
8 Add patch for "^" column number style ~/vim/patches