RE: Dubious scripts at vim.org

2011-11-23 Thread John Beckett
Marc Weber wrote: Besides being potentially dangerous to Windows users, distribution of .exe files as scripts runs counter to the idea that scripts' execution depends on Vim alone, and not on a particular operating system. So do we all agree that Vim is missing a :call

RE: Script Spam

2011-11-22 Thread John Beckett
Paul wrote: Oh dear, this just appeared: http://www.vim.org/scripts/script.php?script_id=3816 Thanks for the report. I have deleted the script, and its download package, and the associated user. If you have viewed the script page, you may need to reload (refresh) the browser to see an error

RE: _vimrc file on Windows with 7.3

2011-11-21 Thread John Beckett
Ben Fritz wrote: The wiki is correct. Vim does NOT use %USERPROFILE% or %ProgramFiles%. Sorry, John. Not quite true. Although I don't think Vim uses USERPROFILE, it *does* use the program files directory by default. If a _vimrc is not found in $HOME, Vim looks it the $VIM directory, which

RE: :b file like behavior for :tabn

2011-11-20 Thread John Beckett
philipx wrote: Either command opens a *new* tab with the file - I'd like it to go to the tab that already has the file open. reason is that the tabs often have certain window setups that I'd like to go back to. I haven't tried it, but you could investigate: :set switchbuf=usetab :sb

RE: _vimrc file on Windows with 7.3

2011-11-20 Thread John Beckett
Henry Hertz Hobbit wrote: I have the _vimrc file in these two locations: %UserProfile%\_vimrc %ProgramFiles%\Vim The Wiki mentions $Home for Windows. The wiki is correct. Vim does NOT use %USERPROFILE% or %ProgramFiles%. I also have these environment variables Vim=C:\Program Files\Vim

RE: vim announce violated Google's terms of service?

2011-11-19 Thread John Beckett
Bram Moolenaar wrote: Somehow the group was reported to contain spam. Weird. It wasn't easy to find the way to get the group back. I did manage to find someone who could do it. The group is back now! http://groups.google.com/group/vim_announce Problem: I think I was a member of that

RE: Yank, move to another split tab and jump to yanked line number

2011-11-15 Thread John Beckett
Sapfeer wrote: Thanks a lot! Your solution works great! I suppose I just misunderstood some mapping features. Could you please explain why you use i command? AFAIK, i stands for insert - I don't understand how can you issue yank command, then go to insert mode and select a word there. Also

RE: what is vim's printf, as it is in c

2011-11-09 Thread John Beckett
Please bottom post on this mailing list. Quote a small (relevant) part of the message you are replying to, and put your text underneath. Delete text that is not needed to understand your reply Note the footer below each message (Do not top-post!). John -- You received this message from the

RE: Compound search

2011-11-06 Thread John Beckett
Bee wrote: Ha! I did find out how to delete a message. I see you saw it before I was able to delete. The 'More options' on the right of a post has delete, which can be done after posting. Just to clarify, while an author might be able to remove their message from the Google Groups archive,

RE: function to get word under cursor

2011-09-28 Thread John Beckett
Is there any standard function to get the word under cursor ( as */# search commands do ) or I should write it by myself using getline('.')? Use cword or cWORD. Some examples: http://vim.wikia.com/wiki/Highlight_all_search_pattern_matches

RE: sort content of a register

2011-09-25 Thread John Beckett
porphyry5 wrote: One by one I have appended a number of lines to a register (z). I need to sort them and then paste them at the start of the document. Without complaint, vim accepts the command :zsort but the content of z is unchanged. Is it possible to do this in the register, or must I

RE: Can a function tell if % range was explicitly passed?

2011-08-25 Thread John Beckett
lessthanideal wrote: function RangeTest() range echo a:firstline . . a:lastline endfunction command -range=% CallRT line1,line2call RangeTest() These two commands give the same output :CallRT :%CallRt Could the function distinguish between the two? I noticed your change at

RE: Help installing vim-r-plugin-110805

2011-08-22 Thread John Beckett
Sean Creekmore wrote: 2.) How do you build the tags file for this document? The command given at http://www.vim.org/scripts/script.php?script_id=2628 looks correct, that is, run Vim and enter: :helptags ~\vimfiles\doc According to the list of files, one file is: doc/r-plugin.txt and you

