or s: - General questions about functions

2011-04-11 Thread rameo
After a half year of use of VIM, I still don't understand what is, and if there is a difference between and "s:". (even after reading the help file) Can they be exchanged? Fun!, fun!, Function! and function! is the same isn't? Endfunction, endfunction, Endfun, endfun also? I often Titlecase fun

Re: Apply different configurations to code and plain text

2011-04-11 Thread Gerardo Marset
El 11/04/11 20:33, Gary Johnson escribió: On 2011-04-11, Gerardo Marset wrote: Consider the following pseudo-code: if file_is_code: setlocal softtabstop=4 setlocal shiftwidth=4 setlocal expandtab else: setlocal softtabstop=8 setlocal shiftwidth=8 Is there a simple way

Re: Apply different configurations to code and plain text

2011-04-11 Thread Gary Johnson
On 2011-04-11, Gerardo Marset wrote: > Consider the following pseudo-code: > > if file_is_code: > setlocal softtabstop=4 > setlocal shiftwidth=4 > setlocal expandtab > else: > setlocal softtabstop=8 > setlocal shiftwidth=8 > > Is there a simple way to do this? You could put t

Apply different configurations to code and plain text

2011-04-11 Thread Gerardo Marset
Consider the following pseudo-code: if file_is_code: setlocal softtabstop=4 setlocal shiftwidth=4 setlocal expandtab else: setlocal softtabstop=8 setlocal shiftwidth=8 Is there a simple way to do this? -- You received this message from the "vim_use" maillist. Do not top-post

Re: Any non-programmer users of Vim here?

2011-04-11 Thread AK
On 04/11/2011 05:04 PM, Adam Monsen wrote: Erik Christiansen wrote: Simply capitalising keywords in the file allows rapid access to the desired information How does that work? Will you share an example? Also, will you share your .vimrc? I think Erik simply meant searching for Mykey will sk

Re: Any non-programmer users of Vim here?

2011-04-11 Thread Adam Monsen
Erik Christiansen wrote: > Simply capitalising keywords in the file allows rapid access to the > desired information How does that work? Will you share an example? Also, will you share your .vimrc? -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below

Re: soft wrapping at a specified column

2011-04-11 Thread Tim Gray
On Apr 08, 2011 at 02:15 PM -0700, Gary Johnson wrote: If you open Vim in a window wider than 80 columns, it will automatically open a new window on the right such that the left window is 80 columns wide. Thanks for the pointers guys. I'll play around with them. It's a shame this isn't an op

Re: Any non-programmer users of Vim here?

2011-04-11 Thread Adam Monsen
On 04/07/2011 06:13 PM, Eric Weir wrote: > Hope to find some free time in the next few days just to mess > around with it -- actually, to do the tutorial -- and maybe get > over the initial hump of total bafflement. Based on your participation on this list, looks like you've got plenty of free tim

Re: gf split hack breaks visual mode

2011-04-11 Thread Adam Monsen
Ben Fritz wrote: > Maybe use CTRL-W_f instead? I'm not sure whether it will work in a > mapping but it probably will. Aha, found a fix. Here's a pseudo-diff: -map gf :split +nmap gf :split -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the tex

Re: Macros on rest of file (was "Any non-programmer users of Vim here?")

2011-04-11 Thread Ben Fritz
On Apr 11, 6:42 am, Tim Chase wrote: > Lastly, I think if Vim encounters an error in macro-execution > (such as trying to move past the EOF), it stops not only the > macro in process but any subsequent runs, so you can issue some > ridiculous number of repetitions as your count as long as it > e

Re: Pattern matching problem

2011-04-11 Thread Ben Fritz
On Apr 11, 3:05 am, "Benjamin R. Haskell" wrote: > On Mon, 11 Apr 2011, howard Schwartz wrote: > > Hi, > > > A quick puzzle: when I have words separated by 2 spaces like this: > > > firstword  secondword > > > vim does not seem to match the double spages with a pattern like these: > > > /  /    

Re: gf split hack breaks visual mode (was: regarding using "gf" command)

2011-04-11 Thread Ben Fritz
On Apr 11, 11:26 am, Adam Monsen wrote: > Christian Brabandt wrote: > > I usually use visual mode together with gf. > > Ah, nice! I hadn't thought of trying that. > > I usually use this hack in my .vimrc to make gf always use a new > window: > >   map gf :split > > But this breaks the handy use

gf split hack breaks visual mode (was: regarding using "gf" command)

2011-04-11 Thread Adam Monsen
Christian Brabandt wrote: > I usually use visual mode together with gf. Ah, nice! I hadn't thought of trying that. I usually use this hack in my .vimrc to make gf always use a new window: map gf :split But this breaks the handy use of {Visual}[count]gf. Anyone know why, and/or how to make th

Re: Any non-programmer users of Vim here?

2011-04-11 Thread Tony Mechelynck
On 11/04/11 17:27, Tony Mechelynck wrote: On 11/04/11 15:46, Steve wrote: Hi there, Very interresting thread, but : Le 09-04-2011, à 08:53:30 +0200, Tony Mechelynck (antoine.mechely...@gmail.com) a écrit : There is also, as I said before, "help on using help", obtained by typing :help helph

Re: Any non-programmer users of Vim here?

