Suggestion: numbers for completion menu?
It would be convinient to get an item from the completion menu faster than downdown .. or typing more characters. What do you think of prepending each item with a number and add a key-mapping c-iidx to get the idxth item? so c-i4 would select the 4th. Would it be convinient to add another mapping space for completions? mnoremap 2 c-i2 ? m = omni completion _m_enu ? Or is there another easy way to achieve this ? Marc
Re: Returning perl hashes
Is it possible to return a Perl hash as a Vim List or Dictionary? I am pretty new to Perl but need it's features for my extension. I need to return rows and columns of data which is perfect for a Vim List or Dictionary. I don't know what format that is but if Data::Dumper doesn't help (I don't think it will for your purpose), you'll have to manually go through the hash and print the key - value pair out in the correct format that you want. Maybe there's something here that will help: http://search.cpan.org/search?query=vimmode=all -- .
Autocomment lines
HI, I run Vim6.3 on Debian Sarge 3.1 from the testing packages. How I can set it up to autocomment lines ? Example: /** - this line is written by me, on every newline character entered from the keyboard ... * * - vim should draw a asterisk on the screen and let me continue write the commented block * */ - until I write this sequence, then Vim should exit from the comment block and don,t more write asterisk on the newline This Vim version is compiled with the '+comments' flag. I have tried the :set comments=sr/**,m:*,elx:*/ , but with no results. I often use PHP and PHPDocumentor, and a really need this thing. On the Slackware 11 distro with Vim7 this works fine for me. Can anybody help ? Thanks -- View this message in context: http://www.nabble.com/Autocomment-lines-tf3063105.html#a8518302 Sent from the Vim - General mailing list archive at Nabble.com.
About colors in t_Co=8 terminals: IncSearch hi group
Hi all :)) I've noticed something weird regarding IncSearch and I don't know if the problem is that I've set up my colors badly or that just I don't understand how the highlight command works. My terminal is 8 colors. If I set my IncSearch highlight group to something like this: highlight IncSearch cterm=NONE colorfg=0 colorbg=1 and then I do an incremental search for a word that is already highlighted with a bold color in foreground (e.g. for a word that is highlighted like a group with cterm=bolg, colorfg=6, colorbg=6, which is an example I've used and tested to reproduce this), then the background color of that work is changed to the background color of IncSearch, but the foreground color is changed to the foreground color bolded!. Looks like the bold attribute for the searched word is not replaced by the NONE attribute, so the incremental search shows weird colors when used over bolded words. I've tested the other way around (IncSearch being bold and the searched word being cterm=NONE) and that works perfectly, the bold attribute replaces correctly the NONE attribute. Am I doing something wrong, my terminal definitions are screwed or is this just a feature of IncSearch? Thanks a lot in advance :) Raúl Núñez de Arenas Coronado -- Linux Registered User 88736 | http://www.dervishd.net It's my PC and I'll cry if I want to... RAmen!
Re: Autocomment lines
astropanic wrote: HI, I run Vim6.3 on Debian Sarge 3.1 from the testing packages. How I can set it up to autocomment lines ? Example: /** - this line is written by me, on every newline character entered from the keyboard ... * * - vim should draw a asterisk on the screen and let me continue write the commented block * */ - until I write this sequence, then Vim should exit from the comment block and don,t more write asterisk on the newline This Vim version is compiled with the '+comments' flag. I have tried the :set comments=sr/**,m:*,elx:*/ , but with no results. I often use PHP and PHPDocumentor, and a really need this thing. On the Slackware 11 distro with Vim7 this works fine for me. Can anybody help ? Thanks :setlocal comments=sr/**,m:*,elx:* E539: Illegal character / :setlocal comments=sr:/**,m:*,elx:* no error but doesn't work :setlocal fo+=cr inserting middle part now works (right-aligned with comment start). Typing just / removes the space before it but Vim still inserts a * on next line. :setlocal comments=sr:/**,mb:*,ex:* with 'formatoptions' including cr works: /** line 1-- all hand-typed * line 2-- hand-typed starting with l * line 3-- ditto */ -- only / hand-typed, no need to backspace -- Vim doesn't auto-insert anything here I'm using gvim 7.0.188 with GTK2/Gnome GUI on SuSE Linux 9.3. Best regards, Tony.
Re: E316: ml_get: line ... not found, this my strace file... Can you help me to resolve my issue ?
2007/1/22, A.J.Mechelynck [EMAIL PROTECTED]: Marc Weber wrote: [...] Try installing vim from source and see wether the error remains. You can find information on how to do this on vim.org (Download - sources) [...] ... or in more detail on my Vim site: - my Vim page: http://users.skynet.be/antoine.mechelynck/vim/ - Compiling Vim on Windows: http://users.skynet.be/antoine.mechelynck/vim/compile.htm - Compiling Vim on Unix/Linux: http://users.skynet.be/antoine.mechelynck/vim/compunix.htm The latest patchlevel is 7.0.188. I've compiled last version of vim with all patchs. I'll test it... Thanks, Stephane
Redefine S-Tab key
Hello! I have redefined the Tab key in insert mode for the completion: inoremap Tab C-R=CleverTab()CR However I want that the S-Tab (Shift+Tab) key in insert mode insert a real tabulation but I don't know how to do this redefinition Thank you for your help -- View this message in context: http://www.nabble.com/Redefine-%3CS-Tab%3E-key-tf3063422.html#a8519465 Sent from the Vim - General mailing list archive at Nabble.com.
Re: Redefine S-Tab key
neolistic wrote: Hello! I have redefined the Tab key in insert mode for the completion: inoremap Tab C-R=CleverTab()CR However I want that the S-Tab (Shift+Tab) key in insert mode insert a real tabulation but I don't know how to do this redefinition Thank you for your help If the shift-tab key is passed to your version of Vim and it recognizes it as such, :inoremap S-Tab Tab should do the trick. (Noremapping is essential here, considering your mapping to CleverTab() ). If the shift-tab key is not passed to Vim, or passed as something else (such as Tab) you're out of luck. If Vim gets a recognizable shift-tab, then hitting (in Insert mode) Ctrl-K followed by Shift-Tab should insert the seven characters S-Tab into the current buffer. Best regards, Tony.
Re: Autocomment lines
Thank You very much, You have saved the world for me :) You have a typo in Your answer: :setlocal comments=sr:/**,mb:*,ex:* should have a '/' at the end, than it work very well. A.J.Mechelynck wrote: astropanic wrote: HI, I run Vim6.3 on Debian Sarge 3.1 from the testing packages. How I can set it up to autocomment lines ? Example: /** - this line is written by me, on every newline character entered from the keyboard ... * * - vim should draw a asterisk on the screen and let me continue write the commented block * */ - until I write this sequence, then Vim should exit from the comment block and don,t more write asterisk on the newline This Vim version is compiled with the '+comments' flag. I have tried the :set comments=sr/**,m:*,elx:*/ , but with no results. I often use PHP and PHPDocumentor, and a really need this thing. On the Slackware 11 distro with Vim7 this works fine for me. Can anybody help ? Thanks :setlocal comments=sr/**,m:*,elx:* E539: Illegal character / :setlocal comments=sr:/**,m:*,elx:* no error but doesn't work :setlocal fo+=cr inserting middle part now works (right-aligned with comment start). Typing just / removes the space before it but Vim still inserts a * on next line. :setlocal comments=sr:/**,mb:*,ex:* with 'formatoptions' including cr works: /** line 1-- all hand-typed * line 2-- hand-typed starting with l * line 3-- ditto */ -- only / hand-typed, no need to backspace -- Vim doesn't auto-insert anything here I'm using gvim 7.0.188 with GTK2/Gnome GUI on SuSE Linux 9.3. Best regards, Tony. -- View this message in context: http://www.nabble.com/Autocomment-lines-tf3063105.html#a8520374 Sent from the Vim - General mailing list archive at Nabble.com.
Re: latex-suite macros
[EMAIL PROTECTED] wrote: I want to set up my own macros for typing in LaTeX environment: But these on .vim/after/ftplugin/tex/latex-suite.vim. the IMAP is a function created by the latex-suite (more correctly by a modified imaps.vim) so it is only available after it loads. -- «Dans la vie, rien n'est à craindre, tout est à comprendre» Marie Sklodowska Curie.
Re: Tip karma storms
Charles E Campbell Jr [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: Hello! The following is a note that I sent to Scott Johnston; perhaps people have woken up and decided in large groups that they really like my tips, :) but: For the third time since January 15, I've seen tip storms in karma rating changes. Here's the latest one (Jan 22, 2007): Karma/Raters/Downloads: dK/dR/ dD: K / R / D tip changed by 20/ 5/ 17: 96/ 33/5988 How to initialize plugins I noticed this karma-increase-storm for a bunch of other tips, too. I figure either its a vandal or perhaps the tip-note cleaning process has a bug affecting karma ratings. If its a vandal, I have no idea what can be done about it, but I thought I'd pass the info along. He suggested I let you know. Chip, I too have noticed this, it may be due to Google providing free adverts to individual VIM tips (those ads to right of search results). I have have noticed on at least two occasions a google Ad for my tip 305 Best of Vimtips . Vim may hopefully be reaching parts never before cleaned, whoops where was I, I mean reaching a new set of potential users. zzapper -- zzapper http://successtheory.com/tips/ Vim, Zsh, MySQL Tips
Color errors on OSX
Cannot allocate color colorname I compiled from svn src. There didn't seem to be any errors and it created the Vim.app. The Vim.app works but when I go to change the colorscheme I get about 20 of those messages. Is there something I need to pass to configure on OSX about colors? Robert
Re: Color errors on OSX
Robert Hicks wrote: Cannot allocate color colorname I compiled from svn src. There didn't seem to be any errors and it created the Vim.app. The Vim.app works but when I go to change the colorscheme I get about 20 of those messages. Is there something I need to pass to configure on OSX about colors? Robert If your gvim doesn't display through X11, try copying the X11 rgb.txt (usually something like /usr/X11R6/lib/X11/rgb.txt ) to the $VIMRUNTIME directory. see :help rgb.txt. Not sure if it works for the Mac but you could always try. Best regards, Tony.
disable é map in tex-suite
Hello I use the tex-suite with VIM7.0 and it's very useful but tex-suite have a auto-defined insert-map for the key é and I don't want to use this map, I want that when I'm in insert mode and I press the key é, vim insert the character é Does anyone know how to do that? Tanks -- View this message in context: http://www.nabble.com/disable-%C3%A9-map-in-tex-suite-tf3064330.html#a8522328 Sent from the Vim - General mailing list archive at Nabble.com.
Re: Color errors on OSX
A.J.Mechelynck wrote: Robert Hicks wrote: Cannot allocate color colorname I compiled from svn src. There didn't seem to be any errors and it created the Vim.app. The Vim.app works but when I go to change the colorscheme I get about 20 of those messages. Is there something I need to pass to configure on OSX about colors? Robert If your gvim doesn't display through X11, try copying the X11 rgb.txt (usually something like /usr/X11R6/lib/X11/rgb.txt ) to the $VIMRUNTIME directory. see :help rgb.txt. Not sure if it works for the Mac but you could always try. Best regards, Tony. I will do that and see. Thanks Tony. Robert
Re: disable é map in tex-suite
neolistic wrote: Hello I use the tex-suite with VIM7.0 and it's very useful but tex-suite have a auto-defined insert-map for the key é and I don't want to use this map, I want that when I'm in insert mode and I press the key é, vim insert the character é Does anyone know how to do that? Tanks You should be able to unmap it. Try :unmap! é or :iunmap é Note that é is probably synonymous with Alt-i -- by unmapping the one you will probably lose the other. Once you find the right command, you can place it in a script, which (in order for it to work) must be sourced after the TeX suite: see :help after-directory. Best regards, Tony.
Re: Vim taking a long time to save files
On 1/19/07, Keith Waters [EMAIL PROTECTED] wrote: 14:20:09 open(management.phtml, O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3 Is it having trouble opening the file for writing? well, it is not having any trouble, because the call to open() succeeds. The drive, the operating system, etc -- any of those things could be having trouble, but Vim can't see any of it, because open() is a system primitive, i.e., Vim can't dig any deeper, and isn't responsible for stuff under that layer. Do you see the same pauses when editing files as a non-root user?
Re: disable é map in tex-suite
I think this solution can work but I don't have the perms for the plugin direcory, is there a solution to unmap or surmap the é? Jean-Rene David-2 wrote: * neolistic [2007.01.23 09:15]: I use the tex-suite with VIM7.0 and it's very useful but tex-suite have a auto-defined insert-map for the key é and I don't want to use this map, I want that when I'm in insert mode and I press the key é, vim insert the character é This is probably the most frequently asked question on the latex-suite mailing list. See here for a possible solution: http://vim-latex.sourceforge.net/index.php?subject=faqtitle=FAQ#faq-e-acute -- JR -- View this message in context: http://www.nabble.com/disable-%C3%A9-map-in-tex-suite-tf3064330.html#a8523478 Sent from the Vim - General mailing list archive at Nabble.com.
Re: disable é map in tex-suite
It don't works, I tried iunmap é iunmap M-i and I can see the map with :imap i é@PlugTex_InsertItemOnThisLine A.J.Mechelynck wrote: neolistic wrote: Hello I use the tex-suite with VIM7.0 and it's very useful but tex-suite have a auto-defined insert-map for the key é and I don't want to use this map, I want that when I'm in insert mode and I press the key é, vim insert the character é Does anyone know how to do that? Tanks You should be able to unmap it. Try :unmap! é or :iunmap é Note that é is probably synonymous with Alt-i -- by unmapping the one you will probably lose the other. Once you find the right command, you can place it in a script, which (in order for it to work) must be sourced after the TeX suite: see :help after-directory. Best regards, Tony. -- View this message in context: http://www.nabble.com/disable-%C3%A9-map-in-tex-suite-tf3064330.html#a8523573 Sent from the Vim - General mailing list archive at Nabble.com.
Re: disable é ma p in tex-suite
* neolistic [2007.01.23 10:15]: * Jean-Rene David-2 wrote: See here for a possible solution: http://vim-latex.sourceforge.net/index.php?subject=faqtitle=FAQ#faq-e-acute I think this solution can work but I don't have the perms for the plugin direcory, is there a solution to unmap or surmap the é? [Please don't top-post] The solution given uses only files in your home directory. It should work even if the plugin is globally installed. Do you mean you don't have the required permissions in your own home directory? -- JR
Re: disable é map in tex-suite
Hi, neolistic wrote: It don't works, I tried iunmap é iunmap M-i and I can see the map with :imap i é@PlugTex_InsertItemOnThisLine from :help map-listing | When listing mappings the characters in the first two columns are: | | CHAR MODE~ | SpaceNormal, Visual and Operator-pending | n Normal | v Visual | o Operator-pending | ! Insert and Command-line | i Insert | l :lmap mappings for Insert, Command-line and Lang-Arg | c Command-line | | Just before the {rhs} a special character can appear: | * indicates that it is not remappable |indicates that only script-local mappings are remappable | @ indicates a buffer-local mapping Note the last line. To unmap this buffer-local mapping you should use :iunmap buffer é or :iunmap buffer M-i Regards, Jürgen -- Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us. (Calvin)
Re: disable é map in tex-suite
neolistic wrote: It don't works, I tried iunmap é iunmap M-i and I can see the map with :imap i é@PlugTex_InsertItemOnThisLine you will notice an @ in the mapping {rhs}. This indicates that the mapping was defined for the buffer only. Try: iunmap buffer é instead, and see if that works. A.J.Mechelynck wrote: neolistic wrote: Hello I use the tex-suite with VIM7.0 and it's very useful but tex-suite have a auto-defined insert-map for the key é and I don't want to use this map, I want that when I'm in insert mode and I press the key é, vim insert the character é Does anyone know how to do that? Tanks You should be able to unmap it. Try :unmap! é or :iunmap é Note that é is probably synonymous with Alt-i -- by unmapping the one you will probably lose the other. Once you find the right command, you can place it in a script, which (in order for it to work) must be sourced after the TeX suite: see :help after-directory. Best regards, Tony. -- Albie Janse van Rensburg (neonpill) Registered Linux User 438873 | http://counter.li.org
Re: disable é map in tex-suite
Thanks you very much!! It works perfectly it was the buffer in the command which miss: : iunmap buffer é Thanks again neolistic wrote: Hello I use the tex-suite with VIM7.0 and it's very useful but tex-suite have a auto-defined insert-map for the key é and I don't want to use this map, I want that when I'm in insert mode and I press the key é, vim insert the character é Does anyone know how to do that? Tanks -- View this message in context: http://www.nabble.com/disable-%C3%A9-map-in-tex-suite-tf3064330.html#a8524567 Sent from the Vim - General mailing list archive at Nabble.com.
delete buffer in tab but retain empty tab
I'd like to be able to delete a buffer in a tab, but still retain the tab. Right now, Vim just closes the tab. Is there any way I can configure Vim to do this? Example, vim file1.txt :tabe file2.txt :bd (closes file2.txt as well as the tab. I'd still like to retain this empty tab.) Thanks, Vinay
Re: delete buffer in tab but retain empty tab
Vinay Doma wrote: I'd like to be able to delete a buffer in a tab, but still retain the tab. Right now, Vim just closes the tab. Is there any way I can configure Vim to do this? Example, vim file1.txt :tabe file2.txt :bd (closes file2.txt as well as the tab. I'd still like to retain this empty tab.) Thanks, Vinay You could just use :enew instead of :bd, which will leave you with a new, empty buffer. Unfortunately, the buffer will still be loaded in memory (:ls will show it). You could create a function, like the following: :function! enewbd :let l:bufnum = bufnum($) :enew :bd l:bufnum :endfunction this function should fail if the current buffer is still not saved. It is effective a stronger version of :enew. -- Albie Janse van Rensburg (neonpill) Registered Linux User 438873 | http://counter.li.org
Re: Color errors on OSX
A.J.Mechelynck wrote: Robert Hicks wrote: Cannot allocate color colorname I compiled from svn src. There didn't seem to be any errors and it created the Vim.app. The Vim.app works but when I go to change the colorscheme I get about 20 of those messages. Is there something I need to pass to configure on OSX about colors? Robert If your gvim doesn't display through X11, try copying the X11 rgb.txt (usually something like /usr/X11R6/lib/X11/rgb.txt ) to the $VIMRUNTIME directory. see :help rgb.txt. Not sure if it works for the Mac but you could always try. Best regards, Tony. Yep, that was it. I coped the rgb.txt from the binary at the macvim site and it no longer throws those errors. Robert
getting rid of beep in vim
Hi all, I'm sorry, I know this should be a problem that I can resolve for myself, but I have searched the vim help under bells and visualbell and tried what it says and it doesn't seem to work, so your help would be greatly appreciated. Basically, I always get the beeping sound when I press 'k' but I'm already at the top of the file, for example and I want to turn it off. I am running vim 7.0 on Windows XP Pro SP2. I have: set vb t_vb='' in my _vimrc, I have also set it without the quote marks. I also have set novb and: set noeb in my _vimrc and I still get the noise! I am starting to wonder if my _vimrc is actually being read from, it is located in: C:\Program Files\Vim, although I put a copy into: C:\Program Files\Vim\vim70 to see if that would resolve it but it made no difference. Is there a way to get vim to tell me which _vimrc it has read when loading? If I type: :set t_vb=? into gvim, I get: t_vb=^[|f which I believe reads as escape character f according to the help file, which has the sentence: In the GUI, 't_vb' defaults to Esc|f, which inverts the display for 20 msec. I don't understand what inverts the display means, unless it means turn the display upside down, which sounds a bit strange! Anyway, it was the fact that I seem to have the default value that leads me to believe that my _vimrc isn't being read. Sorry for the rambling, but if someone has the time to explain all this to me (or even some of it) I would be very grateful, thanks very much for any help. Rob.
hlsearch question
Hi all, I'm a bit confused about the hlsearch feature of v7. In my .vimrc I set set nohlsearch to disable highlighting of search results on startup. :help nohlsearch says Stop the highlighting for the 'hlsearch' option. It is automatically turned back on when using a search command, or setting the 'hlsearch' option. But when I search by / nothing gets highlighted! The highlighting comes back when I do !hls What am I missing? Isn't it possible to activate this feature on first usage of a vim session? best regards Ralf