RE: Make :saveas save to path of current file

2011-08-18 Thread John Beckett
lessthanideal wrote: Suppose the current working directory is C:\ and I am editing C:\temp\test.txt. I issue the command :saveas test2.txt The file is saved as C:\test2.txt, hHow can I make it be saved as C:\temp\test2.txt? The way :saveas is working is correct because if you do not

RE: Vim, Win7, /etc/drivers/hosts

2011-08-16 Thread John Beckett
Daryl Lee wrote: Can someone tell me how to configure gVim so it handles Win7 security? I do not follow Windows any more, but have not been able to avoid noticing talk about some features, and I believe there is nothing an application like Vim can do. Windows simply rearranges the view of the

RE: Command, Function using Bar

2011-08-14 Thread John Beckett
Asis Hallab wrote: vimgrep validate app/models/* :Qfdo %s/validate/VALIUM/ge | update ... com! -nargs=1 -bang -bar Qfdo :call QFDo(bang0,q-args) Interesting function! I think you need to remove the -bar from the last line. Don't know why Christian included that. John -- You received this

Quote character on command line

2011-08-13 Thread John Beckett
I want to insert the following line after the current line: abc def ghi This command works (each quote is escaped): :put ='abc \def\ ghi' These commands also work (no escaping): :let line = 'abc def ghi' :put =line But this command fails (the first quote starts a comment):

RE: passing register contents to p command

2011-08-13 Thread John Beckett
sinbad wrote: how to pass the contents of a register in a vim script to the p command. There is an example using -register at: http://vim.wikia.com/wiki/Copy_the_search_results_into_clipboard John -- You received this message from the vim_use maillist. Do not top-post! Type your reply below

RE: ANNC: moving the astronaut website

2011-08-11 Thread John Beckett
Charles Campbell wrote: I'm moving my website... FROM: http://mysite.verizon.net/astronaut/... TO: http://drchip.0sites.net/astronaut/... For anyone wondering about the links at the Vim Tips wiki, I have changed all the links at vim.wikia.com, and checked that they work. All pages have

RE: / doesn't get filled

2011-08-10 Thread John Beckett
sinbad wrote: why doesn't the / register filled with the current search. with the following mapping. should i do something special nmap \jj :call Jj() See the second solution at: http://vim.wikia.com/index.php?title=Search_for_visually_selected_text You put this at the end of the mapping:

RE: / doesn't get filled

2011-08-10 Thread John Beckett
sinbad wrote: it doesn't seem to be working. if you don't mind can you provide more info. I can't explain why the tip works given the Help text quoted by Gary Johnson (which I have puzzled over before). However, it does, and using its technique, the following works.

RE: Python, folding, ftplugin directories

2011-08-04 Thread John Beckett
Matthew Pettis wrote: I'm editing python files, and want to enable folding. Found the script here to help me with that: http://www.vim.org/scripts/script.php?script_id=1494 I put this file at: ~/.vim/ftplugin/python_editing.vim I don't know, but you might try moving the file to

RE: A few questions about :append and ex

2011-08-04 Thread John Beckett
ranousse wrote: 1) If I understand right, :append is used this way :append line1 line2 . I suspect that :append is not used much. Try these examples: :let var = 'Hello world' :put =var :let list = ['one', 'two', 'three', var] :put =list John -- You received this message from the vim_use

RE: guide to compiling vim on windows

2011-07-28 Thread John Beckett
skeept wrote: Is there another place where I can get the binary with the latest patches that is compiled against python 2.7? If not is there a guide for compiling vim against with visual studio? I finaly wrote a guide: http://vim.wikia.com/wiki/Build_Vim_in_Windows_with_Visual_Studio It

RE: A modern look for gvim (win32)

2011-07-27 Thread John Beckett
Tobbe Lundberg wrote: So the general consensus seems to be that it would be nice to have a more modern GUI, if it's all optional and doesn't limit the uses of vim in any way. You all also seem to agree that this is a big undertaking and that I shouldn't do it alone. There is one more wet

RE: How to automate pasting an increasing list of integers?

2011-07-21 Thread John Beckett
Mark Larwill wrote: I often need to make a large list of XML quickly and was wondering if there is a fast way to do this with VIM. For example suppose I have the XML: useruser1/user useruser2/user useruser3/user Use the following, adapted from tip:

RE: SAP - HR/Payroll - Team Lead/Houston, TX /long-term

2011-07-20 Thread John Beckett
Harsh J wrote: ...COPY OF SPAM... Please do not do that! The spam was sufficiently irritating. I have banned the original sender and removed their posts (and the copy from the above) from the Google vim_use archive. I do not know how the spammer got their message posted. It seems unlikely that

RE: Python plugin using PyWin32

2011-07-01 Thread John Beckett
Alexandre Martani wrote: :python import win32api I receive the following error: Traceback (most recent call last): File string, line 1, in module ImportError: DLL load failed: The specified module could not be found. I think sc is correct. In Vim, use :version and carefully inspect

RE: !start /b command and file redirection

2011-06-21 Thread John Beckett
Ben Fritz wrote: I know I can use the chcp command in a cmd.exe shell to output the current encoding, so prior to patch 203, I had a system() command which grabs the output of this command in my .vimrc. However, as a side effect, every time I launch Vim with this call in the .vimrc, a cmd.exe

RE: How to check for a variable being set? 'defined' somehow doesn't work for me..

2011-06-09 Thread John Beckett
Asis Hallab wrote: How do I do something like the following: if(defined(tags)) return \c-x\c-] endif The tags-variable is the one set by :set tags=./tags. if exists('tags') :help exists() John -- You received this message from the vim_use maillist. Do not top-post! Type your reply

RE: highlight all words matching the word under the cursor

2011-05-29 Thread John Beckett
Reuven Sayag wrote: I'm looking for a way to highlight words that match the word under the cursor. There is a good tip on this: http://vim.wikia.com/wiki/Highlight_multiple_words John -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you

RE: Submatch expression in substitute()

2011-05-17 Thread John Beckett
Jürgen Krämer wrote: you can use \= in substitute(): :echo substitute('abc%41def', '%\(\x\x\)', '\=nr2char(0x.submatch(1))', 'g') Brilliant, thanks! I must have known that years ago?? John -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the

Submatch expression in substitute()

2011-05-16 Thread John Beckett
I want some Vim script to remove percent encoding (where '%' followed by two hex digits means the single character with the given hex ASCII code, for example '%412' is 'A2'). It's easy to do this using :substitute with: :s/%\(\x\x\)/\=nr2char('0x'.submatch(1))/g However, submatch() does not

RE: sorting based on numercial value

2011-05-02 Thread John Beckett
googler wrote: I have a text file with a number of lines in it. Each line has the same format, say something like below. string1 string2 number string3 I want to sort this file based on the numerical value of the number field. How can I do this in vim? Thanks. If there are no numbers in

RE: determine if a certain line occurs in a file

2011-04-30 Thread John Beckett
cyboman wrote: i'm trying to write a small vim function which will modify a copyright year each time i'm opening a file. You might want to look at the ideas here: http://vim.wikia.com/wiki/Automatically_Update_Copyright_Notice_in_Files John -- You received this message from the vim_use

RE: capture result of a global search

2011-04-29 Thread John Beckett
cyboman wrote: does anybody know if there is a way to capture the result of a global search in vim. See: http://vim.wikia.com/wiki/Copy_the_search_results_into_clipboard John -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are

RE: is there s 'toinitialupper' function?

2011-04-29 Thread John Beckett
Tim Chase wrote: let s=substitute(s, '\w\+', '\u\1', 'g') The above is intended to change each word in s, making the first letter uppercase and not changing the rest. The search pattern needs brackets, or the \1 should be replaced. The following works: let s=substitute(s, '\w\+', '\u',

User command with -nargs=1

2011-04-29 Thread John Beckett
I thought defining a user command with '-nargs=1' would mean that using more than one argument would give an error, however I can't see a difference between nargs=1 and nargs=*. command! -nargs=1 Test call Test('args') function! Test(args) call append('$', 'args: ' . a:args . '') endfunction

RE: arithmetic expressions in search

2011-04-27 Thread John Beckett
googler wrote: I have a file where I have words like X1, X2, ..., X16, X17, X18, I want to find out occurences of words containing a number greater than, say, 17. So basically, I want to find X18, X19, X20, etc. How can I do this in vim? In other words, can we use arithmetic expressions

RE: Replacing a visual selection

2011-04-21 Thread John Beckett
Kai Weber wrote: 1. Go to Visual mode 2. Select text 3. y'ank 4. :%s/c-r*/foo/g One problem with this workflow I have to check if my selected text contains special characters I have to escape (e.g. /). I use this tip: http://vim.wikia.com/wiki/Search_for_visually_selected_text That tip is