2011-04-11 Thread Tony Mechelynck
On 11/04/11 15:46, Steve wrote: Hi there, Very interresting thread, but : Le 09-04-2011, à 08:53:30 +0200, Tony Mechelynck (antoine.mechely...@gmail.com) a écrit : There is also, as I said before, "help on using help", obtained by typing :help helphelp.txt "Sorry, no help for help

Re: Any non-programmer users of Vim here?

2011-04-11 Thread Eric Weir
On Apr 11, 2011, at 2:11 AM, eNG1Ne wrote: > My take on the learning curve and the documentation? it's a bit tricky > to learn vim _and_ editing at the same time, but if you come to vim > because you know what you want to do and you're looking for a > competent tool to do it ... my editor of choi

Re: Pattern matching problem

2011-04-11 Thread Tim Chase
On 04/11/2011 03:05 AM, Benjamin R. Haskell wrote: On Mon, 11 Apr 2011, howard Schwartz wrote: More seriously, I trying to do a substitute and replace on lines like this: DEBIT,03/25/2011,"ATT First Payment PPD ID: 4031004",-42.34 I want to replace it with a line like

Re: Any non-programmer users of Vim here?

2011-04-11 Thread Eric Weir
On Apr 10, 2011, at 8:55 PM, AK wrote: > The way I think about this is.. it does have quite a learning curve and > even though others will disagree, my feeling is that the documentation > and help system are very, very far from ideal for a new user (although > both are near perfect as a reference

Re: Any non-programmer users of Vim here?

2011-04-11 Thread Steve
Le 11-04-2011, à 15:49:08 +0200, Christian Brabandt (cbli...@256bit.org) a écrit : > >> There is also, as I said before, "help on using help", obtained by > >> typing > >> > >>:help helphelp.txt > > > > "Sorry, no help for helphelp.txt" (my translation from French). > > > > All the other onli

Re: Any non-programmer users of Vim here?

2011-04-11 Thread Dotan Cohen
On Fri, Apr 8, 2011 at 07:52, Magnus Woldrich wrote: > I use vim for everything. And I have vim-bindings in *every* application > that I > use. > Here's my setup: > >                  Browser: Firefox with pentadactyl [6] >             Writing Mail: mutt, with editor set to vim > > 6: http://dacty

Re: Any non-programmer users of Vim here?

2011-04-11 Thread Christian Brabandt
On Mon, April 11, 2011 3:46 pm, Steve wrote: > Hi there, > > Very interresting thread, but : > > Le 09-04-2011, à 08:53:30 +0200, Tony Mechelynck > (antoine.mechely...@gmail.com) a écrit : > >> There is also, as I said before, "help on using help", obtained by >> typing >> >> :help helphelp.tx

Re: Any non-programmer users of Vim here?

2011-04-11 Thread Steve
Hi there, Very interresting thread, but : Le 09-04-2011, à 08:53:30 +0200, Tony Mechelynck (antoine.mechely...@gmail.com) a écrit : > There is also, as I said before, "help on using help", obtained by typing > > :help helphelp.txt "Sorry, no help for helphelp.txt" (my translation from F

Re: regarding using "gf" command

2011-04-11 Thread Christian Brabandt
On Mon, April 11, 2011 2:39 pm, Ben Schmidt wrote: > On 11/04/11 10:16 PM, Venu Gopal wrote: >> Hi, >> I am trying to open a file with "gf" command. It works fine in following >> Ex: >> My file is /tmp/file.txt. >> >> But if have something like this, it doesn't work >> My file is-/tmp/file.txt. >>

Re: regarding using "gf" command

2011-04-11 Thread Ben Schmidt
On 11/04/11 10:16 PM, Venu Gopal wrote: Hi, I am trying to open a file with "gf" command. It works fine in following Ex: My file is /tmp/file.txt. But if have something like this, it doesn't work My file is-/tmp/file.txt. Is there anyway to specify extra delimiters such as "-". I want to exclud

regarding using "gf" command

2011-04-11 Thread Venu Gopal
Hi, I am trying to open a file with "gf" command. It works fine in following Ex: My file is /tmp/file.txt. But if have something like this, it doesn't work My file is-/tmp/file.txt. Is there anyway to specify extra delimiters such as "-". I want to exclude this "-" for find file. Please let me kn

Re: Macros on rest of file (was "Any non-programmer users of Vim here?")

2011-04-11 Thread Tim Chase
On 04/11/2011 01:11 AM, eNG1Ne wrote: Quibbles? can't find a "run to end of file" for macros Would :,$norm @a work for you? (obviously assuming that your macro was recorded into register "a") Alternatively, if your macro processes more than one line at a time, you could tweak it to :,

Re: Pattern matching problem

2011-04-11 Thread Benjamin R. Haskell
On Mon, 11 Apr 2011, howard Schwartz wrote: Hi, A quick puzzle: when I have words separated by 2 spaces like this: firstword secondword vim does not seem to match the double spages with a pattern like these: / /or/\s\s/ Yet when there are 3 spaces between words, patterns like /\s\s\s/

Pattern matching problem

2011-04-11 Thread howard Schwartz
Hi, A quick puzzle: when I have words separated by 2 spaces like this: firstword secondword vim does not seem to match the double spages with a pattern like these: / /or/\s\s/ Yet when there are 3 spaces between words, patterns like /\s\s\s/ match fine. Can anyone explain? More serious