Re: highlight all words matching the word under the cursor
On 29.05.2011 11:31, Reuven Sayag wrote: Hi, I'm looking for a way to highlight words that match the word under the cursor. I tried to put in my vimrc the following: :autocmd CursorMoved *.cc,*.h,*.java exe printf('match IncSearch /\%s \/', expand('cword')) This works but it's a bit slow, and I don't really need it all the time, Can someone add some info about how to toggle this behavior on a function key (or aLeader h)? Thanks, Reuven. Hi Reuven, I have written a script that tries to mimic eclipse in this regard. I have to say that it's not exactly as you want it because it highlights in every filetype. But, I don't feel a slow down at all. http://www.vim.org/scripts/script.php?script_id=1510 cu, Adam. -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
windows resize, insert mode
Hello vimmers!/ /I have a strange behaviour of some sort: after resizing a vim-window inside vim with the mouse, somehow I land in insert mode. Which is especially annoying when the cursor is in a non-modifiable buffer/. /':map' doesn't help: I unmapped every mapping with LeftMouse in them, but still no joy... VIM 7.3 20100815, win32, OLE cu, Adam. -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: Windows version with Python, Ruby and Lua support?
On 23.08.2010 13:19, Didlybom wrote: Hi, this is my first post on this list so first I'd like to thank all the Vim contributors for your work on this awesome piece of software that is VIM. That being said, I have a question regarding python, ruby and lua support (or lack thereof) on the official Vim installer for windows. I am trying to use some vim scripts that require python or ruby support (such as command-t) but when I try to use them on a fresh install of Vim 7.3 on windows they do not work. I've searched on the vim webpage for links to the versions that include support for these external languages but I have not found them. I also wonder why the default windows installer does not ship with support for python and ruby. In my opinion the additional file size should not be a problem for most users. So if you could point me to where I could download the versions of vim and gvim that have this language support I would be very grateful. Thank you in advance, Angel P.S.- Please accept my apologies if this post appears twice. I posted it once before but I do not see the post in the google groups interface so I am reposting it in case there was some problem while sending the original email. Please try this version: ftp://ftp.vim.org/pub/vim/pc/gvim73ole.zip. It's accesible through http://www.vim.org/download.php#pc. It has support for perl, python and ruby, although lua is not included. You can just overwrite the files in your vim installation directory. cu, Adam. -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: [SOLVE] Re: Some ideas , possible with vim ?
Am 24.07.2010 um 15:30 schrieb Aaron Lewis aaron.lewis1...@gmail.com: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/24/2010 09:25 PM, Tony Mechelynck wrote: You could either use :e # to come back to the previous file, or use CTRL-W f instead of gf (opening the include file in a split-window), then the first file is still there, and closing the other window (e.g. by :q or similar) comes back to it. See :help edit-intro :help CTRL-W Best regards, Tony. Ah , that's it , thanks ! - -- Best Regards, Aaron Lewis - PGP: 0x4A6D32A0 FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0 irc: A4R0NL3WI5 on freenode -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkxK6usACgkQvf41sEptMqAlMgCgu7RZb58LjzWcSx+FR4VQ906j G8AAn1rB1QdkUynxFlt0yrq0L4NreFUG =2Cq1 -END PGP SIGNATURE- -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php You could also have a look at this plugin: http://www.vim.org/scripts/script.php?script_id=31 I prefer it to gf because you can have a quick look into the header file if you need it... cu, Adam. -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: Mix TagList's tags with your own tags
On 20.07.2010 02:16, Pablo Giménez wrote: 2010/7/19 Brett Stahlmanbrettstahl...@comcast.net: On Jul 19, 6:49 am, Pablo Giménezpablog...@gmail.com wrote: Hi. I am using the TagList plugin and I have seen that TagList use different tags than VIM, I mean vim can see the tags in the tag files included in the tags option. So I have some tag files with tags for system libraries and then I keep project's tags under TagList control. If IC-] to jump to a definition from my proiject it doesnt appear in the options, because it doesn't exists in my tags files set by the tags option. But it appears in the TagList window. How I can make TagList work with my existing tag files and also viceversa. This is precisely the reason I don't often use Taglist, even though I think it's a very powerful and well-designed plugin. It may be possible to make Taglist work with pre-built tags files for things like system header files, but I didn't see anything in its documentation on strategies for doing so. Admittedly, I didn't spend a lot of time looking into it, so perhaps I've just overlooked it... Do you recommend any other plugin to manage tags that works well with prebuilt tags and dynamic tags? After looking for a while seems taglist is the most powrful. I still have a question: how do you keep project's tags under TagList control? TagList works on files and not on projects as far as I know. Anyways, if there are any tags in TagList but not in vim, than your ctags is not set up correctly. Perhaps you need more definitions in your .ctags? Or you don't regenerate the tags often enough. Could you tell how the tags you're searching for look like? cu, Adam. -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: Mix TagList's tags with your own tags
On 20.07.2010 12:25, Pablo Giménez wrote: 2010/7/20 Adam Duckadam.ian.d...@gmail.com: On 20.07.2010 02:16, Pablo Giménez wrote: 2010/7/19 Brett Stahlmanbrettstahl...@comcast.net: On Jul 19, 6:49 am, Pablo Giménezpablog...@gmail.comwrote: Hi. I am using the TagList plugin and I have seen that TagList use different tags than VIM, I mean vim can see the tags in the tag files included in the tags option. So I have some tag files with tags for system libraries and then I keep project's tags under TagList control. If IC-]to jump to a definition from my proiject it doesnt appear in the options, because it doesn't exists in my tags files set by the tags option. But it appears in the TagList window. How I can make TagList work with my existing tag files and also viceversa. This is precisely the reason I don't often use Taglist, even though I think it's a very powerful and well-designed plugin. It may be possible to make Taglist work with pre-built tags files for things like system header files, but I didn't see anything in its documentation on strategies for doing so. Admittedly, I didn't spend a lot of time looking into it, so perhaps I've just overlooked it... Do you recommend any other plugin to manage tags that works well with prebuilt tags and dynamic tags? After looking for a while seems taglist is the most powrful. I still have a question: how do you keep project's tags under TagList control? TagList works on files and not on projects as far as I know. Anyways, if there are any tags in TagList but not in vim, than your ctags is not set up correctly. Perhaps you need more definitions in your .ctags? Or you don't regenerate the tags often enough. When I mean project Is just a root directory and all the files under it. Is a light concept of projects :) Could you tell how the tags you're searching for look like? My ctags files dont include the files in the project, just tags from system libraries, in this case python modules and packages installed in the system. I dont't make tags for the files under my project folder because I leave that task to TagList. But the problem seems that the tags created by TagList are not in the tags option so this is the reason becauseC-] can't reach them. Now I see. Well, I generate tags for files in my projects with ctags. I don't care what tags TagList uses. Have a look into localvimrc: http://www.vim.org/scripts/script.php?script_id=441 This way, you can have all the power of vim with unique settings for each project (even directories within a project). For example I have a .lvimrc in the top-level-dir of a C#-project set up as follows: --- let b:ProjPath=expand(sfile:p:h) .lvimrc let b:ProjName=split(b:ProjPath, \\)[-1] exe setl tags+= . b:ProjPath . /tags exe setl path+= . b:ProjPath . /** exe augroup . b:ProjName au! au BufEnter *.cs compiler msbuild au BufWinEnter *.cs :if exists(b:ProjPath) | :exe lcd . b:ProjPath | :endif augroup END C# settings setl suffixesadd+=.cs --- You could add a au BufWritePost or something for generating tags. As you can see I use only one tags file for a project and because `lcd' is always set to the project directotory I can just do a !ctags -R . and everything is fine. Also adding --extra=+f to your .ctags will generate filenames as tags and jumping to another file is just pressing C-] on a filename. cu, Adam. -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: ANN: OutlookVim - version 4.0
On 04.06.2010 14:46, David Fishburn wrote: OutlookVim is a plugin for Microsoft Windows Outlook users. It simply adds a button in Outlook which will spawn Vim, allow you to edit the body of the currently open email and when you :w, it will update Outlook with the results. There are more details, you can read about them here: http://www.vim.org/scripts/script.php?script_id=3087 New to version 4.0 New Features - Updated documentation. Added a troubleshooting section (Zsolt Botykai). - Updated outlookvim.js to display a message if double clicked on to determine if Windows Script Host is correctly installed. - Updated outlookvim.bas (the Outlook VBScript Macro) to show an error if it cannot access the file system. Modified all the message boxes Outlook may display to indicate OutlookVim: is displaying the message. - You can specify whether new emails should be opened in a new tab via the g:outlook_use_tabs configuration option (Zsolt Botykai). After unzipping the contents into your vimfiles directory, copy and paste the outlookvim.bas file into your Outlook macro created earlier (ALT-F11 in Outlook). Also from within Vim run (choose the location where the plugin was installed): :helptags $VIM\vimfiles\doc A special thanks to Zsolt Botykai for his testing and suggestions. As usual, with all my plugins, feedback good and bad is always welcome. Enjoy. Dave Hi Dave, I just installed the plugin: it works, after some minor tweaks: First, I have '*.exe' in 'wildignore' which prevents me from trying to edit executables :). But this conflicts with 'globpath()'; a trivial change would be: if strlen(globpath(substitute($PATH, '\\\?;', ',', 'g'), 'cscript.exe', 1)) == 0 Second, wouldn't it be better to expand 'g:outlook_javascript' as follows? let g:outlook_javascript = expand('sfile:p:h') . '/outlookvim.js' This location can be overridden anyway, but I think this is a better default for users (like me), installing everything in %HOME%\vimfiles. Btw, thanks for the plugin! Works great! cu, Adam. -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: When Vim 7.3 will be released
On 09.03.2010 08:44, Tom Link wrote: I think proceeding slowly would be a good idea. One argument pro intermittent releases is though that it would make it easier for windows users to use current versions of ruby/python/... in conjunction with vim without having to compile vim. I'd vote for minor releases every 200 patches or so. If you really want an intermittent Vim, then use cream. Under cream.sf.net there are also vim versions without cream. 7.2.356 as of February 3rd. cu, Adam. -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: Fold according to keyword before fold mark?
On 01.03.2010 16:29, fka...@googlemail.com wrote: Have you checked vimoutliner? http://www.vimoutliner.org/ Very impressive -- it folds/unfolds to a given fold depth, however, the main aspect I am looking for is not covered by VimOutliner. I look for a way to fold/unfold ALL folds belonging to the same type of fold (indicated e.g. by a leading keyword before the fold mark), so see only those folds of interest. Felix I think I have the thing you're looking for. I think it's from a vimtip or something: #v+ Causes all comment folds to be opened and closed using z[ and z] respectively. Causes all block folds to be opened and closed using z{ and z} respectively. function FoldOnlyMatching(re, op) mark Z keepjumps normal gg let s:lastline = -1 while s:lastline != line('.') if match(getline(line('.')), a:re) != -1 exec 'normal ' . a:op endif let s:lastline = line('.') keepjumps normal zj endwhile keepjumps normal 'Z unlet s:lastline endfunction nnoremap silent z[ :call FoldOnlyMatching('/[*][*]', 'zo')CR nnoremap silent z] :call FoldOnlyMatching('/[*][*]', 'zc')CR nnoremap silent z{ :call FoldOnlyMatching('[ \t]*{', 'zo')CR nnoremap silent z} :call FoldOnlyMatching('[ \t]*{', 'zc')CR #v- I've never tried :call FoldOnlyMatching('Task1{', 'zo')CR or so, but it should work. cu, Adam. -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: Fold according to keyword before fold mark?
On 01.03.2010 16:29, fka...@googlemail.com wrote: Have you checked vimoutliner? http://www.vimoutliner.org/ Very impressive -- it folds/unfolds to a given fold depth, however, the main aspect I am looking for is not covered by VimOutliner. I look for a way to fold/unfold ALL folds belonging to the same type of fold (indicated e.g. by a leading keyword before the fold mark), so see only those folds of interest. Felix I think I have the thing you're looking for. I think it's from a vimtip or something: #v+ Causes all comment folds to be opened and closed using z[ and z] respectively. Causes all block folds to be opened and closed using z{ and z} respectively. function FoldOnlyMatching(re, op) mark Z keepjumps normal gg let s:lastline = -1 while s:lastline != line('.') if match(getline(line('.')), a:re) != -1 exec 'normal ' . a:op endif let s:lastline = line('.') keepjumps normal zj endwhile keepjumps normal 'Z unlet s:lastline endfunction nnoremap silent z[ :call FoldOnlyMatching('/[*][*]', 'zo')CR nnoremap silent z] :call FoldOnlyMatching('/[*][*]', 'zc')CR nnoremap silent z{ :call FoldOnlyMatching('[ \t]*{', 'zo')CR nnoremap silent z} :call FoldOnlyMatching('[ \t]*{', 'zc')CR #v- I've never tried :call FoldOnlyMatching('Task1{', 'zo')CR or so, but it should work. cu, Adam. -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: Always highlight current word
On 02.07.2009 19:23, Vincent Arnoux wrote: On Thu, Jul 2, 2009 at 18:57, Tim Chasev...@tim.thechases.com wrote: Though I think it would annoy the bajeebers out of me, you can do it with something like: :au CursorHold * exec 'match IncSearch /'.expand(cword).'/' You might want to tweak that to include word-boundaries: ...earch /\'.expand('cword').'\/' with whatever the proper escaping of the \ characters might be. You can use 2match or 3match (or whatever), perform it for just certain file-specs (instead of *) and change up the syntax group instead of IncSearch to whatever you like. -tim Sorry for your bajeebers and thanks a lot for the tip: that was a quick service! Vincent That would be the right time to advertise my plugin: http://www.vim.org/scripts/script.php?script_id=1510 It highlights the current word only if it isn't hilighted. This way public, static, void and so on don't get hilighted. cu, Adam. --~--~-~--~~~---~--~~ You received this message from the vim_use maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---