RE: incrementing number in each line

2011-04-19 Thread John Beckett
googler wrote: I have one question related to the solution given there. :let i=1 | g/foo/s//\=blah_.i/ | let i=i+1 That is two commands: :let i=1 :g/foo/s//\=blah_.i/ | let i=i+1 and the second of these is: :g/foo/ :s//\=blah_.i/ :let i=i+1 :g works by flagging each line

RE:

2011-04-18 Thread John Beckett
Clive Moncrieff wrote: Does anyone know how one can get vim to stop sending emails to an address.I have repeatedly sent unsubscribe messages and they get automatically bounced. The email which I am trying to unsubscribe will cease to operate soon and from then on all emails will be

RE: incrementing number in each line

2011-04-18 Thread John Beckett
googler wrote: This is what I actually used after posting the question. But I was wondering if there is a better way. Use Tim's approach but modify the replacement using: http://vim.wikia.com/wiki/Substitute_with_incrementing_numbers John -- You received this message from the vim_use

RE: searching and cursor postion

2011-04-13 Thread John Beckett
Richard Livornese wrote: I'm trying to figure out how the correct command to search for a string and have the cursor positioned at the end(or beginning) of that string. From the documentation, it seems to me this should work: /string/e But when I try that I get the message: E481: No

RE: RE: why not remove www? Currently http://vim.org/ doesn't work

