From: Bram Moolenaar To: vim-dev@vim.org Subject: Vim 6.0w alpha available Date: Mon, 26 Feb 2001 12:01:28 +0100 Message-Id: <200102261101.f1QB1Sn01936@moolenaar.net> The usual bug fixes and a few new items. Some of the changes affect many commands. You might encounter a few redraw problems. As usual, try to find a reproducable example and send it to me. Major changes ------------- Language mapping and 'keymap': - Added the ":lmap" command and friends: Define mappings that are used when typing characters in the language of the text. Also for the commands "r", "t", etc. In Insert and Command-line mode CTRL-^ switches the use of the mappings on/off. - the "" argument to ":map", allows to specify the decimal, octal or hexadecimal value of a character. - Implemented the 'keymap' option: Load a keymap file. Uses ":lnoremap" to define mappings for the keymap. The new ":loadkeymap" command is used in the keymap file. - Added the 'k' flag in 'statusline': Value of "b:keymap_name" or 'keymap' when it's being used. Uses "" when no keymap is loaded and ":lmap"s are active. Show this text in the default statusline too. - When typing a mapping that's not finished yet, display the last character under the cursor in Insert mode and Command-line mode. Looks good for dead characters. - Made the 'langmap' option recognize multi-byte characters. But mapping only works for 8-bit characters. Helps when using UTF-8. Folding: - When a buffer is edited a second time, restore the folding from the previous time. Just like window-local options are restored. - Made foldtext() (used for the default line displayed for a closed fold) remove the parts from 'foldmarker' and 'commentstring', without removing other text. Should make it useful for more situations. Other changes ------------- Multi-language features: - Spanish menu translations and messages. (Eduardo Fernandez Amatria) - Italian tutor translation. (Antonio Colombo) - Chinese-Taiwan message translations. (Francis S. Lin) Multi-byte features: - When not compiled with the multi-byte feature, ignore the ":scriptencoding" command to avoid an error message. - Included "big5" in the list of supported 'encoding' names for Unix. - Adjusted the aliases a bit. - Added internal support for UTF-16. - Use a function pointer for some of the most often used functions that have an 8bit, utf-8 and dbcs variant. Should make it a bit faster. - Support double-byte single-width characters for euc-jp: Characters starting with 0x8E. Added ScreenLines2[] to store the second byte. When the 'viewdir' doesn't exist and ":mkview" is used, create the directory. Only the last part, not every directory in the path. When using "%f" in 'errorformat' on a DOS/Windows system, also include "c:" in the filename, even when using "%f:". Added the buflisted() function: checks if the buffer exists and has 'buflisted' set. Added the globpath() function: Find matching files in a list of directories. Useful to discover which files are present in 'runtimepath'. Added extra argument to input(): Default text. Added src/README.txt to give an overview of the main parts of the source code. Added a buffer-local value for the 'tags' option. The g CTRL-G command also works in Visual mode and also counts the number of words. (Chase Tingley) Added the CTRL-W P command: go to preview window. For MS-DOS, MS-Windows and OS/2: Expand %VAR% environment variables like $VAR. (Walter Briscoe) In the MS-DOS/Windows install program, use %VIM% instead of an absolute path, so that moving Vim requires only one change in the batch file. Give an error message when using 'shell' and it's empty. Changed the "coladd" variables, used for 'virtualedit', from a separate item to a member of the pos_t structure. Makes it simpler and consistent. (Matthias Kramm) Moved common code from gui_w16.c and gui_w32.c to gui_w48.c (Vince Negri) Moved the command line history stuff into the +cmdline_hist feature, to exclude the command line history from the tiny version. Don't allow 'fileformat' and 'fileencoding' to be changed when 'modifiable' is off. Added "uhex" value for 'display': show non-printable characters as . Show unprintable characters with NonText highlighting, also in the command line. No longer put the search pattern from a tag jump in the history. Added a number of Lisp names after which the indent isn't increased that much. Fixes ----- langinfo.h wasn't included, required for nl_langinfo(). Virtualedit: (Matthias Kramm) - In Visual-block mode "x" didn't delete part of a tab correctly. - Deleting a whole tab didn't work properly (deleted too much). - Trailing blanks could not be deleted. - "x" after end of line added another space. Folding: - When typing "{{{" a nested fold is created and when typing "1" next it was not removed but only the first line was excluded. - When using "r1" to change "{{{1" to "{{{2" the folding would not updated. - When 'wrap' is off and the first line is a closed fold, clicking with the mouse would be off by one. - Using CTRL-T to jump to another file didn't open a closed fold. - When clicking on a scrollbar arrow with closed folds present didn't move by screen lines. - When doing CTRL-D at the end of the file, the cursor could get stuck in a closed fold and not move to the end of the file. - When using CTRL-W CTRL-] a closed fold wasn't opened. The CTRL-] was put in the stuff buffer, which reset KeyTyped. Now keep the value of KeyTyped when getting a character from the stuff buffer. - When 'foldopen' contains "all" and using "k" the cursor moved to the first line of the just opened fold instead of the last line. - "gk" and "gj" didn't move over closed folds. - When inserting text just above a closed fold, doing auto-indent or inserting the comments leader left the cursor in column 0. - When folding is compiled with, but not used, would still call char_avail() in the main loop, which slows down a bit. - There was a missing "," after the "+folding" and "-folding" items in version.c, causing them to be concatenated with the next item. (Michael Klein) - When using "vim file" while 'foldmethod' was already set, the folds would not be updated. DJGPP: The cursor would not always be visible when moving around quickly (with key repeat). Checking for an available character didn't position the cursor. ":sleep 10" could not be interrupted on Windows, while "gs" could. Made them both work the same. ":sbuf {name}" didn't find unlisted buffers. With 'showcmd' set, typing "b in Visual mode (register b) showed b instead of "b. When mapping a' and e' typing ae didn't display the characters until another one is typed. Now call update_screen() when going to wait for another character. "extend" argument for ":syn keyword" was not backwards compatible. "fold" keyword didn't work as documented. Now ignore "extend" and "fold" for ":syn keyword", like "display". Unix: When waiting for a character is interrupted by an X-windows event (e.g., to obtain the contents of the selection), the wait time would not be honored. A message could be overwritten quickly. Now compute the remaining waiting time. X11 GUI: When using UTF-8, a three-character input from the XIM was reduced to its first character. When 'showbreak' is not empty, a TAB in a wrapped line was not adjusted for these characters. Windows: Completing "\\share\c$\S" inserted a backslash before the $ and then the name is invalid. Don't insert the backslash. Win32: moving a vertical separator left/right left dots behind for the "~" lines after the end of a file. Clear an extra character to erase dots from the bold tick in screen_fill(). When doing an auto-write before ":make", IObuff was overwritten and the wrong text displayed later. The search string from "*" and "#" wasn't put into the search history. On the Mac the directories "c:/tmp" and "c:/temp" were used in the defaults for 'backupdir' and 'directory, they don't exist. When splitting the preview window and closing the new window with 'equalalways' off, the window sizes were wrong. When 'lazyredraw' is set, making a change and then jumping to below the displayed lines in a mapping or executed register didn't redraw properly. When using ":silent!" errors could still cause a mapping to be aborted and a beep to be generated. The check for a new file not to be on an MS-DOS filesystem created the file temporarily, which can be slow. Don't do this if there is another check for the swap file being on an MS-DOS filesystem. When reading from stdin an "invalid lnum" message was produced. The cursor was below the last line. Don't give the "Changing a readonly file" warning when reading from stdin. The swapfile got file descriptor zero, which was also used as stdout. This resulted in the swapfile to be written to the screen. When using the "Save As" menu entry and not entering a file name, would get an error message for the trailing ":edit #". Now only do that when the alternate file name was changed. When using an autocommand to do a g'" command after loading a buffer, doing ":he subject" twice would not correct for 'scrolloff'. GUI: When using CTRL-R in the command line to insert a multi-byte character that contains a CSI, two bytes would be consumed. Motif GUI: When doing ":gui" the menu bar was made much too high. Adding a menu item fixed it. When using "u" or "U" in a Visual selection that doesn't cause a change, the highlighting would not be removed. When formatting with "gq" in Visual mode doesn't result in changed text the highlighting wasn't removed. When Vim owns the X11 selection and is being suspended, an application that tries to use the selection hangs. When Vim continues it could no longer obtain the selection. Now give up the selection when suspending. option.h and globals.h were included in some files, while they were already included in vim.h. Moved the definition of EXTERN to vim.h to avoid doing it twice. When reading a UCS-2 or UCS-4 file, when the last character was incomplete it was ignored. When repeating an operator that used a search pattern and the search pattern contained characters that have a special meaning on the cmdline (e.g., CTRL-U) it didn't work. Fixed various problems with using K_SPECIAL (0x80) and CSI (0x9b) as a byte in a (multibyte) character. For example, the "r" command could not be repeated. When reading a viminfo file with 'verbose' non-zero the message "Reading viminfo file" could have a NULL argument, causing a crash. The DOS/Windows install program didn't always work from a directory with a long filename, because $VIM and the executable name would not have the same path. Redrawing and computing the window position was sometimes done with information from another buffer, e.g, with ":e #". Epilogue -------- WARNING: This is really an unstable version. Many things have been added without proper testing. It does crash. It may destroy your work. New features may change incompatibly in the next version. This version is for developers, thus it comes as source code only. If you run into something that doesn't work, please try to figure out why, try to solve it and send me a patch. If you can't do that, at least send me precise information to save me time. More info about the new 6.0 features with ":help version6". If you don't like the syntax of a command, the name of an option or how the new features work, let's discuss this in the vim-dev maillist. Lots of things are not working yet. Check ":help todo" for known items. I NEED YOUR HELP: There is still a lot of work to be done. If I have to do it all by myself it will take a very long time until Vim.6.0 is ready. Please give a hand by implementing one of the items in the todo list. You can find Vim 6.0 here: ftp://ftp.vim.org/pub/vim/unreleased/ unix/vim-6.0w-rt.tar.gz runtime files unix/vim-6.0w-src.tar.gz sources extra/vim-6.0w-extra.tar.gz extra files extra/vim-6.0w-lang.tar.gz multi-language files Happy Vimming!