Re: odd completion (mis)behavior
Benji Fisher wrote: I am a few days behind: vim 7.0d (Linux). I have the text Mary Ellen and May 2 in my buffer. I want to type Mary Ellen again, so (not noticing the May 2) I do MaC-PC-XC-P but that gives me May 2 Oops! So I type BS a few times (three, to be exact). Much to my surprise, I get May x=EF=BF=BD =10Ma (In case it gets garbled in translation, that looks like May x99 ^PMa to me.) When I repeat the experiment, I get different garbage, so I am guessing that there is an uninitialized variable here. I guess the state for adding completion isn't reset properly when you backspace. The patch below makes it work better for me. But I could not reproduce the garbage thus I can't verify that is fixed too. BTW, can someone point me to where it explains what characters get me out of completion mode and which do not? I expected BS to do it. :help popupmenu-keys BS is now used to edit the word that is used for selecting matches. Mostly it's useful to get a different choice of words. But it also means you stay in completion mode much longer. Simplest way to get out of completion is by typing a space. Then type backspace if you didn't want a space there. It's two key strokes, but still simpler than using some CTRL-key. *** edit.c~ Thu Apr 13 12:01:51 2006 --- edit.c Fri Apr 14 10:01:34 2006 *** *** 2951,2956 --- 2951,2958 ins_compl_free(); compl_started = FALSE; compl_matches = 0; + compl_cont_status = 0; + compl_cont_mode = 0; } line = ml_get_curline(); -- hundred-and-one symptoms of being an internet addict: 81. At social functions you introduce your husband as my domain server. /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://www.ICCF.nl ///
Re: [vim 70d] switching tab pages
Wojtek Pilorz wrote: I have build gvim 7.0d on Fedora Core 4 as 'Big version with GTK2 GUI.' I have noticed the following behaviour with multple tab pages (gvim); 1. You can switch with Ctrl-Pgup - Ctrl-PgDown when in normal mode; In insert and replace mode you need to type Ctrl-O Ctrl-Pgup/PgDown (perhaps should be documented?) It is documented. I could not find that, at least in tabpage.txt. And I do not think it is obvious. It's in the same place as where :tabnext is explained. It's not an obvious command, but apparently this is what other applications use. The obvious method is to click with the mouse on a tab label. 4. Selecting font with Edit/Select Font changes font for all tab pages. I think it would be very useful to have also an option to have different fonts (or at least different font sizes) in tab pages. That is not possible, the font is used for everything, also the command line. The Vim window resizes too. OK. Maybe I am spoilt by kde 3.5 konsole, where font and font size is local to tab. KDE uses the Qt library which has all kinds of fancy things. And these things generally don't work with other GUI libraries. I can agree with that. However, current behaviour with gvim7.0d and GTK2 is also not good; if file names are too long so that some tabs do not fit on tabline, the active tabpage label is not necessarily displayed, switching tabs to those with invisible labels is possible only from keyboard. In other software I can see that Firefox shorten labels; when mouse pointer is placed on such shorten label, full tab title is displayed in termporary yellow box (just like description of icons in GTK2 gvim) In OpenOffice calc tab labels can be scrolled; In kde 3.5 konsole tab labels can also be scrolled. I do not have strong opinion whether shortening names should be preferred to scrolling. These are all GUI things. If you don't like the way GTK uses the tab labels, go to the GTK library guys. Vim actually already adds a few things that they missed, but we re-implementing the whole tabs thing is probably not a good idea. 6. It would be useful if switch to previous tab could be activated with mouse, perhaps Middle button-Click of Shift+left button click? What is the previous tab? I meant tab page with number less by one (modulo number of tab pages). I just like symmetry (maybe too much ...) :tabprevious does this. I don't think it's common enough to use one of the scarce mouse buttons for this. Also, next/previous tab in tabline popup menu would be convenient. That is more work than clicking in the tab, doesn't make sense. For some GUIs and with the console a click right of the tab labels cycles through them. Sure. My comment was pehaps motivated by the test with long file names, where some tab labels were invisible (and there was no 'right of the tab labels' place on tabline) If some tab labels are out of view, I think the best solution is to have a menu with the missing ones. The Firefox bookmark bar has this. Unfortunately the GUI libraries mostly don't have it. -- From know your smileys: y:-) Bad toupee /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://www.ICCF.nl ///
Re: invisible bar in help tags
On Fri, Apr 14, 2006 at 08:22:14AM +0200, Georg Dahn wrote: If the cursor is sometimes invisible in the default configuration, then this is indeed a problem which has to be solved. Since I don't have Debian, I cannot try to locate the problem myself. Does this problem occur in the latest gnome-terminal only? Has it worked with the previous version? Is there a change which could affect this? No, it happens even in a plain xterm, light background, when bg='light'. According to last Bram's mail this is probably something that colorscheme maintainers should fix. I will try to collect a list of the affected colorschemes and mail the maintainers about it. Cheers. -- Stefano Zacchiroli -*- Computer Science PhD student @ Uny Bologna, Italy [EMAIL PROTECTED],debian.org,bononia.it} -%- http://www.bononia.it/zack/ If there's any real truth it's that the entire multidimensional infinity of the Universe is almost certainly being run by a bunch of maniacs. -!-
Re: Vim Job board?
On 4/9/06, Bertram Scharpf [EMAIL PROTECTED] wrote: my boss says that his editor is as least as good as mine and he wants me to give up using Vim. I'm late to the party on this one, but unless the company editor forces a radically different concept of project editing[1], I don't see why you'd have to use a given editor. I could see having to adjust the vim formatting to match corporate standards, but not forcing an editor. [1] http://leo.sf.net
Re: Duplicate tags problem
Jason Aeschilman wrote: I have a problem with duplicate tags. It seems that somewhere between 6.2.457-1 and 6.3.54 (which I recently upgrade to), the duplicate tag behavior changed. It used to be that if I used ctrl-] on a function name that it would look at the tags file in the current directory and if a match was found it would jump to the function, but if a match wasn't found it would check the tags file one directory up and if a match was found it would jump to the function. Now it seems that in 6.3.54 it looks at both the tags file in current directory and the tags file up one directory and returns all the found matches even if they really point to the same file. For example, if I have a directory layout like so: ~/code ~/code/module ~/code/include ~/code/common I would run ctags -R in directory code and in each subdirectory. Then in my .vimrc I have: set tags=./tags,./../tags This way I could jump to a function reference no matter whether it was found in a file in the current directory (let's say I'm in ~/code/module) or if it was found in another directory (~/code/include). If the function was found in a file in the current directory it used to be that it would just jump to it without giving me a list of matches. Now it gives me a list of matches based on what is in the current tags file and the tags file up a level. Like so: # pri kind tag file 1 F fconfig_load config.c int config_load(const char *fname) 2 F fconfig_load /home/jason/code/module/config.c int config_load(const char *fname) This is the same file! The first entry is from the current directory tags file and the second entry is from the upper level tags file. I want it so if a match is found in the current directory tags file to just use that. It worked this way before upgrading to 6.3.54 and I would like this behavior back. I've looked at the help and I've been unable to find an option to enable the old behavior. Does anyone know how I can get this old behavior back without having to downgrade to 6.2.457.1? Bram Moolenaar wrote: First of all, it's recommended to upgrade to Vim 6.4. It includes many bugfixes. But that doesn't solve this specific problem. I'll look into it. Bram, did you have a chance to look at this yet? Does anyone else know if there is a setting to get the old behavior back? I simply want vim to look at only the local tags file and if a match is found to jump. If and only if there is no match in the local tags file, it will consult the parent tags file, according to the set tags=tags;/ setting I have in my .vimrc.
Re: Vim Job board?
On 4/10/06, Bertram Scharpf [EMAIL PROTECTED] wrote: first thank you all very much for the backings. I'm on the way losing trust in my own mind. Could this be normal? I've been in two jobs during the past year and not one of these well-paid colleagues calling themselves degreed software engineers does even know about Vim (neither Emacs). None of them is having Linux at home. Extrapolating from this I don't expect my next job being much better. Is this a problem typical to Germany? No, I don't think this is specific to Germany. One true story, happening in Canada just a month ago: the manager gives the new-hired programmer this task: to reverse-engineer one feature of the competition CD-burning software. The manager opens the competition's .exe in the notepad(!). And explains him that based on (what they see in the notepad'd screen), they will reverse-engineer the needed feature easily. True story. Anyway, I have some recommended reading list for you: 1. http://www.dilbert.com (daily) 2. How to Work for an Idiot. By J.Hoover http://www.amazon.com/gp/product/1564147045 3. The Dilbert Principle By Scott Adams http://www.amazon.com/gp/product/0887308589/ other books by Scot Adams ... 4. Also, try to search amazon.com for office politics. Some of these books are good Yakov
Re: new logo
On Apr 10, 2006, at 9:02 AM, Peter Slizik wrote: BTW, there is a trend towards more colorful, more playful icons. I dislike this trend, because most of those icons are much less legible than the icons having been replaced. Yes, that's true. Maybe adding some light glow, color transition, or shadow effects would help to make the logo more 'shiny'. But it depends on personal taste, of course. Personally, I *love* Matthew Webb's OS X versions of the Vim logo: http://www.cs.princeton.edu/~mtwebb/vim_icon/vim_icons.html Especially the matte version. It's the same design as the current logo, but without the im text and with some subtle gradients and brushed-metal effects. Does anyone think that it would be unreasonable to set this as the default icon for Mac OS X builds of Vim? It certainly blends better with the other apps' icons than the logo we have now (IMO). Cheers, -- Benjamin D. Esham [EMAIL PROTECTED] | http://bdesham.net | AIM: bdesham128 Wikipedia, the Free Encyclopedia • http://en.wikipedia.org PGP.sig Description: This is a digitally signed message part
colors in vim
This is a basic question, but I still could not figure out how to do it: I am unable to get colors for my vim editor on some of the cluster machines in my university. Vim is using underlining and bold-font to highlight language keywords and comments. How can I get vim to use colors instead of underlining and bold-font. thanks in advance! Sorav
Re: colors in vim
Thanks for the quick help. Here are the answers to the checklist: 1. Your terminal emulator must support color. - Does the terminal show colors for other applications? Yes, it shows colors for 'ls -- color' 2. The TERM environment variable must be set to the type of terminal emulator you are using. - From a shell prompt, what does echo $TERM show? $TERM = xterm 3. The terminfo database for $TERM must be correct and must indicate that the terminal supports color. - From a shell prompt, if you execute infocmp or untic (depending on your flavor of Unix) you should see some cryptic looking stuff including colors#8, colors#16, or colors#256 in the second or third line. If you don't, then your terminfo database is telling vim that your terminal doesn't support color. I don't see any 'colors#' in my infocmp output. This seems to be a problem. 4. Vim must be built with a termlib that supports color. - From withing vim, execute :set termcap and look for the t_Co= value. It should be the same as the colors# from the terminfo database. If the entry is empty or 0, then your termlib may be broken and you may need to recompile vim (if you can) with a different termlib. (HP-UX 10.20 has this problem.) t_Co is blank. Problems 3 and 4 can be worked around by following the instructions in :help xterm-color. I tried using set t_Sf=Esc[3%p1%dm in my vimrc file, but instead of showing colors, it appends these characters to the keywords. For example: Esc[32mvoid thanks for your help again! Sorav
Re: colors in vim
On 2006-04-14, Sorav Bansal [EMAIL PROTECTED] wrote: Thanks for the quick help. Here are the answers to the checklist: 1. Your terminal emulator must support color. - Does the terminal show colors for other applications? Yes, it shows colors for 'ls -- color' 2. The TERM environment variable must be set to the type of terminal emulator you are using. - From a shell prompt, what does echo $TERM show? $TERM = xterm 3. The terminfo database for $TERM must be correct and must indicate that the terminal supports color. - From a shell prompt, if you execute infocmp or untic (depending on your flavor of Unix) you should see some cryptic looking stuff including colors#8, colors#16, or colors#256 in the second or third line. If you don't, then your terminfo database is telling vim that your terminal doesn't support color. I don't see any 'colors#' in my infocmp output. This seems to be a problem. The terminfo database is usually found in /usr/lib/terminfo or /usr/share/lib/terminfo. If you do an 'ls' in the 'x' subdirectory, you'll see the available xterm terminal types. If you see xterm-color or xterm-16color there, try setting TERM to one of those names and try vim again. 4. Vim must be built with a termlib that supports color. - From withing vim, execute :set termcap and look for the t_Co= value. It should be the same as the colors# from the terminfo database. If the entry is empty or 0, then your termlib may be broken and you may need to recompile vim (if you can) with a different termlib. (HP-UX 10.20 has this problem.) t_Co is blank. Problems 3 and 4 can be worked around by following the instructions in :help xterm-color. I tried using set t_Sf=Esc[3%p1%dm in my vimrc file, but instead of showing colors, it appends these characters to the keywords. For example: Esc[32mvoid Did you use a real escape character as noted just below the endif in that :help entry, or did you use the five characters Esc? HTH, Gary -- Gary Johnson | Agilent Technologies [EMAIL PROTECTED] | Wireless Division | Spokane, Washington, USA
Re: colors in vim
Did you use a real escape character as noted just below the endif in that :help entry, or did you use the five characters Esc? Great! It worked! Thanks a ton! Sorav
Vim70d map-to-func input prob? was Re: How to wake up getchar() ?
I'm not sure what the intended fix for 70d was, but I can no longer send a char to a function indirectly through an expr mapping, meaning that in the example below, \b does not send a space to Tst(). Tst() waits for input directly from the user. Note: using map \a : call Tst()CR works as expected, so the problem seems to be with expr map expr \a Tst() map \b \aspace function! Tst() exe normal! : CR while getchar(1) 1 sleep 100ms endwhile echomsg Done! endfunction --- Bram Moolenaar [EMAIL PROTECTED] wrote: Eric Arnold wrote: Here is the test example: map expr ,tt Tst() function! Tst() exe normal! : CR while getchar(1) 1 sleep 100ms endwhile echomsg Done! endfunction It never sees input without the exe normal! : CR As you might guess, it took me forever to find a workaround. Anybody know about this? The evaluation of the map expression is done inside the function that gets a character from the user and takes care of applying mappings. That function is protected from being called recursively, thus getchar() doesn't work. That the use of a normal command makes it work is a bug. Instead of incrementing/decrementing a counter for recursive use of the function a true/false flag is used. I'll fix that. Your function with the workaround will stop working then. I'll see if I can make it work. -- hundred-and-one symptoms of being an internet addict: 17. You turn on your intercom when leaving the room so you can hear if new e-mail arrives. /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://www.ICCF.nl ///
Vim70d map-to-func input prob? was Re: How to wake up getchar() ?
I'm not sure what the intended fix for 70d was, but I can no longer send a char to a function indirectly through an expr mapping, meaning that in the example below, \b does not send a space to Tst(). Tst() waits for input directly from the user. Note: using map \a : call Tst()CR works as expected, so the problem seems to be with expr map expr \a Tst() map \b \aspace function! Tst() exe normal! : CR while getchar(1) 1 sleep 100ms endwhile echomsg Done! endfunction --- Bram Moolenaar [EMAIL PROTECTED] wrote: Eric Arnold wrote: Here is the test example: map expr ,tt Tst() function! Tst() exe normal! : CR while getchar(1) 1 sleep 100ms endwhile echomsg Done! endfunction It never sees input without the exe normal! : CR As you might guess, it took me forever to find a workaround. Anybody know about this? The evaluation of the map expression is done inside the function that gets a character from the user and takes care of applying mappings. That function is protected from being called recursively, thus getchar() doesn't work. That the use of a normal command makes it work is a bug. Instead of incrementing/decrementing a counter for recursive use of the function a true/false flag is used. I'll fix that. Your function with the workaround will stop working then. I'll see if I can make it work. -- hundred-and-one symptoms of being an internet addict: 17. You turn on your intercom when leaving the room so you can hear if new e-mail arrives. /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://www.ICCF.nl ///