2011-04-08 Thread John Beckett
Luke wrote: I read the thread and nowhere in it does it argue that vim.org should not resolve. Where do you get the opinion that the DNS manager disagrees with resolving vim.org? It's a little subtle but correct. I think that what happened is that someone mailed the DNS manager directly, then

RE: Path easy-search

2011-04-06 Thread John Beckett
giacomo wrote: some days ago I was wondering on the best way to search for full *NIX path (something like /path/to/file) in a file. The easier solution, a back-slash before each slash, is not that comfortable, especially if using the mouse for copy and paste. I looked around and summarized my

RE: .Net Developer Job Opening - Valencia, CA

2011-04-01 Thread John Beckett
Makro Tech wrote: ...spam... No idea how this got sent. I have just banned the sender and removed the post from the archive. John -- 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

RE: Clearing search on startup

2011-03-14 Thread John Beckett
lazloman wrote: After I do a search, the results remain highlighted. I've found I can clear the results doing this: :let @/ = But, upon restarting vim those search results are again highlighted. I found that using :nohlsearch in .vimrc prevents the old search results from being highlighted

RE: How to use color to search

2011-03-11 Thread John Beckett
lucentjames wrote: What I need to do is have some list of keyword group (keyword that have special chararters eg / . ? [ ])and use VIM to mark to different color. Syntax rules can be used, or highlighting with matchad(). One approach would be to use this tip (it uses matchadd()):

RE: MozRepl + vim

2011-03-10 Thread John Beckett
Ben Schmidt wrote: It's annoying that it should get copied from Firefox at all, though. I wonder if that's a problem we can address on the Wiki, as it's going to cause a lot of users really confusing problems if when they copy+paste code it has a bunch of invisible things causing errors! I

RE: Why doesn't the cursor go beyond the last character in Vim when in command mode?

2011-02-24 Thread John Beckett
Gerardo Marset wrote: Why is it that the cursor doesn't go beyond the last character when in command mode? I find it kind of wierd, and because of that I have to use either a or A to append something to a line (instead of i). There is also: :set virtualedit=all :help virtualedit One

RE: Problems with vim.org scripts site

2011-02-12 Thread John Beckett
Badmagic replied to Bram: The Vim website is still half-broken. The connection to the database is not working. I have filed a ticket: http://sourceforge.net/apps/trac/sourceforge/ticket/17514 I'm afraid I have no clue how to speed this up. If you know someone inside SourceForge, please

RE: q macro-like action executed immediately and without specifying a register

2011-02-12 Thread John Beckett
Scott Steele wrote: If I want to append # Great line! to five consecutive lines Are you aware there is a built-in procedure for this: http://vim.wikia.com/wiki/Inserting_text_in_multiple_lines John -- You received this message from the vim_use maillist. Do not top-post! Type your reply

RE: Pasting text without indentation

2011-01-17 Thread John Beckett
Kevin R. Bulgrien wrote: +p This sounds superior to using :paste as is what I have done to avoid indentation. Will have to try it out. Using +p requires that :version shows +clipboard (Vim compiled with that feature). If you have -clipboard, see the following tip (which shows the correct

RE: E163 when restoring a session set up with --remote-silent-tab

2010-11-29 Thread John Beckett
Ben Fritz wrote: I've installed Vim, probably with the Vim without Cream installer for Windows (since that is normally what I use), on a laptop where I have no admin rights. It worked fine, I just needed to install to a directory to which I had access (C:\Vim actually, which struck me as odd;

RE: Any tricks to quit vim without interruption raised by unsaved [No Name] tab/buffers?

2010-11-16 Thread John Beckett
Ryan J M wrote: Great, it works! Though it creates a split window, I will try to create a new scratch TAB later. Instead of 'new' use 'tabe' (or 'tabnew'). John -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For

RE: Error detected while processing modelines

2010-11-16 Thread John Beckett
AK wrote: Subject: Re: vim: how to use set indentexpr Vim thinks it's a modeline because it's in the top 5 lines and it's ' vim: ..'. It's probably best to just ignore this since it will only happen very rarely, or you can do ':set nomodeline' when editing emails. (for example by detecting

RE: Any tricks to quit vim without interruption raised by unsaved [No Name] tab/buffers?

2010-11-15 Thread John Beckett
Ryan J M wrote: Usually i use 'tabnew' to open several [No Name] tabs to do tmp work, and when I try to quit vim, 'qa' feels unhappy for the unsaved [No Name] buffers, and 'qa!' may do bad things if i leave some important files unsaved. I don't think there is any magic solution to this: it's

RE: 7.3 features missing

2010-11-05 Thread John Beckett
keith wrote: I upgraded to 7.3 (on Fedora linux), but now two features (which used to work in 7.2 and I liked) don't work : - there is no display of the cursor row and column any more; I have to get it with ctrl-g after every move - search hits are not highlighted in yellow any more. Vim 7.3

RE: [HELP] vim moving code block problem

2010-11-01 Thread John Beckett
Zhanglistar wrote: Vim manual says that to move to the start of the outer block use the [[ command. But when I use [[, it jumps to the head of file, which is a C program. And I when I use ]], it jumps to the end of the C file. Vim is not a compiler and it has no idea where functions start and

RE: line number non copyable

2010-11-01 Thread John Beckett
statquant2 wrote: silly question, is it possible to set the line numbers such that you cannot copy them ? I like to have the line number but I am fed up with having to set nonu each time I want to copy with the mouse. In most editors I know, line numbers are visible but you cannot copy them

RE: How to selectively close a buffer keeping opened another one?

2010-11-01 Thread John Beckett
caruso_g wrote: I am not able to find how to selectively close a buffer keeping opened all another ones. I mean, having several buffers opened, I understood I should keep them in one windowtab and switch between them as I need. But how can I close just one I don't need to keep opened in the

RE: For languages that end statements with semicolons: d$-1

2010-10-27 Thread John Beckett
Dotan Cohen wrote: How about not including the last N characters? For instance, in C# there may be a statement in which I wish to delete all but the last 3 characters, such as: Console.WriteLine(Lots of text here that I want to delete); Before looking at your request, are you aware of text

RE: Deleting buffer and going to next

2010-10-27 Thread John Beckett
Martin Braun wrote: I was wondering if there's a way to concoct a command to - Delete the current buffer and - Move to the next without destroying my split layout. If you use ':set hidden', and you do not actually need to delete the current buffer (just close its window), you could use:

RE: netrw v125: Texplore does not start browsing from current file's directory

2010-10-26 Thread John Beckett
Gianluca Ciccarelli wrote: Recently, however, when I type :Texplore I get a new tab opened with the list of files, but instead of starting from the directory of the file opened at the moment of the command being launched, it starts from the current directory (the one echoed by :pwd). ':help

RE: WinXP - E484 Can't open file

2010-10-22 Thread John Beckett
aki y wrote: C:\Program Files\Vim\vim72\gvim -u NONE -U NONE And then on the Vim command line: :echo system('echo foo') Then the error I get is E484: Can't open file C:\DOCUME~1\michiaki\Local Settings\Temp \VIo2669.tmp What is output from (not sure if this is relevant): :set shell?

RE: replace spaces by tabs begining line

2010-10-19 Thread John Beckett
statquant2 wrote: I would like to refactor code and to be able to replace spaces that are on the begining of lines by tabs (lets say 4 spaces = 1 tab). Unfortunatelly I can't find a prpoer way to do it... I red about retab but couldn't find a clear tutorial... Our tip is:

RE: Folding,C++

2010-10-18 Thread John Beckett
Heefan wrote: How do I fold the if in following code? I typed 'zc' but it folded all main function. If filetype is cpp (or c) and foldmethod is syntax, you should be able to use zc to close an if(){...} block (or za to toggle it open/closed). When viewing the cpp file, what is the output

RE: Some ideas for c.vim plugins or was it already implemented by someone ?

2010-10-17 Thread John Beckett
Aaron Lewis wrote: Hmm , I tried this one , iabbr mif if () {} /* IF */ I'll have to type in mif , press ESC , and TAB then , i could see it expanded , but as document said iabbrev works for insert mode only , am i making some mistakes here ? ( i thought pressing ESC button is not actually

RE: Use of matchadd()

2010-10-16 Thread John Beckett
ThG wrote: I would like to highlight the words to define and for that purpose use matchadd() with a more specific separator, such as :: instead of : and thus have : zo :: opens a fold on the cursor (with zo :: highlighted) zc :: closes a fold on the cursor (d°) I have put in my .vimrc :

RE: Some ideas for c.vim plugins or was it already implemented by someone ?

2010-10-16 Thread John Beckett
Aaron Lewis wrote: -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ ... While I am in mother mode, may I suggest that it is NOT necessary to post authenticated mail to a mailing list. Sending large signature

RE: grep quickfix window question

2010-10-16 Thread John Beckett
ZyX wrote: Original message: ... Please stop quoting the full message. This mailing list has debated the issue too often, and we have no interest in convincing anyone of whether we are right or wrong. It's just a request when using this mailing list (if you like, call it a condition). See the

RE: Pain at Vim Tips wiki

2010-10-05 Thread John Beckett
Ben Fritz wrote: I personally like the fact that we don't need to worry about the heavy spam filtering, server security, server maintenance, version upgrades, etc. I like having a team of (presumably paid?) support people that can come to our aid when needed. The changes that are coming are,

RE: Pain at Vim Tips wiki

2010-10-04 Thread John Beckett
Oivvio Polite wrote: Just out of curiosity, how was the decision made that the vim wiki should be hosted at wikia? Wouldn't be natural for a project of this size to have a wiki completely under its own control? Some history of the wiki is available here:

RE: Buffers in command line?

2010-10-04 Thread John Beckett
Ven Tadipatri wrote: I was wondering if there was a way to paste the contents of a buffer when in command line mode. For example, if I want to search for the word that I'm on, I was thinking of highlighting it in visual mode, yanking it into a buffer, then searching for what I yanked.

Pain at Vim Tips wiki

2010-09-30 Thread John Beckett
So everyone can share the pain, here is advance notice of what Wikia are planning for the Vim Tips wiki http://vim.wikia.com/ Wikia have several large wikis (much larger than ours), with often young participants. Wikia want to boost kiddie participation, which leads to more page views on

RE: capture key release to activate

2010-09-24 Thread John Beckett
rob wrote: Can vim capture key up/down events and have mappings? No, you cannot map a key up/down event (Vim works on a very wide range of platforms where such things are not possible). It is best to learn Vim techniques. If the buffer switching procedures do not appeal, you can always tearoff

RE: Prevent vim from printing stack trace.

2010-09-20 Thread John Beckett
Milan Radovich wrote: How can I prevent vim from printing the stack trace, only the error itself: in an example above only E257: cstag: tag not found A function can use try...catch to handle errors and display any message it wants. An example is here:

RE: Vim tutor file?

2010-09-20 Thread John Beckett
Dotan Cohen wrote: Despite the fact that the version is supposed to include vimtutor, I cannot find it! I have googled for the vimtutor file to download, but I cannot find it online! From where can one download the vimtutor file? In Vim, enter ':help vimtutor'. Most Windows installs create a

RE: Search 2 string and copy string inbetween in a new file

2010-09-20 Thread John Beckett
HermannHeilner wrote: Search a specific pattern A, then search a specific pattern B, then mark the letters between these two patterns and copy these into a new file. While a general solution is tricky, if certain restraints apply, this might work well. For example, suppose you know in advance

RE: Inserting text where set tw=$FOO has already been set

2010-09-20 Thread John Beckett
Thomas Adam wrote: Let's say I'm editing a filetype (regardless) and the tw value is set to 78. This works fine on new lines where I am typing new text -- when I d this the line I am typing wraps at 78 chars, and all is happy with world. This falls apart though when I then decide I need to

RE: What *exactly* does :behave mswin do?

2010-09-20 Thread John Beckett
Brian Sullivan wrote: What *exactly* does :behave mswin do? At ':help :behave' we see that it sets behavior for mouse and selection. It then shows what I believe are the precise changes (it sets certain values for four options). It has nothing to do with Ctrl-C etc. It is a long time since I

RE: indent a selection in gvim (win32)

2010-09-17 Thread John Beckett
albert kao wrote: How to indent a selection of lines in gvim 7.2 on windows XP SP3? Please read the following and try it, particularly the Indenting examples section. http://vim.wikia.com/wiki/Shifting_blocks_visually There are many misguided explanations for how to indent text, but it is

RE: Can anybody please explain me about Mapeom

2010-09-16 Thread John Beckett
NEW USERS ON THIS MAILING LIST: Please bottom post on this list. Quote a small (relevant) part of the message you are replying to, and put your text underneath. Delete text that is not needed to understand your reply. See http://groups.google.com/group/vim_use/web/vim-information John -- You

RE: count and v:operator not set correctly in vim7.3

2010-09-09 Thread John Beckett
yoru.007 wrote: Did anyone come into this problem? I typed d2w and 3d2w in normal mode and :echo v:count, the result were all 0. The problem is that when you type :echo v:count there is no count (it was a previous command which had a count). Borrowing from ':help v:count', you could try this:

RE: have tabs after the first non-blank inserted as spaces

2010-09-09 Thread John Beckett
livim wrote: I can't understand It might be nice to have tabs after the first non- blank inserted as spaces if you do this though. Who can give me some illustration? I do not know what the help text is saying. However, see: http://vim.wikia.com/wiki/Indent_with_tabs%2C_align_with_spaces

RE: count and v:operator not set correctly in vim7.3

2010-09-09 Thread John Beckett
yoru.007 wrote: but 3d2wF8 still gives the count is0 The point is that 3d2w is a complete command. The count is used by that command. After that, you press F8, but that is a NEW command and it has no count. John -- You received this message from the vim_use maillist. Do not top-post! Type

RE: formating

2010-09-08 Thread John Beckett
sandeep kapse wrote: I have to shift the following text to left or right with just one place (space) It would be best to ':setlocal' for this buffer: :setl sts=1 sw=1 et That's softtabstop and shiftwidth 1 character, expand tabs (assuming you want only spaces for indents. With the cursor

RE: vim equivalent of save-excursion in emacs

2010-09-07 Thread John Beckett
Oivvio Polite wrote: I came up with this mapping to reformat the current paragraph imap leader. Esc{V}!parCRi Of course the par tool can do all sorts of clever things, but if all you want is wrapping and perhaps a little more, the Vim commands are good. To format the current paragraph type:

RE: Vim for code navigation

2010-09-03 Thread John Beckett
vtadipatri wrote: To jump to a tag I think I should use ctrl+], but if I've changed the file it keeps prompting me that I need to use ! to override. You do not want '!' because if you managed to use it, your changes to the file would be lost. You need to do some reading about buffers and the

RE: Forcing Vim to use findstr as 'grepprg' on Windows

2010-09-01 Thread John Beckett
Kyro El wrote: I have trouble forcing Vim to use findstr /N as grepprg on Windows. I don't know what tricks does Vim do under the hood, but my grepprg is set to 'grep -nH $*' by default. However, while I do have a copy of grep in my path, it doesn't support the '-H' option. I then put 'set

RE: Writing a configuration file in vim script

2010-08-29 Thread John Beckett
Gusman wrote: Can I create/write/read/delete file using vim script as other programming language do? Yes. Vim script takes a little bit of time to figure out. One point is that (with suitable settings) you can simply put values in certain global variables and they will be saved/restored

RE: Getting word under cursor

2010-08-27 Thread John Beckett
Gusman wrote: When I use try :echo expand(cword), it return the correct value. But when I put it in a function like below: function! WordEcho() echo expand(cWORD) endfunction nnoremap silent LocalLeaderk: call WordEcho() CR Then I type \k in normal mode, it return wrong value, but

RE: WIN7 Can not set vim 7.3 as default program

2010-08-27 Thread John Beckett
Steve Hall wrote: I suppose some work with the NSIS installer config would allow an option (default?) to register Vim during install? Extremely easy to do this (two lines), but I'd need overwhelming support here for me to add it since: * The default Vim installer doesn't do this.

RE: Highlighting seems to forget values

2010-08-26 Thread John Beckett
Martin Braun wrote: Using this snippet in .vimrc colorscheme delek highlight WhiteSpaceEOL ctermbg=darkgreen guibg=lightgreen highlight OverLength ctermbg=red ctermfg=white guibg=#592929 I can't use the highlight values WhiteSpaceEOL and OverLength anywhere. However, if I delete the

RE: WIN7 Can not set vim 7.3 as default program

2010-08-26 Thread John Beckett
yschandra wrote: Right click on the file lets take example 1.C and select open with, in the pop opened window GVIM is not present as an app for so select Browse button and navigate to gvim.exe and select it and press ok, now GVIM should come in list applications to handle this file type then

RE: WIN7 Can not set vim 7.3 as default program

2010-08-26 Thread John Beckett
yschandra wrote: I do not think VIM provide file associations when installing. In windows you choose any application for a particular file type by the process I have described. Once do that it will create a file association, which is what not working with 7.3. I download VIM only from

RE: WIN7 Can not set vim 7.3 as default program

2010-08-26 Thread John Beckett
Gary Johnson wrote: From my experience, it appears that the installer from vim.sf.net does set up the ability to make those associations but the Cream installer does not. Steve Hall: Would you please confirm this. I suppose some work with the NSIS installer config would allow an option

RE: WIN7 Can not set vim 7.3 as default program

2010-08-25 Thread John Beckett
yschandra wrote: I updated from 7.2 to 7.3 on Windows 7 Prof. Generally I set gvim as default program for .C, .H, .CPP file extensions. This was working with 7.2 however I am unable to do this with 7.3. If I reinstall 7.2 then it is working fine. I think there is some problem with 7.3 windows

RE: Missing help?

2010-08-24 Thread John Beckett
Didlybom wrote: Do you guys know if the regular vim installer installs the vim documentation? Whenever I try to access the help by typing :help I get the following error: E434: Can't find tag pattern Not sure. In Vim, look at result from: :echo $VIMRUNTIME Under that directory, there

<    1   2   3   4   5   6   7   8   >